{"openapi":"3.0.3","info":{"title":"Delimenu API","version":"1.0.0","description":"Manage a restaurant menu on Delimenu over HTTP, and read any public menu to render it in a frontend of your own. Prices are major units in the restaurant currency (12500 = COP $12.000; 5.99 = USD $5.99), never cents. Every write is applied to the live menu the moment it succeeds. Human guide: https://delimenu.co/developers. Same content as Markdown for agents: https://delimenu.co/llms.txt.","contact":{"url":"https://delimenu.co/developers"}},"servers":[{"url":"https://delimenu.co/api/v1"}],"tags":[{"name":"Public menu","description":"No key needed. What delimenu.co/{identifier} shows."},{"name":"Restaurants","description":"The restaurants of the account the key belongs to."},{"name":"Categories"},{"name":"Products"},{"name":"Images","description":"Photos, logo and banner from a public https URL (JPG, PNG or WEBP, up to 5 MB)."}],"paths":{"/menus/{identifier}":{"get":{"operationId":"getPublicMenu","tags":["Public menu"],"summary":"Public menu of a restaurant","description":"The categories with at least one visible product, in display order, each with its visible products in display order. Hidden products and empty categories are never included. Cached at the edge and refreshed on every change the owner makes; a differently-cased identifier is redirected to the lowercase one.","security":[],"parameters":[{"name":"identifier","in":"path","required":true,"description":"The slug in the public URL: delimenu.co/{identifier}","schema":{"type":"string"},"example":"pizzeria-roma"}],"responses":{"200":{"description":"The menu","content":{"application/json":{"schema":{"type":"object","properties":{"restaurant":{"type":"object","properties":{"id":{"type":"string"},"identifier":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string","description":"ISO 4217 code every price is in"},"type":{"type":"string","enum":["whatsapp","read_only"],"description":"\"whatsapp\" takes orders by WhatsApp; \"read_only\" only shows the menu"},"phone":{"nullable":true,"description":"WhatsApp number in E.164, when ordering is enabled","type":"string"},"address":{"nullable":true,"type":"string"},"menu_url":{"type":"string"},"logo_url":{"nullable":true,"type":"string"},"banner_url":{"nullable":true,"type":"string"}},"required":["id","identifier","name","currency","type","phone","address","menu_url","logo_url","banner_url"],"additionalProperties":false},"categories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"1-based display position"},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"category_id":{"type":"string"},"name":{"type":"string"},"price":{"type":"number","description":"Major units in the restaurant's currency"},"original_price":{"description":"Present while the product is on promotion","type":"number"},"description":{"type":"string"},"available":{"type":"boolean","description":"false renders \"Sin stock\""},"hidden":{"type":"boolean","description":"true keeps it off the public menu"},"has_image":{"type":"boolean"},"image_url":{"type":"string"},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"min_selections":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_selections":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"0 is no limit"},"max_per_option":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"price":{"type":"number","description":"Extra charge on top of the product price"},"show":{"type":"boolean"}},"required":["id","name","price","show"],"additionalProperties":false}}},"required":["id","name","min_selections","max_selections","options"],"additionalProperties":false}}},"required":["id","category_id","name","price","available","hidden","has_image","variants"],"additionalProperties":false}}},"required":["id","name","position","products"],"additionalProperties":false},"description":"Categories with at least one visible product, in display order"}},"required":["restaurant","categories"],"additionalProperties":false},"example":{"restaurant":{"id":"aR3kX9pLm2QzT7vN4bYc","identifier":"pizzeria-roma","name":"Pizzería Roma","currency":"COP","type":"whatsapp","phone":"+573001234567","address":"Calle 10 # 5-20, Bogotá","menu_url":"https://delimenu.co/pizzeria-roma","logo_url":"https://firebasestorage.googleapis.com/v0/b/example/o/logo_512x512.png?alt=media","banner_url":null},"categories":[{"id":"k3Qm8vXb2LpN7wRt1YaZ","name":"Pizzas","position":1,"products":[{"id":"p9Hs4TqL2mNc8VbX6Rdy","category_id":"k3Qm8vXb2LpN7wRt1YaZ","name":"Pizza Margarita","price":32000,"original_price":38000,"description":"Tomate, mozzarella y albahaca fresca","available":true,"hidden":false,"has_image":true,"image_url":"https://firebasestorage.googleapis.com/v0/b/example/o/margarita_1080x1080.jpg?alt=media","variants":[{"id":"26fed9f6-2e3b-4310-b899-5641bf98e2f0","name":"Tamaño","min_selections":1,"max_selections":1,"options":[{"id":"5c4f8896-06a3-4482-99d1-185a909d0415","name":"Personal","price":0,"show":true},{"id":"b1e0c4d2-7f3a-4c8e-9d21-0a5f6e7b8c9d","name":"Familiar","price":12000,"show":true}]}]}]}]}}}},"403":{"description":"RESTAURANT_UNAVAILABLE — the restaurant exists but has no active plan; only its name is returned","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["RESTAURANT_UNAVAILABLE"]},"message":{"type":"string"},"restaurant":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}},"required":["error","message","restaurant"],"additionalProperties":false}}}},"404":{"description":"NOT_FOUND — no such restaurant in this account, or no such item in it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"500":{"description":"INTERNAL — something failed on our side; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}}}}},"/restaurants":{"get":{"operationId":"listRestaurants","tags":["Restaurants"],"summary":"List the restaurants of the account","description":"Call this first; every other endpoint takes one of these by identifier or id.","security":[{"apiKey":["menu:read"]}],"x-scope":"menu:read","responses":{"200":{"description":"The restaurants, by name","content":{"application/json":{"schema":{"type":"object","properties":{"restaurants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"identifier":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string","description":"ISO 4217 code every price is in"},"type":{"type":"string","enum":["whatsapp","read_only"],"description":"\"whatsapp\" takes orders by WhatsApp; \"read_only\" only shows the menu"},"phone":{"nullable":true,"description":"WhatsApp number in E.164, when ordering is enabled","type":"string"},"address":{"nullable":true,"type":"string"},"menu_url":{"type":"string"},"logo_url":{"nullable":true,"type":"string"},"banner_url":{"nullable":true,"type":"string"},"trial_active":{"type":"boolean"}},"required":["id","identifier","name","currency","type","phone","address","menu_url","logo_url","banner_url","trial_active"],"additionalProperties":false}}},"required":["restaurants"],"additionalProperties":false},"example":{"restaurants":[{"id":"aR3kX9pLm2QzT7vN4bYc","identifier":"pizzeria-roma","name":"Pizzería Roma","currency":"COP","type":"whatsapp","phone":"+573001234567","address":"Calle 10 # 5-20, Bogotá","menu_url":"https://delimenu.co/pizzeria-roma","logo_url":"https://firebasestorage.googleapis.com/v0/b/example/o/logo_512x512.png?alt=media","banner_url":null,"trial_active":false}]}}}},"401":{"description":"UNAUTHORIZED — the key is missing, unknown or revoked","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"402":{"description":"NOT_PREMIUM — the restaurant has no active subscription or trial","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"FORBIDDEN — the key lacks the scope this endpoint needs","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"404":{"description":"NOT_FOUND — no such restaurant in this account, or no such item in it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"500":{"description":"INTERNAL — something failed on our side; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}}}}},"/restaurants/{ref}":{"get":{"operationId":"getRestaurant","tags":["Restaurants"],"summary":"Get a restaurant","security":[{"apiKey":["menu:read"]}],"x-scope":"menu:read","parameters":[{"name":"ref","in":"path","required":true,"description":"The restaurant identifier (the slug in its public URL, e.g. \"pizzeria-roma\") or its id, as returned by GET /restaurants","schema":{"type":"string"},"example":"pizzeria-roma"}],"responses":{"200":{"description":"The restaurant","content":{"application/json":{"schema":{"type":"object","properties":{"restaurant":{"type":"object","properties":{"id":{"type":"string"},"identifier":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string","description":"ISO 4217 code every price is in"},"type":{"type":"string","enum":["whatsapp","read_only"],"description":"\"whatsapp\" takes orders by WhatsApp; \"read_only\" only shows the menu"},"phone":{"nullable":true,"description":"WhatsApp number in E.164, when ordering is enabled","type":"string"},"address":{"nullable":true,"type":"string"},"menu_url":{"type":"string"},"logo_url":{"nullable":true,"type":"string"},"banner_url":{"nullable":true,"type":"string"},"trial_active":{"type":"boolean"}},"required":["id","identifier","name","currency","type","phone","address","menu_url","logo_url","banner_url","trial_active"],"additionalProperties":false}},"required":["restaurant"],"additionalProperties":false},"example":{"restaurant":{"id":"aR3kX9pLm2QzT7vN4bYc","identifier":"pizzeria-roma","name":"Pizzería Roma","currency":"COP","type":"whatsapp","phone":"+573001234567","address":"Calle 10 # 5-20, Bogotá","menu_url":"https://delimenu.co/pizzeria-roma","logo_url":"https://firebasestorage.googleapis.com/v0/b/example/o/logo_512x512.png?alt=media","banner_url":null,"trial_active":false}}}}},"401":{"description":"UNAUTHORIZED — the key is missing, unknown or revoked","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"402":{"description":"NOT_PREMIUM — the restaurant has no active subscription or trial","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"FORBIDDEN — the key lacks the scope this endpoint needs","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"404":{"description":"NOT_FOUND — no such restaurant in this account, or no such item in it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"500":{"description":"INTERNAL — something failed on our side; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}}}},"patch":{"operationId":"updateRestaurant","tags":["Restaurants"],"summary":"Update a restaurant","description":"Changes only the fields given: name, WhatsApp phone, address, currency or type. Changing the currency converts no prices. The identifier has its own endpoint.","security":[{"apiKey":["menu:write"]}],"x-scope":"menu:write","parameters":[{"name":"ref","in":"path","required":true,"description":"The restaurant identifier (the slug in its public URL, e.g. \"pizzeria-roma\") or its id, as returned by GET /restaurants","schema":{"type":"string"},"example":"pizzeria-roma"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50},"phone":{"description":"WhatsApp number that receives orders, in E.164 format (+573001234567)","type":"string","pattern":"^\\+[1-9]\\d{6,14}$"},"address":{"description":"Street address shown on the menu. Empty string removes it.","type":"string","maxLength":65},"currency":{"description":"ISO 4217 code every price is shown in. Changing it converts nothing.","type":"string","pattern":"^[A-Z]{3}$"},"type":{"description":"\"whatsapp\" takes orders by WhatsApp; \"read_only\" only shows the menu","type":"string","enum":["whatsapp","read_only"]}}},"example":{"phone":"+573009876543","address":"Carrera 7 # 45-10, Bogotá"}}}},"responses":{"200":{"description":"The restaurant after the change","content":{"application/json":{"schema":{"type":"object","properties":{"restaurant":{"type":"object","properties":{"id":{"type":"string"},"identifier":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string","description":"ISO 4217 code every price is in"},"type":{"type":"string","enum":["whatsapp","read_only"],"description":"\"whatsapp\" takes orders by WhatsApp; \"read_only\" only shows the menu"},"phone":{"nullable":true,"description":"WhatsApp number in E.164, when ordering is enabled","type":"string"},"address":{"nullable":true,"type":"string"},"menu_url":{"type":"string"},"logo_url":{"nullable":true,"type":"string"},"banner_url":{"nullable":true,"type":"string"},"trial_active":{"type":"boolean"}},"required":["id","identifier","name","currency","type","phone","address","menu_url","logo_url","banner_url","trial_active"],"additionalProperties":false}},"required":["restaurant"],"additionalProperties":false},"example":{"restaurant":{"id":"aR3kX9pLm2QzT7vN4bYc","identifier":"pizzeria-roma","name":"Pizzería Roma","currency":"COP","type":"whatsapp","phone":"+573009876543","address":"Carrera 7 # 45-10, Bogotá","menu_url":"https://delimenu.co/pizzeria-roma","logo_url":"https://firebasestorage.googleapis.com/v0/b/example/o/logo_512x512.png?alt=media","banner_url":null,"trial_active":false}}}}},"400":{"description":"VALIDATION — a field is missing or malformed; `issues` names it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"401":{"description":"UNAUTHORIZED — the key is missing, unknown or revoked","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"402":{"description":"NOT_PREMIUM — the restaurant has no active subscription or trial","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"FORBIDDEN — the key lacks the scope this endpoint needs","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"404":{"description":"NOT_FOUND — no such restaurant in this account, or no such item in it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"500":{"description":"INTERNAL — something failed on our side; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}}}}},"/restaurants/{ref}/identifier":{"put":{"operationId":"updateRestaurantIdentifier","tags":["Restaurants"],"summary":"Change the public URL","description":"Changes the slug of the menu (delimenu.co/{identifier}). The old URL stops working immediately; printed QR codes keep working because they point at the restaurant id.","security":[{"apiKey":["menu:write"]}],"x-scope":"menu:write","parameters":[{"name":"ref","in":"path","required":true,"description":"The restaurant identifier (the slug in its public URL, e.g. \"pizzeria-roma\") or its id, as returned by GET /restaurants","schema":{"type":"string"},"example":"pizzeria-roma"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"identifier":{"type":"string","maxLength":50,"pattern":"^(?![_.-])(?!.*[_.-]{2})[a-z\\d._-]{0,49}[a-z\\d]$","description":"The new public slug: lowercase letters, digits, dots, hyphens and underscores, e.g. \"pizzeria-roma\""}},"required":["identifier"]},"example":{"identifier":"pizzeria-roma-chapinero"}}}},"responses":{"200":{"description":"The restaurant with its new identifier","content":{"application/json":{"schema":{"type":"object","properties":{"restaurant":{"type":"object","properties":{"id":{"type":"string"},"identifier":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string","description":"ISO 4217 code every price is in"},"type":{"type":"string","enum":["whatsapp","read_only"],"description":"\"whatsapp\" takes orders by WhatsApp; \"read_only\" only shows the menu"},"phone":{"nullable":true,"description":"WhatsApp number in E.164, when ordering is enabled","type":"string"},"address":{"nullable":true,"type":"string"},"menu_url":{"type":"string"},"logo_url":{"nullable":true,"type":"string"},"banner_url":{"nullable":true,"type":"string"},"trial_active":{"type":"boolean"}},"required":["id","identifier","name","currency","type","phone","address","menu_url","logo_url","banner_url","trial_active"],"additionalProperties":false}},"required":["restaurant"],"additionalProperties":false},"example":{"restaurant":{"id":"aR3kX9pLm2QzT7vN4bYc","identifier":"pizzeria-roma-chapinero","name":"Pizzería Roma","currency":"COP","type":"whatsapp","phone":"+573001234567","address":"Calle 10 # 5-20, Bogotá","menu_url":"https://delimenu.co/pizzeria-roma-chapinero","logo_url":"https://firebasestorage.googleapis.com/v0/b/example/o/logo_512x512.png?alt=media","banner_url":null,"trial_active":false}}}}},"400":{"description":"VALIDATION — a field is missing or malformed; `issues` names it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"401":{"description":"UNAUTHORIZED — the key is missing, unknown or revoked","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"402":{"description":"NOT_PREMIUM — the restaurant has no active subscription or trial","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"FORBIDDEN — the key lacks the scope this endpoint needs","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"404":{"description":"NOT_FOUND — no such restaurant in this account, or no such item in it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"409":{"description":"CONFLICT — the identifier is already taken","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"500":{"description":"INTERNAL — something failed on our side; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}}}}},"/restaurants/{ref}/images/{kind}":{"put":{"operationId":"setRestaurantImage","tags":["Images"],"summary":"Set the logo or the banner","description":"Downloads the image at a public https URL and sets it as the logo or the banner, replacing the current one. Takes a few seconds while the image is optimised.","security":[{"apiKey":["menu:write"]}],"x-scope":"menu:write","parameters":[{"name":"ref","in":"path","required":true,"description":"The restaurant identifier (the slug in its public URL, e.g. \"pizzeria-roma\") or its id, as returned by GET /restaurants","schema":{"type":"string"},"example":"pizzeria-roma"},{"name":"kind","in":"path","required":true,"description":"\"logo\" is shown at 512×512; \"banner\" is the header image, 1080×1080 max","schema":{"type":"string","enum":["logo","banner"]},"example":"logo"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"image_url":{"type":"string","maxLength":2048,"format":"uri","description":"Public https URL of a JPG, PNG or WEBP image up to 5 MB"}},"required":["image_url"]},"example":{"image_url":"https://example.com/logo.png"}}}},"responses":{"200":{"description":"The restaurant with the new image URL","content":{"application/json":{"schema":{"type":"object","properties":{"restaurant":{"type":"object","properties":{"id":{"type":"string"},"identifier":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string","description":"ISO 4217 code every price is in"},"type":{"type":"string","enum":["whatsapp","read_only"],"description":"\"whatsapp\" takes orders by WhatsApp; \"read_only\" only shows the menu"},"phone":{"nullable":true,"description":"WhatsApp number in E.164, when ordering is enabled","type":"string"},"address":{"nullable":true,"type":"string"},"menu_url":{"type":"string"},"logo_url":{"nullable":true,"type":"string"},"banner_url":{"nullable":true,"type":"string"},"trial_active":{"type":"boolean"}},"required":["id","identifier","name","currency","type","phone","address","menu_url","logo_url","banner_url","trial_active"],"additionalProperties":false}},"required":["restaurant"],"additionalProperties":false},"example":{"restaurant":{"id":"aR3kX9pLm2QzT7vN4bYc","identifier":"pizzeria-roma","name":"Pizzería Roma","currency":"COP","type":"whatsapp","phone":"+573001234567","address":"Calle 10 # 5-20, Bogotá","menu_url":"https://delimenu.co/pizzeria-roma","logo_url":"https://firebasestorage.googleapis.com/v0/b/example/o/logo_512x512.png?alt=media","banner_url":null,"trial_active":false}}}}},"400":{"description":"VALIDATION — a field is missing or malformed; `issues` names it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"401":{"description":"UNAUTHORIZED — the key is missing, unknown or revoked","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"402":{"description":"NOT_PREMIUM — the restaurant has no active subscription or trial","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"FORBIDDEN — the key lacks the scope this endpoint needs","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"404":{"description":"NOT_FOUND — no such restaurant in this account, or no such item in it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"500":{"description":"INTERNAL — something failed on our side; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}}}},"delete":{"operationId":"removeRestaurantImage","tags":["Images"],"summary":"Remove the logo or the banner","security":[{"apiKey":["menu:write"]}],"x-scope":"menu:write","parameters":[{"name":"ref","in":"path","required":true,"description":"The restaurant identifier (the slug in its public URL, e.g. \"pizzeria-roma\") or its id, as returned by GET /restaurants","schema":{"type":"string"},"example":"pizzeria-roma"},{"name":"kind","in":"path","required":true,"description":"\"logo\" is shown at 512×512; \"banner\" is the header image, 1080×1080 max","schema":{"type":"string","enum":["logo","banner"]},"example":"logo"}],"responses":{"200":{"description":"The restaurant without the image","content":{"application/json":{"schema":{"type":"object","properties":{"restaurant":{"type":"object","properties":{"id":{"type":"string"},"identifier":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string","description":"ISO 4217 code every price is in"},"type":{"type":"string","enum":["whatsapp","read_only"],"description":"\"whatsapp\" takes orders by WhatsApp; \"read_only\" only shows the menu"},"phone":{"nullable":true,"description":"WhatsApp number in E.164, when ordering is enabled","type":"string"},"address":{"nullable":true,"type":"string"},"menu_url":{"type":"string"},"logo_url":{"nullable":true,"type":"string"},"banner_url":{"nullable":true,"type":"string"},"trial_active":{"type":"boolean"}},"required":["id","identifier","name","currency","type","phone","address","menu_url","logo_url","banner_url","trial_active"],"additionalProperties":false}},"required":["restaurant"],"additionalProperties":false},"example":{"restaurant":{"id":"aR3kX9pLm2QzT7vN4bYc","identifier":"pizzeria-roma","name":"Pizzería Roma","currency":"COP","type":"whatsapp","phone":"+573001234567","address":"Calle 10 # 5-20, Bogotá","menu_url":"https://delimenu.co/pizzeria-roma","logo_url":null,"banner_url":null,"trial_active":false}}}}},"401":{"description":"UNAUTHORIZED — the key is missing, unknown or revoked","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"402":{"description":"NOT_PREMIUM — the restaurant has no active subscription or trial","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"FORBIDDEN — the key lacks the scope this endpoint needs","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"404":{"description":"NOT_FOUND — no such restaurant in this account, or no such item in it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"500":{"description":"INTERNAL — something failed on our side; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}}}}},"/restaurants/{ref}/menu":{"get":{"operationId":"getMenu","tags":["Restaurants"],"summary":"Get the whole menu","description":"Every category in display order, each with its products in display order, prices, availability and variants. Hidden products are omitted unless include_hidden is true. Uncategorized products are listed apart.","security":[{"apiKey":["menu:read"]}],"x-scope":"menu:read","parameters":[{"name":"ref","in":"path","required":true,"description":"The restaurant identifier (the slug in its public URL, e.g. \"pizzeria-roma\") or its id, as returned by GET /restaurants","schema":{"type":"string"},"example":"pizzeria-roma"},{"name":"include_hidden","in":"query","required":false,"description":"Also return the products hidden from the public menu","schema":{"type":"string"},"example":"true"}],"responses":{"200":{"description":"The menu","content":{"application/json":{"schema":{"type":"object","properties":{"restaurant":{"type":"object","properties":{"id":{"type":"string"},"identifier":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string","description":"ISO 4217 code every price is in"},"type":{"type":"string","enum":["whatsapp","read_only"],"description":"\"whatsapp\" takes orders by WhatsApp; \"read_only\" only shows the menu"},"phone":{"nullable":true,"description":"WhatsApp number in E.164, when ordering is enabled","type":"string"},"address":{"nullable":true,"type":"string"},"menu_url":{"type":"string"},"logo_url":{"nullable":true,"type":"string"},"banner_url":{"nullable":true,"type":"string"},"trial_active":{"type":"boolean"}},"required":["id","identifier","name","currency","type","phone","address","menu_url","logo_url","banner_url","trial_active"],"additionalProperties":false},"categories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"1-based display position"},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"category_id":{"type":"string"},"name":{"type":"string"},"price":{"type":"number","description":"Major units in the restaurant's currency"},"original_price":{"description":"Present while the product is on promotion","type":"number"},"description":{"type":"string"},"available":{"type":"boolean","description":"false renders \"Sin stock\""},"hidden":{"type":"boolean","description":"true keeps it off the public menu"},"has_image":{"type":"boolean"},"image_url":{"type":"string"},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"min_selections":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_selections":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"0 is no limit"},"max_per_option":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"price":{"type":"number","description":"Extra charge on top of the product price"},"show":{"type":"boolean"}},"required":["id","name","price","show"],"additionalProperties":false}}},"required":["id","name","min_selections","max_selections","options"],"additionalProperties":false}}},"required":["id","category_id","name","price","available","hidden","has_image","variants"],"additionalProperties":false}}},"required":["id","name","position","products"],"additionalProperties":false}},"uncategorized_products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"category_id":{"type":"string"},"name":{"type":"string"},"price":{"type":"number","description":"Major units in the restaurant's currency"},"original_price":{"description":"Present while the product is on promotion","type":"number"},"description":{"type":"string"},"available":{"type":"boolean","description":"false renders \"Sin stock\""},"hidden":{"type":"boolean","description":"true keeps it off the public menu"},"has_image":{"type":"boolean"},"image_url":{"type":"string"},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"min_selections":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_selections":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"0 is no limit"},"max_per_option":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"price":{"type":"number","description":"Extra charge on top of the product price"},"show":{"type":"boolean"}},"required":["id","name","price","show"],"additionalProperties":false}}},"required":["id","name","min_selections","max_selections","options"],"additionalProperties":false}}},"required":["id","category_id","name","price","available","hidden","has_image","variants"],"additionalProperties":false}},"hidden_products_omitted":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"note":{"type":"string"}},"required":["restaurant","categories","uncategorized_products","hidden_products_omitted","note"],"additionalProperties":false},"example":{"restaurant":{"id":"aR3kX9pLm2QzT7vN4bYc","identifier":"pizzeria-roma","name":"Pizzería Roma","currency":"COP","type":"whatsapp","phone":"+573001234567","address":"Calle 10 # 5-20, Bogotá","menu_url":"https://delimenu.co/pizzeria-roma","logo_url":"https://firebasestorage.googleapis.com/v0/b/example/o/logo_512x512.png?alt=media","banner_url":null,"trial_active":false},"categories":[{"id":"k3Qm8vXb2LpN7wRt1YaZ","name":"Pizzas","position":1,"products":[{"id":"p9Hs4TqL2mNc8VbX6Rdy","category_id":"k3Qm8vXb2LpN7wRt1YaZ","name":"Pizza Margarita","price":32000,"original_price":38000,"description":"Tomate, mozzarella y albahaca fresca","available":true,"hidden":false,"has_image":true,"image_url":"https://firebasestorage.googleapis.com/v0/b/example/o/margarita_1080x1080.jpg?alt=media","variants":[{"id":"26fed9f6-2e3b-4310-b899-5641bf98e2f0","name":"Tamaño","min_selections":1,"max_selections":1,"options":[{"id":"5c4f8896-06a3-4482-99d1-185a909d0415","name":"Personal","price":0,"show":true},{"id":"b1e0c4d2-7f3a-4c8e-9d21-0a5f6e7b8c9d","name":"Familiar","price":12000,"show":true}]}]}]}],"uncategorized_products":[],"hidden_products_omitted":2,"note":"Prices are in COP, major units."}}}},"400":{"description":"VALIDATION — a field is missing or malformed; `issues` names it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"401":{"description":"UNAUTHORIZED — the key is missing, unknown or revoked","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"402":{"description":"NOT_PREMIUM — the restaurant has no active subscription or trial","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"FORBIDDEN — the key lacks the scope this endpoint needs","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"404":{"description":"NOT_FOUND — no such restaurant in this account, or no such item in it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"500":{"description":"INTERNAL — something failed on our side; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}}}}},"/restaurants/{ref}/categories":{"get":{"operationId":"listCategories","tags":["Categories"],"summary":"List the categories","security":[{"apiKey":["menu:read"]}],"x-scope":"menu:read","parameters":[{"name":"ref","in":"path","required":true,"description":"The restaurant identifier (the slug in its public URL, e.g. \"pizzeria-roma\") or its id, as returned by GET /restaurants","schema":{"type":"string"},"example":"pizzeria-roma"}],"responses":{"200":{"description":"The categories in display order","content":{"application/json":{"schema":{"type":"object","properties":{"categories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","name","position"],"additionalProperties":false}}},"required":["categories"],"additionalProperties":false},"example":{"categories":[{"id":"k3Qm8vXb2LpN7wRt1YaZ","name":"Pizzas","position":1},{"id":"c7Wd2Bn5Kq9Xr4Ms8Lt1","name":"Bebidas","position":2}]}}}},"401":{"description":"UNAUTHORIZED — the key is missing, unknown or revoked","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"402":{"description":"NOT_PREMIUM — the restaurant has no active subscription or trial","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"FORBIDDEN — the key lacks the scope this endpoint needs","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"404":{"description":"NOT_FOUND — no such restaurant in this account, or no such item in it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"500":{"description":"INTERNAL — something failed on our side; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}}}},"post":{"operationId":"createCategory","tags":["Categories"],"summary":"Create a category","description":"Adds a category at the end of the menu.","security":[{"apiKey":["menu:write"]}],"x-scope":"menu:write","parameters":[{"name":"ref","in":"path","required":true,"description":"The restaurant identifier (the slug in its public URL, e.g. \"pizzeria-roma\") or its id, as returned by GET /restaurants","schema":{"type":"string"},"example":"pizzeria-roma"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"description":"Category name"}},"required":["name"]},"example":{"name":"Postres"}}}},"responses":{"201":{"description":"The new category","content":{"application/json":{"schema":{"type":"object","properties":{"category":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["category"],"additionalProperties":false},"example":{"category":{"id":"d4Fg6Hj8Kl0Zx2Cv4Bn6","name":"Postres"}}}}},"400":{"description":"VALIDATION — a field is missing or malformed; `issues` names it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"401":{"description":"UNAUTHORIZED — the key is missing, unknown or revoked","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"402":{"description":"NOT_PREMIUM — the restaurant has no active subscription or trial","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"FORBIDDEN — the key lacks the scope this endpoint needs","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"404":{"description":"NOT_FOUND — no such restaurant in this account, or no such item in it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"409":{"description":"CONFLICT — a category with that name already exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"500":{"description":"INTERNAL — something failed on our side; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}}}}},"/restaurants/{ref}/category-order":{"put":{"operationId":"reorderCategories","tags":["Categories"],"summary":"Reorder the categories","description":"Sets the display order. Pass every category id exactly once, in the new order.","security":[{"apiKey":["menu:write"]}],"x-scope":"menu:write","parameters":[{"name":"ref","in":"path","required":true,"description":"The restaurant identifier (the slug in its public URL, e.g. \"pizzeria-roma\") or its id, as returned by GET /restaurants","schema":{"type":"string"},"example":"pizzeria-roma"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"category_ids":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"description":"Every category id exactly once, in the new display order"}},"required":["category_ids"]},"example":{"category_ids":["c7Wd2Bn5Kq9Xr4Ms8Lt1","k3Qm8vXb2LpN7wRt1YaZ"]}}}},"responses":{"200":{"description":"The new order","content":{"application/json":{"schema":{"type":"object","properties":{"order_categories":{"type":"array","items":{"type":"string"}}},"required":["order_categories"],"additionalProperties":false},"example":{"order_categories":["c7Wd2Bn5Kq9Xr4Ms8Lt1","k3Qm8vXb2LpN7wRt1YaZ"]}}}},"400":{"description":"VALIDATION — a field is missing or malformed; `issues` names it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"401":{"description":"UNAUTHORIZED — the key is missing, unknown or revoked","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"402":{"description":"NOT_PREMIUM — the restaurant has no active subscription or trial","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"FORBIDDEN — the key lacks the scope this endpoint needs","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"404":{"description":"NOT_FOUND — no such restaurant in this account, or no such item in it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"500":{"description":"INTERNAL — something failed on our side; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}}}}},"/restaurants/{ref}/categories/{id}":{"patch":{"operationId":"updateCategory","tags":["Categories"],"summary":"Rename a category","security":[{"apiKey":["menu:write"]}],"x-scope":"menu:write","parameters":[{"name":"ref","in":"path","required":true,"description":"The restaurant identifier (the slug in its public URL, e.g. \"pizzeria-roma\") or its id, as returned by GET /restaurants","schema":{"type":"string"},"example":"pizzeria-roma"},{"name":"id","in":"path","required":true,"description":"The category id, from GET /restaurants/{ref}/categories","schema":{"type":"string"},"example":"k3Qm8vXb2LpN7wRt1YaZ"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"description":"Category name"}},"required":["name"]},"example":{"name":"Pizzas artesanales"}}}},"responses":{"200":{"description":"The renamed category","content":{"application/json":{"schema":{"type":"object","properties":{"category":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["category"],"additionalProperties":false},"example":{"category":{"id":"k3Qm8vXb2LpN7wRt1YaZ","name":"Pizzas artesanales"}}}}},"400":{"description":"VALIDATION — a field is missing or malformed; `issues` names it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"401":{"description":"UNAUTHORIZED — the key is missing, unknown or revoked","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"402":{"description":"NOT_PREMIUM — the restaurant has no active subscription or trial","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"FORBIDDEN — the key lacks the scope this endpoint needs","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"404":{"description":"NOT_FOUND — no such restaurant in this account, or no such item in it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"500":{"description":"INTERNAL — something failed on our side; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}}}},"delete":{"operationId":"deleteCategory","tags":["Categories"],"summary":"Delete a category","description":"Refused with 409 while the category still has products, unless delete_products is true, in which case the products are deleted too.","security":[{"apiKey":["menu:write"]}],"x-scope":"menu:write","parameters":[{"name":"ref","in":"path","required":true,"description":"The restaurant identifier (the slug in its public URL, e.g. \"pizzeria-roma\") or its id, as returned by GET /restaurants","schema":{"type":"string"},"example":"pizzeria-roma"},{"name":"id","in":"path","required":true,"description":"The category id, from GET /restaurants/{ref}/categories","schema":{"type":"string"},"example":"k3Qm8vXb2LpN7wRt1YaZ"},{"name":"delete_products","in":"query","required":false,"description":"Delete the products in the category too. Without it a non-empty category is refused with 409.","schema":{"type":"string"},"example":"true"}],"responses":{"200":{"description":"What was deleted","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"string"},"deleted_products":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["deleted","deleted_products"],"additionalProperties":false},"example":{"deleted":"k3Qm8vXb2LpN7wRt1YaZ","deleted_products":3}}}},"400":{"description":"VALIDATION — a field is missing or malformed; `issues` names it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"401":{"description":"UNAUTHORIZED — the key is missing, unknown or revoked","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"402":{"description":"NOT_PREMIUM — the restaurant has no active subscription or trial","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"FORBIDDEN — the key lacks the scope this endpoint needs","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"404":{"description":"NOT_FOUND — no such restaurant in this account, or no such item in it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"409":{"description":"CONFLICT — the category still has products","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"500":{"description":"INTERNAL — something failed on our side; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}}}}},"/restaurants/{ref}/categories/{id}/product-order":{"put":{"operationId":"reorderProducts","tags":["Categories"],"summary":"Reorder the products of a category","description":"Pass every product id of that category exactly once, in the new order.","security":[{"apiKey":["menu:write"]}],"x-scope":"menu:write","parameters":[{"name":"ref","in":"path","required":true,"description":"The restaurant identifier (the slug in its public URL, e.g. \"pizzeria-roma\") or its id, as returned by GET /restaurants","schema":{"type":"string"},"example":"pizzeria-roma"},{"name":"id","in":"path","required":true,"description":"The category id, from GET /restaurants/{ref}/categories","schema":{"type":"string"},"example":"k3Qm8vXb2LpN7wRt1YaZ"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"product_ids":{"minItems":1,"maxItems":2000,"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"description":"Every product id of the category exactly once, in the new display order"}},"required":["product_ids"]},"example":{"product_ids":["q2Jk5Lm8Np1Qr4St7Uv0","p9Hs4TqL2mNc8VbX6Rdy"]}}}},"responses":{"200":{"description":"The new order","content":{"application/json":{"schema":{"type":"object","properties":{"category_id":{"type":"string"},"order_products":{"type":"array","items":{"type":"string"}}},"required":["category_id","order_products"],"additionalProperties":false},"example":{"category_id":"k3Qm8vXb2LpN7wRt1YaZ","order_products":["q2Jk5Lm8Np1Qr4St7Uv0","p9Hs4TqL2mNc8VbX6Rdy"]}}}},"400":{"description":"VALIDATION — a field is missing or malformed; `issues` names it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"401":{"description":"UNAUTHORIZED — the key is missing, unknown or revoked","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"402":{"description":"NOT_PREMIUM — the restaurant has no active subscription or trial","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"FORBIDDEN — the key lacks the scope this endpoint needs","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"404":{"description":"NOT_FOUND — no such restaurant in this account, or no such item in it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"500":{"description":"INTERNAL — something failed on our side; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}}}}},"/restaurants/{ref}/products":{"get":{"operationId":"listProducts","tags":["Products"],"summary":"List or search the products","description":"Every product, hidden ones included and flagged. With q, only those whose name or description contains the text.","security":[{"apiKey":["menu:read"]}],"x-scope":"menu:read","parameters":[{"name":"ref","in":"path","required":true,"description":"The restaurant identifier (the slug in its public URL, e.g. \"pizzeria-roma\") or its id, as returned by GET /restaurants","schema":{"type":"string"},"example":"pizzeria-roma"},{"name":"q","in":"query","required":false,"description":"Only products whose name or description contains this text (accent- and case-insensitive)","schema":{"type":"string","maxLength":100},"example":"margarita"}],"responses":{"200":{"description":"The products","content":{"application/json":{"schema":{"type":"object","properties":{"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"category_id":{"type":"string"},"name":{"type":"string"},"price":{"type":"number","description":"Major units in the restaurant's currency"},"original_price":{"description":"Present while the product is on promotion","type":"number"},"description":{"type":"string"},"available":{"type":"boolean","description":"false renders \"Sin stock\""},"hidden":{"type":"boolean","description":"true keeps it off the public menu"},"has_image":{"type":"boolean"},"image_url":{"type":"string"},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"min_selections":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_selections":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"0 is no limit"},"max_per_option":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"price":{"type":"number","description":"Extra charge on top of the product price"},"show":{"type":"boolean"}},"required":["id","name","price","show"],"additionalProperties":false}}},"required":["id","name","min_selections","max_selections","options"],"additionalProperties":false}}},"required":["id","category_id","name","price","available","hidden","has_image","variants"],"additionalProperties":false}},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["products","count"],"additionalProperties":false},"example":{"products":[{"id":"p9Hs4TqL2mNc8VbX6Rdy","category_id":"k3Qm8vXb2LpN7wRt1YaZ","name":"Pizza Margarita","price":32000,"original_price":38000,"description":"Tomate, mozzarella y albahaca fresca","available":true,"hidden":false,"has_image":true,"image_url":"https://firebasestorage.googleapis.com/v0/b/example/o/margarita_1080x1080.jpg?alt=media","variants":[{"id":"26fed9f6-2e3b-4310-b899-5641bf98e2f0","name":"Tamaño","min_selections":1,"max_selections":1,"options":[{"id":"5c4f8896-06a3-4482-99d1-185a909d0415","name":"Personal","price":0,"show":true},{"id":"b1e0c4d2-7f3a-4c8e-9d21-0a5f6e7b8c9d","name":"Familiar","price":12000,"show":true}]}]}],"count":1}}}},"400":{"description":"VALIDATION — a field is missing or malformed; `issues` names it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"401":{"description":"UNAUTHORIZED — the key is missing, unknown or revoked","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"402":{"description":"NOT_PREMIUM — the restaurant has no active subscription or trial","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"FORBIDDEN — the key lacks the scope this endpoint needs","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"404":{"description":"NOT_FOUND — no such restaurant in this account, or no such item in it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"500":{"description":"INTERNAL — something failed on our side; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}}}},"post":{"operationId":"createProduct","tags":["Products"],"summary":"Create a product","description":"Adds a product to a category, at the end. Price is in the restaurant's currency, major units. Variants are optional choices (sizes, extras) with their own option prices.","security":[{"apiKey":["menu:write"]}],"x-scope":"menu:write","parameters":[{"name":"ref","in":"path","required":true,"description":"The restaurant identifier (the slug in its public URL, e.g. \"pizzeria-roma\") or its id, as returned by GET /restaurants","schema":{"type":"string"},"example":"pizzeria-roma"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"category_id":{"type":"string","minLength":1,"maxLength":128,"description":"The category the product belongs to (from get_menu)"},"name":{"type":"string","minLength":1,"maxLength":50,"description":"Product name"},"price":{"type":"number","minimum":0,"description":"Price in the restaurant's currency, in major units (12500 for COP $12.000, 5.99 for USD $5.99). Never cents."},"description":{"description":"Optional description. Pass an empty string to remove it.","type":"string","maxLength":3000},"original_price":{"description":"The price before a promotion. Must be greater than price; the menu shows it struck through. Pass null to end the promotion.","nullable":true,"type":"number","minimum":0},"available":{"description":"false shows the product as \"Sin stock\": visible but not orderable. Default true.","type":"boolean"},"hidden":{"description":"true keeps the product off the public menu entirely. Default false.","type":"boolean"},"variants":{"description":"Choices the diner makes (sizes, extras). Replaces the whole list when provided.","maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"description":"Variant name, e.g. \"Tamaño\" or \"Adiciones\""},"min_selections":{"default":0,"description":"Options the diner must pick. 0 makes the variant optional.","type":"integer","minimum":0,"maximum":9007199254740991},"max_selections":{"default":0,"description":"Options the diner may pick. 0 is no limit; 1 renders a single choice.","type":"integer","minimum":0,"maximum":9007199254740991},"max_per_option":{"description":"How many times one option may be repeated. Omit or 0 for no limit.","type":"integer","minimum":0,"maximum":9007199254740991},"options":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"description":"Option name, e.g. \"Grande\""},"price":{"default":0,"description":"Extra charge for this option on top of the product price. 0 when it costs nothing.","type":"number","minimum":0},"show":{"default":true,"description":"false hides the option from diners without deleting it","type":"boolean"}},"required":["name"]}}},"required":["name","options"]}}},"required":["category_id","name","price"]},"example":{"category_id":"k3Qm8vXb2LpN7wRt1YaZ","name":"Pizza Margarita","price":32000,"description":"Tomate, mozzarella y albahaca fresca","variants":[{"name":"Tamaño","min_selections":1,"max_selections":1,"options":[{"name":"Personal","price":0},{"name":"Familiar","price":12000}]}]}}}},"responses":{"201":{"description":"The new product","content":{"application/json":{"schema":{"type":"object","properties":{"product":{"type":"object","properties":{"id":{"type":"string"},"category_id":{"type":"string"},"name":{"type":"string"},"price":{"type":"number","description":"Major units in the restaurant's currency"},"original_price":{"description":"Present while the product is on promotion","type":"number"},"description":{"type":"string"},"available":{"type":"boolean","description":"false renders \"Sin stock\""},"hidden":{"type":"boolean","description":"true keeps it off the public menu"},"has_image":{"type":"boolean"},"image_url":{"type":"string"},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"min_selections":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_selections":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"0 is no limit"},"max_per_option":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"price":{"type":"number","description":"Extra charge on top of the product price"},"show":{"type":"boolean"}},"required":["id","name","price","show"],"additionalProperties":false}}},"required":["id","name","min_selections","max_selections","options"],"additionalProperties":false}}},"required":["id","category_id","name","price","available","hidden","has_image","variants"],"additionalProperties":false}},"required":["product"],"additionalProperties":false},"example":{"product":{"id":"p9Hs4TqL2mNc8VbX6Rdy","category_id":"k3Qm8vXb2LpN7wRt1YaZ","name":"Pizza Margarita","price":32000,"description":"Tomate, mozzarella y albahaca fresca","available":true,"hidden":false,"has_image":true,"image_url":"https://firebasestorage.googleapis.com/v0/b/example/o/margarita_1080x1080.jpg?alt=media","variants":[{"id":"26fed9f6-2e3b-4310-b899-5641bf98e2f0","name":"Tamaño","min_selections":1,"max_selections":1,"options":[{"id":"5c4f8896-06a3-4482-99d1-185a909d0415","name":"Personal","price":0,"show":true},{"id":"b1e0c4d2-7f3a-4c8e-9d21-0a5f6e7b8c9d","name":"Familiar","price":12000,"show":true}]}]}}}}},"400":{"description":"VALIDATION — a field is missing or malformed; `issues` names it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"401":{"description":"UNAUTHORIZED — the key is missing, unknown or revoked","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"402":{"description":"NOT_PREMIUM — the restaurant has no active subscription or trial","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"FORBIDDEN — the key lacks the scope this endpoint needs","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"404":{"description":"NOT_FOUND — no such restaurant in this account, or no such item in it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"500":{"description":"INTERNAL — something failed on our side; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}}}},"patch":{"operationId":"bulkUpdateProducts","tags":["Products"],"summary":"Update many products","description":"Applies a patch to up to 50 products in one write — for \"raise every price 10%\" or \"mark these as out of stock\". Same fields as updating one product.","security":[{"apiKey":["menu:write"]}],"x-scope":"menu:write","parameters":[{"name":"ref","in":"path","required":true,"description":"The restaurant identifier (the slug in its public URL, e.g. \"pizzeria-roma\") or its id, as returned by GET /restaurants","schema":{"type":"string"},"example":"pizzeria-roma"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"updates":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string","minLength":1,"maxLength":128},"changes":{"type":"object","properties":{"category_id":{"description":"Move the product to another category","type":"string","minLength":1,"maxLength":128},"name":{"type":"string","minLength":1,"maxLength":50,"description":"Product name"},"price":{"type":"number","minimum":0,"description":"Price in the restaurant's currency, in major units (12500 for COP $12.000, 5.99 for USD $5.99). Never cents."},"description":{"description":"Optional description. Pass an empty string to remove it.","type":"string","maxLength":3000},"original_price":{"description":"The price before a promotion. Must be greater than price; the menu shows it struck through. Pass null to end the promotion.","nullable":true,"type":"number","minimum":0},"available":{"description":"false shows the product as \"Sin stock\": visible but not orderable. Default true.","type":"boolean"},"hidden":{"description":"true keeps the product off the public menu entirely. Default false.","type":"boolean"},"variants":{"description":"Choices the diner makes (sizes, extras). Replaces the whole list when provided.","maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"description":"Variant name, e.g. \"Tamaño\" or \"Adiciones\""},"min_selections":{"default":0,"description":"Options the diner must pick. 0 makes the variant optional.","type":"integer","minimum":0,"maximum":9007199254740991},"max_selections":{"default":0,"description":"Options the diner may pick. 0 is no limit; 1 renders a single choice.","type":"integer","minimum":0,"maximum":9007199254740991},"max_per_option":{"description":"How many times one option may be repeated. Omit or 0 for no limit.","type":"integer","minimum":0,"maximum":9007199254740991},"options":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"description":"Option name, e.g. \"Grande\""},"price":{"default":0,"description":"Extra charge for this option on top of the product price. 0 when it costs nothing.","type":"number","minimum":0},"show":{"default":true,"description":"false hides the option from diners without deleting it","type":"boolean"}},"required":["name"]}}},"required":["name","options"]}}}}},"required":["product_id","changes"]},"description":"Up to 50 products, each with only the fields to change"}},"required":["updates"]},"example":{"updates":[{"product_id":"p9Hs4TqL2mNc8VbX6Rdy","changes":{"price":35000}},{"product_id":"q2Jk5Lm8Np1Qr4St7Uv0","changes":{"available":false}}]}}}},"responses":{"200":{"description":"How many were updated","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["updated"],"additionalProperties":false},"example":{"updated":2}}}},"400":{"description":"VALIDATION — a field is missing or malformed; `issues` names it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"401":{"description":"UNAUTHORIZED — the key is missing, unknown or revoked","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"402":{"description":"NOT_PREMIUM — the restaurant has no active subscription or trial","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"FORBIDDEN — the key lacks the scope this endpoint needs","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"404":{"description":"NOT_FOUND — no such restaurant in this account, or no such item in it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"500":{"description":"INTERNAL — something failed on our side; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}}}}},"/restaurants/{ref}/products/{id}":{"get":{"operationId":"getProduct","tags":["Products"],"summary":"Get a product","security":[{"apiKey":["menu:read"]}],"x-scope":"menu:read","parameters":[{"name":"ref","in":"path","required":true,"description":"The restaurant identifier (the slug in its public URL, e.g. \"pizzeria-roma\") or its id, as returned by GET /restaurants","schema":{"type":"string"},"example":"pizzeria-roma"},{"name":"id","in":"path","required":true,"description":"The product id, from GET /restaurants/{ref}/products","schema":{"type":"string"},"example":"p9Hs4TqL2mNc8VbX6Rdy"}],"responses":{"200":{"description":"The product","content":{"application/json":{"schema":{"type":"object","properties":{"product":{"type":"object","properties":{"id":{"type":"string"},"category_id":{"type":"string"},"name":{"type":"string"},"price":{"type":"number","description":"Major units in the restaurant's currency"},"original_price":{"description":"Present while the product is on promotion","type":"number"},"description":{"type":"string"},"available":{"type":"boolean","description":"false renders \"Sin stock\""},"hidden":{"type":"boolean","description":"true keeps it off the public menu"},"has_image":{"type":"boolean"},"image_url":{"type":"string"},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"min_selections":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_selections":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"0 is no limit"},"max_per_option":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"price":{"type":"number","description":"Extra charge on top of the product price"},"show":{"type":"boolean"}},"required":["id","name","price","show"],"additionalProperties":false}}},"required":["id","name","min_selections","max_selections","options"],"additionalProperties":false}}},"required":["id","category_id","name","price","available","hidden","has_image","variants"],"additionalProperties":false}},"required":["product"],"additionalProperties":false},"example":{"product":{"id":"p9Hs4TqL2mNc8VbX6Rdy","category_id":"k3Qm8vXb2LpN7wRt1YaZ","name":"Pizza Margarita","price":32000,"original_price":38000,"description":"Tomate, mozzarella y albahaca fresca","available":true,"hidden":false,"has_image":true,"image_url":"https://firebasestorage.googleapis.com/v0/b/example/o/margarita_1080x1080.jpg?alt=media","variants":[{"id":"26fed9f6-2e3b-4310-b899-5641bf98e2f0","name":"Tamaño","min_selections":1,"max_selections":1,"options":[{"id":"5c4f8896-06a3-4482-99d1-185a909d0415","name":"Personal","price":0,"show":true},{"id":"b1e0c4d2-7f3a-4c8e-9d21-0a5f6e7b8c9d","name":"Familiar","price":12000,"show":true}]}]}}}}},"401":{"description":"UNAUTHORIZED — the key is missing, unknown or revoked","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"402":{"description":"NOT_PREMIUM — the restaurant has no active subscription or trial","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"FORBIDDEN — the key lacks the scope this endpoint needs","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"404":{"description":"NOT_FOUND — no such restaurant in this account, or no such item in it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"500":{"description":"INTERNAL — something failed on our side; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}}}},"patch":{"operationId":"updateProduct","tags":["Products"],"summary":"Update a product","description":"Changes only the fields given: name, price, description, original_price (promotion), available, hidden, variants (replaces all) or category_id (moves it). Raising price above an existing original_price ends the promotion.","security":[{"apiKey":["menu:write"]}],"x-scope":"menu:write","parameters":[{"name":"ref","in":"path","required":true,"description":"The restaurant identifier (the slug in its public URL, e.g. \"pizzeria-roma\") or its id, as returned by GET /restaurants","schema":{"type":"string"},"example":"pizzeria-roma"},{"name":"id","in":"path","required":true,"description":"The product id, from GET /restaurants/{ref}/products","schema":{"type":"string"},"example":"p9Hs4TqL2mNc8VbX6Rdy"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"category_id":{"description":"Move the product to another category","type":"string","minLength":1,"maxLength":128},"name":{"type":"string","minLength":1,"maxLength":50,"description":"Product name"},"price":{"type":"number","minimum":0,"description":"Price in the restaurant's currency, in major units (12500 for COP $12.000, 5.99 for USD $5.99). Never cents."},"description":{"description":"Optional description. Pass an empty string to remove it.","type":"string","maxLength":3000},"original_price":{"description":"The price before a promotion. Must be greater than price; the menu shows it struck through. Pass null to end the promotion.","nullable":true,"type":"number","minimum":0},"available":{"description":"false shows the product as \"Sin stock\": visible but not orderable. Default true.","type":"boolean"},"hidden":{"description":"true keeps the product off the public menu entirely. Default false.","type":"boolean"},"variants":{"description":"Choices the diner makes (sizes, extras). Replaces the whole list when provided.","maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"description":"Variant name, e.g. \"Tamaño\" or \"Adiciones\""},"min_selections":{"default":0,"description":"Options the diner must pick. 0 makes the variant optional.","type":"integer","minimum":0,"maximum":9007199254740991},"max_selections":{"default":0,"description":"Options the diner may pick. 0 is no limit; 1 renders a single choice.","type":"integer","minimum":0,"maximum":9007199254740991},"max_per_option":{"description":"How many times one option may be repeated. Omit or 0 for no limit.","type":"integer","minimum":0,"maximum":9007199254740991},"options":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"description":"Option name, e.g. \"Grande\""},"price":{"default":0,"description":"Extra charge for this option on top of the product price. 0 when it costs nothing.","type":"number","minimum":0},"show":{"default":true,"description":"false hides the option from diners without deleting it","type":"boolean"}},"required":["name"]}}},"required":["name","options"]}}}},"example":{"price":30000,"original_price":38000,"available":true}}}},"responses":{"200":{"description":"The product after the change","content":{"application/json":{"schema":{"type":"object","properties":{"product":{"type":"object","properties":{"id":{"type":"string"},"category_id":{"type":"string"},"name":{"type":"string"},"price":{"type":"number","description":"Major units in the restaurant's currency"},"original_price":{"description":"Present while the product is on promotion","type":"number"},"description":{"type":"string"},"available":{"type":"boolean","description":"false renders \"Sin stock\""},"hidden":{"type":"boolean","description":"true keeps it off the public menu"},"has_image":{"type":"boolean"},"image_url":{"type":"string"},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"min_selections":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_selections":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"0 is no limit"},"max_per_option":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"price":{"type":"number","description":"Extra charge on top of the product price"},"show":{"type":"boolean"}},"required":["id","name","price","show"],"additionalProperties":false}}},"required":["id","name","min_selections","max_selections","options"],"additionalProperties":false}}},"required":["id","category_id","name","price","available","hidden","has_image","variants"],"additionalProperties":false}},"required":["product"],"additionalProperties":false},"example":{"product":{"id":"p9Hs4TqL2mNc8VbX6Rdy","category_id":"k3Qm8vXb2LpN7wRt1YaZ","name":"Pizza Margarita","price":30000,"original_price":38000,"description":"Tomate, mozzarella y albahaca fresca","available":true,"hidden":false,"has_image":true,"image_url":"https://firebasestorage.googleapis.com/v0/b/example/o/margarita_1080x1080.jpg?alt=media","variants":[{"id":"26fed9f6-2e3b-4310-b899-5641bf98e2f0","name":"Tamaño","min_selections":1,"max_selections":1,"options":[{"id":"5c4f8896-06a3-4482-99d1-185a909d0415","name":"Personal","price":0,"show":true},{"id":"b1e0c4d2-7f3a-4c8e-9d21-0a5f6e7b8c9d","name":"Familiar","price":12000,"show":true}]}]}}}}},"400":{"description":"VALIDATION — a field is missing or malformed; `issues` names it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"401":{"description":"UNAUTHORIZED — the key is missing, unknown or revoked","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"402":{"description":"NOT_PREMIUM — the restaurant has no active subscription or trial","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"FORBIDDEN — the key lacks the scope this endpoint needs","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"404":{"description":"NOT_FOUND — no such restaurant in this account, or no such item in it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"500":{"description":"INTERNAL — something failed on our side; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}}}},"delete":{"operationId":"deleteProduct","tags":["Products"],"summary":"Delete a product","description":"Permanent, photo included. Prefer hidden: true when the owner may want it back.","security":[{"apiKey":["menu:write"]}],"x-scope":"menu:write","parameters":[{"name":"ref","in":"path","required":true,"description":"The restaurant identifier (the slug in its public URL, e.g. \"pizzeria-roma\") or its id, as returned by GET /restaurants","schema":{"type":"string"},"example":"pizzeria-roma"},{"name":"id","in":"path","required":true,"description":"The product id, from GET /restaurants/{ref}/products","schema":{"type":"string"},"example":"p9Hs4TqL2mNc8VbX6Rdy"}],"responses":{"200":{"description":"The deleted id","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"string"}},"required":["deleted"],"additionalProperties":false},"example":{"deleted":"p9Hs4TqL2mNc8VbX6Rdy"}}}},"401":{"description":"UNAUTHORIZED — the key is missing, unknown or revoked","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"402":{"description":"NOT_PREMIUM — the restaurant has no active subscription or trial","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"FORBIDDEN — the key lacks the scope this endpoint needs","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"404":{"description":"NOT_FOUND — no such restaurant in this account, or no such item in it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"500":{"description":"INTERNAL — something failed on our side; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}}}}},"/restaurants/{ref}/products/{id}/image":{"put":{"operationId":"setProductImage","tags":["Images"],"summary":"Set the product photo","description":"Downloads the image at a public https URL and makes it the product photo, replacing the current one. Takes a few seconds while the image is optimised.","security":[{"apiKey":["menu:write"]}],"x-scope":"menu:write","parameters":[{"name":"ref","in":"path","required":true,"description":"The restaurant identifier (the slug in its public URL, e.g. \"pizzeria-roma\") or its id, as returned by GET /restaurants","schema":{"type":"string"},"example":"pizzeria-roma"},{"name":"id","in":"path","required":true,"description":"The product id, from GET /restaurants/{ref}/products","schema":{"type":"string"},"example":"p9Hs4TqL2mNc8VbX6Rdy"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"image_url":{"type":"string","maxLength":2048,"format":"uri","description":"Public https URL of a JPG, PNG or WEBP image up to 5 MB"}},"required":["image_url"]},"example":{"image_url":"https://example.com/fotos/margarita.jpg"}}}},"responses":{"200":{"description":"The product with the new image URL","content":{"application/json":{"schema":{"type":"object","properties":{"product":{"type":"object","properties":{"id":{"type":"string"},"category_id":{"type":"string"},"name":{"type":"string"},"price":{"type":"number","description":"Major units in the restaurant's currency"},"original_price":{"description":"Present while the product is on promotion","type":"number"},"description":{"type":"string"},"available":{"type":"boolean","description":"false renders \"Sin stock\""},"hidden":{"type":"boolean","description":"true keeps it off the public menu"},"has_image":{"type":"boolean"},"image_url":{"type":"string"},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"min_selections":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_selections":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"0 is no limit"},"max_per_option":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"price":{"type":"number","description":"Extra charge on top of the product price"},"show":{"type":"boolean"}},"required":["id","name","price","show"],"additionalProperties":false}}},"required":["id","name","min_selections","max_selections","options"],"additionalProperties":false}}},"required":["id","category_id","name","price","available","hidden","has_image","variants"],"additionalProperties":false}},"required":["product"],"additionalProperties":false},"example":{"product":{"id":"p9Hs4TqL2mNc8VbX6Rdy","category_id":"k3Qm8vXb2LpN7wRt1YaZ","name":"Pizza Margarita","price":32000,"original_price":38000,"description":"Tomate, mozzarella y albahaca fresca","available":true,"hidden":false,"has_image":true,"image_url":"https://firebasestorage.googleapis.com/v0/b/example/o/margarita_1080x1080.jpg?alt=media","variants":[{"id":"26fed9f6-2e3b-4310-b899-5641bf98e2f0","name":"Tamaño","min_selections":1,"max_selections":1,"options":[{"id":"5c4f8896-06a3-4482-99d1-185a909d0415","name":"Personal","price":0,"show":true},{"id":"b1e0c4d2-7f3a-4c8e-9d21-0a5f6e7b8c9d","name":"Familiar","price":12000,"show":true}]}]}}}}},"400":{"description":"VALIDATION — a field is missing or malformed; `issues` names it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"401":{"description":"UNAUTHORIZED — the key is missing, unknown or revoked","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"402":{"description":"NOT_PREMIUM — the restaurant has no active subscription or trial","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"FORBIDDEN — the key lacks the scope this endpoint needs","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"404":{"description":"NOT_FOUND — no such restaurant in this account, or no such item in it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"500":{"description":"INTERNAL — something failed on our side; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}}}},"delete":{"operationId":"removeProductImage","tags":["Images"],"summary":"Remove the product photo","security":[{"apiKey":["menu:write"]}],"x-scope":"menu:write","parameters":[{"name":"ref","in":"path","required":true,"description":"The restaurant identifier (the slug in its public URL, e.g. \"pizzeria-roma\") or its id, as returned by GET /restaurants","schema":{"type":"string"},"example":"pizzeria-roma"},{"name":"id","in":"path","required":true,"description":"The product id, from GET /restaurants/{ref}/products","schema":{"type":"string"},"example":"p9Hs4TqL2mNc8VbX6Rdy"}],"responses":{"200":{"description":"The product without a photo","content":{"application/json":{"schema":{"type":"object","properties":{"product_id":{"type":"string"},"has_image":{"type":"boolean","enum":[false]}},"required":["product_id","has_image"],"additionalProperties":false},"example":{"product_id":"p9Hs4TqL2mNc8VbX6Rdy","has_image":false}}}},"401":{"description":"UNAUTHORIZED — the key is missing, unknown or revoked","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"402":{"description":"NOT_PREMIUM — the restaurant has no active subscription or trial","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"FORBIDDEN — the key lacks the scope this endpoint needs","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"404":{"description":"NOT_FOUND — no such restaurant in this account, or no such item in it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}},"500":{"description":"INTERNAL — something failed on our side; retry in a moment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"dmk_…","description":"An API key created in the dashboard (Configuración › API para desarrolladores), sent as `Authorization: Bearer dmk_…`. Each key carries the scopes it was created with: menu:read, menu:write."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","NOT_PREMIUM","CONFLICT","LIMIT","INTERNAL"],"description":"Stable code to branch on"},"message":{"type":"string","description":"Spanish text fit to show the restaurant owner"},"issues":{"description":"Only on VALIDATION: the fields that failed","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["error","message"],"additionalProperties":false}}}}