API สำหรับส่งเลขพัสดุให้ผู้ใช้ ETrackings app ที่ผูกเบอร์โทรศัพท์ไว้ ระบบจะเก็บพัสดุในสถานะ ON_KEEP นาน 48 ชั่วโมง เมื่อพบข้อมูลจะแจ้งเตือนผู้ใช้ หากไม่พบจะลบอัตโนมัติ
/app/send-track
/app/send-trackHeaders
แทนที่ YOUR_API_KEY และ YOUR_KEY_SECRET ด้วย credentials ของคุณ
Etrackings-Api-Key: YOUR_API_KEY
Etrackings-Key-Secret: YOUR_KEY_SECRET
Accept-Language: YOUR_LANGUAGE (TH | EN)
Content-Type: application/json
Parameters
PARAMETER ที่จำเป็น
| Parameter | ประเภท | คำอธิบาย |
|---|---|---|
trackingNo |
String |
เลขพัสดุที่ต้องการติดตาม |
courierKey |
String |
ชื่อขนส่ง รองรับ: thailand-post kex-express shopee-express flash-express jt-express best-express speed-d nim-express inter-express tnt-express shippop tp-logistics ups global-cainiao japan-post sky-box business-idea-transport por-lor-express dpx-logistics ecms-express quantium-solutions korea-post dhl-ecommerce makesend-delivery ems-international sabina rtt-express janio-asia teleport ontrac apple-store dhl-express lex fed-ex |
phoneNumber |
String |
เบอร์โทรศัพท์ผู้ใช้ เช่น 0987654321 หรือ +66987654321 (รองรับเฉพาะไทย) |
note |
String |
หมายเหตุพัสดุ หรือชื่อสินค้า (ไม่จำเป็น) |
Body
ตัวอย่างกับ trackingNo, courierKey, phoneNumber และ note SHP5054369172, kex-express, 0987654321
{
"meta": {
"code": 201,
"message": "Send to user by phone number +66 93 194 2607."
}
}
Curl
ตัวอย่างกับ trackingNo, courierKey, phoneNumber และ note SHP5054369172, kex-express, 0987654321
curl --location --request POST 'https://api.etrackings.com/api/v3/app/send-track' --header 'Etrackings-api-key: <YOUR_API_KEY>' --header 'Etrackings-key-secret: <YOUR_KEY_SECRET>' --header 'Content-Type: application/json' --data-raw '{
"trackingNo": "SHP5054369172",
"courierKey": "kex-express",
"phoneNumber": "0987654321",
"note": "Test sending parcel notifications via phone number"
}'