Reference - Individual

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.
Try It POST http://demo.connect.easyparcel.co.th/?ac=EPRateCheckingBulk
api :
bulk[0][pick_code] :
bulk[0][pick_state] :
bulk[0][pick_country] :
bulk[0][send_code] :
bulk[0][send_state] :
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_state] :
bulk[1][pick_country] :
bulk[1][send_code] :
bulk[1][send_state] :
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 = "http://demo.connect.easyparcel.co.th/?ac=";

$action = "EPRateCheckingBulk";
$postparam = array(
'api' => 'xxxxxx',
'bulk' => array(
array(
'pick_code' => '10100',
'pick_state' => 'bkk',
'pick_country' => 'TH',
'send_code' => '10100',
'send_state' => 'bkk',
'send_country' => 'TH',
'weight' => '10',
'width' => '0',
'length' => '0',
'height' => '0',
'date_coll' => '2017-12-28',
),
array(
'pick_code' => '10100',
'pick_state' => 'bkk',
'pick_country' => 'TH',
'send_code' => '10100',
'send_state' => 'bkk',
'send_country' => 'TH',
'weight' => '10',
'width' => '0',
'length' => '0',
'height' => '0',
'date_coll' => '2017-12-28',
),
),
);

$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.
Try It POST http://demo.connect.easyparcel.co.th/?ac=EPSubmitOrderBulk
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_contact] :
bulk[0][pick_alt_contact] :
bulk[0][pick_addr1] :
bulk[0][pick_addr2] :
bulk[0][pick_addr3] :
bulk[0][pick_district] :
bulk[0][pick_sub_province] :
bulk[0][pick_province] :
bulk[0][pick_code] :
bulk[0][pick_country] :
bulk[0][send_name] :
bulk[0][send_company] :
bulk[0][send_contact] :
bulk[0][send_alt_contact] :
bulk[0][send_addr1] :
bulk[0][send_addr2] :
bulk[0][send_addr3] :
bulk[0][send_district] :
bulk[0][send_sub_province] :
bulk[0][send_province] :
bulk[0][send_code] :
bulk[0][send_country] :
bulk[0][collect_date] :
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_contact] :
bulk[1][pick_alt_contact] :
bulk[1][pick_addr1] :
bulk[1][pick_addr2] :
bulk[1][pick_addr3] :
bulk[1][pick_district] :
bulk[1][pick_sub_province] :
bulk[1][pick_province] :
bulk[1][pick_code] :
bulk[1][pick_country] :
bulk[1][send_name] :
bulk[1][send_company] :
bulk[1][send_contact] :
bulk[1][send_alt_contact] :
bulk[1][send_addr1] :
bulk[1][send_addr2] :
bulk[1][send_addr3] :
bulk[1][send_district] :
bulk[1][send_sub_province] :
bulk[1][send_province] :
bulk[1][send_code] :
bulk[1][send_country] :
bulk[1][collect_date] :
Try and see results
<?php 
$domain = "http://demo.connect.easyparcel.co.th/?ac=";

$action = "EPSubmitOrderBulk";
$postparam = array(
'api' => 'xxxxxx',
'bulk' => array(
array(
'weight' => '1',
'width' => '0',
'length' => '0',
'height' => '0',
'content' => 'book',
'value' => '20',
'service_id' => 'EP-CS0M',
'pick_name' => 'Yong Tat',
'pick_company' => 'Yong Tat Sdn Bhd',
'pick_contact' => '+66 5321 1234 ',
'pick_alt_contact' => '',
'pick_addr1' => '46/7 อาคารรุ่งโรจน์ธนกุล ชั้น9',
'pick_addr2' => 'ถนนรัชดาภิเษก แขวงห้วยขวาง',
'pick_addr3' => 'แขวงห้วยขวาง',
'pick_district' => '',
'pick_sub_province' => 'ห้วยขวาง',
'pick_province' => 'BKK',
'pick_code' => '10310',
'pick_country' => 'TH',
'send_name' => 'Sam',
'send_company' => '',
'send_contact' => '+66-2-2134567',
'send_alt_contact' => '',
'send_addr1' => '46/7 อาคารรุ่งโรจน์ธนกุล ชั้น9',
'send_addr2' => 'ถนนรัชดาภิเษก แขวงห้วยขวาง',
'send_addr3' => 'แขวงห้วยขวาง',
'send_district' => '',
'send_sub_province' => 'ห้วยขวาง',
'send_province' => 'BKK',
'send_code' => '10310',
'send_country' => 'TH',
'collect_date' => '2017-05-30',
),
array(
'weight' => '1',
'width' => '0',
'length' => '0',
'height' => '0',
'content' => 'book',
'value' => '20',
'service_id' => 'EP-CS0M',
'pick_name' => 'Yong Tat',
'pick_company' => 'Yong Tat Sdn Bhd',
'pick_contact' => '+66 5321 1234 ',
'pick_alt_contact' => '',
'pick_addr1' => '46/7 อาคารรุ่งโรจน์ธนกุล ชั้น9',
'pick_addr2' => 'ถนนรัชดาภิเษก แขวงห้วยขวาง',
'pick_addr3' => 'แขวงห้วยขวาง',
'pick_district' => '',
'pick_sub_province' => 'ห้วยขวาง',
'pick_province' => 'BKK',
'pick_code' => '10310',
'pick_country' => 'TH',
'send_name' => 'Sam',
'send_company' => '',
'send_contact' => '+66-2-2134567',
'send_alt_contact' => '',
'send_addr1' => '46/7 อาคารรุ่งโรจน์ธนกุล ชั้น9',
'send_addr2' => 'ถนนรัชดาภิเษก แขวงห้วยขวาง',
'send_addr3' => 'แขวงห้วยขวาง',
'send_district' => '',
'send_sub_province' => 'ห้วยขวาง',
'send_province' => 'BKK',
'send_code' => '10310',
'send_country' => 'TH',
'collect_date' => '2017-05-30',
),
),
);

