API for Customer V.1.4

 
API นี้ทำขึ้นเพื่อให้ลูกค้าสามารถเชื่อมต่อเว็บไซต์ของลูกค้ากับข้อมูลของบริษัททีพีไอฯได้ โดยการใช้งาน API ให้ส่งข้อมูลมาตาม URL ที่เราให้ไว้ โดยสามารถส่งข้อมูลมาทั้งในแบบ POST หรือ GET ก็ได้ ทั้งนี้ API นี้ทำขึ้นเพื่อลูกค้าของบริษัททีพีไอ.อิมปอร์ต-เอ็กซ์ปอร์ต แอนด์ ชิปปิ้ง จำกัด.เท่านั้น หากลูกค้าสนใจใช้งาน API ให้ติดต่อสอบถามกับเจ้าหน้าที่ที่ดูแลลูกค้าอยู่เพื่อลงทะเบียนการใช้งาน

การใช้งาน API ต้องทำการขอ TOKEN เพื่อนำ TOKEN นั้นไปใช้ในการร้องขอข้อมูลของ API โดย TOKEN นั้นสามารถใช้งานได้นาน 1 วัน (หมดอายุเวลา 24.00) ต่อการขอ 1 ครั้ง หลังจาก TOKEN หมดอายุแล้วต้องทำการขอ TOKEN ใหม่อีกรอบ

การใช้งาน API ทั้งหมดจะคืนค่ากลับในรูปแบบของ JSON


การส่งค่า TOKEN ไปกับการเรียกใช้ API ให้ส่งไปในส่วนของ header โดยค่าเป็นดังนี้ "API-Token: รหัสTOKENที่ได้รับ" ดูตัวอย่างได้ด้านล่างนี้ (ยกเว้น API ที่ 1.GetToken ไม่ต้องส่ง "API-Token")
PHP Sample:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"$urlAPI");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$headers = [
    'API-Token: your TOKEN here'
];

curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$server_output = curl_exec ($ch);

curl_close ($ch);

 
 
 
 
 
 
1.GET TOKEN (ขอรหัส TOKEN)
รหัส TOKEN จะถูกส่งไปที่ URL ของลูกค้าที่ได้ลงทะเบียนไว้กับทางระบบเท่านั้น หากลูกค้ายังไม่ได้ลุงทะเบียนกรุณาติดต่อเจ้าที่ที่ดูแลลูกค้าอยู่
Request parameter:
Name Sample value Description
op GetToken Method name "GetToken"
strCustomername TPI-ID Customer ID


Response parameter:
Name Sample value Description
Result 0/1 0= request is complete.
1= request is fail.
ResultDescription Found data. Description of response.


Example:
https://www.thaitpi.com/api/?op=GetToken&strCustomername=xxx

Response:
{
    "Result": "0",
    "ResultDescription": "TOKEN has been sent to your system."
}


 
2.GET LIST SHIPMENT ORDER (รายการรับสินค้าที่จีน สามารถค้นหาตามช่วงเวลา)
Request parameter:
Name Sample value Description
op GetListShipmentOrder Method name "GetListShipmentOrder"
strCustomername TPI-ID Customer ID
strDateStart 2019-01-01 start date.(date format is 'YYYY-MM-DD')
strDateEnd 2019-01-01 end date.(date format is 'YYYY-MM-DD')


Response parameter:
Name Sample value Description
Result 0/1 0= request is complete.
1= request is fail.
ResultDescription Found data. Description of response.
Data Response data
SHIPMENT_ID 1016920190614173819609 shipment id.
BUSINESS_NO TPI-SZ2-201906140040 business no.
CUSTOMER 1016920190614173819609 Customer ID
SHIPMENT_DATE Date shipment date
CTNS xx cartons.
CBM xx Cubic of goods.
KG xx weight of goods(KG).
ROUTE xx Type of transportation.
REMARK Remark of product.


Example:
https://www.thaitpi.com/api/?op=GetListShipmentOrder&strCustomername=xxx&strDateStart=YYYY-MM-DD&strDateEnd=YYYY-MM-DD

