---
title: "Add a recipe to a person"
method: POST
path: "/v1/locations/{locationId}/persons/{personId}/recipes"
tags: ["Recipes"]
---

# Add a recipe to a person

`POST /v1/locations/{locationId}/persons/{personId}/recipes`

## Request

- Base URL: `https://api.cliento.com`
- URL: `https://api.cliento.com/v1/locations/{locationId}/persons/{personId}/recipes`
- Auth: HTTP bearer

Adds a recipe to the person. It also shows in the person's log in Cliento, where staff read it. A recipe is not changed afterwards through the API: when the mix is adjusted, add a new recipe. Send an `Idempotency-Key` so that a repeat of the call does not add the recipe twice. Not available at a location that keeps medical records.

## Path parameters

- `locationId` string, required
- `personId` string, required

## Headers

- `Idempotency-Key` string

## Request body

- RecipeCreate: What was mixed for a person at one visit.
  - `appData` object: A JSON object of your own, for what the recipe has no field for. It is stored and returned as it is, and never shown in Cliento. At most 16 kB. A number keeps the precision of a double; send a longer one as a string.
  - `bowls` RecipeBowl[], required: The bowls mixed, 1 to 20, in order.
    - `components` RecipeComponent[], required: What went into the bowl, 1 to 20.
      - `amount` string, required: How much, in `unit`, as a decimal string greater than 0 with at most three decimals.
      - `name` string, required: What it is, as the hairdresser reads it. At most 200 characters.
      - `productId` string: The product the component was taken from, when it is one of the location's.
      - `properties` object: Your own names and values for this component, at most 30. A name is at most 100 characters and a value at most 500.
      - `role` string: What the component is in the mix, as one lower-case word such as `colour` or `developer`. The list is open, so accept a value you do not know.
      - `shade` string: The shade code of a colour. At most 50 characters.
      - `strengthPercent` string: The strength of a developer in per cent, as a decimal string greater than 0 and at most 100, with at most two decimals.
      - `unit` string, required: The unit of `amount`, as the hairdresser reads it. At most 20 characters.
    - `properties` object: Your own names and values for this bowl, with the same limits as a component's `properties`.
    - `ratio` string: Parts of colour to parts of developer.
    - `title` string: What the bowl is for. At most 200 characters.
  - `note` string: Free text. At most 4000 characters.
  - `properties` object: Your own names and values for the whole recipe, with the same limits as a component's `properties`.
  - `staffId` string: The staff member who made the recipe, shown as its author in the person's log. Without it the author is the API key.
  - `stockReference` string: The `externalReference` of the stock document that took the recipe's products out of stock, when you recorded one. At most 100 characters.
  - `title` string: What the recipe is for. At most 200 characters.

## Response `201`

Created

- Recipe: A record of what was mixed for a person at one visit. Belongs to that person.
  - `appData` object: The JSON object of your own that is stored with the recipe, returned as it is.
  - `bowls` RecipeBowl[], required: The bowls mixed, in order.
    - `components` RecipeComponent[], required: What went into the bowl, 1 to 20.
      - `amount` string, required: How much, in `unit`, as a decimal string greater than 0 with at most three decimals.
      - `name` string, required: What it is, as the hairdresser reads it. At most 200 characters.
      - `productId` string: The product the component was taken from, when it is one of the location's.
      - `properties` object: Your own names and values for this component, at most 30. A name is at most 100 characters and a value at most 500.
      - `role` string: What the component is in the mix, as one lower-case word such as `colour` or `developer`. The list is open, so accept a value you do not know.
      - `shade` string: The shade code of a colour. At most 50 characters.
      - `strengthPercent` string: The strength of a developer in per cent, as a decimal string greater than 0 and at most 100, with at most two decimals.
      - `unit` string, required: The unit of `amount`, as the hairdresser reads it. At most 20 characters.
    - `properties` object: Your own names and values for this bowl, with the same limits as a component's `properties`.
    - `ratio` string: Parts of colour to parts of developer.
    - `title` string: What the bowl is for. At most 200 characters.
  - `createdAt` string, date-time, required
  - `id` string, required
  - `note` string
  - `personId` string, required
  - `properties` object
  - `stockReference` string
  - `title` string
  - `updatedAt` string, date-time: When staff last changed the recipe in Cliento. Left out when they never have.

## Other responses

- `default`: Any failure. See the Errors section.

---

[API](https://skmtc.dev/cliento/apis/cliento-api.md) · [All operations](https://skmtc.dev/cliento/apis/cliento-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cliento/apis/cliento-api/revisions/29ca811bc061?raw)
