# Basics

When interacting with MBurger API pass arguments as:

* `GET` querystring parameters
* `POST` parameters presented as `application/x-www-form-urlencoded` or a mix of both `GET` and `POST` parameters
* Some 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 as `application/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.

{% hint style="info" %}
Check in which APIs this system is available to see all the available parameters.
{% endhint %}

## Headers

MBurger uses some HTTP headers to handle requests.&#x20;

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`. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mburger.cloud/api-docs-1/common/basics.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