Response:
{
    "Result": "0",
    "ResultDescription": "Get shipment order list success",
    "Data": [
        {
            "SHIPMENT_ID": "1016920190614173819609",
            "BUSINESS_NO": "TPI-SZ2-201906140040",
            "CUSTOMER": "TPI-SAK",
            "SHIPMENT_DATE": "2019-06-14T16:38:01.833",
            "CTNS": 1,
            "CBM": 0.0029,
            "KG": 0.5,
            "ROUTE": "car",
            "REMARK": "申通 3712739810739"
        },
        {
            "SHIPMENT_ID": "1016920190614111949306",
            "BUSINESS_NO": "TPI-SZ2-201906140023",
            "CUSTOMER": "TPI-SAK",
            "SHIPMENT_DATE": "2019-06-14T10:19:31",
            "CTNS": 1,
            "CBM": 0.0034,
            "KG": 0.4,
            "ROUTE": "car",
            "REMARK": "中通 75154786585334"
        },
        {
            "SHIPMENT_ID": "1016920190613111118580",
            "BUSINESS_NO": "TPI-SZ2-201906130031",
            "CUSTOMER": "TPI-SAK",
            "SHIPMENT_DATE": "2019-06-13T10:11:01.24",
            "CTNS": 1,
            "CBM": 0.039,
            "KG": 4.6,
            "ROUTE": "car",
            "REMARK": "中通  75154771654333"
        }
    ]
}


 
3.GET SHIPMENT ORDER DETAIL (รายละเอียดของรายการรับสินค้าที่จีน ขอได้ทีละ 1 รายการ)
Request parameter:
Name Sample value Description
op GetShipmentOrder Method name "GetShipmentOrder"
strCustomername TPI-XX Customer ID
strBusinessNo TPI-GZ-201710000001 Shipment Order ID


Response parameter:
Name Sample value Description
Result 0/1 0= request is complete.
1= request is fail.
ResultDescription Found data. Description of response.
Data Response data
SHIPMENT_ORDER_ID xxxx Shipment order ID
BUSINESS_NO TPI-SZ2-201906140040 Business no.
CUSTOMER TPI-XX Container number.
SHIPMENT_DATE 2019-06-01 shipment date
REMARK Remark of order
CTNS xx Carton.
KG xx Weight
CBM xx Size
ROUTE xxxx Type of transportation.
PRODUCT xx Product name.
WIDTH xx Width of carton.
LENGTH xx Length of carton.
HEIGHT xx Hight of carton.
CONTAINER YWC00.01A-TH Container number.
CONTAINER_STATUS Status of container.


Example:
https://www.thaitpi.com/api/?op=GetShipmentOrder&strCustomername=&strBusinessNo=xxx

Response:
{
    "Result": "0",
    "ResultDescription": "Get shipment order detail success",
    "Data": {
            "SHIPMENT_ORDER_ID": "1016920190613111118580",
            "BUSINESS_NO": "TPI-SZ2-201906130031",
            "CUSTOMER": "TPI-SAK",
            "SHIPMENT_DATE": "6/13/2019 10:11:01 AM",
            "CTNS": "1",
            "CBM": "0.0390",
            "KG": "4.60",
            "ROUTE": "car",
            "REMARK": "中通  75154771654333",
            "PRODUCT": [
                {
                    "PRODUCT": "支架,ขาตั้ง,,",
                    "CTNS": "1",
                    "KG": "4.6",
                    "CBM": "0.039008",
                    "WIDTH": "32",
                    "LENGTH": "53",
                    "HEIGHT": "23",
                    "CONTAINERS": [
                        {
                            "CONTAINER": "GZC06.13A-TH",
                            "CONTAINER_STATUS": [
                                {
                                    "STATUS": "FINISHED",
                                    "TIME": "6/17/2019 10:23:56 AM"
                                },
                                {
                                    "STATUS": "WAREHOUSETHAI",
                                    "TIME": "6/17/2019 10:23:49 AM"
                                },
                                {
                                    "STATUS": "CUSTOMTHAI",
                                    "TIME": "6/15/2019 9:05:31 AM"
                                },
                                {
                                    "STATUS": "CUSTOMCHINA",
                                    "TIME": "6/15/2019 8:44:09 AM"
                                },
                                {
                                    "STATUS": "CLOSEDCHINA",
                                    "TIME": "6/14/2019 3:12:42 PM"
                                },
                                {
                                    "STATUS": "DATAENTRY",
                                    "TIME": "6/13/2019 8:02:05 AM"
                                }
                            ]
                        }
                    ]
                }
            ]
    }
}


 
4.GET LIST RECEIPT (รายการบิลขนส่ง สามารถค้นหาตามช่วงเวลา)
Request parameter:
Name Sample value Description
op GetListReceipt Method name "GetListReceipt"
strCustomername TPI-XX Customer ID
strDateStart 2019-01-01 start date.(date format is 'YYYY-MM-DD')
strDateEnd 2019-01-01 end date.(date format is 'YYYY-MM-DD')


