Skip to main content
Programmatic equivalent of the dashboard’s products/<gtin>/recipes/ page.

When to use

  • A brand publishes recipes for its products (on its own site, its packaging or a recipe card) and wants them on the product’s Closient page.
  • A recipe changed, or should also appear on another of the brand’s products, or should come off one.

Auth

X-API-Key header or OAuth token. Reading takes membership of the recipe’s organization; writing takes the contribute role (Editor or Manager). A read-only key is refused with 403; a recipe or product another organization owns answers 404, so the API never confirms it exists.

Flow

  • List — the recipes your organizations own, ordered by title and paginated. Filter by gtin (recipes shown on that product), organization_id or difficulty (easy, medium, hard). Each recipe carries its id and the products it is shown on.
  • Create — the body is title, ingredients_list (one ingredient per line), instructions and optionally description, image_url, preparation_time_minutes, cooking_time_minutes, servings (at least 1) and difficulty, plus gtins: the products to show it on, each one your organization owns. Fields are listed in the OpenAPI document at /products/api/v1/openapi.json. A caller in several organizations names one with organization_id. Any GTIN the organization does not own answers 404 and nothing is created.
  • Update — PATCH with only the fields to change. gtins, when present, replaces every product the recipe is shown on, so send the full list: read the recipe first and add or remove one GTIN.
  • Delete — removes the recipe permanently from every product it is shown on. To take it off one product only, PATCH its gtins without that product instead.
  • Read back — every create and update returns the saved recipe; list again to confirm.
Returns 403 for a read-only key, 404 for a recipe or product the caller cannot see, and 422 for an invalid value.

Notes

Copy only recipes the brand itself publishes; never write one, and never adapt one from another site. Before creating a recipe, list the organization’s recipes: one it already has can be shown on another product by adding that product’s GTIN, rather than duplicated. The fields a brand writes on a recipe are defined once on the model (Recipe.BRAND_EDITABLE_FIELDS); both API schemas and the dashboard form are pinned to that set. The dashboard form has no image URL box.