The item restrictions API will throw a 400 bad request error when a request was invalid. In the example below, the user passed an HS code that was not valid.
Response
1
2
3
{
"error_message": "HS code must have between 6 and 13 digits and must only contain numbers and periods"
}
Another example of status 400 is when the ship_from or ship_to countries are null.
Response
1
2
3
{
"error_message": "Ship from and ship to countries cannot be null"
}
In scenarios where there is a server error, the following response will come back.
Common error responses for the Zonos item restrictions APIÂ
The item restrictions API will throw a 400 bad request error when a request was invalid. In the example below, the user passed an HS code that was not valid.
Response
{ "error_message": "HS code must have between 6 and 13 digits and must only contain numbers and periods" }
Another example of status 400 is when the
ship_from
orship_to
countries arenull
.Response
{ "error_message": "Ship from and ship to countries cannot be null" }
In scenarios where there is a server error, the following response will come back.
Response
{ "timestamp": "2022-10-18T23:15:21.482+00:00", "status": 500, "error": "Internal Server Error", "path": "/applyRestrictions" }