Response parameter:
Name Sample value Description
Result 0/1 0= request is complete.
1= request is fail.
ResultDescription Found data. Description of response.
Data Response data
REPCODE xxxx Receipt ID
REPDATE xxxx Receipt date
CONTAINER YWC00.01A-TH Container number.
CTNS xx Carton.
KG xx Weight
CBM xx Size
TOTAL xx Total amount of receipt
STATUSRECEIPT Paid / Unpaid Status of payment.
STATUSCONTAINER FINISHED Last status of container.


Example:
https://www.thaitpi.com/api/?op=GetListReceipt&strCustomername=XXX&strDateStart=YYYY-MM-DD&strDateEnd=YYYY-MM-DD

Response:
{
    "Result": "0",
    "ResultDescription": "Get receipt list success",
    "Data": [
        {
            "REPCODE": "RCP0000120190618160",
            "REPDATE": "2019-06-18T00:00:00",
            "CONTAINER": "GZC06.15A-TH",
            "KG": 3.8,
            "CBM": 0.0152,
            "CTNS": 2,
            "TOTAL": 0,
            "STATUSRECEIPT": "Unpaid",
            "STATUSCONTAINER": "CUSTOMTHAI"
        },
        {
            "REPCODE": "RCP0000120190617110",
            "REPDATE": "2019-06-17T00:00:00",
            "CONTAINER": "GZC06.14A-TH",
            "KG": 0.4,
            "CBM": 0.0034,
            "CTNS": 1,
            "TOTAL": 0,
            "STATUSRECEIPT": "Unpaid",
            "STATUSCONTAINER": "FINISHED"
        },
        {
            "REPCODE": "RCP0025020190615146",
            "REPDATE": "2019-06-15T00:00:00",
            "CONTAINER": "GZC06.13A-TH",
            "KG": 4.6,
            "CBM": 0.039,
            "CTNS": 1,
            "TOTAL": 0,
            "STATUSRECEIPT": "Fullypaid",
            "STATUSCONTAINER": "FINISHED"
        }
    ]
}
          
          


 
5.GET RECEIPT DETAILS (รายละเอียดของแต่ละบิลขนส่ง ขอได้ทีละ 1 รายการ)
Request parameter:
Name Sample value Description
op GetDetailReceipt Method name "GetDetailReceipt"
strCustomername TPI-XX Customer ID
strReceiptCode TPI-XX Receipt ID


Response parameter:
Name Sample value Description
Result 0/1 0= request is complete.
1= request is fail.
ResultDescription Found data. Description of response.
Data Response data
REPCODE xxxx Receipt ID
REPDATE xxxx Receipt date
STATUS YWC00.01A-TH Status of receipt.
REMARK Remark of receipt.
PAID 0.00 Paid amount.
PAY_REMAIN 0.00 Remaining amount need to pay.
CBM_KG CBM/KG Type of receipt.
CTNS xx Carton.
KG xx Weight
CBM xx Size
UNIT_PRICE xx Unit price.
CONTAINER YWC00.01A-TH Container number.
SUB_TOTAL 0 SubTotal amount of receipt
NET_TOTAL 0.00 Total sum.
RECEIVE_CHARGE 0.00 Service charge in China.
DELIVERY_CHARGE 0.00 Thailand delivery charge.
INSURANCE_CHARGE 0.00 Amount of insurance.


Example:
https://www.thaitpi.com/api/?op=GetDetailReceipt&strCustomername=XXX&strReceiptCode=XXX

