Handling errors with the API
The Loyale API uses conventional HTTP response codes to indicate the success or failure of an API request. Status Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted). In the case of an error, the response included a list of errors relating to the cause, the code indicating the status code and its standard name.
//error response object
{
"errors": [
"You cannot view another user's data"
],
"code": 401,
"errorId": "Unauthorized"
}