Categories
Return all Categories.
Parameters
includequery string
Include associations (delimited with comma). Available associations: dishes
languagequery string
Return results of Business by language ISO 639‑1 code.
pagequery integer
Page offset to fetch.
per_pagequery integer
Number of results to return per page.
{
const res = await fetch(`${Base_url}/api/v1/categories`, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}});
const data = await res.json();
}
{
"data": [
{
"id": "d5f107e9-8134-4cd3-822c-50dfea412982",
"type": "categories",
"links": {
"self": "/categories/d5f107e9-8134-4cd3-822c-50dfea412982"
},
"attributes": {
"name": "New added category TEST"
},
"relationships": {
"dishes": {
"links": {
"self": "/categories/d5f107e9-8134-4cd3-822c-50dfea412982/relationships/dishes",
"related": "/categories/d5f107e9-8134-4cd3-822c-50dfea412982/dishes"
}
}
}
},
],
"meta": {
"total-count": 48,
"total-pages": 5
}
}
Categories by id
Return a Category by category id
.
Parameters
idpath integerRequired
Return a Category by specific category
id
. You can retrieve thisid
from Categoriesincludequery string
Include associations (delimited with comma). Available associations: dishes
languagequery string
Return results of Business by language ISO 639‑1 code.
{
const res = await fetch(`${Base_url}/api/v1/categories/${id}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}});
const data = await res.json();
}
{
"url": "/api/v1/categories/{id}",
"method": "GET",
"data": {
"id": "d5f107e9-8134-4cd3-822c-50dfea412982",
"type": "categories",
"links": {
"self": "/categories/d5f107e9-8134-4cd3-822c-50dfea412982"
},
"attributes": {
"name": "New added category TEST"
},
"relationships": {
"dishes": {
"links": {
"self": "/categories/d5f107e9-8134-4cd3-822c-50dfea412982/relationships/dishes",
"related": "/categories/d5f107e9-8134-4cd3-822c-50dfea412982/dishes"
}
}
}
}
}