Learn how to retrieve a full list of available countries via the Expansive API
Understanding which countries are available to you is important. When creating records such as sites it's important that the country is set correctly so your contractors are able to work effectively.
Resource
/v2/countries
Method
GET
Headers
Key | Value |
Authorization | Bearer <TOKEN> (find out more) |
Content-Type | application/vnd.api+json |
Expected Response
200 OK
{
"jsonapi": {
"version": "1.0"
},
"data": [
{
"type": "countries",
"id": "1",
"attributes": {
"name": "United Kingdom"
},
"relationships": {
"Sites": {
"links": {
"related": "http://localhost:8080/api/v2/countries/1/sites",
"self": "http://localhost:8080/api/v2/countries/1/relationships/sites"
}
}
},
"links": {
"self": "http://localhost:8080/api/v2/countries/1"
}
},
{
"type": "countries",
"id": "2",
"attributes": {
"name": "Ireland"
},
"relationships": {
"Sites": {
"links": {
"related": "http://localhost:8080/api/v2/countries/2/sites",
"self": "http://localhost:8080/api/v2/countries/2/relationships/sites"
}
}
},
"links": {
"self": "http://localhost:8080/api/v2/countries/2"
}
}
]
}