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

# Catalog recipes

> Worked catalog fragments for the scenarios real restaurants need — multi-select modifiers, nested choices, lunch and dinner menus with their own prices, seasonal and late-night menus, and happy-hour discounts.

These are copy-and-adapt fragments for common menu scenarios. Each shows only the relevant part of the catalog document — drop it into the full structure from [Publish your catalog](https://docs.maple.inc/developer-api/guides/publish-catalog.md). Every catalog needs at least one menu, and every category and item must be listed by a menu or category. For the model behind them, see [The catalog model](https://docs.maple.inc/developer-api/concepts/the-catalog-model.md).

All prices are integer minor units (`450` = $4.50), and every object carries an `external_id` you own.

## Multi-select: choose up to 3, max 2 different

“Pick your toppings — up to 3 total, but no more than 2 different kinds.” The total count and the distinct count are separate rules:

```json
{
  "external_id": "grp-toppings",
  "name": "Toppings",
  "min_selections": 0,
  "max_selections": 3,
  "max_unique_selections": 2,
  "options": [
    { "external_id": "top-mushroom", "name": "Mushroom", "max_quantity": 3, "price": { "money": { "amount": 150, "currency": "USD" } } },
    { "external_id": "top-pepperoni", "name": "Pepperoni", "max_quantity": 3, "price": { "money": { "amount": 200, "currency": "USD" } } },
    { "external_id": "top-olives", "name": "Olives", "max_quantity": 3, "price": { "money": { "amount": 100, "currency": "USD" } } }
  ]
}
```

- `max_selections: 3` caps the **total** quantity selected.
- `max_unique_selections: 2` caps the number of **distinct** options. A guest can take 2× Mushroom + 1× Olives (3 total, 2 kinds), but not three different toppings.
- `max_quantity: 3` on each option allows doubling or tripling a single topping.

> [!TIP]
>
> Make the first selections free with `free_selection_count`. For example `"free_selection_count": 1` charges only from the second topping onward.

## Nested modifiers

A choice that opens further choices — pick a side, and if it’s the salad, pick a dressing. Options can carry their own modifier groups:

```json
{
  "external_id": "itm-combo",
  "name": "Burger Combo",
  "variations": [{ "external_id": "var-combo", "name": "Regular", "price": { "money": { "amount": 1200, "currency": "USD" } } }],
  "modifier_groups": [
    {
      "external_id": "grp-side",
      "name": "Choose your side",
      "min_selections": 1,
      "max_selections": 1,
      "options": [
        { "external_id": "side-fries", "name": "Fries" },
        {
          "external_id": "side-salad",
          "name": "Side salad",
          "modifier_groups": [
            {
              "external_id": "grp-dressing",
              "name": "Dressing",
              "min_selections": 1,
              "max_selections": 1,
              "options": [
                { "external_id": "drs-ranch", "name": "Ranch" },
                { "external_id": "drs-vinaigrette", "name": "Vinaigrette" }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

Choosing **Side salad** reveals a required **Dressing** choice; choosing **Fries** doesn’t. Nest as deep as the catalog needs.

> [!NOTE]
>
> Order resources currently expose the directly-selected, first-level modifiers on each line item — deeper nested selections aren’t expanded into the order resource yet.

## A lunch and dinner split with different prices

Two menus share one category. The burger costs $13.00 at lunch and $16.00 at dinner. The price on the variation is the base price, and `price.overrides` names the menu where it differs:

```json
{
  "menus": [
    {
      "external_id": "lunch",
      "name": "Lunch",
      "category_ids": ["lunch-specials", "mains"],
      "availability": {
        "windows": [
          { "day_of_week": "monday", "start_time": "11:00", "end_time": "15:00" },
          { "day_of_week": "tuesday", "start_time": "11:00", "end_time": "15:00" },
          { "day_of_week": "wednesday", "start_time": "11:00", "end_time": "15:00" },
          { "day_of_week": "thursday", "start_time": "11:00", "end_time": "15:00" },
          { "day_of_week": "friday", "start_time": "11:00", "end_time": "15:00" }
        ]
      }
    },
    {
      "external_id": "dinner",
      "name": "Dinner",
      "category_ids": ["mains"],
      "availability": {
        "windows": [
          { "day_of_week": "monday", "start_time": "15:00", "end_time": "22:00" },
          { "day_of_week": "tuesday", "start_time": "15:00", "end_time": "22:00" },
          { "day_of_week": "wednesday", "start_time": "15:00", "end_time": "22:00" },
          { "day_of_week": "thursday", "start_time": "15:00", "end_time": "22:00" },
          { "day_of_week": "friday", "start_time": "15:00", "end_time": "22:00" }
        ]
      }
    }
  ],
  "categories": [
    { "external_id": "lunch-specials", "name": "Lunch Specials", "item_ids": ["soup"] },
    { "external_id": "mains", "name": "Mains", "item_ids": ["burger"] }
  ],
  "items": [
    {
      "external_id": "burger",
      "name": "Burger",
      "variations": [
        {
          "external_id": "burger-regular",
          "name": "Regular",
          "price": {
            "money": { "amount": 1300, "currency": "USD" },
            "overrides": [{ "menu_id": "dinner", "money": { "amount": 1600, "currency": "USD" } }]
          }
        }
      ]
    },
    {
      "external_id": "soup",
      "name": "Soup of the Day",
      "variations": [{ "external_id": "soup-bowl", "name": "Bowl", "price": { "money": { "amount": 700, "currency": "USD" } } }]
    }
  ]
}
```

- Windows are half-open, `[start_time, end_time)`. Lunch ends at 15:00 and Dinner starts at 15:00, so at 15:00 only Dinner is open and the burger costs $16.00.
- The soup sits only on Lunch, so a guest cannot order it at dinner. An order line for an item whose menus are all closed is refused, and the error message names the item and when its menus serve.
- If Lunch ran to 15:30, the burger would be open on two menus at two prices, and publish would be refused with `menu_price_overlap`. Give both menus the same price, or end Lunch at 15:00.
- `menu_id` is the menu’s `external_id`. Each menu appears at most once in `overrides`.

## A seasonal menu you switch off

Keep the menu in the document and set `active: false`. Its categories and items stay, with their Maple IDs and stock status:

```json
{
  "menus": [
    { "external_id": "summer", "name": "Summer Specials", "active": false, "category_ids": ["summer"] }
  ],
  "categories": [{ "external_id": "summer", "name": "Summer", "item_ids": ["gazpacho"] }],
  "items": [
    {
      "external_id": "gazpacho",
      "name": "Gazpacho",
      "variations": [{ "external_id": "gazpacho-cup", "name": "Cup", "price": { "money": { "amount": 600, "currency": "USD" } } }]
    }
  ]
}
```

When the season starts, publish again with `active: true` (or leave `active` out, since it defaults to `true`). If you delete the menu and its categories and items instead, Maple loses their IDs and stock status, and a later publish makes them new.

## A late-night menu past midnight

A window whose `end_time` is before its `start_time` runs into the next day. This menu opens at 22:00 on Friday and Saturday and closes at 02:00 the next morning:

```json
{
  "external_id": "late-night",
  "name": "Late Night",
  "category_ids": ["late-bites"],
  "availability": {
    "windows": [
      { "day_of_week": "friday", "start_time": "22:00", "end_time": "02:00" },
      { "day_of_week": "saturday", "start_time": "22:00", "end_time": "02:00" }
    ]
  }
}
```

- The Friday window ends at 02:00 on Saturday. The Saturday window ends at 02:00 on Sunday.
- To run to the end of a day, use `"24:00"` as the `end_time`, for example `22:00` to `24:00`.
- A window with `start_time` equal to `end_time` is refused. For a menu open all day, leave `availability` out.
- Hours read in the location’s own `timezone`, shown on `GET /v1/locations/{id}`. There is no catalog `timezone` field.

## Happy hour: a recurring discount

A recurring discount takes two top-level objects: the discount (how much) and the promotion (when):

```json
{
  "discounts": [
    {
      "external_id": "disc-happy-hour",
      "name": "20% off",
      "benefit_type": "percentage",
      "percentage": 20
    }
  ],
  "promotions": [
    {
      "external_id": "promo-happy-hour",
      "name": "Happy hour",
      "discount_id": "disc-happy-hour",
      "availability": {
        "windows": [
          { "day_of_week": "monday", "start_time": "16:00", "end_time": "18:00" },
          { "day_of_week": "tuesday", "start_time": "16:00", "end_time": "18:00" },
          { "day_of_week": "wednesday", "start_time": "16:00", "end_time": "18:00" },
          { "day_of_week": "thursday", "start_time": "16:00", "end_time": "18:00" },
          { "day_of_week": "friday", "start_time": "16:00", "end_time": "18:00" }
        ]
      }
    }
  ]
}
```

- The **discount** says *how much*: here 20% off. `benefit_type` can also be `amount` (`money` off) or `set_price` (the order costs `money`).
- The **promotion** says *when*. Maple applies it to the whole order with no code, during its `availability` windows. For a one-off campaign, set `valid_from` and `valid_until` instead, as Unix timestamps in seconds. Add `eligibility.minimum_order_subtotal_money` to need a minimum spend.

> [!NOTE]
>
> A promotion discounts the whole order. Maple has no discounts on some items only (product sets, buy-one-get-one) and no coupon codes yet, and refuses them with a `400`. `discount_id` is the `external_id` you gave the discount. The promotion’s `availability` windows read in the location’s time zone, like a menu’s.

## 86 an item

Mark something out of stock with one call, without republishing the catalog. Name each object by its `object_type` (`item`, `variation` or `modifier_option`) and the `external_id` you published it under. Needs `catalog:write`.

```bash
curl https://api.maple.inc/v1/locations/str_123/catalog/stock \
  -H "Authorization: Bearer $MAPLE_API_KEY" \
  -H "Idempotency-Key: 86-latte-2026-11-24-1" \
  -H "Content-Type: application/json" \
  -d '{
    "updates": [
      { "object_type": "item", "external_id": "itm-latte", "stock_status": "out_of_stock" },
      { "object_type": "modifier_option", "external_id": "opt-oat", "stock_status": "low_stock" }
    ]
  }'
