Get City#

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#

HTTP Method: GET

URI Path: /v3/cities/

URI Query Parameters#

Name

Type

Is Required?

Description

id

string

Yes

Unique ID identifier of the City.

include

string

No

Inclusion

Includes#

Value

Description

country

Country Object

region

Region Object

area

Area Object

Examples#

http

1GET /v3/cities/cdf449bc-e3fb-42cc-bf31-b88f91e40de4 HTTP/1.1
2Host: api.didww.com
3Content-Type: application/vnd.api+json
4Accept: application/vnd.api+json
5Api-Key: [API Token]

curl

1curl -i -X GET https://api.didww.com/v3/cities/cdf449bc-e3fb-42cc-bf31-b88f91e40de4 -H "Accept: application/vnd.api+json" -H "Api-Key: [API Token]" -H "Content-Type: application/vnd.api+json"

response

 1HTTP/1.1 200 OK
 2Content-Type: application/vnd.api+json
 3
 4{
 5  "data": {
 6    "id": "cdf449bc-e3fb-42cc-bf31-b88f91e40de4",
 7    "type": "cities",
 8    "attributes": {
 9      "name": "London"
10    },
11    "relationships": {
12      "country": {
13        "links": {
14          "self": "https://api.didww.com/v3/cities/cdf449bc-e3fb-42cc-bf31-b88f91e40de4/relationships/country",
15          "related": "https://api.didww.com/v3/cities/cdf449bc-e3fb-42cc-bf31-b88f91e40de4/country"
16        }
17      },
18      "region": {
19        "links": {
20          "self": "https://api.didww.com/v3/cities/cdf449bc-e3fb-42cc-bf31-b88f91e40de4/relationships/region",
21          "related": "https://api.didww.com/v3/cities/cdf449bc-e3fb-42cc-bf31-b88f91e40de4/country"
22        }
23      },
24      "area": {
25        "links": {
26          "self": "https://api.didww.com/v3/cities/cdf449bc-e3fb-42cc-bf31-b88f91e40de4/relationships/area",
27          "related": "https://api.didww.com/v3/cities/cdf449bc-e3fb-42cc-bf31-b88f91e40de4/area"
28        }
29      }
30    }
31  }
32}

Other Responses#

Code

Success

Description

404

No

Not Found

401

No

Unauthorized