Countries API
Look up the countries that Easel recognizes. Country IDs are used for customer
addresses and for a site's allowed shipping countries.
Endpoints
- List Countries -
GET /api/v1/countries/
List Countries
Retrieve the full list of countries. This endpoint is not paginated.
Endpoint: GET /api/v1/countries/
Permission Required: Read
Request
curl -X GET "https://studio.easel.engineering/api/v1/countries/" \
-H "Authorization: Bearer your_api_key_here"
Response
Status: 200 OK
{
"data": [
{
"id": 1,
"iso2": "US",
"name": "United States"
},
{
"id": 2,
"iso2": "CA",
"name": "Canada"
}
]
}
Error Responses
Failed to list countries
Status: 500 Internal Server Error
{
"error": "Internal server error",
"code": "INTERNAL_ERROR"
}
Country Object
Fields
| Field | Type | Description |
|---|---|---|
id |
integer | Country ID, used in address and site requests |
iso2 |
string | Two-letter ISO 3166-1 alpha-2 code |
name |
string | Country name |