Territory¶
A territory is a geographic country/region used in distribution deals and release targeting. Each territory belongs to one or more continents. This resource is read-only.
Lists Territories¶
GET https://domain.com/api/v1/territories
Headers¶
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer \ |
| Content-Type* | String | application/vnd.api+json |
Response — 200 OK
{
"data": [
{
"type": "territories",
"id": "<ID>",
"attributes": {
"name": "Andorra",
"code-alpha-2": "AD"
},
"relationships": {
"continents": {
"links": {
"related": "https://domain.com/api/v1/territories/<ID>/continents",
"self": "https://domain.com/api/v1/territories/<ID>/relationships/continents"
}
}
},
"links": {
"self": "https://domain.com/api/v1/territories/<ID>"
}
}
],
"meta": {
"page": {
"currentPage": 1,
"from": 1,
"lastPage": 12,
"perPage": 20,
"to": 1,
"total": 238
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"first": "https://domain.com/api/v1/territories?page[number]=1&page[size]=20",
"last": "https://domain.com/api/v1/territories?page[number]=12&page[size]=20",
"next": "https://domain.com/api/v1/territories?page[number]=2&page[size]=20"
}
}
Filters¶
| Filter | Example |
|---|---|
| Name | /territories?filter[name]=Andorra |
| ID | /territories?filter[id]=1 |
| Alpha-2 code | /territories?filter[code-alpha-2]=US |
Get Territory¶
GET https://domain.com/api/v1/territories/:id
Path Parameters¶
| Name | Type | Description |
|---|---|---|
| id* | Number | Territory ID |
Headers¶
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer \ |
| Content-Type* | String | application/vnd.api+json |
Response — 200 OK
{
"data": {
"type": "territories",
"id": "<ID>",
"attributes": {
"name": "Andorra",
"code-alpha-2": "AD"
},
"relationships": {
"continents": {
"links": {
"related": "https://domain.com/api/v1/territories/<ID>/continents",
"self": "https://domain.com/api/v1/territories/<ID>/relationships/continents"
}
}
},
"links": {
"self": "https://domain.com/api/v1/territories/<ID>"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "https://domain.com/api/v1/territories/<ID>"
}
}
Response — 404 Not Found