> ## 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.

# Expand recipe

> Recursively resolves all subrecipe references in a published recipe, returning a flat list of item and item-tag lines with the effective quantity to consume.

<ParamField header="x-api-key" type="string" required>
  BOH API key with `recipes:read` scope.
</ParamField>

<ParamField path="vendorId" type="string" required>
  Vendor UUID.
</ParamField>

<ParamField path="recipeId" type="string" required>
  Recipe UUID. Must be `PUBLISHED`.
</ParamField>

<ParamField query="service_code" type="string">
  When provided, only lines that match this service code (or have no `service_codes`) are included.
</ParamField>

<ResponseField name="recipe_id" type="string">
  The resolved recipe UUID.
</ResponseField>

<ResponseField name="lines" type="object[]">
  Flat list of resolved ingredient lines. Each line:

  <Expandable title="line fields">
    <ResponseField name="consume_by" type="string">`ITEM` or `ITEM_TAG`.</ResponseField>
    <ResponseField name="item_id" type="string">Item UUID (when `consume_by=ITEM`).</ResponseField>
    <ResponseField name="item_tag_id" type="string">Item tag UUID (when `consume_by=ITEM_TAG`).</ResponseField>
    <ResponseField name="qty_base" type="number">Effective quantity in the base unit.</ResponseField>
    <ResponseField name="base_unit_id" type="string">Base unit UUID.</ResponseField>
    <ResponseField name="source_trace" type="string[]">Path of recipe IDs that contributed this line.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="trace" type="object">
  Tree showing how subrecipes were expanded, with ratios and line counts per node.
</ResponseField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "recipe_id": "rec_01j5k...",
    "lines": [
      {
        "consume_by": "ITEM",
        "item_id": "itm_beef_01...",
        "qty_base": 180,
        "base_unit_id": "unit_g_01...",
        "source_trace": ["rec_01j5k..."]
      }
    ],
    "trace": {
      "recipe_id": "rec_01j5k...",
      "ratio": 1,
      "line_count": 1,
      "children": []
    }
  }
  ```
</ResponseExample>
