Get Area
Description
Returns an area for a given area ID. Note that a unique identification number is allocated to each area.
Request
HTTP Method: GET
URI Path: /v3/areas/
URI Query Parameters:
Name |
Type |
Is Required? |
Description |
---|---|---|---|
id |
|
Yes |
Unique ID number for the area |
include |
|
Optional |
Includes:
Value |
Description |
---|---|
country |
Examples
GET /v3/areas/9fcc7390-84a2-47f1-a900-0558cdcb6ce3 HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API Token]
curl -i -X GET https://api.didww.com/v3/areas/9fcc7390-84a2-47f1-a900-0558cdcb6ce3 -H "Accept: application/vnd.api+json" -H "Api-Key: [API Token]" -H "Content-Type: application/vnd.api+json"
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
"data": {
"id": "9fcc7390-84a2-47f1-a900-0558cdcb6ce3",
"type": "areas",
"attributes": {
"name": "Tuscany"
},
"relationships": {
"country": {
"links": {
"self": "https://api.didww.com/v3/areas/9fcc7390-84a2-47f1-a900-0558cdcb6ce3/relationships/country",
"related": "https://api.didww.com/v3/areas/9fcc7390-84a2-47f1-a900-0558cdcb6ce3/country"
}
}
}
}
}
GET /v3/areas/9fcc7390-84a2-47f1-a900-0558cdcb6ce3?include=country HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API Token]
curl -i -X GET 'https://api.didww.com/v3/areas/9fcc7390-84a2-47f1-a900-0558cdcb6ce3?include=country' -H "Accept: application/vnd.api+json" -H "Api-Key: [API Token]" -H "Content-Type: application/vnd.api+json"
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
"data": {
"id": "9fcc7390-84a2-47f1-a900-0558cdcb6ce3",
"type": "areas",
"attributes": {
"name": "Tuscany"
},
"relationships": {
"country": {
"links": {
"self": "https://api.didww.com/v3/areas/9fcc7390-84a2-47f1-a900-0558cdcb6ce3/relationships/country",
"related": "https://api.didww.com/v3/areas/9fcc7390-84a2-47f1-a900-0558cdcb6ce3/country"
},
"data": {
"type": "countries",
"id": "51d3fe2a-6588-496b-870c-398e627de5c4"
}
}
}
},
"included": [
{
"id": "51d3fe2a-6588-496b-870c-398e627de5c4",
"type": "countries",
"attributes": {
"name": "Italy",
"prefix": "39",
"iso": "IT"
}
}
]
}
Other Responses
Code |
Success |
Description |
---|---|---|
404 |
No |
|
401 |
No |