# Product catalogue

A customer's products, described here so agent platforms can read them. Off unless the platform sets `SKERRY_CATALOG=on`; until then each operation answers 409 `capability_off` and the customer's business profile does not list the catalog capabilities.

Two ways out, from one stored form:

- **Agentic Commerce Protocol, snapshot 2026-04-17.** `GET /customers/{id}/acp-feed` gives the customer's active products as the snapshot's feed: `metadata` (its `FeedMetadata`) and `products` (its `Product` list). The customer hands this to the platform. For the snapshot's file form, `metadata` is `metadata.json` and each product is one line of `products.jsonl`. The snapshot also defines a feed API (`/feeds`, `/feeds/{id}/products`); Skerry does not serve it. Source: `spec/2026-04-17/json-schema/schema.feed.json` and `openapi/openapi.feed.yaml` in `github.com/agentic-commerce-protocol/agentic-commerce-protocol`, read 17 Nov 2026.
- **Universal Commerce Protocol 2026-08-25.** Under the customer's UCP address, `POST /catalog/search`, `POST /catalog/lookup` and `POST /catalog/product`, called by a platform the customer lists, signed as the checkout operations are ([ucp.md](ucp.md)). The business profile lists `dev.ucp.shopping.catalog.search` and `dev.ucp.shopping.catalog.lookup`. Source: `docs/specification/shopping/catalog/` and `source/schemas/shopping/` on `release/2026-08-25` of `github.com/Universal-Commerce-Protocol/ucp`, read 17 Nov 2026.

| Operation | Scope | Idempotency-Key | Moves money | What it does |
|---|---|---|---|---|
| `POST /customers/{id}/products` | `catalog:write` | optional | no | Add a product with its variants. |
| `GET /customers/{id}/products` | `catalog:read` | none | no | The customer's products, newest first, with their variants. |
| `GET /customers/{id}/products/{product_id}` | `catalog:read` | none | no | One product. |
| `PUT /customers/{id}/products/{product_id}` | `catalog:write` | optional | no | Replace a product. |
| `DELETE /customers/{id}/products/{product_id}` | `catalog:write` | none | no | Archive a product: platforms no longer find it. |
| `GET /customers/{id}/acp-feed` | `catalog:read` | none | no | The customer's active products as an Agentic Commerce Protocol feed: `metadata` (the snapshot's FeedMetadata) and `products` (its Product list, prices in minor units). |

## A product

| Field | What it holds |
|---|---|
| `title` | Up to 150 characters. |
| `description` | Plain text, up to 5000 characters. Both protocols take it as `{ plain }`. |
| `currency` | ISO 4217, upper case; USD when left out. Every variant's price is in it. |
| `url`, `media`, `categories` | Optional. Media items are `{ type, url, alt_text? }` with `type` `image`, `video` or `model` (UCP calls the last `model_3d`). |
| `variants` | One to 100. |

A variant has `title`, `price` (whole minor units, cents for USD), and optionally `description`, `sku` (unique among the customer's variants), `barcodes` (`{ type, value }`), `list_price`, `availability`, `options` (`{ name, value }`, such as size or colour), `media` and `url`. `availability` is one of `in_stock` (the default), `limited_stock`, `backorder`, `preorder`, `out_of_stock` or `discontinued`; the first four are reported as available.

Replacing a product with `PUT` keeps a variant's id when the variant is sent with it, so a checkout that names it still matches; a variant left out is removed. Archiving with `DELETE` hides the product from platforms and keeps its rows.

## Price and checkout

The price held here is the one shown to platforms. At checkout the customer's pricing callback still sets the price, as both protocols make the checkout the authority. A variant's id is what a UCP platform puts in a line item's `item.id`, and it reaches the pricing callback unchanged.

## UCP catalog, what is answered

- **Search.** `query` matches title, description, a variant's title or sku, ignoring case; `filters.categories` matches any listed category exactly. At least one of the two is needed, or 400 `invalid`. Ten products a page unless `pagination.limit` asks for another number (at most 50); `pagination.has_next_page`, and `cursor` when there is a next page.
- **Lookup.** Up to 50 ids, each a product id, a variant id or a sku; more is 400 `request_too_large`. A product id resolves to its first variant (`match: "featured"`), a variant id or sku to that variant (`"exact"`), and each variant carries the ids that resolved to it in `inputs`. Ids that match nothing come back as `not_found` info messages, with HTTP 200.
- **Product.** One product by its id or a variant's. Unknown is a 200 error response with `not_found`.

The product's own `options` (`product_option.json`: a name and its values, each a `label`) are read off its variants in the order they first appear, so nothing more is stored. Left out: ratings, unit prices, price filters, and the MCP and embedded transports.
