Menus from your till: API reference

Pro

Change prices and sold out on many items at once, by item id or by your till’s code, and publish when you choose.

Setting it up, step by step: Prices and sold out from your till. You need a key that can do Menus.

Find your menus and items

curl https://dqeiiqecdxqguwrilond.supabase.co/functions/v1/api/v1/menus \
  -H "Authorization: Bearer dsk_YOUR_KEY"

GET /menus lists each menu’s id and name. GET /menus/MENU_ID gives one menu with its draft and published content (categories, each with its items: id, name, code, priceCents or prices for categories with sizes), and sold_out: the ids of items sold out now, with when.

Change prices and sold out

curl -X POST https://dqeiiqecdxqguwrilond.supabase.co/functions/v1/api/v1/menus/MENU_ID/items \
  -H "Authorization: Bearer dsk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"items": [
        {"code": "SKU-EB", "price_cents": 2400},
        {"code": "SKU-FW", "prices": [480, 550]},
        {"code": "SKU-T", "sold_out": true}
      ]}'
  • Each line names an item by id or by code (one of the two). A code on several items changes them all.
  • Each line gives price_cents (one price), prices (one per size, for categories with sizes; null for a size it doesn’t come in), and/or sold_out.
  • Up to 400 lines a call. A line that can’t be applied changes nothing, so an item is never half updated.
  • Prices change the draft, which goes to screens when the menu is published. Add "publish": true to send just these prices to screens now (the menu must have been published once). Sold out is always live at once.

The answer, line by line:

{
  "published": false,
  "results": [
    { "code": "SKU-EB", "status": "updated", "items": ["..."] },
    { "code": "NOPE", "status": "not_found",
      "message": "No item on this menu has that code." }
  ]
}

status is updated, not_found or invalid (with a message, such as a single price sent for a category with sizes).

Other calls

  • PUT /menus/MENU_ID/sold-out with {"item_id": "...", "sold_out": true}: one item, live at once.
  • POST /menus/MENU_ID/publish: publish the draft. POST /menus/MENU_ID/discard: throw the draft away.
  • PATCH /menus/MENU_ID: the name, the draft, or when sold out comes back (sold_out_reset: manual, daypart or morning). Send if_updated_at to be told (409 menu_changed) if someone else saved it since you read it.

An item already sold out keeps the time it sold out, so a till sending its whole stock every minute doesn’t stop Sold out comes back working.

Still stuck?

Email support@dislab.app, or send us a message. If it’s about a screen, tell us its name. We answer within one business day.

Contact us