Get Areas
GET https://{{host}}/v3/areas
Returns a list of areas. Maximum page size is 1000. Default page size is 1000.
Request Params
| Key | Datatype | Required | Description |
|---|---|---|---|
include | null | Comma-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
|
| filter[id] | null | | string - Filters by City id field.
- Allow blank - No.
- Allow array - Yes. |
|
filter[name]| null | |string- Filters by City name field. - Allow blank - Yes.
- Allow array - Yes. |
|
filter[country.id]| null | |string- Filters by City country.id field. - Allow blank - Yes.
- Allow array - Yes. |
|
sort| null | | Used for sorting the fields returned by the request, with a comma,separating the included fields. Details in Sorting Article.
Allowed values:
name - Sorts by the name field.
|
| fields[areas] | null | | The value of the fields parameter MUST be a comma-separated (U+002C COMMA, “,”) list that refers to the name(s) of the fields to be returned.
An empty value indicates that no fields should be returned.
Allowed values:
name - The name field.
|
HEADERS
| Key | Datatype | Required | Description |
|---|---|---|---|
Accept | string | ||
Content-Type | string | ||
Api-Key | string |
RESPONSES
status: OK
{"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"}}],"meta":{"total_records":1,"api_version":"2021-12-15"},"links":{"first":"https://api.didww.com/v3/areas?include=country\u0026page%5Bnumber%5D=1\u0026page%5Bsize%5D=1000","last":"https://api.didww.com/v3/areas?include=country\u0026page%5Bnumber%5D=1\u0026page%5Bsize%5D=1000"}}