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.

GET/api/v1/cities

  {
    const res = await fetch(`${BASE_URL}/api/v1/cities`, {
      method: 'GET',
      headers: {
        'Content-Type': 'application/json'
      }});
    const data = await res.json();
  }

RESPONSE

  {
    "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
    }
  }