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 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” |
parcel_value | double(8,2) | Optional | The value of parcel in RM |
Sample Code
<?php
$domain = "https://demo.connect.easyparcel.my/?ac=";
$action = "EPRateCheckingBulk";
$postparam = array(
'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-08',
),
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-08',
),
),
'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 | using for Making Order API |
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) |
cod_service_available | boolean | Identifies whether Cash On Demand is supported | True if supported / False if not supported |
cod_service_min_cod_amount | double(8,2) | COD minimum amount | Anything below or equivalent to this amount will not be able to be supported by COD service |
cod_service_max_cod_amount | double(8,2) | COD maximum amount | Maximum amount to be collected for COD parcels. Anything above this amount will not be able to be supported by COD service |
cod_charges_calculation | json | JSON which contains the method to calculate the COD Charges | Type could be fixed or percentage. ( var calculated_charges=cod_amount * rate. If calculated_charges |
basic_insurance_max_value | int(11) | Basic insurance maximum coverage. | Based on condition to cover parcel value or maximum up to this maximum amount. |
basic_insurance_currency | string (3) | The currency which the basic insurance has been defined by courier | |
covered_by_insure_plus | boolean | Identifies if the service is under InsurePlus Feature which is provided by EasyParcel | True if supported / False if not |
addon_insurance_available | boolean | Identifies if there is additional insurance available for purchase | 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_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 | |
import_tax_charges | double(8,2) | DDP Tax Charges (For International Shipment) | |
import_duty_charges | double(8,2) | DDP Duty Charges (For International Shipment) | |
handling_charges | double(8,2) | DDP Handling Charges (For International Shipment) |
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"
}]
"cod_service_available": true,
"cod_service_min_cod_amount": "5",
"cod_service_max_cod_amount": "2000",
"cod_charges_calculation": {
"min": "5",
"rate": "0.025",
"type": "percentage"
}
}
}
]
}
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_point | string(35) | Yes / Optional | Obtain from EPRateChecking 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(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. |
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 EPRateCheckingBulk 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(35) | 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 | 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 |
REQ_ID | string(100) | Optional | The reference for easier track back from Response (Refer to Response L2) |
reference | string(25) | Optional | The parcel reference |
cod_enabled | boolean | Optional | The parcel is COD parcel. (true / false) *Only Applicable for Courier Services which support COD, Refer to Rate Checking. |
cod_amount | double(8,2) | Optional | The COD amount to be collected. Please refer to RateChecking for the minimum and maximum amount. |
tax_duty | string(10) | Optional | DDU or DDP |
parcel_category_id | string(10) | Optional | The parcel category id (Refer to Get Parcel Category) |
addon_insurance_enabled | boolean | Optional | The parcel is to whether purchase additional insurance. To purchase additional insurance the parcel value must be above basic insurance coverage (Refer to RateChecking Result for the value. To purchase additional insurance, parcel category ID is a must. |
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.my/?ac=";
$action = "EPSubmitOrderBulk";
$postparam = array(
'api' => 'xxxxxx',
'bulk' => array(array(
'weight' => '1',
'width' => '1',
'length' => '1',
'height' => '1',
'content' => 'book',
'value' => '10',
'service_id' => 'EP-CS0W',
'pick_point' => '',
'pick_name' => 'Yong Tat',
'pick_company' => 'Yong Tat Sdn Bhd',
'pick_contact' => '0123456789',
'pick_mobile' => '0123456789',
'pick_addr1' => 'ppppp46/7 adfa',
'pick_addr2' => 'test',
'pick_addr3' => '',
'pick_addr4' => '',
'pick_city' => 'city',
'pick_state' => 'png',
'pick_code' => '11950',
'pick_country' => 'MY',
'send_point' => '',
'send_name' => 'sam',
'send_company' => '',
'send_contact' => '0122134567',
'send_mobile' => '0122134567',
'send_addr1' => 'ssssadsasdst test',
'send_addr2' => 'test test',
'send_addr3' => '',
'send_addr4' => '',
'send_city' => 'send city',
'send_state' => 'png','send_code' => '11950',
'send_country' => 'MY',
'collect_date' => '2020-02-20',
'sms' => '0',
'send_email' => '[email protected]',
'hs_code' => 'yshs_code',
'REQ_ID' => 'shipping # 1',
'reference' => 'order12321',
'cod_enabled' => true,
'cod_amount' => '10.00',)
,)
,);
$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 | array | Result for making order | (Refer to Response L2) |
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) |
Response L2
Return Value | Type | Description | Remarks |
---|---|---|---|
REQ_ID | string(100) | The reference pass back from Request | |
parcel_number | string(12) | The response of the parcel placed. | |
order_number | string(12) | The response of the order placed. | |
price | double(8,2) | Order total price inclusive of all charges | |
status | string(10) | The status of the orders made. | Fail / Success |
remarks | string(100) | The error message for orders made. | |
courier | string(35) | The courier selected of the shipment | |
cod_charges | double(8,2) | The COD charges that will be charged for COD parcels. | |
insurance_charges | double(8,2) | The Addon Insurance Charges | The Addon Insurance Charges is calculated based and returned accordingly. |
max_insurance_coverage | double(8,2) | The Amount Maximum Claimable Under Insurance | The maximum amount claimable under the shipment order made. Terms and Conditions Apply. |
shipment_price | double(8,2) | The Shipment Charges Only | |
addon_whatsapp_tracking_charges | double(8,2) | The WhatsApp Tracking Charges Only |
Response sample - Success
{
"result":[
{
"REQ_ID":"shipping # 1",
"parcel_number":"EP-PQKTE",
"order_number":"EI-5UFAI",
"price":"6.10",
"status":"Success",
"remarks":"Order Successfully Placed.",
"courier":"Skynet"
}
],
"api_status":"Success",
"error_code":"0",
"error_remark":""
}
Response example - Fail
{
"result":[
],
"api_status":"Error",
"error_code":"3",
"error_remark":"Required api key"
}
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.my/?ac=";
$action = "EPPayOrderBulk";
$postparam = array(
'api' => 'xxxxxx',
'bulk' => array(
array(
'order_no' => 'EI-5UFAI',
),
),
);
$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) | PDF link of Airway bill number. | |
tracking_url | string (300) | Link of tracking url. |
Response sample - Success
{
"api_status":"Success",
"error_code":"0",
"error_remark":"",
"result":[
{
"orderno":"EI-5UFAI",
"messagenow":"Fully Paid",
"parcel":[
{
"parcelno":"EP-PQKTE",
"awb":"238770015234",
"awb_id_link":"http:\/\/demo.connect.easyparcel.my\/?ac=AWBLabel&id=QmIxTE43eHQjMTYzMDQwMTI%3D",
"tracking_url":"https:\/\/easyparcel.com\/my\/en\/track\/details\/?courier=Skynet&awb=238770015234"
}
]
}
]
}
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 |
---|---|---|---|
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 = "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>";
?>
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. | 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-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":"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 that placed. |
Sample Code
<?php
$domain = "https://demo.connect.easyparcel.my/?ac=";
$action = "EPParcelStatusBulk";
$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>";
?>
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) | awb number. | Empty if null. |
awb_id_link | string(300) | The URL link of the awb | 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":"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.my/?ac=";
$action = "EPTrackingBulk";
$postparam = array(
'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":"3",
"error_remark":"Required api 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"
}
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 |
---|---|---|---|
api | string(25) | Yes | Obtain from registered account. |
courier | array | Yes | Courier List : 'Pgeon Prime', 'Pgeon Delivery', 'Poslaju', 'Skynet', '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 | Optional | Check the available pickup date. If didn't put the date, available date will be auto assign as 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(
'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":[
]
}
Get Insurance Rate
This enables users to check the insurance rates from specific courier companies on the EasyParcel platform. Users are required to fill in the necessary fields to access the insurance rate information.
Request L1
Name | Type | Required | Description |
---|---|---|---|
api | string(25) | Yes | Obtain from a registered account. |
awb | string(100) | Yes | Tracking number of the parcel |
parcel_content_value | double(8,2) | Yes | Parcel pricing |
courier | string(25) | Yes | Shipment courier. (Refer to Appendix IV) |
coll_country | string(5) | Yes | Sender's country. (Refer to Appendix II) |
deli_country | string(5) | Yes | Receiver's country. (Refer to Appendix II) |
coll_state | string(25) | Yes | Sender's state. (Refer to Appendix III) |
deli_state | string(25) | No | Receiver’s state, if deli_courtery is MY , will be required |
Sample Code
<?php
$domain = "http://demo.connect.easyparcel.my/?ac=";
$action = "EPInsuranceRateChecking";
$postparam = array(
'api' => 'xxxxxx',
'awb' => 'TestingAWB',
'parcel_content_value' => '390',
'courier' => 'EP-CR05',
'coll_country' => 'MY',
'deli_country' => 'MY',
'coll_state' => 'srw',
'deli_state' => 'srw',
);
$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 | object | Result for rate checking | (Refer to Response L2) |
error_code | int(5) | Error Code | (Refer to Appendix I) |
error_remark | string(100) | Error Message | (Refer to Appendix I) |
error_detail | object | Error Details | |
status | string(10) | Get rate status is Success / Fail | |
api_status | string(10) | API Validation result | (Refer to Appendix I) |
Response L2
Return Value | Type | Description | Remarks |
---|---|---|---|
awb | string(25) | The Air Waybill (AWB) number. | |
courier | string(100) | The name of the courier. | |
parcel_content_value | double(8,2) | The declared value of the parcel content. | |
insurance_amount | double(8,2) | The quoted amount for insurance coverage. | |
parcel_delivery_type | string(100) | Type of parcel delivery | domestic / international. |
Response sample - Success
{
"result": {
"awb": "TestingAWB",
"courier": "Skynet",
"parcel_content_value": "390",
"insurance_amount": 9.75,
"parcel_delivery_type": "Domestic"
},
"status": "Success",
"error_code": 0,
"error_remark": "",
"error_detail": "",
"api_status": "Success"
}
Response example - Fail
{
"result":[
],
"status":"",
"error_code":"3",
"error_remark":"Required api key",
"api_status":"Error"
}
Purchase Insurance
This step involves both ordering and making payments for the orders placed. Authenticated users can make single insurance order payments. Single order payment specifically refers to the payment for a single parcel. Various payment conditions may arise, such as insufficient credit (when the user account lacks sufficient funds for payment) or sufficient credit (when there are adequate funds available for payment).
Request L1
Name | Type | Required | Description |
---|---|---|---|
api | string(25) | Yes | Obtain from a registered account. |
awb | string(25) | Yes | The Air Waybill (AWB) number. |
parcel_content_value | double(8,2) | Yes | The declared value of the parcel content. |
courier | string(25) | Yes | Shipment courier. (Refer to Appendix IV) |
coll_country | string(2) | Yes | The country code of the collection address, limited to 'MY' or 'SG'. |
deli_country | string(2) | Yes | Receiver country code.Refer to ISO 3166-2 |
coll_state | string(35) | Yes | Sender’s state. (Refer to Appendix III) |
deli_state | string(35) | Yes | Receiver state. |
parcel_category_id | int(2) | Yes | The parcel category id (Refer to Get Parcel Category API) |
parcel_content | string(35) | Yes | The content of the parcel. |
parcel_content_type | string(8) | Yes | The type of parcel content, limited to 'document' or 'parcel'. |
parcel_content_currency_code | string(3) | Yes | The currency code of the parcel content. |
parcel_content_weight | double(8,2) | Yes | The weight of the parcel content. |
coll_name | string(35) | Yes | Sender name. |
coll_company | string(35) | No | Sender company |
coll_mobile_code | string(2) | Yes | Sender mobile country mobile , eg: 60 |
coll_mobile | string(16) | Yes | Sender mobile number |
coll_alternative_mobile_code | string(2) | No | Sender alternative mobile country mobile , eg: 60 |
coll_alternative_mobile | string(16) | No | Sender alternative mobile number |
coll_email | string(35) | No | Sender email |
deli_name | string(35) | Yes | Receiver name. |
deli_company | string(35) | No | Receiver company name. |
deli_mobile_code | string(2) | Yes | Receiver mobile country mobile , eg: 60 |
deli_mobile | string(35) | Yes | Receiver mobile number. |
deli_alternative_mobile_code | string(2) | No | Receiver alternative mobile country mobile , eg: 60 |
deli_alternative_mobile | string(35) | No | Receiver alternative mobile number. |
deli_email | string(35) | No | Receiver email address. |
coll_address_1 | string(35) | Yes | Sender's address line 1. |
coll_address_2 | string(35) | No | Sender's address line 2. |
coll_postcode | string(10) | Yes | Sender's postcode. |
coll_city | string(35) | Yes | Sender city |
deli_address_1 | string(35) | Yes | Receiver address line 1. |
deli_address_2 | string(35) | No | Receiver address line 2. |
deli_postcode | string(10) | Yes | Receiver postcode. |
deli_city | string(35) | Yes | Receiver city.. |
shipment_date | date | Yes | The date of the shipment in the format YYYY-MM-DD. |
Sample Code
<?php
$domain = "http://demo.connect.easyparcel.my/?ac=";
$action = "EPInsurancePurchase";
$postparam = array(
'api' => 'xxxxxx',
'awb' => 'TESTDomestic',
'parcel_content_value' => '250',
'courier' => 'EP-CR05',
'coll_country' => 'MY',
'deli_country' => 'MY',
'coll_state' => 'png',
'deli_state' => 'png',
'parcel_category_id' => '12',
'parcel_content' => 'testing',
'parcel_content_type' => 'parcel',
'parcel_content_currency_code' => 'MYR',
'parcel_content_weight' => '123',
'coll_name' => '12313',
'coll_company' => 'Testing Company',
'coll_mobile_code' => '60',
'coll_mobile' => '162631234',
'coll_alternative_mobile_code' => '60',
'coll_alternative_mobile' => '123456789',
'coll_email' => '[email protected]',
'deli_name' => 'Receiver Testing',
'deli_company' => 'Receiver Testing Company',
'deli_mobile_code' => '60',
'deli_mobile' => '123456789',
'deli_alternative_mobile_code' => '',
'deli_alternative_mobile' => '',
'deli_email' => '[email protected]',
'coll_address_1' => 'testing',
'coll_address_2' => 'testing 2',
'coll_postcode' => '11950',
'coll_city' => 'penang',
'deli_address_1' => 'test receiver',
'deli_address_2' => 'test receiver 2',
'deli_postcode' => '11950',
'deli_city' => 'penang',
'shipment_date' => '2024-05-11',
);
$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 | array | Result for Purchase Insurance | |
status | string(7) | Get rate status is Success / Fail | |
error_code | int(5) | Error Code | Refer to Appendix I |
error_remark | string(100) | Error Message | Refer to Appendix I |
error_detail | object | Error Details | Only show detail when error code under 1001 |
api_status | string(10) | API Validation result | Refer to Appendix I |
Response L2
Return Value | Type | Description | Remarks |
---|---|---|---|
string(35) | The email address of the login email. | ||
name | string(35) | The name of the sender. | |
payment_number | string(10) | The payment reference number associated with the transaction. | |
insurance_amount | decimal(8,2) | The quoted amount for insurance coverage. | |
parcel_content_value | decimal(8,2) | The declared value of the parcel content. | |
awb | string(25) | The Air Waybill (AWB) number provided for tracking purposes. | |
shipment_date | date | The date of shipment for the parcel. | |
deli_name | string(35) | Receiver name. | |
parcel_content | string(35) | Description or contents of the parcel. | |
amount | decimal(8,2) | The total amount associated with the transaction. | |
send_email_status | string(100) | The status indicates whether the email notification has been sent. |
Response sample - Success
{
"result":{
"email":"[email protected]",
"name":"12313",
"payment_number":"EC-HXELB",
"insurance_amount":6.25,
"parcel_content_value":"250",
"awb":"TESTDomestic",
"shipment_date":"2024-05-11T00:00:00.000Z",
"deli_name":"Receiver Testing",
"parcel_content":"testing",
"amount":6.25,
"send_email_status":"email sent"
},
"status":"Success",
"error_code":0,
"error_remark":"",
"error_detail":"",
"api_status":"Success"
}
Response example - Fail
{
"result":[
],
"status":"",
"error_code":"3",
"error_remark":"Required api key",
"api_status":"Error"
}
Appendix I (API Return Status)
api_status | error_code | error_remark | Explanation | |
---|---|---|---|---|
Success | 0 | |||
Error | 1 | Required authentication key | Missing authentication param | |
Error | 2 | Invalid authentication key | ||
Error | 3 | Required api key | Missing API key param | |
Error | 4 | Invalid api key | ||
Error | 5 | Unauthorized user | Invalid API key | |
Error | 6 | Required bulk array | ||
Error | 7 | Required bulk data insert format in array | ||
Error | 8 | Invalid account | ||
Error | 9 | Unverified account. Please kindly verify your account at easyparcel.com | ||
Error | 1000 | Missing / Invalid Parameter | If a required parameter is missing or an invalid value is entered, the error will be displayed in the error_detail field. | |
Error | 1002 | Invalid User Account | The user does not have a wallet associated with the relevant country. | |
Error | 1003 | Invalid parcel category, you should refer to Get Parcel Category API | Invalid parcel category, you should refer to Get Parcel Category API | |
Error | 1004 | Invalid collection/ delivery postcode | ||
Error | 1005 | Invalid collection/delivery state | If the value is "Pulau Penang," an error will occur because our system only accepts state codes. | |
Error | 1006 | Invalid courier | Incorrect Courier code | |
Error | 3001 | Shipment insured | This tracking number has previously purchased insurance through EasyParcel, cannot buy insurance again | |
Error | 3002 | Shipment delivered | The status of this tracking number shipment is "delivered", not allow to buy insurance | |
Error | 3003 | Not under claim coverage | The courier insurance provides coverage for parcel contents up to RM200. However, since you entered a parcel content value of RM100, it does not qualify for claim coverage. | |
Error | 3004 | Only support international/domestic shipment | For example, Fedex only supports international shipments to buy insurance | |
Error | 3005 | No Cover | If the collection state or delivery location is not within the insurance coverage area, an error message along with a description will be displayed. | |
Error | 9999 | Unknown error | If this error occurs, please contact our support team for assistance. |
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 |
Appendix IV (Insurance Courier List)
Courier | Courier Name | |||
---|---|---|---|---|
EP-CR0H | KEX Express | |||
EP-CR01 | UTS | |||
EP-CR03 | Aramex | |||
EP-CR05 | Skynet | |||
EP-CR0C | DHLeC | |||
EP-CR0DS | Flash Express | |||
EP-CR0A | Pos Laju | |||
EP-CR0DP | J&T Express | |||
EP-CR0DK | Pickupp | |||
EP-CR0DU | Ninjavan | |||
EP-CR0D3 | J&T Cargo | |||
EP-CR0U | TNT | |||
EP-CR0DH | Best Express | |||
EP-CR0D1 | City-Link Express | |||
EP-CR0T | FedEx | |||
EP-CR06 | Aramex International |