Get Areas#

Description

Returns a list of areas. Maximum page size is 1000. Default page size is 1000.

Request#

HTTP Method: GET

URI Path: /v3/areas

URI Query Parameters:

Name

Type

Is Required?

Description

filter[<filter_name>]

string

Optional

Filtering

include

string

Optional

Inclusion

sort

string

Optional

Sorting

Includes:

Value

Description

country

Country Object

Filters:

Filter Name

Type

Allow Blank

Allow Array

Filters by:

id

string

No

Yes

Area id field.

name

string

Yes

Yes

Area name field. Case insensitive.

country.id

string

Yes

Yes

A country.id field.

Sorting:

Value

Sorts by:

name

City name field.

Sparse Fieldsets:

Value

Returns:

name

City name attribute.

Examples#

http

1GET /v3/areas 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/areas -H "Accept: application/vnd.api+json" -H "Api-Key: [API Token]" -H "Content-Type: application/vnd.api+json"

response

 1HTTP/2 200 OK
 2Content-Type: application/vnd.api+json
 3
 4{
 5  "data": [
 6    {
 7      "id": "9fcc7390-84a2-47f1-a900-0558cdcb6ce3",
 8      "type": "areas",
 9      "attributes": {
10        "name": "Tuscany"
11      },
12      "relationships": {
13        "country": {
14          "links": {
15            "self": "https://api.didww.com/v3/areas/9fcc7390-84a2-47f1-a900-0558cdcb6ce3/relationships/country",
16            "related": "https://api.didww.com/v3/areas/9fcc7390-84a2-47f1-a900-0558cdcb6ce3/country"
17          }
18        }
19      }
20    }
21  ],
22   "meta": {
23       "total_records": 1,
24       "api_version": "2021-12-15"
25   },
26   "links": {
27       "first": "https://api.didww.com/v3/areas?page%5Bnumber%5D=1&page%5Bsize%5D=1000",
28       "last": "https://api.didww.com/v3/areas?page%5Bnumber%5D=1&page%5Bsize%5D=1000"
29   }
30}

Other Responses#

Code

Success

Description

401

No

Unauthorized