$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.
Try It POST http://demo.connect.easyparcel.co.th/?ac=EPPayOrderBulk
api :
bulk[0][order_no] :
bulk[1][order_no] :
Try and see results
<?php 
$domain = "http://demo.connect.easyparcel.co.th/?ac=";

$action = "EPPayOrderBulk";
$postparam = array(
'api' => 'xxxxxx',
'bulk' => array(
array(
'order_no' => 'EI-00DD9',
),
array(
'order_no' => 'EI-00DD5',
),
),
);

$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.
Try It POST http://demo.connect.easyparcel.co.th/?ac=EPOrderStatusBulk
api :
bulk[0][order_no] :
bulk[1][order_no] :
Try and see results
<?php 
$domain = "http://demo.connect.easyparcel.co.th/?ac=";

$action = "EPOrderStatusBulk";
$postparam = array(
'api' => 'xxxxxx',
'bulk' => array(
array(
'order_no' => 'EI-00DD9',
),
array(
'order_no' => 'EI-00DD5',
),
),
);

$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.
Try It POST http://demo.connect.easyparcel.co.th/?ac=EPParcelStatusBulk
api :
bulk[0][order_no] :
bulk[1][order_no] :
Try and see results
<?php 
$domain = "http://demo.connect.easyparcel.co.th/?ac=";

$action = "EPParcelStatusBulk";
$postparam = array(
'api' => 'xxxxxx',
'bulk' => array(
array(
'order_no' => 'EI-00DD9',
),
array(
'order_no' => 'EI-00DD5',
),
),
);

$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.
Try It POST http://demo.connect.easyparcel.co.th/?ac=EPTrackingBulk
api :
bulk[0][awb_no] :
bulk[1][awb_no] :
Try and see results
<?php 
$domain = "http://demo.connect.easyparcel.co.th/?ac=";

$action = "EPTrackingBulk";
$postparam = array(
'api' => 'xxxxxx',
'bulk' => array(
array(
'awb_no' => 'EP51242152TH',
),
array(
'awb_no' => 'EP51242123TH',
),
),
);

$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>";
?>

Check Credit Balance

This enable credit checking for market place. User need to provide API key to check the credit balance in the account.
Try It POST http://demo.connect.easyparcel.co.th/?ac=EPCheckCreditBalance
api :
Try and see results
<?php 
$domain = "http://demo.connect.easyparcel.co.th/?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>";
?>

Address Checking

This api is created for address checking usage for thailand. Can be use in checking address format for rate checking or submit order.
Try It POST http://demo.connect.easyparcel.co.th/?ac=EPAddressCheckingBulk
api :
bulk[0][province_code] :
bulk[0][postcode] :
bulk[0][sub_province] :
bulk[1][province_code] :
bulk[1][postcode] :
bulk[1][sub_province] :
Try and see results
<?php 
$domain = "http://demo.connect.easyparcel.co.th/?ac=";

$action = "EPAddressCheckingBulk";
$postparam = array(
'api' => 'xxxxxx',
'bulk' => array(
array(
'province_code' => 'BKK',
'postcode' => '10100',
'sub_province' => 'สัมพันธวงศ์',
),
array(
'province_code' => 'BKK',
'postcode' => '10100',
'sub_province' => 'สัมพันธวงศ์',
),
),
);

$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>";
?>