Get City

GET https://{{host}}/v3/cities/:id

Returns a city for a given city ID number. Note that a unique identification number is allocated to each city included in the DIDWW coverage.

Request Params

KeyDatatypeRequiredDescription
includenullComma-separated values of include parameter.
The response will include a top-level object relationships with associated data under the appropriate resource key.
Details in Inclusion of Related Resources Article.

Allowed values:

country - Country Object


region - Region Object *** |

HEADERS

KeyDatatypeRequiredDescription
Acceptstring
Content-Typestring
Api-Keystring

RESPONSES

status: OK

{"data":{"id":"498f2880-591f-436d-aacd-46ad3a7d8be8","type":"cities","attributes":{"name":"London"},"relationships":{"country":{"links":{"self":"https://api.didww.com/v3/cities/498f2880-591f-436d-aacd-46ad3a7d8be8/relationships/country","related":"https://api.didww.com/v3/cities/498f2880-591f-436d-aacd-46ad3a7d8be8/country"},"data":{"type":"countries","id":"2e89d524-55b6-4b6c-a0af-3c1ed0f407f9"}},"region":{"links":{"self":"https://api.didww.com/v3/cities/498f2880-591f-436d-aacd-46ad3a7d8be8/relationships/region","related":"https://api.didww.com/v3/cities/498f2880-591f-436d-aacd-46ad3a7d8be8/region"}}}},"included":[{"id":"2e89d524-55b6-4b6c-a0af-3c1ed0f407f9","type":"countries","attributes":{"name":"United Kingdom","prefix":"44","iso":"GB"},"relationships":{"regions":{"links":{"self":"https://api.didww.com/v3/countries/2e89d524-55b6-4b6c-a0af-3c1ed0f407f9/relationships/regions","related":"https://api.didww.com/v3/countries/2e89d524-55b6-4b6c-a0af-3c1ed0f407f9/regions"}}}}],"meta":{"api_version":"2017-09-18"}}