Errors¶
When a call fails, res is "error", and the response includes a numeric code and a human-readable message:
{
"res": "error",
"code": "102",
"message": "Field(s) is (are) required but not found."
}
Error codes are unique per method. The leading digits identify the method:
| Codes | Method |
|---|---|
| 1xx | Add order |
| 2xx | Reorder |
| 3xx | Hold order |
| 4xx | Unhold order |
| 5xx | Cancel order |
| 6xx | Change shipping address |
| 7xx | Change shipping method |
| 8xx | Change shipping deadline |
| 9xx | Get status |
| 10xx | Shipping rate |
| 11xx | Package information |
| 12xx | Enable rush processing |
Each method's page lists its full set of error codes.
Common errors¶
| Error | What to do |
|---|---|
Authentication failed (x01) |
Check your username, password and secretkey, and that you're using the right credentials for the environment. |
Missing field (x02) |
Check that you've sent every required field in data. |
Invalid arguments (HTTP 400) |
The request body isn't valid JSON, or the Content-Type: application/json header is missing. |