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

# Criar receita (rascunho)

> Cria uma nova receita em estado DRAFT. Rascunhos não afetam os níveis de estoque. Publique quando estiver pronto.

<ParamField header="x-api-key" type="string" required>
  API key do BOH com escopo `recipes:write`.
</ParamField>

<ParamField path="vendorId" type="string" required>UUID do vendor.</ParamField>
<ParamField body="name" type="string" required>Nome da receita.</ParamField>
<ParamField body="yield_quantity" type="number" required>Quantidade produzida por esta receita.</ParamField>
<ParamField body="yield_unit_id" type="string" required>UUID da unidade da quantidade produzida.</ParamField>
<ParamField body="product_id" type="string">UUID do produto do cardápio vinculado.</ParamField>
<ParamField body="external_product_id" type="string">ID externo do produto do cardápio.</ParamField>

<ParamField body="ingredients" type="object[]">
  <Expandable title="campos do ingrediente">
    <ParamField body="item_id" type="string">UUID do item.</ParamField>
    <ParamField body="external_item_id" type="string">ID externo do item.</ParamField>
    <ParamField body="quantity" type="number" required>Quantidade do ingrediente.</ParamField>
    <ParamField body="unit_id" type="string" required>UUID da unidade.</ParamField>
    <ParamField body="waste_factor" type="number">Fator de perda (0–1, padrão 0).</ParamField>
    <ParamField body="notes" type="string">Notas de preparo.</ParamField>
  </Expandable>
</ParamField>

<ParamField body="external_user_id" type="string">Ator para auditoria.</ParamField>

<RequestExample>
  ```json theme={null}
  {
    "name": "Molho de Tomate",
    "yield_quantity": 1,
    "yield_unit_id": "unit_lt_01...",
    "ingredients": [
      {
        "external_item_id": "tomate",
        "quantity": 0.8,
        "unit_id": "unit_kg_01..."
      }
    ]
  }
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "id": "rec_01...",
    "name": "Molho de Tomate",
    "status": "DRAFT"
  }
  ```
</ResponseExample>
