# List regions.

List regions.

Endpoint: GET /regions
Version: 1.0.0
Security: Token

## Query parameters:

  - `filter[type]` (string)
    The type of the region.
    Enum: "COUNTRY", "STATE", "COUNTY"

  - `filter[country_code]` (string)
    The country code of the region.
    Example: "US"

  - `filter[state_code]` (string)
    The state code of the region.
    Example: "CA"

  - `per_page` (string)
    The number of items per page. Defaults to 25.
    Example: "25"

  - `page` (string)
    The requested page. Defaults to 1.
    Example: "2"

## Response 200 fields (application/json):

  - `status` (string)
    What was the state of the request?
    Example: "success"

  - `data` (array,null, required)
    A collection of objects.

  - `data.id` (string, required)
    ID of the entity. UUID Version 4.
    Example: "00000000-0000-4000-8000-000000000000"

  - `data.type` (string, required)
    The type of the region.
    Enum: "COUNTRY", "STATE", "COUNTY"

  - `data.name` (string, required)
    The name of the region.
    Example: "United States"

  - `data.description` (string,null, required)
    The description of the region.
    Example: "The United States of America"

  - `data.slug` (string,null, required)
    The slug of the region.
    Example: "united-states"

  - `data.code` (string, required)
    The code of the region.
    Example: "US"

  - `data.country_code` (string,null, required)
    The country code of the region.
    Example: "US"

  - `data.state_code` (string,null, required)
    The state code of the region.
    Example: "CA"

  - `meta` (object)
    Metadata about a paginated response.

  - `meta.total` (integer, required)
    Total number of records.
    Example: 50

  - `meta.per_page` (integer, required)
    Number of records per page.
    Example: 15

  - `meta.current_page` (integer, required)
    The current page.
    Example: 1

  - `meta.last_page` (integer, required)
    The last page of records.
    Example: 4

  - `meta.from` (integer,null)
    The ID of the first record on this page. This is specified as either integer or null purely for spec testing purposes. The model which is autogenerated from this definition will be thrown out and written by-hand.
    Example: 1

  - `meta.to` (integer,null)
    The ID of the last record on this page. This is specified as either integer or null purely for spec testing purposes. The model which is autogenerated from this definition will be thrown out and written by-hand.
    Example: 15

  - `meta.path` (string, required)
    The current paged path.
    Example: "https://api.aryeo.com/v1/{path}"

  - `meta.links` (array,null)
    Links.

  - `meta.links.url` (string,null, required)
    The URL of the page.
    Example: "https://admin.aryeo.test/api/v1/companies?page=2"

  - `meta.links.label` (string, required)
    The label of the page.
    Example: "2"

  - `meta.links.active` (boolean, required)
    Whether the page is active.
    Example: true

  - `meta.links.page` (integer,null)
    The page number this link points to.
    Example: 2

  - `links` (object)
    Related links for a paginated response.

  - `links.first` (string, required)
    The first page.
    Example: "https://api.aryeo.com/v1/{path}?page=1"

  - `links.last` (string, required)
    The last page.
    Example: "https://api.aryeo.com/v1/{path}?page=10"

  - `links.prev` (string,null)
    The previous page. This is specified as either string or null purely for spec testing purposes. The model which is autogenerated from this definition will be thrown out and written by-hand.
    Example: "https://api.aryeo.com/v1/{path}?page=2"

  - `links.next` (string,null)
    The next page. This is specified as either string or null purely for spec testing purposes. The model which is autogenerated from this definition will be thrown out and written by-hand.
    Example: "https://api.aryeo.com/v1/{path}?page=3"

  - `timestamp` (string,null)
    The request timestamp (ISO 8601).
    Example: "2021-06-30T20:30:00Z"

## Response 404 fields (application/json):

  - `status` (string, required)
    What was the state of the request?
    Example: "error"

  - `message` (string, required)
    The error message.
    Example: "{ApiError message.}"

  - `code` (integer,null)
    A numeric code corresponding to the error.
    Example: 404

## Response 422 fields (application/json):

  - `status` (string, required)
    What was the state of the request?
    Example: "fail"

## Response 500 fields (application/json):

  - `status` (string, required)
    What was the state of the request?
    Example: "error"

  - `message` (string, required)
    The error message.
    Example: "{ApiError message.}"

  - `code` (integer,null)
    A numeric code corresponding to the error.
    Example: 500


