Status Codes

The following describes the status codes that result from successful and unsuccessful calls to our REST APIs:

Error Detection with HTTP Status Codes

All Cleverbridge REST-based APIs use conventional HTTP response codes to indicate success or failure of an API call:

Status CodeDescription
200Successful completion of the call.
400Bad Request (incomplete message, required fields missing, incorrectly formatted XML/JSON).
401Unauthorized Request. Authentication with Cleverbridge failed (ID/password issue). Not applicable to Pricing API.
402Request failed: Invalid parameters.
404Not Found: The other unique identifier set and passed in the call is invalid or does not exist (the subscription ID, for example).
429Too Many Requests: Rate limit reached.
500Request failed due to server error on the Cleverbridge side.

Error Handling for Backend API Calls

Upon calling an API endpoint, check the HTTP header status code. The ResultMessage of a non-200 status code contains more information to assist in diagnosis and error handling. For example:

  • With a 404 status code, the ResultMessage could contain “Item not found.”
  • With a 400 status code, the ResultMessage could contain the “Missing required field.”