```

The response is a list of the objects you changed:

```json
{
  "object": "list",
  "data": [
    {
      "object": "stock_status",
      "livemode": false,
      "id": "item_...",
      "external_id": "itm-latte",
      "object_type": "item",
      "name": "Latte",
      "stock_status": "out_of_stock"
    },
    {
      "object": "stock_status",
      "livemode": false,
      "id": "modopt_...",
      "external_id": "opt-oat",
      "object_type": "modifier_option",
      "name": "Oat",
      "stock_status": "low_stock"
    }
  ],
  "has_more": false
}
```

To bring it back, send `in_stock`. `stock_status` is `in_stock`, `out_of_stock` or `low_stock`.

- **The phone agent sees it at once.** It stops offering an `out_of_stock` item, variation or option, with no republish. `low_stock` does not hide anything. Maple does not refuse an order that names an 86’d object; your POS decides on those.
- **One call changes up to 500 objects, all or nothing.** If any object is not in the published catalog, the call answers `404` `stock_object_not_found`, names each missing one and changes nothing. An object may appear once per call.
- **Read the state with `GET /v1/locations/{locationId}/catalog/stock`.** It lists every item, variation and modifier option, in menu order, 100 to a page (`limit`, `starting_after`). An object you never set reads `in_stock`. Needs `catalog:read`.
- **Setting stock in a publish still works.** `stock_status` on an object in `POST /v1/locations/{locationId}/catalog` sets it; leaving it out keeps the current value.
- **No webhook fires** for a stock change, as none fires for a publish.

## Combine them

These compose. A breakfast menu (availability) can list a category with a build-your-own item (nested modifiers) and a “first topping free” group (`free_selection_count`), all while a happy-hour promotion runs. Publish the whole catalog and Maple applies it as one diff — see [Publish your catalog](https://docs.maple.inc/developer-api/guides/publish-catalog.md).
