Basics
When interacting with MBurger API pass arguments as:
GET
querystring parametersPOST
parameters presented asapplication/x-www-form-urlencoded
or a mix of bothGET
andPOST
parametersSome write APIs allow arguments
application/json
attributes.File uploads expects
multipart/form-data
, which is a fancy way of asking you to send most parameters asapplication/x-www-form-urlencoded
key/value pairs, but send files in their native content type.
Query Builder
Some GET
request like for blocks and sections adopts a powerful query builder system.
Using 3 parameters include
, filter
and sort
in the request query string the client can build requests that reflects perfectly their needs.
Check in which APIs this system is available to see all the available parameters.
Headers
MBurger uses some HTTP headers to handle requests.
In particular, they are used to authenticate and to know which kind of data one should expect from the client and vice versa.
All used headers are shown in the table below, but they can change based on which API you are calling.
Header
Always Required
Description
Accept
Yes
Define the data type that client is expecting in response. For API, it should always be application/json
.
X-MBurger-Token
Yes
Contains the token to authenticate every API call.
X-MBurger-Version
Yes
Define the API version you want to use. The minimum and actual is 3.
Authorization
No
Allows MBurger to authenticate mobile users. Required only for APIs regarding mobile users.
Content-Type
No
Define the data type that MBurger is expecting in request data. Required when data in POSTed to MBurger, normally it is application/x-www-form-urlencoded
.
Last updated