Cities
Return all cities fetched from published businesses.
Parameters
sortquery string
Sort ascending or descending order.
pagequery integer
Page offset to fetch.
per_pagequery integer
Number of results to return per page.
{
const res = await fetch(`${BASE_URL}/api/v1/cities`, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}});
const data = await res.json();
}
{
"data": [
{
"id": "4b166dbe-d99d-5091-abdd-95b83330ed3a",
"type": "cities",
"links": {
"self": "/cities/4b166dbe-d99d-5091-abdd-95b83330ed3a"
},
"attributes": {
"businesses-count": 1,
"geolocation-lat": null,
"geolocation-lng": null,
"name": "2"
}
},
],
"meta": {
"total-count": 18,
"total-pages": 2
}
}