APILegacy APIV1 endpoint referenceCountry
/country/{slug}
The legacy file was named [id].ts but read `query.slug`, so under Next.js the path segment was ignored and /api/country/spain was a 404.
The legacy file was named [id].ts but read query.slug, so under Next.js the
path segment was ignored and /api/country/spain was a 404. The path is the
slug here, as /api/v2/countries/{slug} reads it: honouring it was a product
decision (docs/api/v1-v2-parity), and ?slug= is no longer consulted.
Path Parameters
slug*string
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/api/country/string"{ "alpha2": "string", "name": "string", "slug": "string"}