API Status Codes

The LS One API responds to requests with different HTTP status codes depending on the result from the request.

2xx Success

This class of status codes are returned for requests that were processed successfully.

Code Text Explanation
200 OK The request succeeded. Usually returned by GET or POST actions
201 Created The resource was created. Usually returned by PUT actions
202 Accepted  
204 No content  

4xx Client Errors

This class of status codes are returned for requests that could not be processed due to the problems with the request or the data.

Error code Text Explanation
400   The server cannot or will not process the request due to something that is perceived to be a client error (ie. malformed query or invalid XML/JSON payload)
401   Unauthorized Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet been provided
403 Forbidden The request was a valid request, but the server is refusing to respond to it. Unlike a 401 Unauthorized response, authenticating will make no difference
404 Not Found The requested resource could not be found but may be available again in the future
405 Method Not Allowed A request was made of a resource using a request method not supported by that resource; for example, using GET on a form which requires data to be presented via POST, or using PUT on a read-only resource
409 Conflict Indicates that the request could not be processed because of conflict in the request, such as an edit conflict in the case of multiple updates
422 Unprocessable Entity Entity The request was well-formed but was unable to be followed due to semantic errors
429 Too Many Requests The user has sent too many requests in a given amount of time. Intended for use with rate limiting schemes

5xx Server Errors

This class of status codes are returned for requests that could not be processed due to an internal error within the LS One API.

Error code   Meaning
500 Internal Error A generic error message, given when an unexpected condition was encountered and no more specific message is suitable
502 Bad Gateway The server was acting as a gateway or proxy and received an invalid response from the upstream server
503 Service Unavailable The server is currently unavailable (because it is overloaded or down for maintenance)

Troubleshooting

In case of 5xx errors which signals an internal error in LS One API or a configuration error, increase log verbosity, see Configuration. Also verify if all settings in configuration file are correct for the environment where LS One API runs.

In case of 4xx errors - make sure the client is authenticated when making request to LS One API and that the client has the right permissions to access the needed endpoints.