City With Countries

Return all cities with country 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/city_with_countries

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

RESPONSE

{
  "data": [
    {
      "id": "4b166dbe-d99d-5091-abdd-95b83330ed3a",
      "type": "city-with-countries",
      "links": {
        "self": "/city-with-countries/4b166dbe-d99d-5091-abdd-95b83330ed3a"
      },
      "attributes": {
        "businesses-count": 1,
        "geolocation-lat": null,
        "geolocation-lng": null,
        "name": "2",
        "country": "United Kingdom"
      }
    }
  ],
  "meta": {
    "total-count": 20,
    "total-pages": 2
  }
}