Get Section
How to obtain a section.
You can use the section ID or the slug.
Request
Response
GET https://mburger.cloud/api/sections/<id-or-slug>
1
curl https://mburger.cloud/api/sections/<id-or-slug>?include=elements
2
-H "Accept: application/json"
3
-H "X-MBurger-Token: <token>"
4
-H "X-MBurger-Version: 3"
Copied!

URL Parameters

Name
Type
Required
Description
id-or-slug
int, string
Yes
Section id or the value of the slug element.
If you are using the slug (and the project has Multi-language enabled) make sure to include the correct locale in the request.

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
When successful, a HTTP 200 and JSON like this is returned:
1
{
2
"status_code": 0,
3
"body": {
4
"id": 1,
5
"order": 1,
6
"all_locales": false,
7
"visible": true,
8
"in_evidence": false,
9
"available_at": 1546599965,
10
"updated_at": 1546599966,
11
"elements": {
12
"title": {
13
"id": 2,
14
"name": "title",
15
"type": "text",
16
"order": 1,
17
"options": null,
18
"locale": "en",
19
"value": "Main Home"
20
},
21
"image": {
22
"id": 3,
23
"name": "image",
24
"type": "image",
25
"order": 2,
26
"options": null,
27
"locale": "en",
28
"value": [
29
{
30
"id": 1,
31
"url": "https://cdn.mburger.cloud/storage/1/conversions/image-medium.jpg",
32
"size": 45166,
33
"mime_type": "image/jpeg"
34
}
35
]
36
},
37
"content": {
38
"id": 4,
39
"name": "content",
40
"type": "textarea",
41
"order": 3,
42
"options": null,
43
"locale": "en",
44
"value": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec nisi et sapien tincidunt sodales."
45
}
46
}
47
}
48
}
Copied!
Copy link