Evaluating Responses
All API responses contain a JSON object, which will always contain a top-level integer property status_code
, indicating success (= 0
) or failure (!= 0
).
In case of errors, are adopted HTTP status codes are adopted and a JSON string property message
that explain the error.
Errors
MBurger APIs uses the following HTTP error codes:
Code
Meaning
Description
400
Bad Request
Your request is invalid.
401
Unauthorized
Your API key is wrong or not present.
403
Forbidden
You don't have permission to access this resource.
404
Not Found
The requested resource can not be found.
405
Method Not Allowed
You tried to use an invalid method.
406
Not Acceptable
You requested a format that isn't json.
422
Unprocessable Entity
Your request did not pass the input validation.
429
Too Many Requests
You're requesting too many! Slow down!
500
Internal Server Error
We had a problem with our server. Try again later.
503
Service Unavailable
We're temporarily offline for maintenance. Please try again later.
Examples
On authentication error is returned an HTTP 401 and a JSON like this:
On bad request error is returned an HTTP 400 and a JSON like this:
On permission error is returned an HTTP 403 and a JSON like this:
On not found error is returned an HTTP 404 and a JSON like this:
On validation error is returned an HTTP 422 and a JSON like this:
Last updated