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
http://demo.connect.easyparcel.my/?ac=EPOrderStatusBulk Body: application/x-www-form-urlencoded · action EPOrderStatusBulk
Request parameters
Request L1
| Parameter | Type | Required | Description |
|---|---|---|---|
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 that placed. |
Sample code
php
<?php
$domain = "https://demo.connect.easyparcel.my/?ac=";
$action = "EPOrderStatusBulk";
$postparam = array(
'api' => 'xxxxxx',
'bulk' => array(
array(
'order_no' => 'EI-AAGWD',
),
array(
'order_no' => 'EI-AAGWD',
),
),
);
$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.my/?ac=EPOrderStatusBulk' \
--data-urlencode 'api=xxxxxx' \
--data-urlencode 'bulk[0][order_no]=EI-AAGWD' \
--data-urlencode 'bulk[1][order_no]=EI-AAGWD'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-AAGWD",
"order_status":"Paid",
"order_payable":"False"
},
{
"status":"Success",
"remarks":"Correct Order_no",
"order_no":"EI-AAGWD",
"order_status":"Paid",
"order_payable":"False"
}
]
}json
{
"api_status":"Error",
"error_code":"3",
"error_remark":"Required api key",
"result":[
]
}