Menus
Publish your catalog
Send a location’s full catalog as one JSON document keyed by your own stable IDs, then read it back. Publishing is a diff, so re-publishing is safe.
A catalog is the menu you publish for a location: what customers can order. You publish it as one JSON document that describes the whole menu — menus, categories, items, variations, modifiers, and the tax rates and discounts that apply. Maple keys everything off the external IDs you assign: an order line item or modifier carries the external_id you published for that catalog object.
Publishing requires the catalog:write scope and an active connection to the location. Reading needs only the catalog:read scope and a grant for the location. See How Maple works for connections. Connecting makes your app the location’s order receiver, so the restaurant must also have approved orders:read for your app: without that approval, POST /v1/locations/{locationId}/connection answers 403 with code insufficient_scope.
The shape of a catalog
A catalog has three top-level lists, menus, categories and items, that point at each other by external_id, with shared definitions alongside:
catalog├── menus[] (required: at least one — the hours live here)│ └── category_ids[] (ordered, by category external_id)├── categories[] (required)│ └── item_ids[] (ordered, by item external_id)├── items[] (required)│ └── variations[] (required: at least one — the price lives here)│ └── modifier_groups[] (inline, or a reference to a shared group)├── modifier_groups[] (shared definitions, referenced by group_id)├── tax_rates[]└── discounts[] / promotions[]Two rules carry most of the model:
- Every object has an
external_id— your stable handle for it. You choose these; Maple never changes them. Re-publishing with the sameexternal_idupdates the same object. The response also mints Maple IDs (menu_…,ctg_…,item_…,var_…) for reference, but you address objects by yourexternal_id. Every*_idand*_idsfield in the body holds anexternal_id, never a Maple ID. - The price lives on the variation. Even a simple item has at least one variation (call it “Regular”). All prices are integer minor units —
450is $4.50.
A minimal catalog
The smallest valid document is a currency, one menu, one category in that menu, and one item in that category with one variation:
curl -X POST $MAPLE_BASE/locations/{locationId}/catalog \ -H "Authorization: Bearer $MAPLE_KEY" \ -H "Content-Type: application/json" \ -d '{ "currency": "USD", "menus": [ { "external_id": "menu-all-day", "name": "All day", "category_ids": ["cat-drinks"] } ], "categories": [ { "external_id": "cat-drinks", "name": "Drinks", "item_ids": ["itm-latte"] } ], "items": [ { "external_id": "itm-latte", "name": "Latte", "variations": [ { "external_id": "var-latte-reg", "name": "Regular", "price": { "money": { "amount": 450, "currency": "USD" } } } ] } ] }'A menu with no availability is always open. A successful publish returns the resulting catalog, the same body GET returns. See Read it back. Every key in a catalog body is snake_case, in requests and responses.
Menus, hours and prices
Hours go on menus, and only on menus. Here Lunch and Dinner share the Mains category, and the burger costs more at dinner. Lunch runs 11:00 to 15:00 (the example shows two days). Dinner runs on Friday and Saturday evenings, and Saturday’s window ends at 01:00 on Sunday. Summer Specials is switched off:
{ "currency": "USD", "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" } ] } }, { "external_id": "dinner", "name": "Dinner", "category_ids": ["mains"], "availability": { "windows": [ { "day_of_week": "friday", "start_time": "17:00", "end_time": "23:00" }, { "day_of_week": "saturday", "start_time": "17:00", "end_time": "01:00" } ] } }, { "external_id": "summer", "name": "Summer Specials", "active": false, "category_ids": ["summer"] } ], "categories": [ { "external_id": "lunch-specials", "name": "Lunch Specials", "item_ids": ["soup"] }, { "external_id": "mains", "name": "Mains", "item_ids": ["burger"] }, { "external_id": "summer", "name": "Summer", "item_ids": ["gazpacho"] } ], "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" } } }] }, { "external_id": "gazpacho", "name": "Gazpacho", "variations": [{ "external_id": "gazpacho-cup", "name": "Cup", "price": { "money": { "amount": 600, "currency": "USD" } } }] } ]}- A menu’s
activedefaults totrue.active: falseswitches it off without deleting its categories and items. day_of_weekis a day name,mondaytosunday. A window is half-open,[start_time, end_time).24:00is allowed as an end. An end before the start (Saturday 17:00 to 01:00) runs past midnight.- Hours read in the location’s own
timezone, shown onGET /v1/locations/{id}. The catalog has notimezonefield. - The burger sits in Mains, and Mains sits in both Lunch and Dinner. Its price is $13.00, and $16.00 on Dinner. Lunch and Dinner are never open at the same time, so the two prices pass. If they did overlap, publish would be refused with
menu_price_overlap. - A category can sit in several menus, and an item in several categories. It stays one object with one stock status.
See The catalog model for every rule, and the recipes for a late-night menu and a seasonal switch.
Add shared modifiers
Define a modifier group once at the top level and reference it by group_id wherever it applies — so “Milk options” stays in one place across every drink:
{ "currency": "USD", "modifier_groups": [ { "external_id": "grp-milk", "name": "Milk", "min_selections": 0, "max_selections": 1, "options": [ { "external_id": "mod-whole", "name": "Whole milk" }, { "external_id": "mod-oat", "name": "Oat milk", "price": { "money": { "amount": 75, "currency": "USD" } } } ] } ], "menus": [{ "external_id": "menu-all-day", "name": "All day", "category_ids": ["cat-drinks"] }], "categories": [{ "external_id": "cat-drinks", "name": "Drinks", "item_ids": ["itm-latte"] }], "items": [ { "external_id": "itm-latte", "name": "Latte", "variations": [{ "external_id": "var-latte-reg", "name": "Regular", "price": { "money": { "amount": 450, "currency": "USD" } } }], "modifier_groups": [{ "group_id": "grp-milk" }] } ]}A modifier group entry is either an inline definition (carries name and options) or a reference ({ "group_id": "grp-milk" }). Don’t mix the two shapes in one entry — a payload that does is rejected rather than silently truncated. Items, variations, and individual options can each carry modifier groups, which lets you nest options where the menu calls for it.
Publishing semantics
Every publish sends the entire catalog as its desired state. Maple diffs it against the current catalog (keyed by external_id) and applies the result as a new version. A few rules follow from that:
- The document is the whole catalog. Whatever you send becomes the catalog. An object you published before but leave out of a later publish is removed — to keep something, include it every time.
stock_statusis the exception. It’s a field-level value: leaving it off an object you do include preserves that object’s current stock (new objects default toin_stock). So 86-ing an item is still a complete publish that includes every object — you just set one field.- Identity is your
external_id. The sameexternal_idupdates the same object across publishes; a new one creates a new object. Use IDs that are stable in your system (a SKU or primary key), not display names. - Order inside a list is preserved. The order of
category_ids,item_ids, variations, options and modifier group placements is the order you send, and the order guests see. The top-levelmenus,categories,items,modifier_groups,tax_rates,discountsandpromotionslists are not kept in sent order:GETreturns each sorted byexternal_id. - Validation is all-or-nothing. If anything is invalid you get a
400listing every issue, with the first field inerror.param, and the catalog is left exactly as it was. Fix them all and re-send. See Refusals. - Maple stores only what it charges. A field Maple would not use is refused with a
400, not dropped, so what you read back is what you sent, plus Maple’s ids andstock_status. A field you set to its default (method: "percentage",base: "price",inclusion: "exclusive",price_type: "fixed") comes back left out. See What Maple refuses. - Identical re-publishes are no-ops. Sending the same document changes nothing and creates no churn, so you can safely publish on every catalog change.
- Each change is versioned. A content change cuts a new version; the location always serves the current one.
Because the document is the full desired state, the simplest integration re-publishes the entire catalog whenever your source changes. You never compute diffs — Maple does.
Refusals
A refused publish answers 400 with code invalid_catalog. Its message lists every issue, and each menu issue starts with a code in brackets. A publish is refused when:
menusis empty ([menus_required]). A body with nomenuskey fails the body decode instead:invalid_requestwithparam: "menus".- Two menus hold one variation, are open at the same time, and give it different prices (
[menu_price_overlap]). Overlap uses[start, end), so Lunch to 15:00 and Dinner from 15:00 do not collide. A menu with no hours overlaps every menu. - A category sits in no menu (
[orphan_category]), or an item sits in no category ([orphan_item]). - An
availabilityhas an emptywindowslist ([empty_windows]), or a window whosestart_timeequals itsend_time([empty_window]). A day that is not a day name fails the body decode. - A
category_idsoritem_idsentry names anexternal_idthat does not exist. The issue says so, and if the value starts withmenu_,ctg_,item_orvar_it adds a hint to use theexternal_id. - A price override names a menu that does not hold the item, names one menu twice, has a negative amount, or uses a currency other than the catalog’s (
[invalid_price_override]). Overrides also work only on fixed prices, and modifier options take none.
Maple also refuses fields it cannot charge, such as fees, tax categories and coupons, with the field in error.param. See What Maple refuses.
Read it back
curl $MAPLE_BASE/locations/{locationId}/catalog \ -H "Authorization: Bearer $MAPLE_KEY"Returns the current published catalog — menus, categories and items with their prices, shared modifier groups, tax rates, discounts and promotions — every object echoing the external_id you published it under. A catalog Maple imported from a POS can hold what the API cannot state, such as an open price or a coupon; the read leaves those out. A location with no published catalog returns a 404.
The body starts with "object": "catalog", then:
id— the catalog’s Maple ID (ctlg_…). It replacescatalog_id.livemode—truefor a live key,falsefor a test key.location_idandversion_id.updated— when the published content last changed, in Unix seconds.
The response has no timezone. Menus, categories, items, top-level modifier groups, tax rates, discounts and promotions come back sorted by external_id, not in the order you sent them. The order inside category_ids, item_ids, variations, options and modifier group placements stays exactly as you sent it. Every collection is present, empty if you sent none.
Orders and menu hours
An order line’s external_id is the external_id of the variation you published. If every menu that holds the item is closed when the order is placed, or at its scheduled_for time, Maple refuses the order, and the error message names the items and when their menus serve.
Know when a publish lands
Publishing is synchronous: the response to POST /v1/locations/{locationId}/catalog is the result. No webhook follows a publish.