Tracking Parcel Details
Track the shipment status using airway bill number.
POST
https://demo.connect.easyparcel.sg/?ac=MPTrackingBulk Body: application/x-www-form-urlencoded · action MPTrackingBulk
Request parameters
Request L1
| Parameter | Type | Required | Description |
|---|---|---|---|
authentication | string(25) | Yes | Obtain from EasyParcel IT administrator |
api | string(25) | Yes | Obtain from registered account. |
bulk | array | Yes | (Refer to Request L2) |
Request L2 · bulk[]
| Parameter | Type | Required | Description |
|---|---|---|---|
awb_ | string(25) | Yes | Generate automatically after the payment. |
Sample code
php
<?php
$domain = "https://demo.connect.easyparcel.sg/?ac=";
$action = "MPTrackingBulk";
$postparam = array(
'authentication' => 'xxxxxx',
'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>";
?>bash
curl -X POST 'https://demo.connect.easyparcel.sg/?ac=MPTrackingBulk' \
--data-urlencode 'authentication=xxxxxx' \
--data-urlencode 'api=xxxxxx' \
--data-urlencode 'bulk[0][awb_no]=86983175113435' \
--data-urlencode 'bulk[1][awb_no]=86983175113435'Response
Response L1
| Field | Type | Description | Remarks |
|---|---|---|---|
api_ | string(10) | Validation result | (Refer to Appendix I) |
error_ | int(5) | Error code | (Refer to Appendix I) |
error_ | string(100) | Error message | (Refer to Appendix I) |
result | array | Result of tracking | (Refer to Response L2) |
Response L2 · result
| Field | Type | Description | Remarks |
|---|---|---|---|
status_ | array | The result for tracking. | (Refer to Response L3 & Response L4) |
latest_ | string(45) | The status of the shipment. | |
latest_ | string(45) | Show the date and time. | |
awb | string(45) | Airway bill number. |
Response L3 · status_list
| Field | 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 · status_list
| Field | Type | Description | Remarks |
|---|---|---|---|
event_ | date | Show date. | |
event_ | time | Show time. | |
status | string(150) | The status of the shipment. | |
location | string(100) | Track the location of the parcel. |
Response samples
json
{
"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"
}
]
}json
{
"api_status":"Error",
"error_code":"1",
"error_remark":"Required authentication key",
"result":[
]
}