Get Regions#

Description

Returns a collection of Regions. Pagination is disabled.

Request#

HTTP Method: GET

URI Path: /v3/regions

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

Region id field.

name

string

Yes

Yes

Region name field.

country.id

string

Yes

Yes

A country.id field.

Sorting:

Value

Sorts by:

name

Region name field.

Examples#

http

1GET /v3/regions 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/regions -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         "id": "8ce33ee2-73da-4baa-85a0-cd607d0e9733",
 7         "type": "regions",
 8         "attributes": {
 9             "name": "Alberta"
10         },
11         "relationships": {
12             "country": {
13                 "links": {
14                     "self": "https://api.didww.com/v3/regions/8ce33ee2-73da-4baa-85a0-cd607d0e9733/relationships/country",
15                     "related": "https://api.didww.com/v3/regions/8ce33ee2-73da-4baa-85a0-cd607d0e9733/country"
16                 }
17             }
18         }
19     },
20     "meta": {
21         "api_version": "2017-09-18"
22     }
23 }

Other Responses#

Code

Success

Description

404

No

Not Found

401

No

Unauthorized