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.
POST
https://demo.connect.easyparcel.sg/?ac=MPOrderStatusBulk Body: application/x-www-form-urlencoded · action MPOrderStatusBulk
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 |
|---|---|---|---|
order_ | string(15) | Yes | Acquire from the order placed earlier. |
Sample code
php
<?php
$domain = "https://demo.connect.easyparcel.sg/?ac=";
$action = "MPOrderStatusBulk";
$postparam = array(
'authentication' => 'xxxxxx',
'api' => 'xxxxxx',
'bulk' => array(
array(
'order_no' => 'EI-000J6',
),
array(
'order_no' => 'EI-000J6',
),
),
);
$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=MPOrderStatusBulk' \
--data-urlencode 'authentication=xxxxxx' \
--data-urlencode 'api=xxxxxx' \
--data-urlencode 'bulk[0][order_no]=EI-000J6' \
--data-urlencode 'bulk[1][order_no]=EI-000J6'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 | The result for order status, if status is Success | (Refer to Response L2) |
Response L2 · result
| Field | Type | Description | Remarks |
|---|---|---|---|
status | string(10) | The status of the orders made. | Fail / Success. |
remarks | string(100) | The message for orders made. | |
order_ | string(15) | Order number. | |
order_ | string(25) | The status of your order. | Cancel / Waiting Payment / Paid / Partial Payment / Undefined Status |
order_ | string(10) | The order that can pay. | True / False |
Response samples
json
{
"api_status":"Success",
"error_code":"0",
"error_remark":"",
"result":[
{
"status":"Success",
"remarks":"Correct Order_no",
"order_no":"EI-000J6",
"order_status":"Paid",
"order_payable":"False"
},
{
"status":"Success",
"remarks":"Correct Order_no",
"order_no":"EI-000J6",
"order_status":"Paid",
"order_payable":"False"
}
]
}json
{
"api_status":"Error",
"error_code":"1",
"error_remark":"Required authentication key",
"result":[
]
}