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 Code | Description |
---|---|
200 | Successful completion of the call. |
400 | Bad Request (incomplete message, required fields missing, incorrectly formatted XML/JSON). |
401 | Unauthorized Request. Authentication with Cleverbridge failed (ID/password issue). Not applicable to Pricing API. |
402 | Request failed: Invalid parameters. |
404 | Not Found: The other unique identifier set and passed in the call is invalid or does not exist (the subscription ID, for example). |
429 | Too Many Requests: Rate limit reached. |
500 | Request 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.”
Updated almost 2 years ago