Skip to content

Countries

View as Markdown

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.

PropertyTypeRequiredDescription
idstring-The resource's unique identifier (UUID).
namestring | null-This property supports translations.

The country name.
codestringrequiredThe country ISO 3166-1 alpha-2 two-letter code. For more info, see the documentation
createdAtstring-The date and time when the resource was created (ISO 8601 format).
updatedAtstring-The date and time when the resource was last modified (ISO 8601 format).
  • 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] (with resolveContext[channel] and resolveContext[at]) when reading Variants so each variant’s resolvedPrice reflects that market.
  • Localize names. Read or write the translatable name per locale with the X-Flowkiwi-Locale header.

All requests require an OAuth 2.0 bearer token and the organization scope header:

Authorization: Bearer <token>
X-Flowkiwi-Organization-Id: <organization-id>

For the translatable name, set the active locale (and optionally a fallback):

X-Flowkiwi-Locale: fr-FR
X-Flowkiwi-Locale-Fallback: en-US

PATCH uses JSON Merge Patch with Content-Type: application/merge-patch+json.