Developer portal

Response HTTP Statuses

Restful API returns HTTP Statuses according to RFC 2616 standard.

All service method descriptions found in this document also include a list of HTTP Error statuses that can be returned from those services so you can prepare consuming code at your side for those situations.

HTTP Statuses are commonly splitted into following categories

  • Successful 2xx - Indicates that the client's request was successfully received, understood, and accepted.
  • Client Error 4xx - Intended for cases in which the client seems to have erred. These status codes are applicable to any request method.
  • Server Error 5xx - The server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting to fulfill the request.

HTTP Statuses 4xx and 5xx are returned with JSON formatted error explanation along with our internal ErrorCode reference.

HTTP/1.1 400 Bad Request
...
{
  "Message": "An error has occurred",
  "MessageDetail": "Invalid BasketId (e7ca0f76-74d7-43a2-93dc-365cdd86aeaa).",
  "ErrorCode": "ab0e05ae-bfe3-47d9-925c-de75ac4de7ca"
}

HTTP statuses used on LTD API

Successful 2xx

HTTP Status Code Description
200 OK The request has succeeded. The information returned with the response is dependent on the method used in the request, for example:
  • GET - an entity corresponding to the requested resource is sent in the response
  • POST - an entity describing or containing the result of the action
201 Created The request has been fulfilled and resulted in a new resource being created.
204 No Content The server has fulfilled the request but does not need to return an entity-body

Client Error 4xx

HTTP Status Code Description
400 Bad Request The request could not be understood by the server due to malformed syntax. The client shouldn't repeat the request without modifications.
403 Forbidden The server understood the request, but is refusing to fulfill it. Authorization will not help and the request should not be repeated.
404 Not Found The server has not found anything matching the Request-URI.
409 Conflict The request could not be completed due to a conflict with the current state of the resource.
410 Gone The requested resource is no longer available at the server and no forwarding address is known.

Server Error 5xx

HTTP Status Code Description
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request.
501 Not Implemented The server does not support the functionality required to fulfill the request.
503 Service Unavailable The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. The implication is that this is a temporary condition which will be alleviated after some delay.
504 Gateway Timeout The server, while acting as a gateway or proxy, did not receive a timely response from the upstream server it needed to access in attempting to complete the request.