ETrackings ใช้รหัสตอบกลับ HTTP ทั่วไปเพื่อระบุว่าสำเร็จหรือล้มเหลวของคำขอ API โดยทั่วไปรหัสในช่วง 2xx บ่งชี้ว่าสำเร็จรหัสในช่วง 4xx ระบุถึงข้อผิดพลาดที่เกิดจากข้อมูลที่ให้ (เช่นพารามิเตอร์ที่ต้องการหายไป ฯลฯ ) และรหัสในช่วง 5xx แสดงถึงข้อผิดพลาดด้วย เซิร์ฟเวอร์ของ ETrackings
HTTP Status Code Summary
HTTP Status Code | meta.code | Sample Error Message |
---|---|---|
400 |
400 |
Parameter is invalid. |
401 |
401 |
Invalid API key or Key secret. |
403 |
403 |
The request is understood, but it has been refused or access is not allowed. |
404 |
404 |
The URI requested is invalid or the resource requested does not exist. |
429 |
429 |
You have exceeded the API call rate limit. Default limit is 10 requests per second. |
500 502 503 504
|
500 502 503 504
|
Something went wrong on ETrackings end. |
Examples
กรณี API key หรือ Key Secret ผิด
{
"meta": {
"code": 401,
"message": "Invalid API key or Key secret."
}
}
กรณี ชื่อขนส่งผิด
{
"meta": {
"code": 404,
"message": "The URI requested is invalid or the resource requested does not exist."
}
}
กรณี Server is down
{
"meta": {
"code": 500,
"message": "Something went wrong on ETrackings end."
},
"data": {
}
}