> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fluid.app/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> For new direct REST integrations, use the v2026-04 surfaces. The @fluid-app FairShare SDK continues to use its own published public-v2025-06 contract.
> Authenticate with the header Authorization: Bearer <token>; public storefront read endpoints require no auth.
> Lists use cursor pagination via the page[cursor] and page[limit] query params; follow meta.pagination.next_cursor until it is null.
> Never use /api/company/v1 or /api/v1 paths, page/per_page params, or offset pagination — they are legacy.
> The OpenAPI specs under api-reference/ are the authoritative contracts; prefer them over prose when in doubt. api-reference/storefront-v2026-04.yaml covers the v2026-04 storefront surface (/api/v202604/... paths); api-reference/auth-v0.yaml covers the unversioned auth surface (/api/... paths — authentication, MFA, social auth, and token exchange); api-reference/checkout-v2026-04.yaml covers the v2026-04 checkout surface (/api/checkout/v2026-04/... paths — carts, cart auth, discounts, items, subscriptions, orders, enrollments, and store config); api-reference/public-v2025-06.yaml covers the Public SDK surface used by the @fluid-app FairShare SDK, including its parallel cart lifecycle, browser integrations, versioned payment callbacks, unversioned public utilities, and the cart price-override operation; api-reference/payment-v2026-04.yaml covers the v2026-04 payment gateway admin surface (/api/payment/v2026-04/... paths, bearer-authenticated — gateway CRUD, gateway purchase/authorize/$0-verify, transaction list/show and capture/void/credit, and merchant payment configuration); api-reference/payments-v2026-04.yaml covers the v2026-04 cart payment surface (/api/payments/v2026-04/carts/{cart_token}/... paths, authenticated by the cart token in the path with no bearer — payment-method selection, VGS card tokenization, 3D Secure verification, and PayPal/Braintree/Klarna/Apple Pay flows); api-reference/commerce-v2026-04.yaml covers the v2026-04 commerce order-editing surface (/api/v202604/orders/{order_id}/edits paths, bearer-authenticated — post-checkout order edits that atomically insert items and add adjustments/discounts, with an optional dry-run preview); api-reference/webhooks-v0.yaml covers the unversioned webhooks surface (/api/... paths — webhook registration, delivery payloads, callback registrations, company events, and webhook/callback schemas).
> Successful responses wrap the resource payload alongside a top-level integer status and a meta object.

# Control country availability

> Set which countries a category or collection is available in, read a row's country list, and filter the catalog by country.

Every category and collection carries a list of countries it is available in. You set that list when you write the row, read it back on any response, and filter the catalog to a single country when you read it. This guide covers all three, for both categories and collections — they behave identically here.

## How the country list works

On any response, the row's availability is the `countries` field: an array of ISO country codes.

```json theme={null}
{
  "id": 4821,
  "slug": "summer-sale",
  "countries": ["GB", "US"]
}
```

An **empty** `countries` array is not "available nowhere" — it means **unrestricted**: the row is available in every country the company sells in. A non-empty array restricts availability to exactly those countries.

## Set the countries for a row

Availability is written with the `country_isos` field on create and update. It maps to the `countries` field you read back.

```bash theme={null}
curl -X PATCH "https://api.fluid.app/api/v202604/company/categories/4821" \
  -H "Authorization: Bearer <your_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "category": {
      "country_isos": ["GB", "US"]
    }
  }'
```

Two behaviors matter when writing `country_isos`:

* Sending an **empty array** (`"country_isos": []`) clears all restrictions, making the row unrestricted (available everywhere the company sells).
* **Omitting the key entirely** leaves the existing countries unchanged. Because updates use PATCH semantics, this is how you edit other fields without touching availability.

To make a category available everywhere, clear the list:

```bash theme={null}
curl -X PATCH "https://api.fluid.app/api/v202604/company/categories/4821" \
  -H "Authorization: Bearer <your_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "category": {
      "country_isos": []
    }
  }'
```

You can also set `country_isos` at creation time — see [Find and create categories and collections](/api/guides/find-and-create-categories-and-collections).

## Read a row's countries

The `countries` array is present on every category and collection response, so reading a row's availability is just a lookup. Use the company show endpoint to see it for any row regardless of lifecycle:

```bash theme={null}
curl "https://api.fluid.app/api/v202604/company/categories/4821" \
  -H "Authorization: Bearer <your_token>"
```

The public catalog and public slug endpoints also return `countries` on every row they expose. Exposure differs by surface: the public catalog and the category slug expose only live rows, while a collection slug also resolves draft, scheduled, and inactive collections — see [Rename, publish, and schedule](/api/guides/rename-publish-and-schedule).

## Filter the catalog by country

To ask "which categories are available in this country?", pass `filter[country]` with an ISO-2 code. It works on both the public catalog and the company index.

```bash theme={null}
curl "https://acme.fluid.app/api/v202604/categories?filter[country]=GB"
```

`filter[country]` uses "OR-empty" semantics: it returns rows explicitly available in that country **plus** every unrestricted row (rows with an empty country list), since an unrestricted row is available in that country too.

The same filter applies to the company index and to collections:

```bash theme={null}
curl "https://api.fluid.app/api/v202604/company/categories?filter[country]=GB" \
  -H "Authorization: Bearer <your_token>"

curl "https://acme.fluid.app/api/v202604/collections?filter[country]=GB"
```

<Warning>
  For categories and collections, country availability is written with `country_isos` and queried with `filter[country]`. Do **not** use the `country` query parameter for this — `country` is a product-only parameter that selects country-relative pricing, and it does not filter category or collection availability.
</Warning>

## Collections

Collections handle country availability exactly like categories: read `countries`, write `country_isos` (empty array clears, omitted key leaves unchanged), and filter with `filter[country]`. Use `/api/v202604/company/collections/{id}` to write and `/api/v202604/collections` to read the public catalog.

```bash theme={null}
curl -X PATCH "https://api.fluid.app/api/v202604/company/collections/5102" \
  -H "Authorization: Bearer <your_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "collection": {
      "country_isos": ["GB", "US"]
    }
  }'
```

## Next steps

* [Find and create categories and collections](/api/guides/find-and-create-categories-and-collections) — set `country_isos` at creation time.
* [Rename, publish, and schedule](/api/guides/rename-publish-and-schedule) — control the other half of visibility: lifecycle and go-live.
