For the complete documentation index, see llms.txt. This page is also available as Markdown.

Partially update a country

Updates one or more fields of a country. Only the fields included in the request body are changed; everything left out keeps its current value.

When code is included it must remain unique across all countries.

patch
/countries/{id}/
Authorizations
AuthorizationstringRequired

Token credential sent in the Authorization header, in the form: Token <your-token>. Requires a staff (admin) account.

Path parameters
idintegerRequired

The unique identifier of the country.

Body

The body of a country partial update request. Only the fields included are changed.

is_activebooleanOptional

Whether the country is active.

namestring · max: 128Optional

The display name of the country.

codestring · max: 3Optional

The unique country code. Must remain unique across all countries if changed.

translationsobject · nullableOptional

Translated field values keyed by language code.

Responses
200

The updated country.

application/json

A country record.

pkintegerRead-onlyOptional

The unique identifier of the country.

is_activebooleanOptional

Whether the country is active. Inactive countries are excluded from storefront address lookups.

namestring · max: 128Optional

The display name of the country.

codestring · max: 3Optional

The unique country code (e.g. ISO 3166-1 alpha-2).

translationsobject · nullableOptional

A mapping of language codes to translated field values. Example: {"tr": {"name": "Türkiye"}, "en": {"name": "Turkey"}}.

Default: {}
patch/countries/{id}/
PATCH /api/v1/remote/1/countries/{id}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 19

{
  "is_active": false
}
{
  "pk": 1,
  "is_active": true,
  "name": "Turkey",
  "code": "TR",
  "translations": {
    "tr": {
      "name": "Türkiye"
    }
  }
}

Last updated

Was this helpful?