Individual
Rate Checking
This enable rate checking from all courier companies in EasyParcel platform. User need to provide sender and receiver address to check the shipment rate.
Request L1
Name | Type | Required | Description |
---|---|---|---|
api | string(25) | Yes | Obtain from registered account. |
bulk | array | Yes | (Refer to table L2) |
Request L2
Name | Type | Required | Description |
---|---|---|---|
pick_code | string(10) | Yes | Sender's postcode. |
pick_country | string(2) | Yes | Sender's country (“SG”). |
send_code | string(10) | Yes | Receiver's postcode. |
send_country | string(2) | Yes | Receiver's country (“SG”). |
weight | double(8,2) | Yes | The weight of the parcel. |
width | double(8,2) | Optional | The width of the parcel. |
length | double(8,2) | Optional | The length of the parcel. |
height | double(8,2) | Optional | The height of the parcel. |
date_coll | date | Optional | Check the available pickup date. If the date is left empty, the default will be today’s date. Format : “YYYY-MM-DD” |
Sample Code
<?php
$domain = "https://demo.connect.easyparcel.sg/?ac=";
$action = "EPRateCheckingBulk";
$postparam = array(
'api' => 'xxxxxx',
'bulk' => array(
array(
'pick_code' => '059893',
'pick_country' => 'SG',
'send_code' => '059897',
'send_country' => 'SG',
'weight' => '10',
'width' => '0',
'length' => '0',
'height' => '0',
'date_coll' => '2017-11-10',
),
array(
'pick_code' => '059893',
'pick_country' => 'SG',
'send_code' => '059897',
'send_country' => 'SG',
'weight' => '10',
'width' => '0',
'length' => '0',
'height' => '0',
'date_coll' => '2017-11-10',
),
),
);
$url = $domain.$action;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postparam));
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
ob_start();
$return = curl_exec($ch);
ob_end_clean();
curl_close($ch);
$json = json_decode($return);
echo "<pre>"; print_r($json); echo "</pre>";
?>
Response L1
Return Value | Type | Description | Remarks |
---|---|---|---|
api_status | string(10) | Validation result | (Refer to Appendix I) |
error_code | int(5) | Error code | (Refer to Appendix I) |
error_remark | string(100) | Error message | (Refer to Appendix I) |
result | array | The response of the rate checking | (Refer to table L2) |
Response L2
Return Value | Type | Description | Remarks |
---|---|---|---|
status | string(10) | The status of the rate checking. | Fail / Success |
remarks | string(100) | The error message for rate checking. | |
rates | array | The result of the rate checking | (Refer to table L3) |
Response L3
Return Value | Type | Description | Remarks |
---|---|---|---|
service_id | string (15) | Service ID | |
service_name | string (100) | Service name | |
service_type | string (10) | Type of service | parcel/ document |
courier_id | string (10) | Courier ID | |
courier_name | string (100) | Courier name | |
courier_logo | string (300) | Courier logo | |
scheduled_start_date | string (50) | Scheduled pickup for parcel. | |
pickup_date | date | The date to pickup the parcel. | Same day pickup only available before 12pm. |
delivery | string (100) | The day(s) to deliver the parcel. | |
price | double(8,2) | Booking price. | |
whatsapp_tracking_available | boolean | Identifies if there is whatsapp tracking service available | True if supported / False if not supported. Addon insurance can only be purchased for parcels which value exceed the basic_insurance_max_value. |
whatsapp_tracking_price | double(8,2) | Whatsapp Tracking charges/price |
Response sample - Success
{
"api_status":"Success",
"error_code":"0",
"error_remark":"",
"result":[
{
"status":"Success",
"remarks":"",
"rates":[
{
"service_id":"EP-CS0D",
"service_name":"Next Day Pick Up Service",
"service_type":"parcel",
"courier_id":"EP-CR0A",
"courier_name":"Nationwide",
"courier_logo":"http:\/\/source.easyparcel.sg\/img\/logo\/Nationwide-Express-logo.jpg",
"scheduled_start_date":"2017-11-11 Saturday",
"pickup_date":"2017-11-11",
"delivery":"Estimated 1 working day(s)",
"price":"20.90"
}
]
},
{
"status":"Success",
"remarks":"",
"rates":[
{
"service_id":"EP-CS0D",
"service_name":"Next Day Pick Up Service",
"service_type":"parcel",
"courier_id":"EP-CR0A",
"courier_name":"Nationwide",
"courier_logo":"http:\/\/source.easyparcel.sg\/img\/logo\/Nationwide-Express-logo.jpg",
"scheduled_start_date":"2017-11-11 Saturday",
"pickup_date":"2017-11-11",
"delivery":"Estimated 1 working day(s)",
"price":"20.90"
}
]
}
]
}
Response example - Fail
{
"api_status":"Error",
"error_code":"3",
"error_remark":"Required api key",
"result":[
]
}
Making Order
The authenticated user can make single order at EasyParcel. User need to make sure the courier service is available.
Request L1
Name | Type | Required | Description |
---|---|---|---|
api | string(25) | Yes | Obtain from registered account. |
bulk | array | Yes | (Refer to Request L2) |
Request L2
Name | Type | Required | Description |
---|---|---|---|
weight | double(8,2) | Yes | The weight of the parcel. |
width | double(8,2) | Optional | The width of the parcel. |
length | double(8,2) | Optional | The length of the parcel. |
height | double(8,2) | Optional | The height of the parcel. |
content | string(35) | Yes | The content of the parcel. |
value | double(8,2) | Yes | The amount of the items. |
service_id | string(10) | Yes | Obtain from EPRateChecking return value. |
pick_name | string(35) | Yes | Sender's name |
pick_company | string(30) | Optional | Sender's company |
pick_mobile | string(16) | Optional | Sender's mobile. |
pick_contact | string(16) | Yes | Sender's contact. |
pick_unit | string(10) | Yes | Sender's unit |
pick_code | string(10) | Yes | Sender's postcode. |
pick_country | string(35) | Yes | Sender's country (“SG”). |
send_name | string(35) | Yes | Receiver's name. |
send_company | string(30) | Optional | Receiver's company. |
send_mobile | string(16) | Optional | Receiver's mobile. |
send_contact | string(16) | Yes | Receiver's contact. |
send_unit | string(10) | Yes | Receiver's unit |
send_addr1 | string(35) | Yes | Receiver's addr1 |
send_state | string(10) | Yes | Receiver's state |
send_code | string(10) | Yes | Receiver's postcode. |
send_country | string(35) | Yes | Receiver's country. (Refer to Appendix II) |
collect_date | date | Yes | Check the available pickup date. If didn't put the date,today date will be default. Format : “YYYY-MM-DD” |
reference | string(25) | Optional | The parcel reference |
sms | boolean | Yes | Require for sms feature (Example, true/false) |
addon_whatsapp_tracking_enabled | boolean | Optional | The parcel is to whether purchase WhatsApp tracking. The receiver phone must be valid for the WhatsApp tracking to be received |
Sample Code
<?php
$domain = "https://demo.connect.easyparcel.sg/?ac=";
$action = "EPSubmitOrderBulk";
$postparam = array(
'api' => 'xxxxxx',
'bulk' => array(
array(
'weight' => '1',
'width' => '0',
'length' => '0',
'height' => '0',
'content' => 'book',
'value' => '20',
'service_id' => 'EP-CS0D',
'pick_name' => 'Yong Tat',
'pick_company' => 'Yong Tat Sdn Bhd',
'pick_mobile' => '',
'pick_contact' => '+6568505280',
'pick_unit' => '30',
'pick_code' => '059892',
'pick_country' => 'SG',
'send_name' => 'Sam',
'send_company' => '',
'send_mobile' => '',
'send_contact' => '+60-0178320239',
'send_unit' => '12',
'send_addr1' => '12',
'send_state' => 'png',
'send_code' => '119916',
'send_country' => 'SG',
'collect_date' => '2017-11-15',
'reference' => 'order123',
),
array(
'weight' => '1',
'width' => '0',
'length' => '0',
'height' => '0',
'content' => 'book',
'value' => '20',
'service_id' => 'EP-CS0D',
'pick_name' => 'Yong Tat',
'pick_company' => 'Yong Tat Sdn Bhd',
'pick_mobile' => '',
'pick_contact' => '+6568505280',
'pick_unit' => '30',
'pick_code' => '059892',
'pick_country' => 'SG',
'send_name' => 'Sam',
'send_company' => '',
'send_mobile' => '',
'send_contact' => '+60-0178320239',
'send_unit' => '12',
'send_addr1' => '12',
'send_state' => 'png',
'send_code' => '119916',
'send_country' => 'SG',
'collect_date' => '2017-11-15',
'reference' => 'order123',
),
),
);
$url = $domain.$action;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postparam));
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
ob_start();
$return = curl_exec($ch);
ob_end_clean();
curl_close($ch);
$json = json_decode($return);
echo "<pre>"; print_r($json); echo "</pre>";
?>
Response L1
Return Value | Type | Description | Remarks |
---|---|---|---|
api_status | string(10) | Validation result | (Refer to Appendix I) |
error_code | int(5) | Error code | (Refer to Appendix I) |
error_remark | string(100) | Error message | (Refer to Appendix I) |
result | array | The response of the orders made. | (Refer to Response L2) |
Response L2
Return Value | Type | Description | Remarks |
---|---|---|---|
status | string(10) | The status of the orders made. | Fail / Success |
remarks | string(100) | The error message for orders made. | |
order_number | string(12) | The response of the order placed. | Failed = 0 / Success = (order_number) |
price | double(8,2) | Order price | |
addon_whatsapp_tracking_charges | double(8,2) | The WhatsApp Tracking Charges Only |
Response sample - Success
{
"api_status":"Success",
"error_code":"0",
"error_remark":"",
"result":[
{
"status":"Success",
"remarks":"Order Successfully Placed",
"order_number":"EI-000JC",
"price":"6.30"
},
{
"status":"Success",
"remarks":"Order Successfully Placed",
"order_number":"EI-000J3",
"price":"6.30"
}
]
}
Response example - Fail
{
"api_status":"Error",
"error_code":"3",
"error_remark":"Required api key",
"result":[
]
}
Making Order Payment
This step involves payment for the orders made. The authenticated user can do single order payment. Single order payment refers to payment for a single parcel only. There are various payment conditions that may appear such as insufficient credit (when user’s account do not have sufficient credit to perfom payment), sufficient credit (when there are sufficient credit for payment) and etc.
Request L1
Name | Type | Required | Description |
---|---|---|---|
api | string(25) | Yes | Obtain from registered account. |
bulk | array | Yes | (Refer to Request L2) |
Request L2
Name | Type | Required | Description |
---|---|---|---|
order_no | string(15) | Yes | Acquire from the order that placed. |
Sample Code
<?php
$domain = "https://demo.connect.easyparcel.sg/?ac=";
$action = "EPPayOrderBulk";
$postparam = array(
'api' => 'xxxxxx',
'bulk' => array(
array(
'order_no' => 'EI-000JK',
),
array(
'order_no' => 'EI-000JK',
),
),
);
$url = $domain.$action;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postparam));
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
ob_start();
$return = curl_exec($ch);
ob_end_clean();
curl_close($ch);
$json = json_decode($return);
echo "<pre>"; print_r($json); echo "</pre>";
?>
Response L1
Return Value | Type | Description | Remarks |
---|---|---|---|
api_status | string(10) | Validation result | (Refer to Appendix I) |
error_code | int(5) | Error code | (Refer to Appendix I) |
error_remark | string(100) | Error message | (Refer to Appendix I) |
result | array | The response of the make order payment | (Refer to Response L2) |
Response L2
Return Value | Type | Description | Remarks |
---|---|---|---|
orderno | string (15) | Valid order number. | Valid and authenticated. |
messagenow | string (50) | The message that shows the status of order. | |
parcel | array | The details of the parcel. | (Refer to Response L3) |
Response L3
Return Value | Type | Description | Remarks |
---|---|---|---|
parcelno | string (15) | Parcel number. | |
awb | string (45) | Airway bill number. | |
awb_id_link | string (300) | Link of airway bill ID. |
Response sample - Success
{
"api_status":"Success",
"error_code":"0",
"error_remark":"",
"result":[
{
"orderno":"EI-000JK",
"messagenow":"Fully paid",
"parcel":[
{
"parcelno":"EP-00016",
"awb":"86983174113435",
"awb_id_link":"http:\/\/demo.connect.easyparcel.sg\/?ac=AWBLabel&id=bFk1NHNBQ08jNDYx"
}
]
},
{
"orderno":"EI-000JK",
"messagenow":"Fully paid",
"parcel":[
{
"parcelno":"EP-00016",
"awb":"86983174113435",
"awb_id_link":"http:\/\/demo.connect.easyparcel.sg\/?ac=AWBLabel&id=bFk1NHNBQ08jNDYx"
}
]
}
]
}
Response example - Fail
{
"api_status":"Error",
"error_code":"3",
"error_remark":"Required api key",
"result":[
]
}
Checking Order Status
Get order status by using order number is the recommended call to use for management. Use this call to retrieve all orders in which the authenticated caller.
Request L1
Name | Type | Required | Description |
---|---|---|---|
api | string(25) | Yes | Obtain from registered account. |
bulk | array | Yes | (Refer to Request L2) |
Request L2
Name | Type | Required | Description |
---|---|---|---|
order_no | string(15) | Yes | Acquire from the order placed earlier. |
Sample Code
<?php
$domain = "https://demo.connect.easyparcel.sg/?ac=";
$action = "EPOrderStatusBulk";
$postparam = array(
'api' => 'xxxxxx',
'bulk' => array(
array(
'order_no' => 'EI-000JK',
),
array(
'order_no' => 'EI-000JK',
),
),
);
$url = $domain.$action;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postparam));
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
ob_start();
$return = curl_exec($ch);
ob_end_clean();
curl_close($ch);
$json = json_decode($return);
echo "<pre>"; print_r($json); echo "</pre>";
?>
Response L1
Return Value | Type | Description | Remarks |
---|---|---|---|
api_status | string(10) | Validation result | (Refer to Response L2) |
error_code | int(5) | Error code | (Refer to Appendix I) |
error_remark | string(100) | Error message | (Refer to Appendix I) |
result | array | The result for order status, if status is Success | (Refer to Appendix I) |
Response L2
Return Value | Type | Description | Remarks |
---|---|---|---|
status | string(10) | The status of the orders made. | Fail / Success. |
remarks | string(100) | The message for orders made. | |
order_no | string(15) | Order number. | |
order_status | string(25) | The status of your order. | Cancel / Waiting Payment / Paid / Partial Payment / Undefined Status |
order_payable | string(10) | The order that can pay. | True / False |
Response sample - Success
{
"api_status":"Success",
"error_code":"0",
"error_remark":"",
"result":[
{
"status":"Success",
"remarks":"Correct Order_no",
"order_no":"EI-000JK",
"order_status":"Paid",
"order_payable":"False"
},
{
"status":"Success",
"remarks":"Correct Order_no",
"order_no":"EI-000JK",
"order_status":"Paid",
"order_payable":"False"
}
]
}
Response example - Fail
{
"api_status":"Error",
"error_code":"3",
"error_remark":"Required api key",
"result":[
]
}
Checking Parcel Status
Get parcel status by using order number is the recommended call to use for checking the shipment. Use this call to retrieve parcel details.
Request L1
Name | Type | Required | Description |
---|---|---|---|
api | string(25) | Yes | Obtain from registered account. |
bulk | array | Yes | (Refer to Request L2) |
Request L2
Name | Type | Required | Description |
---|---|---|---|
order_no | string(15) | Yes | Acquire from the order placed |
Sample Code
<?php
$domain = "https://demo.connect.easyparcel.sg/?ac=";
$action = "EPParcelStatusBulk";
$postparam = array(
'api' => 'xxxxxx',
'bulk' => array(
array(
'order_no' => 'EI-000JK',
),
array(
'order_no' => 'EI-000JK',
),
),
);
$url = $domain.$action;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postparam));
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
ob_start();
$return = curl_exec($ch);
ob_end_clean();
curl_close($ch);
$json = json_decode($return);
echo "<pre>"; print_r($json); echo "</pre>";
?>
Response L1
Return Value | Type | Description | Remarks |
---|---|---|---|
api_status | string(10) | Validation result | (Refer to Appendix I) |
error_code | int(5) | Error code | (Refer to Appendix I) |
error_remark | string(100) | Error message | (Refer to Appendix I) |
result | array | The result for parcel status, if status is Success | (Refer to Response L2) |
Response L2
Return Value | Type | Description | Remarks |
---|---|---|---|
status | string(10) | The status of the orders made. | |
remarks | string(100) | The message for orders made. | |
order_no | string(15) | Order number. | |
parcel | array | The result for parcel status, if status is Success | (Refer to Response L3) |
Response L3
Return Value | Type | Description | Remarks |
---|---|---|---|
parcel_number | string(15) | The number of the parcel. | |
ship_status | string(45) | The status of the shipment. | Cancel / Waiting Payment / Pending For Collection / Collected / Returned / Delivering(in transit) / Successfully Delivered / Schedule In Arrangement / On Hold / Expired (Unpaid) / Cancel By Admin / Drop Off / Other Status |
awb | string(45) | Airway bill number. | Empty if null. |
awb_id_link | string(300) | The URL link of the Airway bill | Downloadable PDF file |
Response sample - Success
{
"api_status":"Success",
"error_code":"0",
"error_remark":"",
"result":[
{
"status":"Success",
"remarks":"Correct Order_no",
"order_no":"EI-000JK",
"parcel":[
{
"parcel_number":"EP-00016",
"ship_status":"Schedule In Arrangement",
"awb":"86983174113435",
"awb_id_link":"http:\/\/demo.connect.easyparcel.sg\/?ac=AWBLabel&id=bFk1NHNBQ08jNDYx"
}
]
},
{
"status":"Success",
"remarks":"Correct Order_no",
"order_no":"EI-000JK",
"parcel":[
{
"parcel_number":"EP-00016",
"ship_status":"Schedule In Arrangement",
"awb":"86983174113435",
"awb_id_link":"http:\/\/demo.connect.easyparcel.sg\/?ac=AWBLabel&id=bFk1NHNBQ08jNDYx"
}
]
}
]
}
Response example - Fail
{
"api_status":"Error",
"error_code":"3",
"error_remark":"Required api key",
"result":[
]
}
Tracking Parcel Details
Track the shipment status using airway bill number.
Request L1
Name | Type | Required | Description |
---|---|---|---|
api | string(25) | Yes | Obtain from registered account. |
bulk | array | Yes | (Refer to Request L2) |
Request L2
Name | Type | Required | Description |
---|---|---|---|
awb_no | string(25) | Yes | Generate automatically after the payment. |
Sample Code
<?php
$domain = "https://demo.connect.easyparcel.sg/?ac=";
$action = "EPTrackingBulk";
$postparam = array(
'api' => 'xxxxxx',
'bulk' => array(
array(
'awb_no' => '86983175113435',
),
array(
'awb_no' => '86983175113435',
),
),
);
$url = $domain.$action;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postparam));
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
ob_start();
$return = curl_exec($ch);
ob_end_clean();
curl_close($ch);
$json = json_decode($return);
echo "<pre>"; print_r($json); echo "</pre>";
?>
Response L1
Return Value | Type | Description | Remarks |
---|---|---|---|
api_status | string(10) | Validation result | (Refer to Appendix I) |
error_code | int(5) | Error code | (Refer to Appendix I) |
error_remark | string(100) | Error message | (Refer to Appendix I) |
result | array | Result of tracking | (Refer to Response L2) |
Response L2
Return Value | Type | Description | Remarks |
---|---|---|---|
latest_status | string(45) | The status of the shipment. | (Refer to Response L3 & Response L4) |
latest_status | string(45) | The status of the shipment. | |
latest_update | string(45) | Show the date and time. | |
awb | string(45) | Airway bill number. |
Response L3
Return Value | Type | Description | Remarks |
---|---|---|---|
status | string(45) | The status of the shipment. | |
sender | string(45) | The name of the sender | |
receiver | string(45) | The name of the receiver |
Response L4
Return Value | Type | Description | Remarks |
---|---|---|---|
event_date | date | Show date. | |
event_time | time | Show time. | |
status | string(150) | The status of the shipment. | |
location | string(100) | Track the location of the parcel. |
Response sample - Success
{
"api_status":"Success",
"error_code":"0",
"error_remark":"",
"result":[
{
"status_list":{
"0":{
"event_date":"2017-12-27",
"event_time":"11:40 AM",
"status":"Delivered",
"location":"Demo"
},
"status":"",
"sender":"xxxxxx",
"receiver":"xxxxxx"
},
"latest_status":"Deliverd",
"latest_update":"2017-12-27",
"awb":"86983175113435"
},
{
"status_list":{
"0":{
"event_date":"2017-12-27",
"event_time":"11:40 AM",
"status":"Delivered",
"location":"Demo"
},
"status":"",
"sender":"xxxxxx",
"receiver":"xxxxxx"
},
"latest_status":"Deliverd",
"latest_update":"2017-12-27",
"awb":"86983175113435"
}
]
}
Response example - Fail
{
"api_status":"Error",
"error_code":"3",
"error_remark":"Required api key",
"result":[
]
}
Appendix I (API Return Status)
api_status | error_code | error_remark | ||
---|---|---|---|---|
Error | 3 | Required api key | ||
Error | 4 | Invalid api key | ||
Error | 5 | Unauthorized user | ||
Success | 0 |
Appendix II (Country Code List)
Short Country Name | Full Country Name | |||
---|---|---|---|---|
SG | SINGAPORE | |||
AU | AUSTRALIA | |||
BN | BRUNEI DARUSSALAM | |||
KH | CAMBODIA | |||
CA | CANADA | |||
CN | CHINA | |||
HK | HONG KONG | |||
JP | JAPAN | |||
MO | MACAU | |||
MM | MYANMAR | |||
MY | MALAYSIA | |||
NZ | NEW ZEALAND | |||
KR | KOREA, REPUBLIC OF | |||
TW | TAIWAN | |||
TH | THAILAND | |||
GB | UNITED KINGDOM | |||
US | UNITED STATES | |||
VN | VIETNAM |