MarketPlace
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 |
---|---|---|---|
authentication | string(25) | Yes | Obtain from EasyParcel IT administrator |
api | string(25) | Yes | Obtain from registered account. |
bulk | array | Yes | (Refer to Request L2) |
exclude_fields | array | Optional | Exclude certain fields from response. Supported values: “pgeon_point”, “rates.*.dropoff_point”, “rates.*.pickup_point” |
Request L2
Name | Type | Required | Description |
---|---|---|---|
pick_code | string(10) | Yes | Sender's postcode. |
pick_state | string(35) | Yes | Sender's state. (Refer to Appendix III) |
pick_country | string(2) | Yes | Sender's country (“MY”). |
send_code | string(10) | Yes | Receiver's postcode. |
send_state | string(35) | Yes | Receiver's state. (Refer to Appendix III) |
send_country | string(2) | Yes | Receiver's country (“MY”). |
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.my/?ac=";
$action = "MPRateCheckingBulk";
$postparam = array(
'authentication' => 'xxxxxx',
'api' => 'xxxxxx',
'bulk' => array(
array(
'pick_code' => '10050',
'pick_state' => 'png',
'pick_country' => 'MY',
'send_code' => '11950',
'send_state' => 'png',
'send_country' => 'MY',
'weight' => '5',
'width' => '0',
'length' => '0',
'height' => '0',
'date_coll' => '2017-11-10',
),
array(
'pick_code' => '14300',
'pick_state' => 'png',
'pick_country' => 'MY',
'send_code' => '81100',
'send_state' => 'jhr',
'send_country' => 'MY',
'weight' => '10',
'width' => '0',
'length' => '0',
'height' => '0',
'date_coll' => '2017-11-10',
),
),
'exclude_fields' => array(
'rates.*.pickup_point',
),
);
$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 for rate checking | (Refer to Response 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 response of the rate checking | (Refer to Response L4) |
pgeon_point | array | Available pgeon point of the rate checking | (Refer to Response L3) |
Response L3
Return Value | Type | Description | Remarks |
---|---|---|---|
Sender_point | array | Pgeon Point near sender address | (Refer to Response L5) |
Receiver_point | array | Pgeon Point near Receiver address | (Refer to Response L5) |
Response L4
Return Value | Type | Description | Remarks |
---|---|---|---|
rate_id | string (15) | Rate ID | |
service_detail | string (15) | Service Detail | dropoff, pickup, dropoff/pickup |
service_id | string (15) | Service ID | |
service_type | string (10) | Type of service | parcel/ document |
courier_id | string (10) | Courier ID | |
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) | Total price | shipping + addon |
addon_price | double(8,2) | Addon service pricing | |
shipment_price | double(8,2) | Shipping price | |
require_min_order | int(11) | Courier require minimum parcel | |
service_name | string (100) | Service name | |
courier_name | string (100) | Courier name | |
dropoff_point | array | Drop-off point for it’s courier service | (Refer to Response L6) |
pickup_point | array | Pickup point for it’s courier service | (Refer to Response L6) |
Response L5
Return Value | Type | Description | Remarks |
---|---|---|---|
point_id | string(25) | Drop-off point ID | |
company | string(100) | Drop-off point company | |
point_name | string(100) | Drop-off point name | |
point_contact | string(10) | Drop-off point contact | |
point_lat | double(8,16) | Drop-off point latitude | |
point_lon | double(8,16) | Drop-off point longitude | |
point_addr1 | string(10) | Drop-off point address line 1 | |
point_addr2 | string(10) | Drop-off point address line 2 | |
point_addr3 | string(10) | Drop-off point address line 3 | |
point_addr4 | string(10) | Drop-off point address line 4 | |
point_city | string(10) | Drop-off point city | |
point_state | string(10) | Drop-off point state | (Refer to Appendix III) |
point_postcode | string(10) | Drop-off point postcode | |
price | double(8,2) | Drop-off point Booking fee |
Response L6
Return Value | Type | Description | Remarks |
---|---|---|---|
point_id | string(25) | Drop-off point ID | |
point_name | string(100) | Drop-off point name | |
point_contact | string(10) | Drop-off point contact | |
point_addr1 | string(10) | Drop-off point address line 1 | |
point_addr2 | string(10) | Drop-off point address line 2 | |
point_addr3 | string(10) | Drop-off point address line 3 | |
point_addr4 | string(10) | Drop-off point address line 4 | |
point_postcode | string(10) | Drop-off point postcode | |
point_city | string(10) | Drop-off point city | |
point_state | string(10) | Drop-off point state | (Refer to Appendix III) |
price | double(8,2) | Drop-off point fee |
Response sample - Success
{
"api_status": "Success",
"error_code": "0",
"error_remark": "",
"result": [
{
"REQ_ID": "",
"status": "Success",
"remarks": "",
"rates": [
{
"rate_id": "EP-RR0M2NL",
"service_detail": "dropoff/pickup",
"service_id": "EP-CS0CH",
"service_type": "parcel",
"courier_id": "EP-CR0A",
"courier_logo": "https://s3-ap-southeast-1.amazonaws.com/easyparcel-static/Public/source/general/img/couriers/Pos_Laju.jpg",
"scheduled_start_date": "2020-07-21 Tuesday",
"pickup_date": "2020-07-21",
"delivery": "3-5 working day(s)",
"price": "8.00",
"addon_price": "0.00",
"shipment_price": "8.00",
"require_min_order": 0,
"service_name": "Poslaju Same Day Pick up (within WM)",
"courier_name": "POSLAJU NATIONAL COURIER",
"dropoff_point": [{
"point_id": "EP-CB0MI",
"point_name": "Pos Malaysia Banting",
"point_contact": "03-3187 1437",
"point_addr1": "No. 101 Jalan Bunga, Pekan 2",
"point_addr2": "42700",
"point_addr3": "",
"point_addr4": "",
"point_postcode": "Banting",
"point_city": "",
"point_state": "sgr",
"start_time": "00:00:00",
"end_time": "00:00:00",
"price": 0
}],
"pickup_point": []
},
{
"rate_id": "EP-RR0MCOV",
"service_detail": "pickup",
"service_id": "EP-CS0KS",
"service_type": "parcel",
"courier_id": "EP-CR0Z",
"courier_logo": "https://s3-ap-southeast-1.amazonaws.com/easyparcel-static/Public/source/general/img/couriers/CJ_Century.jpg",
"scheduled_start_date": "2020-07-21 Tuesday",
"pickup_date": "2020-07-21",
"delivery": "3-5 working day(s)",
"price": "7.80",
"addon_price": "0.00",
"shipment_price": "7.80",
"require_min_order": 0,
"service_name": "CJ Century",
"courier_name": "CJ Century Logistics Sdn Bhd",
"dropoff_point": [],
"pickup_point": []
},
{
"rate_id": "EP-RR0914N",
"service_detail": "dropoff",
"service_id": "EP-CS09J",
"service_type": "parcel",
"courier_id": "EP-CR0C",
"courier_logo": "https://s3-ap-southeast-1.amazonaws.com/easyparcel-static/Public/source/general/img/couriers/DHLeC.jpg",
"scheduled_start_date": "2020-07-21 Tuesday",
"pickup_date": "2020-07-21",
"delivery": "3-5 working day(s)",
"price": "7.30",
"addon_price": "0.00",
"shipment_price": "7.30",
"require_min_order": 0,
"service_name": "DHL eCommerce (Dropoff only)",
"courier_name": "DHL eCommerce",
"dropoff_point": [{
"point_id": "EP-CB02X",
"point_name": "DHL ServicePoint - E3 Farmasi",
"point_contact": "",
"point_addr1": "71",
"point_addr2": "Jalan Bunga Tanjung 6A",
"point_addr3": "Taman Muda",
"point_addr4": "",
"point_postcode": "68000",
"point_city": "Ampang",
"point_state": "sgr",
"start_time": "00:00:00",
"end_time": "00:00:00",
"price": 0
}],
"pickup_point": []
}
],
"pgeon_point": {
"Sender_point": [{
"point_id": "PGEON_P_TA",
"company": "newsplus",
"point_name": "TES-S ALAM (43)",
"point_contact": "355105643",
"point_lat": "3.07191150",
"point_lon": "101.53883690",
"point_addr1": "LOT 20,1ST FLR TESCO SHAH ALAM,",
"point_addr2": "NO 3 JLN AEROBIK 13/43, SEKSYEN 13,",
"point_addr3": "",
"point_addr4": "",
"point_city": "SHAH ALAM",
"point_state": "sgr",
"point_postcode": "40100",
"price": "0.00"
}],
"Receiver_point": [{
"point_id": "PGEON_P_RP",
"company": "newsplus",
"point_name": "RKL-AMP PARK (271)",
"point_contact": "327111975",
"point_lat": "3.15987000",
"point_lon": "101.71910000",
"point_addr1": "AMPANG PARK STATION (UNDERGROUND),",
"point_addr2": "JLN AMPANG,",
"point_addr3": "",
"point_addr4": "",
"point_city": "KUALA LUMPUR",
"point_state": "kul",
"point_postcode": "50450",
"price": "0.00"
}]
}
}
]
}
Response example - Fail
{
"api_status":"Error",
"error_code":"1",
"error_remark":"Required authentication 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 |
---|---|---|---|
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
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 MPRateCheckingBulk return value. |
pick_point | string(35) | Yes / Optional | Obtain from MPRateCheckingBulk return value (point_id) from pgeon_point or (point_id) from Dropoff_Point. This field is required when you choose for Pgeon Delivery and must choose from Sender_point. |
pick_name | string(35) | Yes | Sender's name. |
pick_company | string(30) | Optional | Sender's company. |
pick_contact | string(16) | Yes | Sender's contact. |
pick_mobile | string(16) | Optional | Sender's mobile. |
pick_addr1 | string(35) | Yes | Sender's address line 1. |
pick_addr2 | string(35) | Optional | Sender's address line 2. |
pick_addr3 | string(35) | Optional | Sender's address line 3. |
pick_addr4 | string(35) | Optional | Sender's address line 4. |
pick_city | string(35) | Yes | Sender's city. |
pick_state | string(35) | Yes | Sender’s state. |
pick_code | string(10) | Yes | Sender's postcode. |
pick_country | string(35) | Yes | Sender's country. (Refer to Appendix II) |
send_point | string(35) | Yes / Optional | Obtain from MPRateCheckingBulk return value (point_id) from pgeon_point This field is required when you choose for Pgeon Delivery and must choose from Receiver_point. |
send_name | string(35) | Yes | Receiver's name. |
send_company | string(30) | Optional | Receiver's company. |
send_contact | string(16) | Yes | Receiver's contact. |
send_mobile | string(16) | Optional | Receiver's mobile. |
send_addr1 | string(35) | Yes | Receiver's address line 1. |
send_addr2 | string(35) | Optional | Receiver's address line 2. |
send_addr3 | string(35) | Optional | Receiver's address line 3. |
send_addr4 | string(35) | Optional | Receiver's address line 4. |
send_city | string(35) | Yes | Receiver's city. |
send_state | string(35) | 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” |
sms | boolean | Yes | Require for sms feature (Example, true/false) |
send_email | string(35) | Yes | Receiver’s email. |
hs_code | string(20) | Optional | Hs code is a common standard worldwide for describing the type of commodity that is shipped |
reference | string(25) | Optional | The parcel reference |
tax_duty | string(10) | Optional | DDU or DDP |
parcel_category_id | string(10) | Optional | The parcel category id (Refer to Get Parcel Category) |
Sample Code
<?php
$domain = "https://demo.connect.easyparcel.my/?ac=";
$action = "MPSubmitOrderBulk";
$postparam = array(
'authentication' => 'xxxxxx',
'api' => 'xxxxxx',
'bulk' => array(
array(
'weight' => '1',
'width' => '0',
'length' => '0',
'height' => '0',
'content' => '2017-09-14 - book',
'value' => '20',
'service_id' => 'EP-CS0W',
'pick_point' => 'PGEON_P_JJT',
'pick_name' => 'Yong Tat',
'pick_company' => 'Yong Tat Sdn Bhd',
'pick_contact' => '+6012-1234-5678',
'pick_mobile' => '+6017-1234-5678',
'pick_addr1' => 'ppppp46/7 adfa',
'pick_addr2' => 'test',
'pick_addr3' => 'test',
'pick_addr4' => '',
'pick_city' => 'NT',
'pick_state' => 'NT',
'pick_code' => '14300',
'pick_country' => 'MY',
'send_point' => 'PGEON_P_E',
'send_name' => 'Sam',
'send_company' => '',
'send_contact' => '+6012-2134567',
'send_mobile' => '+6017-1234-5678',
'send_addr1' => 'ssssadsasdst test',
'send_addr2' => 'test test',
'send_addr3' => 'test',
'send_addr4' => '',
'send_city' => 'NT',
'send_state' => 'NT',
'send_code' => '11950',
'send_country' => 'MY',
'collect_date' => '2017-11-22',
'sms' => '1',
'send_email' => '[email protected]',
'hs_code' => 'yshs_code',
'reference' => 'order12321'
),
array(
'weight' => '1',
'width' => '0',
'length' => '0',
'height' => '0',
'content' => '2017-09-14 - book',
'value' => '20',
'service_id' => 'EP-CS0W',
'pick_point' => 'PGEON_P_JJT',
'pick_name' => 'Yong Tat',
'pick_company' => 'Yong Tat Sdn Bhd',
'pick_contact' => '+6012-1234-5678',
'pick_mobile' => '+6017-1234-5678',
'pick_addr1' => 'ppppp46/7 adfa',
'pick_addr2' => 'test',
'pick_addr3' => 'test',
'pick_addr4' => '',
'pick_city' => 'NT',
'pick_state' => 'NT',
'pick_code' => '14300',
'pick_country' => 'MY',
'send_point' => 'PGEON_P_E',
'send_name' => 'Sam',
'send_company' => '',
'send_contact' => '+6012-2134567',
'send_mobile' => '+6017-1234-5678',
'send_addr1' => 'ssssadsasdst test',
'send_addr2' => 'test test',
'send_addr3' => 'test',
'send_addr4' => '',
'send_city' => 'NT',
'send_state' => 'NT',
'send_code' => '11950',
'send_country' => 'MY',
'collect_date' => '2017-11-22',
'sms' => '1',
'send_email' => '[email protected]',
'hs_code' => 'yshs_code',
'reference' => 'order12321'
),
),
);
$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 for making order | (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 | |
courier | string(35) | The courier selected of the shipment |
Response sample - Success
{
"api_status":"Success",
"error_code":"0",
"error_remark":"",
"result":[
{
"status":"Success",
"remarks":"Order Successfully Placed (Parcel from Pulau Pinang to Pulau Pinang)",
"order_number":"EI-AAY69",
"price":"6.00",
"courier":"Skynet"
},
{
"status":"Success",
"remarks":"Order Successfully Placed (Parcel from Pulau Pinang to Pulau Pinang)",
"order_number":"EI-AAY65",
"price":"6.00",
"courier":"Skynet"
}
]
}
Response example - Fail
{
"api_status":"Error",
"error_code":"1",
"error_remark":"Required authentication 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 |
---|---|---|---|
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
Name | Type | Required | Description |
---|---|---|---|
order_no | string(15) | Yes | Acquire from the order that placed. |
Sample Code
<?php
$domain = "https://demo.connect.easyparcel.my/?ac=";
$action = "MPPayOrderBulk";
$postparam = array(
'authentication' => 'xxxxxx',
'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>";
?>
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-AAGWD",
"messagenow":"Fully paid",
"parcel":[
{
"parcelno":"EP-AOBH3",
"awb":"238725129086",
"awb_id_link":"http:\/\/demo.connect.easyparcel.my\/?ac=AWBLabel&id=QmIxTE43eHQjMTUyNzc4Mw%3D%3D"
}
]
},
{
"orderno":"EI-AAGWD",
"messagenow":"Fully paid",
"parcel":[
{
"parcelno":"EP-AOBH3",
"awb":"238725129086",
"awb_id_link":"http:\/\/demo.connect.easyparcel.my\/?ac=AWBLabel&id=QmIxTE43eHQjMTUyNzc4Mw%3D%3D"
}
]
}
]
}
Response example - Fail
{
"api_status": "Success",
"error_code": "0",
"error_remark": "",
"result": [
{
"orderno": "EI-5UFAI",
"messagenow": "Insufficient Credit",
"parcel": [
{}
]
}
]
}
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 |
---|---|---|---|
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
Name | Type | Required | Description |
---|---|---|---|
order_no | string(15) | Yes | Acquire from the order placed earlier. |
Sample Code
<?php
$domain = "https://demo.connect.easyparcel.my/?ac=";
$action = "MPOrderStatusBulk";
$postparam = array(
'authentication' => 'xxxxxx',
'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>";
?>
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 order 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. | Cancel / Waiting Payment / Paid / Partial Payment / Undefined Status |
remarks | string(100) | The message for orders made. | True / False |
order_no | string(15) | Order number. | Fail / Success. |
order_status | string(25) | The status of your order. | |
order_payable | string(10) | The order that can pay. |
Response sample - Success
{
"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"
}
]
}
Response example - Fail
{
"api_status":"Error",
"error_code":"1",
"error_remark":"Required authentication 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 |
---|---|---|---|
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
Name | Type | Required | Description |
---|---|---|---|
order_no | string(15) | Yes | Acquire from the order placed. |
Sample Code
<?php
$domain = "https://demo.connect.easyparcel.my/?ac=";
$action = "MPParcelStatusBulk";
$postparam = array(
'authentication' => 'xxxxxx',
'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>";
?>
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 / Pending for Drop Off / Parcel Drop Off at Point / Parcel has been collected / 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-AAGWD",
"parcel":[
{
"parcel_number":"EP-AOBH3",
"ship_status":"Schedule In Arrangement",
"awb":"238725129086",
"awb_id_link":"http:\/\/demo.connect.easyparcel.my\/?ac=AWBLabel&id=QmIxTE43eHQjMTUyNzc4Mw%3D%3D"
}
]
},
{
"status":"Success",
"remarks":"Correct Order_no",
"order_no":"EI-AAGWD",
"parcel":[
{
"parcel_number":"EP-AOBH3",
"ship_status":"Schedule In Arrangement",
"awb":"238725129086",
"awb_id_link":"http:\/\/demo.connect.easyparcel.my\/?ac=AWBLabel&id=QmIxTE43eHQjMTUyNzc4Mw%3D%3D"
}
]
}
]
}
Response example - Fail
{
"api_status":"Error",
"error_code":"1",
"error_remark":"Required authentication key",
"result":[
]
}
Tracking Parcel Details
Track the shipment status using airway bill number.
Request L1
Name | 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
Name | Type | Required | Description |
---|---|---|---|
awb_no | string(25) | Yes | Generate automatically after the payment. |
Sample Code
<?php
$domain = "https://demo.connect.easyparcel.my/?ac=";
$action = "MPTrackingBulk";
$postparam = array(
'authentication' => 'xxxxxx',
'api' => 'xxxxxx',
'bulk' => array(
array(
'awb_no' => '238725129086',
),
array(
'awb_no' => '238725129086',
),
),
);
$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 |
---|---|---|---|
status_list | array | The result for trackings. | (Refer to Response L3) |
latest_status | string(45) | The status of the shipment from courier partners. | |
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. (standardised) | |
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 from courier partners. | |
ep_status | string(100) | The shipment status from EasyParcel. | |
ep_status_code | int(2) | The status code of shipment status from EasyParcel. (correspond to ep_status) | 1 : Schedule In Arrangement, 2 : To Be Collected, 3 : Collected, 4 : Delivery In Transit / On Hold, 5 : Delivered / Returned |
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-10-28",
"event_time":"11:40 AM",
"status":"Deliverd",
"location":"Penang"
},
"1":{
"event_date":"2017-06-28",
"event_time":"11:40 AM",
"status":"Parcel has been collected at Penang",
"location":"Penang"
},
"status":"",
"sender":"Yong Tat",
"receiver":"Sam"
},
"latest_status":"Deliverd",
"latest_update":"2017-10-28",
"awb":"238725129086"
},
{
"status_list":{
"0":{
"event_date":"2017-10-28",
"event_time":"11:40 AM",
"status":"Deliverd",
"location":"Penang"
},
"1":{
"event_date":"2017-06-28",
"event_time":"11:40 AM",
"status":"Parcel has been collected at Penang",
"location":"Penang"
},
"status":"",
"sender":"Yong Tat",
"receiver":"Sam"
},
"latest_status":"Deliverd",
"latest_update":"2017-10-28",
"awb":"238725129086"
}
]
}
Response example - Fail
{
"api_status":"Error",
"error_code":"1",
"error_remark":"Required authentication key",
"result":[
]
}
Check Credit Balance
This allow you check currently user balance.
Request L1
Name | Type | Required | Description |
---|---|---|---|
api | string(25) | Yes | Obtain from registered account. |
Sample Code
<?php
$domain = "https://demo.connect.easyparcel.my/?ac=";
$action = "EPCheckCreditBalance";
$postparam = array(
'api' => 'xxxxxx',
);
$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 |
---|---|---|---|
result | double(8,2) | Account Balance | |
api_status | string(10) | API execute status | (Refer to Appendix I) |
error_code | int(5) | API error code | (Refer to Appendix I) |
error_remark | string(100) | API error remarks | (Refer to Appendix I) |
Response sample - Success
{
"result":"99999755.99",
"api_status":"Success",
"error_code":"0",
"error_remark":""
}
Response example - Fail
{
"api_status":"Error",
"error_code":"3",
"error_remark":"Required api key"
}
Market Rate Checking
This enable market rate checking from all courier companies in EasyParcel platform. User need to provide sender and receiver address to check the market rate.
Request L1
Name | 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
Name | Type | Required | Description |
---|---|---|---|
pick_code | string(10) | Yes | Sender's postcode. |
pick_state | string(10) | Yes | Sender’s state |
pick_country | string(2) | Yes | Sender's country (“MY”). |
send_code | string(10) | Yes | Receiver's postcode. |
send_state | string(10) | Yes | Receiver’s state |
send_country | string(2) | Yes | Receiver's country (“MY”). |
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.my/?ac=";
$action = "MPNormalRateCheckingBulk";
$postparam = array(
'authentication' => 'xxxxxx',
'api' => 'xxxxxx',
'bulk' => array(
array(
'pick_code' => '14300',
'pick_state' => 'nt',
'pick_country' => 'MY',
'send_code' => '81100',
'send_state' => 'jhr',
'send_country' => 'MY',
'weight' => '10',
'width' => '0',
'length' => '0',
'height' => '0',
'date_coll' => '2017-11-10',
),
array(
'pick_code' => '14300',
'pick_state' => 'nt',
'pick_country' => 'MY',
'send_code' => '81100',
'send_state' => 'jhr',
'send_country' => 'MY',
'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 | Result of rate checking | (Refer to Response 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 response of the rate checking | (Refer to Response L3) |
Response L3
Return Value | Type | Description | Remarks |
---|---|---|---|
member_rate | array | The result member rate checking. | (Refer to Response L4) |
non_member_rate | array | The result non-member rate checking. | (Refer to Response L4) |
Response L4
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. |
Response sample - Success
{
"api_status":"Success",
"error_code":"0",
"error_remark":"",
"result":[
{
"status":"Success",
"remarks":"",
"rates":{
"member_rate":[
{
"service_id":"EP-CS0W",
"service_name":"Next Day Delivery Service",
"service_type":"parcel",
"courier_id":"EP-CR05",
"courier_name":"Skynet",
"courier_logo":"http:\/\/cp.easyparcel.my\/v1\/include\/theme_1\/source\/img\/logo\/\/images\/partners\/Skynet_Express_(M)_Sdn_Bhd.png",
"scheduled_start_date":"2017-11-10 Friday",
"pickup_date":"2017-11-10",
"delivery":"Estimated 1 working day(s)",
"price":"19.90"
},
{
"service_id":"EP-CS04",
"service_name":"Next Day Delivery Service",
"service_type":"parcel",
"courier_id":"EP-CR0M",
"courier_name":"Nationwide",
"courier_logo":"http:\/\/cp.easyparcel.my\/v1\/include\/theme_1\/source\/img\/logo\/\/images\/partners\/Nationwide_Express_Courier_Services_Berhad.png",
"scheduled_start_date":"2017-11-10 Friday",
"pickup_date":"2017-11-10",
"delivery":"Estimated 1 working day(s)",
"price":"20.70"
},
{
"service_id":"EP-CS0A2",
"service_name":"Same Day Poslaju Pick up (within PM)",
"service_type":"parcel",
"courier_id":"EP-CR0A",
"courier_name":"Poslaju",
"courier_logo":"http:\/\/cp.easyparcel.my\/v1\/include\/theme_1\/source\/img\/logo\/\/images\/partners\/POSLAJU_NATIONAL_COURIER.png",
"scheduled_start_date":"2017-11-10 Friday",
"pickup_date":"2017-11-10",
"delivery":"Estimated 1 working day(s)",
"price":"64.00"
}
],
"non_member_rate":[
{
"service_id":"EP-CS0W",
"service_name":"Next Day Delivery Service",
"service_type":"parcel",
"courier_id":"EP-CR05",
"courier_name":"Skynet",
"courier_logo":"http:\/\/cp.easyparcel.my\/v1\/include\/theme_1\/source\/img\/logo\/\/images\/partners\/Skynet_Express_(M)_Sdn_Bhd.png",
"scheduled_start_date":"2017-11-10 Friday",
"pickup_date":"2017-11-10",
"delivery":"Estimated 1 working day(s)",
"price":"36.00"
},
{
"service_id":"EP-CS04",
"service_name":"Next Day Delivery Service",
"service_type":"parcel",
"courier_id":"EP-CR0M",
"courier_name":"Nationwide",
"courier_logo":"http:\/\/cp.easyparcel.my\/v1\/include\/theme_1\/source\/img\/logo\/\/images\/partners\/Nationwide_Express_Courier_Services_Berhad.png",
"scheduled_start_date":"2017-11-10 Friday",
"pickup_date":"2017-11-10",
"delivery":"Estimated 1 working day(s)",
"price":"37.20"
},
{
"service_id":"EP-CS0A2",
"service_name":"Same Day Poslaju Pick up (within PM)",
"service_type":"parcel",
"courier_id":"EP-CR0A",
"courier_name":"Poslaju",
"courier_logo":"http:\/\/cp.easyparcel.my\/v1\/include\/theme_1\/source\/img\/logo\/\/images\/partners\/POSLAJU_NATIONAL_COURIER.png",
"scheduled_start_date":"2017-11-10 Friday",
"pickup_date":"2017-11-10",
"delivery":"Estimated 1 working day(s)",
"price":"83.20"
}
]
}
},
{
"status":"Success",
"remarks":"",
"rates":{
"member_rate":[
{
"service_id":"EP-CS0W",
"service_name":"Next Day Delivery Service",
"service_type":"parcel",
"courier_id":"EP-CR05",
"courier_name":"Skynet",
"courier_logo":"http:\/\/cp.easyparcel.my\/v1\/include\/theme_1\/source\/img\/logo\/\/images\/partners\/Skynet_Express_(M)_Sdn_Bhd.png",
"scheduled_start_date":"2017-11-10 Friday",
"pickup_date":"2017-11-10",
"delivery":"Estimated 1 working day(s)",
"price":"19.90"
},
{
"service_id":"EP-CS04",
"service_name":"Next Day Delivery Service",
"service_type":"parcel",
"courier_id":"EP-CR0M",
"courier_name":"Nationwide",
"courier_logo":"http:\/\/cp.easyparcel.my\/v1\/include\/theme_1\/source\/img\/logo\/\/images\/partners\/Nationwide_Express_Courier_Services_Berhad.png",
"scheduled_start_date":"2017-11-10 Friday",
"pickup_date":"2017-11-10",
"delivery":"Estimated 1 working day(s)",
"price":"20.70"
},
{
"service_id":"EP-CS0A2",
"service_name":"Same Day Poslaju Pick up (within PM)",
"service_type":"parcel",
"courier_id":"EP-CR0A",
"courier_name":"Poslaju",
"courier_logo":"http:\/\/cp.easyparcel.my\/v1\/include\/theme_1\/source\/img\/logo\/\/images\/partners\/POSLAJU_NATIONAL_COURIER.png",
"scheduled_start_date":"2017-11-10 Friday",
"pickup_date":"2017-11-10",
"delivery":"Estimated 1 working day(s)",
"price":"64.00"
}
],
"non_member_rate":[
{
"service_id":"EP-CS0W",
"service_name":"Next Day Delivery Service",
"service_type":"parcel",
"courier_id":"EP-CR05",
"courier_name":"Skynet",
"courier_logo":"http:\/\/cp.easyparcel.my\/v1\/include\/theme_1\/source\/img\/logo\/\/images\/partners\/Skynet_Express_(M)_Sdn_Bhd.png",
"scheduled_start_date":"2017-11-10 Friday",
"pickup_date":"2017-11-10",
"delivery":"Estimated 1 working day(s)",
"price":"36.00"
},
{
"service_id":"EP-CS04",
"service_name":"Next Day Delivery Service",
"service_type":"parcel",
"courier_id":"EP-CR0M",
"courier_name":"Nationwide",
"courier_logo":"http:\/\/cp.easyparcel.my\/v1\/include\/theme_1\/source\/img\/logo\/\/images\/partners\/Nationwide_Express_Courier_Services_Berhad.png",
"scheduled_start_date":"2017-11-10 Friday",
"pickup_date":"2017-11-10",
"delivery":"Estimated 1 working day(s)",
"price":"37.20"
},
{
"service_id":"EP-CS0A2",
"service_name":"Same Day Poslaju Pick up (within PM)",
"service_type":"parcel",
"courier_id":"EP-CR0A",
"courier_name":"Poslaju",
"courier_logo":"http:\/\/cp.easyparcel.my\/v1\/include\/theme_1\/source\/img\/logo\/\/images\/partners\/POSLAJU_NATIONAL_COURIER.png",
"scheduled_start_date":"2017-11-10 Friday",
"pickup_date":"2017-11-10",
"delivery":"Estimated 1 working day(s)",
"price":"83.20"
}
]
}
}
]
}
Response example - Fail
{
"api_status":"Error",
"error_code":"1",
"error_remark":"Required authentication key",
"result":[
]
}
Domestic Express Order
This endpoint is designed to direct create order + payment at EasyParcel. Currently it is limited within Domestic (Malaysia) shipping delivery.
Request L1
Name | Type | Required | Description |
---|---|---|---|
authentication | string(25) | Yes | Obtain from EasyParcel IT administrator |
api | string(25) | Yes | Obtain from registered account. |
courier | array | Yes | Courier List : 'Pgeon Prime', 'Pgeon Delivery', 'Poslaju', 'Skynet', 'Nationwide', 'ABX', 'DHL eCommerce', 'Aramex', 'CJ Century', 'UTS', 'ULTIMATE CONSOLIDATORS' If the first courier is not available, it will select the next available courier in the array |
dropoff | int(1) | Optional | Require for dropoff service. Value: 0,1 (e.g, 1 = true/ 0 =false[Default ]) |
bulk | array | Yes | (Refer to Request L2) |
Request L2
Name | Type | Required | Description |
---|---|---|---|
referrence | string | Yes | Require identifier of vendor’s order |
weight | double(8,2) | Yes | The weight of the parcel. |
content | string(35) | Yes | The content of the parcel. |
value | double(8,2) | Yes | The amount of the items. |
pick_name | string(35) | Yes | Sender's name. |
pick_company | string(35) | Optional | Sender's company. |
pick_contact | string(16) | Yes | Sender's contact. |
pick_mobile | string(16) | Optional | Sender's mobile. |
pick_addr1 | string(35) | Yes | Sender's address line 1. |
pick_addr2 | string(35) | Optional | Sender's address line 2. |
pick_addr3 | string(35) | Optional | Sender's address line 3. |
pick_addr4 | string(35) | Optional | Sender's address line 4. |
pick_city | string(35) | Yes | Sender's city. |
pick_state | string(35) | Yes | Sender’s state. (Refer to Appendix III) |
pick_code | string(10) | Yes | Sender's postcode. |
pick_country | string(35) | Yes | Sender's country. Refer to ISO 3166-2 |
send_name | string(35) | Yes | Receiver's name. |
send_contact | string(16) | Yes | Receiver's contact. |
send_mobile | string(16) | Optional | Receiver's mobile. |
send_addr1 | string(35) | Yes | Receiver's address line 1. |
send_addr2 | string(35) | Optional | Receiver's address line 2. |
send_addr3 | string(35) | Optional | Receiver's address line 3. |
send_addr4 | string(35) | Optional | Receiver's address line 4. |
send_city | string(35) | Yes | Receiver's city. |
send_state | string(35) | Yes | Receiver’s state. (Refer to Appendix III) |
send_code | string(10) | Yes | Receiver's postcode. |
send_country | string(35) | Yes | Receiver's country. Refer to ISO 3166-2 |
collect_date | date | Yes | Check the available pickup date. If didn't put the date,today date will be default. Format : “YYYY-MM-DD” |
send_email | string | Yes | Receiver’s email. |
sms | boolean | Optional | Require for sms feature, Value: 0,1 (e.g, 1 = true/ 0 =false[Default]) |
Sample Code
<?php
$domain = "https://demo.connect.easyparcel.my/?ac=";
$action = "EPSubmitOrderBulkV3";
$postparam = array(
'authentication'=> 'xxxxxx',
'api' => 'xxxxxx',
'courier' => array('Poslaju'),
'dropoff' => '0',
'bulk' => array(
array(
'referrence' => 'item1',
'weight' => '1',
'content' => '2017-09-14 - book',
'value' => '20',
'pick_name' => 'Yong Tat',
'pick_company' => 'Yong Tat Sdn Bhd',
'pick_contact' => '+6012-1234-5678',
'pick_mobile' => '+6017-1234-5678',
'pick_addr1' => 'ppppp46/7 adfa',
'pick_addr2' => 'test',
'pick_addr3' => 'test',
'pick_addr4' => '',
'pick_city' => 'png',
'pick_state' => 'png',
'pick_code' => '14300',
'pick_country' => 'MY',
'send_name' => 'Sam',
'send_contact' => '+6012-2134567',
'send_mobile' => '+6017-1234-5678',
'send_addr1' => 'ssssadsasdst test',
'send_addr2' => 'test test',
'send_addr3' => 'test',
'send_addr4' => '',
'send_city' => 'png',
'send_state' => 'png',
'send_code' => '11950',
'send_country' => 'MY',
'collect_date' => '2020-03-16',
'send_email' => '[email protected]',
'sms' => '0',
),
),
);
$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 | Validation result | (Refer to Appendix I) |
error_code | int | Error code | (Refer to Appendix I) |
error_remark | string | Error message | (Refer to Appendix I) |
result | array | Result for make order | (Refer to Response L2) |
Response L2
Return Value | Type | Description | Remarks |
---|---|---|---|
summary | object | Summary of Result | (Refer to Response L3) |
success | array | Success order | (Refer to Response L4) |
fail | array | Fail order with reason | (Refer to Response L5) |
Response L3
Return Value | Type | Description | Remarks |
---|---|---|---|
courier_service | array | The response of courier selected from order | |
orders_number | array | The response of the order number placed. | |
total_paid_amount | double(8,2) | Total of order price | |
total_success | int | Total of success order | |
total_fail | int | Total of fail order |
Response L4
Return Value | Type | Description | Remarks |
---|---|---|---|
referrence | string | The reference pass back from Request | |
status | string | The status of the orders made. | |
remarks | string | The error message for orders made. | |
order_number | string | The response of the order number placed. | |
courier | string | The response of the courier full name | |
courier_short | string | The response of the courier shot name | |
price | double(8,2) | shipping price of this parcel | shipping + tax + addon |
tax | double(8,2) | tax amount | |
addon_price | double(8,2) | add on price | Setting on easyparcel website - marketing tools |
parcel_number | string | The response of the parcel number placed. | |
awb | string | Airway bill number / Tracking Number | |
awb_id_link | string | PDF link of Airway bill number. | consignment note |
tracking_url | string | Link of tracking url. |
Response L5
Return Value | Type | Description | Remarks |
---|---|---|---|
referrence | string | The reference pass back from Request | |
status | string | The status of the orders made. | |
remarks | string | The error message for orders made. |
Response sample - Success
{
"api_status":"Success",
"error_code":0,
"error_remark":"",
"result":{
"summary":{
"courier_service":[
"POSLAJU NATIONAL COURIER"
],
"orders_number":[
"EI-5UF8T"
],
"total_paid_amount":"8.15",
"total_success":1,
"total_fail":0
},
"success":[
{
"referrence":"item1",
"status":"Success",
"remarks":"Order Successfully Placed And Paid.",
"order_number":"EI-5UF8T",
"courier":"POSLAJU NATIONAL COURIER",
"courier_short":"Pos Laju",
"price":"8.00",
"tax":"0.00",
"addon_price":"0.15",
"parcel_number":"EP-PXUIB",
"awb":"ER665997516MY",
"awb_id_link":"http:\/\/demo.connect.easyparcel.my\/?ac=AWBLabel&id=b0VYQjhEMW4jMTc0OTc4MzA%3D",
"tracking_url":"https:\/\/easyparcel.com\/my\/en\/track\/details\/?courier=Poslaju&awb=ER665997516MY"
}
],
"fail":[
]
}
}
Response example - Fail
{
"api_status":"Error",
"error_code":3,
"error_remark":"Required api key",
"result":{
"summary":[
],
"success":[
],
"fail":[
]
}
}
Get Parcel Category
This endpoint is designed to get the parcel category id for orders
Request L1
Name | Type | Required | Description |
---|---|---|---|
api | string(25) | Yes | Obtain from registered account. |
Sample Code
<?php
$domain = "https://demo.connect.easyparcel.my/?ac=";
$action = "EPGetParcelCategory";
$postparam = array(
'api' => 'xxxxxx',
);
$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 | |
error_code | int(5) | Error code | |
error_remark | string(100) | Error message | |
result | Result for making order |
Response L2
Return Value | Type | Description | Remarks |
---|---|---|---|
parcel_category_id | int(5) | used when creating order with tax and duty | |
parcel_category | string(100) | parcel description |
Response sample - Success
{
"api_status":"Success",
"error_code":"0",
"error_remark":"",
"result":[
{
"parcel_category_id":1,
"parcel_category":"Bags & Luggages"
},
{
"parcel_category_id":2,
"parcel_category":"Board Games"
},
{
"parcel_category_id":4,
"parcel_category":"Cameras"
},
{
"parcel_category_id":5,
"parcel_category":"Books"
},
{
"parcel_category_id":9,
"parcel_category":"Gaming"
},
{
"parcel_category_id":11,
"parcel_category":"Home Appliances"
},
{
"parcel_category_id":12,
"parcel_category":"Home Decor"
},
{
"parcel_category_id":13,
"parcel_category":"Jewelry"
},
{
"parcel_category_id":15,
"parcel_category":"Pet Accessory"
},
{
"parcel_category_id":17,
"parcel_category":"Sport & Leisure"
},
{
"parcel_category_id":19,
"parcel_category":"Toys"
},
{
"parcel_category_id":20,
"parcel_category":"Watches"
},
{
"parcel_category_id":21,
"parcel_category":"Automotive Accessories"
},
{
"parcel_category_id":22,
"parcel_category":"Document"
},
{
"parcel_category_id":23,
"parcel_category":"Bird\u2019s Nest"
},
{
"parcel_category_id":24,
"parcel_category":"Computers And Parts \/ Telecommunication Parts And Equipments"
},
{
"parcel_category_id":25,
"parcel_category":"Food Enhancers\/Stabilizers\/Supplements"
},
{
"parcel_category_id":26,
"parcel_category":"Perishable Food"
},
{
"parcel_category_id":27,
"parcel_category":"Non Perishable Food"
},
{
"parcel_category_id":28,
"parcel_category":"Fashion And Accessories"
},
{
"parcel_category_id":29,
"parcel_category":"Cosmetic And Beauty Product"
},
{
"parcel_category_id":30,
"parcel_category":"Pesticides"
},
{
"parcel_category_id":31,
"parcel_category":"Health Supplements"
},
{
"parcel_category_id":32,
"parcel_category":"Plant"
},
{
"parcel_category_id":33,
"parcel_category":"Accessories"
},
{
"parcel_category_id":34,
"parcel_category":"Bag"
},
{
"parcel_category_id":35,
"parcel_category":"Face Mask"
},
{
"parcel_category_id":36,
"parcel_category":"Garments"
},
{
"parcel_category_id":37,
"parcel_category":"Gifts"
},
{
"parcel_category_id":38,
"parcel_category":"Household Products"
},
{
"parcel_category_id":39,
"parcel_category":"Printed Material"
},
{
"parcel_category_id":40,
"parcel_category":"Snacks"
},
{
"parcel_category_id":41,
"parcel_category":"Pillow"
},
{
"parcel_category_id":42,
"parcel_category":"Shoes"
},
{
"parcel_category_id":43,
"parcel_category":"Toiletries"
},
{
"parcel_category_id":44,
"parcel_category":"Kitchenware"
}
]
}
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 | ||
---|---|---|---|---|
Success | 0 | |||
Error | 1 | Required authentication key | ||
Error | 2 | Invalid authentication key | ||
Error | 3 | Required api key | ||
Error | 4 | Invalid api key | ||
Error | 5 | Unauthorized user | ||
Error | 6 | Invalid data insert format in array |
Appendix II (Country Code List)
Short Country Name | Full Country Name | |||
---|---|---|---|---|
SR | SURINAME | |||
SD | SUDAN | |||
VC | ST. VINCENT | |||
XM | ST. MAARTEN | |||
LC | ST. LUCIA | |||
KN | ST. KITTS | |||
XE | ST. EUSTATIUS | |||
BL | ST. BARTHELEMY | |||
LK | SRI LANKA | |||
ES | SPAIN | |||
ZA | SOUTH AFRICA | |||
XS | SOMALILAND (NORTH SOMALIA) | |||
SO | SOMALIA | |||
SB | SOLOMON ISLANDS | |||
SI | SLOVENIA | |||
SK | SLOVAKIA | |||
SG | SINGAPORE | |||
SL | SIERRA LEONE | |||
SC | SEYCHELLES | |||
RS | SERBIA | |||
SN | SENEGAL | |||
SA | SAUDI ARABIA | |||
ST | SAO TOME AND PRINCIPE | |||
SM | SAN MARINO | |||
WS | SAMOA | |||
MP | SAIPAN | |||
RW | RWANDA | |||
RU | RUSSIAN FEDERATION | |||
RO | ROMANIA | |||
RE | REUNION | |||
QA | QATAR | |||
PR | PUERTO RICO | |||
PT | PORTUGAL | |||
PL | POLAND | |||
PH | PHILIPPINES | |||
PE | PERU | |||
PY | PARAGUAY | |||
PG | PAPUA NEW GUINEA | |||
PA | PANAMA | |||
PW | PALAU | |||
PK | PAKISTAN | |||
OM | OMAN | |||
NO | NORWAY | |||
NU | NIUE | |||
NG | NIGERIA | |||
NE | NIGER | |||
NI | NICARAGUA | |||
NZ | NEW ZEALAND | |||
NC | NEW CALEDONIA | |||
XN | NEVIS | |||
NL | NETHERLANDS | |||
NP | NEPAL | |||
NR | NAURU | |||
NA | NAMIBIA | |||
MM | MYANMAR | |||
MA | MOROCCO | |||
MS | MONTSERRAT | |||
ME | MONTENEGRO | |||
MN | MONGOLIA | |||
MC | MONACO | |||
MD | MOLDOVA, REPUBLIC OF | |||
FM | MICRONESIA, FEDERATED STATES OF | |||
MX | MEXICO | |||
YT | MAYOTTE | |||
MU | MAURITIUS | |||
MR | MAURITANIA | |||
MQ | MARTINIQUE | |||
MH | MARSHALL ISLANDS | |||
MT | MALTA | |||
ML | MALI | |||
MV | MALDIVES | |||
MW | MALAWI | |||
MY | MALAYSIA | |||
MG | MADAGASCAR | |||
MK | MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF | |||
MO | MACAU | |||
LU | LUXEMBOURG | |||
LT | LITHUANIA | |||
LI | LIECHTENSTEIN | |||
LY | LIBYA | |||
LR | LIBERIA | |||
LS | LESOTHO | |||
LB | LEBANON | |||
LV | LATVIA | |||
LA | LAO PEOPLE'S DEMOCRATIC REPUBLIC | |||
KG | KYRGYZSTAN | |||
KW | KUWAIT | |||
XK | KOSOVO | |||
KR | KOREA, REPUBLIC OF | |||
KP | KOREA, DEMOCRATIC PEOPLE'S REPUBLIC OF | |||
KI | KIRIBATI | |||
KE | KENYA | |||
KZ | KAZAKHSTAN | |||
JO | JORDAN | |||
JE | JERSEY | |||
JP | JAPAN | |||
JM | JAMAICA | |||
IT | ITALY | |||
IL | ISRAEL | |||
IE | IRELAND | |||
IQ | IRAQ | |||
IR | IRAN, ISLAMIC REPUBLIC OF | |||
ID | INDONESIA | |||
IN | INDIA | |||
IS | ICELAND | |||
HU | HUNGARY | |||
HK | HONG KONG | |||
HN | HONDURAS | |||
HT | HAITI | |||
GY | GUYANA | |||
GW | GUINEA BISSAU | |||
GN | GUINEA REPUBLIC | |||
GG | GUERNSEY | |||
GT | GUATEMALA | |||
GU | GUAM | |||
GP | GUADELOUPE | |||
GD | GRENADA | |||
GL | GREENLAND | |||
GR | GREECE | |||
GI | GIBRALTAR | |||
GH | GHANA | |||
DE | GERMANY | |||
GE | GEORGIA | |||
GM | GAMBIA | |||
GA | GABON | |||
ZW | ZIMBABWE | |||
FR | FRANCE | |||
FI | FINLAND | |||
ZM | ZAMBIA | |||
FJ | FIJI | |||
YE | YEMEN | |||
FO | FAROE ISLANDS | |||
FK | FALKLAND ISLANDS (MALVINAS) | |||
ET | ETHIOPIA | |||
VI | VIRGIN ISLANDS, U.S. | |||
EE | ESTONIA | |||
VG | VIRGIN ISLANDS, BRITISH | |||
ER | ERITREA | |||
GQ | EQUATORIAL GUINEA | |||
SV | EL SALVADOR | |||
EG | EGYPT | |||
VN | VIETNAM | |||
EC | ECUADOR | |||
TP | EAST TIMOR | |||
VE | VENEZUELA | |||
DO | DOMINICAN REPUBLIC | |||
DM | DOMINICA | |||
DJ | DJIBOUTI | |||
VU | VANUATU | |||
DK | DENMARK | |||
CZ | CZECH REPUBLIC | |||
CY | CYPRUS | |||
CU | CUBA | |||
UZ | UZBEKISTAN | |||
UY | URUGUAY | |||
HR | CROATIA | |||
CI | COTE D'IVOIRE | |||
CR | COSTA RICA | |||
CK | COOK ISLANDS | |||
CD | CONGO, THE DEMOCRATIC REPUBLIC OF THE | |||
UM | UNITED STATES MINOR OUTLYING ISLANDS | |||
CG | CONGO | |||
KM | COMOROS | |||
CN | CHINA | |||
US | UNITED STATES | |||
GF | FRENCH GUIANA | |||
AN | NETHERLANDS ANTILLES | |||
MZ | MOZAMBIQUE | |||
CW | CURACAO | |||
CO | COLOMBIA | |||
CL | CHILE | |||
TD | CHAD | |||
CF | CENTRAL AFRICAN REPUBLIC | |||
KY | CAYMAN ISLANDS | |||
GB | UNITED KINGDOM | |||
CV | CAPE VERDE | |||
AE | UNITED ARAB EMIRATES | |||
IC | CANARY ISLANDS, THE | |||
CA | CANADA | |||
UA | UKRAINE | |||
CM | CAMEROON | |||
KH | CAMBODIA | |||
UG | UGANDA | |||
BI | BURUNDI | |||
BF | BURKINA FASO | |||
BG | BULGARIA | |||
BN | BRUNEI DARUSSALAM | |||
TV | TUVALU | |||
BR | BRAZIL | |||
TC | TURKS AND CAICOS ISLANDS | |||
TM | TURKMENISTAN | |||
BW | BOTSWANA | |||
BA | BOSNIA AND HERZEGOVINA | |||
BQ | BONAIRE | |||
BO | BOLIVIA | |||
BT | BHUTAN | |||
TR | TURKEY | |||
BM | BERMUDA | |||
TN | TUNISIA | |||
BJ | BENIN | |||
TT | TRINIDAD AND TOBAGO | |||
BZ | BELIZE | |||
TO | TONGA | |||
BE | BELGIUM | |||
TG | TOGO | |||
BY | BELARUS | |||
BB | BARBADOS | |||
BD | BANGLADESH | |||
BH | BAHRAIN | |||
TH | THAILAND | |||
BS | BAHAMAS | |||
TZ | TANZANIA | |||
AZ | AZERBAIJAN | |||
TJ | TAJIKISTAN | |||
AT | AUSTRIA | |||
AU | AUSTRALIA | |||
TW | TAIWAN | |||
PF | TAHITI | |||
AW | ARUBA | |||
AM | ARMENIA | |||
SY | SYRIA | |||
AR | ARGENTINA | |||
AG | ANTIGUA | |||
AI | ANGUILLA | |||
CH | SWITZERLAND | |||
AO | ANGOLA | |||
AD | ANDORRA | |||
SE | SWEDEN | |||
AS | AMERICAN SAMOA | |||
SZ | SWAZILAND | |||
DZ | ALGERIA | |||
AL | ALBANIA | |||
AF | AFGHANISTAN |
Appendix III (State Code List)
Short State Name | Full State Name | |||
---|---|---|---|---|
jhr | Johor | |||
kdh | Kedah | |||
ktn | Kelantan | |||
mlk | Melaka | |||
nsn | Negeri Sembilan | |||
phg | Pahang | |||
prk | Perak | |||
pls | Perlis | |||
png | Pulau Pinang | |||
sgr | Selangor | |||
trg | Terengganu | |||
kul | Kuala Lumpur | |||
pjy | Putra Jaya | |||
srw | Sarawak | |||
sbh | Sabah | |||
lbn | Labuan |