# Get Regions

Returns a collection of Regions. [Pagination](../../../specification/pagination.html#api-pagination) is disabled.

## Request

HTTP Method: `GET`

URI Path: `/v3/regions`

Note

For all returned data attributes, see [Region Object](region-object.html).

### URI Query Parameters

| Name | Type | Is Required? | Description |
| --- | --- | --- | --- |
| include | `string` | No | [Inclusion](../../../specification/includes.html#api-includes) |
| filter[<filter\_name>] | `string` | No | [Filtering](../../../specification/filtering.html#api-filters) |
| fields[regions] | `string` | No | [Sparse fieldsets](../../../specification/sparse-fieldsets.html#api-sparse-fieldsets) |
| sort | `string` | No | [Sorting](../../../specification/sorting.html#api-sorting) |

### Includes

| Value | Description |
| --- | --- |
| country | [Country Object](../countries/country-object.html#country-object-v34) |

### Filters

| Filter Name | Type | Allow Blank | Allow Array | Filters by: |
| --- | --- | --- | --- | --- |
| id | `string` | No | Yes | Region `id` field. |
| name | `string` | Yes | Yes | Region `name` field. Case insensitive. |
| country.id | `string` | Yes | Yes | A `country.id` field. |
| iso | `string` | No | Yes | Region `iso` field. |

### Sorting

| Value | Sort by |
| --- | --- |
| name | Region `name` field. |

## Examples

Filter by country.idFilter by country.idInclude Country Resource

[[DIDWW-API-EXAMPLE-START]]

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"
                        }
                      }
                   }
                }
             }
```

[[DIDWW-API-EXAMPLE-END]]

[[DIDWW-API-EXAMPLE-START]]

http

```
GET /v3/regions?filter%5Bcountry.id%5D=3b11ad09-dc7e-451a-9d32-ae9c1604aaa8&sort=-name 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?filter%5Bcountry.id%5D=3b11ad09-dc7e-451a-9d32-ae9c1604aaa8&sort=-name' -H "Accept: application/vnd.api+json" -H "Api-Key: [API Token]" -H "Content-Type: application/vnd.api+json"
```

response

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

{
    "data": {
        "id": "525dab52-0f4b-43cb-b1f6-83ee97a0b5ff",
        "type": "regions",
        "attributes": {
            "name": "Wyoming",
            "iso": "US-WY"
        },
        "relationships": {
            "country": {
                "links": {
                    "self": "https://api.didww.com/v3/regions/525dab52-0f4b-43cb-b1f6-83ee97a0b5ff/relationships/country",
                    "related": "https://api.didww.com/v3/regions/525dab52-0f4b-43cb-b1f6-83ee97a0b5ff/country"
                }
            }
        }
    }
}
```

[[DIDWW-API-EXAMPLE-END]]

[[DIDWW-API-EXAMPLE-START]]

http

```
GET /v3/regions?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

```
curl -i -X GET 'https://api.didww.com/v3/regions?include=country' -H "Accept: application/vnd.api+json" -H "Api-Key: [API Token]" -H "Content-Type: application/vnd.api+json"
```

response

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

{
    "data": {
        "id": "8ce33ee2-73da-4baa-85a0-cd607d0e9733",
        "type": "regions",
        "attributes": {
            "name": "Alberta",
            "iso": "CA-AB"
        },
        "relationships": {
            "country": {
                "links": {
                    "self": "https://api.didww.com/v3/regions/8ce33ee2-73da-4baa-85a0-cd607d0e9733/relationships/country",
                    "related": "https://api.didww.com/v3/regions/8ce33ee2-73da-4baa-85a0-cd607d0e9733/country"
                }
            }
        }
    },
    "included": [
    {
        "id": "fa914558-9c64-4e01-967b-3302bd65a97b",
        "type": "countries",
        "attributes": {
            "name": "Canada",
            "prefix": "1",
            "iso": "CA"
        }
    }
    ]
}
```

[[DIDWW-API-EXAMPLE-END]]

## Other Responses

| Code | Success | Description |
| --- | --- | --- |
| 404 | No | [Not Found](../../../specification/errors/index.html#api-not-found) |
| 401 | No | [Unauthorized](../../../configuration.html#api-key) |

On this page
