Countries
A Country represents a market your catalog operates in. Each country has a code (the ISO 3166-1 alpha-2 code such as FR or US) and a translatable name. Countries are a reference resource you set up once, then point your offers at.
Countries are one of the dimensions used to resolve prices: a Sale offer or Purchase offer applies to a specific country, and you pass resolveContext[country] when reading a Variant to get the price for that market.
The Country object
Section titled “The Country object”| Property | Type | Required | Description |
|---|---|---|---|
id | string | - | The resource's unique identifier (UUID). |
name | string | null | - | This property supports translations. The country name. |
code | string | required | The country ISO 3166-1 alpha-2 two-letter code. For more info, see the documentation |
createdAt | string | - | The date and time when the resource was created (ISO 8601 format). |
updatedAt | string | - | The date and time when the resource was last modified (ISO 8601 format). |
Common workflows
Section titled “Common workflows”- Set up a market. Create a country with its ISO
code, then attach Sale offers and Purchase offers that apply there. - Resolve country-specific prices. Pass
resolveContext[country](withresolveContext[channel]andresolveContext[at]) when reading Variants so each variant’sresolvedPricereflects that market. - Localize names. Read or write the translatable
nameper locale with theFlowkiwi-Localeheader.
Conventions
Section titled “Conventions”Authentication and headers
Section titled “Authentication and headers”All requests require an OAuth 2.0 bearer token:
Authorization: Bearer <token>For the translatable name, set the active locale:
Flowkiwi-Locale: fr-FRPartial updates
Section titled “Partial updates”PATCH uses JSON Merge Patch with Content-Type: application/merge-patch+json.