Error responses

All errors are returned as JSON. Use the HTTP status code and the code value to decide how your integration should respond. The message describes the problem and can be used when investigating a failed request.

Authentication failure

Status code: 401

{ "code": "FORBIDDEN", "message": "Unauthorized" }

Validation failure

Status code: 400

{ "code": "INVALID", "message": "Something is invalid" }

Permission denial

Status code: 403

{ "code": "FORBIDDEN", "message": "This is not allowed" }

Not found

Status code: 404

{ "code": "NOT_FOUND", "message": "This does not exist" }

Server failure

Status code: 500

{ "code": "E_FAILED", "message": "Something went wrong" }

Some gateway-level failures may only include a message:

{ "message": "Internal server error" }

An HTTP 500 response means that the request could not be completed because of an error on the server. If the result of a write request is unclear, contact YourBarMate support before sending the same change again.