# Get Section

{% hint style="info" %}
How to obtain a section.&#x20;

You can use the section ID or the slug.
{% endhint %}

{% tabs %}
{% tab title="Request" %}
`GET https://mburger.cloud/api/sections/<id-or-slug>`

```bash
curl https://mburger.cloud/api/sections/<id-or-slug>?include=elements
-H "Accept: application/json" 
-H "X-MBurger-Token: <token>" 
-H "X-MBurger-Version: 3"
```

#### &#x20;URL Parameters

| Name       | Type        | Required | Description                                  |
| ---------- | ----------- | -------- | -------------------------------------------- |
| id-or-slug | int, string | Yes      | Section id or the value of the slug element. |

{% hint style="info" %}
If you are using the slug (and the project has Multi-language enabled) make sure to include the correct locale in the request.
{% endhint %}

#### &#x20;Parameters

| Name                    | Type    | Required | Description                                                                                                                                                             |
| ----------------------- | ------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| locale                  | string  | No       | For multi-language projects, specify the desired locale for elements values. If locale is not provided or found the project fallback will be used.                      |
| force\_locale\_fallback | boolean | No       | If true and the requested locale is empty, the fallback locale is returned. Default false.                                                                              |
| include                 | string  | No       | Specify which relations to load and include in response.                                                                                                                |
| image\_format           | string  | No       | Specify which image dimension to include in response. Values are *thumb*, *medium*, *large* and *original*. Default is *medium*.                                        |
| use\_slug               | string  | No       | If true forces MBurger to use the slug.                                                                                                                                 |
| distance                | string  | No       | With this parameter and providing your latitude and longitude the distance between you and every section is added in the response. Example: distance=42.24234,13.543344 |
| {% endtab %}            |         |          |                                                                                                                                                                         |

{% tab title="Response" %}
When successful, a HTTP 200 and JSON like this is returned:

```bash
{
  "status_code": 0,
  "body": {
    "id": 1,
    "order": 1,
    "all_locales": false,
    "visible": true,
    "in_evidence": false,
    "available_at": 1546599965,
    "updated_at": 1546599966,
    "elements": {
      "title": {
        "id": 2,
        "name": "title",
        "type": "text",
        "order": 1,
        "options": null,
        "locale": "en",
        "value": "Main Home"
      },
      "image": {
        "id": 3,
        "name": "image",
        "type": "image",
        "order": 2,
        "options": null,
        "locale": "en",
        "value": [
          {
            "id": 1,
            "url": "https://cdn.mburger.cloud/storage/1/conversions/image-medium.jpg",
            "size": 45166,
            "mime_type": "image/jpeg"
          }
        ]
      },
      "content": {
        "id": 4,
        "name": "content",
        "type": "textarea",
        "order": 3,
        "options": null,
        "locale": "en",
        "value": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec nisi et sapien tincidunt sodales."
      }
    }
  }
}
```

{% endtab %}
{% endtabs %}


---

# 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/sections/get-section-1.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.