Response:
{
    "Result": "0",
    "ResultDescription": "Get receipt detail success.",
    "Data": {
        "REPCODE": "RCP0000120190621122",
        "RECEIPT_DATE": "6\/21\/2019 12:00:00 AM",
        "STATUS": "Fullypaid",
        "CUSTOMER": "TPI-SAK",
        "PAY_DUE": "",
        "REMARK": "圆通 M0076918820 ,\n",
        "PAID": "0",
        "PAY_REMAIN": "0",
        "CBM_KG": "CBM",
        "KG": "0.3",
        "CBM": "0.0023",
        "UNIT_PRICE": "1",
        "CTNS": "1",
        "PRODUCT": [
            {
                "PRODUCT": "ชิ้นส่วนพลาสติก,塑胶件,,",
                "CTNS": "1",
                "KG": "0.30",
                "CBM": "0.0023",
                "WIDTH": "17",
                "LENGTH": "23",
                "HEIGHT": "6",
                "REMARK": "圆通 M0076918820 ",
                "BUSINESSNO": "TPI-SZ2-201906150045"
            }
        ],
        "SUB_TOTAL": "0",
        "NET_TOTAL": "0",
        "RECEIVE_CHARGE": "0",
        "DELIVERY_CHARGE": "0",
        "INSURANCE_CHARGE": "0",
        "CONTAINER": "GZC06.17A-TH",
        "ROUTE": "car",
        "SALE": "TPI-SALE",
        "SALE_MOBILE": "",
        "CREATED_DATE": "6\/21\/2019 12:00:00 AM",
        "LAST_UPDATE": "6\/24\/2019 2:20:21 PM",
        "STATUSSHIPMENT": "FINISHED",
        "CONTAINER_STATUS": [
            {
                "STATUS": "FINISHED",
                "TIME": "6\/21\/2019 3:41:03 PM"
            },
            {
                "STATUS": "WAREHOUSETHAI",
                "TIME": "6\/21\/2019 3:40:58 PM"
            },
            {
                "STATUS": "CUSTOMTHAI",
                "TIME": "6\/21\/2019 9:25:56 AM"
            },
            {
                "STATUS": "CUSTOMCHINA",
                "TIME": "6\/19\/2019 8:52:05 AM"
            },
            {
                "STATUS": "CLOSEDCHINA",
                "TIME": "6\/18\/2019 5:30:05 PM"
            },
            {
                "STATUS": "DATAENTRY",
                "TIME": "6\/17\/2019 8:14:29 AM"
            }
        ]
    }
}


 
6.GET MULTIPLE SHIPMENT ORDER DETAIL (รายละเอียดของรายการรับสินค้าที่จีน ขอได้ทีละไม่เกิน 100 รายการ โดยคั้นด้วยสัญญาลักษณ์คอมม่า ",")
strBusinessNo สามารถส่งได้สูงสุด 100 ไอดีต่อการขอ 1 ครั้ง
Request parameter:
Name Sample value Description
op GetMultiShipmentOrder Method name "GetMultiShipmentOrder"
strCustomername TPI-XX Customer ID
strBusinessNo TPI-GZ-201710000001,TPI-GZ-201710000001,TPI-GZ-201710000001 Shipment Order ID (strBusinessNo สามารถส่งได้สูงสุด 100 ไอดีต่อการขอ 1 ครั้ง)


Response parameter:
Name Sample value Description
Result 0/1 0= request is complete.
1= request is fail.
ResultDescription Found data. Description of response.
Data Response data
SHIPMENT_ORDER_ID xxxx Shipment order ID
BUSINESS_NO TPI-SZ2-201906140040 Business no.
CUSTOMER TPI-XX Container number.
SHIPMENT_DATE 2019-06-01 shipment date
REMARK Remark of order
CTNS xx Carton.
KG xx Weight
CBM xx Size
ROUTE xxxx Type of transportation.
PRODUCT xx Product name.
WIDTH xx Width of carton.
LENGTH xx Length of carton.
HEIGHT xx Hight of carton.
CONTAINER YWC00.01A-TH Container number.
CONTAINER_STATUS Status of container.


Example:
https://www.thaitpi.com/api/?op=GetMultiShipmentOrder&strCustomername=&strBusinessNo=xxx

