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.

iso

string

No

Yes

Region iso field.

Sorting:

Value

Sorts by:

name

Region name field.

Fielding:

Value

Returns:

name

Region name attribute.

Examples

http

GET /v3/regions HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API Token]

curl

curl -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

HTTP/2 200 OK
Content-Type: application/vnd.api+json

{
     "data":{
             "id": "e2f3f115-11f1-43cf-8279-08b29d94403d",
             "type": "regions",
             "attributes": {
                     "name": "Alberta",
         "iso": "CA-AB"
             },
             "relationships": {
                 "country": {
                     "links": {
                         "self": "https://api.didww.com/v3/regions/e2f3f115-11f1-43cf-8279-08b29d94403d/relationships/country",
                         "related": "https://api.didww.com/v3/regions/8ce33ee2-73da-4baa-85a0-cd607d0e9733/country"
                        }
                      }
                   }
                }
             }

Other Responses

Code

Success

Description

404

No

Not Found

401

No

Unauthorized