All API responses contain a JSON object, which will always contain a top-level integer property
status_code, indicating success (
= 0) or failure (
In case of errors, are adopted HTTP status codes are adopted and a JSON string property
messagethat explain the error.
MBurger APIs uses the following HTTP error codes:
Your request is invalid.
Your API key is wrong or not present.
You don't have permission to access this resource.
The requested resource can not be found.
Method Not Allowed
You tried to use an invalid method.
You requested a format that isn't json.
Your request did not pass the input validation.
Too Many Requests
You're requesting too many! Slow down!
Internal Server Error
We had a problem with our server. Try again later.
We're temporarily offline for maintenance. Please try again later.
On authentication error is returned an HTTP 401 and a JSON like this:
"message": "The project token is not present."
On bad request error is returned an HTTP 400 and a JSON like this:
"message": "Given filter(s) `available` are not allowed. Allowed filter(s) are `id, subscription, value, geofence`."
On permission error is returned an HTTP 403 and a JSON like this:
"message": "This action is unauthorized."
On not found error is returned an HTTP 404 and a JSON like this:
"message": "The requested resource can not be found."
On validation error is returned an HTTP 422 and a JSON like this:
"message": "The given data was invalid.",
"The email has already been taken."