Skip to content

HTTP Response Codes

Magali Ruffier edited this page Jun 25, 2014 · 9 revisions

Introduction

The REST service attempts to respond to requests using standard HTTP status codes allowing a user to programatically detect when a request has not succeeded. You should never assume requests will succeed when working with web services and ensure your client APIs can handle all possible eventualities. You can use the following as a guide to the type of error you've encountered because of the numeric range it lies in:

  • 2XX - Successful response
  • 4XX - User error in request leading to unsuccessful response. A client can fix these errors
  • 5XX - Server error in response. A client cannot fix these errors

Supported Codes

Code Name Notes
200 OK Request was a success. Only process data from the service when you receive this code
400 Bad Request Occurs during exceptional circumstances such as the service is unable to find an ID. Check if the response Content-type or Accept was JSON. If so the JSON object is an exception hash with the message keyed under error
403 Forbidden You are submitting far too many requests and have been temporarily forbidden access to the service. Wait and retry with a maximum of 15 requests per second.
404 Not Found Indicates a badly formatted request. Check your URL
408 Timeout The request was not processed in time. Wait and retry later
429 Too Many Requests You have been rate-limited; wait and retry. The headers X-RateLimit-Reset, X-RateLimit-Limit and X-RateLimit-Remaining will inform you of how long you have until your limit is reset and what that limit was. If you get this response and have not exceeded your limit then check if you have made too many requests per second.
503 Service Unavailable The service is temporarily down; retry after a pause