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.
authentication | : |
api | : |
bulk[0][pick_code] | : |
bulk[0][pick_country] | : |
bulk[0][send_code] | : |
bulk[0][send_country] | : |
bulk[0][weight] | : |
bulk[0][width] | : |
bulk[0][length] | : |
bulk[0][height] | : |
bulk[0][date_coll] | : |
bulk[1][pick_code] | : |
bulk[1][pick_country] | : |
bulk[1][send_code] | : |
bulk[1][send_country] | : |
bulk[1][weight] | : |
bulk[1][width] | : |
bulk[1][length] | : |
bulk[1][height] | : |
bulk[1][date_coll] | : |
Try and see results
<?php
$domain = "https://demo.connect.easyparcel.sg/?ac=";
$action = "MPRateCheckingBulk";
$postparam = array(
'authentication' => 'xxxxxx',
'api' => 'xxxxxx',
'bulk' => array(
array(
'pick_code' => '059893',
'pick_country' => 'SG',
'send_code' => '059897',
'send_country' => 'SG',
'weight' => '10',
'width' => '0',
'length' => '0',
'height' => '0',
'date_coll' => '2017-11-10',
),
array(
'pick_code' => '059893',
'pick_country' => 'SG',
'send_code' => '059897',
'send_country' => 'SG',
'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>";
?>
Making Order
The authenticated user can make single order at EasyParcel. User need to make sure the courier service is available.
authentication | : |
api | : |
bulk[0][weight] | : |
bulk[0][width] | : |
bulk[0][length] | : |
bulk[0][height] | : |
bulk[0][content] | : |
bulk[0][value] | : |
bulk[0][service_id] | : |
bulk[0][pick_name] | : |
bulk[0][pick_company] | : |
bulk[0][pick_mobile] | : |
bulk[0][pick_contact] | : |
bulk[0][pick_unit] | : |
bulk[0][pick_code] | : |
bulk[0][pick_country] | : |
bulk[0][send_name] | : |
bulk[0][send_company] | : |
bulk[0][send_mobile] | : |
bulk[0][send_contact] | : |
bulk[0][send_unit] | : |
bulk[0][send_addr1] | : |
bulk[0][send_state] | : |
bulk[0][send_code] | : |
bulk[0][send_country] | : |
bulk[0][collect_date] | : |
bulk[0][reference] | : |
bulk[1][weight] | : |
bulk[1][width] | : |
bulk[1][length] | : |
bulk[1][height] | : |
bulk[1][content] | : |
bulk[1][value] | : |
bulk[1][service_id] | : |
bulk[1][pick_name] | : |
bulk[1][pick_company] | : |
bulk[1][pick_mobile] | : |
bulk[1][pick_contact] | : |
bulk[1][pick_unit] | : |
bulk[1][pick_code] | : |
bulk[1][pick_country] | : |
bulk[1][send_name] | : |
bulk[1][send_company] | : |
bulk[1][send_mobile] | : |
bulk[1][send_contact] | : |
bulk[1][send_unit] | : |
bulk[1][send_addr1] | : |
bulk[1][send_state] | : |
bulk[1][send_code] | : |
bulk[1][send_country] | : |
bulk[1][collect_date] | : |
bulk[1][reference] | : |
Try and see results
<?php
$domain = "https://demo.connect.easyparcel.sg/?ac=";
$action = "MPSubmitOrderBulk";
$postparam = array(
'authentication' => 'xxxxxx',
'api' => 'xxxxxx',
'bulk' => array(
array(
'weight' => '1',
'width' => '0',
'length' => '0',
'height' => '0',
'content' => 'book',
'value' => '20',
'service_id' => 'EP-CS0D',
'pick_name' => 'Yong Tat',
'pick_company' => 'Yong Tat Sdn Bhd',
'pick_mobile' => '',
'pick_contact' => '+6568505280',
'pick_unit' => '30',
'pick_code' => '059892',
'pick_country' => 'SG',
'send_name' => 'Sam',
'send_company' => '',
'send_mobile' => '',
'send_contact' => '+60-0178320239',
'send_unit' => '12',
'send_addr1' => '12',
'send_state' => 'png',
'send_code' => '119916',
'send_country' => 'SG',
'collect_date' => '2017-11-15',
'reference' => 'order123',
),
array(
'weight' => '1',
'width' => '0',
'length' => '0',
'height' => '0',
'content' => 'book',
'value' => '20',
'service_id' => 'EP-CS0D',
'pick_name' => 'Yong Tat',
'pick_company' => 'Yong Tat Sdn Bhd',
'pick_mobile' => '',
'pick_contact' => '+6568505280',
'pick_unit' => '30',
'pick_code' => '059892',
'pick_country' => 'SG',
'send_name' => 'Sam',
'send_company' => '',
'send_mobile' => '',
'send_contact' => '+60-0178320239',
'send_unit' => '12',
'send_addr1' => '12',
'send_state' => 'png',
'send_code' => '119916',
'send_country' => 'SG',
'collect_date' => '2017-11-15',
'reference' => 'order123',
),
),
);
$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>";
?>
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.
authentication | : |
api | : |
bulk[0][order_no] | : |
bulk[1][order_no] | : |
Try and see results
<?php
$domain = "https://demo.connect.easyparcel.sg/?ac=";
$action = "MPPayOrderBulk";
$postparam = array(
'authentication' => 'xxxxxx',
'api' => 'xxxxxx',
'bulk' => array(
array(
'order_no' => 'EI-000J6',
),
array(
'order_no' => 'EI-000J6',
),
),
);
$url = $domain.$action;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postparam));
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
ob_start();
$return = curl_exec($ch);
ob_end_clean();
curl_close($ch);
$json = json_decode($return);
echo "<pre>"; print_r($json); echo "</pre>";
?>
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.
authentication | : |
api | : |
bulk[0][order_no] | : |
bulk[1][order_no] | : |
Try and see results
<?php
$domain = "https://demo.connect.easyparcel.sg/?ac=";
$action = "MPOrderStatusBulk";
$postparam = array(
'authentication' => 'xxxxxx',
'api' => 'xxxxxx',
'bulk' => array(
array(
'order_no' => 'EI-000J6',
),
array(
'order_no' => 'EI-000J6',
),
),
);
$url = $domain.$action;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postparam));
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
ob_start();
$return = curl_exec($ch);
ob_end_clean();
curl_close($ch);
$json = json_decode($return);
echo "<pre>"; print_r($json); echo "</pre>";
?>
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.
authentication | : |
api | : |
bulk[0][order_no] | : |
bulk[1][order_no] | : |
Try and see results
<?php
$domain = "https://demo.connect.easyparcel.sg/?ac=";
$action = "MPParcelStatusBulk";
$postparam = array(
'authentication' => 'xxxxxx',
'api' => 'xxxxxx',
'bulk' => array(
array(
'order_no' => 'EI-000J6',
),
array(
'order_no' => 'EI-000J6',
),
),
);
$url = $domain.$action;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postparam));
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
ob_start();
$return = curl_exec($ch);
ob_end_clean();
curl_close($ch);
$json = json_decode($return);
echo "<pre>"; print_r($json); echo "</pre>";
?>
Tracking Parcel Details
Track the shipment status using airway bill number.
authentication | : |
api | : |
bulk[0][awb_no] | : |
bulk[1][awb_no] | : |
Try and see results
<?php
$domain = "https://demo.connect.easyparcel.sg/?ac=";
$action = "MPTrackingBulk";
$postparam = array(
'authentication' => 'xxxxxx',
'api' => 'xxxxxx',
'bulk' => array(
array(
'awb_no' => '86983175113435',
),
array(
'awb_no' => '86983175113435',
),
),
);
$url = $domain.$action;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postparam));
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
ob_start();
$return = curl_exec($ch);
ob_end_clean();
curl_close($ch);
$json = json_decode($return);
echo "<pre>"; print_r($json); echo "</pre>";
?>