Update a country
Fully updates a country.
name and code are both required. The code must remain unique across all countries.
The translations field is optional. Omitting it or sending {} keeps the existing translations unchanged.
Token credential sent in the Authorization header, in the form: Token <your-token>. Requires a staff (admin) account.
The unique identifier of the country.
The body of a country create or full update request.
Whether the country is active. Defaults to true when omitted on create.
The display name of the country.
The unique country code. Must be unique across all countries.
Translated field values keyed by language code. Example: {"tr": {"name": "Türkiye"}}.
{}The updated country.
A country record.
The unique identifier of the country.
Whether the country is active. Inactive countries are excluded from storefront address lookups.
The display name of the country.
The unique country code (e.g. ISO 3166-1 alpha-2).
A mapping of language codes to translated field values. Example: {"tr": {"name": "Türkiye"}, "en": {"name": "Turkey"}}.
{}The request contains invalid or missing data.
Authentication credentials were not provided or are invalid.
The authenticated user does not have administrator privileges.
The requested country does not exist.
PUT /api/v1/remote/1/countries/{id}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 88
{
"is_active": true,
"name": "Turkey",
"code": "TR",
"translations": {
"tr": {
"name": "Türkiye"
}
}
}{
"pk": 1,
"is_active": true,
"name": "Turkey",
"code": "TR",
"translations": {
"tr": {
"name": "Türkiye"
}
}
}Last updated
Was this helpful?