Response:
{
    "Result": "0",
    "ResultDescription": "Get shipment order detail success.",
    "Data": {
        "TPI-SZ2-201906140023": {
            "SHIPMENT_ORDER_ID": "1016920190614111949306",
            "BUSINESS_NO": "TPI-SZ2-201906140023",
            "CUSTOMER": "TPI-SAK",
            "SHIPMENT_DATE": "6\/14\/2019 10:19:31 AM",
            "CTNS": "1",
            "CBM": "0.0034",
            "KG": "0.40",
            "ROUTE": "car",
            "REMARK": "中通 75154786585334",
            "PRODUCT": [
                {
                    "PRODUCT": "保护膜,ฟิล์มป้องกัน,,",
                    "CTNS": "1",
                    "KG": "0.4",
                    "CBM": "0.003402",
                    "WIDTH": "18",
                    "LENGTH": "27",
                    "HEIGHT": "7",
                    "CONTAINERS": [
                        {
                            "CONTAINER": "GZC06.14A-TH",
                            "CONTAINER_STATUS": [
                                {
                                    "STATUS": "FINISHED",
                                    "TIME": "6\/17\/2019 2:51:32 PM"
                                },
                                {
                                    "STATUS": "WAREHOUSETHAI",
                                    "TIME": "6\/17\/2019 1:17:47 PM"
                                },
                                {
                                    "STATUS": "CUSTOMTHAI",
                                    "TIME": "6\/17\/2019 8:44:47 AM"
                                },
                                {
                                    "STATUS": "CUSTOMCHINA",
                                    "TIME": "6\/16\/2019 10:45:57 PM"
                                },
                                {
                                    "STATUS": "CLOSEDCHINA",
                                    "TIME": "6\/15\/2019 4:57:18 PM"
                                },
                                {
                                    "STATUS": "DATAENTRY",
                                    "TIME": "6\/14\/2019 8:07:30 AM"
                                }
                            ]
                        }
                    ]
                }
            ]
        },
        "TPI-SZ2-201906140040": {
            "SHIPMENT_ORDER_ID": "1016920190614173819609",
            "BUSINESS_NO": "TPI-SZ2-201906140040",
            "CUSTOMER": "TPI-SAK",
            "SHIPMENT_DATE": "6\/14\/2019 4:38:01 PM",
            "CTNS": "1",
            "CBM": "0.0029",
            "KG": "0.50",
            "ROUTE": "car",
            "REMARK": "申通 3712739810739",
            "PRODUCT": [
                {
                    "PRODUCT": "玩具,ของเล่นพลาสติก,,",
                    "CTNS": "1",
                    "KG": "0.5",
                    "CBM": "0.002926",
                    "WIDTH": "14",
                    "LENGTH": "19",
                    "HEIGHT": "11",
                    "CONTAINERS": [
                        {
                            "CONTAINER": "GZC06.15A-TH",
                            "CONTAINER_STATUS": [
                                {
                                    "STATUS": "FINISHED",
                                    "TIME": "6\/19\/2019 2:55:06 PM"
                                },
                                {
                                    "STATUS": "WAREHOUSETHAI",
                                    "TIME": "6\/19\/2019 2:54:57 PM"
                                },
                                {
                                    "STATUS": "CUSTOMTHAI",
                                    "TIME": "6\/18\/2019 8:46:13 AM"
                                },
                                {
                                    "STATUS": "CUSTOMCHINA",
                                    "TIME": "6\/17\/2019 8:45:31 AM"
                                },
                                {
                                    "STATUS": "CLOSEDCHINA",
                                    "TIME": "6\/17\/2019 8:45:20 AM"
                                },
                                {
                                    "STATUS": "DATAENTRY",
                                    "TIME": "6\/15\/2019 8:02:36 AM"
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    }
}


 
7.GET MULTIPLE RECEIPT DETAILS (รายละเอียดของแต่ละบิลขนส่ง ขอได้ทีละ 100 รายการโดยคั้น strReceiptCode ด้วยสัญญาลักษณ์คอมม่า ",")
strReceiptCode สามารถส่งได้สูงสุด 100 ไอดีต่อการขอ 1 ครั้ง
Request parameter:
Name Sample value Description
op GetMultiReceiptDetail Method name "GetMultiReceiptDetail"
strCustomername TPI-XX Customer ID
strReceiptCode RCP000012019060010,RCP000012019060020 Receipt ID


Response parameter:
Name Sample value Description
Result 0/1 0= request is complete.
1= request is fail.
ResultDescription Found data. Description of response.
Data Response data
REPCODE xxxx Receipt ID
REPDATE xxxx Receipt date
STATUS YWC00.01A-TH Status of receipt.
REMARK Remark of receipt.
PAID 0.00 Paid amount.
PAY_REMAIN 0.00 Remaining amount need to pay.
CBM_KG CBM/KG Type of receipt.
CTNS xx Carton.
KG xx Weight
CBM xx Size
UNIT_PRICE xx Unit price.
CONTAINER YWC00.01A-TH Container number.
SUB_TOTAL 0 SubTotal amount of receipt
NET_TOTAL 0.00 Total sum.
RECEIVE_CHARGE 0.00 Service charge in China.
DELIVERY_CHARGE 0.00 Thailand delivery charge.
INSURANCE_CHARGE 0.00 Amount of insurance.


Example:
https://www.thaitpi.com/api/?op=GetMultiReceiptDetail&strCustomername=XXX&strReceiptCode=XXX

Response:
{
    "Result": "0",
    "ResultDescription": "Get receipt detail success.",
    "Data": {
        "RCP0000120190617110": {
            "REPCODE": "RCP0000120190617110",
            "RECEIPT_DATE": "6\/17\/2019 12:00:00 AM",
            "STATUS": "Fullypaid",
            "CUSTOMER": "TPI-SAK",
            "PAY_DUE": "",
            "REMARK": "中通 75154786585334 ,\n",
            "PAID": "0",
            "PAY_REMAIN": "0",
            "CBM_KG": "CBM",
            "KG": "0.4",
            "CBM": "0.0034",
            "UNIT_PRICE": "1",
            "CTNS": "1",
            "PRODUCT": [
                {
                    "PRODUCT": "ฟิล์มป้องกัน,保护膜,,",
                    "CTNS": "1",
                    "KG": "0.40",
                    "CBM": "0.0034",
                    "WIDTH": "18",
                    "LENGTH": "27",
                    "HEIGHT": "7",
                    "REMARK": "中通 75154786585334 ",
                    "BUSINESSNO": "TPI-SZ2-201906140023"
                }
            ],
            "SUB_TOTAL": "0",
            "NET_TOTAL": "0",
            "RECEIVE_CHARGE": "0",
            "DELIVERY_CHARGE": "0",
            "INSURANCE_CHARGE": "0",
            "CONTAINER": "GZC06.14A-TH",
            "ROUTE": "car",
            "SALE": "TPI-SALE",
            "SALE_MOBILE": "",
            "CREATED_DATE": "6\/17\/2019 12:00:00 AM",
            "LAST_UPDATE": "6\/19\/2019 3:41:25 PM",
            "STATUSSHIPMENT": "FINISHED",
            "CONTAINER_STATUS": [
                {
                    "STATUS": "FINISHED",
                    "TIME": "6\/17\/2019 2:51:32 PM"
                },
                {
                    "STATUS": "WAREHOUSETHAI",
                    "TIME": "6\/17\/2019 1:17:47 PM"
                },
                {
                    "STATUS": "CUSTOMTHAI",
                    "TIME": "6\/17\/2019 8:44:47 AM"
                },
                {
                    "STATUS": "CUSTOMCHINA",
                    "TIME": "6\/16\/2019 10:45:57 PM"
                },
                {
                    "STATUS": "CLOSEDCHINA",
                    "TIME": "6\/15\/2019 4:57:18 PM"
                },
                {
                    "STATUS": "DATAENTRY",
                    "TIME": "6\/14\/2019 8:07:30 AM"
                }
            ]
        },
        "RCP0000120190722128": {
            "REPCODE": "RCP0000120190722128",
            "RECEIPT_DATE": "7\/22\/2019 12:00:00 AM",
            "STATUS": "Fullypaid",
            "CUSTOMER": "TPI-SAK",
            "PAY_DUE": "",
            "REMARK": "1356232 申通3717142404194代付木架费50元  汇率5.00 ,\n",
            "PAID": "250",
            "PAY_REMAIN": "0",
            "CBM_KG": "CBM",
            "KG": "27.7",
            "CBM": "0.2531",
            "UNIT_PRICE": "1",
            "CTNS": "1",
            "PRODUCT": [
                {
                    "PRODUCT": "ของเล่นพลาสติก,玩具,,",
                    "CTNS": "1",
                    "KG": "27.70",
                    "CBM": "0.2531",
                    "WIDTH": "32",
                    "LENGTH": "113",
                    "HEIGHT": "70",
                    "REMARK": "1356232 申通3717142404194代付木架费50元  汇率5.00 ",
                    "BUSINESSNO": "TPI-SZ2-201907180037"
                }
            ],
            "SUB_TOTAL": "0",
            "NET_TOTAL": "250",
            "RECEIVE_CHARGE": "0",
            "DELIVERY_CHARGE": "250",
            "INSURANCE_CHARGE": "0",
            "CONTAINER": "GZC07.19A-TH",
            "ROUTE": "car",
            "SALE": "TPI-SALE",
            "SALE_MOBILE": "",
            "CREATED_DATE": "7\/22\/2019 12:00:00 AM",
            "LAST_UPDATE": "7\/23\/2019 3:08:07 PM",
            "STATUSSHIPMENT": "FINISHED",
            "CONTAINER_STATUS": [
                {
                    "STATUS": "FINISHED",
                    "TIME": "7\/23\/2019 8:36:52 AM"
                },
                {
                    "STATUS": "WAREHOUSETHAI",
                    "TIME": "7\/23\/2019 8:36:44 AM"
                },
                {
                    "STATUS": "CUSTOMTHAI",
                    "TIME": "7\/22\/2019 9:03:30 AM"
                },
                {
                    "STATUS": "CUSTOMCHINA",
                    "TIME": "7\/22\/2019 9:03:01 AM"
                },
                {
                    "STATUS": "CLOSEDCHINA",
                    "TIME": "7\/20\/2019 2:12:59 PM"
                },
                {
                    "STATUS": "DATAENTRY",
                    "TIME": "7\/19\/2019 8:26:47 AM"
                }
            ]
        }
    }
}


 
8.GET SHIPMENT ORDER ITEM (ดึงสถานะของรายการสินค้าทั้งหมดในออเดอร์ เช็คได้ทีละ 1 รายการ)
strBusinessNo ส่งครั้งละ 1 รายการ
Request parameter:
Name Sample value Description
op GetShipmentOrderItem Method name "GetShipmentOrderItem"
strCustomername TPI-XX Customer ID
strBusinessNo THA-TT-00001 Busines No.


Response parameter:
Name Sample value Description
Result 0/1 0= request is complete.
1= request is fail.
ResultDescription Found data. Description of response.
Data Response data
SERIAL_NO xxxx SERIAL NO
STATUS YWC00.01A-TH Status of item.
CUSTOMERRECEIVED = คือลูกค้ารับของแล้ว
KG KG Weight
CBM xx Size
WIDTH xx WIDTH.
HEIGHT xx HEIGHT
LENGTH xx LENGTH


Example:
https://www.thaitpi.com/api/?op=GetShipmentOrderItem&strCustomername=XXX&strBusinessNo=XXX

Response:
{
    "Result": "0",
    "ResultDescription": "Get shipment order item success.",
    "Data": [
        {
            "SERIAL_NO": "3002016320190608163053689",
            "WIDTH": 46,
            "LENGTH": 77,
            "HEIGHT": 88,
            "KG": 4.28,
            "CBM": 0.311696,
            "STATUS": "CUSTOMERRECEIVED"
        },
        {
            "SERIAL_NO": "3004016320190608163053689",
            "WIDTH": 46,
            "LENGTH": 77,
            "HEIGHT": 88,
            "KG": 4.28,
            "CBM": 0.311696,
            "STATUS": "CUSTOMERRECEIVED"
        },
        {
            "SERIAL_NO": "3005016320190608163053689",
            "WIDTH": 46,
            "LENGTH": 77,
            "HEIGHT": 88,
            "KG": 4.28,
            "CBM": 0.311696,
            "STATUS": "CUSTOMERRECEIVED"
        },
        {
            "SERIAL_NO": "3001016320190608163053617",
            "WIDTH": 46,
            "LENGTH": 77,
            "HEIGHT": 88,
            "KG": 4.28,
            "CBM": 0.311696,
            "STATUS": "CUSTOMERRECEIVED"
        },
        {
            "SERIAL_NO": "3001016320190608163101927",
            "WIDTH": 37,
            "LENGTH": 79,
            "HEIGHT": 64,
            "KG": 4.28,
            "CBM": 0.187072,
            "STATUS": "CUSTOMERRECEIVED"
        },
        {
            "SERIAL_NO": "3001016320190608163110378",
            "WIDTH": 86,
            "LENGTH": 57,
            "HEIGHT": 40,
            "KG": 4.28,
            "CBM": 0.19608,
            "STATUS": "CUSTOMERRECEIVED"
        },
        {
            "SERIAL_NO": "3003016320190608163053689",
            "WIDTH": 46,
            "LENGTH": 77,
            "HEIGHT": 88,
            "KG": 4.28,
            "CBM": 0.311696,
            "STATUS": "CUSTOMERRECEIVED"
        }
    ]
}


 
9.GET RECEIPT ITEMS (ดึงสถานะของรายการสินค้าทั้งหมดใน Receipt เช็คได้ทีละ 1 รายการ)
strReceiptCode ส่งครั้งละ 1 รายการ
Request parameter:
Name Sample value Description
op GetReceiptItems Method name "GetReceiptItems"
strCustomername TPI-XX Customer ID
strReceiptCode RCP00000000001 Receipt No.


Response parameter:
Name Sample value Description
Result 0/1 0= request is complete.
1= request is fail.
ResultDescription Found data. Description of response.
Data Response data
SERIAL_NO xxxx SERIAL NO
STATUS 3001016220190114162304734 Status of item.
CUSTOMERRECEIVED = คือลูกค้ารับของแล้ว
KG KG Weight
CBM xx Size
WIDTH xx WIDTH.
HEIGHT xx HEIGHT
LENGTH xx LENGTH


Example:
https://www.thaitpi.com/api/?op=GetReceiptItems&strCustomername=XXX&strReceiptCode=XXX

Response:
        {
    "Result": "0",
    "ResultDescription": "Get receipt items success.",
    "Data": [
        {
            "SERIAL_NO": "3001016220190114162304734",
            "WIDTH": 23,
            "LENGTH": 16,
            "HEIGHT": 14,
            "KG": 0.4,
            "CBM": 0.005152,
            "STATUS": "CUSTOMERRECEIVED"
        },
        {
            "SERIAL_NO": "3001016220190114162322237",
            "WIDTH": 27,
            "LENGTH": 37,
            "HEIGHT": 1,
            "KG": 0.3,
            "CBM": 0.000999,
            "STATUS": "CUSTOMERRECEIVED"
        },
        {
            "SERIAL_NO": "3001016220190114162416033",
            "WIDTH": 20,
            "LENGTH": 14,
            "HEIGHT": 10,
            "KG": 0.3,
            "CBM": 0.0028,
            "STATUS": "CUSTOMERRECEIVED"
        }
    ]
}


 
Container Status
Name Description
DATAENTRY DATAENTRY / ตู้ว่างเปล่า / 空柜
WAITCONTAINER WAITCONTAINER / ตู้รอขึ้นสินค้า / 等装集装箱
CLOSEDCHINA CLOSEDCHINA / ปิดตู้ที่จีน / 在中国封闭柜
CUSTOMCHINA CUSTOMCHINA / ตู้อยู่ด่านศุลกากรจีน / 集装箱在中国海关
CUSTOMTHAI CUSTOMTHAI / ตู้อยู่ด่านศุลกากรไทย / 集装箱在泰国海关
WAREHOUSETHAI WAREHOUSETHAI / ตู้กำลังลงของที่โกดังไทย / 在泰国仓库下柜
FINISHED FINISHED / ตู้ถึงโกดังปลายทางแล้ว / 集装箱到达目的
 
 
Item Status
Name Description
DATAENTRY DATAENTRY / รายการว่างเปล่า
WAITSHIPMENT WAITSHIPMENT / รอขึ้นตู้สินค้า
CLOSEDCHINA CLOSEDCHINA / ปิดตู้ที่จีน
CUSTOMCHINA CUSTOMCHINA / ตู้อยู่ด่านศุลกากรจีน
CUSTOMTHAI CUSTOMTHAI / ตู้อยู่ด่านศุลกากรไทย
WAREHOUSETHAI WAREHOUSETHAI / ตู้กำลังลงของที่โกดังไทย
CUSTOMERRECEIVED CUSTOMERRECEIVED / ออกส่งสินค้าแล้วหรือลูกค้ารับของแล้ว