Regions

Get a region

GET
/api/v1/regions/{code}

Look up one region by its M49 code, e.g. 155 for Western Europe.

When no region has the code, the response is 204 No Content, with an empty body.

Authorization

apiKey
headerAuthorizationBearer <token>

An API key from the dashboard: a secret key (wk_sk_) from servers, or a publishable key (wk_pk_) from the origins listed on it. A workload can send its token in place of a secret key. See Authentication.

Path Parameters

code*string

The region's M49 code, e.g. 155.

Length1 <= length

Response Body

The region.

application/json
  1. response

An M49 region, with the countries in it.

code*string

Its M49 code, three digits.

name*string

Its English name.

level*string

How broad it is: a region (150 Europe), a sub_region of one (155 Western Europe) or an intermediate_region within a sub-region (005 South America).

Value in"region""sub_region""intermediate_region"
parent?string

The code of the region it is part of. Left out for a region at the broadest level.

countries*array<string>

The ISO 3166-1 alpha-2 codes of the countries in it, at any level.

Example Request
curl -X GET 'https://waykite.com/api/v1/regions/string'
Example Response
{  "code": "155",  "name": "Western Europe",  "level": "sub_region",  "parent": "150",  "countries": [    "AT",    "BE",    "CH",    "DE",    "FR",    "LI",    "LU",    "MC",    "NL"  ]}