Skip to content

Get a list of cities

Request

Security
BearerPartner
Query
country_idnumber

Country ID to get cities from

company_idnumber

Location ID. If passed, the city of the location will also be returned, regardless of whether it belongs to the specified country or not

Headers
Acceptstringrequired

e.g. application/vnd.api.v2+json

Example:application/vnd.api.v2+json
Content-Typestringrequired

application/json

Authorizationstringrequired

Bearer partner_token

curl -i -X GET \
  'https://developer.alteg.io/_mock/en/developers/openapi/cities?country_id=0&company_id=0' \
  -H 'Accept: application/vnd.api.v2+json' \
  -H 'Authorization: Bearer <YOUR_Bearer {PartnerToken}_HERE>' \
  -H 'Content-Type: string'

Responses

OK

Bodyapplication/json
successboolean

Execution success status (true)

Example:true
dataArray of objects

Array of objects with data

Example:
[ { "id": 2, "country_id": 7, "title": "New York" }, { "id": 1040, "country_id": 30, "title": "Belfast" }, { "id": 1201, "country_id": 38, "title": "București" }, { "id": 1334, "country_id": 31, "title": "Budapest" } ]
metaArray of objects

Metadata (empty array)

Example:
[]
Response
{ "success": true, "data": [ { … }, { … }, { … }, { … } ], "meta": [] }