Error Handling

We provide a summary of the general and specific response status codes returned by the API. We also describe error handling. Each call returns a general status and can include an array of detailed response codes corresponding to a field.

Field-Specific Error Responses

We provide additional field-specific information any time the API returns 400-500 HTTP error responses. These specific codes are helpful for mobile app developers looking to localize error messages. Field-specific errors can range from 40000-50000.

JSON
Copy

General Error Codes

CodeStatus MessageDescriptionSample Scenario
200OKSuccessThe request has been processed successfully.
201CreatedNew Resource CreatedCreate a new listing in the uShip marketplace. This status code returns along with a location header. Example: POST https://api.uship.com/v2/listings/702707778
204No ContentNo content has been returned.When updating a user's settings, if the PUT is successful, this status code returns.
204DeletedA resource has been deleted.Applies after a DELETE call is successful.
400Bad RequestThe request cannot be completed.Call contains invalid input and does not complete.
401UnauthorizedResource access is outside of user permissions.When this code returns, we recommend debugging the authorization method. The user is not authorized. Check your authorization header for errors.
403ForbiddenAccess Denied.If a user attempts to modify a resource that you do not own such as modifying another user's preferences, this error will return. For example, when updating an user's settings, if the PUT is not successful, this status code could return with field-level error.
404Not foundResource not found. Can also mean that the route does not exist.
405Method Not Allowed

Resource does not support method.

Resource method not yet available.

Updating to the URI https://api.uship.com/v2/savedSearches/Id/results

Example response: The requested resource does not support http method 'PUT'.

409ConflictThe server received a request conflict.
412Precondition failedMostly used to support the API.
500Internal Server ErrorThe server encountered an error.
501Not implementedThis resource has not yet been implemented.uShip Development either has not or is still creating the resource.
503Service UnavailableThe server cannot handle the request at this time.Usually indicates temporary server downtime.
504Gateway TimeoutWhen the server is acting as a gateway and cannot retrieve a response in time.

Common Error Causes

The following items are common, easy-to-fix causes for errors that integrators may experience:

  • Exceeding character limits: Listing titles have a limit of 50 characters and Listing descriptions have a limit of 5000 characters.
  • Expired access token: Please refresh the access token as described on our Authentication page
  • Rate limiting: You may be exceeding your account's rate limits on calls per second or day. Please talk with your integration specialist when setting up your integration to find an optimal rate limit, if necessary.
  • Invalid Zip Codes: Zip code 10000, international zip codes, or same zip-to-zip test calls may generate errors when attempting to generate rates.
  • Case sensitive errors
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard