Appearance
regions
5 endpoints at a glance
| Method | Path | Summary |
|---|---|---|
GET | /regions/ | List Regions |
POST | /regions/ | Create Region |
DELETE | /regions/{slug}/ | Delete Region |
GET | /regions/{slug}/ | Get Region |
PUT | /regions/{slug}/ | Update Region |
regions
List Regions
GET
/regions/
Public list of every region with full country lists inline.
The dataset is small (<50 rows × ~20 country codes each); no
pagination needed. Same shape as a single GET /regions/{slug}/,
just in an array — the UI's expansion-panel UX can skip the
follow-up detail fetch.
Responses
Successful Response
application/json
JSON { "additionalProperties": "string" }
[
]
Create Region
POST
/regions/
Create a new region. Admin-only.
Validates that every cca2 in countries exists in db.countries
so a typo at create time can't poison the data. Unknown codes
surface as 422 with the offending codes echoed back.
Parameters
Header Parameters
authorization
x-api-key
Request Body
application/json
JSON "slug": "string", "description": "string", "countries": [ "string" ]
{
}
Responses
Successful Response
application/json
JSON "additionalProperties": "string"
{
}
Get Region
Update Region
PUT
/regions/{slug}/
Update an existing region's description + countries. Admin-only.
The slug is immutable (it's the docId flags / comments / anchor
filters key on) so it's path-only and never re-validated here.
422 on unknown cca2 codes; 404 when the slug doesn't exist.
Parameters
Header Parameters
authorization
x-api-key
Path Parameters
slug*
Type
Requiredstring
Request Body
application/json
JSON "description": "string", "countries": [ "string" ]
{
}
Responses
Successful Response
application/json
JSON "additionalProperties": "string"
{
}