{"openapi":"3.1.0","info":{"title":"Stampede API","version":"2.0.0","description":"Every call runs inside the organisation the token belongs to. Money is in minor units. Lists page with `limit` and `cursor`. Errors are a list under `errors`, each with a stable `code`."},"servers":[{"url":"https://global.stampede.ai/v2"}],"tags":[{"name":"Organisation"},{"name":"Venues"},{"name":"Guests"},{"name":"Marketing consent"},{"name":"Bookings"},{"name":"Booking setup"},{"name":"Blocks"},{"name":"Ticketed events"},{"name":"Tickets"},{"name":"Enquiries"},{"name":"WiFi"},{"name":"Inbox"},{"name":"Gift cards"},{"name":"Voice AI"},{"name":"Email templates"},{"name":"Audiences"},{"name":"Email campaigns"},{"name":"Forms"},{"name":"Brand kits"},{"name":"Reviews"},{"name":"Images"},{"name":"Loyalty"},{"name":"Ordering"},{"name":"Orders"},{"name":"Workflows"},{"name":"Webhooks"},{"name":"Reports"}],"paths":{"/organisation":{"get":{"operationId":"organisation.get","tags":["Organisation"],"summary":"Get the organisation this token belongs to","security":[{"oauth2":["organisation:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"website":{"type":["string","null"]},"created_at":{"type":["string","null"]}},"required":["id","name","website","created_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues":{"get":{"operationId":"venues.list","tags":["Venues"],"summary":"List venues","security":[{"oauth2":["venues:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `cursor` from the previous page.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The Stampede venue ID."},"name":{"type":"string"},"address":{"anyOf":[{"type":"object","properties":{"formatted":{"type":["string","null"]},"postcode":{"type":["string","null"]},"town":{"type":["string","null"]},"country":{"type":["string","null"]},"latitude":{"type":["number","null"]},"longitude":{"type":["number","null"]}},"required":["formatted","postcode","town","country","latitude","longitude"],"additionalProperties":false},{"type":"null"}]}},"required":["id","name","address"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}":{"get":{"operationId":"venues.get","tags":["Venues"],"summary":"Get a venue","description":"`venue_id` is a Stampede venue ID, or your own ID for the venue if a venue mapping is set up.","security":[{"oauth2":["venues:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"The Stampede venue ID."},"name":{"type":"string"},"address":{"anyOf":[{"type":"object","properties":{"formatted":{"type":["string","null"]},"postcode":{"type":["string","null"]},"town":{"type":["string","null"]},"country":{"type":["string","null"]},"latitude":{"type":["number","null"]},"longitude":{"type":["number","null"]}},"required":["formatted","postcode","town","country","latitude","longitude"],"additionalProperties":false},{"type":"null"}]}},"required":["id","name","address"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/guests/search":{"post":{"operationId":"guests.search","tags":["Guests"],"summary":"Search guests","description":"With no `query`, lists guests by most recent activity. `query` matches an exact email, a phone number (starting with + or 0), or the start of a first or last name.","security":[{"oauth2":["guests:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":255},"tag_id":{"description":"Only guests with this tag.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"venue_id":{"description":"Only guests who signed up at this venue.","type":"string","minLength":1,"maxLength":64},"limit":{"default":25,"description":"How many to return, 1 to 100.","type":"integer","minimum":1,"maximum":100},"cursor":{"description":"The `cursor` from the previous page.","type":"string","minLength":1}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"phone":{"type":["string","null"]},"gender":{"type":["string","null"]},"birth_month":{"type":["number","null"]},"birth_day":{"type":["number","null"]},"postcode":{"type":["string","null"]},"country":{"type":["string","null"]},"consent":{"type":"object","properties":{"data":{"type":"boolean","description":"The guest agreed to their data being stored."},"email_marketing":{"type":"boolean"},"sms_marketing":{"type":"boolean"}},"required":["data","email_marketing","sms_marketing"],"additionalProperties":false},"created_at":{"type":["string","null"]},"last_interacted_at":{"type":["string","null"]}},"required":["id","email","first_name","last_name","phone","gender","birth_month","birth_day","postcode","country","consent","created_at","last_interacted_at"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/guests/{guest_id}":{"get":{"operationId":"guests.get","tags":["Guests"],"summary":"Get a guest","description":"A guest's details, consent, when they were last seen (`last_interacted_at`) and what they have spent (`spend`). Their tags are `guests.tags.list`, their transactions `guests.transactions.list`.","security":[{"oauth2":["guests:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"guest_id","in":"path","required":true,"description":"The guest ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"phone":{"type":["string","null"]},"gender":{"type":["string","null"]},"birth_month":{"type":["number","null"]},"birth_day":{"type":["number","null"]},"postcode":{"type":["string","null"]},"country":{"type":["string","null"]},"consent":{"type":"object","properties":{"data":{"type":"boolean","description":"The guest agreed to their data being stored."},"email_marketing":{"type":"boolean"},"sms_marketing":{"type":"boolean"}},"required":["data","email_marketing","sms_marketing"],"additionalProperties":false},"created_at":{"type":["string","null"]},"last_interacted_at":{"type":["string","null"]},"spend":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"total":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Everything their transactions came to in this currency, as the guest profile in Stampede shows it."},"transactions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many transactions."},"first_at":{"description":"The first one, an ISO 8601 instant.","type":["string","null"]},"last_at":{"description":"The latest one, an ISO 8601 instant.","type":["string","null"]}},"required":["total","transactions","first_at","last_at"],"additionalProperties":false}},{"type":"null"}],"description":"What the guest has spent with the organisation, one entry for each currency, largest first: their transactions (`guests.transactions.list`) added up. Empty when they have spent nothing. Null when Stampede could not say. Never add up amounts in different currencies."}},"required":["id","email","first_name","last_name","phone","gender","birth_month","birth_day","postcode","country","consent","created_at","last_interacted_at","spend"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/guests":{"post":{"operationId":"guests.create","tags":["Guests"],"summary":"Add a guest, or find the one with that email","description":"Adds a guest to your organisation, as staff do in Stampede. Guests are unique by email within an organisation: if one already has this email, that guest is returned (`created` false) and only details they do not have yet are filled in. The guest's details come back with `guests:read`. A name, phone or birthday they already have is never changed. Marketing consent is never set here: a new guest is not opted in to anything, and an existing guest's consent is left as it is. Consent must come from the guest themselves (a Stampede form, WiFi sign-in or their own account); `guests.consent.opt_out` records a guest asking to stop.","security":[{"oauth2":["guests:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":255,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"first_name":{"type":"string","minLength":1,"maxLength":255},"last_name":{"type":"string","minLength":1,"maxLength":255},"phone":{"description":"E.164 (+447700900123) or a UK national number.","type":"string","maxLength":32},"gender":{"type":"string","enum":["m","f","o"]},"birth_month":{"type":"integer","minimum":1,"maximum":12},"birth_day":{"type":"integer","minimum":1,"maximum":31},"consent":{"description":"Not accepted. Consent comes from the guest (a Stampede form, WiFi sign-in or their own account), never from this call.","not":{}}},"required":["email"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"The guest ID."},"created":{"type":"boolean","description":"True when the guest was added; false when the organisation already had a guest with this email."},"guest":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"email":{"type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"phone":{"type":["string","null"]},"gender":{"type":["string","null"]},"birth_month":{"type":["number","null"]},"birth_day":{"type":["number","null"]},"postcode":{"type":["string","null"]},"country":{"type":["string","null"]},"consent":{"type":"object","properties":{"data":{"type":"boolean","description":"The guest agreed to their data being stored."},"email_marketing":{"type":"boolean"},"sms_marketing":{"type":"boolean"}},"required":["data","email_marketing","sms_marketing"],"additionalProperties":false},"created_at":{"type":["string","null"]},"last_interacted_at":{"type":["string","null"]}},"required":["id","email","first_name","last_name","phone","gender","birth_month","birth_day","postcode","country","consent","created_at","last_interacted_at"],"additionalProperties":false},{"type":"null"}],"description":"The guest as `guests.get` shows them, with their consent. Null without `guests:read`: an email alone must not show who a guest is."}},"required":["id","created","guest"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/guests/{guest_id}/tags":{"get":{"operationId":"guests.tags.list","tags":["Guests"],"summary":"List a guest's tags","security":[{"oauth2":["guests:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"guest_id","in":"path","required":true,"description":"The guest ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `cursor` from the previous page.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"guests.tags.add","tags":["Guests"],"summary":"Tag a guest","description":"Adds a tag by name. The tag is created if the organisation does not have it yet.","security":[{"oauth2":["guests:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"guest_id","in":"path","required":true,"description":"The guest ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255}},"required":["name"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/guests/tags/add-many":{"post":{"operationId":"guests.tags.add_many","tags":["Guests"],"summary":"Tag many guests at once","description":"Tags up to 500 guests, by `guest_ids` (such as each booking's `guest_id` from `bookings.list`) or `emails`, or both, with the tag named. The tag is created if the organisation does not have it yet. Send `dry_run: true` first: nothing changes, and the answer says how many guests were found, a sample, which IDs and emails matched no guest, and whether the tag is new. Tell the person, then send it again without `dry_run`. A guest who has the tag already keeps it, so sending the same call again is safe. Use `tag.id` in an audience rule (`tags.has_any`) to send them a campaign. Emails need guests:read too, as they say who is a guest.","security":[{"oauth2":["guests:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"description":"The tag, by name. Created if new."},"guest_ids":{"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"The guest ID."}},"emails":{"maxItems":500,"type":"array","items":{"type":"string","maxLength":255,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"dry_run":{"default":false,"description":"Only say who would be tagged.","type":"boolean"}},"required":["name"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"dry_run":{"type":"boolean"},"tag":{"type":"object","properties":{"id":{"description":"For an audience rule (`tags.has_any`). Null on a dry run when the tag is still to be created.","type":["string","null"]},"name":{"type":"string"},"created":{"type":"boolean","description":"The organisation did not have the tag: it was (or, on a dry run, would be) created."}},"required":["id","name","created"],"additionalProperties":false},"guests":{"type":"number","description":"Guests found, each counted once, that are (or would be) tagged."},"tagged":{"type":"number","description":"Guests tagged by this call: 0 on a dry run. A guest who had the tag already is counted."},"sample":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]}},"required":["id","first_name","last_name"],"additionalProperties":false},"description":"Up to 10 of the guests, to check with the person. Names need guests:read."},"not_found":{"type":"object","properties":{"guest_ids":{"type":"array","items":{"type":"string"},"description":"IDs that are not a guest of the organisation."},"emails":{"type":"array","items":{"type":"string"},"description":"Emails no guest of the organisation has."}},"required":["guest_ids","emails"],"additionalProperties":false}},"required":["dry_run","tag","guests","tagged","sample","not_found"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/guests/{guest_id}/tags/remove":{"post":{"operationId":"guests.tags.remove","tags":["Guests"],"summary":"Remove a tag from a guest","security":[{"oauth2":["guests:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"guest_id","in":"path","required":true,"description":"The guest ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255}},"required":["name"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"removed":{"type":"boolean","description":"False if the guest did not have the tag."}},"required":["removed"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/tags":{"get":{"operationId":"tags.list","tags":["Guests"],"summary":"List the organisation's tags","security":[{"oauth2":["guests:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/guests/{guest_id}/consent":{"get":{"operationId":"guests.consent.get","tags":["Marketing consent"],"summary":"Get a guest's marketing consent","description":"Whether the guest can be sent marketing emails now and why not, when they opted in, and their SMS and data consent (read only). Consent is per organisation, not per venue. Stampede does not keep, where it can be read here, how a guest opted in or when and how they opted out; a hard bounce or a spam complaint opts them out, so it shows as not opted in.","security":[{"oauth2":["marketing:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"guest_id","in":"path","required":true,"description":"The guest ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"guest_id":{"type":"string"},"covers":{"type":"string","const":"organisation","description":"Consent is kept once per organisation and applies at every venue in it. There is no consent per venue."},"email":{"type":"object","properties":{"can_send":{"type":"boolean","description":"Marketing emails (campaigns and workflow emails) can be sent to this guest now: they agreed to their data being kept, opted in to email and have an email address."},"cannot_send_because":{"type":"array","items":{"type":"string","enum":["no_data_consent","not_opted_in","no_address"]},"description":"Empty when can_send is true. no_data_consent: they have not agreed to their data being kept; not_opted_in: they never opted in, or opted out (themselves, by a staff member, or after a hard bounce or spam complaint); no_address: there is no email address."},"opted_in":{"type":"boolean"},"opted_in_at":{"description":"When they opted in, kept from the first opt-in since they were last opted out. Null when not opted in.","type":["string","null"]},"has_address":{"type":"boolean"}},"required":["can_send","cannot_send_because","opted_in","opted_in_at","has_address"],"additionalProperties":false},"sms":{"type":"object","properties":{"opted_in":{"type":"boolean"},"opted_in_at":{"type":["string","null"]},"has_phone":{"type":"boolean"}},"required":["opted_in","opted_in_at","has_phone"],"additionalProperties":false,"description":"Read only. SMS consent cannot be changed through the API."},"data":{"type":"object","properties":{"agreed":{"type":"boolean","description":"The guest agreed to their data being kept. Without it they are not marketed to on any channel."},"agreed_at":{"type":["string","null"]}},"required":["agreed","agreed_at"],"additionalProperties":false}},"required":["guest_id","covers","email","sms","data"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/guests/{guest_id}/consent/opt-out":{"post":{"operationId":"guests.consent.opt_out","tags":["Marketing consent"],"summary":"Opt a guest out of marketing emails","description":"Records that a guest asked to stop receiving marketing emails from the organisation, the same way their own unsubscribe link does, so it applies to every campaign and workflow email, at every venue. Opting out a guest who is already out changes nothing and says so (already_opted_out). Every call is kept in the audit trail with who made it and the reason. Only email: SMS consent is not changed here. The API can only take consent away, never give it: consent to marketing must come from the guest themselves (GDPR and PECR). A guest opts in through a Stampede form, WiFi sign-in or their own guest account.","security":[{"oauth2":["marketing:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"guest_id","in":"path","required":true,"description":"The guest ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"type":"string","const":"email","description":"Only email for now. SMS consent is read only."},"reason":{"description":"Why, in a few words, for the audit trail: for example \"Asked at the bar on 20 November\".","type":"string","minLength":1,"maxLength":500}},"required":["channel"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"already_opted_out":{"type":"boolean","description":"True when the guest was not opted in to email, so nothing changed."},"consent":{"type":"object","properties":{"guest_id":{"type":"string"},"covers":{"type":"string","const":"organisation","description":"Consent is kept once per organisation and applies at every venue in it. There is no consent per venue."},"email":{"type":"object","properties":{"can_send":{"type":"boolean","description":"Marketing emails (campaigns and workflow emails) can be sent to this guest now: they agreed to their data being kept, opted in to email and have an email address."},"cannot_send_because":{"type":"array","items":{"type":"string","enum":["no_data_consent","not_opted_in","no_address"]},"description":"Empty when can_send is true. no_data_consent: they have not agreed to their data being kept; not_opted_in: they never opted in, or opted out (themselves, by a staff member, or after a hard bounce or spam complaint); no_address: there is no email address."},"opted_in":{"type":"boolean"},"opted_in_at":{"description":"When they opted in, kept from the first opt-in since they were last opted out. Null when not opted in.","type":["string","null"]},"has_address":{"type":"boolean"}},"required":["can_send","cannot_send_because","opted_in","opted_in_at","has_address"],"additionalProperties":false},"sms":{"type":"object","properties":{"opted_in":{"type":"boolean"},"opted_in_at":{"type":["string","null"]},"has_phone":{"type":"boolean"}},"required":["opted_in","opted_in_at","has_phone"],"additionalProperties":false,"description":"Read only. SMS consent cannot be changed through the API."},"data":{"type":"object","properties":{"agreed":{"type":"boolean","description":"The guest agreed to their data being kept. Without it they are not marketed to on any channel."},"agreed_at":{"type":["string","null"]}},"required":["agreed","agreed_at"],"additionalProperties":false}},"required":["guest_id","covers","email","sms","data"],"additionalProperties":false}},"required":["already_opted_out","consent"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/bookings":{"get":{"operationId":"bookings.list","tags":["Bookings"],"summary":"List a venue's bookings","description":"Bookings that start between `from` and `to` (whole days on the venue's clock, both included), earliest first, paged. Up to 93 days at a time. Every status is included unless `status` narrows it. `payment` keeps bookings by the payment asked of the guest (`requested` is a payment link not yet paid), and `utm_source` by where they came from (`attribution.utm_source`; phone bookings carry `phone`), so `utm_source=phone&payment=requested` lists the phone bookings still waiting for the guest's card. `time_from` and `time_to` keep a part of each day, such as 17:00 to 23:00; an end at or before the start runs past midnight. `created_from` and `created_before` keep the bookings made in a range, such as those made before 22 November. A page can hold fewer than `limit`, so follow `cursor` until it is null. Each booking's `guest_id` is the guest to tag with `guests.tags.add_many`. Each booking carries what a pre-service briefing needs: `allergens` and `dietary_requirements` (with `guests:read` as well, as health information), `occasions`, `needs`, `previous_visits`, `last_review_id` (the guest's latest review, for `reviews.get`), `message_needs_reply`, `locked`, `seated_at`, `completed_at` and `held_until`; `include=staff_notes` adds each booking's staff notes in the same request. How a booking was made and who made it are on `bookings.get` and the `booking.created` webhook, not here.","security":[{"oauth2":["bookings:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"from","in":"query","required":true,"description":"A date on the venue's own clock, YYYY-MM-DD.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"description":"The last day, YYYY-MM-DD. Defaults to `from`.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"time_from","in":"query","required":false,"description":"Only bookings starting at or after this time of day.","schema":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},{"name":"time_to","in":"query","required":false,"description":"Only bookings starting before this time of day.","schema":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},{"name":"status","in":"query","required":false,"description":"One or more, comma-separated.","style":"form","explode":false,"schema":{"minItems":1,"type":"array","items":{"type":"string","enum":["booked","arrived","seated","completed","cancelled","no_show","held"]}}},{"name":"party_size_min","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500}},{"name":"party_size_max","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500}},{"name":"booking_type_id","in":"query","required":false,"description":"One or more booking type IDs, comma-separated.","style":"form","explode":false,"schema":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}}},{"name":"event_id","in":"query","required":false,"description":"One or more event IDs, comma-separated.","style":"form","explode":false,"schema":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}}},{"name":"walk_in","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}},{"name":"booked_online","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}},{"name":"vip","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}},{"name":"payment","in":"query","required":false,"description":"One or more of `none`, `requested`, `paid`, `failed`, comma-separated: the booking's `payment`. A booking whose payment is not known is never included.","style":"form","explode":false,"schema":{"minItems":1,"type":"array","items":{"type":"string","enum":["none","requested","paid","failed"]}}},{"name":"utm_source","in":"query","required":false,"description":"Only bookings with this `attribution.utm_source`, ignoring case and surrounding spaces. Phone bookings carry `phone`.","schema":{"type":"string","minLength":1,"maxLength":36}},{"name":"created_from","in":"query","required":false,"description":"Only bookings made at or after this: a date (from the start of that day on the venue's clock) or an ISO 8601 instant.","schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date on the venue's own clock, YYYY-MM-DD."},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}]}},{"name":"created_before","in":"query","required":false,"description":"Only bookings made before this: a date (before that day starts on the venue's clock) or an ISO 8601 instant.","schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date on the venue's own clock, YYYY-MM-DD."},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}]}},{"name":"include","in":"query","required":false,"description":"More to carry with each booking. `staff_notes`: its staff notes (up to the 20 most recent), in the same request, rather than one `bookings.notes.list` per booking.","style":"form","explode":false,"schema":{"minItems":1,"type":"array","items":{"type":"string","enum":["staff_notes"]}}},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `cursor` from the previous page.","schema":{"type":"string","minLength":1,"maxLength":512}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"reference":{"description":"The reference the guest was given.","type":["string","null"]},"venue_id":{"type":"string"},"status":{"type":"string","enum":["booked","arrived","seated","completed","cancelled","no_show","held"],"description":"`booked` until the party arrives; `held` is a table held for an enquiry, not yet a booking."},"stage":{"anyOf":[{"type":"string","enum":["partly_seated","starters","mains","desserts","table_ready","cleared","bill_dropped","paid"]},{"type":"null"}],"description":"Where a seated party is in their meal, when the venue tracks it. Null otherwise."},"starts_at":{"type":"string","description":"An ISO 8601 instant."},"ends_at":{"type":"string","description":"An ISO 8601 instant."},"party_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"booking_type":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}],"description":"The booking type it was made under, which set its rules."},"event_id":{"description":"The event it is for, if any.","type":["string","null"]},"enquiry_id":{"description":"The enquiry it was made for, if any.","type":["string","null"]},"guest_id":{"description":"The guest (`guests.get`), as on reviews, loyalty and wifi: their tags, history and consent. Null when Stampede has not linked them, as for most walk-ins and bookings with no email, and in booking webhooks: get the booking for it. `guest` is the details typed on the booking.","type":["string","null"]},"guest":{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["first_name","last_name","email","phone"],"additionalProperties":false},"notes":{"description":"The message the guest left with the booking.","type":["string","null"]},"attribution":{"type":"object","properties":{"utm_source":{"type":["string","null"]},"utm_medium":{"type":["string","null"]},"utm_campaign":{"type":["string","null"]},"utm_term":{"type":["string","null"]},"utm_content":{"type":["string","null"]},"utm_id":{"type":["string","null"]},"gclid":{"type":["string","null"]}},"required":["utm_source","utm_medium","utm_campaign","utm_term","utm_content","utm_id","gclid"],"additionalProperties":false,"description":"Where it came from, for marketing reports: the UTM values and Google Ads click ID of the landing URL it was booked from on Stampede's booking page, or those given to `bookings.create`. Null each when there were none."},"table_ids":{"type":"array","items":{"type":"string"},"description":"Its tables: names are in `booking_tables.list`."},"walk_in":{"type":"boolean"},"booked_online":{"type":"boolean","description":"Made by the guest online, not by staff."},"vip":{"type":"boolean"},"payment":{"anyOf":[{"type":"string","enum":["none","requested","paid","failed"]},{"type":"null"}],"description":"A payment asked of the guest: `requested` while a payment link is unpaid. Null when not known."},"upgrades":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"upgrade":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Each."},"pay_ahead":{"type":"boolean","description":"Guests booking online pay for it up front. Paid or not, `paid` and `unpaid` say what happened."}},"required":["id","name","price","pay_ahead"],"additionalProperties":false},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many are on the booking: `paid`, `included` and `unpaid` together."},"paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Paid for when the guest booked."},"included":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Included in a package booking type's price."},"unpaid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"To be paid at the venue. Only these can be removed (`bookings.upgrades.remove`)."}},"required":["upgrade","quantity","paid","included","unpaid"],"additionalProperties":false}},{"type":"null"}],"description":"What has been added to the booking (a bottle of prosecco, a cake), one entry per upgrade. Null when not read: `bookings.get` and the upgrade changes have it, lists and other changes leave it out."},"orders":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque: pass it with its `origin` to `bookings.orders.get` for its lines."},"origin":{"type":"string","enum":["square_pos","zion_preorder","stampede_ordering"]},"counts":{"type":"boolean","description":"Part of what the booking spent."},"currency":{"type":"string","enum":["GBP","EUR","USD"]},"net":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Minor units, without the tip. Null without `orders:read`."},"tip":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Minor units. Null without `orders:read`."},"on_till":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"A pre-order only: minor units of it already inside the till `net`. Null on a till check, and without `orders:read`."}},"required":["id","origin","counts","currency","net","tip","on_till"],"additionalProperties":false}},{"type":"null"}],"description":"Every order tied to the booking, listed once. `origin` is `square_pos` for a Square till check linked to the booking now, `zion_preorder` for a pre-order taken in Zion and `stampede_ordering` for one taken in Stampede ordering (a pre-order moved from Zion to Stampede ordering is listed once, as `stampede_ordering`). `counts` says whether it is part of what the booking spent: a till check once completed, a Zion pre-order once paid, a Stampede ordering pre-order once placed and not cancelled. An open check shows its running `net` with `counts: false`. `net` is in minor units without the tip (`tip`); a refund check has a negative `net`. Upgrades paid at the venue are inside the till `net`. Pre-ordered dishes are copied onto the till bill when the party is seated, so a dish can be on both. They are matched by Square item, for each currency: the matched units are the fewer of those pre-ordered and those on counting till checks, valued at the till's average price for that item and never more than the pre-ordered value, and shared out to pre-orders earliest first. `on_till` is the part of a pre-order already inside the till `net` (null on a till check). So what the booking spent, per currency, is the `net` of every counting till check, plus the `net` of every counting pre-order, less their `on_till`. Never add up amounts in different currencies. A pre-ordered dish that missed the till and was ordered again at the table is taken as the pre-order, so spend can read low by its price, never double. Quick-service venues that do not link checks to bookings show pre-orders only. For past bookings, `reports.booking_orders` has the same orders, found by the booking's trading day (a booking starting before 05:00 is on the day before). `net`, `tip` and `on_till` need `orders:read` as well; without it they are null. Null when not read: `bookings.get` has it, lists and changes leave it out. Also null while Stampede cannot read every source of the booking's orders yet, never a partial list."},"allergens":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"The allergens the guest gave, as they appear in Stampede (`[\"Gluten\", \"Nuts\"]`); empty when they gave none. Needs `guests:read` as well, because it is health information: without it, null. Also null when not known."},"dietary_requirements":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"The dietary requirements the guest gave (`[\"Vegan\"]`); empty when they gave none. Needs `guests:read` as well, because it is health information: without it, null. Also null when not known."},"occasions":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"What the guest is celebrating (`[\"Birthday\"]`); empty when nothing. Null when not known."},"needs":{"anyOf":[{"type":"object","properties":{"wheelchair":{"type":"boolean"},"buggy":{"type":"boolean"},"highchair":{"type":"boolean"},"dogs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many dogs are coming; 0 for none."}},"required":["wheelchair","buggy","highchair","dogs"],"additionalProperties":false},{"type":"null"}],"description":"What the party asked the table to suit, as availability's `needs` reads them. Null when not known."},"previous_visits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How many times the guest had booked at the organisation's venues before this booking. Null when not known."},"last_review_id":{"description":"The guest's latest review when the booking was made or last changed: `reviews.get` has it, with `reviews:read`. A review left since shows once the booking changes again. Null when they had left none, or when not known.","type":["string","null"]},"message_needs_reply":{"description":"The message the guest left (`notes`) is waiting for a reply from the venue. Null when not known.","type":["boolean","null"]},"locked":{"description":"Kept on its tables: Stampede will not move it when it rearranges the floor. Null when not known.","type":["boolean","null"]},"seated_at":{"description":"When the party was seated, an ISO 8601 instant. Null until then, or when not known.","type":["string","null"]},"completed_at":{"description":"When the booking was completed, an ISO 8601 instant. Null until then, or when not known.","type":["string","null"]},"held_until":{"description":"For a `held` booking (a table held for an enquiry): when the hold runs out, an ISO 8601 instant. Null otherwise.","type":["string","null"]},"staff_notes":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"booking_id":{"type":"string"},"body":{"type":"string","description":"The note, as plain text."},"author":{"description":"The name of whoever last wrote it. Null when Stampede has no name for them.","type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"description":"When it was last changed. Null if it never has been.","type":["string","null"]}},"required":["id","booking_id","body","author","created_at","updated_at"],"additionalProperties":false}},{"type":"null"}],"description":"Staff notes on the booking, oldest first, as `bookings.notes.list` has them. Only on `bookings.list` with `include=staff_notes`, which carries up to the 20 most recent; null otherwise, or when Stampede could not read them. `bookings.notes.list` has every note."},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","reference","venue_id","status","stage","starts_at","ends_at","party_size","booking_type","event_id","enquiry_id","guest_id","guest","notes","attribution","table_ids","walk_in","booked_online","vip","payment","upgrades","orders","allergens","dietary_requirements","occasions","needs","previous_visits","last_review_id","message_needs_reply","locked","seated_at","completed_at","held_until","staff_notes","created_at","updated_at"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"bookings.create","tags":["Bookings"],"summary":"Make a booking","description":"Books a table as staff do in Stampede. By default (`rules: staff`) it is made where it is put: with `table_ids`, on those tables whatever else is there; without, on the first table free then. `rules: online` books only what a guest could. Nothing is taken unless `payment_link` asks: then the guest is emailed a payment link and `payment` is `requested`. Ask the person when the booking type or event `takes_payment`. Name a booking type (`booking_type_id`) or an event (`event_id`), one or the other: a booking for an event is made under the event's rules, and a ticketed event, which sells tickets, is refused (`EVENT_IS_TICKETED`). Upgrades (`upgrades`) must be offered for the booking (`booking_upgrades.offered`) and are recorded unpaid, to be paid at the venue; a refused one refuses the booking (409 `UPGRADE_NOT_OFFERED` or `UPGRADE_QUANTITY_TOO_HIGH`). Give the guest as typed (`guest`) or a guest Stampede knows (`guest_id`, from `guests.search`), one or the other. `attribution` records the UTM values of a campaign it came from. The guest is emailed about the booking only when `notify_guest` is true. Send an `idempotency_key` so a call that fails or times out can be sent again safely; without one, look for the booking with `bookings.list` before trying again.","security":[{"oauth2":["bookings:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"booking_type_id":{"description":"The booking type whose rules it is made under, from `booking_types.list`. Or `event_id`.","type":"string","minLength":1,"maxLength":64},"event_id":{"description":"The event it is for, from `events.list`, whose rules it is made under. Or `booking_type_id`.","type":"string","minLength":1,"maxLength":64},"starts_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"An ISO 8601 instant, as `starts_at` in a slot from `bookings.availability.get`."},"party_size":{"type":"integer","minimum":1,"maximum":500},"duration_minutes":{"description":"How long they will stay. Defaults to the booking type's or event's length for the party (with `rules: online`, the length the rules give that day).","type":"integer","minimum":15,"maximum":1440},"table_ids":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"guest":{"description":"Who it is for, as typed. Or `guest_id`.","type":"object","properties":{"first_name":{"type":"string","minLength":1,"maxLength":100},"last_name":{"type":"string","maxLength":100},"email":{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","minLength":5,"maxLength":30}},"required":["first_name"]},"guest_id":{"description":"A guest Stampede knows (`guests.search`, `guests.get`), instead of `guest`: the booking takes their name, email and phone, and is linked to them.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"notes":{"description":"A message from the guest, shown to staff.","type":"string","maxLength":1000},"notify_guest":{"type":"boolean","description":"Email the guest about it. Required: ask the person each time."},"rules":{"default":"staff","description":"`staff` (the default): as Stampede's booking form, any table at any time, over the cover limits if need be. `online`: only a time and tables a guest could book (hours, blocks, cover limits, buffers and special dates applied), and the tables are kept from any other caller while it is made.","type":"string","enum":["staff","online"]},"payment_link":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"auto"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["deposit","cancellation_charge","full_payment"]},"amount":{"type":"integer","minimum":1,"maximum":10000000,"description":"In the venue's currency, in minor units: 2000 is £20.00."},"due_by":{"description":"When it must be paid by. None: no deadline.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"cancel_if_unpaid":{"description":"Cancel the booking if it is not paid by `due_by`.","type":"boolean"}},"required":["type","amount"]}],"description":"Email the guest a payment link, as the booking form can. `auto`: what their party owes that day by the booking type's rules (a full payment, else a deposit, else a cancellation charge), and no link when nothing is owed. Or a type and amount of your own. Needs `guest.email`. None: nothing is taken."},"attribution":{"type":"object","properties":{"utm_source":{"type":"string","minLength":1,"maxLength":500},"utm_medium":{"type":"string","minLength":1,"maxLength":500},"utm_campaign":{"type":"string","minLength":1,"maxLength":500},"utm_term":{"type":"string","minLength":1,"maxLength":500},"utm_content":{"type":"string","minLength":1,"maxLength":500},"utm_id":{"type":"string","minLength":1,"maxLength":500},"gclid":{"description":"A Google Ads click ID.","type":"string","minLength":1,"maxLength":500}},"description":"Where the booking came from, for marketing reports, as Stampede's booking page records it from a landing URL: the `utm_*` values and a Google Ads `gclid`. Each is kept to 36 characters (a `gclid` to 100) and the rest dropped. Set when the booking is made, never changed after."},"locked":{"description":"Keep it on its tables: the planner will not move it.","type":"boolean"},"internal_note":{"description":"A note for staff, never shown to the guest.","type":"string","maxLength":2000},"enquiry_id":{"description":"The enquiry at this venue it is for, which has no booking yet. The venue may start it as `held` until it is confirmed: move the enquiry on (`enquiries.move`) to confirm it.","type":"string","minLength":1,"maxLength":64},"idempotency_key":{"description":"Any unique string, such as a UUID. Send the same key again with the same booking and you get the booking the first call made, never a second one. The same key with a different booking is refused.","type":"string","minLength":8,"maxLength":96,"pattern":"^[A-Za-z0-9_-]+$"},"upgrades":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"upgrade_id":{"type":"string","minLength":1,"maxLength":64,"description":"From `booking_upgrades.offered`."},"quantity":{"type":"integer","minimum":1,"maximum":100}},"required":["upgrade_id","quantity"]},"description":"Upgrades to add, each offered for this booking (`booking_upgrades.offered`). They are recorded unpaid, to be paid at the venue, whatever the upgrade's `pay_ahead`."}},"required":["starts_at","party_size","notify_guest"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"reference":{"description":"The reference the guest was given.","type":["string","null"]},"venue_id":{"type":"string"},"status":{"type":"string","enum":["booked","arrived","seated","completed","cancelled","no_show","held"],"description":"`booked` until the party arrives; `held` is a table held for an enquiry, not yet a booking."},"stage":{"anyOf":[{"type":"string","enum":["partly_seated","starters","mains","desserts","table_ready","cleared","bill_dropped","paid"]},{"type":"null"}],"description":"Where a seated party is in their meal, when the venue tracks it. Null otherwise."},"starts_at":{"type":"string","description":"An ISO 8601 instant."},"ends_at":{"type":"string","description":"An ISO 8601 instant."},"party_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"booking_type":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}],"description":"The booking type it was made under, which set its rules."},"event_id":{"description":"The event it is for, if any.","type":["string","null"]},"enquiry_id":{"description":"The enquiry it was made for, if any.","type":["string","null"]},"guest_id":{"description":"The guest (`guests.get`), as on reviews, loyalty and wifi: their tags, history and consent. Null when Stampede has not linked them, as for most walk-ins and bookings with no email, and in booking webhooks: get the booking for it. `guest` is the details typed on the booking.","type":["string","null"]},"guest":{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["first_name","last_name","email","phone"],"additionalProperties":false},"notes":{"description":"The message the guest left with the booking.","type":["string","null"]},"attribution":{"type":"object","properties":{"utm_source":{"type":["string","null"]},"utm_medium":{"type":["string","null"]},"utm_campaign":{"type":["string","null"]},"utm_term":{"type":["string","null"]},"utm_content":{"type":["string","null"]},"utm_id":{"type":["string","null"]},"gclid":{"type":["string","null"]}},"required":["utm_source","utm_medium","utm_campaign","utm_term","utm_content","utm_id","gclid"],"additionalProperties":false,"description":"Where it came from, for marketing reports: the UTM values and Google Ads click ID of the landing URL it was booked from on Stampede's booking page, or those given to `bookings.create`. Null each when there were none."},"table_ids":{"type":"array","items":{"type":"string"},"description":"Its tables: names are in `booking_tables.list`."},"walk_in":{"type":"boolean"},"booked_online":{"type":"boolean","description":"Made by the guest online, not by staff."},"vip":{"type":"boolean"},"payment":{"anyOf":[{"type":"string","enum":["none","requested","paid","failed"]},{"type":"null"}],"description":"A payment asked of the guest: `requested` while a payment link is unpaid. Null when not known."},"upgrades":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"upgrade":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Each."},"pay_ahead":{"type":"boolean","description":"Guests booking online pay for it up front. Paid or not, `paid` and `unpaid` say what happened."}},"required":["id","name","price","pay_ahead"],"additionalProperties":false},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many are on the booking: `paid`, `included` and `unpaid` together."},"paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Paid for when the guest booked."},"included":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Included in a package booking type's price."},"unpaid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"To be paid at the venue. Only these can be removed (`bookings.upgrades.remove`)."}},"required":["upgrade","quantity","paid","included","unpaid"],"additionalProperties":false}},{"type":"null"}],"description":"What has been added to the booking (a bottle of prosecco, a cake), one entry per upgrade. Null when not read: `bookings.get` and the upgrade changes have it, lists and other changes leave it out."},"orders":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque: pass it with its `origin` to `bookings.orders.get` for its lines."},"origin":{"type":"string","enum":["square_pos","zion_preorder","stampede_ordering"]},"counts":{"type":"boolean","description":"Part of what the booking spent."},"currency":{"type":"string","enum":["GBP","EUR","USD"]},"net":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Minor units, without the tip. Null without `orders:read`."},"tip":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Minor units. Null without `orders:read`."},"on_till":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"A pre-order only: minor units of it already inside the till `net`. Null on a till check, and without `orders:read`."}},"required":["id","origin","counts","currency","net","tip","on_till"],"additionalProperties":false}},{"type":"null"}],"description":"Every order tied to the booking, listed once. `origin` is `square_pos` for a Square till check linked to the booking now, `zion_preorder` for a pre-order taken in Zion and `stampede_ordering` for one taken in Stampede ordering (a pre-order moved from Zion to Stampede ordering is listed once, as `stampede_ordering`). `counts` says whether it is part of what the booking spent: a till check once completed, a Zion pre-order once paid, a Stampede ordering pre-order once placed and not cancelled. An open check shows its running `net` with `counts: false`. `net` is in minor units without the tip (`tip`); a refund check has a negative `net`. Upgrades paid at the venue are inside the till `net`. Pre-ordered dishes are copied onto the till bill when the party is seated, so a dish can be on both. They are matched by Square item, for each currency: the matched units are the fewer of those pre-ordered and those on counting till checks, valued at the till's average price for that item and never more than the pre-ordered value, and shared out to pre-orders earliest first. `on_till` is the part of a pre-order already inside the till `net` (null on a till check). So what the booking spent, per currency, is the `net` of every counting till check, plus the `net` of every counting pre-order, less their `on_till`. Never add up amounts in different currencies. A pre-ordered dish that missed the till and was ordered again at the table is taken as the pre-order, so spend can read low by its price, never double. Quick-service venues that do not link checks to bookings show pre-orders only. For past bookings, `reports.booking_orders` has the same orders, found by the booking's trading day (a booking starting before 05:00 is on the day before). `net`, `tip` and `on_till` need `orders:read` as well; without it they are null. Null when not read: `bookings.get` has it, lists and changes leave it out. Also null while Stampede cannot read every source of the booking's orders yet, never a partial list."},"allergens":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"The allergens the guest gave, as they appear in Stampede (`[\"Gluten\", \"Nuts\"]`); empty when they gave none. Needs `guests:read` as well, because it is health information: without it, null. Also null when not known."},"dietary_requirements":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"The dietary requirements the guest gave (`[\"Vegan\"]`); empty when they gave none. Needs `guests:read` as well, because it is health information: without it, null. Also null when not known."},"occasions":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"What the guest is celebrating (`[\"Birthday\"]`); empty when nothing. Null when not known."},"needs":{"anyOf":[{"type":"object","properties":{"wheelchair":{"type":"boolean"},"buggy":{"type":"boolean"},"highchair":{"type":"boolean"},"dogs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many dogs are coming; 0 for none."}},"required":["wheelchair","buggy","highchair","dogs"],"additionalProperties":false},{"type":"null"}],"description":"What the party asked the table to suit, as availability's `needs` reads them. Null when not known."},"previous_visits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How many times the guest had booked at the organisation's venues before this booking. Null when not known."},"last_review_id":{"description":"The guest's latest review when the booking was made or last changed: `reviews.get` has it, with `reviews:read`. A review left since shows once the booking changes again. Null when they had left none, or when not known.","type":["string","null"]},"message_needs_reply":{"description":"The message the guest left (`notes`) is waiting for a reply from the venue. Null when not known.","type":["boolean","null"]},"locked":{"description":"Kept on its tables: Stampede will not move it when it rearranges the floor. Null when not known.","type":["boolean","null"]},"seated_at":{"description":"When the party was seated, an ISO 8601 instant. Null until then, or when not known.","type":["string","null"]},"completed_at":{"description":"When the booking was completed, an ISO 8601 instant. Null until then, or when not known.","type":["string","null"]},"held_until":{"description":"For a `held` booking (a table held for an enquiry): when the hold runs out, an ISO 8601 instant. Null otherwise.","type":["string","null"]},"staff_notes":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"booking_id":{"type":"string"},"body":{"type":"string","description":"The note, as plain text."},"author":{"description":"The name of whoever last wrote it. Null when Stampede has no name for them.","type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"description":"When it was last changed. Null if it never has been.","type":["string","null"]}},"required":["id","booking_id","body","author","created_at","updated_at"],"additionalProperties":false}},{"type":"null"}],"description":"Staff notes on the booking, oldest first, as `bookings.notes.list` has them. Only on `bookings.list` with `include=staff_notes`, which carries up to the 20 most recent; null otherwise, or when Stampede could not read them. `bookings.notes.list` has every note."},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","reference","venue_id","status","stage","starts_at","ends_at","party_size","booking_type","event_id","enquiry_id","guest_id","guest","notes","attribution","table_ids","walk_in","booked_online","vip","payment","upgrades","orders","allergens","dietary_requirements","occasions","needs","previous_visits","last_review_id","message_needs_reply","locked","seated_at","completed_at","held_until","staff_notes","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/bookings/{booking_id}":{"get":{"operationId":"bookings.get","tags":["Bookings"],"summary":"Get a booking","description":"One booking, with its upgrades and every order tied to it, and what a pre-service briefing needs (allergens and dietary requirements need `guests:read` as well). Also how it was made (`source`) and which member of staff made it (`created_by`), which `bookings.list` does not carry. Its staff notes are `bookings.notes.list`.","security":[{"oauth2":["bookings:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"reference":{"description":"The reference the guest was given.","type":["string","null"]},"venue_id":{"type":"string"},"status":{"type":"string","enum":["booked","arrived","seated","completed","cancelled","no_show","held"],"description":"`booked` until the party arrives; `held` is a table held for an enquiry, not yet a booking."},"stage":{"anyOf":[{"type":"string","enum":["partly_seated","starters","mains","desserts","table_ready","cleared","bill_dropped","paid"]},{"type":"null"}],"description":"Where a seated party is in their meal, when the venue tracks it. Null otherwise."},"starts_at":{"type":"string","description":"An ISO 8601 instant."},"ends_at":{"type":"string","description":"An ISO 8601 instant."},"party_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"booking_type":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}],"description":"The booking type it was made under, which set its rules."},"event_id":{"description":"The event it is for, if any.","type":["string","null"]},"enquiry_id":{"description":"The enquiry it was made for, if any.","type":["string","null"]},"guest_id":{"description":"The guest (`guests.get`), as on reviews, loyalty and wifi: their tags, history and consent. Null when Stampede has not linked them, as for most walk-ins and bookings with no email, and in booking webhooks: get the booking for it. `guest` is the details typed on the booking.","type":["string","null"]},"guest":{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["first_name","last_name","email","phone"],"additionalProperties":false},"notes":{"description":"The message the guest left with the booking.","type":["string","null"]},"attribution":{"type":"object","properties":{"utm_source":{"type":["string","null"]},"utm_medium":{"type":["string","null"]},"utm_campaign":{"type":["string","null"]},"utm_term":{"type":["string","null"]},"utm_content":{"type":["string","null"]},"utm_id":{"type":["string","null"]},"gclid":{"type":["string","null"]}},"required":["utm_source","utm_medium","utm_campaign","utm_term","utm_content","utm_id","gclid"],"additionalProperties":false,"description":"Where it came from, for marketing reports: the UTM values and Google Ads click ID of the landing URL it was booked from on Stampede's booking page, or those given to `bookings.create`. Null each when there were none."},"table_ids":{"type":"array","items":{"type":"string"},"description":"Its tables: names are in `booking_tables.list`."},"walk_in":{"type":"boolean"},"booked_online":{"type":"boolean","description":"Made by the guest online, not by staff."},"vip":{"type":"boolean"},"payment":{"anyOf":[{"type":"string","enum":["none","requested","paid","failed"]},{"type":"null"}],"description":"A payment asked of the guest: `requested` while a payment link is unpaid. Null when not known."},"upgrades":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"upgrade":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Each."},"pay_ahead":{"type":"boolean","description":"Guests booking online pay for it up front. Paid or not, `paid` and `unpaid` say what happened."}},"required":["id","name","price","pay_ahead"],"additionalProperties":false},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many are on the booking: `paid`, `included` and `unpaid` together."},"paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Paid for when the guest booked."},"included":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Included in a package booking type's price."},"unpaid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"To be paid at the venue. Only these can be removed (`bookings.upgrades.remove`)."}},"required":["upgrade","quantity","paid","included","unpaid"],"additionalProperties":false}},{"type":"null"}],"description":"What has been added to the booking (a bottle of prosecco, a cake), one entry per upgrade. Null when not read: `bookings.get` and the upgrade changes have it, lists and other changes leave it out."},"orders":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque: pass it with its `origin` to `bookings.orders.get` for its lines."},"origin":{"type":"string","enum":["square_pos","zion_preorder","stampede_ordering"]},"counts":{"type":"boolean","description":"Part of what the booking spent."},"currency":{"type":"string","enum":["GBP","EUR","USD"]},"net":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Minor units, without the tip. Null without `orders:read`."},"tip":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Minor units. Null without `orders:read`."},"on_till":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"A pre-order only: minor units of it already inside the till `net`. Null on a till check, and without `orders:read`."}},"required":["id","origin","counts","currency","net","tip","on_till"],"additionalProperties":false}},{"type":"null"}],"description":"Every order tied to the booking, listed once. `origin` is `square_pos` for a Square till check linked to the booking now, `zion_preorder` for a pre-order taken in Zion and `stampede_ordering` for one taken in Stampede ordering (a pre-order moved from Zion to Stampede ordering is listed once, as `stampede_ordering`). `counts` says whether it is part of what the booking spent: a till check once completed, a Zion pre-order once paid, a Stampede ordering pre-order once placed and not cancelled. An open check shows its running `net` with `counts: false`. `net` is in minor units without the tip (`tip`); a refund check has a negative `net`. Upgrades paid at the venue are inside the till `net`. Pre-ordered dishes are copied onto the till bill when the party is seated, so a dish can be on both. They are matched by Square item, for each currency: the matched units are the fewer of those pre-ordered and those on counting till checks, valued at the till's average price for that item and never more than the pre-ordered value, and shared out to pre-orders earliest first. `on_till` is the part of a pre-order already inside the till `net` (null on a till check). So what the booking spent, per currency, is the `net` of every counting till check, plus the `net` of every counting pre-order, less their `on_till`. Never add up amounts in different currencies. A pre-ordered dish that missed the till and was ordered again at the table is taken as the pre-order, so spend can read low by its price, never double. Quick-service venues that do not link checks to bookings show pre-orders only. For past bookings, `reports.booking_orders` has the same orders, found by the booking's trading day (a booking starting before 05:00 is on the day before). `net`, `tip` and `on_till` need `orders:read` as well; without it they are null. Null when not read: `bookings.get` has it, lists and changes leave it out. Also null while Stampede cannot read every source of the booking's orders yet, never a partial list."},"allergens":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"The allergens the guest gave, as they appear in Stampede (`[\"Gluten\", \"Nuts\"]`); empty when they gave none. Needs `guests:read` as well, because it is health information: without it, null. Also null when not known."},"dietary_requirements":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"The dietary requirements the guest gave (`[\"Vegan\"]`); empty when they gave none. Needs `guests:read` as well, because it is health information: without it, null. Also null when not known."},"occasions":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"What the guest is celebrating (`[\"Birthday\"]`); empty when nothing. Null when not known."},"needs":{"anyOf":[{"type":"object","properties":{"wheelchair":{"type":"boolean"},"buggy":{"type":"boolean"},"highchair":{"type":"boolean"},"dogs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many dogs are coming; 0 for none."}},"required":["wheelchair","buggy","highchair","dogs"],"additionalProperties":false},{"type":"null"}],"description":"What the party asked the table to suit, as availability's `needs` reads them. Null when not known."},"previous_visits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How many times the guest had booked at the organisation's venues before this booking. Null when not known."},"last_review_id":{"description":"The guest's latest review when the booking was made or last changed: `reviews.get` has it, with `reviews:read`. A review left since shows once the booking changes again. Null when they had left none, or when not known.","type":["string","null"]},"message_needs_reply":{"description":"The message the guest left (`notes`) is waiting for a reply from the venue. Null when not known.","type":["boolean","null"]},"locked":{"description":"Kept on its tables: Stampede will not move it when it rearranges the floor. Null when not known.","type":["boolean","null"]},"seated_at":{"description":"When the party was seated, an ISO 8601 instant. Null until then, or when not known.","type":["string","null"]},"completed_at":{"description":"When the booking was completed, an ISO 8601 instant. Null until then, or when not known.","type":["string","null"]},"held_until":{"description":"For a `held` booking (a table held for an enquiry): when the hold runs out, an ISO 8601 instant. Null otherwise.","type":["string","null"]},"staff_notes":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"booking_id":{"type":"string"},"body":{"type":"string","description":"The note, as plain text."},"author":{"description":"The name of whoever last wrote it. Null when Stampede has no name for them.","type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"description":"When it was last changed. Null if it never has been.","type":["string","null"]}},"required":["id","booking_id","body","author","created_at","updated_at"],"additionalProperties":false}},{"type":"null"}],"description":"Staff notes on the booking, oldest first, as `bookings.notes.list` has them. Only on `bookings.list` with `include=staff_notes`, which carries up to the 20 most recent; null otherwise, or when Stampede could not read them. `bookings.notes.list` has every note."},"created_at":{"type":"string"},"updated_at":{"type":"string"},"source":{"anyOf":[{"type":"string","enum":["staff","online","google","walk_in","import","enquiry","square"]},{"type":"null"}],"description":"How it was made: `staff` (in Stampede, or through the API by the user who made the key), `online` (the guest, on the booking page), `google` (Reserve with Google), `walk_in`, `import`, `enquiry` (for an enquiry) or `square` (a Square walk-in). Null when Stampede does not know."},"created_by":{"anyOf":[{"type":"object","properties":{"user_id":{"type":"string","description":"Their Stampede user ID."},"name":{"description":"Their name, as Stampede shows it. Null when it has none.","type":["string","null"]}},"required":["user_id","name"],"additionalProperties":false},{"type":"null"}],"description":"The member of staff who made it, or the user whose key made it through the API. Null when no person did: a guest online, Google, an import, Square."}},"required":["id","reference","venue_id","status","stage","starts_at","ends_at","party_size","booking_type","event_id","enquiry_id","guest_id","guest","notes","attribution","table_ids","walk_in","booked_online","vip","payment","upgrades","orders","allergens","dietary_requirements","occasions","needs","previous_visits","last_review_id","message_needs_reply","locked","seated_at","completed_at","held_until","staff_notes","created_at","updated_at","source","created_by"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"put":{"operationId":"bookings.update","tags":["Bookings"],"summary":"Change a booking","description":"Changes the time, party size, length, tables, guest details or notes of a booking, or moves it to another booking type or event, whatever its status or what is on it, as staff can in Stampede. Only the fields sent change: a new time or party size keeps its tables and length unless new ones are sent. By default (`rules: staff`) it goes where it is put; with `rules: online` the time must be free for them (check `bookings.availability.get` with `booking_id`), and if it is not, the error names the tables that are. Money already taken is not touched: when a priced booking's price moves, `follow_up` says what to refund or take, in Stampede. A booking for an event moves under the event's rules. Moving it to another booking type (`booking_type_id`) or event (`event_id`), one or the other, takes it off the old one; it keeps its time, tables and length unless new ones are sent, and they must suit the new rules. A ticketed event is refused (`EVENT_IS_TICKETED`). A booking of several parts (a night) is changed in Stampede. The guest is emailed only when `notify_guest` is true.","security":[{"oauth2":["bookings:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"starts_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"An ISO 8601 instant, as `starts_at` in a slot from `bookings.availability.get`."},"party_size":{"type":"integer","minimum":1,"maximum":500},"duration_minutes":{"type":"integer","minimum":15,"maximum":1440},"table_ids":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"guest":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"maxLength":100},"last_name":{"type":"string","maxLength":100},"email":{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","minLength":5,"maxLength":30}}},"notes":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"locked":{"description":"Keep it on its tables: the planner will not move it.","type":"boolean"},"booking_type_id":{"description":"Move it to this booking type (`booking_types.list`), and off any event. Or `event_id`.","type":"string","minLength":1,"maxLength":64},"event_id":{"description":"Move it to this event (`events.list`), and off its booking type. Or `booking_type_id`.","type":"string","minLength":1,"maxLength":64},"notify_guest":{"type":"boolean","description":"Email the guest about it. Required: ask the person each time."},"rules":{"default":"staff","description":"`staff` (the default): as Stampede's booking form, any table at any time, over the cover limits if need be. `online`: only a time and tables a guest could book (hours, blocks, cover limits, buffers and special dates applied), and the tables are kept from any other caller while it is made.","type":"string","enum":["staff","online"]}},"required":["notify_guest"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"reference":{"description":"The reference the guest was given.","type":["string","null"]},"venue_id":{"type":"string"},"status":{"type":"string","enum":["booked","arrived","seated","completed","cancelled","no_show","held"],"description":"`booked` until the party arrives; `held` is a table held for an enquiry, not yet a booking."},"stage":{"anyOf":[{"type":"string","enum":["partly_seated","starters","mains","desserts","table_ready","cleared","bill_dropped","paid"]},{"type":"null"}],"description":"Where a seated party is in their meal, when the venue tracks it. Null otherwise."},"starts_at":{"type":"string","description":"An ISO 8601 instant."},"ends_at":{"type":"string","description":"An ISO 8601 instant."},"party_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"booking_type":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}],"description":"The booking type it was made under, which set its rules."},"event_id":{"description":"The event it is for, if any.","type":["string","null"]},"enquiry_id":{"description":"The enquiry it was made for, if any.","type":["string","null"]},"guest_id":{"description":"The guest (`guests.get`), as on reviews, loyalty and wifi: their tags, history and consent. Null when Stampede has not linked them, as for most walk-ins and bookings with no email, and in booking webhooks: get the booking for it. `guest` is the details typed on the booking.","type":["string","null"]},"guest":{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["first_name","last_name","email","phone"],"additionalProperties":false},"notes":{"description":"The message the guest left with the booking.","type":["string","null"]},"attribution":{"type":"object","properties":{"utm_source":{"type":["string","null"]},"utm_medium":{"type":["string","null"]},"utm_campaign":{"type":["string","null"]},"utm_term":{"type":["string","null"]},"utm_content":{"type":["string","null"]},"utm_id":{"type":["string","null"]},"gclid":{"type":["string","null"]}},"required":["utm_source","utm_medium","utm_campaign","utm_term","utm_content","utm_id","gclid"],"additionalProperties":false,"description":"Where it came from, for marketing reports: the UTM values and Google Ads click ID of the landing URL it was booked from on Stampede's booking page, or those given to `bookings.create`. Null each when there were none."},"table_ids":{"type":"array","items":{"type":"string"},"description":"Its tables: names are in `booking_tables.list`."},"walk_in":{"type":"boolean"},"booked_online":{"type":"boolean","description":"Made by the guest online, not by staff."},"vip":{"type":"boolean"},"payment":{"anyOf":[{"type":"string","enum":["none","requested","paid","failed"]},{"type":"null"}],"description":"A payment asked of the guest: `requested` while a payment link is unpaid. Null when not known."},"upgrades":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"upgrade":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Each."},"pay_ahead":{"type":"boolean","description":"Guests booking online pay for it up front. Paid or not, `paid` and `unpaid` say what happened."}},"required":["id","name","price","pay_ahead"],"additionalProperties":false},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many are on the booking: `paid`, `included` and `unpaid` together."},"paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Paid for when the guest booked."},"included":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Included in a package booking type's price."},"unpaid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"To be paid at the venue. Only these can be removed (`bookings.upgrades.remove`)."}},"required":["upgrade","quantity","paid","included","unpaid"],"additionalProperties":false}},{"type":"null"}],"description":"What has been added to the booking (a bottle of prosecco, a cake), one entry per upgrade. Null when not read: `bookings.get` and the upgrade changes have it, lists and other changes leave it out."},"orders":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque: pass it with its `origin` to `bookings.orders.get` for its lines."},"origin":{"type":"string","enum":["square_pos","zion_preorder","stampede_ordering"]},"counts":{"type":"boolean","description":"Part of what the booking spent."},"currency":{"type":"string","enum":["GBP","EUR","USD"]},"net":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Minor units, without the tip. Null without `orders:read`."},"tip":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Minor units. Null without `orders:read`."},"on_till":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"A pre-order only: minor units of it already inside the till `net`. Null on a till check, and without `orders:read`."}},"required":["id","origin","counts","currency","net","tip","on_till"],"additionalProperties":false}},{"type":"null"}],"description":"Every order tied to the booking, listed once. `origin` is `square_pos` for a Square till check linked to the booking now, `zion_preorder` for a pre-order taken in Zion and `stampede_ordering` for one taken in Stampede ordering (a pre-order moved from Zion to Stampede ordering is listed once, as `stampede_ordering`). `counts` says whether it is part of what the booking spent: a till check once completed, a Zion pre-order once paid, a Stampede ordering pre-order once placed and not cancelled. An open check shows its running `net` with `counts: false`. `net` is in minor units without the tip (`tip`); a refund check has a negative `net`. Upgrades paid at the venue are inside the till `net`. Pre-ordered dishes are copied onto the till bill when the party is seated, so a dish can be on both. They are matched by Square item, for each currency: the matched units are the fewer of those pre-ordered and those on counting till checks, valued at the till's average price for that item and never more than the pre-ordered value, and shared out to pre-orders earliest first. `on_till` is the part of a pre-order already inside the till `net` (null on a till check). So what the booking spent, per currency, is the `net` of every counting till check, plus the `net` of every counting pre-order, less their `on_till`. Never add up amounts in different currencies. A pre-ordered dish that missed the till and was ordered again at the table is taken as the pre-order, so spend can read low by its price, never double. Quick-service venues that do not link checks to bookings show pre-orders only. For past bookings, `reports.booking_orders` has the same orders, found by the booking's trading day (a booking starting before 05:00 is on the day before). `net`, `tip` and `on_till` need `orders:read` as well; without it they are null. Null when not read: `bookings.get` has it, lists and changes leave it out. Also null while Stampede cannot read every source of the booking's orders yet, never a partial list."},"allergens":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"The allergens the guest gave, as they appear in Stampede (`[\"Gluten\", \"Nuts\"]`); empty when they gave none. Needs `guests:read` as well, because it is health information: without it, null. Also null when not known."},"dietary_requirements":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"The dietary requirements the guest gave (`[\"Vegan\"]`); empty when they gave none. Needs `guests:read` as well, because it is health information: without it, null. Also null when not known."},"occasions":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"What the guest is celebrating (`[\"Birthday\"]`); empty when nothing. Null when not known."},"needs":{"anyOf":[{"type":"object","properties":{"wheelchair":{"type":"boolean"},"buggy":{"type":"boolean"},"highchair":{"type":"boolean"},"dogs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many dogs are coming; 0 for none."}},"required":["wheelchair","buggy","highchair","dogs"],"additionalProperties":false},{"type":"null"}],"description":"What the party asked the table to suit, as availability's `needs` reads them. Null when not known."},"previous_visits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How many times the guest had booked at the organisation's venues before this booking. Null when not known."},"last_review_id":{"description":"The guest's latest review when the booking was made or last changed: `reviews.get` has it, with `reviews:read`. A review left since shows once the booking changes again. Null when they had left none, or when not known.","type":["string","null"]},"message_needs_reply":{"description":"The message the guest left (`notes`) is waiting for a reply from the venue. Null when not known.","type":["boolean","null"]},"locked":{"description":"Kept on its tables: Stampede will not move it when it rearranges the floor. Null when not known.","type":["boolean","null"]},"seated_at":{"description":"When the party was seated, an ISO 8601 instant. Null until then, or when not known.","type":["string","null"]},"completed_at":{"description":"When the booking was completed, an ISO 8601 instant. Null until then, or when not known.","type":["string","null"]},"held_until":{"description":"For a `held` booking (a table held for an enquiry): when the hold runs out, an ISO 8601 instant. Null otherwise.","type":["string","null"]},"staff_notes":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"booking_id":{"type":"string"},"body":{"type":"string","description":"The note, as plain text."},"author":{"description":"The name of whoever last wrote it. Null when Stampede has no name for them.","type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"description":"When it was last changed. Null if it never has been.","type":["string","null"]}},"required":["id","booking_id","body","author","created_at","updated_at"],"additionalProperties":false}},{"type":"null"}],"description":"Staff notes on the booking, oldest first, as `bookings.notes.list` has them. Only on `bookings.list` with `include=staff_notes`, which carries up to the 20 most recent; null otherwise, or when Stampede could not read them. `bookings.notes.list` has every note."},"created_at":{"type":"string"},"updated_at":{"type":"string"},"follow_up":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"refund"},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"payment_id":{"type":"string"}},"required":["action","amount","payment_id"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"collect"},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"payment_type":{"type":"string","enum":["deposit","full_payment"]}},"required":["action","amount","payment_type"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"balance_changed"},"balance_due_before":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"balance_due_after":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["action","balance_due_before","balance_due_after"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"price_override_dropped"}},"required":["action"],"additionalProperties":false}]},"description":"What the change means for money, in minor units: a refund to make, more to take, or a balance moved. Act on it in Stampede. Empty when nothing priced moved."}},"required":["id","reference","venue_id","status","stage","starts_at","ends_at","party_size","booking_type","event_id","enquiry_id","guest_id","guest","notes","attribution","table_ids","walk_in","booked_online","vip","payment","upgrades","orders","allergens","dietary_requirements","occasions","needs","previous_visits","last_review_id","message_needs_reply","locked","seated_at","completed_at","held_until","staff_notes","created_at","updated_at","follow_up"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"bookings.patch","tags":["Bookings"],"summary":"Change some of a booking","description":"Changes only the fields sent and keeps every other one as it is: `starts_at`, `party_size`, `duration_minutes`, `table_ids`, `guest` (`first_name`, `last_name`, `email`, `phone`), `notes`, `locked`, and `booking_type_id` or `event_id` to move it to another booking type or event. Send `null` to clear `notes` or the guest's `last_name`, `email` or `phone`. It is the same change as `bookings.update`, with the same checks: a new time or party size keeps its tables and length unless new ones are sent; by default (`rules: staff`) it goes where it is put, and with `rules: online` the time must be free for them; when a priced booking's price moves, `follow_up` says what to refund or take, in Stampede; a booking for an event moves under the event's rules; a night of several parts is changed in Stampede. Its upgrades are not touched (`bookings.upgrades.add`, `bookings.upgrades.remove`). The guest is emailed only when `notify_guest` is true.","security":[{"oauth2":["bookings:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"starts_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"An ISO 8601 instant, as `starts_at` in a slot from `bookings.availability.get`."},"party_size":{"type":"integer","minimum":1,"maximum":500},"duration_minutes":{"type":"integer","minimum":15,"maximum":1440},"table_ids":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"guest":{"description":"Only the details sent change.","type":"object","properties":{"first_name":{"type":"string","minLength":1,"maxLength":100},"last_name":{"description":"Null clears it.","anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"email":{"description":"Null clears it.","anyOf":[{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"description":"Null clears it.","anyOf":[{"type":"string","minLength":5,"maxLength":30},{"type":"null"}]}}},"notes":{"description":"A message from the guest, shown to staff. Null clears it.","anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"locked":{"description":"Keep it on its tables: the planner will not move it.","type":"boolean"},"booking_type_id":{"description":"Move it to this booking type (`booking_types.list`), and off any event. Or `event_id`.","type":"string","minLength":1,"maxLength":64},"event_id":{"description":"Move it to this event (`events.list`), and off its booking type. Or `booking_type_id`.","type":"string","minLength":1,"maxLength":64},"notify_guest":{"type":"boolean","description":"Email the guest about it. Required: ask the person each time."},"rules":{"default":"staff","description":"`staff` (the default): as Stampede's booking form, any table at any time, over the cover limits if need be. `online`: only a time and tables a guest could book (hours, blocks, cover limits, buffers and special dates applied), and the tables are kept from any other caller while it is made.","type":"string","enum":["staff","online"]}},"required":["notify_guest"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"reference":{"description":"The reference the guest was given.","type":["string","null"]},"venue_id":{"type":"string"},"status":{"type":"string","enum":["booked","arrived","seated","completed","cancelled","no_show","held"],"description":"`booked` until the party arrives; `held` is a table held for an enquiry, not yet a booking."},"stage":{"anyOf":[{"type":"string","enum":["partly_seated","starters","mains","desserts","table_ready","cleared","bill_dropped","paid"]},{"type":"null"}],"description":"Where a seated party is in their meal, when the venue tracks it. Null otherwise."},"starts_at":{"type":"string","description":"An ISO 8601 instant."},"ends_at":{"type":"string","description":"An ISO 8601 instant."},"party_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"booking_type":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}],"description":"The booking type it was made under, which set its rules."},"event_id":{"description":"The event it is for, if any.","type":["string","null"]},"enquiry_id":{"description":"The enquiry it was made for, if any.","type":["string","null"]},"guest_id":{"description":"The guest (`guests.get`), as on reviews, loyalty and wifi: their tags, history and consent. Null when Stampede has not linked them, as for most walk-ins and bookings with no email, and in booking webhooks: get the booking for it. `guest` is the details typed on the booking.","type":["string","null"]},"guest":{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["first_name","last_name","email","phone"],"additionalProperties":false},"notes":{"description":"The message the guest left with the booking.","type":["string","null"]},"attribution":{"type":"object","properties":{"utm_source":{"type":["string","null"]},"utm_medium":{"type":["string","null"]},"utm_campaign":{"type":["string","null"]},"utm_term":{"type":["string","null"]},"utm_content":{"type":["string","null"]},"utm_id":{"type":["string","null"]},"gclid":{"type":["string","null"]}},"required":["utm_source","utm_medium","utm_campaign","utm_term","utm_content","utm_id","gclid"],"additionalProperties":false,"description":"Where it came from, for marketing reports: the UTM values and Google Ads click ID of the landing URL it was booked from on Stampede's booking page, or those given to `bookings.create`. Null each when there were none."},"table_ids":{"type":"array","items":{"type":"string"},"description":"Its tables: names are in `booking_tables.list`."},"walk_in":{"type":"boolean"},"booked_online":{"type":"boolean","description":"Made by the guest online, not by staff."},"vip":{"type":"boolean"},"payment":{"anyOf":[{"type":"string","enum":["none","requested","paid","failed"]},{"type":"null"}],"description":"A payment asked of the guest: `requested` while a payment link is unpaid. Null when not known."},"upgrades":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"upgrade":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Each."},"pay_ahead":{"type":"boolean","description":"Guests booking online pay for it up front. Paid or not, `paid` and `unpaid` say what happened."}},"required":["id","name","price","pay_ahead"],"additionalProperties":false},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many are on the booking: `paid`, `included` and `unpaid` together."},"paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Paid for when the guest booked."},"included":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Included in a package booking type's price."},"unpaid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"To be paid at the venue. Only these can be removed (`bookings.upgrades.remove`)."}},"required":["upgrade","quantity","paid","included","unpaid"],"additionalProperties":false}},{"type":"null"}],"description":"What has been added to the booking (a bottle of prosecco, a cake), one entry per upgrade. Null when not read: `bookings.get` and the upgrade changes have it, lists and other changes leave it out."},"orders":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque: pass it with its `origin` to `bookings.orders.get` for its lines."},"origin":{"type":"string","enum":["square_pos","zion_preorder","stampede_ordering"]},"counts":{"type":"boolean","description":"Part of what the booking spent."},"currency":{"type":"string","enum":["GBP","EUR","USD"]},"net":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Minor units, without the tip. Null without `orders:read`."},"tip":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Minor units. Null without `orders:read`."},"on_till":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"A pre-order only: minor units of it already inside the till `net`. Null on a till check, and without `orders:read`."}},"required":["id","origin","counts","currency","net","tip","on_till"],"additionalProperties":false}},{"type":"null"}],"description":"Every order tied to the booking, listed once. `origin` is `square_pos` for a Square till check linked to the booking now, `zion_preorder` for a pre-order taken in Zion and `stampede_ordering` for one taken in Stampede ordering (a pre-order moved from Zion to Stampede ordering is listed once, as `stampede_ordering`). `counts` says whether it is part of what the booking spent: a till check once completed, a Zion pre-order once paid, a Stampede ordering pre-order once placed and not cancelled. An open check shows its running `net` with `counts: false`. `net` is in minor units without the tip (`tip`); a refund check has a negative `net`. Upgrades paid at the venue are inside the till `net`. Pre-ordered dishes are copied onto the till bill when the party is seated, so a dish can be on both. They are matched by Square item, for each currency: the matched units are the fewer of those pre-ordered and those on counting till checks, valued at the till's average price for that item and never more than the pre-ordered value, and shared out to pre-orders earliest first. `on_till` is the part of a pre-order already inside the till `net` (null on a till check). So what the booking spent, per currency, is the `net` of every counting till check, plus the `net` of every counting pre-order, less their `on_till`. Never add up amounts in different currencies. A pre-ordered dish that missed the till and was ordered again at the table is taken as the pre-order, so spend can read low by its price, never double. Quick-service venues that do not link checks to bookings show pre-orders only. For past bookings, `reports.booking_orders` has the same orders, found by the booking's trading day (a booking starting before 05:00 is on the day before). `net`, `tip` and `on_till` need `orders:read` as well; without it they are null. Null when not read: `bookings.get` has it, lists and changes leave it out. Also null while Stampede cannot read every source of the booking's orders yet, never a partial list."},"allergens":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"The allergens the guest gave, as they appear in Stampede (`[\"Gluten\", \"Nuts\"]`); empty when they gave none. Needs `guests:read` as well, because it is health information: without it, null. Also null when not known."},"dietary_requirements":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"The dietary requirements the guest gave (`[\"Vegan\"]`); empty when they gave none. Needs `guests:read` as well, because it is health information: without it, null. Also null when not known."},"occasions":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"What the guest is celebrating (`[\"Birthday\"]`); empty when nothing. Null when not known."},"needs":{"anyOf":[{"type":"object","properties":{"wheelchair":{"type":"boolean"},"buggy":{"type":"boolean"},"highchair":{"type":"boolean"},"dogs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many dogs are coming; 0 for none."}},"required":["wheelchair","buggy","highchair","dogs"],"additionalProperties":false},{"type":"null"}],"description":"What the party asked the table to suit, as availability's `needs` reads them. Null when not known."},"previous_visits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How many times the guest had booked at the organisation's venues before this booking. Null when not known."},"last_review_id":{"description":"The guest's latest review when the booking was made or last changed: `reviews.get` has it, with `reviews:read`. A review left since shows once the booking changes again. Null when they had left none, or when not known.","type":["string","null"]},"message_needs_reply":{"description":"The message the guest left (`notes`) is waiting for a reply from the venue. Null when not known.","type":["boolean","null"]},"locked":{"description":"Kept on its tables: Stampede will not move it when it rearranges the floor. Null when not known.","type":["boolean","null"]},"seated_at":{"description":"When the party was seated, an ISO 8601 instant. Null until then, or when not known.","type":["string","null"]},"completed_at":{"description":"When the booking was completed, an ISO 8601 instant. Null until then, or when not known.","type":["string","null"]},"held_until":{"description":"For a `held` booking (a table held for an enquiry): when the hold runs out, an ISO 8601 instant. Null otherwise.","type":["string","null"]},"staff_notes":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"booking_id":{"type":"string"},"body":{"type":"string","description":"The note, as plain text."},"author":{"description":"The name of whoever last wrote it. Null when Stampede has no name for them.","type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"description":"When it was last changed. Null if it never has been.","type":["string","null"]}},"required":["id","booking_id","body","author","created_at","updated_at"],"additionalProperties":false}},{"type":"null"}],"description":"Staff notes on the booking, oldest first, as `bookings.notes.list` has them. Only on `bookings.list` with `include=staff_notes`, which carries up to the 20 most recent; null otherwise, or when Stampede could not read them. `bookings.notes.list` has every note."},"created_at":{"type":"string"},"updated_at":{"type":"string"},"follow_up":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"refund"},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"payment_id":{"type":"string"}},"required":["action","amount","payment_id"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"collect"},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"payment_type":{"type":"string","enum":["deposit","full_payment"]}},"required":["action","amount","payment_type"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"balance_changed"},"balance_due_before":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"balance_due_after":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["action","balance_due_before","balance_due_after"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"price_override_dropped"}},"required":["action"],"additionalProperties":false}]},"description":"What the change means for money, in minor units: a refund to make, more to take, or a balance moved. Act on it in Stampede. Empty when nothing priced moved."}},"required":["id","reference","venue_id","status","stage","starts_at","ends_at","party_size","booking_type","event_id","enquiry_id","guest_id","guest","notes","attribution","table_ids","walk_in","booked_online","vip","payment","upgrades","orders","allergens","dietary_requirements","occasions","needs","previous_visits","last_review_id","message_needs_reply","locked","seated_at","completed_at","held_until","staff_notes","created_at","updated_at","follow_up"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/bookings/{booking_id}/orders/{order_id}":{"get":{"operationId":"bookings.orders.get","tags":["Bookings"],"summary":"Get one of a booking's orders with its lines","description":"One entry of `orders` on `bookings.get`, with its lines: name, quantity and sales. Needs `bookings:read` as well as `orders:read`. Pass the `id` and `origin` the entry has. `origin` is `square_pos` for a Square till check linked to the booking now, `zion_preorder` for a pre-order taken in Zion and `stampede_ordering` for one taken in Stampede ordering (a pre-order moved from Zion to Stampede ordering is listed once, as `stampede_ordering`). `counts` says whether it is part of what the booking spent: a till check once completed, a Zion pre-order once paid, a Stampede ordering pre-order once placed and not cancelled. An open check shows its running `net` with `counts: false`. `net` is in minor units without the tip (`tip`); a refund check has a negative `net`. Upgrades paid at the venue are inside the till `net`. Pre-ordered dishes are copied onto the till bill when the party is seated, so a dish can be on both. They are matched by Square item, for each currency: the matched units are the fewer of those pre-ordered and those on counting till checks, valued at the till's average price for that item and never more than the pre-ordered value, and shared out to pre-orders earliest first. `on_till` is the part of a pre-order already inside the till `net` (null on a till check). So what the booking spent, per currency, is the `net` of every counting till check, plus the `net` of every counting pre-order, less their `on_till`. Never add up amounts in different currencies. A pre-ordered dish that missed the till and was ordered again at the table is taken as the pre-order, so spend can read low by its price, never double. Quick-service venues that do not link checks to bookings show pre-orders only. For past bookings, `reports.booking_orders` has the same orders, found by the booking's trading day (a booking starting before 05:00 is on the day before). `orders.get` is the Stampede ordering order itself, with its tickets.","security":[{"oauth2":["orders:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"order_id","in":"path","required":true,"description":"The `id` of an entry in `orders` on `bookings.get`.","schema":{"type":"string","minLength":1,"maxLength":128}},{"name":"origin","in":"query","required":true,"description":"The `origin` of that entry.","schema":{"type":"string","enum":["square_pos","zion_preorder","stampede_ordering"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Opaque: pass it with its `origin` to `bookings.orders.get` for its lines."},"origin":{"type":"string","enum":["square_pos","zion_preorder","stampede_ordering"]},"counts":{"type":"boolean","description":"Part of what the booking spent."},"currency":{"type":"string","enum":["GBP","EUR","USD"]},"net":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minor units, without the tip."},"tip":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minor units."},"on_till":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"A pre-order only: minor units of it already inside the till `net`. Null on a till check, and without `orders:read`."},"lines":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"quantity":{"type":"number"},"sales":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minor units, after the line's discount. Negative on a refund's lines."}},"required":["name","quantity","sales"],"additionalProperties":false},"description":"As the till or the pre-order has them. A Zion pre-order's rows are one each."}},"required":["id","origin","counts","currency","net","tip","on_till","lines"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/availability":{"get":{"operationId":"bookings.availability.get","tags":["Bookings"],"summary":"Find free times to book","description":"The start times on one day with room for a party, under the rules a guest books by: the booking type's or event's hours and party sizes, special dates, blocks, cover limits and buffers. Name a booking type or an event, one or the other; book a time it offers with `bookings.create` and the same `booking_type_id` or `event_id`. A ticketed event sells tickets and is never booked as a table (`EVENT_IS_TICKETED`). A time is free when asked, not held: book it straight away, and check again if that fails.","security":[{"oauth2":["bookings:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"date","in":"query","required":true,"description":"A date on the venue's own clock, YYYY-MM-DD.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"party_size","in":"query","required":true,"schema":{"type":"integer","minimum":1,"maximum":500}},{"name":"booking_type_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"event_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"duration_minutes","in":"query","required":false,"description":"How long they will stay. Defaults to the length the venue's rules give that day, or with `booking_id` that booking's own length. Ignored for an event, which has its own.","schema":{"type":"integer","minimum":15,"maximum":1440}},{"name":"booking_id","in":"query","required":false,"description":"When moving a booking: leave it out of the count, so it does not clash with itself, and ask with its own length unless `duration_minutes` is sent.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"needs","in":"query","required":false,"description":"What the table must suit, comma-separated.","style":"form","explode":false,"schema":{"minItems":1,"type":"array","items":{"type":"string","enum":["wheelchair","buggy","highchair","dog_friendly"]}}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date on the venue's own clock, YYYY-MM-DD."},"party_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"duration_minutes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The length asked for. Null: the length the venue's rules give that day, or for an event its own."},"booking_type_id":{"type":["string","null"]},"event_id":{"type":["string","null"]},"slots":{"type":"array","items":{"type":"object","properties":{"starts_at":{"type":"string","description":"An ISO 8601 instant: pass it as `starts_at` to make the booking."},"tables":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"description":"Single tables free for the whole booking."},"combinations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"table_ids":{"type":"array","items":{"type":"string"}}},"required":["id","name","table_ids"],"additionalProperties":false},"description":"Tables joined together, for a party no single table seats."}},"required":["starts_at","tables","combinations"],"additionalProperties":false},"description":"Every start time with room, earliest first. Empty: nothing free that day."}},"required":["date","party_size","duration_minutes","booking_type_id","event_id","slots"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/booking-types":{"get":{"operationId":"booking_types.list","tags":["Booking setup"],"summary":"List a venue's booking types","description":"Every booking type at the venue, in the order guests see them. A booking type holds the rules a booking is made under: party sizes, how long it lasts, hours, tables and any payment. Special dates can override them on given days.","security":[{"oauth2":["bookings:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"active":{"type":"boolean","description":"Inactive types take no new bookings."},"offered_online":{"type":"boolean","description":"Guests can book it themselves. False: staff only."},"enquiries_only":{"type":"boolean","description":"Guests send an enquiry instead of booking."},"party_size":{"type":"object","properties":{"min":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["min","max"],"additionalProperties":false},"duration_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long a booking lasts unless its party size says otherwise."},"durations_by_party_size":{"type":"array","items":{"type":"object","properties":{"party_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["party_size","minutes"],"additionalProperties":false},"description":"Longer or shorter stays for some party sizes. Empty when every size gets `duration_minutes`."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"closes":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."}},"required":["day","opens","closes"],"additionalProperties":false},"description":"When bookings can start, on the venue's clock. A day with no entries takes no bookings. A close at or before its open runs past midnight."},"last_booking_minutes_before_close":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The latest a booking can start, in minutes before each close."},"same_day_bookings":{"type":"boolean"},"slot_interval_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How far apart the booking times guests are offered are, 15 or 30: the type's own, or the venue's (`own_slot_interval`)."},"own_slot_interval":{"type":"boolean","description":"True: `slot_interval_minutes` is set on this type. False: it follows the venue's."},"same_day_cutoff_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"When `same_day_bookings` is true: a booking on the day must be made at least this many minutes before it starts. 0: up to the start."},"buffer_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Kept clear on a table before and after each booking, so the next party is not seated too close. 0: none. It applies to what guests can book online; staff can book into it."},"buffer_varies_by_party_size":{"type":"boolean","description":"Some party sizes have a buffer of their own, set in Stampede, in place of `buffer_minutes`."},"amendments_allowed":{"type":"boolean","description":"Guests can change their own booking."},"tables":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"description":"The tables it can use. Empty means any table."},"takes_payment":{"type":"object","properties":{"deposit":{"type":"boolean"},"cancellation_charge":{"type":"boolean"},"full_payment":{"type":"boolean"}},"required":["deposit","cancellation_charge","full_payment"],"additionalProperties":false,"description":"Which money the type asks for: at most one is true, the same as `payment.type`. Each starts at a party size (`payment.from_party_size`), and a special date can change them. A booking made through this API takes nothing unless it asks for a payment link (`payment_link`)."},"payment":{"type":"object","properties":{"type":{"type":"string","enum":["none","deposit","cancellation_charge","full_payment"],"description":"What the guest is asked for when booking: nothing, a deposit, a card held for a cancellation charge, or the full price. Only one."},"amount":{"anyOf":[{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},{"type":"null"}],"description":"Per guest or per booking (`per`). Null when `type` is `none`."},"per":{"anyOf":[{"type":"string","enum":["guest","booking"]},{"type":"null"}],"description":"`guest`: the amount times the party size. `booking`: the amount once."},"from_party_size":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Parties this size or larger are asked for it; smaller ones book with nothing to pay."},"free_cancellation_hours":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Cancellation charge only: cancelling more than this many hours before the booking costs nothing. Null for the other types."},"terms":{"description":"Terms the guest accepts before booking. Null: none are shown.","type":["string","null"]}},"required":["type","amount","per","from_party_size","free_cancellation_hours","terms"],"additionalProperties":false,"description":"The money the type asks for. A special date can change it on its days. A booking made through this API takes nothing unless it asks for a payment link (`payment_link`)."},"cover_limits":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"active":{"type":"boolean","description":"Off: no limit that day, and its windows are kept for later."},"windows":{"maxItems":96,"type":"array","items":{"type":"object","properties":{"from":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"When the window starts, on the venue's clock, on a 15-minute mark."},"to":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"When it ends, later the same day, on a 15-minute mark."},"max_covers":{"type":"integer","minimum":1,"maximum":10000,"description":"The most guests whose bookings start in the window."}},"required":["from","to","max_covers"],"additionalProperties":false}}},"required":["day","active","windows"],"additionalProperties":false},"description":"Limits on guests in windows of each weekday, every day of the week in order. They apply only while the venue's time-slot rules are off (`time_slot_rules_active` on `booking_settings.get`), and only if the type counts towards covers, counting only this type's bookings. A special date with limits of its own replaces them on its days. The venue's own limits (`booking_settings`) apply as well."},"upgrade_ids":{"type":"array","items":{"type":"string"},"description":"The upgrades guests booking it are offered (`booking_upgrades.list`), when they are active and suit the party size and time."},"included_upgrades":{"type":"array","items":{"type":"object","properties":{"upgrade_id":{"type":"string"},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"per":{"type":"string","enum":["person","booking"],"description":"`person`: `quantity` for each guest in the party. `booking`: `quantity` for the booking."}},"required":["upgrade_id","quantity","per"],"additionalProperties":false},"description":"Upgrades a package booking type includes in its price, at no extra charge. Always empty for a type that is not a package: packages are set up in Stampede."},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Its place in the list guests see."}},"required":["id","name","description","active","offered_online","enquiries_only","party_size","duration_minutes","durations_by_party_size","hours","last_booking_minutes_before_close","same_day_bookings","slot_interval_minutes","own_slot_interval","same_day_cutoff_minutes","buffer_minutes","buffer_varies_by_party_size","amendments_allowed","tables","takes_payment","payment","cover_limits","upgrade_ids","included_upgrades","position"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"booking_types.create","tags":["Booking setup"],"summary":"Add a booking type","description":"Adds a booking type at the venue, last in the list guests see. It takes no payment: set a deposit, cancellation charge or full payment afterwards with `booking_types.update`. New types are bookable online unless `offered_online` is false.","security":[{"oauth2":["booking_setup:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"default":null,"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"description":"Shown to guests choosing a type."},"active":{"default":true,"type":"boolean","description":"Inactive types take no new bookings."},"offered_online":{"default":true,"type":"boolean","description":"Guests can book it themselves. False: staff only."},"enquiries_only":{"default":false,"type":"boolean","description":"Guests send an enquiry instead of booking."},"party_size":{"type":"object","properties":{"min":{"type":"integer","minimum":1,"maximum":1000},"max":{"type":"integer","minimum":1,"maximum":1000}},"required":["min","max"]},"duration_minutes":{"type":"integer","minimum":5,"maximum":1440,"multipleOf":5,"description":"How long a booking lasts, in minutes: a multiple of 5."},"durations_by_party_size":{"default":[],"maxItems":100,"type":"array","items":{"type":"object","properties":{"party_size":{"type":"integer","minimum":1,"maximum":1000},"minutes":{"type":"integer","minimum":5,"maximum":1440,"multipleOf":5,"description":"How long a party this size stays, in minutes: a multiple of 5."}},"required":["party_size","minutes"]},"description":"Longer or shorter stays for some party sizes. Empty: every size gets `duration_minutes`."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"closes":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."}},"required":["day","opens","closes"]},"description":"When bookings can start, on the venue's clock. A day with no entries takes no bookings. A close at or before its open runs past midnight."},"last_booking_minutes_before_close":{"default":0,"type":"integer","minimum":0,"maximum":1440,"description":"The latest a booking can start, in minutes before each close."},"same_day_bookings":{"default":true,"type":"boolean"},"same_day_cutoff_minutes":{"default":60,"description":"Default 60, as Stampede starts a new type.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"buffer_minutes":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Kept clear on a table before and after each booking, in minutes: 0 (none) or 15 to 120 in steps of 15."},"slot_interval_minutes":{"default":null,"anyOf":[{"anyOf":[{"type":"number","const":15},{"type":"number","const":30}]},{"type":"null"}],"description":"How far apart the booking times guests are offered are, 15 or 30, for this type only. Null: follow the venue's."},"amendments_allowed":{"default":false,"type":"boolean","description":"Guests can change their own booking."},"table_ids":{"default":[],"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"Booking table IDs from `booking_tables.list`. Empty: any table."},"upgrade_ids":{"default":[],"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"The upgrades guests booking it are offered, from `booking_upgrades.list`. Replaces the whole list. Empty: none."}},"required":["name","party_size","duration_minutes","hours"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"active":{"type":"boolean","description":"Inactive types take no new bookings."},"offered_online":{"type":"boolean","description":"Guests can book it themselves. False: staff only."},"enquiries_only":{"type":"boolean","description":"Guests send an enquiry instead of booking."},"party_size":{"type":"object","properties":{"min":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["min","max"],"additionalProperties":false},"duration_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long a booking lasts unless its party size says otherwise."},"durations_by_party_size":{"type":"array","items":{"type":"object","properties":{"party_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["party_size","minutes"],"additionalProperties":false},"description":"Longer or shorter stays for some party sizes. Empty when every size gets `duration_minutes`."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"closes":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."}},"required":["day","opens","closes"],"additionalProperties":false},"description":"When bookings can start, on the venue's clock. A day with no entries takes no bookings. A close at or before its open runs past midnight."},"last_booking_minutes_before_close":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The latest a booking can start, in minutes before each close."},"same_day_bookings":{"type":"boolean"},"slot_interval_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How far apart the booking times guests are offered are, 15 or 30: the type's own, or the venue's (`own_slot_interval`)."},"own_slot_interval":{"type":"boolean","description":"True: `slot_interval_minutes` is set on this type. False: it follows the venue's."},"same_day_cutoff_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"When `same_day_bookings` is true: a booking on the day must be made at least this many minutes before it starts. 0: up to the start."},"buffer_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Kept clear on a table before and after each booking, so the next party is not seated too close. 0: none. It applies to what guests can book online; staff can book into it."},"buffer_varies_by_party_size":{"type":"boolean","description":"Some party sizes have a buffer of their own, set in Stampede, in place of `buffer_minutes`."},"amendments_allowed":{"type":"boolean","description":"Guests can change their own booking."},"tables":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"description":"The tables it can use. Empty means any table."},"takes_payment":{"type":"object","properties":{"deposit":{"type":"boolean"},"cancellation_charge":{"type":"boolean"},"full_payment":{"type":"boolean"}},"required":["deposit","cancellation_charge","full_payment"],"additionalProperties":false,"description":"Which money the type asks for: at most one is true, the same as `payment.type`. Each starts at a party size (`payment.from_party_size`), and a special date can change them. A booking made through this API takes nothing unless it asks for a payment link (`payment_link`)."},"payment":{"type":"object","properties":{"type":{"type":"string","enum":["none","deposit","cancellation_charge","full_payment"],"description":"What the guest is asked for when booking: nothing, a deposit, a card held for a cancellation charge, or the full price. Only one."},"amount":{"anyOf":[{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},{"type":"null"}],"description":"Per guest or per booking (`per`). Null when `type` is `none`."},"per":{"anyOf":[{"type":"string","enum":["guest","booking"]},{"type":"null"}],"description":"`guest`: the amount times the party size. `booking`: the amount once."},"from_party_size":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Parties this size or larger are asked for it; smaller ones book with nothing to pay."},"free_cancellation_hours":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Cancellation charge only: cancelling more than this many hours before the booking costs nothing. Null for the other types."},"terms":{"description":"Terms the guest accepts before booking. Null: none are shown.","type":["string","null"]}},"required":["type","amount","per","from_party_size","free_cancellation_hours","terms"],"additionalProperties":false,"description":"The money the type asks for. A special date can change it on its days. A booking made through this API takes nothing unless it asks for a payment link (`payment_link`)."},"cover_limits":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"active":{"type":"boolean","description":"Off: no limit that day, and its windows are kept for later."},"windows":{"maxItems":96,"type":"array","items":{"type":"object","properties":{"from":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"When the window starts, on the venue's clock, on a 15-minute mark."},"to":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"When it ends, later the same day, on a 15-minute mark."},"max_covers":{"type":"integer","minimum":1,"maximum":10000,"description":"The most guests whose bookings start in the window."}},"required":["from","to","max_covers"],"additionalProperties":false}}},"required":["day","active","windows"],"additionalProperties":false},"description":"Limits on guests in windows of each weekday, every day of the week in order. They apply only while the venue's time-slot rules are off (`time_slot_rules_active` on `booking_settings.get`), and only if the type counts towards covers, counting only this type's bookings. A special date with limits of its own replaces them on its days. The venue's own limits (`booking_settings`) apply as well."},"upgrade_ids":{"type":"array","items":{"type":"string"},"description":"The upgrades guests booking it are offered (`booking_upgrades.list`), when they are active and suit the party size and time."},"included_upgrades":{"type":"array","items":{"type":"object","properties":{"upgrade_id":{"type":"string"},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"per":{"type":"string","enum":["person","booking"],"description":"`person`: `quantity` for each guest in the party. `booking`: `quantity` for the booking."}},"required":["upgrade_id","quantity","per"],"additionalProperties":false},"description":"Upgrades a package booking type includes in its price, at no extra charge. Always empty for a type that is not a package: packages are set up in Stampede."},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Its place in the list guests see."}},"required":["id","name","description","active","offered_online","enquiries_only","party_size","duration_minutes","durations_by_party_size","hours","last_booking_minutes_before_close","same_day_bookings","slot_interval_minutes","own_slot_interval","same_day_cutoff_minutes","buffer_minutes","buffer_varies_by_party_size","amendments_allowed","tables","takes_payment","payment","cover_limits","upgrade_ids","included_upgrades","position"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/booking-types/{booking_type_id}":{"get":{"operationId":"booking_types.get","tags":["Booking setup"],"summary":"Get a booking type","security":[{"oauth2":["bookings:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"booking_type_id","in":"path","required":true,"description":"The booking type ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"active":{"type":"boolean","description":"Inactive types take no new bookings."},"offered_online":{"type":"boolean","description":"Guests can book it themselves. False: staff only."},"enquiries_only":{"type":"boolean","description":"Guests send an enquiry instead of booking."},"party_size":{"type":"object","properties":{"min":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["min","max"],"additionalProperties":false},"duration_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long a booking lasts unless its party size says otherwise."},"durations_by_party_size":{"type":"array","items":{"type":"object","properties":{"party_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["party_size","minutes"],"additionalProperties":false},"description":"Longer or shorter stays for some party sizes. Empty when every size gets `duration_minutes`."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"closes":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."}},"required":["day","opens","closes"],"additionalProperties":false},"description":"When bookings can start, on the venue's clock. A day with no entries takes no bookings. A close at or before its open runs past midnight."},"last_booking_minutes_before_close":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The latest a booking can start, in minutes before each close."},"same_day_bookings":{"type":"boolean"},"slot_interval_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How far apart the booking times guests are offered are, 15 or 30: the type's own, or the venue's (`own_slot_interval`)."},"own_slot_interval":{"type":"boolean","description":"True: `slot_interval_minutes` is set on this type. False: it follows the venue's."},"same_day_cutoff_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"When `same_day_bookings` is true: a booking on the day must be made at least this many minutes before it starts. 0: up to the start."},"buffer_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Kept clear on a table before and after each booking, so the next party is not seated too close. 0: none. It applies to what guests can book online; staff can book into it."},"buffer_varies_by_party_size":{"type":"boolean","description":"Some party sizes have a buffer of their own, set in Stampede, in place of `buffer_minutes`."},"amendments_allowed":{"type":"boolean","description":"Guests can change their own booking."},"tables":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"description":"The tables it can use. Empty means any table."},"takes_payment":{"type":"object","properties":{"deposit":{"type":"boolean"},"cancellation_charge":{"type":"boolean"},"full_payment":{"type":"boolean"}},"required":["deposit","cancellation_charge","full_payment"],"additionalProperties":false,"description":"Which money the type asks for: at most one is true, the same as `payment.type`. Each starts at a party size (`payment.from_party_size`), and a special date can change them. A booking made through this API takes nothing unless it asks for a payment link (`payment_link`)."},"payment":{"type":"object","properties":{"type":{"type":"string","enum":["none","deposit","cancellation_charge","full_payment"],"description":"What the guest is asked for when booking: nothing, a deposit, a card held for a cancellation charge, or the full price. Only one."},"amount":{"anyOf":[{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},{"type":"null"}],"description":"Per guest or per booking (`per`). Null when `type` is `none`."},"per":{"anyOf":[{"type":"string","enum":["guest","booking"]},{"type":"null"}],"description":"`guest`: the amount times the party size. `booking`: the amount once."},"from_party_size":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Parties this size or larger are asked for it; smaller ones book with nothing to pay."},"free_cancellation_hours":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Cancellation charge only: cancelling more than this many hours before the booking costs nothing. Null for the other types."},"terms":{"description":"Terms the guest accepts before booking. Null: none are shown.","type":["string","null"]}},"required":["type","amount","per","from_party_size","free_cancellation_hours","terms"],"additionalProperties":false,"description":"The money the type asks for. A special date can change it on its days. A booking made through this API takes nothing unless it asks for a payment link (`payment_link`)."},"cover_limits":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"active":{"type":"boolean","description":"Off: no limit that day, and its windows are kept for later."},"windows":{"maxItems":96,"type":"array","items":{"type":"object","properties":{"from":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"When the window starts, on the venue's clock, on a 15-minute mark."},"to":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"When it ends, later the same day, on a 15-minute mark."},"max_covers":{"type":"integer","minimum":1,"maximum":10000,"description":"The most guests whose bookings start in the window."}},"required":["from","to","max_covers"],"additionalProperties":false}}},"required":["day","active","windows"],"additionalProperties":false},"description":"Limits on guests in windows of each weekday, every day of the week in order. They apply only while the venue's time-slot rules are off (`time_slot_rules_active` on `booking_settings.get`), and only if the type counts towards covers, counting only this type's bookings. A special date with limits of its own replaces them on its days. The venue's own limits (`booking_settings`) apply as well."},"upgrade_ids":{"type":"array","items":{"type":"string"},"description":"The upgrades guests booking it are offered (`booking_upgrades.list`), when they are active and suit the party size and time."},"included_upgrades":{"type":"array","items":{"type":"object","properties":{"upgrade_id":{"type":"string"},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"per":{"type":"string","enum":["person","booking"],"description":"`person`: `quantity` for each guest in the party. `booking`: `quantity` for the booking."}},"required":["upgrade_id","quantity","per"],"additionalProperties":false},"description":"Upgrades a package booking type includes in its price, at no extra charge. Always empty for a type that is not a package: packages are set up in Stampede."},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Its place in the list guests see."}},"required":["id","name","description","active","offered_online","enquiries_only","party_size","duration_minutes","durations_by_party_size","hours","last_booking_minutes_before_close","same_day_bookings","slot_interval_minutes","own_slot_interval","same_day_cutoff_minutes","buffer_minutes","buffer_varies_by_party_size","amendments_allowed","tables","takes_payment","payment","cover_limits","upgrade_ids","included_upgrades","position"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"booking_types.update","tags":["Booking setup"],"summary":"Change a booking type","description":"Changes the fields sent and nothing else. `hours`, `durations_by_party_size` and `table_ids` each replace the whole list. `payment` sets the one kind of money the type asks for (a deposit, a cancellation charge or full payment) or `none`, in GBP; turning one on needs the venue to take payments (a 409 otherwise). Each day in `cover_limits` replaces that day; other days stay as they are. They apply only while the venue's time-slot rules are off (`time_slot_rules_active` on `booking_settings.get`), and only if the type counts towards covers, counting only this type's bookings. A special date with limits of its own replaces them on its days. The venue's own limits (`booking_settings`) apply as well. A new charge applies only to bookings made from then on: bookings already made keep what they agreed to, and no refund or payment link is made or changed. `upgrade_ids` and `included_upgrades` each replace the whole list; only a package includes upgrades. Menus and anything else this API does not show stay as they are. Bookings already made keep their times, tables and upgrades; new ones follow the change.","security":[{"oauth2":["booking_setup:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"booking_type_id","in":"path","required":true,"description":"The booking type ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"description":"Shown to guests choosing a type."},"active":{"type":"boolean","description":"Inactive types take no new bookings."},"offered_online":{"type":"boolean","description":"Guests can book it themselves. False: staff only."},"enquiries_only":{"type":"boolean","description":"Guests send an enquiry instead of booking."},"party_size":{"type":"object","properties":{"min":{"type":"integer","minimum":1,"maximum":1000},"max":{"type":"integer","minimum":1,"maximum":1000}},"required":["min","max"]},"duration_minutes":{"type":"integer","minimum":5,"maximum":1440,"multipleOf":5,"description":"How long a booking lasts, in minutes: a multiple of 5."},"durations_by_party_size":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"party_size":{"type":"integer","minimum":1,"maximum":1000},"minutes":{"type":"integer","minimum":5,"maximum":1440,"multipleOf":5,"description":"How long a party this size stays, in minutes: a multiple of 5."}},"required":["party_size","minutes"]},"description":"Longer or shorter stays for some party sizes. Empty: every size gets `duration_minutes`."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"closes":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."}},"required":["day","opens","closes"]},"description":"When bookings can start, on the venue's clock. A day with no entries takes no bookings. A close at or before its open runs past midnight."},"last_booking_minutes_before_close":{"type":"integer","minimum":0,"maximum":1440,"description":"The latest a booking can start, in minutes before each close."},"same_day_bookings":{"type":"boolean"},"same_day_cutoff_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"When same-day bookings are on, the least notice a booking on the day must give, in minutes: one of 0, 30, 60, 120, 180, 240, 360, 720, 1440, 2880."},"slot_interval_minutes":{"anyOf":[{"anyOf":[{"type":"number","const":15},{"type":"number","const":30}]},{"type":"null"}],"description":"How far apart the booking times guests are offered are, 15 or 30, for this type only. Null: follow the venue's."},"buffer_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Kept clear on a table before and after each booking, in minutes: 0 (none) or 15 to 120 in steps of 15."},"amendments_allowed":{"type":"boolean","description":"Guests can change their own booking."},"table_ids":{"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"Booking table IDs from `booking_tables.list`. Empty: any table."},"payment":{"type":"object","properties":{"type":{"type":"string","enum":["none","deposit","cancellation_charge","full_payment"],"description":"`none` stops the type taking money."},"amount":{"description":"In GBP, minor units: 1500 is £15.00. A deposit or cancellation charge: 50 to 20000 in steps of 50, or up to 50000 in steps of 100. Full payment: 500 to 30000 in steps of 500.","type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"]},"per":{"description":"`guest`: the amount times the party size. `booking`: the amount once.","type":"string","enum":["guest","booking"]},"from_party_size":{"description":"Parties this size or larger are asked for it, 1 to 20.","type":"integer","minimum":1,"maximum":20},"free_cancellation_hours":{"description":"Cancellation charge only: cancelling more than this many hours before costs nothing. One of 1, 2, 6, 12, 24, 48, 72.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"terms":{"description":"Terms the guest must accept before booking. Null: show none. Left out: as they are.","anyOf":[{"type":"string","minLength":1,"maxLength":10000},{"type":"null"}]}},"required":["type"],"additionalProperties":false,"description":"The money the type asks for: one of a deposit, a cancellation charge or full payment, or none. Turning one on, or changing from one to another, needs `amount`, `per` and `from_party_size` (and `free_cancellation_hours` for a cancellation charge); a change to the same type keeps what is not sent."},"cover_limits":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"active":{"type":"boolean","description":"Off: no limit that day, and its windows are kept for later."},"windows":{"maxItems":96,"type":"array","items":{"type":"object","properties":{"from":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"When the window starts, on the venue's clock, on a 15-minute mark."},"to":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"When it ends, later the same day, on a 15-minute mark."},"max_covers":{"type":"integer","minimum":1,"maximum":10000,"description":"The most guests whose bookings start in the window."}},"required":["from","to","max_covers"]}}},"required":["day","active","windows"]},"description":"The days to change, each replacing that day. Days not sent stay as they are."},"upgrade_ids":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"The upgrades guests booking it are offered, from `booking_upgrades.list`. Replaces the whole list. Empty: none."},"included_upgrades":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"upgrade_id":{"type":"string","minLength":1,"maxLength":64,"description":"From `booking_upgrades.list`."},"quantity":{"type":"integer","minimum":1,"maximum":100},"per":{"type":"string","enum":["person","booking"],"description":"`person`: `quantity` for each guest. `booking`: `quantity` for the booking."}},"required":["upgrade_id","quantity","per"]},"description":"What a package booking type includes in its price, in order. Replaces the whole list. Only a package (set up in Stampede) includes upgrades."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"active":{"type":"boolean","description":"Inactive types take no new bookings."},"offered_online":{"type":"boolean","description":"Guests can book it themselves. False: staff only."},"enquiries_only":{"type":"boolean","description":"Guests send an enquiry instead of booking."},"party_size":{"type":"object","properties":{"min":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["min","max"],"additionalProperties":false},"duration_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long a booking lasts unless its party size says otherwise."},"durations_by_party_size":{"type":"array","items":{"type":"object","properties":{"party_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["party_size","minutes"],"additionalProperties":false},"description":"Longer or shorter stays for some party sizes. Empty when every size gets `duration_minutes`."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"closes":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."}},"required":["day","opens","closes"],"additionalProperties":false},"description":"When bookings can start, on the venue's clock. A day with no entries takes no bookings. A close at or before its open runs past midnight."},"last_booking_minutes_before_close":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The latest a booking can start, in minutes before each close."},"same_day_bookings":{"type":"boolean"},"slot_interval_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How far apart the booking times guests are offered are, 15 or 30: the type's own, or the venue's (`own_slot_interval`)."},"own_slot_interval":{"type":"boolean","description":"True: `slot_interval_minutes` is set on this type. False: it follows the venue's."},"same_day_cutoff_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"When `same_day_bookings` is true: a booking on the day must be made at least this many minutes before it starts. 0: up to the start."},"buffer_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Kept clear on a table before and after each booking, so the next party is not seated too close. 0: none. It applies to what guests can book online; staff can book into it."},"buffer_varies_by_party_size":{"type":"boolean","description":"Some party sizes have a buffer of their own, set in Stampede, in place of `buffer_minutes`."},"amendments_allowed":{"type":"boolean","description":"Guests can change their own booking."},"tables":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"description":"The tables it can use. Empty means any table."},"takes_payment":{"type":"object","properties":{"deposit":{"type":"boolean"},"cancellation_charge":{"type":"boolean"},"full_payment":{"type":"boolean"}},"required":["deposit","cancellation_charge","full_payment"],"additionalProperties":false,"description":"Which money the type asks for: at most one is true, the same as `payment.type`. Each starts at a party size (`payment.from_party_size`), and a special date can change them. A booking made through this API takes nothing unless it asks for a payment link (`payment_link`)."},"payment":{"type":"object","properties":{"type":{"type":"string","enum":["none","deposit","cancellation_charge","full_payment"],"description":"What the guest is asked for when booking: nothing, a deposit, a card held for a cancellation charge, or the full price. Only one."},"amount":{"anyOf":[{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},{"type":"null"}],"description":"Per guest or per booking (`per`). Null when `type` is `none`."},"per":{"anyOf":[{"type":"string","enum":["guest","booking"]},{"type":"null"}],"description":"`guest`: the amount times the party size. `booking`: the amount once."},"from_party_size":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Parties this size or larger are asked for it; smaller ones book with nothing to pay."},"free_cancellation_hours":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Cancellation charge only: cancelling more than this many hours before the booking costs nothing. Null for the other types."},"terms":{"description":"Terms the guest accepts before booking. Null: none are shown.","type":["string","null"]}},"required":["type","amount","per","from_party_size","free_cancellation_hours","terms"],"additionalProperties":false,"description":"The money the type asks for. A special date can change it on its days. A booking made through this API takes nothing unless it asks for a payment link (`payment_link`)."},"cover_limits":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"active":{"type":"boolean","description":"Off: no limit that day, and its windows are kept for later."},"windows":{"maxItems":96,"type":"array","items":{"type":"object","properties":{"from":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"When the window starts, on the venue's clock, on a 15-minute mark."},"to":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"When it ends, later the same day, on a 15-minute mark."},"max_covers":{"type":"integer","minimum":1,"maximum":10000,"description":"The most guests whose bookings start in the window."}},"required":["from","to","max_covers"],"additionalProperties":false}}},"required":["day","active","windows"],"additionalProperties":false},"description":"Limits on guests in windows of each weekday, every day of the week in order. They apply only while the venue's time-slot rules are off (`time_slot_rules_active` on `booking_settings.get`), and only if the type counts towards covers, counting only this type's bookings. A special date with limits of its own replaces them on its days. The venue's own limits (`booking_settings`) apply as well."},"upgrade_ids":{"type":"array","items":{"type":"string"},"description":"The upgrades guests booking it are offered (`booking_upgrades.list`), when they are active and suit the party size and time."},"included_upgrades":{"type":"array","items":{"type":"object","properties":{"upgrade_id":{"type":"string"},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"per":{"type":"string","enum":["person","booking"],"description":"`person`: `quantity` for each guest in the party. `booking`: `quantity` for the booking."}},"required":["upgrade_id","quantity","per"],"additionalProperties":false},"description":"Upgrades a package booking type includes in its price, at no extra charge. Always empty for a type that is not a package: packages are set up in Stampede."},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Its place in the list guests see."}},"required":["id","name","description","active","offered_online","enquiries_only","party_size","duration_minutes","durations_by_party_size","hours","last_booking_minutes_before_close","same_day_bookings","slot_interval_minutes","own_slot_interval","same_day_cutoff_minutes","buffer_minutes","buffer_varies_by_party_size","amendments_allowed","tables","takes_payment","payment","cover_limits","upgrade_ids","included_upgrades","position"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"booking_types.delete","tags":["Booking setup"],"summary":"Delete a booking type","description":"Removes a booking type so it can no longer be booked. Bookings already made under it are kept. To stop guests booking it for now, set `active` to false instead. The venue’s last active type cannot be deleted.","security":[{"oauth2":["booking_setup:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"booking_type_id","in":"path","required":true,"description":"The booking type ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/special-dates":{"get":{"operationId":"special_dates.list","tags":["Booking setup"],"summary":"List a venue's special dates","description":"Days that change a venue's booking rules (Christmas, a private hire, a closure), earliest first. Each overrides the booking types it lists, on the days it covers: its hours replace theirs, and a weekday with no hours is closed. `from` and `to` keep the ones that touch those days.","security":[{"oauth2":["bookings:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"from","in":"query","required":false,"description":"A date on the venue's own clock, YYYY-MM-DD.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"description":"A date on the venue's own clock, YYYY-MM-DD.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"active":{"type":"boolean","description":"Only active special dates change anything."},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The first day it covers."},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The last day it covers."},"dates":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date on the venue's own clock, YYYY-MM-DD."}},{"type":"null"}],"description":"The days it falls on, when it is not every day from `from` to `to`. Null: every day."},"booking_types":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"description":"The booking types it overrides. Availability for a booking type not listed here ignores it."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"closes":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."}},"required":["day","opens","closes"],"additionalProperties":false},"description":"Booking hours on the days it covers, replacing the booking type's. A weekday with no entries is closed on those days."},"party_size":{"type":"object","properties":{"min":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["min","max"],"additionalProperties":false},"duration_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"takes_payment":{"type":"object","properties":{"deposit":{"type":"boolean"},"cancellation_charge":{"type":"boolean"},"full_payment":{"type":"boolean"}},"required":["deposit","cancellation_charge","full_payment"],"additionalProperties":false,"description":"Money it can ask for. Each charge starts at a party size set in Stampede. A booking made through this API takes nothing unless it asks for a payment link (`payment_link`)."},"upgrade_ids":{"type":"array","items":{"type":"string"},"description":"Upgrades offered as well as the booking types' own on its days, for the types it lists (`booking_upgrades.list`). Where two special dates cover a day, the newer one's."}},"required":["id","name","active","from","to","dates","booking_types","hours","party_size","duration_minutes","takes_payment","upgrade_ids"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"special_dates.create","tags":["Booking setup"],"summary":"Add a special date","description":"Changes the booking rules on some days for the booking types it lists: Christmas hours, a closure, a private hire. Its hours replace those types' hours on its days; `hours: []` closes them. It takes no payment of its own: that is set up in Stampede.","security":[{"oauth2":["booking_setup:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"active":{"default":true,"type":"boolean","description":"Only active special dates change anything."},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The first day it covers."},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The last day it covers."},"dates":{"anyOf":[{"minItems":1,"maxItems":366,"type":"array","items":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date on the venue's own clock, YYYY-MM-DD."}},{"type":"null"}],"description":"Only these days, instead of every day from `from` to `to`. Null: every day."},"booking_type_ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"The booking types it overrides, from `booking_types.list`. Types not listed ignore it."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"closes":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."}},"required":["day","opens","closes"]},"description":"Booking hours on its days, replacing the listed types' hours. A weekday with no entries is closed: send `[]` to close every day it covers."},"party_size":{"description":"Default: the widest range of the types it lists.","type":"object","properties":{"min":{"type":"integer","minimum":1,"maximum":1000},"max":{"type":"integer","minimum":1,"maximum":1000}},"required":["min","max"]},"duration_minutes":{"description":"Default: the first listed type’s.","type":"integer","minimum":5,"maximum":1440,"multipleOf":5},"upgrade_ids":{"default":[],"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"Upgrades offered on its days as well as the listed types' own, from `booking_upgrades.list`. Replaces the whole list. Empty: only the types' own."}},"required":["name","booking_type_ids","hours"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"active":{"type":"boolean","description":"Only active special dates change anything."},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The first day it covers."},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The last day it covers."},"dates":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date on the venue's own clock, YYYY-MM-DD."}},{"type":"null"}],"description":"The days it falls on, when it is not every day from `from` to `to`. Null: every day."},"booking_types":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"description":"The booking types it overrides. Availability for a booking type not listed here ignores it."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"closes":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."}},"required":["day","opens","closes"],"additionalProperties":false},"description":"Booking hours on the days it covers, replacing the booking type's. A weekday with no entries is closed on those days."},"party_size":{"type":"object","properties":{"min":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["min","max"],"additionalProperties":false},"duration_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"takes_payment":{"type":"object","properties":{"deposit":{"type":"boolean"},"cancellation_charge":{"type":"boolean"},"full_payment":{"type":"boolean"}},"required":["deposit","cancellation_charge","full_payment"],"additionalProperties":false,"description":"Money it can ask for. Each charge starts at a party size set in Stampede. A booking made through this API takes nothing unless it asks for a payment link (`payment_link`)."},"upgrade_ids":{"type":"array","items":{"type":"string"},"description":"Upgrades offered as well as the booking types' own on its days, for the types it lists (`booking_upgrades.list`). Where two special dates cover a day, the newer one's."}},"required":["id","name","active","from","to","dates","booking_types","hours","party_size","duration_minutes","takes_payment","upgrade_ids"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/special-dates/{special_date_id}":{"get":{"operationId":"special_dates.get","tags":["Booking setup"],"summary":"Get a special date","security":[{"oauth2":["bookings:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"special_date_id","in":"path","required":true,"description":"The special date ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"active":{"type":"boolean","description":"Only active special dates change anything."},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The first day it covers."},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The last day it covers."},"dates":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date on the venue's own clock, YYYY-MM-DD."}},{"type":"null"}],"description":"The days it falls on, when it is not every day from `from` to `to`. Null: every day."},"booking_types":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"description":"The booking types it overrides. Availability for a booking type not listed here ignores it."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"closes":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."}},"required":["day","opens","closes"],"additionalProperties":false},"description":"Booking hours on the days it covers, replacing the booking type's. A weekday with no entries is closed on those days."},"party_size":{"type":"object","properties":{"min":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["min","max"],"additionalProperties":false},"duration_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"takes_payment":{"type":"object","properties":{"deposit":{"type":"boolean"},"cancellation_charge":{"type":"boolean"},"full_payment":{"type":"boolean"}},"required":["deposit","cancellation_charge","full_payment"],"additionalProperties":false,"description":"Money it can ask for. Each charge starts at a party size set in Stampede. A booking made through this API takes nothing unless it asks for a payment link (`payment_link`)."},"upgrade_ids":{"type":"array","items":{"type":"string"},"description":"Upgrades offered as well as the booking types' own on its days, for the types it lists (`booking_upgrades.list`). Where two special dates cover a day, the newer one's."}},"required":["id","name","active","from","to","dates","booking_types","hours","party_size","duration_minutes","takes_payment","upgrade_ids"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"special_dates.update","tags":["Booking setup"],"summary":"Change a special date","description":"Changes the fields sent and nothing else. `hours`, `booking_type_ids` and `upgrade_ids` each replace the whole list; `dates`, or `from` and `to`, replace the days it covers. Money and anything else this API does not show stay as they are.","security":[{"oauth2":["booking_setup:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"special_date_id","in":"path","required":true,"description":"The special date ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"active":{"type":"boolean","description":"Only active special dates change anything."},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The first day it covers."},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The last day it covers."},"dates":{"anyOf":[{"minItems":1,"maxItems":366,"type":"array","items":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date on the venue's own clock, YYYY-MM-DD."}},{"type":"null"}],"description":"Only these days, instead of every day from `from` to `to`. Null: every day."},"booking_type_ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"The booking types it overrides, from `booking_types.list`. Types not listed ignore it."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"closes":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."}},"required":["day","opens","closes"]},"description":"Booking hours on its days, replacing the listed types' hours. A weekday with no entries is closed: send `[]` to close every day it covers."},"party_size":{"type":"object","properties":{"min":{"type":"integer","minimum":1,"maximum":1000},"max":{"type":"integer","minimum":1,"maximum":1000}},"required":["min","max"]},"duration_minutes":{"type":"integer","minimum":5,"maximum":1440,"multipleOf":5,"description":"How long a booking lasts on its days, in minutes: a multiple of 5."},"upgrade_ids":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"Upgrades offered on its days as well as the listed types' own, from `booking_upgrades.list`. Replaces the whole list. Empty: only the types' own."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"active":{"type":"boolean","description":"Only active special dates change anything."},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The first day it covers."},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The last day it covers."},"dates":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date on the venue's own clock, YYYY-MM-DD."}},{"type":"null"}],"description":"The days it falls on, when it is not every day from `from` to `to`. Null: every day."},"booking_types":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"description":"The booking types it overrides. Availability for a booking type not listed here ignores it."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"closes":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."}},"required":["day","opens","closes"],"additionalProperties":false},"description":"Booking hours on the days it covers, replacing the booking type's. A weekday with no entries is closed on those days."},"party_size":{"type":"object","properties":{"min":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["min","max"],"additionalProperties":false},"duration_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"takes_payment":{"type":"object","properties":{"deposit":{"type":"boolean"},"cancellation_charge":{"type":"boolean"},"full_payment":{"type":"boolean"}},"required":["deposit","cancellation_charge","full_payment"],"additionalProperties":false,"description":"Money it can ask for. Each charge starts at a party size set in Stampede. A booking made through this API takes nothing unless it asks for a payment link (`payment_link`)."},"upgrade_ids":{"type":"array","items":{"type":"string"},"description":"Upgrades offered as well as the booking types' own on its days, for the types it lists (`booking_upgrades.list`). Where two special dates cover a day, the newer one's."}},"required":["id","name","active","from","to","dates","booking_types","hours","party_size","duration_minutes","takes_payment","upgrade_ids"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"special_dates.delete","tags":["Booking setup"],"summary":"Delete a special date","description":"Removes a special date: its days go back to the booking types’ own rules. Bookings already made are kept.","security":[{"oauth2":["booking_setup:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"special_date_id","in":"path","required":true,"description":"The special date ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/events":{"get":{"operationId":"events.list","tags":["Booking setup"],"summary":"List a venue's events","description":"Events guests book a table for, such as a quiz night or a tasting, newest first. Ticketed events are not included. An event can stop some booking types being booked while it is on (`blocks_booking_types`).","security":[{"oauth2":["bookings:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"search","in":"query","required":false,"description":"Part of the name.","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"cursor","in":"query","required":false,"description":"The `cursor` from the previous page.","schema":{"type":"string","pattern":"^\\d{1,4}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"active":{"type":"boolean","description":"Inactive events take no new bookings."},"offered_online":{"type":"boolean","description":"Guests can book it themselves. False: staff only."},"enquiries_only":{"type":"boolean","description":"Guests send an enquiry instead of booking."},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The first day it covers."},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The last day it covers."},"dates":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date on the venue's own clock, YYYY-MM-DD."}},{"type":"null"}],"description":"The days it falls on, when it is not every day from `from` to `to`. Null: every day."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"closes":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."}},"required":["day","opens","closes"],"additionalProperties":false},"description":"When bookings for the event can start, on each weekday of its days."},"party_size":{"type":"object","properties":{"min":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["min","max"],"additionalProperties":false},"duration_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long a booking lasts unless its party size says otherwise."},"durations_by_party_size":{"type":"array","items":{"type":"object","properties":{"party_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["party_size","minutes"],"additionalProperties":false},"description":"Longer or shorter stays for some party sizes. Empty when every size gets `duration_minutes`."},"last_booking_minutes_before_close":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The latest a booking can start, in minutes before each close."},"slot_interval_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How far apart the booking times guests are offered are."},"same_day_bookings":{"type":"boolean"},"same_day_cutoff_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"When `same_day_bookings` is true: a booking on the day must be made at least this many minutes before it starts. 0: up to the start."},"buffer_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Kept clear on a table before and after each booking. 0: none. It applies to what guests can book online; staff can book into it."},"buffer_varies_by_party_size":{"type":"boolean","description":"Some party sizes have a buffer of their own, set in Stampede, in place of `buffer_minutes`."},"amendments_allowed":{"type":"boolean","description":"Guests can change their own booking."},"tables":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"description":"The tables it seats on. Empty means the venue's tables, unless `only_listed_tables` is true."},"combinations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"description":"The table combinations it seats on. Empty means the venue's combinations, unless `only_listed_tables` is true."},"only_listed_tables":{"type":"boolean","description":"True: it seats only on the tables and combinations listed, and an empty list means none of that kind."},"takes_payment":{"type":"object","properties":{"deposit":{"type":"boolean"},"cancellation_charge":{"type":"boolean"},"full_payment":{"type":"boolean"}},"required":["deposit","cancellation_charge","full_payment"],"additionalProperties":false,"description":"Money it can ask for. Each charge starts at a party size set in Stampede. A booking made through this API takes nothing unless it asks for a payment link (`payment_link`)."},"payment":{"type":"object","properties":{"type":{"type":"string","enum":["none","deposit","cancellation_charge","full_payment"],"description":"What the guest is asked for when booking: nothing, a deposit, a card held for a cancellation charge, or the full price. Only one."},"amount":{"anyOf":[{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},{"type":"null"}],"description":"Per guest or per booking (`per`). Null when `type` is `none`."},"per":{"anyOf":[{"type":"string","enum":["guest","booking"]},{"type":"null"}],"description":"`guest`: the amount times the party size. `booking`: the amount once."},"from_party_size":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Parties this size or larger are asked for it; smaller ones book with nothing to pay."},"free_cancellation_hours":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Cancellation charge only: cancelling more than this many hours before the booking costs nothing. Null for the other types."},"terms":{"description":"Terms the guest accepts before booking. Null: none are shown.","type":["string","null"]}},"required":["type","amount","per","from_party_size","free_cancellation_hours","terms"],"additionalProperties":false,"description":"The money the event asks for, as a booking type does. A booking made through this API takes nothing unless it asks for a payment link (`payment_link`)."},"blocks_booking_types":{"type":"object","properties":{"others":{"type":"string","enum":["not_blocked","full_day","during_event_hours"],"description":"What happens on its days to the booking types not listed below."},"listed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"blocked":{"type":"string","enum":["not_blocked","full_day","during_event_hours"]}},"required":["id","name","blocked"],"additionalProperties":false},"description":"Booking types the event names, and what happens to each."}},"required":["others","listed"],"additionalProperties":false,"description":"What the event stops guests booking on its days: `full_day`, only `during_event_hours`, or `not_blocked`."},"upgrade_ids":{"type":"array","items":{"type":"string"},"description":"The upgrades guests booking it are offered (`booking_upgrades.list`), when they are active and suit the party size and time."}},"required":["id","name","description","active","offered_online","enquiries_only","from","to","dates","hours","party_size","duration_minutes","durations_by_party_size","last_booking_minutes_before_close","slot_interval_minutes","same_day_bookings","same_day_cutoff_minutes","buffer_minutes","buffer_varies_by_party_size","amendments_allowed","tables","combinations","only_listed_tables","takes_payment","payment","blocks_booking_types","upgrade_ids"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"events.create","tags":["Booking setup"],"summary":"Add an event","description":"Adds an event guests book a table for, such as a quiz night or a tasting: its days (`from` and `to`, or `dates`), hours, party sizes and length, and what it blocks while it is on. It takes no money unless `payment` asks, in GBP; turning one on needs the venue to take payments (a 409 otherwise). It seats on the venue's tables unless `table_ids` or `combination_ids` say otherwise. It offers guests the upgrades in `upgrade_ids`. Ticketed events have their own tools. Images and menus are added in Stampede.","security":[{"oauth2":["booking_setup:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":250},"description":{"default":null,"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"description":"Shown to guests choosing the event."},"active":{"default":true,"type":"boolean","description":"Inactive events take no new bookings."},"offered_online":{"default":true,"type":"boolean","description":"Guests can book it themselves. False: staff only."},"enquiries_only":{"default":false,"type":"boolean","description":"Guests send an enquiry instead of booking."},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The first day it runs, with `to`, every day between."},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The last day it runs."},"dates":{"minItems":1,"maxItems":366,"type":"array","items":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date on the venue's own clock, YYYY-MM-DD."},"description":"Only these days, instead of every day from `from` to `to`."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"closes":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."}},"required":["day","opens","closes"]},"description":"When bookings for it can start, on each weekday of its days. A weekday with no entries takes no bookings for it."},"party_size":{"type":"object","properties":{"min":{"type":"integer","minimum":1,"maximum":1000},"max":{"type":"integer","minimum":1,"maximum":1000}},"required":["min","max"]},"duration_minutes":{"type":"integer","minimum":5,"maximum":1440,"multipleOf":5,"description":"How long a booking lasts, in minutes: a multiple of 5."},"durations_by_party_size":{"default":[],"maxItems":100,"type":"array","items":{"type":"object","properties":{"party_size":{"type":"integer","minimum":1,"maximum":1000},"minutes":{"type":"integer","minimum":5,"maximum":1440,"multipleOf":5,"description":"How long a party this size stays, in minutes: a multiple of 5."}},"required":["party_size","minutes"]},"description":"Longer or shorter stays for some party sizes. Empty: every size gets `duration_minutes`."},"last_booking_minutes_before_close":{"default":0,"type":"integer","minimum":0,"maximum":1440,"description":"The latest a booking can start, in minutes before each close."},"slot_interval_minutes":{"description":"How far apart the booking times guests are offered are, 15 or 30. Default: the venue's.","anyOf":[{"type":"number","const":15},{"type":"number","const":30}]},"same_day_bookings":{"default":true,"type":"boolean"},"same_day_cutoff_minutes":{"default":60,"description":"Default 60.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"buffer_minutes":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Kept clear on a table before and after each booking, in minutes: 0 (none) or 15 to 120 in steps of 15."},"amendments_allowed":{"default":false,"type":"boolean","description":"Guests can change their own booking."},"table_ids":{"default":[],"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"Booking table IDs from `booking_tables.list`. Empty: the venue's tables, unless `only_listed_tables`."},"combination_ids":{"default":[],"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"Table combination IDs from `table_combinations.list`. Empty: the venue's combinations, unless `only_listed_tables`."},"only_listed_tables":{"default":false,"type":"boolean","description":"True: it seats only on the tables and combinations listed, and an empty list means none of that kind."},"payment":{"description":"Default: none.","type":"object","properties":{"type":{"type":"string","enum":["none","deposit","cancellation_charge","full_payment"],"description":"`none` stops the type taking money."},"amount":{"description":"In GBP, minor units: 1500 is £15.00. A deposit or cancellation charge: 50 to 20000 in steps of 50, or up to 50000 in steps of 100. Full payment: 500 to 30000 in steps of 500.","type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"]},"per":{"description":"`guest`: the amount times the party size. `booking`: the amount once.","type":"string","enum":["guest","booking"]},"from_party_size":{"description":"Parties this size or larger are asked for it, 1 to 20.","type":"integer","minimum":1,"maximum":20},"free_cancellation_hours":{"description":"Cancellation charge only: cancelling more than this many hours before costs nothing. One of 1, 2, 6, 12, 24, 48, 72.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"terms":{"description":"Terms the guest must accept before booking. Null: show none. Left out: as they are.","anyOf":[{"type":"string","minLength":1,"maxLength":10000},{"type":"null"}]}},"required":["type"],"additionalProperties":false},"blocks_booking_types":{"description":"Default: it blocks no booking type.","type":"object","properties":{"others":{"type":"string","enum":["not_blocked","full_day","during_event_hours"],"description":"What happens on its days to every booking type not listed."},"listed":{"default":[],"description":"Booking types treated differently from `others`.","maxItems":100,"type":"array","items":{"type":"object","properties":{"booking_type_id":{"type":"string","minLength":1,"maxLength":64,"description":"From `booking_types.list`."},"blocked":{"type":"string","enum":["not_blocked","full_day","during_event_hours"]}},"required":["booking_type_id","blocked"]}}},"required":["others"],"additionalProperties":false},"upgrade_ids":{"default":[],"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"The upgrades guests booking it are offered, from `booking_upgrades.list`. Replaces the whole list. Empty: none."}},"required":["name","hours","party_size","duration_minutes"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"active":{"type":"boolean","description":"Inactive events take no new bookings."},"offered_online":{"type":"boolean","description":"Guests can book it themselves. False: staff only."},"enquiries_only":{"type":"boolean","description":"Guests send an enquiry instead of booking."},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The first day it covers."},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The last day it covers."},"dates":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date on the venue's own clock, YYYY-MM-DD."}},{"type":"null"}],"description":"The days it falls on, when it is not every day from `from` to `to`. Null: every day."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"closes":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."}},"required":["day","opens","closes"],"additionalProperties":false},"description":"When bookings for the event can start, on each weekday of its days."},"party_size":{"type":"object","properties":{"min":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["min","max"],"additionalProperties":false},"duration_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long a booking lasts unless its party size says otherwise."},"durations_by_party_size":{"type":"array","items":{"type":"object","properties":{"party_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["party_size","minutes"],"additionalProperties":false},"description":"Longer or shorter stays for some party sizes. Empty when every size gets `duration_minutes`."},"last_booking_minutes_before_close":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The latest a booking can start, in minutes before each close."},"slot_interval_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How far apart the booking times guests are offered are."},"same_day_bookings":{"type":"boolean"},"same_day_cutoff_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"When `same_day_bookings` is true: a booking on the day must be made at least this many minutes before it starts. 0: up to the start."},"buffer_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Kept clear on a table before and after each booking. 0: none. It applies to what guests can book online; staff can book into it."},"buffer_varies_by_party_size":{"type":"boolean","description":"Some party sizes have a buffer of their own, set in Stampede, in place of `buffer_minutes`."},"amendments_allowed":{"type":"boolean","description":"Guests can change their own booking."},"tables":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"description":"The tables it seats on. Empty means the venue's tables, unless `only_listed_tables` is true."},"combinations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"description":"The table combinations it seats on. Empty means the venue's combinations, unless `only_listed_tables` is true."},"only_listed_tables":{"type":"boolean","description":"True: it seats only on the tables and combinations listed, and an empty list means none of that kind."},"takes_payment":{"type":"object","properties":{"deposit":{"type":"boolean"},"cancellation_charge":{"type":"boolean"},"full_payment":{"type":"boolean"}},"required":["deposit","cancellation_charge","full_payment"],"additionalProperties":false,"description":"Money it can ask for. Each charge starts at a party size set in Stampede. A booking made through this API takes nothing unless it asks for a payment link (`payment_link`)."},"payment":{"type":"object","properties":{"type":{"type":"string","enum":["none","deposit","cancellation_charge","full_payment"],"description":"What the guest is asked for when booking: nothing, a deposit, a card held for a cancellation charge, or the full price. Only one."},"amount":{"anyOf":[{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},{"type":"null"}],"description":"Per guest or per booking (`per`). Null when `type` is `none`."},"per":{"anyOf":[{"type":"string","enum":["guest","booking"]},{"type":"null"}],"description":"`guest`: the amount times the party size. `booking`: the amount once."},"from_party_size":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Parties this size or larger are asked for it; smaller ones book with nothing to pay."},"free_cancellation_hours":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Cancellation charge only: cancelling more than this many hours before the booking costs nothing. Null for the other types."},"terms":{"description":"Terms the guest accepts before booking. Null: none are shown.","type":["string","null"]}},"required":["type","amount","per","from_party_size","free_cancellation_hours","terms"],"additionalProperties":false,"description":"The money the event asks for, as a booking type does. A booking made through this API takes nothing unless it asks for a payment link (`payment_link`)."},"blocks_booking_types":{"type":"object","properties":{"others":{"type":"string","enum":["not_blocked","full_day","during_event_hours"],"description":"What happens on its days to the booking types not listed below."},"listed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"blocked":{"type":"string","enum":["not_blocked","full_day","during_event_hours"]}},"required":["id","name","blocked"],"additionalProperties":false},"description":"Booking types the event names, and what happens to each."}},"required":["others","listed"],"additionalProperties":false,"description":"What the event stops guests booking on its days: `full_day`, only `during_event_hours`, or `not_blocked`."},"upgrade_ids":{"type":"array","items":{"type":"string"},"description":"The upgrades guests booking it are offered (`booking_upgrades.list`), when they are active and suit the party size and time."}},"required":["id","name","description","active","offered_online","enquiries_only","from","to","dates","hours","party_size","duration_minutes","durations_by_party_size","last_booking_minutes_before_close","slot_interval_minutes","same_day_bookings","same_day_cutoff_minutes","buffer_minutes","buffer_varies_by_party_size","amendments_allowed","tables","combinations","only_listed_tables","takes_payment","payment","blocks_booking_types","upgrade_ids"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/events/{event_id}":{"get":{"operationId":"events.get","tags":["Booking setup"],"summary":"Get an event","security":[{"oauth2":["bookings:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"event_id","in":"path","required":true,"description":"The event ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"active":{"type":"boolean","description":"Inactive events take no new bookings."},"offered_online":{"type":"boolean","description":"Guests can book it themselves. False: staff only."},"enquiries_only":{"type":"boolean","description":"Guests send an enquiry instead of booking."},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The first day it covers."},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The last day it covers."},"dates":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date on the venue's own clock, YYYY-MM-DD."}},{"type":"null"}],"description":"The days it falls on, when it is not every day from `from` to `to`. Null: every day."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"closes":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."}},"required":["day","opens","closes"],"additionalProperties":false},"description":"When bookings for the event can start, on each weekday of its days."},"party_size":{"type":"object","properties":{"min":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["min","max"],"additionalProperties":false},"duration_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long a booking lasts unless its party size says otherwise."},"durations_by_party_size":{"type":"array","items":{"type":"object","properties":{"party_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["party_size","minutes"],"additionalProperties":false},"description":"Longer or shorter stays for some party sizes. Empty when every size gets `duration_minutes`."},"last_booking_minutes_before_close":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The latest a booking can start, in minutes before each close."},"slot_interval_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How far apart the booking times guests are offered are."},"same_day_bookings":{"type":"boolean"},"same_day_cutoff_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"When `same_day_bookings` is true: a booking on the day must be made at least this many minutes before it starts. 0: up to the start."},"buffer_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Kept clear on a table before and after each booking. 0: none. It applies to what guests can book online; staff can book into it."},"buffer_varies_by_party_size":{"type":"boolean","description":"Some party sizes have a buffer of their own, set in Stampede, in place of `buffer_minutes`."},"amendments_allowed":{"type":"boolean","description":"Guests can change their own booking."},"tables":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"description":"The tables it seats on. Empty means the venue's tables, unless `only_listed_tables` is true."},"combinations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"description":"The table combinations it seats on. Empty means the venue's combinations, unless `only_listed_tables` is true."},"only_listed_tables":{"type":"boolean","description":"True: it seats only on the tables and combinations listed, and an empty list means none of that kind."},"takes_payment":{"type":"object","properties":{"deposit":{"type":"boolean"},"cancellation_charge":{"type":"boolean"},"full_payment":{"type":"boolean"}},"required":["deposit","cancellation_charge","full_payment"],"additionalProperties":false,"description":"Money it can ask for. Each charge starts at a party size set in Stampede. A booking made through this API takes nothing unless it asks for a payment link (`payment_link`)."},"payment":{"type":"object","properties":{"type":{"type":"string","enum":["none","deposit","cancellation_charge","full_payment"],"description":"What the guest is asked for when booking: nothing, a deposit, a card held for a cancellation charge, or the full price. Only one."},"amount":{"anyOf":[{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},{"type":"null"}],"description":"Per guest or per booking (`per`). Null when `type` is `none`."},"per":{"anyOf":[{"type":"string","enum":["guest","booking"]},{"type":"null"}],"description":"`guest`: the amount times the party size. `booking`: the amount once."},"from_party_size":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Parties this size or larger are asked for it; smaller ones book with nothing to pay."},"free_cancellation_hours":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Cancellation charge only: cancelling more than this many hours before the booking costs nothing. Null for the other types."},"terms":{"description":"Terms the guest accepts before booking. Null: none are shown.","type":["string","null"]}},"required":["type","amount","per","from_party_size","free_cancellation_hours","terms"],"additionalProperties":false,"description":"The money the event asks for, as a booking type does. A booking made through this API takes nothing unless it asks for a payment link (`payment_link`)."},"blocks_booking_types":{"type":"object","properties":{"others":{"type":"string","enum":["not_blocked","full_day","during_event_hours"],"description":"What happens on its days to the booking types not listed below."},"listed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"blocked":{"type":"string","enum":["not_blocked","full_day","during_event_hours"]}},"required":["id","name","blocked"],"additionalProperties":false},"description":"Booking types the event names, and what happens to each."}},"required":["others","listed"],"additionalProperties":false,"description":"What the event stops guests booking on its days: `full_day`, only `during_event_hours`, or `not_blocked`."},"upgrade_ids":{"type":"array","items":{"type":"string"},"description":"The upgrades guests booking it are offered (`booking_upgrades.list`), when they are active and suit the party size and time."}},"required":["id","name","description","active","offered_online","enquiries_only","from","to","dates","hours","party_size","duration_minutes","durations_by_party_size","last_booking_minutes_before_close","slot_interval_minutes","same_day_bookings","same_day_cutoff_minutes","buffer_minutes","buffer_varies_by_party_size","amendments_allowed","tables","combinations","only_listed_tables","takes_payment","payment","blocks_booking_types","upgrade_ids"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"events.update","tags":["Booking setup"],"summary":"Change an event","description":"Changes the fields sent and nothing else. `hours`, `durations_by_party_size`, `table_ids`, `combination_ids`, `blocks_booking_types` and `upgrade_ids` each replace the whole of what they set; `dates`, or `from` and `to`, replace the days it runs. `payment` sets the one kind of money it asks for, or `none`, in GBP; turning one on needs the venue to take payments (a 409 otherwise). A change applies to bookings made from then on: bookings already made keep their times, tables, upgrades and the money they agreed to. Images, menus and anything else this API does not show stay as they are. A ticketed event is not found here.","security":[{"oauth2":["booking_setup:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"event_id","in":"path","required":true,"description":"The event ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":250},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"description":"Shown to guests choosing the event."},"active":{"type":"boolean","description":"Inactive events take no new bookings."},"offered_online":{"type":"boolean","description":"Guests can book it themselves. False: staff only."},"enquiries_only":{"type":"boolean","description":"Guests send an enquiry instead of booking."},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The first day it runs, with `to`, every day between."},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The last day it runs."},"dates":{"minItems":1,"maxItems":366,"type":"array","items":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date on the venue's own clock, YYYY-MM-DD."},"description":"Only these days, instead of every day from `from` to `to`."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"closes":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."}},"required":["day","opens","closes"]},"description":"When bookings for it can start, on each weekday of its days. A weekday with no entries takes no bookings for it."},"party_size":{"type":"object","properties":{"min":{"type":"integer","minimum":1,"maximum":1000},"max":{"type":"integer","minimum":1,"maximum":1000}},"required":["min","max"]},"duration_minutes":{"type":"integer","minimum":5,"maximum":1440,"multipleOf":5,"description":"How long a booking lasts, in minutes: a multiple of 5."},"durations_by_party_size":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"party_size":{"type":"integer","minimum":1,"maximum":1000},"minutes":{"type":"integer","minimum":5,"maximum":1440,"multipleOf":5,"description":"How long a party this size stays, in minutes: a multiple of 5."}},"required":["party_size","minutes"]},"description":"Longer or shorter stays for some party sizes. Empty: every size gets `duration_minutes`."},"last_booking_minutes_before_close":{"type":"integer","minimum":0,"maximum":1440,"description":"The latest a booking can start, in minutes before each close."},"slot_interval_minutes":{"anyOf":[{"type":"number","const":15},{"type":"number","const":30}],"description":"How far apart the booking times guests are offered are, 15 or 30."},"same_day_bookings":{"type":"boolean"},"same_day_cutoff_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"When same-day bookings are on, the least notice a booking on the day must give, in minutes: one of 0, 30, 60, 120, 180, 240, 360, 720, 1440, 2880."},"buffer_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Kept clear on a table before and after each booking, in minutes: 0 (none) or 15 to 120 in steps of 15."},"amendments_allowed":{"type":"boolean","description":"Guests can change their own booking."},"table_ids":{"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"Booking table IDs from `booking_tables.list`. Empty: the venue's tables, unless `only_listed_tables`."},"combination_ids":{"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"Table combination IDs from `table_combinations.list`. Empty: the venue's combinations, unless `only_listed_tables`."},"only_listed_tables":{"type":"boolean","description":"True: it seats only on the tables and combinations listed, and an empty list means none of that kind."},"payment":{"type":"object","properties":{"type":{"type":"string","enum":["none","deposit","cancellation_charge","full_payment"],"description":"`none` stops the type taking money."},"amount":{"description":"In GBP, minor units: 1500 is £15.00. A deposit or cancellation charge: 50 to 20000 in steps of 50, or up to 50000 in steps of 100. Full payment: 500 to 30000 in steps of 500.","type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"]},"per":{"description":"`guest`: the amount times the party size. `booking`: the amount once.","type":"string","enum":["guest","booking"]},"from_party_size":{"description":"Parties this size or larger are asked for it, 1 to 20.","type":"integer","minimum":1,"maximum":20},"free_cancellation_hours":{"description":"Cancellation charge only: cancelling more than this many hours before costs nothing. One of 1, 2, 6, 12, 24, 48, 72.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"terms":{"description":"Terms the guest must accept before booking. Null: show none. Left out: as they are.","anyOf":[{"type":"string","minLength":1,"maxLength":10000},{"type":"null"}]}},"required":["type"],"additionalProperties":false,"description":"The money the event asks for, as a booking type does: one of a deposit, a cancellation charge or full payment, or none, in GBP. Turning one on, or changing from one to another, needs `amount`, `per` and `from_party_size` (and `free_cancellation_hours` for a cancellation charge); a change to the same type keeps what is not sent."},"blocks_booking_types":{"type":"object","properties":{"others":{"type":"string","enum":["not_blocked","full_day","during_event_hours"],"description":"What happens on its days to every booking type not listed."},"listed":{"default":[],"description":"Booking types treated differently from `others`.","maxItems":100,"type":"array","items":{"type":"object","properties":{"booking_type_id":{"type":"string","minLength":1,"maxLength":64,"description":"From `booking_types.list`."},"blocked":{"type":"string","enum":["not_blocked","full_day","during_event_hours"]}},"required":["booking_type_id","blocked"]}}},"required":["others"],"additionalProperties":false,"description":"What the event stops guests booking on its days: `full_day`, only `during_event_hours`, or `not_blocked`, for every other booking type and for each listed one. Staff can still book."},"upgrade_ids":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"The upgrades guests booking it are offered, from `booking_upgrades.list`. Replaces the whole list. Empty: none."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"active":{"type":"boolean","description":"Inactive events take no new bookings."},"offered_online":{"type":"boolean","description":"Guests can book it themselves. False: staff only."},"enquiries_only":{"type":"boolean","description":"Guests send an enquiry instead of booking."},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The first day it covers."},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The last day it covers."},"dates":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date on the venue's own clock, YYYY-MM-DD."}},{"type":"null"}],"description":"The days it falls on, when it is not every day from `from` to `to`. Null: every day."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"closes":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."}},"required":["day","opens","closes"],"additionalProperties":false},"description":"When bookings for the event can start, on each weekday of its days."},"party_size":{"type":"object","properties":{"min":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["min","max"],"additionalProperties":false},"duration_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long a booking lasts unless its party size says otherwise."},"durations_by_party_size":{"type":"array","items":{"type":"object","properties":{"party_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["party_size","minutes"],"additionalProperties":false},"description":"Longer or shorter stays for some party sizes. Empty when every size gets `duration_minutes`."},"last_booking_minutes_before_close":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The latest a booking can start, in minutes before each close."},"slot_interval_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How far apart the booking times guests are offered are."},"same_day_bookings":{"type":"boolean"},"same_day_cutoff_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"When `same_day_bookings` is true: a booking on the day must be made at least this many minutes before it starts. 0: up to the start."},"buffer_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Kept clear on a table before and after each booking. 0: none. It applies to what guests can book online; staff can book into it."},"buffer_varies_by_party_size":{"type":"boolean","description":"Some party sizes have a buffer of their own, set in Stampede, in place of `buffer_minutes`."},"amendments_allowed":{"type":"boolean","description":"Guests can change their own booking."},"tables":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"description":"The tables it seats on. Empty means the venue's tables, unless `only_listed_tables` is true."},"combinations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"description":"The table combinations it seats on. Empty means the venue's combinations, unless `only_listed_tables` is true."},"only_listed_tables":{"type":"boolean","description":"True: it seats only on the tables and combinations listed, and an empty list means none of that kind."},"takes_payment":{"type":"object","properties":{"deposit":{"type":"boolean"},"cancellation_charge":{"type":"boolean"},"full_payment":{"type":"boolean"}},"required":["deposit","cancellation_charge","full_payment"],"additionalProperties":false,"description":"Money it can ask for. Each charge starts at a party size set in Stampede. A booking made through this API takes nothing unless it asks for a payment link (`payment_link`)."},"payment":{"type":"object","properties":{"type":{"type":"string","enum":["none","deposit","cancellation_charge","full_payment"],"description":"What the guest is asked for when booking: nothing, a deposit, a card held for a cancellation charge, or the full price. Only one."},"amount":{"anyOf":[{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},{"type":"null"}],"description":"Per guest or per booking (`per`). Null when `type` is `none`."},"per":{"anyOf":[{"type":"string","enum":["guest","booking"]},{"type":"null"}],"description":"`guest`: the amount times the party size. `booking`: the amount once."},"from_party_size":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Parties this size or larger are asked for it; smaller ones book with nothing to pay."},"free_cancellation_hours":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Cancellation charge only: cancelling more than this many hours before the booking costs nothing. Null for the other types."},"terms":{"description":"Terms the guest accepts before booking. Null: none are shown.","type":["string","null"]}},"required":["type","amount","per","from_party_size","free_cancellation_hours","terms"],"additionalProperties":false,"description":"The money the event asks for, as a booking type does. A booking made through this API takes nothing unless it asks for a payment link (`payment_link`)."},"blocks_booking_types":{"type":"object","properties":{"others":{"type":"string","enum":["not_blocked","full_day","during_event_hours"],"description":"What happens on its days to the booking types not listed below."},"listed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"blocked":{"type":"string","enum":["not_blocked","full_day","during_event_hours"]}},"required":["id","name","blocked"],"additionalProperties":false},"description":"Booking types the event names, and what happens to each."}},"required":["others","listed"],"additionalProperties":false,"description":"What the event stops guests booking on its days: `full_day`, only `during_event_hours`, or `not_blocked`."},"upgrade_ids":{"type":"array","items":{"type":"string"},"description":"The upgrades guests booking it are offered (`booking_upgrades.list`), when they are active and suit the party size and time."}},"required":["id","name","description","active","offered_online","enquiries_only","from","to","dates","hours","party_size","duration_minutes","durations_by_party_size","last_booking_minutes_before_close","slot_interval_minutes","same_day_bookings","same_day_cutoff_minutes","buffer_minutes","buffer_varies_by_party_size","amendments_allowed","tables","combinations","only_listed_tables","takes_payment","payment","blocks_booking_types","upgrade_ids"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"events.delete","tags":["Booking setup"],"summary":"Delete an event","description":"Removes an event so it can no longer be booked, and stops it blocking booking types. Bookings already made for it are kept. To stop guests booking it for now, set `active` to false instead. A ticketed event is not found here.","security":[{"oauth2":["booking_setup:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"event_id","in":"path","required":true,"description":"The event ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/booking-tables":{"get":{"operationId":"booking_tables.list","tags":["Booking setup"],"summary":"List a venue's booking tables","description":"The tables guests are seated at, with their area and how many they seat. These are not the ordering tables with QR codes (`tables.list`). A booking's `table_ids` are these. Answers at a venue still being set up, before it has a booking type.","security":[{"oauth2":["bookings:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"area":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"covers":{"type":"object","properties":{"min":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["min","max"],"additionalProperties":false},"active":{"type":"boolean","description":"Inactive tables take no bookings."},"suits":{"type":"array","items":{"type":"string","enum":["wheelchair","buggy","highchair","dog_friendly"]},"description":"What the table can take."}},"required":["id","name","area","covers","active","suits"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"booking_tables.create","tags":["Booking setup"],"summary":"Add a booking table","description":"Adds a table guests can be booked onto, last in its area. It changes what guests can book online straight away. Not an ordering table with a QR code (`tables.create`).","security":[{"oauth2":["booking_setup:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"area_id":{"type":"string","minLength":1,"maxLength":64,"description":"The booking area it goes in, from `booking_areas.list`."},"name":{"type":"string","minLength":1,"maxLength":36},"covers":{"type":"object","properties":{"min":{"type":"integer","minimum":1,"maximum":50},"max":{"type":"integer","minimum":1,"maximum":50}},"required":["min","max"],"description":"How many it seats, 1 to 50."},"active":{"default":true,"description":"Inactive tables take no bookings.","type":"boolean"},"suits":{"default":[],"maxItems":4,"type":"array","items":{"type":"string","enum":["wheelchair","buggy","highchair","dog_friendly"]},"description":"What the table can take. Replaces the whole list."}},"required":["area_id","name","covers"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"area":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"covers":{"type":"object","properties":{"min":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["min","max"],"additionalProperties":false},"active":{"type":"boolean","description":"Inactive tables take no bookings."},"suits":{"type":"array","items":{"type":"string","enum":["wheelchair","buggy","highchair","dog_friendly"]},"description":"What the table can take."}},"required":["id","name","area","covers","active","suits"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/booking-types/order":{"put":{"operationId":"booking_types.reorder","tags":["Booking setup"],"summary":"Put booking types in order","description":"Sets the order guests see booking types in. List every booking type at the venue, once each, first to last.","security":[{"oauth2":["booking_setup:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"booking_type_ids":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}}},"required":["booking_type_ids"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"active":{"type":"boolean","description":"Inactive types take no new bookings."},"offered_online":{"type":"boolean","description":"Guests can book it themselves. False: staff only."},"enquiries_only":{"type":"boolean","description":"Guests send an enquiry instead of booking."},"party_size":{"type":"object","properties":{"min":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["min","max"],"additionalProperties":false},"duration_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long a booking lasts unless its party size says otherwise."},"durations_by_party_size":{"type":"array","items":{"type":"object","properties":{"party_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["party_size","minutes"],"additionalProperties":false},"description":"Longer or shorter stays for some party sizes. Empty when every size gets `duration_minutes`."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"closes":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."}},"required":["day","opens","closes"],"additionalProperties":false},"description":"When bookings can start, on the venue's clock. A day with no entries takes no bookings. A close at or before its open runs past midnight."},"last_booking_minutes_before_close":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The latest a booking can start, in minutes before each close."},"same_day_bookings":{"type":"boolean"},"slot_interval_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How far apart the booking times guests are offered are, 15 or 30: the type's own, or the venue's (`own_slot_interval`)."},"own_slot_interval":{"type":"boolean","description":"True: `slot_interval_minutes` is set on this type. False: it follows the venue's."},"same_day_cutoff_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"When `same_day_bookings` is true: a booking on the day must be made at least this many minutes before it starts. 0: up to the start."},"buffer_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Kept clear on a table before and after each booking, so the next party is not seated too close. 0: none. It applies to what guests can book online; staff can book into it."},"buffer_varies_by_party_size":{"type":"boolean","description":"Some party sizes have a buffer of their own, set in Stampede, in place of `buffer_minutes`."},"amendments_allowed":{"type":"boolean","description":"Guests can change their own booking."},"tables":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"description":"The tables it can use. Empty means any table."},"takes_payment":{"type":"object","properties":{"deposit":{"type":"boolean"},"cancellation_charge":{"type":"boolean"},"full_payment":{"type":"boolean"}},"required":["deposit","cancellation_charge","full_payment"],"additionalProperties":false,"description":"Which money the type asks for: at most one is true, the same as `payment.type`. Each starts at a party size (`payment.from_party_size`), and a special date can change them. A booking made through this API takes nothing unless it asks for a payment link (`payment_link`)."},"payment":{"type":"object","properties":{"type":{"type":"string","enum":["none","deposit","cancellation_charge","full_payment"],"description":"What the guest is asked for when booking: nothing, a deposit, a card held for a cancellation charge, or the full price. Only one."},"amount":{"anyOf":[{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},{"type":"null"}],"description":"Per guest or per booking (`per`). Null when `type` is `none`."},"per":{"anyOf":[{"type":"string","enum":["guest","booking"]},{"type":"null"}],"description":"`guest`: the amount times the party size. `booking`: the amount once."},"from_party_size":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Parties this size or larger are asked for it; smaller ones book with nothing to pay."},"free_cancellation_hours":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Cancellation charge only: cancelling more than this many hours before the booking costs nothing. Null for the other types."},"terms":{"description":"Terms the guest accepts before booking. Null: none are shown.","type":["string","null"]}},"required":["type","amount","per","from_party_size","free_cancellation_hours","terms"],"additionalProperties":false,"description":"The money the type asks for. A special date can change it on its days. A booking made through this API takes nothing unless it asks for a payment link (`payment_link`)."},"cover_limits":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"active":{"type":"boolean","description":"Off: no limit that day, and its windows are kept for later."},"windows":{"maxItems":96,"type":"array","items":{"type":"object","properties":{"from":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"When the window starts, on the venue's clock, on a 15-minute mark."},"to":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"When it ends, later the same day, on a 15-minute mark."},"max_covers":{"type":"integer","minimum":1,"maximum":10000,"description":"The most guests whose bookings start in the window."}},"required":["from","to","max_covers"],"additionalProperties":false}}},"required":["day","active","windows"],"additionalProperties":false},"description":"Limits on guests in windows of each weekday, every day of the week in order. They apply only while the venue's time-slot rules are off (`time_slot_rules_active` on `booking_settings.get`), and only if the type counts towards covers, counting only this type's bookings. A special date with limits of its own replaces them on its days. The venue's own limits (`booking_settings`) apply as well."},"upgrade_ids":{"type":"array","items":{"type":"string"},"description":"The upgrades guests booking it are offered (`booking_upgrades.list`), when they are active and suit the party size and time."},"included_upgrades":{"type":"array","items":{"type":"object","properties":{"upgrade_id":{"type":"string"},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"per":{"type":"string","enum":["person","booking"],"description":"`person`: `quantity` for each guest in the party. `booking`: `quantity` for the booking."}},"required":["upgrade_id","quantity","per"],"additionalProperties":false},"description":"Upgrades a package booking type includes in its price, at no extra charge. Always empty for a type that is not a package: packages are set up in Stampede."},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Its place in the list guests see."}},"required":["id","name","description","active","offered_online","enquiries_only","party_size","duration_minutes","durations_by_party_size","hours","last_booking_minutes_before_close","same_day_bookings","slot_interval_minutes","own_slot_interval","same_day_cutoff_minutes","buffer_minutes","buffer_varies_by_party_size","amendments_allowed","tables","takes_payment","payment","cover_limits","upgrade_ids","included_upgrades","position"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/booking-areas":{"get":{"operationId":"booking_areas.list","tags":["Booking setup"],"summary":"List a venue's booking areas","description":"The parts of a venue its booking tables are grouped in (a terrace, a bar, upstairs), in the order Stampede shows them, with how many tables each holds. A booking table is always in one. Areas with no tables are listed too.","security":[{"oauth2":["bookings:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"hidden_from_planner":{"type":"boolean","description":"Left out of the day planner in Stampede. It does not change what guests can book."},"table_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many booking tables are in it."}},"required":["id","name","hidden_from_planner","table_count"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"booking_areas.create","tags":["Booking setup"],"summary":"Add a booking area","description":"Adds an empty booking area, last in the list. Add tables to it with `booking_tables.create`.","security":[{"oauth2":["booking_setup:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"Unique at the venue."},"hidden_from_planner":{"default":false,"type":"boolean","description":"Leave it out of the day planner in Stampede."}},"required":["name"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"hidden_from_planner":{"type":"boolean","description":"Left out of the day planner in Stampede. It does not change what guests can book."},"table_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many booking tables are in it."}},"required":["id","name","hidden_from_planner","table_count"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/booking-areas/{area_id}":{"patch":{"operationId":"booking_areas.update","tags":["Booking setup"],"summary":"Change a booking area","description":"Renames a booking area or hides it from the day planner. The fields sent change and nothing else; its tables stay in it.","security":[{"oauth2":["booking_setup:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"area_id","in":"path","required":true,"description":"The booking area ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"Unique at the venue."},"hidden_from_planner":{"type":"boolean","description":"Leave it out of the day planner in Stampede."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"hidden_from_planner":{"type":"boolean","description":"Left out of the day planner in Stampede. It does not change what guests can book."},"table_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many booking tables are in it."}},"required":["id","name","hidden_from_planner","table_count"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/booking-tables/{table_id}":{"patch":{"operationId":"booking_tables.update","tags":["Booking setup"],"summary":"Change a booking table","description":"Changes the fields sent and nothing else. It changes what guests can book online straight away. Bookings already on the table keep it, even when it is switched off or no longer seats the party.","security":[{"oauth2":["booking_setup:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"table_id","in":"path","required":true,"description":"The booking table ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"area_id":{"description":"Move it to this booking area. It goes last in the area.","type":"string","minLength":1,"maxLength":64},"name":{"type":"string","minLength":1,"maxLength":36},"covers":{"description":"Either end or both; the other stays as it is.","type":"object","properties":{"min":{"type":"integer","minimum":1,"maximum":50},"max":{"type":"integer","minimum":1,"maximum":50}}},"active":{"description":"Inactive tables take no bookings.","type":"boolean"},"suits":{"maxItems":4,"type":"array","items":{"type":"string","enum":["wheelchair","buggy","highchair","dog_friendly"]},"description":"What the table can take. Replaces the whole list."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"area":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"covers":{"type":"object","properties":{"min":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["min","max"],"additionalProperties":false},"active":{"type":"boolean","description":"Inactive tables take no bookings."},"suits":{"type":"array","items":{"type":"string","enum":["wheelchair","buggy","highchair","dog_friendly"]},"description":"What the table can take."}},"required":["id","name","area","covers","active","suits"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/table-combinations":{"get":{"operationId":"table_combinations.list","tags":["Booking setup"],"summary":"List a venue's table combinations","description":"Booking tables that are booked together as one for a larger party, such as tables 4 and 5 pushed together, each with the party sizes it is offered for.","security":[{"oauth2":["bookings:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tables":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"description":"The booking tables it joins, booked together as one."},"covers":{"type":"object","properties":{"min":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["min","max"],"additionalProperties":false,"description":"The party sizes it is offered for."},"active":{"type":"boolean","description":"Inactive combinations are not offered."},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"1 to 5. When more than one combination fits a party, the higher is offered first."},"suits":{"type":"array","items":{"type":"string","enum":["wheelchair","buggy","highchair"]},"description":"What it can take."}},"required":["id","name","tables","covers","active","priority","suits"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"table_combinations.create","tags":["Booking setup"],"summary":"Add a table combination","description":"Joins two booking tables or more so a larger party can be booked onto them together. It changes what guests can book online straight away. Name and covers default to what Stampede would fill in: the table names joined with +, and the tables’ covers added up.","security":[{"oauth2":["booking_setup:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"table_ids":{"minItems":2,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"Two booking tables or more, from `booking_tables.list`. Replaces the whole list."},"name":{"description":"Default: the table names joined with +, as Stampede names them.","type":"string","minLength":1,"maxLength":100},"covers":{"description":"The party sizes it is offered for. Default: its tables’ covers added up.","type":"object","properties":{"min":{"type":"integer","minimum":1,"maximum":1000},"max":{"type":"integer","minimum":1,"maximum":1000}},"required":["min","max"]},"active":{"default":true,"type":"boolean","description":"Inactive combinations are not offered."},"priority":{"default":3,"type":"integer","minimum":1,"maximum":5,"description":"1 to 5. When more than one combination fits a party, the higher is offered first."},"suits":{"default":[],"maxItems":3,"type":"array","items":{"type":"string","enum":["wheelchair","buggy","highchair"]},"description":"What it can take. Replaces the whole list."}},"required":["table_ids"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tables":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"description":"The booking tables it joins, booked together as one."},"covers":{"type":"object","properties":{"min":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["min","max"],"additionalProperties":false,"description":"The party sizes it is offered for."},"active":{"type":"boolean","description":"Inactive combinations are not offered."},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"1 to 5. When more than one combination fits a party, the higher is offered first."},"suits":{"type":"array","items":{"type":"string","enum":["wheelchair","buggy","highchair"]},"description":"What it can take."}},"required":["id","name","tables","covers","active","priority","suits"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/table-combinations/{combination_id}":{"get":{"operationId":"table_combinations.get","tags":["Booking setup"],"summary":"Get a table combination","security":[{"oauth2":["bookings:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"combination_id","in":"path","required":true,"description":"The table combination ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tables":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"description":"The booking tables it joins, booked together as one."},"covers":{"type":"object","properties":{"min":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["min","max"],"additionalProperties":false,"description":"The party sizes it is offered for."},"active":{"type":"boolean","description":"Inactive combinations are not offered."},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"1 to 5. When more than one combination fits a party, the higher is offered first."},"suits":{"type":"array","items":{"type":"string","enum":["wheelchair","buggy","highchair"]},"description":"What it can take."}},"required":["id","name","tables","covers","active","priority","suits"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"table_combinations.update","tags":["Booking setup"],"summary":"Change a table combination","description":"Changes the fields sent and nothing else. `table_ids` replaces the whole list. It changes what guests can book online straight away. Bookings already on the combination keep their tables.","security":[{"oauth2":["booking_setup:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"combination_id","in":"path","required":true,"description":"The table combination ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"table_ids":{"minItems":2,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"Two booking tables or more, from `booking_tables.list`. Replaces the whole list."},"name":{"type":"string","minLength":1,"maxLength":100},"covers":{"description":"Either end or both; the other stays as it is.","type":"object","properties":{"min":{"type":"integer","minimum":1,"maximum":1000},"max":{"type":"integer","minimum":1,"maximum":1000}}},"active":{"type":"boolean","description":"Inactive combinations are not offered."},"priority":{"type":"integer","minimum":1,"maximum":5,"description":"1 to 5. When more than one combination fits a party, the higher is offered first."},"suits":{"maxItems":3,"type":"array","items":{"type":"string","enum":["wheelchair","buggy","highchair"]},"description":"What it can take. Replaces the whole list."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tables":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"description":"The booking tables it joins, booked together as one."},"covers":{"type":"object","properties":{"min":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["min","max"],"additionalProperties":false,"description":"The party sizes it is offered for."},"active":{"type":"boolean","description":"Inactive combinations are not offered."},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"1 to 5. When more than one combination fits a party, the higher is offered first."},"suits":{"type":"array","items":{"type":"string","enum":["wheelchair","buggy","highchair"]},"description":"What it can take."}},"required":["id","name","tables","covers","active","priority","suits"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/booking-settings":{"get":{"operationId":"booking_settings.get","tags":["Booking setup"],"summary":"Get a venue's booking settings","description":"The booking settings that belong to the venue and no booking type: how many months ahead guests can book, caps on each booking time, whether time-slot rules (set in Stampede) are on, the venue's own cover limits, which apply on top of each booking type's, and the venue's own upgrades. Everything a booking type also has (party sizes, durations, hours, slot interval, buffers, same-day rules, cover limits, money) is the type's (`booking_types.get`). Answers at a venue still being set up, before it has a booking type.","security":[{"oauth2":["bookings:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"timezone":{"type":"string","description":"The venue's clock, which every local day and time is on. Changed in Stampede."},"months_bookable_ahead":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many months ahead the booking page offers dates."},"time_slot_rules_active":{"type":"boolean","description":"True: Stampede's time-slot rules decide how many can book at each time, and no `cover_limits` apply, the venue's or a booking type's. Changed in Stampede."},"cover_limits":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"active":{"type":"boolean","description":"Off: no limit that day, and its windows are kept for later."},"windows":{"maxItems":96,"type":"array","items":{"type":"object","properties":{"from":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"When the window starts, on the venue's clock, on a 15-minute mark."},"to":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"When it ends, later the same day, on a 15-minute mark."},"max_covers":{"type":"integer","minimum":1,"maximum":10000,"description":"The most guests whose bookings start in the window."}},"required":["from","to","max_covers"],"additionalProperties":false}}},"required":["day","active","windows"],"additionalProperties":false},"description":"Venue-wide limits on guests in windows of each weekday, every day of the week in order. They apply to every booking type at the venue, on top of each type's own limits, counting every booking at the venue, and only while `time_slot_rules_active` is off. Bookings of a type that does not count towards covers are not limited."},"planner_hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"closes":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."}},"required":["day","opens","closes"],"additionalProperties":false},"description":"The day planner's opening hours, on the venue's clock. A day with no entries shows as closed. Only the hours Stampede's day planner shows for the venue: they change nothing guests can book, which follows each booking type's hours."},"per_slot":{"type":"object","properties":{"max_covers":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The most guests whose bookings start at any one time."},"max_bookings":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The most bookings that start at any one time."}},"required":["max_covers","max_bookings"],"additionalProperties":false,"description":"Caps on each booking time, for bookings of types that count towards covers. There is always a cap: 0 lets none start."},"upgrade_ids":{"type":"array","items":{"type":"string"},"description":"The venue's own upgrades (`booking_upgrades.list`): offered only when a guest has not chosen a booking type or event, and no special date that day offers any. Booking types, events and special dates offer their own."}},"required":["timezone","months_bookable_ahead","time_slot_rules_active","cover_limits","planner_hours","per_slot","upgrade_ids"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"booking_settings.update","tags":["Booking setup"],"summary":"Change a venue's booking settings","description":"Changes the settings sent and nothing else. Each day in `cover_limits` replaces that day; other days stay as they are. They apply to every booking type at the venue, on top of each type's own limits, counting every booking at the venue, and only while `time_slot_rules_active` is off. Bookings of a type that does not count towards covers are not limited. It changes what guests can book online straight away, for every booking type. Bookings already made are kept, even where a time is now over a cap or limit.","security":[{"oauth2":["booking_setup:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"months_bookable_ahead":{"description":"1 to 12.","type":"integer","minimum":1,"maximum":12},"per_slot":{"description":"Either cap or both; the other stays as it is.","type":"object","properties":{"max_covers":{"description":"1 to 200.","type":"integer","minimum":1,"maximum":200},"max_bookings":{"description":"1 to 999.","type":"integer","minimum":1,"maximum":999}}},"planner_hours":{"description":"The day planner's hours for the weekdays listed, each weekday listed replacing that day. Weekdays not listed stay as they are. Only the hours Stampede's day planner shows for the venue: they change nothing guests can book, which follows each booking type's hours.","type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"closes":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."}},"required":["day","opens","closes"]}},"planner_closed_days":{"description":"Weekdays the day planner shows as closed. Not in `planner_hours` as well.","minItems":1,"maxItems":7,"type":"array","items":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]}},"cover_limits":{"description":"The venue's limits for the days to change, each replacing that day; days not sent stay as they are. They apply to every booking type at the venue, on top of each type's own limits, counting every booking at the venue, and only while `time_slot_rules_active` is off. Bookings of a type that does not count towards covers are not limited.","minItems":1,"maxItems":7,"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"active":{"type":"boolean","description":"Off: no limit that day, and its windows are kept for later."},"windows":{"maxItems":96,"type":"array","items":{"type":"object","properties":{"from":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"When the window starts, on the venue's clock, on a 15-minute mark."},"to":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"When it ends, later the same day, on a 15-minute mark."},"max_covers":{"type":"integer","minimum":1,"maximum":10000,"description":"The most guests whose bookings start in the window."}},"required":["from","to","max_covers"]}}},"required":["day","active","windows"]}},"upgrade_ids":{"description":"The venue's own upgrades, from `booking_upgrades.list`. Replaces the whole list. Empty: none.","maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"timezone":{"type":"string","description":"The venue's clock, which every local day and time is on. Changed in Stampede."},"months_bookable_ahead":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many months ahead the booking page offers dates."},"time_slot_rules_active":{"type":"boolean","description":"True: Stampede's time-slot rules decide how many can book at each time, and no `cover_limits` apply, the venue's or a booking type's. Changed in Stampede."},"cover_limits":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"active":{"type":"boolean","description":"Off: no limit that day, and its windows are kept for later."},"windows":{"maxItems":96,"type":"array","items":{"type":"object","properties":{"from":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"When the window starts, on the venue's clock, on a 15-minute mark."},"to":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"When it ends, later the same day, on a 15-minute mark."},"max_covers":{"type":"integer","minimum":1,"maximum":10000,"description":"The most guests whose bookings start in the window."}},"required":["from","to","max_covers"],"additionalProperties":false}}},"required":["day","active","windows"],"additionalProperties":false},"description":"Venue-wide limits on guests in windows of each weekday, every day of the week in order. They apply to every booking type at the venue, on top of each type's own limits, counting every booking at the venue, and only while `time_slot_rules_active` is off. Bookings of a type that does not count towards covers are not limited."},"planner_hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"closes":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."}},"required":["day","opens","closes"],"additionalProperties":false},"description":"The day planner's opening hours, on the venue's clock. A day with no entries shows as closed. Only the hours Stampede's day planner shows for the venue: they change nothing guests can book, which follows each booking type's hours."},"per_slot":{"type":"object","properties":{"max_covers":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The most guests whose bookings start at any one time."},"max_bookings":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The most bookings that start at any one time."}},"required":["max_covers","max_bookings"],"additionalProperties":false,"description":"Caps on each booking time, for bookings of types that count towards covers. There is always a cap: 0 lets none start."},"upgrade_ids":{"type":"array","items":{"type":"string"},"description":"The venue's own upgrades (`booking_upgrades.list`): offered only when a guest has not chosen a booking type or event, and no special date that day offers any. Booking types, events and special dates offer their own."}},"required":["timezone","months_bookable_ahead","time_slot_rules_active","cover_limits","planner_hours","per_slot","upgrade_ids"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/booking-upgrades":{"get":{"operationId":"booking_upgrades.list","tags":["Booking setup"],"summary":"List a venue's booking upgrades","description":"Every upgrade at the venue, active or not, newest first: things a guest adds to a booking, such as a bottle of prosecco or a cake. Where each is offered is set on booking types, events and special dates (`upgrade_ids`), and the venue (`booking_settings`). What a guest would be offered for a booking is `booking_upgrades.offered`.","security":[{"oauth2":["bookings:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"search","in":"query","required":false,"description":"Part of the name or description.","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"cursor","in":"query","required":false,"description":"The `cursor` from the previous page.","schema":{"type":"string","pattern":"^\\d{1,4}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"description":"Shown to guests.","type":["string","null"]},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Each."},"pay_ahead":{"type":"boolean","description":"True: a guest booking online pays for it up front, with the deposit or full payment. False: it is paid at the venue, on the bill. One added through this API is always paid at the venue."},"active":{"type":"boolean","description":"Inactive upgrades are offered to no one."},"party_size":{"type":"object","properties":{"min":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"max":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["min","max"],"additionalProperties":false,"description":"The party sizes it is offered to. Null: no bound."},"quantity_up_to_party_size":{"type":"boolean","description":"True: a booking can have at most one for each guest. False: any number."},"hours":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"closes":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."}},"required":["day","opens","closes"],"additionalProperties":false},"description":"When bookings can start, on the venue's clock. A day with no entries takes no bookings. A close at or before its open runs past midnight."},{"type":"null"}],"description":"When it is offered, by the booking's start time, on the venue's clock. A weekday with no entries: not offered that day. Null: whenever the booking is."},"allergens":{"type":"array","items":{"type":"string","enum":["milk","eggs","fish","molluscs","crustaceans","lupin","gluten","cereals_containing_gluten","peanuts","nuts","tree_nuts","sesame","celery","soya","sulphur_dioxide","mustard"]},"description":"Allergens it contains."},"dietary":{"type":"array","items":{"type":"string","enum":["vegan","vegetarian","gluten_free","pescatarian","dairy_free","keto","low_carb","halal","kosher","paleo","low_sodium","diabetic_friendly","raw","whole30","fodmap"]},"description":"Diets it suits."},"per_attendee":{"type":"boolean","description":"For ticketed events: true, bought for each ticket holder who wants one (a wristband); false, once for the order (a bottle on arrival)."},"cutoff_minutes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"For ticketed events: it can no longer be added this many minutes before the event starts. Null: no cut-off."},"images":{"type":"object","properties":{"header":{"type":["string","null"]},"gallery":{"type":"array","items":{"type":"string"}}},"required":["header","gallery"],"additionalProperties":false,"description":"Image URLs, set in Stampede."},"square_catalogue_id":{"description":"Its item in the venue's Square catalogue, which puts it on the bill. Set in Stampede.","type":["string","null"]},"created_at":{"type":["string","null"]}},"required":["id","name","description","price","pay_ahead","active","party_size","quantity_up_to_party_size","hours","allergens","dietary","per_attendee","cutoff_minutes","images","square_catalogue_id","created_at"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"booking_upgrades.create","tags":["Booking setup"],"summary":"Add a booking upgrade","description":"Adds an upgrade at the venue, such as a bottle of prosecco or a cake. It is offered to no one until a booking type, event, special date or the venue lists it (`upgrade_ids`). Images and the link to Square are set in Stampede.","security":[{"oauth2":["booking_setup:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"description":"Shown to guests."},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":0,"maximum":1000000,"description":"In minor units: 650 is £6.50."},"currency":{"type":"string","const":"GBP"}},"required":["amount","currency"],"description":"Each, in GBP."},"pay_ahead":{"default":true,"description":"True: a guest booking online pays for it up front, with the deposit or full payment. False: it is paid at the venue, on the bill. One added through this API is always paid at the venue. Default true.","type":"boolean"},"active":{"default":true,"type":"boolean","description":"Inactive upgrades are offered to no one."},"party_size":{"default":{"min":null,"max":null},"type":"object","properties":{"min":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]},"max":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]}},"required":["min","max"],"description":"The party sizes it is offered to. Null: no bound."},"quantity_up_to_party_size":{"default":true,"type":"boolean","description":"True: a booking can have at most one for each guest. False: any number."},"hours":{"default":null,"anyOf":[{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"closes":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."}},"required":["day","opens","closes"]},"description":"When bookings can start, on the venue's clock. A day with no entries takes no bookings. A close at or before its open runs past midnight."},{"type":"null"}],"description":"When it is offered, by the booking's start time, on the venue's clock. A weekday with no entries: not offered that day. Null: whenever the booking is."},"allergens":{"default":[],"maxItems":16,"type":"array","items":{"type":"string","enum":["milk","eggs","fish","molluscs","crustaceans","lupin","gluten","cereals_containing_gluten","peanuts","nuts","tree_nuts","sesame","celery","soya","sulphur_dioxide","mustard"]},"description":"Allergens it contains. Replaces the whole list."},"dietary":{"default":[],"maxItems":15,"type":"array","items":{"type":"string","enum":["vegan","vegetarian","gluten_free","pescatarian","dairy_free","keto","low_carb","halal","kosher","paleo","low_sodium","diabetic_friendly","raw","whole30","fodmap"]},"description":"Diets it suits. Replaces the whole list."},"per_attendee":{"default":false,"type":"boolean","description":"For ticketed events: true, bought for each ticket holder who wants one; false, once for the order."},"cutoff_minutes":{"default":null,"anyOf":[{"type":"integer","minimum":0,"maximum":43200},{"type":"null"}],"description":"For ticketed events: it can no longer be added this many minutes before the event starts. Null: no cut-off."}},"required":["name","price"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"description":"Shown to guests.","type":["string","null"]},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Each."},"pay_ahead":{"type":"boolean","description":"True: a guest booking online pays for it up front, with the deposit or full payment. False: it is paid at the venue, on the bill. One added through this API is always paid at the venue."},"active":{"type":"boolean","description":"Inactive upgrades are offered to no one."},"party_size":{"type":"object","properties":{"min":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"max":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["min","max"],"additionalProperties":false,"description":"The party sizes it is offered to. Null: no bound."},"quantity_up_to_party_size":{"type":"boolean","description":"True: a booking can have at most one for each guest. False: any number."},"hours":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"closes":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."}},"required":["day","opens","closes"],"additionalProperties":false},"description":"When bookings can start, on the venue's clock. A day with no entries takes no bookings. A close at or before its open runs past midnight."},{"type":"null"}],"description":"When it is offered, by the booking's start time, on the venue's clock. A weekday with no entries: not offered that day. Null: whenever the booking is."},"allergens":{"type":"array","items":{"type":"string","enum":["milk","eggs","fish","molluscs","crustaceans","lupin","gluten","cereals_containing_gluten","peanuts","nuts","tree_nuts","sesame","celery","soya","sulphur_dioxide","mustard"]},"description":"Allergens it contains."},"dietary":{"type":"array","items":{"type":"string","enum":["vegan","vegetarian","gluten_free","pescatarian","dairy_free","keto","low_carb","halal","kosher","paleo","low_sodium","diabetic_friendly","raw","whole30","fodmap"]},"description":"Diets it suits."},"per_attendee":{"type":"boolean","description":"For ticketed events: true, bought for each ticket holder who wants one (a wristband); false, once for the order (a bottle on arrival)."},"cutoff_minutes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"For ticketed events: it can no longer be added this many minutes before the event starts. Null: no cut-off."},"images":{"type":"object","properties":{"header":{"type":["string","null"]},"gallery":{"type":"array","items":{"type":"string"}}},"required":["header","gallery"],"additionalProperties":false,"description":"Image URLs, set in Stampede."},"square_catalogue_id":{"description":"Its item in the venue's Square catalogue, which puts it on the bill. Set in Stampede.","type":["string","null"]},"created_at":{"type":["string","null"]}},"required":["id","name","description","price","pay_ahead","active","party_size","quantity_up_to_party_size","hours","allergens","dietary","per_attendee","cutoff_minutes","images","square_catalogue_id","created_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/booking-upgrades/{upgrade_id}":{"get":{"operationId":"booking_upgrades.get","tags":["Booking setup"],"summary":"Get a booking upgrade","security":[{"oauth2":["bookings:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"upgrade_id","in":"path","required":true,"description":"The upgrade ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"description":"Shown to guests.","type":["string","null"]},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Each."},"pay_ahead":{"type":"boolean","description":"True: a guest booking online pays for it up front, with the deposit or full payment. False: it is paid at the venue, on the bill. One added through this API is always paid at the venue."},"active":{"type":"boolean","description":"Inactive upgrades are offered to no one."},"party_size":{"type":"object","properties":{"min":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"max":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["min","max"],"additionalProperties":false,"description":"The party sizes it is offered to. Null: no bound."},"quantity_up_to_party_size":{"type":"boolean","description":"True: a booking can have at most one for each guest. False: any number."},"hours":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"closes":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."}},"required":["day","opens","closes"],"additionalProperties":false},"description":"When bookings can start, on the venue's clock. A day with no entries takes no bookings. A close at or before its open runs past midnight."},{"type":"null"}],"description":"When it is offered, by the booking's start time, on the venue's clock. A weekday with no entries: not offered that day. Null: whenever the booking is."},"allergens":{"type":"array","items":{"type":"string","enum":["milk","eggs","fish","molluscs","crustaceans","lupin","gluten","cereals_containing_gluten","peanuts","nuts","tree_nuts","sesame","celery","soya","sulphur_dioxide","mustard"]},"description":"Allergens it contains."},"dietary":{"type":"array","items":{"type":"string","enum":["vegan","vegetarian","gluten_free","pescatarian","dairy_free","keto","low_carb","halal","kosher","paleo","low_sodium","diabetic_friendly","raw","whole30","fodmap"]},"description":"Diets it suits."},"per_attendee":{"type":"boolean","description":"For ticketed events: true, bought for each ticket holder who wants one (a wristband); false, once for the order (a bottle on arrival)."},"cutoff_minutes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"For ticketed events: it can no longer be added this many minutes before the event starts. Null: no cut-off."},"images":{"type":"object","properties":{"header":{"type":["string","null"]},"gallery":{"type":"array","items":{"type":"string"}}},"required":["header","gallery"],"additionalProperties":false,"description":"Image URLs, set in Stampede."},"square_catalogue_id":{"description":"Its item in the venue's Square catalogue, which puts it on the bill. Set in Stampede.","type":["string","null"]},"created_at":{"type":["string","null"]}},"required":["id","name","description","price","pay_ahead","active","party_size","quantity_up_to_party_size","hours","allergens","dietary","per_attendee","cutoff_minutes","images","square_catalogue_id","created_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"booking_upgrades.update","tags":["Booking setup"],"summary":"Change a booking upgrade","description":"Changes the fields sent and nothing else. `hours`, `allergens` and `dietary` each replace the whole of what they set. A new price applies to bookings from then on: bookings that have it keep what they paid. Images and the link to Square stay as they are.","security":[{"oauth2":["booking_setup:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"upgrade_id","in":"path","required":true,"description":"The upgrade ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"description":"Shown to guests."},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":0,"maximum":1000000,"description":"In minor units: 650 is £6.50."},"currency":{"type":"string","const":"GBP"}},"required":["amount","currency"],"description":"Each, in GBP."},"pay_ahead":{"type":"boolean","description":"True: a guest booking online pays for it up front, with the deposit or full payment. False: it is paid at the venue, on the bill. One added through this API is always paid at the venue."},"active":{"type":"boolean","description":"Inactive upgrades are offered to no one."},"party_size":{"type":"object","properties":{"min":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]},"max":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]}},"required":["min","max"],"description":"The party sizes it is offered to. Null: no bound."},"quantity_up_to_party_size":{"type":"boolean","description":"True: a booking can have at most one for each guest. False: any number."},"hours":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"closes":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."}},"required":["day","opens","closes"]},"description":"When bookings can start, on the venue's clock. A day with no entries takes no bookings. A close at or before its open runs past midnight."},{"type":"null"}],"description":"When it is offered, by the booking's start time, on the venue's clock. A weekday with no entries: not offered that day. Null: whenever the booking is."},"allergens":{"maxItems":16,"type":"array","items":{"type":"string","enum":["milk","eggs","fish","molluscs","crustaceans","lupin","gluten","cereals_containing_gluten","peanuts","nuts","tree_nuts","sesame","celery","soya","sulphur_dioxide","mustard"]},"description":"Allergens it contains. Replaces the whole list."},"dietary":{"maxItems":15,"type":"array","items":{"type":"string","enum":["vegan","vegetarian","gluten_free","pescatarian","dairy_free","keto","low_carb","halal","kosher","paleo","low_sodium","diabetic_friendly","raw","whole30","fodmap"]},"description":"Diets it suits. Replaces the whole list."},"per_attendee":{"type":"boolean","description":"For ticketed events: true, bought for each ticket holder who wants one; false, once for the order."},"cutoff_minutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":43200},{"type":"null"}],"description":"For ticketed events: it can no longer be added this many minutes before the event starts. Null: no cut-off."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"description":"Shown to guests.","type":["string","null"]},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Each."},"pay_ahead":{"type":"boolean","description":"True: a guest booking online pays for it up front, with the deposit or full payment. False: it is paid at the venue, on the bill. One added through this API is always paid at the venue."},"active":{"type":"boolean","description":"Inactive upgrades are offered to no one."},"party_size":{"type":"object","properties":{"min":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"max":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["min","max"],"additionalProperties":false,"description":"The party sizes it is offered to. Null: no bound."},"quantity_up_to_party_size":{"type":"boolean","description":"True: a booking can have at most one for each guest. False: any number."},"hours":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"closes":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."}},"required":["day","opens","closes"],"additionalProperties":false},"description":"When bookings can start, on the venue's clock. A day with no entries takes no bookings. A close at or before its open runs past midnight."},{"type":"null"}],"description":"When it is offered, by the booking's start time, on the venue's clock. A weekday with no entries: not offered that day. Null: whenever the booking is."},"allergens":{"type":"array","items":{"type":"string","enum":["milk","eggs","fish","molluscs","crustaceans","lupin","gluten","cereals_containing_gluten","peanuts","nuts","tree_nuts","sesame","celery","soya","sulphur_dioxide","mustard"]},"description":"Allergens it contains."},"dietary":{"type":"array","items":{"type":"string","enum":["vegan","vegetarian","gluten_free","pescatarian","dairy_free","keto","low_carb","halal","kosher","paleo","low_sodium","diabetic_friendly","raw","whole30","fodmap"]},"description":"Diets it suits."},"per_attendee":{"type":"boolean","description":"For ticketed events: true, bought for each ticket holder who wants one (a wristband); false, once for the order (a bottle on arrival)."},"cutoff_minutes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"For ticketed events: it can no longer be added this many minutes before the event starts. Null: no cut-off."},"images":{"type":"object","properties":{"header":{"type":["string","null"]},"gallery":{"type":"array","items":{"type":"string"}}},"required":["header","gallery"],"additionalProperties":false,"description":"Image URLs, set in Stampede."},"square_catalogue_id":{"description":"Its item in the venue's Square catalogue, which puts it on the bill. Set in Stampede.","type":["string","null"]},"created_at":{"type":["string","null"]}},"required":["id","name","description","price","pay_ahead","active","party_size","quantity_up_to_party_size","hours","allergens","dietary","per_attendee","cutoff_minutes","images","square_catalogue_id","created_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"booking_upgrades.delete","tags":["Booking setup"],"summary":"Delete a booking upgrade","description":"Removes an upgrade: it is offered to no one from then on. Bookings that have it keep it. Booking types, events and special dates that listed it may still show its ID in `upgrade_ids` until they are next changed. To stop offering it for now, set `active` to false instead.","security":[{"oauth2":["booking_setup:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"upgrade_id","in":"path","required":true,"description":"The upgrade ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/booking-upgrades/offered":{"get":{"operationId":"booking_upgrades.offered","tags":["Booking setup"],"summary":"Find the upgrades a booking would be offered","description":"What a guest booking online would be offered, as Stampede's booking page asks: the active upgrades the booking type or event offers, with a special date's on that day, that suit the party size and are on at the start time. With neither a booking type nor an event, the venue's own list. Add them with `bookings.create` (`upgrades`) or `bookings.upgrades.add`.","security":[{"oauth2":["bookings:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"booking_type_id","in":"query","required":false,"description":"From `booking_types.list`. Or `event_id`.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"event_id","in":"query","required":false,"description":"From `events.list`. Or `booking_type_id`.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"party_size","in":"query","required":true,"schema":{"type":"integer","minimum":1,"maximum":500}},{"name":"starts_at","in":"query","required":true,"description":"When the booking starts, an ISO 8601 instant.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Each."},"pay_ahead":{"type":"boolean","description":"True: a guest booking online pays for it up front, with the deposit or full payment. False: it is paid at the venue, on the bill. One added through this API is always paid at the venue."},"max_quantity":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The most this party can have: its size, for an upgrade with `quantity_up_to_party_size`. Null: no limit."}},"required":["id","name","description","price","pay_ahead","max_quantity"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/bookings/{booking_id}/upgrades":{"post":{"operationId":"bookings.upgrades.add","tags":["Bookings"],"summary":"Add an upgrade to a booking","description":"Adds an upgrade the booking is offered (`booking_upgrades.offered`: its booking type or event, day and time, and party size decide), recorded unpaid: it is paid at the venue, whatever its `pay_ahead`. Refused with 409 `UPGRADE_NOT_OFFERED`, `UPGRADE_QUANTITY_TOO_HIGH` (more than one for each guest, for an upgrade with `quantity_up_to_party_size`) or `BOOKING_CLOSED` (a cancelled or completed booking). The answer is the booking with all its upgrades.","security":[{"oauth2":["bookings:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"upgrade_id":{"type":"string","minLength":1,"maxLength":64,"description":"From `booking_upgrades.offered`."},"quantity":{"default":1,"description":"How many to add. Default 1.","type":"integer","minimum":1,"maximum":100}},"required":["upgrade_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"reference":{"description":"The reference the guest was given.","type":["string","null"]},"venue_id":{"type":"string"},"status":{"type":"string","enum":["booked","arrived","seated","completed","cancelled","no_show","held"],"description":"`booked` until the party arrives; `held` is a table held for an enquiry, not yet a booking."},"stage":{"anyOf":[{"type":"string","enum":["partly_seated","starters","mains","desserts","table_ready","cleared","bill_dropped","paid"]},{"type":"null"}],"description":"Where a seated party is in their meal, when the venue tracks it. Null otherwise."},"starts_at":{"type":"string","description":"An ISO 8601 instant."},"ends_at":{"type":"string","description":"An ISO 8601 instant."},"party_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"booking_type":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}],"description":"The booking type it was made under, which set its rules."},"event_id":{"description":"The event it is for, if any.","type":["string","null"]},"enquiry_id":{"description":"The enquiry it was made for, if any.","type":["string","null"]},"guest_id":{"description":"The guest (`guests.get`), as on reviews, loyalty and wifi: their tags, history and consent. Null when Stampede has not linked them, as for most walk-ins and bookings with no email, and in booking webhooks: get the booking for it. `guest` is the details typed on the booking.","type":["string","null"]},"guest":{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["first_name","last_name","email","phone"],"additionalProperties":false},"notes":{"description":"The message the guest left with the booking.","type":["string","null"]},"attribution":{"type":"object","properties":{"utm_source":{"type":["string","null"]},"utm_medium":{"type":["string","null"]},"utm_campaign":{"type":["string","null"]},"utm_term":{"type":["string","null"]},"utm_content":{"type":["string","null"]},"utm_id":{"type":["string","null"]},"gclid":{"type":["string","null"]}},"required":["utm_source","utm_medium","utm_campaign","utm_term","utm_content","utm_id","gclid"],"additionalProperties":false,"description":"Where it came from, for marketing reports: the UTM values and Google Ads click ID of the landing URL it was booked from on Stampede's booking page, or those given to `bookings.create`. Null each when there were none."},"table_ids":{"type":"array","items":{"type":"string"},"description":"Its tables: names are in `booking_tables.list`."},"walk_in":{"type":"boolean"},"booked_online":{"type":"boolean","description":"Made by the guest online, not by staff."},"vip":{"type":"boolean"},"payment":{"anyOf":[{"type":"string","enum":["none","requested","paid","failed"]},{"type":"null"}],"description":"A payment asked of the guest: `requested` while a payment link is unpaid. Null when not known."},"upgrades":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"upgrade":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Each."},"pay_ahead":{"type":"boolean","description":"Guests booking online pay for it up front. Paid or not, `paid` and `unpaid` say what happened."}},"required":["id","name","price","pay_ahead"],"additionalProperties":false},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many are on the booking: `paid`, `included` and `unpaid` together."},"paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Paid for when the guest booked."},"included":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Included in a package booking type's price."},"unpaid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"To be paid at the venue. Only these can be removed (`bookings.upgrades.remove`)."}},"required":["upgrade","quantity","paid","included","unpaid"],"additionalProperties":false}},{"type":"null"}],"description":"What has been added to the booking (a bottle of prosecco, a cake), one entry per upgrade. Null when not read: `bookings.get` and the upgrade changes have it, lists and other changes leave it out."},"orders":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque: pass it with its `origin` to `bookings.orders.get` for its lines."},"origin":{"type":"string","enum":["square_pos","zion_preorder","stampede_ordering"]},"counts":{"type":"boolean","description":"Part of what the booking spent."},"currency":{"type":"string","enum":["GBP","EUR","USD"]},"net":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Minor units, without the tip. Null without `orders:read`."},"tip":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Minor units. Null without `orders:read`."},"on_till":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"A pre-order only: minor units of it already inside the till `net`. Null on a till check, and without `orders:read`."}},"required":["id","origin","counts","currency","net","tip","on_till"],"additionalProperties":false}},{"type":"null"}],"description":"Every order tied to the booking, listed once. `origin` is `square_pos` for a Square till check linked to the booking now, `zion_preorder` for a pre-order taken in Zion and `stampede_ordering` for one taken in Stampede ordering (a pre-order moved from Zion to Stampede ordering is listed once, as `stampede_ordering`). `counts` says whether it is part of what the booking spent: a till check once completed, a Zion pre-order once paid, a Stampede ordering pre-order once placed and not cancelled. An open check shows its running `net` with `counts: false`. `net` is in minor units without the tip (`tip`); a refund check has a negative `net`. Upgrades paid at the venue are inside the till `net`. Pre-ordered dishes are copied onto the till bill when the party is seated, so a dish can be on both. They are matched by Square item, for each currency: the matched units are the fewer of those pre-ordered and those on counting till checks, valued at the till's average price for that item and never more than the pre-ordered value, and shared out to pre-orders earliest first. `on_till` is the part of a pre-order already inside the till `net` (null on a till check). So what the booking spent, per currency, is the `net` of every counting till check, plus the `net` of every counting pre-order, less their `on_till`. Never add up amounts in different currencies. A pre-ordered dish that missed the till and was ordered again at the table is taken as the pre-order, so spend can read low by its price, never double. Quick-service venues that do not link checks to bookings show pre-orders only. For past bookings, `reports.booking_orders` has the same orders, found by the booking's trading day (a booking starting before 05:00 is on the day before). `net`, `tip` and `on_till` need `orders:read` as well; without it they are null. Null when not read: `bookings.get` has it, lists and changes leave it out. Also null while Stampede cannot read every source of the booking's orders yet, never a partial list."},"allergens":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"The allergens the guest gave, as they appear in Stampede (`[\"Gluten\", \"Nuts\"]`); empty when they gave none. Needs `guests:read` as well, because it is health information: without it, null. Also null when not known."},"dietary_requirements":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"The dietary requirements the guest gave (`[\"Vegan\"]`); empty when they gave none. Needs `guests:read` as well, because it is health information: without it, null. Also null when not known."},"occasions":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"What the guest is celebrating (`[\"Birthday\"]`); empty when nothing. Null when not known."},"needs":{"anyOf":[{"type":"object","properties":{"wheelchair":{"type":"boolean"},"buggy":{"type":"boolean"},"highchair":{"type":"boolean"},"dogs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many dogs are coming; 0 for none."}},"required":["wheelchair","buggy","highchair","dogs"],"additionalProperties":false},{"type":"null"}],"description":"What the party asked the table to suit, as availability's `needs` reads them. Null when not known."},"previous_visits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How many times the guest had booked at the organisation's venues before this booking. Null when not known."},"last_review_id":{"description":"The guest's latest review when the booking was made or last changed: `reviews.get` has it, with `reviews:read`. A review left since shows once the booking changes again. Null when they had left none, or when not known.","type":["string","null"]},"message_needs_reply":{"description":"The message the guest left (`notes`) is waiting for a reply from the venue. Null when not known.","type":["boolean","null"]},"locked":{"description":"Kept on its tables: Stampede will not move it when it rearranges the floor. Null when not known.","type":["boolean","null"]},"seated_at":{"description":"When the party was seated, an ISO 8601 instant. Null until then, or when not known.","type":["string","null"]},"completed_at":{"description":"When the booking was completed, an ISO 8601 instant. Null until then, or when not known.","type":["string","null"]},"held_until":{"description":"For a `held` booking (a table held for an enquiry): when the hold runs out, an ISO 8601 instant. Null otherwise.","type":["string","null"]},"staff_notes":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"booking_id":{"type":"string"},"body":{"type":"string","description":"The note, as plain text."},"author":{"description":"The name of whoever last wrote it. Null when Stampede has no name for them.","type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"description":"When it was last changed. Null if it never has been.","type":["string","null"]}},"required":["id","booking_id","body","author","created_at","updated_at"],"additionalProperties":false}},{"type":"null"}],"description":"Staff notes on the booking, oldest first, as `bookings.notes.list` has them. Only on `bookings.list` with `include=staff_notes`, which carries up to the 20 most recent; null otherwise, or when Stampede could not read them. `bookings.notes.list` has every note."},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","reference","venue_id","status","stage","starts_at","ends_at","party_size","booking_type","event_id","enquiry_id","guest_id","guest","notes","attribution","table_ids","walk_in","booked_online","vip","payment","upgrades","orders","allergens","dietary_requirements","occasions","needs","previous_visits","last_review_id","message_needs_reply","locked","seated_at","completed_at","held_until","staff_notes","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/bookings/{booking_id}/upgrades/{upgrade_id}":{"delete":{"operationId":"bookings.upgrades.remove","tags":["Bookings"],"summary":"Take an upgrade off a booking","description":"Takes up to `quantity` of an upgrade off a booking, the newest first. Only unpaid ones that a package does not include can be taken off: 409 `UPGRADE_NOT_REMOVABLE` when there are fewer than that. One paid for is refunded in Stampede. The answer is the booking with the upgrades it has left.","security":[{"oauth2":["bookings:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"upgrade_id","in":"path","required":true,"description":"The upgrade ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"quantity","in":"query","required":false,"description":"How many to take off. Default 1.","schema":{"default":1,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"reference":{"description":"The reference the guest was given.","type":["string","null"]},"venue_id":{"type":"string"},"status":{"type":"string","enum":["booked","arrived","seated","completed","cancelled","no_show","held"],"description":"`booked` until the party arrives; `held` is a table held for an enquiry, not yet a booking."},"stage":{"anyOf":[{"type":"string","enum":["partly_seated","starters","mains","desserts","table_ready","cleared","bill_dropped","paid"]},{"type":"null"}],"description":"Where a seated party is in their meal, when the venue tracks it. Null otherwise."},"starts_at":{"type":"string","description":"An ISO 8601 instant."},"ends_at":{"type":"string","description":"An ISO 8601 instant."},"party_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"booking_type":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}],"description":"The booking type it was made under, which set its rules."},"event_id":{"description":"The event it is for, if any.","type":["string","null"]},"enquiry_id":{"description":"The enquiry it was made for, if any.","type":["string","null"]},"guest_id":{"description":"The guest (`guests.get`), as on reviews, loyalty and wifi: their tags, history and consent. Null when Stampede has not linked them, as for most walk-ins and bookings with no email, and in booking webhooks: get the booking for it. `guest` is the details typed on the booking.","type":["string","null"]},"guest":{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["first_name","last_name","email","phone"],"additionalProperties":false},"notes":{"description":"The message the guest left with the booking.","type":["string","null"]},"attribution":{"type":"object","properties":{"utm_source":{"type":["string","null"]},"utm_medium":{"type":["string","null"]},"utm_campaign":{"type":["string","null"]},"utm_term":{"type":["string","null"]},"utm_content":{"type":["string","null"]},"utm_id":{"type":["string","null"]},"gclid":{"type":["string","null"]}},"required":["utm_source","utm_medium","utm_campaign","utm_term","utm_content","utm_id","gclid"],"additionalProperties":false,"description":"Where it came from, for marketing reports: the UTM values and Google Ads click ID of the landing URL it was booked from on Stampede's booking page, or those given to `bookings.create`. Null each when there were none."},"table_ids":{"type":"array","items":{"type":"string"},"description":"Its tables: names are in `booking_tables.list`."},"walk_in":{"type":"boolean"},"booked_online":{"type":"boolean","description":"Made by the guest online, not by staff."},"vip":{"type":"boolean"},"payment":{"anyOf":[{"type":"string","enum":["none","requested","paid","failed"]},{"type":"null"}],"description":"A payment asked of the guest: `requested` while a payment link is unpaid. Null when not known."},"upgrades":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"upgrade":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Each."},"pay_ahead":{"type":"boolean","description":"Guests booking online pay for it up front. Paid or not, `paid` and `unpaid` say what happened."}},"required":["id","name","price","pay_ahead"],"additionalProperties":false},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many are on the booking: `paid`, `included` and `unpaid` together."},"paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Paid for when the guest booked."},"included":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Included in a package booking type's price."},"unpaid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"To be paid at the venue. Only these can be removed (`bookings.upgrades.remove`)."}},"required":["upgrade","quantity","paid","included","unpaid"],"additionalProperties":false}},{"type":"null"}],"description":"What has been added to the booking (a bottle of prosecco, a cake), one entry per upgrade. Null when not read: `bookings.get` and the upgrade changes have it, lists and other changes leave it out."},"orders":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque: pass it with its `origin` to `bookings.orders.get` for its lines."},"origin":{"type":"string","enum":["square_pos","zion_preorder","stampede_ordering"]},"counts":{"type":"boolean","description":"Part of what the booking spent."},"currency":{"type":"string","enum":["GBP","EUR","USD"]},"net":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Minor units, without the tip. Null without `orders:read`."},"tip":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Minor units. Null without `orders:read`."},"on_till":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"A pre-order only: minor units of it already inside the till `net`. Null on a till check, and without `orders:read`."}},"required":["id","origin","counts","currency","net","tip","on_till"],"additionalProperties":false}},{"type":"null"}],"description":"Every order tied to the booking, listed once. `origin` is `square_pos` for a Square till check linked to the booking now, `zion_preorder` for a pre-order taken in Zion and `stampede_ordering` for one taken in Stampede ordering (a pre-order moved from Zion to Stampede ordering is listed once, as `stampede_ordering`). `counts` says whether it is part of what the booking spent: a till check once completed, a Zion pre-order once paid, a Stampede ordering pre-order once placed and not cancelled. An open check shows its running `net` with `counts: false`. `net` is in minor units without the tip (`tip`); a refund check has a negative `net`. Upgrades paid at the venue are inside the till `net`. Pre-ordered dishes are copied onto the till bill when the party is seated, so a dish can be on both. They are matched by Square item, for each currency: the matched units are the fewer of those pre-ordered and those on counting till checks, valued at the till's average price for that item and never more than the pre-ordered value, and shared out to pre-orders earliest first. `on_till` is the part of a pre-order already inside the till `net` (null on a till check). So what the booking spent, per currency, is the `net` of every counting till check, plus the `net` of every counting pre-order, less their `on_till`. Never add up amounts in different currencies. A pre-ordered dish that missed the till and was ordered again at the table is taken as the pre-order, so spend can read low by its price, never double. Quick-service venues that do not link checks to bookings show pre-orders only. For past bookings, `reports.booking_orders` has the same orders, found by the booking's trading day (a booking starting before 05:00 is on the day before). `net`, `tip` and `on_till` need `orders:read` as well; without it they are null. Null when not read: `bookings.get` has it, lists and changes leave it out. Also null while Stampede cannot read every source of the booking's orders yet, never a partial list."},"allergens":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"The allergens the guest gave, as they appear in Stampede (`[\"Gluten\", \"Nuts\"]`); empty when they gave none. Needs `guests:read` as well, because it is health information: without it, null. Also null when not known."},"dietary_requirements":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"The dietary requirements the guest gave (`[\"Vegan\"]`); empty when they gave none. Needs `guests:read` as well, because it is health information: without it, null. Also null when not known."},"occasions":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"What the guest is celebrating (`[\"Birthday\"]`); empty when nothing. Null when not known."},"needs":{"anyOf":[{"type":"object","properties":{"wheelchair":{"type":"boolean"},"buggy":{"type":"boolean"},"highchair":{"type":"boolean"},"dogs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many dogs are coming; 0 for none."}},"required":["wheelchair","buggy","highchair","dogs"],"additionalProperties":false},{"type":"null"}],"description":"What the party asked the table to suit, as availability's `needs` reads them. Null when not known."},"previous_visits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How many times the guest had booked at the organisation's venues before this booking. Null when not known."},"last_review_id":{"description":"The guest's latest review when the booking was made or last changed: `reviews.get` has it, with `reviews:read`. A review left since shows once the booking changes again. Null when they had left none, or when not known.","type":["string","null"]},"message_needs_reply":{"description":"The message the guest left (`notes`) is waiting for a reply from the venue. Null when not known.","type":["boolean","null"]},"locked":{"description":"Kept on its tables: Stampede will not move it when it rearranges the floor. Null when not known.","type":["boolean","null"]},"seated_at":{"description":"When the party was seated, an ISO 8601 instant. Null until then, or when not known.","type":["string","null"]},"completed_at":{"description":"When the booking was completed, an ISO 8601 instant. Null until then, or when not known.","type":["string","null"]},"held_until":{"description":"For a `held` booking (a table held for an enquiry): when the hold runs out, an ISO 8601 instant. Null otherwise.","type":["string","null"]},"staff_notes":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"booking_id":{"type":"string"},"body":{"type":"string","description":"The note, as plain text."},"author":{"description":"The name of whoever last wrote it. Null when Stampede has no name for them.","type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"description":"When it was last changed. Null if it never has been.","type":["string","null"]}},"required":["id","booking_id","body","author","created_at","updated_at"],"additionalProperties":false}},{"type":"null"}],"description":"Staff notes on the booking, oldest first, as `bookings.notes.list` has them. Only on `bookings.list` with `include=staff_notes`, which carries up to the 20 most recent; null otherwise, or when Stampede could not read them. `bookings.notes.list` has every note."},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","reference","venue_id","status","stage","starts_at","ends_at","party_size","booking_type","event_id","enquiry_id","guest_id","guest","notes","attribution","table_ids","walk_in","booked_online","vip","payment","upgrades","orders","allergens","dietary_requirements","occasions","needs","previous_visits","last_review_id","message_needs_reply","locked","seated_at","completed_at","held_until","staff_notes","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/blocks":{"get":{"operationId":"blocks.list","tags":["Blocks"],"summary":"List a venue's blocks","description":"Tables, or the whole venue, closed to new bookings, between `from` and `to` (days on the venue's clock, both included, up to 31 days). Earliest first.","security":[{"oauth2":["bookings:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"from","in":"query","required":true,"description":"A date on the venue's own clock, YYYY-MM-DD.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"description":"A date on the venue's own clock, YYYY-MM-DD.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"venue_id":{"type":"string"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date on the venue's own clock, YYYY-MM-DD."},"from":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"to":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"starts_at":{"type":"string","description":"An ISO 8601 instant."},"ends_at":{"type":"string","description":"An ISO 8601 instant."},"all_tables":{"type":"boolean","description":"The whole venue is closed to bookings for this time."},"table_ids":{"type":"array","items":{"type":"string"},"description":"The tables blocked. Empty when `all_tables`."}},"required":["id","venue_id","date","from","to","starts_at","ends_at","all_tables","table_ids"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"blocks.create","tags":["Blocks"],"summary":"Block tables, or the whole venue","description":"Closes tables to new bookings from `from` to `to` on each of `dates` (the venue's clock), as staff do from the planner. Bookings already made are kept: check `bookings.list` for those times. Returns one block per date.","security":[{"oauth2":["bookings:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"dates":{"minItems":1,"maxItems":31,"type":"array","items":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date on the venue's own clock, YYYY-MM-DD."},"description":"The days to block, all within 31 days of each other."},"from":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"to":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"table_ids":{"description":"The tables to block (`booking_tables.list`).","minItems":1,"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"all_tables":{"description":"Block the whole venue instead. Say so on purpose: it stops every booking in that time.","type":"boolean","const":true}},"required":["dates","from","to"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"venue_id":{"type":"string"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date on the venue's own clock, YYYY-MM-DD."},"from":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"to":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"starts_at":{"type":"string","description":"An ISO 8601 instant."},"ends_at":{"type":"string","description":"An ISO 8601 instant."},"all_tables":{"type":"boolean","description":"The whole venue is closed to bookings for this time."},"table_ids":{"type":"array","items":{"type":"string"},"description":"The tables blocked. Empty when `all_tables`."}},"required":["id","venue_id","date","from","to","starts_at","ends_at","all_tables","table_ids"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/blocks/{block_id}":{"put":{"operationId":"blocks.update","tags":["Blocks"],"summary":"Change a block","description":"Sets its day, times and tables. Every field is replaced.","security":[{"oauth2":["bookings:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"block_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date on the venue's own clock, YYYY-MM-DD."},"from":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"to":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"table_ids":{"description":"The tables to block (`booking_tables.list`).","minItems":1,"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"all_tables":{"description":"Block the whole venue instead. Say so on purpose: it stops every booking in that time.","type":"boolean","const":true}},"required":["date","from","to"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"venue_id":{"type":"string"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date on the venue's own clock, YYYY-MM-DD."},"from":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"to":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},"starts_at":{"type":"string","description":"An ISO 8601 instant."},"ends_at":{"type":"string","description":"An ISO 8601 instant."},"all_tables":{"type":"boolean","description":"The whole venue is closed to bookings for this time."},"table_ids":{"type":"array","items":{"type":"string"},"description":"The tables blocked. Empty when `all_tables`."}},"required":["id","venue_id","date","from","to","starts_at","ends_at","all_tables","table_ids"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"blocks.delete","tags":["Blocks"],"summary":"Remove a block","description":"The tables take bookings again for that time.","security":[{"oauth2":["bookings:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"block_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/bookings/{booking_id}/cancel":{"post":{"operationId":"bookings.cancel","tags":["Bookings"],"summary":"Cancel a booking","description":"Cancels a booking, as staff can in Stampede, whatever its status or what is on it. Money already paid stays paid: a refund is made in Stampede. With `cancellation_charge` the guest's saved card is charged the cancellation charge they agreed to (or less), and a booking with none agreed is refused before anything changes; a declined card still cancels the booking. The guest is emailed only when `notify_guest` is true. Cancelling one already cancelled changes nothing.","security":[{"oauth2":["bookings:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"notify_guest":{"type":"boolean","description":"Email the guest about it. Required: ask the person each time."},"cancellation_charge":{"description":"Charge the cancellation charge the guest agreed to when they booked.","type":"object","properties":{"amount":{"description":"Less than was agreed, in minor units. None: what was agreed.","type":"integer","minimum":1,"maximum":9007199254740991}}}},"required":["notify_guest"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"reference":{"description":"The reference the guest was given.","type":["string","null"]},"venue_id":{"type":"string"},"status":{"type":"string","enum":["booked","arrived","seated","completed","cancelled","no_show","held"],"description":"`booked` until the party arrives; `held` is a table held for an enquiry, not yet a booking."},"stage":{"anyOf":[{"type":"string","enum":["partly_seated","starters","mains","desserts","table_ready","cleared","bill_dropped","paid"]},{"type":"null"}],"description":"Where a seated party is in their meal, when the venue tracks it. Null otherwise."},"starts_at":{"type":"string","description":"An ISO 8601 instant."},"ends_at":{"type":"string","description":"An ISO 8601 instant."},"party_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"booking_type":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}],"description":"The booking type it was made under, which set its rules."},"event_id":{"description":"The event it is for, if any.","type":["string","null"]},"enquiry_id":{"description":"The enquiry it was made for, if any.","type":["string","null"]},"guest_id":{"description":"The guest (`guests.get`), as on reviews, loyalty and wifi: their tags, history and consent. Null when Stampede has not linked them, as for most walk-ins and bookings with no email, and in booking webhooks: get the booking for it. `guest` is the details typed on the booking.","type":["string","null"]},"guest":{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["first_name","last_name","email","phone"],"additionalProperties":false},"notes":{"description":"The message the guest left with the booking.","type":["string","null"]},"attribution":{"type":"object","properties":{"utm_source":{"type":["string","null"]},"utm_medium":{"type":["string","null"]},"utm_campaign":{"type":["string","null"]},"utm_term":{"type":["string","null"]},"utm_content":{"type":["string","null"]},"utm_id":{"type":["string","null"]},"gclid":{"type":["string","null"]}},"required":["utm_source","utm_medium","utm_campaign","utm_term","utm_content","utm_id","gclid"],"additionalProperties":false,"description":"Where it came from, for marketing reports: the UTM values and Google Ads click ID of the landing URL it was booked from on Stampede's booking page, or those given to `bookings.create`. Null each when there were none."},"table_ids":{"type":"array","items":{"type":"string"},"description":"Its tables: names are in `booking_tables.list`."},"walk_in":{"type":"boolean"},"booked_online":{"type":"boolean","description":"Made by the guest online, not by staff."},"vip":{"type":"boolean"},"payment":{"anyOf":[{"type":"string","enum":["none","requested","paid","failed"]},{"type":"null"}],"description":"A payment asked of the guest: `requested` while a payment link is unpaid. Null when not known."},"upgrades":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"upgrade":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Each."},"pay_ahead":{"type":"boolean","description":"Guests booking online pay for it up front. Paid or not, `paid` and `unpaid` say what happened."}},"required":["id","name","price","pay_ahead"],"additionalProperties":false},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many are on the booking: `paid`, `included` and `unpaid` together."},"paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Paid for when the guest booked."},"included":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Included in a package booking type's price."},"unpaid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"To be paid at the venue. Only these can be removed (`bookings.upgrades.remove`)."}},"required":["upgrade","quantity","paid","included","unpaid"],"additionalProperties":false}},{"type":"null"}],"description":"What has been added to the booking (a bottle of prosecco, a cake), one entry per upgrade. Null when not read: `bookings.get` and the upgrade changes have it, lists and other changes leave it out."},"orders":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque: pass it with its `origin` to `bookings.orders.get` for its lines."},"origin":{"type":"string","enum":["square_pos","zion_preorder","stampede_ordering"]},"counts":{"type":"boolean","description":"Part of what the booking spent."},"currency":{"type":"string","enum":["GBP","EUR","USD"]},"net":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Minor units, without the tip. Null without `orders:read`."},"tip":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Minor units. Null without `orders:read`."},"on_till":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"A pre-order only: minor units of it already inside the till `net`. Null on a till check, and without `orders:read`."}},"required":["id","origin","counts","currency","net","tip","on_till"],"additionalProperties":false}},{"type":"null"}],"description":"Every order tied to the booking, listed once. `origin` is `square_pos` for a Square till check linked to the booking now, `zion_preorder` for a pre-order taken in Zion and `stampede_ordering` for one taken in Stampede ordering (a pre-order moved from Zion to Stampede ordering is listed once, as `stampede_ordering`). `counts` says whether it is part of what the booking spent: a till check once completed, a Zion pre-order once paid, a Stampede ordering pre-order once placed and not cancelled. An open check shows its running `net` with `counts: false`. `net` is in minor units without the tip (`tip`); a refund check has a negative `net`. Upgrades paid at the venue are inside the till `net`. Pre-ordered dishes are copied onto the till bill when the party is seated, so a dish can be on both. They are matched by Square item, for each currency: the matched units are the fewer of those pre-ordered and those on counting till checks, valued at the till's average price for that item and never more than the pre-ordered value, and shared out to pre-orders earliest first. `on_till` is the part of a pre-order already inside the till `net` (null on a till check). So what the booking spent, per currency, is the `net` of every counting till check, plus the `net` of every counting pre-order, less their `on_till`. Never add up amounts in different currencies. A pre-ordered dish that missed the till and was ordered again at the table is taken as the pre-order, so spend can read low by its price, never double. Quick-service venues that do not link checks to bookings show pre-orders only. For past bookings, `reports.booking_orders` has the same orders, found by the booking's trading day (a booking starting before 05:00 is on the day before). `net`, `tip` and `on_till` need `orders:read` as well; without it they are null. Null when not read: `bookings.get` has it, lists and changes leave it out. Also null while Stampede cannot read every source of the booking's orders yet, never a partial list."},"allergens":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"The allergens the guest gave, as they appear in Stampede (`[\"Gluten\", \"Nuts\"]`); empty when they gave none. Needs `guests:read` as well, because it is health information: without it, null. Also null when not known."},"dietary_requirements":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"The dietary requirements the guest gave (`[\"Vegan\"]`); empty when they gave none. Needs `guests:read` as well, because it is health information: without it, null. Also null when not known."},"occasions":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"What the guest is celebrating (`[\"Birthday\"]`); empty when nothing. Null when not known."},"needs":{"anyOf":[{"type":"object","properties":{"wheelchair":{"type":"boolean"},"buggy":{"type":"boolean"},"highchair":{"type":"boolean"},"dogs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many dogs are coming; 0 for none."}},"required":["wheelchair","buggy","highchair","dogs"],"additionalProperties":false},{"type":"null"}],"description":"What the party asked the table to suit, as availability's `needs` reads them. Null when not known."},"previous_visits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How many times the guest had booked at the organisation's venues before this booking. Null when not known."},"last_review_id":{"description":"The guest's latest review when the booking was made or last changed: `reviews.get` has it, with `reviews:read`. A review left since shows once the booking changes again. Null when they had left none, or when not known.","type":["string","null"]},"message_needs_reply":{"description":"The message the guest left (`notes`) is waiting for a reply from the venue. Null when not known.","type":["boolean","null"]},"locked":{"description":"Kept on its tables: Stampede will not move it when it rearranges the floor. Null when not known.","type":["boolean","null"]},"seated_at":{"description":"When the party was seated, an ISO 8601 instant. Null until then, or when not known.","type":["string","null"]},"completed_at":{"description":"When the booking was completed, an ISO 8601 instant. Null until then, or when not known.","type":["string","null"]},"held_until":{"description":"For a `held` booking (a table held for an enquiry): when the hold runs out, an ISO 8601 instant. Null otherwise.","type":["string","null"]},"staff_notes":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"booking_id":{"type":"string"},"body":{"type":"string","description":"The note, as plain text."},"author":{"description":"The name of whoever last wrote it. Null when Stampede has no name for them.","type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"description":"When it was last changed. Null if it never has been.","type":["string","null"]}},"required":["id","booking_id","body","author","created_at","updated_at"],"additionalProperties":false}},{"type":"null"}],"description":"Staff notes on the booking, oldest first, as `bookings.notes.list` has them. Only on `bookings.list` with `include=staff_notes`, which carries up to the 20 most recent; null otherwise, or when Stampede could not read them. `bookings.notes.list` has every note."},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","reference","venue_id","status","stage","starts_at","ends_at","party_size","booking_type","event_id","enquiry_id","guest_id","guest","notes","attribution","table_ids","walk_in","booked_online","vip","payment","upgrades","orders","allergens","dietary_requirements","occasions","needs","previous_visits","last_review_id","message_needs_reply","locked","seated_at","completed_at","held_until","staff_notes","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/bookings/{booking_id}/arrive":{"post":{"operationId":"bookings.arrive","tags":["Bookings"],"summary":"Mark a booking arrived","description":"The party is here and waiting for their table. It can follow any status, as in Stampede; asking again changes nothing. The guest is emailed only when `notify_guest` is true.","security":[{"oauth2":["bookings:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"notify_guest":{"default":false,"description":"Email the guest about it. Default: no.","type":"boolean"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"reference":{"description":"The reference the guest was given.","type":["string","null"]},"venue_id":{"type":"string"},"status":{"type":"string","enum":["booked","arrived","seated","completed","cancelled","no_show","held"],"description":"`booked` until the party arrives; `held` is a table held for an enquiry, not yet a booking."},"stage":{"anyOf":[{"type":"string","enum":["partly_seated","starters","mains","desserts","table_ready","cleared","bill_dropped","paid"]},{"type":"null"}],"description":"Where a seated party is in their meal, when the venue tracks it. Null otherwise."},"starts_at":{"type":"string","description":"An ISO 8601 instant."},"ends_at":{"type":"string","description":"An ISO 8601 instant."},"party_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"booking_type":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}],"description":"The booking type it was made under, which set its rules."},"event_id":{"description":"The event it is for, if any.","type":["string","null"]},"enquiry_id":{"description":"The enquiry it was made for, if any.","type":["string","null"]},"guest_id":{"description":"The guest (`guests.get`), as on reviews, loyalty and wifi: their tags, history and consent. Null when Stampede has not linked them, as for most walk-ins and bookings with no email, and in booking webhooks: get the booking for it. `guest` is the details typed on the booking.","type":["string","null"]},"guest":{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["first_name","last_name","email","phone"],"additionalProperties":false},"notes":{"description":"The message the guest left with the booking.","type":["string","null"]},"attribution":{"type":"object","properties":{"utm_source":{"type":["string","null"]},"utm_medium":{"type":["string","null"]},"utm_campaign":{"type":["string","null"]},"utm_term":{"type":["string","null"]},"utm_content":{"type":["string","null"]},"utm_id":{"type":["string","null"]},"gclid":{"type":["string","null"]}},"required":["utm_source","utm_medium","utm_campaign","utm_term","utm_content","utm_id","gclid"],"additionalProperties":false,"description":"Where it came from, for marketing reports: the UTM values and Google Ads click ID of the landing URL it was booked from on Stampede's booking page, or those given to `bookings.create`. Null each when there were none."},"table_ids":{"type":"array","items":{"type":"string"},"description":"Its tables: names are in `booking_tables.list`."},"walk_in":{"type":"boolean"},"booked_online":{"type":"boolean","description":"Made by the guest online, not by staff."},"vip":{"type":"boolean"},"payment":{"anyOf":[{"type":"string","enum":["none","requested","paid","failed"]},{"type":"null"}],"description":"A payment asked of the guest: `requested` while a payment link is unpaid. Null when not known."},"upgrades":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"upgrade":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Each."},"pay_ahead":{"type":"boolean","description":"Guests booking online pay for it up front. Paid or not, `paid` and `unpaid` say what happened."}},"required":["id","name","price","pay_ahead"],"additionalProperties":false},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many are on the booking: `paid`, `included` and `unpaid` together."},"paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Paid for when the guest booked."},"included":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Included in a package booking type's price."},"unpaid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"To be paid at the venue. Only these can be removed (`bookings.upgrades.remove`)."}},"required":["upgrade","quantity","paid","included","unpaid"],"additionalProperties":false}},{"type":"null"}],"description":"What has been added to the booking (a bottle of prosecco, a cake), one entry per upgrade. Null when not read: `bookings.get` and the upgrade changes have it, lists and other changes leave it out."},"orders":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque: pass it with its `origin` to `bookings.orders.get` for its lines."},"origin":{"type":"string","enum":["square_pos","zion_preorder","stampede_ordering"]},"counts":{"type":"boolean","description":"Part of what the booking spent."},"currency":{"type":"string","enum":["GBP","EUR","USD"]},"net":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Minor units, without the tip. Null without `orders:read`."},"tip":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Minor units. Null without `orders:read`."},"on_till":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"A pre-order only: minor units of it already inside the till `net`. Null on a till check, and without `orders:read`."}},"required":["id","origin","counts","currency","net","tip","on_till"],"additionalProperties":false}},{"type":"null"}],"description":"Every order tied to the booking, listed once. `origin` is `square_pos` for a Square till check linked to the booking now, `zion_preorder` for a pre-order taken in Zion and `stampede_ordering` for one taken in Stampede ordering (a pre-order moved from Zion to Stampede ordering is listed once, as `stampede_ordering`). `counts` says whether it is part of what the booking spent: a till check once completed, a Zion pre-order once paid, a Stampede ordering pre-order once placed and not cancelled. An open check shows its running `net` with `counts: false`. `net` is in minor units without the tip (`tip`); a refund check has a negative `net`. Upgrades paid at the venue are inside the till `net`. Pre-ordered dishes are copied onto the till bill when the party is seated, so a dish can be on both. They are matched by Square item, for each currency: the matched units are the fewer of those pre-ordered and those on counting till checks, valued at the till's average price for that item and never more than the pre-ordered value, and shared out to pre-orders earliest first. `on_till` is the part of a pre-order already inside the till `net` (null on a till check). So what the booking spent, per currency, is the `net` of every counting till check, plus the `net` of every counting pre-order, less their `on_till`. Never add up amounts in different currencies. A pre-ordered dish that missed the till and was ordered again at the table is taken as the pre-order, so spend can read low by its price, never double. Quick-service venues that do not link checks to bookings show pre-orders only. For past bookings, `reports.booking_orders` has the same orders, found by the booking's trading day (a booking starting before 05:00 is on the day before). `net`, `tip` and `on_till` need `orders:read` as well; without it they are null. Null when not read: `bookings.get` has it, lists and changes leave it out. Also null while Stampede cannot read every source of the booking's orders yet, never a partial list."},"allergens":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"The allergens the guest gave, as they appear in Stampede (`[\"Gluten\", \"Nuts\"]`); empty when they gave none. Needs `guests:read` as well, because it is health information: without it, null. Also null when not known."},"dietary_requirements":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"The dietary requirements the guest gave (`[\"Vegan\"]`); empty when they gave none. Needs `guests:read` as well, because it is health information: without it, null. Also null when not known."},"occasions":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"What the guest is celebrating (`[\"Birthday\"]`); empty when nothing. Null when not known."},"needs":{"anyOf":[{"type":"object","properties":{"wheelchair":{"type":"boolean"},"buggy":{"type":"boolean"},"highchair":{"type":"boolean"},"dogs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many dogs are coming; 0 for none."}},"required":["wheelchair","buggy","highchair","dogs"],"additionalProperties":false},{"type":"null"}],"description":"What the party asked the table to suit, as availability's `needs` reads them. Null when not known."},"previous_visits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How many times the guest had booked at the organisation's venues before this booking. Null when not known."},"last_review_id":{"description":"The guest's latest review when the booking was made or last changed: `reviews.get` has it, with `reviews:read`. A review left since shows once the booking changes again. Null when they had left none, or when not known.","type":["string","null"]},"message_needs_reply":{"description":"The message the guest left (`notes`) is waiting for a reply from the venue. Null when not known.","type":["boolean","null"]},"locked":{"description":"Kept on its tables: Stampede will not move it when it rearranges the floor. Null when not known.","type":["boolean","null"]},"seated_at":{"description":"When the party was seated, an ISO 8601 instant. Null until then, or when not known.","type":["string","null"]},"completed_at":{"description":"When the booking was completed, an ISO 8601 instant. Null until then, or when not known.","type":["string","null"]},"held_until":{"description":"For a `held` booking (a table held for an enquiry): when the hold runs out, an ISO 8601 instant. Null otherwise.","type":["string","null"]},"staff_notes":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"booking_id":{"type":"string"},"body":{"type":"string","description":"The note, as plain text."},"author":{"description":"The name of whoever last wrote it. Null when Stampede has no name for them.","type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"description":"When it was last changed. Null if it never has been.","type":["string","null"]}},"required":["id","booking_id","body","author","created_at","updated_at"],"additionalProperties":false}},{"type":"null"}],"description":"Staff notes on the booking, oldest first, as `bookings.notes.list` has them. Only on `bookings.list` with `include=staff_notes`, which carries up to the 20 most recent; null otherwise, or when Stampede could not read them. `bookings.notes.list` has every note."},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","reference","venue_id","status","stage","starts_at","ends_at","party_size","booking_type","event_id","enquiry_id","guest_id","guest","notes","attribution","table_ids","walk_in","booked_online","vip","payment","upgrades","orders","allergens","dietary_requirements","occasions","needs","previous_visits","last_review_id","message_needs_reply","locked","seated_at","completed_at","held_until","staff_notes","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/bookings/{booking_id}/seat":{"post":{"operationId":"bookings.seat","tags":["Bookings"],"summary":"Seat a booking","description":"The party is at their table. It can follow any status, as in Stampede; asking again changes nothing. The guest is emailed only when `notify_guest` is true.","security":[{"oauth2":["bookings:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"notify_guest":{"default":false,"description":"Email the guest about it. Default: no.","type":"boolean"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"reference":{"description":"The reference the guest was given.","type":["string","null"]},"venue_id":{"type":"string"},"status":{"type":"string","enum":["booked","arrived","seated","completed","cancelled","no_show","held"],"description":"`booked` until the party arrives; `held` is a table held for an enquiry, not yet a booking."},"stage":{"anyOf":[{"type":"string","enum":["partly_seated","starters","mains","desserts","table_ready","cleared","bill_dropped","paid"]},{"type":"null"}],"description":"Where a seated party is in their meal, when the venue tracks it. Null otherwise."},"starts_at":{"type":"string","description":"An ISO 8601 instant."},"ends_at":{"type":"string","description":"An ISO 8601 instant."},"party_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"booking_type":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}],"description":"The booking type it was made under, which set its rules."},"event_id":{"description":"The event it is for, if any.","type":["string","null"]},"enquiry_id":{"description":"The enquiry it was made for, if any.","type":["string","null"]},"guest_id":{"description":"The guest (`guests.get`), as on reviews, loyalty and wifi: their tags, history and consent. Null when Stampede has not linked them, as for most walk-ins and bookings with no email, and in booking webhooks: get the booking for it. `guest` is the details typed on the booking.","type":["string","null"]},"guest":{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["first_name","last_name","email","phone"],"additionalProperties":false},"notes":{"description":"The message the guest left with the booking.","type":["string","null"]},"attribution":{"type":"object","properties":{"utm_source":{"type":["string","null"]},"utm_medium":{"type":["string","null"]},"utm_campaign":{"type":["string","null"]},"utm_term":{"type":["string","null"]},"utm_content":{"type":["string","null"]},"utm_id":{"type":["string","null"]},"gclid":{"type":["string","null"]}},"required":["utm_source","utm_medium","utm_campaign","utm_term","utm_content","utm_id","gclid"],"additionalProperties":false,"description":"Where it came from, for marketing reports: the UTM values and Google Ads click ID of the landing URL it was booked from on Stampede's booking page, or those given to `bookings.create`. Null each when there were none."},"table_ids":{"type":"array","items":{"type":"string"},"description":"Its tables: names are in `booking_tables.list`."},"walk_in":{"type":"boolean"},"booked_online":{"type":"boolean","description":"Made by the guest online, not by staff."},"vip":{"type":"boolean"},"payment":{"anyOf":[{"type":"string","enum":["none","requested","paid","failed"]},{"type":"null"}],"description":"A payment asked of the guest: `requested` while a payment link is unpaid. Null when not known."},"upgrades":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"upgrade":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Each."},"pay_ahead":{"type":"boolean","description":"Guests booking online pay for it up front. Paid or not, `paid` and `unpaid` say what happened."}},"required":["id","name","price","pay_ahead"],"additionalProperties":false},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many are on the booking: `paid`, `included` and `unpaid` together."},"paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Paid for when the guest booked."},"included":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Included in a package booking type's price."},"unpaid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"To be paid at the venue. Only these can be removed (`bookings.upgrades.remove`)."}},"required":["upgrade","quantity","paid","included","unpaid"],"additionalProperties":false}},{"type":"null"}],"description":"What has been added to the booking (a bottle of prosecco, a cake), one entry per upgrade. Null when not read: `bookings.get` and the upgrade changes have it, lists and other changes leave it out."},"orders":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque: pass it with its `origin` to `bookings.orders.get` for its lines."},"origin":{"type":"string","enum":["square_pos","zion_preorder","stampede_ordering"]},"counts":{"type":"boolean","description":"Part of what the booking spent."},"currency":{"type":"string","enum":["GBP","EUR","USD"]},"net":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Minor units, without the tip. Null without `orders:read`."},"tip":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Minor units. Null without `orders:read`."},"on_till":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"A pre-order only: minor units of it already inside the till `net`. Null on a till check, and without `orders:read`."}},"required":["id","origin","counts","currency","net","tip","on_till"],"additionalProperties":false}},{"type":"null"}],"description":"Every order tied to the booking, listed once. `origin` is `square_pos` for a Square till check linked to the booking now, `zion_preorder` for a pre-order taken in Zion and `stampede_ordering` for one taken in Stampede ordering (a pre-order moved from Zion to Stampede ordering is listed once, as `stampede_ordering`). `counts` says whether it is part of what the booking spent: a till check once completed, a Zion pre-order once paid, a Stampede ordering pre-order once placed and not cancelled. An open check shows its running `net` with `counts: false`. `net` is in minor units without the tip (`tip`); a refund check has a negative `net`. Upgrades paid at the venue are inside the till `net`. Pre-ordered dishes are copied onto the till bill when the party is seated, so a dish can be on both. They are matched by Square item, for each currency: the matched units are the fewer of those pre-ordered and those on counting till checks, valued at the till's average price for that item and never more than the pre-ordered value, and shared out to pre-orders earliest first. `on_till` is the part of a pre-order already inside the till `net` (null on a till check). So what the booking spent, per currency, is the `net` of every counting till check, plus the `net` of every counting pre-order, less their `on_till`. Never add up amounts in different currencies. A pre-ordered dish that missed the till and was ordered again at the table is taken as the pre-order, so spend can read low by its price, never double. Quick-service venues that do not link checks to bookings show pre-orders only. For past bookings, `reports.booking_orders` has the same orders, found by the booking's trading day (a booking starting before 05:00 is on the day before). `net`, `tip` and `on_till` need `orders:read` as well; without it they are null. Null when not read: `bookings.get` has it, lists and changes leave it out. Also null while Stampede cannot read every source of the booking's orders yet, never a partial list."},"allergens":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"The allergens the guest gave, as they appear in Stampede (`[\"Gluten\", \"Nuts\"]`); empty when they gave none. Needs `guests:read` as well, because it is health information: without it, null. Also null when not known."},"dietary_requirements":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"The dietary requirements the guest gave (`[\"Vegan\"]`); empty when they gave none. Needs `guests:read` as well, because it is health information: without it, null. Also null when not known."},"occasions":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"What the guest is celebrating (`[\"Birthday\"]`); empty when nothing. Null when not known."},"needs":{"anyOf":[{"type":"object","properties":{"wheelchair":{"type":"boolean"},"buggy":{"type":"boolean"},"highchair":{"type":"boolean"},"dogs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many dogs are coming; 0 for none."}},"required":["wheelchair","buggy","highchair","dogs"],"additionalProperties":false},{"type":"null"}],"description":"What the party asked the table to suit, as availability's `needs` reads them. Null when not known."},"previous_visits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How many times the guest had booked at the organisation's venues before this booking. Null when not known."},"last_review_id":{"description":"The guest's latest review when the booking was made or last changed: `reviews.get` has it, with `reviews:read`. A review left since shows once the booking changes again. Null when they had left none, or when not known.","type":["string","null"]},"message_needs_reply":{"description":"The message the guest left (`notes`) is waiting for a reply from the venue. Null when not known.","type":["boolean","null"]},"locked":{"description":"Kept on its tables: Stampede will not move it when it rearranges the floor. Null when not known.","type":["boolean","null"]},"seated_at":{"description":"When the party was seated, an ISO 8601 instant. Null until then, or when not known.","type":["string","null"]},"completed_at":{"description":"When the booking was completed, an ISO 8601 instant. Null until then, or when not known.","type":["string","null"]},"held_until":{"description":"For a `held` booking (a table held for an enquiry): when the hold runs out, an ISO 8601 instant. Null otherwise.","type":["string","null"]},"staff_notes":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"booking_id":{"type":"string"},"body":{"type":"string","description":"The note, as plain text."},"author":{"description":"The name of whoever last wrote it. Null when Stampede has no name for them.","type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"description":"When it was last changed. Null if it never has been.","type":["string","null"]}},"required":["id","booking_id","body","author","created_at","updated_at"],"additionalProperties":false}},{"type":"null"}],"description":"Staff notes on the booking, oldest first, as `bookings.notes.list` has them. Only on `bookings.list` with `include=staff_notes`, which carries up to the 20 most recent; null otherwise, or when Stampede could not read them. `bookings.notes.list` has every note."},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","reference","venue_id","status","stage","starts_at","ends_at","party_size","booking_type","event_id","enquiry_id","guest_id","guest","notes","attribution","table_ids","walk_in","booked_online","vip","payment","upgrades","orders","allergens","dietary_requirements","occasions","needs","previous_visits","last_review_id","message_needs_reply","locked","seated_at","completed_at","held_until","staff_notes","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/bookings/{booking_id}/complete":{"post":{"operationId":"bookings.complete","tags":["Bookings"],"summary":"Complete a booking","description":"The party has left: their tables are free again. It can follow any status, as in Stampede; asking again changes nothing. The guest is emailed only when `notify_guest` is true.","security":[{"oauth2":["bookings:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"notify_guest":{"default":false,"description":"Email the guest about it. Default: no.","type":"boolean"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"reference":{"description":"The reference the guest was given.","type":["string","null"]},"venue_id":{"type":"string"},"status":{"type":"string","enum":["booked","arrived","seated","completed","cancelled","no_show","held"],"description":"`booked` until the party arrives; `held` is a table held for an enquiry, not yet a booking."},"stage":{"anyOf":[{"type":"string","enum":["partly_seated","starters","mains","desserts","table_ready","cleared","bill_dropped","paid"]},{"type":"null"}],"description":"Where a seated party is in their meal, when the venue tracks it. Null otherwise."},"starts_at":{"type":"string","description":"An ISO 8601 instant."},"ends_at":{"type":"string","description":"An ISO 8601 instant."},"party_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"booking_type":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}],"description":"The booking type it was made under, which set its rules."},"event_id":{"description":"The event it is for, if any.","type":["string","null"]},"enquiry_id":{"description":"The enquiry it was made for, if any.","type":["string","null"]},"guest_id":{"description":"The guest (`guests.get`), as on reviews, loyalty and wifi: their tags, history and consent. Null when Stampede has not linked them, as for most walk-ins and bookings with no email, and in booking webhooks: get the booking for it. `guest` is the details typed on the booking.","type":["string","null"]},"guest":{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["first_name","last_name","email","phone"],"additionalProperties":false},"notes":{"description":"The message the guest left with the booking.","type":["string","null"]},"attribution":{"type":"object","properties":{"utm_source":{"type":["string","null"]},"utm_medium":{"type":["string","null"]},"utm_campaign":{"type":["string","null"]},"utm_term":{"type":["string","null"]},"utm_content":{"type":["string","null"]},"utm_id":{"type":["string","null"]},"gclid":{"type":["string","null"]}},"required":["utm_source","utm_medium","utm_campaign","utm_term","utm_content","utm_id","gclid"],"additionalProperties":false,"description":"Where it came from, for marketing reports: the UTM values and Google Ads click ID of the landing URL it was booked from on Stampede's booking page, or those given to `bookings.create`. Null each when there were none."},"table_ids":{"type":"array","items":{"type":"string"},"description":"Its tables: names are in `booking_tables.list`."},"walk_in":{"type":"boolean"},"booked_online":{"type":"boolean","description":"Made by the guest online, not by staff."},"vip":{"type":"boolean"},"payment":{"anyOf":[{"type":"string","enum":["none","requested","paid","failed"]},{"type":"null"}],"description":"A payment asked of the guest: `requested` while a payment link is unpaid. Null when not known."},"upgrades":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"upgrade":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Each."},"pay_ahead":{"type":"boolean","description":"Guests booking online pay for it up front. Paid or not, `paid` and `unpaid` say what happened."}},"required":["id","name","price","pay_ahead"],"additionalProperties":false},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many are on the booking: `paid`, `included` and `unpaid` together."},"paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Paid for when the guest booked."},"included":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Included in a package booking type's price."},"unpaid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"To be paid at the venue. Only these can be removed (`bookings.upgrades.remove`)."}},"required":["upgrade","quantity","paid","included","unpaid"],"additionalProperties":false}},{"type":"null"}],"description":"What has been added to the booking (a bottle of prosecco, a cake), one entry per upgrade. Null when not read: `bookings.get` and the upgrade changes have it, lists and other changes leave it out."},"orders":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque: pass it with its `origin` to `bookings.orders.get` for its lines."},"origin":{"type":"string","enum":["square_pos","zion_preorder","stampede_ordering"]},"counts":{"type":"boolean","description":"Part of what the booking spent."},"currency":{"type":"string","enum":["GBP","EUR","USD"]},"net":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Minor units, without the tip. Null without `orders:read`."},"tip":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Minor units. Null without `orders:read`."},"on_till":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"A pre-order only: minor units of it already inside the till `net`. Null on a till check, and without `orders:read`."}},"required":["id","origin","counts","currency","net","tip","on_till"],"additionalProperties":false}},{"type":"null"}],"description":"Every order tied to the booking, listed once. `origin` is `square_pos` for a Square till check linked to the booking now, `zion_preorder` for a pre-order taken in Zion and `stampede_ordering` for one taken in Stampede ordering (a pre-order moved from Zion to Stampede ordering is listed once, as `stampede_ordering`). `counts` says whether it is part of what the booking spent: a till check once completed, a Zion pre-order once paid, a Stampede ordering pre-order once placed and not cancelled. An open check shows its running `net` with `counts: false`. `net` is in minor units without the tip (`tip`); a refund check has a negative `net`. Upgrades paid at the venue are inside the till `net`. Pre-ordered dishes are copied onto the till bill when the party is seated, so a dish can be on both. They are matched by Square item, for each currency: the matched units are the fewer of those pre-ordered and those on counting till checks, valued at the till's average price for that item and never more than the pre-ordered value, and shared out to pre-orders earliest first. `on_till` is the part of a pre-order already inside the till `net` (null on a till check). So what the booking spent, per currency, is the `net` of every counting till check, plus the `net` of every counting pre-order, less their `on_till`. Never add up amounts in different currencies. A pre-ordered dish that missed the till and was ordered again at the table is taken as the pre-order, so spend can read low by its price, never double. Quick-service venues that do not link checks to bookings show pre-orders only. For past bookings, `reports.booking_orders` has the same orders, found by the booking's trading day (a booking starting before 05:00 is on the day before). `net`, `tip` and `on_till` need `orders:read` as well; without it they are null. Null when not read: `bookings.get` has it, lists and changes leave it out. Also null while Stampede cannot read every source of the booking's orders yet, never a partial list."},"allergens":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"The allergens the guest gave, as they appear in Stampede (`[\"Gluten\", \"Nuts\"]`); empty when they gave none. Needs `guests:read` as well, because it is health information: without it, null. Also null when not known."},"dietary_requirements":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"The dietary requirements the guest gave (`[\"Vegan\"]`); empty when they gave none. Needs `guests:read` as well, because it is health information: without it, null. Also null when not known."},"occasions":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"What the guest is celebrating (`[\"Birthday\"]`); empty when nothing. Null when not known."},"needs":{"anyOf":[{"type":"object","properties":{"wheelchair":{"type":"boolean"},"buggy":{"type":"boolean"},"highchair":{"type":"boolean"},"dogs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many dogs are coming; 0 for none."}},"required":["wheelchair","buggy","highchair","dogs"],"additionalProperties":false},{"type":"null"}],"description":"What the party asked the table to suit, as availability's `needs` reads them. Null when not known."},"previous_visits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How many times the guest had booked at the organisation's venues before this booking. Null when not known."},"last_review_id":{"description":"The guest's latest review when the booking was made or last changed: `reviews.get` has it, with `reviews:read`. A review left since shows once the booking changes again. Null when they had left none, or when not known.","type":["string","null"]},"message_needs_reply":{"description":"The message the guest left (`notes`) is waiting for a reply from the venue. Null when not known.","type":["boolean","null"]},"locked":{"description":"Kept on its tables: Stampede will not move it when it rearranges the floor. Null when not known.","type":["boolean","null"]},"seated_at":{"description":"When the party was seated, an ISO 8601 instant. Null until then, or when not known.","type":["string","null"]},"completed_at":{"description":"When the booking was completed, an ISO 8601 instant. Null until then, or when not known.","type":["string","null"]},"held_until":{"description":"For a `held` booking (a table held for an enquiry): when the hold runs out, an ISO 8601 instant. Null otherwise.","type":["string","null"]},"staff_notes":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"booking_id":{"type":"string"},"body":{"type":"string","description":"The note, as plain text."},"author":{"description":"The name of whoever last wrote it. Null when Stampede has no name for them.","type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"description":"When it was last changed. Null if it never has been.","type":["string","null"]}},"required":["id","booking_id","body","author","created_at","updated_at"],"additionalProperties":false}},{"type":"null"}],"description":"Staff notes on the booking, oldest first, as `bookings.notes.list` has them. Only on `bookings.list` with `include=staff_notes`, which carries up to the 20 most recent; null otherwise, or when Stampede could not read them. `bookings.notes.list` has every note."},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","reference","venue_id","status","stage","starts_at","ends_at","party_size","booking_type","event_id","enquiry_id","guest_id","guest","notes","attribution","table_ids","walk_in","booked_online","vip","payment","upgrades","orders","allergens","dietary_requirements","occasions","needs","previous_visits","last_review_id","message_needs_reply","locked","seated_at","completed_at","held_until","staff_notes","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/bookings/{booking_id}/no-show":{"post":{"operationId":"bookings.no_show","tags":["Bookings"],"summary":"Mark a booking a no-show","description":"The party did not come. No cancellation charge is taken: cancel it with `cancellation_charge` instead to take one. It can follow any status, as in Stampede; asking again changes nothing. The guest is emailed only when `notify_guest` is true.","security":[{"oauth2":["bookings:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"notify_guest":{"default":false,"description":"Email the guest about it. Default: no.","type":"boolean"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"reference":{"description":"The reference the guest was given.","type":["string","null"]},"venue_id":{"type":"string"},"status":{"type":"string","enum":["booked","arrived","seated","completed","cancelled","no_show","held"],"description":"`booked` until the party arrives; `held` is a table held for an enquiry, not yet a booking."},"stage":{"anyOf":[{"type":"string","enum":["partly_seated","starters","mains","desserts","table_ready","cleared","bill_dropped","paid"]},{"type":"null"}],"description":"Where a seated party is in their meal, when the venue tracks it. Null otherwise."},"starts_at":{"type":"string","description":"An ISO 8601 instant."},"ends_at":{"type":"string","description":"An ISO 8601 instant."},"party_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"booking_type":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}],"description":"The booking type it was made under, which set its rules."},"event_id":{"description":"The event it is for, if any.","type":["string","null"]},"enquiry_id":{"description":"The enquiry it was made for, if any.","type":["string","null"]},"guest_id":{"description":"The guest (`guests.get`), as on reviews, loyalty and wifi: their tags, history and consent. Null when Stampede has not linked them, as for most walk-ins and bookings with no email, and in booking webhooks: get the booking for it. `guest` is the details typed on the booking.","type":["string","null"]},"guest":{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["first_name","last_name","email","phone"],"additionalProperties":false},"notes":{"description":"The message the guest left with the booking.","type":["string","null"]},"attribution":{"type":"object","properties":{"utm_source":{"type":["string","null"]},"utm_medium":{"type":["string","null"]},"utm_campaign":{"type":["string","null"]},"utm_term":{"type":["string","null"]},"utm_content":{"type":["string","null"]},"utm_id":{"type":["string","null"]},"gclid":{"type":["string","null"]}},"required":["utm_source","utm_medium","utm_campaign","utm_term","utm_content","utm_id","gclid"],"additionalProperties":false,"description":"Where it came from, for marketing reports: the UTM values and Google Ads click ID of the landing URL it was booked from on Stampede's booking page, or those given to `bookings.create`. Null each when there were none."},"table_ids":{"type":"array","items":{"type":"string"},"description":"Its tables: names are in `booking_tables.list`."},"walk_in":{"type":"boolean"},"booked_online":{"type":"boolean","description":"Made by the guest online, not by staff."},"vip":{"type":"boolean"},"payment":{"anyOf":[{"type":"string","enum":["none","requested","paid","failed"]},{"type":"null"}],"description":"A payment asked of the guest: `requested` while a payment link is unpaid. Null when not known."},"upgrades":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"upgrade":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Each."},"pay_ahead":{"type":"boolean","description":"Guests booking online pay for it up front. Paid or not, `paid` and `unpaid` say what happened."}},"required":["id","name","price","pay_ahead"],"additionalProperties":false},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many are on the booking: `paid`, `included` and `unpaid` together."},"paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Paid for when the guest booked."},"included":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Included in a package booking type's price."},"unpaid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"To be paid at the venue. Only these can be removed (`bookings.upgrades.remove`)."}},"required":["upgrade","quantity","paid","included","unpaid"],"additionalProperties":false}},{"type":"null"}],"description":"What has been added to the booking (a bottle of prosecco, a cake), one entry per upgrade. Null when not read: `bookings.get` and the upgrade changes have it, lists and other changes leave it out."},"orders":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque: pass it with its `origin` to `bookings.orders.get` for its lines."},"origin":{"type":"string","enum":["square_pos","zion_preorder","stampede_ordering"]},"counts":{"type":"boolean","description":"Part of what the booking spent."},"currency":{"type":"string","enum":["GBP","EUR","USD"]},"net":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Minor units, without the tip. Null without `orders:read`."},"tip":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Minor units. Null without `orders:read`."},"on_till":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"A pre-order only: minor units of it already inside the till `net`. Null on a till check, and without `orders:read`."}},"required":["id","origin","counts","currency","net","tip","on_till"],"additionalProperties":false}},{"type":"null"}],"description":"Every order tied to the booking, listed once. `origin` is `square_pos` for a Square till check linked to the booking now, `zion_preorder` for a pre-order taken in Zion and `stampede_ordering` for one taken in Stampede ordering (a pre-order moved from Zion to Stampede ordering is listed once, as `stampede_ordering`). `counts` says whether it is part of what the booking spent: a till check once completed, a Zion pre-order once paid, a Stampede ordering pre-order once placed and not cancelled. An open check shows its running `net` with `counts: false`. `net` is in minor units without the tip (`tip`); a refund check has a negative `net`. Upgrades paid at the venue are inside the till `net`. Pre-ordered dishes are copied onto the till bill when the party is seated, so a dish can be on both. They are matched by Square item, for each currency: the matched units are the fewer of those pre-ordered and those on counting till checks, valued at the till's average price for that item and never more than the pre-ordered value, and shared out to pre-orders earliest first. `on_till` is the part of a pre-order already inside the till `net` (null on a till check). So what the booking spent, per currency, is the `net` of every counting till check, plus the `net` of every counting pre-order, less their `on_till`. Never add up amounts in different currencies. A pre-ordered dish that missed the till and was ordered again at the table is taken as the pre-order, so spend can read low by its price, never double. Quick-service venues that do not link checks to bookings show pre-orders only. For past bookings, `reports.booking_orders` has the same orders, found by the booking's trading day (a booking starting before 05:00 is on the day before). `net`, `tip` and `on_till` need `orders:read` as well; without it they are null. Null when not read: `bookings.get` has it, lists and changes leave it out. Also null while Stampede cannot read every source of the booking's orders yet, never a partial list."},"allergens":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"The allergens the guest gave, as they appear in Stampede (`[\"Gluten\", \"Nuts\"]`); empty when they gave none. Needs `guests:read` as well, because it is health information: without it, null. Also null when not known."},"dietary_requirements":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"The dietary requirements the guest gave (`[\"Vegan\"]`); empty when they gave none. Needs `guests:read` as well, because it is health information: without it, null. Also null when not known."},"occasions":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"What the guest is celebrating (`[\"Birthday\"]`); empty when nothing. Null when not known."},"needs":{"anyOf":[{"type":"object","properties":{"wheelchair":{"type":"boolean"},"buggy":{"type":"boolean"},"highchair":{"type":"boolean"},"dogs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many dogs are coming; 0 for none."}},"required":["wheelchair","buggy","highchair","dogs"],"additionalProperties":false},{"type":"null"}],"description":"What the party asked the table to suit, as availability's `needs` reads them. Null when not known."},"previous_visits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How many times the guest had booked at the organisation's venues before this booking. Null when not known."},"last_review_id":{"description":"The guest's latest review when the booking was made or last changed: `reviews.get` has it, with `reviews:read`. A review left since shows once the booking changes again. Null when they had left none, or when not known.","type":["string","null"]},"message_needs_reply":{"description":"The message the guest left (`notes`) is waiting for a reply from the venue. Null when not known.","type":["boolean","null"]},"locked":{"description":"Kept on its tables: Stampede will not move it when it rearranges the floor. Null when not known.","type":["boolean","null"]},"seated_at":{"description":"When the party was seated, an ISO 8601 instant. Null until then, or when not known.","type":["string","null"]},"completed_at":{"description":"When the booking was completed, an ISO 8601 instant. Null until then, or when not known.","type":["string","null"]},"held_until":{"description":"For a `held` booking (a table held for an enquiry): when the hold runs out, an ISO 8601 instant. Null otherwise.","type":["string","null"]},"staff_notes":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"booking_id":{"type":"string"},"body":{"type":"string","description":"The note, as plain text."},"author":{"description":"The name of whoever last wrote it. Null when Stampede has no name for them.","type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"description":"When it was last changed. Null if it never has been.","type":["string","null"]}},"required":["id","booking_id","body","author","created_at","updated_at"],"additionalProperties":false}},{"type":"null"}],"description":"Staff notes on the booking, oldest first, as `bookings.notes.list` has them. Only on `bookings.list` with `include=staff_notes`, which carries up to the 20 most recent; null otherwise, or when Stampede could not read them. `bookings.notes.list` has every note."},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","reference","venue_id","status","stage","starts_at","ends_at","party_size","booking_type","event_id","enquiry_id","guest_id","guest","notes","attribution","table_ids","walk_in","booked_online","vip","payment","upgrades","orders","allergens","dietary_requirements","occasions","needs","previous_visits","last_review_id","message_needs_reply","locked","seated_at","completed_at","held_until","staff_notes","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/bookings/{booking_id}/reopen":{"post":{"operationId":"bookings.reopen","tags":["Bookings"],"summary":"Put a booking back to booked","description":"Undoes an arrival, a seating, a completion, a no-show or a cancellation. It can follow any status, as in Stampede; asking again changes nothing. The guest is emailed only when `notify_guest` is true.","security":[{"oauth2":["bookings:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"notify_guest":{"default":false,"description":"Email the guest about it. Default: no.","type":"boolean"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"reference":{"description":"The reference the guest was given.","type":["string","null"]},"venue_id":{"type":"string"},"status":{"type":"string","enum":["booked","arrived","seated","completed","cancelled","no_show","held"],"description":"`booked` until the party arrives; `held` is a table held for an enquiry, not yet a booking."},"stage":{"anyOf":[{"type":"string","enum":["partly_seated","starters","mains","desserts","table_ready","cleared","bill_dropped","paid"]},{"type":"null"}],"description":"Where a seated party is in their meal, when the venue tracks it. Null otherwise."},"starts_at":{"type":"string","description":"An ISO 8601 instant."},"ends_at":{"type":"string","description":"An ISO 8601 instant."},"party_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"booking_type":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}],"description":"The booking type it was made under, which set its rules."},"event_id":{"description":"The event it is for, if any.","type":["string","null"]},"enquiry_id":{"description":"The enquiry it was made for, if any.","type":["string","null"]},"guest_id":{"description":"The guest (`guests.get`), as on reviews, loyalty and wifi: their tags, history and consent. Null when Stampede has not linked them, as for most walk-ins and bookings with no email, and in booking webhooks: get the booking for it. `guest` is the details typed on the booking.","type":["string","null"]},"guest":{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["first_name","last_name","email","phone"],"additionalProperties":false},"notes":{"description":"The message the guest left with the booking.","type":["string","null"]},"attribution":{"type":"object","properties":{"utm_source":{"type":["string","null"]},"utm_medium":{"type":["string","null"]},"utm_campaign":{"type":["string","null"]},"utm_term":{"type":["string","null"]},"utm_content":{"type":["string","null"]},"utm_id":{"type":["string","null"]},"gclid":{"type":["string","null"]}},"required":["utm_source","utm_medium","utm_campaign","utm_term","utm_content","utm_id","gclid"],"additionalProperties":false,"description":"Where it came from, for marketing reports: the UTM values and Google Ads click ID of the landing URL it was booked from on Stampede's booking page, or those given to `bookings.create`. Null each when there were none."},"table_ids":{"type":"array","items":{"type":"string"},"description":"Its tables: names are in `booking_tables.list`."},"walk_in":{"type":"boolean"},"booked_online":{"type":"boolean","description":"Made by the guest online, not by staff."},"vip":{"type":"boolean"},"payment":{"anyOf":[{"type":"string","enum":["none","requested","paid","failed"]},{"type":"null"}],"description":"A payment asked of the guest: `requested` while a payment link is unpaid. Null when not known."},"upgrades":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"upgrade":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Each."},"pay_ahead":{"type":"boolean","description":"Guests booking online pay for it up front. Paid or not, `paid` and `unpaid` say what happened."}},"required":["id","name","price","pay_ahead"],"additionalProperties":false},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many are on the booking: `paid`, `included` and `unpaid` together."},"paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Paid for when the guest booked."},"included":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Included in a package booking type's price."},"unpaid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"To be paid at the venue. Only these can be removed (`bookings.upgrades.remove`)."}},"required":["upgrade","quantity","paid","included","unpaid"],"additionalProperties":false}},{"type":"null"}],"description":"What has been added to the booking (a bottle of prosecco, a cake), one entry per upgrade. Null when not read: `bookings.get` and the upgrade changes have it, lists and other changes leave it out."},"orders":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque: pass it with its `origin` to `bookings.orders.get` for its lines."},"origin":{"type":"string","enum":["square_pos","zion_preorder","stampede_ordering"]},"counts":{"type":"boolean","description":"Part of what the booking spent."},"currency":{"type":"string","enum":["GBP","EUR","USD"]},"net":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Minor units, without the tip. Null without `orders:read`."},"tip":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Minor units. Null without `orders:read`."},"on_till":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"A pre-order only: minor units of it already inside the till `net`. Null on a till check, and without `orders:read`."}},"required":["id","origin","counts","currency","net","tip","on_till"],"additionalProperties":false}},{"type":"null"}],"description":"Every order tied to the booking, listed once. `origin` is `square_pos` for a Square till check linked to the booking now, `zion_preorder` for a pre-order taken in Zion and `stampede_ordering` for one taken in Stampede ordering (a pre-order moved from Zion to Stampede ordering is listed once, as `stampede_ordering`). `counts` says whether it is part of what the booking spent: a till check once completed, a Zion pre-order once paid, a Stampede ordering pre-order once placed and not cancelled. An open check shows its running `net` with `counts: false`. `net` is in minor units without the tip (`tip`); a refund check has a negative `net`. Upgrades paid at the venue are inside the till `net`. Pre-ordered dishes are copied onto the till bill when the party is seated, so a dish can be on both. They are matched by Square item, for each currency: the matched units are the fewer of those pre-ordered and those on counting till checks, valued at the till's average price for that item and never more than the pre-ordered value, and shared out to pre-orders earliest first. `on_till` is the part of a pre-order already inside the till `net` (null on a till check). So what the booking spent, per currency, is the `net` of every counting till check, plus the `net` of every counting pre-order, less their `on_till`. Never add up amounts in different currencies. A pre-ordered dish that missed the till and was ordered again at the table is taken as the pre-order, so spend can read low by its price, never double. Quick-service venues that do not link checks to bookings show pre-orders only. For past bookings, `reports.booking_orders` has the same orders, found by the booking's trading day (a booking starting before 05:00 is on the day before). `net`, `tip` and `on_till` need `orders:read` as well; without it they are null. Null when not read: `bookings.get` has it, lists and changes leave it out. Also null while Stampede cannot read every source of the booking's orders yet, never a partial list."},"allergens":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"The allergens the guest gave, as they appear in Stampede (`[\"Gluten\", \"Nuts\"]`); empty when they gave none. Needs `guests:read` as well, because it is health information: without it, null. Also null when not known."},"dietary_requirements":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"The dietary requirements the guest gave (`[\"Vegan\"]`); empty when they gave none. Needs `guests:read` as well, because it is health information: without it, null. Also null when not known."},"occasions":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"What the guest is celebrating (`[\"Birthday\"]`); empty when nothing. Null when not known."},"needs":{"anyOf":[{"type":"object","properties":{"wheelchair":{"type":"boolean"},"buggy":{"type":"boolean"},"highchair":{"type":"boolean"},"dogs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many dogs are coming; 0 for none."}},"required":["wheelchair","buggy","highchair","dogs"],"additionalProperties":false},{"type":"null"}],"description":"What the party asked the table to suit, as availability's `needs` reads them. Null when not known."},"previous_visits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How many times the guest had booked at the organisation's venues before this booking. Null when not known."},"last_review_id":{"description":"The guest's latest review when the booking was made or last changed: `reviews.get` has it, with `reviews:read`. A review left since shows once the booking changes again. Null when they had left none, or when not known.","type":["string","null"]},"message_needs_reply":{"description":"The message the guest left (`notes`) is waiting for a reply from the venue. Null when not known.","type":["boolean","null"]},"locked":{"description":"Kept on its tables: Stampede will not move it when it rearranges the floor. Null when not known.","type":["boolean","null"]},"seated_at":{"description":"When the party was seated, an ISO 8601 instant. Null until then, or when not known.","type":["string","null"]},"completed_at":{"description":"When the booking was completed, an ISO 8601 instant. Null until then, or when not known.","type":["string","null"]},"held_until":{"description":"For a `held` booking (a table held for an enquiry): when the hold runs out, an ISO 8601 instant. Null otherwise.","type":["string","null"]},"staff_notes":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"booking_id":{"type":"string"},"body":{"type":"string","description":"The note, as plain text."},"author":{"description":"The name of whoever last wrote it. Null when Stampede has no name for them.","type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"description":"When it was last changed. Null if it never has been.","type":["string","null"]}},"required":["id","booking_id","body","author","created_at","updated_at"],"additionalProperties":false}},{"type":"null"}],"description":"Staff notes on the booking, oldest first, as `bookings.notes.list` has them. Only on `bookings.list` with `include=staff_notes`, which carries up to the 20 most recent; null otherwise, or when Stampede could not read them. `bookings.notes.list` has every note."},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","reference","venue_id","status","stage","starts_at","ends_at","party_size","booking_type","event_id","enquiry_id","guest_id","guest","notes","attribution","table_ids","walk_in","booked_online","vip","payment","upgrades","orders","allergens","dietary_requirements","occasions","needs","previous_visits","last_review_id","message_needs_reply","locked","seated_at","completed_at","held_until","staff_notes","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/walk-ins":{"post":{"operationId":"walk_ins.create","tags":["Bookings"],"summary":"Seat a walk-in","description":"A party with no booking, put on tables now as staff do from the planner: it starts on the venue's planner grid (`starts_at` to start it elsewhere), whatever else is on those tables, and the guest is never emailed. It is seated at once when the venue seats walk-ins as they arrive, or when `seat` is true.","security":[{"oauth2":["bookings:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"party_size":{"type":"integer","minimum":1,"maximum":500},"booking_type_id":{"type":"string","minLength":1,"maxLength":64},"table_ids":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"starts_at":{"description":"Default: now, on the venue's planner grid.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"duration_minutes":{"description":"Default: the booking type's length for the party.","type":"integer","minimum":15,"maximum":1440},"guest":{"description":"Default: a walk-in with no name.","type":"object","properties":{"first_name":{"type":"string","minLength":1,"maxLength":100},"last_name":{"type":"string","maxLength":100},"email":{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","minLength":5,"maxLength":30}}},"seat":{"description":"Seat them now. Default: the venue's own setting.","type":"boolean"},"idempotency_key":{"description":"As for `bookings.create`: the same key again returns the walk-in it made.","type":"string","minLength":8,"maxLength":96,"pattern":"^[A-Za-z0-9_-]+$"}},"required":["party_size","booking_type_id","table_ids"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"reference":{"description":"The reference the guest was given.","type":["string","null"]},"venue_id":{"type":"string"},"status":{"type":"string","enum":["booked","arrived","seated","completed","cancelled","no_show","held"],"description":"`booked` until the party arrives; `held` is a table held for an enquiry, not yet a booking."},"stage":{"anyOf":[{"type":"string","enum":["partly_seated","starters","mains","desserts","table_ready","cleared","bill_dropped","paid"]},{"type":"null"}],"description":"Where a seated party is in their meal, when the venue tracks it. Null otherwise."},"starts_at":{"type":"string","description":"An ISO 8601 instant."},"ends_at":{"type":"string","description":"An ISO 8601 instant."},"party_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"booking_type":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}],"description":"The booking type it was made under, which set its rules."},"event_id":{"description":"The event it is for, if any.","type":["string","null"]},"enquiry_id":{"description":"The enquiry it was made for, if any.","type":["string","null"]},"guest_id":{"description":"The guest (`guests.get`), as on reviews, loyalty and wifi: their tags, history and consent. Null when Stampede has not linked them, as for most walk-ins and bookings with no email, and in booking webhooks: get the booking for it. `guest` is the details typed on the booking.","type":["string","null"]},"guest":{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["first_name","last_name","email","phone"],"additionalProperties":false},"notes":{"description":"The message the guest left with the booking.","type":["string","null"]},"attribution":{"type":"object","properties":{"utm_source":{"type":["string","null"]},"utm_medium":{"type":["string","null"]},"utm_campaign":{"type":["string","null"]},"utm_term":{"type":["string","null"]},"utm_content":{"type":["string","null"]},"utm_id":{"type":["string","null"]},"gclid":{"type":["string","null"]}},"required":["utm_source","utm_medium","utm_campaign","utm_term","utm_content","utm_id","gclid"],"additionalProperties":false,"description":"Where it came from, for marketing reports: the UTM values and Google Ads click ID of the landing URL it was booked from on Stampede's booking page, or those given to `bookings.create`. Null each when there were none."},"table_ids":{"type":"array","items":{"type":"string"},"description":"Its tables: names are in `booking_tables.list`."},"walk_in":{"type":"boolean"},"booked_online":{"type":"boolean","description":"Made by the guest online, not by staff."},"vip":{"type":"boolean"},"payment":{"anyOf":[{"type":"string","enum":["none","requested","paid","failed"]},{"type":"null"}],"description":"A payment asked of the guest: `requested` while a payment link is unpaid. Null when not known."},"upgrades":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"upgrade":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Each."},"pay_ahead":{"type":"boolean","description":"Guests booking online pay for it up front. Paid or not, `paid` and `unpaid` say what happened."}},"required":["id","name","price","pay_ahead"],"additionalProperties":false},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many are on the booking: `paid`, `included` and `unpaid` together."},"paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Paid for when the guest booked."},"included":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Included in a package booking type's price."},"unpaid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"To be paid at the venue. Only these can be removed (`bookings.upgrades.remove`)."}},"required":["upgrade","quantity","paid","included","unpaid"],"additionalProperties":false}},{"type":"null"}],"description":"What has been added to the booking (a bottle of prosecco, a cake), one entry per upgrade. Null when not read: `bookings.get` and the upgrade changes have it, lists and other changes leave it out."},"orders":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque: pass it with its `origin` to `bookings.orders.get` for its lines."},"origin":{"type":"string","enum":["square_pos","zion_preorder","stampede_ordering"]},"counts":{"type":"boolean","description":"Part of what the booking spent."},"currency":{"type":"string","enum":["GBP","EUR","USD"]},"net":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Minor units, without the tip. Null without `orders:read`."},"tip":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Minor units. Null without `orders:read`."},"on_till":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"A pre-order only: minor units of it already inside the till `net`. Null on a till check, and without `orders:read`."}},"required":["id","origin","counts","currency","net","tip","on_till"],"additionalProperties":false}},{"type":"null"}],"description":"Every order tied to the booking, listed once. `origin` is `square_pos` for a Square till check linked to the booking now, `zion_preorder` for a pre-order taken in Zion and `stampede_ordering` for one taken in Stampede ordering (a pre-order moved from Zion to Stampede ordering is listed once, as `stampede_ordering`). `counts` says whether it is part of what the booking spent: a till check once completed, a Zion pre-order once paid, a Stampede ordering pre-order once placed and not cancelled. An open check shows its running `net` with `counts: false`. `net` is in minor units without the tip (`tip`); a refund check has a negative `net`. Upgrades paid at the venue are inside the till `net`. Pre-ordered dishes are copied onto the till bill when the party is seated, so a dish can be on both. They are matched by Square item, for each currency: the matched units are the fewer of those pre-ordered and those on counting till checks, valued at the till's average price for that item and never more than the pre-ordered value, and shared out to pre-orders earliest first. `on_till` is the part of a pre-order already inside the till `net` (null on a till check). So what the booking spent, per currency, is the `net` of every counting till check, plus the `net` of every counting pre-order, less their `on_till`. Never add up amounts in different currencies. A pre-ordered dish that missed the till and was ordered again at the table is taken as the pre-order, so spend can read low by its price, never double. Quick-service venues that do not link checks to bookings show pre-orders only. For past bookings, `reports.booking_orders` has the same orders, found by the booking's trading day (a booking starting before 05:00 is on the day before). `net`, `tip` and `on_till` need `orders:read` as well; without it they are null. Null when not read: `bookings.get` has it, lists and changes leave it out. Also null while Stampede cannot read every source of the booking's orders yet, never a partial list."},"allergens":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"The allergens the guest gave, as they appear in Stampede (`[\"Gluten\", \"Nuts\"]`); empty when they gave none. Needs `guests:read` as well, because it is health information: without it, null. Also null when not known."},"dietary_requirements":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"The dietary requirements the guest gave (`[\"Vegan\"]`); empty when they gave none. Needs `guests:read` as well, because it is health information: without it, null. Also null when not known."},"occasions":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"What the guest is celebrating (`[\"Birthday\"]`); empty when nothing. Null when not known."},"needs":{"anyOf":[{"type":"object","properties":{"wheelchair":{"type":"boolean"},"buggy":{"type":"boolean"},"highchair":{"type":"boolean"},"dogs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many dogs are coming; 0 for none."}},"required":["wheelchair","buggy","highchair","dogs"],"additionalProperties":false},{"type":"null"}],"description":"What the party asked the table to suit, as availability's `needs` reads them. Null when not known."},"previous_visits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How many times the guest had booked at the organisation's venues before this booking. Null when not known."},"last_review_id":{"description":"The guest's latest review when the booking was made or last changed: `reviews.get` has it, with `reviews:read`. A review left since shows once the booking changes again. Null when they had left none, or when not known.","type":["string","null"]},"message_needs_reply":{"description":"The message the guest left (`notes`) is waiting for a reply from the venue. Null when not known.","type":["boolean","null"]},"locked":{"description":"Kept on its tables: Stampede will not move it when it rearranges the floor. Null when not known.","type":["boolean","null"]},"seated_at":{"description":"When the party was seated, an ISO 8601 instant. Null until then, or when not known.","type":["string","null"]},"completed_at":{"description":"When the booking was completed, an ISO 8601 instant. Null until then, or when not known.","type":["string","null"]},"held_until":{"description":"For a `held` booking (a table held for an enquiry): when the hold runs out, an ISO 8601 instant. Null otherwise.","type":["string","null"]},"staff_notes":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"booking_id":{"type":"string"},"body":{"type":"string","description":"The note, as plain text."},"author":{"description":"The name of whoever last wrote it. Null when Stampede has no name for them.","type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"description":"When it was last changed. Null if it never has been.","type":["string","null"]}},"required":["id","booking_id","body","author","created_at","updated_at"],"additionalProperties":false}},{"type":"null"}],"description":"Staff notes on the booking, oldest first, as `bookings.notes.list` has them. Only on `bookings.list` with `include=staff_notes`, which carries up to the 20 most recent; null otherwise, or when Stampede could not read them. `bookings.notes.list` has every note."},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","reference","venue_id","status","stage","starts_at","ends_at","party_size","booking_type","event_id","enquiry_id","guest_id","guest","notes","attribution","table_ids","walk_in","booked_online","vip","payment","upgrades","orders","allergens","dietary_requirements","occasions","needs","previous_visits","last_review_id","message_needs_reply","locked","seated_at","completed_at","held_until","staff_notes","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/bookings/{booking_id}/notes":{"get":{"operationId":"bookings.notes.list","tags":["Bookings"],"summary":"List a booking's staff notes","description":"The notes staff have written on a booking, oldest first, each with who last wrote it. The guest never sees them. Not the message the guest left when they booked, which is `notes` on the booking.","security":[{"oauth2":["bookings:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"booking_id":{"type":"string"},"body":{"type":"string","description":"The note, as plain text."},"author":{"description":"The name of whoever last wrote it. Null when Stampede has no name for them.","type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"description":"When it was last changed. Null if it never has been.","type":["string","null"]}},"required":["id","booking_id","body","author","created_at","updated_at"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"bookings.notes.create","tags":["Bookings"],"summary":"Add a staff note to a booking","description":"A note for staff on a booking, as Stampede's booking form adds one, shown under the signed-in person's name. The guest never sees it and is not emailed. It goes on the booking's history.","security":[{"oauth2":["bookings:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":2000,"description":"The note, as plain text. Staff see it; the guest never does."}},"required":["body"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"booking_id":{"type":"string"},"body":{"type":"string","description":"The note, as plain text."},"author":{"description":"The name of whoever last wrote it. Null when Stampede has no name for them.","type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"description":"When it was last changed. Null if it never has been.","type":["string","null"]}},"required":["id","booking_id","body","author","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/bookings/{booking_id}/notes/{note_id}":{"patch":{"operationId":"bookings.notes.update","tags":["Bookings"],"summary":"Change a staff note on a booking","description":"Replaces the note's text. Stampede then shows it under the signed-in person's name, as when staff edit a note, and the change goes on the booking's history. A note cannot be deleted through the API.","security":[{"oauth2":["bookings:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"note_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":2000,"description":"The note, as plain text. Staff see it; the guest never does."}},"required":["body"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"booking_id":{"type":"string"},"body":{"type":"string","description":"The note, as plain text."},"author":{"description":"The name of whoever last wrote it. Null when Stampede has no name for them.","type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"description":"When it was last changed. Null if it never has been.","type":["string","null"]}},"required":["id","booking_id","body","author","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/bookings/{booking_id}/pre-order-menus":{"get":{"operationId":"bookings.pre_orders.menus","tags":["Bookings"],"summary":"Menus a booking can pre-order from","description":"The venue's menus taking pre-orders, for one booking: the ones its booking type is set to offer first, each saying whether its cut-off has passed and whether the party size and day fit. Staff can start a pre-order on any of them, whatever those say. Also the booking's pre-orders so far, so a second is not started on the same menu.","security":[{"oauth2":["bookings:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"menus":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Pass it as `menu_id` to `bookings.pre_orders.create`."},"name":{"type":"string"},"preferred":{"type":"boolean","description":"One of the menus the booking's type is set to offer."},"cutoff_at":{"description":"When the guest's choices close for this booking: its start less the menu's cut-off. Null: no cut-off.","type":["string","null"]},"cutoff_passed":{"type":"boolean","description":"Staff can still start one; the guest is told choices have closed."},"within_party_size":{"type":"boolean","description":"Whether the booking's party size is within the menu's. Staff can start one either way."},"within_service_hours":{"type":"boolean","description":"Whether the menu is served on the booking's day."},"party_size":{"type":"object","properties":{"min":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"max":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["min","max"],"additionalProperties":false,"description":"The party sizes the menu is for. Null: no bound."},"pay_ahead":{"type":"boolean","description":"Whether the guest pays when they choose, rather than at the venue."},"individual_payment":{"type":"boolean","description":"Whether each guest on a group pre-order pays for their own."}},"required":["id","name","preferred","cutoff_at","cutoff_passed","within_party_size","within_service_hours","party_size","pay_ahead","individual_payment"],"additionalProperties":false}},"pre_orders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The order's ID: on `bookings.get` in `orders`, and for Stampede ordering, `orders.get` has its lines."},"menu":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"status":{"type":"string","enum":["draft","locked","placed","cancelled"],"description":"`draft`: the guest can still choose. `locked`: choices are closed, or the guest is paying. `placed`: confirmed. `cancelled`."},"items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many lines the guests have chosen so far."}},"required":["id","menu","status","items"],"additionalProperties":false}}},"required":["menus","pre_orders"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/bookings/{booking_id}/pre-orders":{"post":{"operationId":"bookings.pre_orders.create","tags":["Bookings"],"summary":"Start a pre-order on a booking","description":"Starts a pre-order on a booking from one of its menus (`bookings.pre_orders.menus`), with the booking's guest as its lead, as Stampede's booking page does. Nothing is sent: `bookings.pre_orders.send` emails the guest the link. A booking with a live pre-order on that menu gets that one back rather than a second. A menu past its cut-off, outside the party sizes or archived is allowed, and said in `warnings`. Refused with 409 `MENU_NOT_TAKING_PRE_ORDERS`, or `BOOKING_HAS_NO_EMAIL` (the guest fills it in from an emailed link).","security":[{"oauth2":["bookings:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"menu_id":{"type":"string","minLength":1,"maxLength":64,"description":"From `bookings.pre_orders.menus`."}},"required":["menu_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"The order's ID: on `bookings.get` in `orders`, and for Stampede ordering, `orders.get` has its lines."},"menu":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"status":{"type":"string","enum":["draft","locked","placed","cancelled"],"description":"`draft`: the guest can still choose. `locked`: choices are closed, or the guest is paying. `placed`: confirmed. `cancelled`."},"warnings":{"type":"array","items":{"type":"string","enum":["menu_inactive","cutoff_passed","party_size_out_of_range"]},"description":"What was amiss with the menu, allowed for staff: `cutoff_passed`, `party_size_out_of_range`, `menu_inactive`. Empty when nothing was, or when an existing pre-order came back."}},"required":["id","menu","status","warnings"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/bookings/{booking_id}/pre-orders/{order_id}/send":{"post":{"operationId":"bookings.pre_orders.send","tags":["Bookings"],"summary":"Email a pre-order's link","description":"Emails the pre-order's link, as Stampede's Send does: the lead gets the whole order, and each guest added to it with an email address their own part. Sending again sends again. Where the menu has reminders, they are scheduled up to its cut-off. A pre-order not on this booking is not found.","security":[{"oauth2":["bookings:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"order_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"sent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many people were emailed."}},"required":["sent"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/bookings/{booking_id}/payment-links":{"get":{"operationId":"payment_links.list","tags":["Bookings"],"summary":"List a booking's payment links","description":"Every payment link sent for this booking, newest first, paid or not, with its payment page.","security":[{"oauth2":["bookings:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"booking_id":{"description":"The booking it is for. Null for one sent on an enquiry.","type":["string","null"]},"enquiry_id":{"description":"The enquiry it is for. Null for one sent on a booking.","type":["string","null"]},"type":{"type":"string","enum":["deposit","cancellation_charge","full_payment"],"description":"`deposit`: taken now. `cancellation_charge`: a card saved, charged only if they cancel late or do not come. `full_payment`: the whole bill."},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In the venue's currency, in minor units: 2000 is £20.00."},"status":{"type":"string","enum":["pending","paid","cancelled"]},"due_by":{"description":"When it must be paid by. Null: no deadline.","type":["string","null"]},"cancel_if_unpaid":{"type":"boolean","description":"The booking, or the enquiry, is cancelled if it is not paid by `due_by`."},"url":{"description":"The guest's payment page, to share another way than email. Null for a card charged by staff.","type":["string","null"]},"message":{"description":"Shown to the guest with the link.","type":["string","null"]},"created_at":{"type":["string","null"]}},"required":["id","booking_id","enquiry_id","type","amount","status","due_by","cancel_if_unpaid","url","message","created_at"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"payment_links.create","tags":["Bookings"],"summary":"Send a payment link","description":"Asks the guest to pay for a booking, as Stampede's booking form does: a link to Stampede's payment page, emailed to the guest when `notify_guest` is true, and always returned as `url` to share another way. With `type: auto` the type and amount are what the party owes by its day's rules (a full payment, else a deposit, else a cancellation charge); with any other type, send the `amount`. Each call makes a new link: list them first so the guest is not asked twice.","security":[{"oauth2":["bookings:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["auto","deposit","cancellation_charge","full_payment"],"description":"`auto`: what the party owes by its day's rules, worked out by Stampede."},"amount":{"description":"Required unless `type` is `auto`. In the venue's currency, in minor units: 2000 is £20.00.","type":"integer","minimum":1,"maximum":10000000},"due_by":{"description":"When it must be paid by. None: no deadline.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"cancel_if_unpaid":{"description":"Cancel the booking if it is not paid by `due_by`.","type":"boolean"},"message":{"description":"Shown to the guest with the link.","type":"string","maxLength":1000},"notify_guest":{"type":"boolean","description":"Email the guest about it. Required: ask the person each time."}},"required":["type","notify_guest"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"booking_id":{"description":"The booking it is for. Null for one sent on an enquiry.","type":["string","null"]},"enquiry_id":{"description":"The enquiry it is for. Null for one sent on a booking.","type":["string","null"]},"type":{"type":"string","enum":["deposit","cancellation_charge","full_payment"],"description":"`deposit`: taken now. `cancellation_charge`: a card saved, charged only if they cancel late or do not come. `full_payment`: the whole bill."},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In the venue's currency, in minor units: 2000 is £20.00."},"status":{"type":"string","enum":["pending","paid","cancelled"]},"due_by":{"description":"When it must be paid by. Null: no deadline.","type":["string","null"]},"cancel_if_unpaid":{"type":"boolean","description":"The booking, or the enquiry, is cancelled if it is not paid by `due_by`."},"url":{"description":"The guest's payment page, to share another way than email. Null for a card charged by staff.","type":["string","null"]},"message":{"description":"Shown to the guest with the link.","type":["string","null"]},"created_at":{"type":["string","null"]}},"required":["id","booking_id","enquiry_id","type","amount","status","due_by","cancel_if_unpaid","url","message","created_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/bookings/{booking_id}/payment-links/{payment_link_id}/send":{"post":{"operationId":"payment_links.send","tags":["Bookings"],"summary":"Email a payment link again","description":"Emails the guest the link again, for one not yet paid. The guest needs an email address.","security":[{"oauth2":["bookings:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"payment_link_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"booking_id":{"description":"The booking it is for. Null for one sent on an enquiry.","type":["string","null"]},"enquiry_id":{"description":"The enquiry it is for. Null for one sent on a booking.","type":["string","null"]},"type":{"type":"string","enum":["deposit","cancellation_charge","full_payment"],"description":"`deposit`: taken now. `cancellation_charge`: a card saved, charged only if they cancel late or do not come. `full_payment`: the whole bill."},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In the venue's currency, in minor units: 2000 is £20.00."},"status":{"type":"string","enum":["pending","paid","cancelled"]},"due_by":{"description":"When it must be paid by. Null: no deadline.","type":["string","null"]},"cancel_if_unpaid":{"type":"boolean","description":"The booking, or the enquiry, is cancelled if it is not paid by `due_by`."},"url":{"description":"The guest's payment page, to share another way than email. Null for a card charged by staff.","type":["string","null"]},"message":{"description":"Shown to the guest with the link.","type":["string","null"]},"created_at":{"type":["string","null"]}},"required":["id","booking_id","enquiry_id","type","amount","status","due_by","cancel_if_unpaid","url","message","created_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/bookings/{booking_id}/payment-links/{payment_link_id}":{"delete":{"operationId":"payment_links.delete","tags":["Bookings"],"summary":"Withdraw a payment link","description":"The guest can no longer pay through it, and its reminders and deadline stop. A paid link stays: refund it in Stampede.","security":[{"oauth2":["bookings:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"payment_link_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/ticketed-events":{"get":{"operationId":"ticketed_events.list","tags":["Ticketed events"],"summary":"List a venue's ticketed events","description":"Events that sell tickets instead of tables, such as a gig or a festival, newest first. Events guests book a table for are in `events.list`.","security":[{"oauth2":["bookings:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"search","in":"query","required":false,"description":"Part of the name.","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"cursor","in":"query","required":false,"description":"The `cursor` from the previous page.","schema":{"type":"string","pattern":"^\\d{1,4}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"active":{"type":"boolean","description":"Inactive events sell nothing."},"offered_online":{"type":"boolean","description":"Guests can buy tickets themselves. False: sold by staff only."},"dates":{"type":"array","items":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date on the venue's own clock, YYYY-MM-DD."},"description":"The days it is on, earliest first. Tickets are for one of these days, unless `pool` is `whole_event`."},"pool":{"type":"string","enum":["per_date","whole_event"],"description":"`per_date`: each tier's `capacity` is places on each date (each slot, with timed entry). `whole_event`: one pool of places for the whole event, whatever the date."},"timed_entry":{"type":"boolean","description":"Tickets are for a time slot, every `slot_interval_minutes` from `doors_open` to `doors_close` (the last one included)."},"slot_interval_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How far apart the entry slots are, with timed entry."},"doors_open":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},{"type":"null"}]},"doors_close":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},{"type":"null"}],"description":"At or before `doors_open`: the doors close after midnight."},"card_required_when_free":{"type":"boolean","description":"A guest buying only free tickets online still gives a card, which is not charged."},"terms":{"description":"Terms a guest must accept to buy online, as HTML. Null: none.","type":["string","null"]},"max_per_order":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The most tickets in one order, across tiers. Null: no limit."},"max_per_person":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The most tickets one person (by email or phone) can buy for the event. Null: no limit."},"supervision_ratio":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Tickets of tiers that need supervision allowed per adult ticket. Null: no rule."},"barcode":{"type":"string","enum":["stampede","square"],"description":"What a pass's QR code carries: `stampede` for Stampede's own scanner (`tickets.check_in`), or `square` for the guest's Stampede ID read by a Square handheld."},"upgrade_ids":{"type":"array","items":{"type":"string"},"description":"The upgrades it offers (`booking_upgrades.list`)."},"created_at":{"type":["string","null"]}},"required":["id","name","description","active","offered_online","dates","pool","timed_entry","slot_interval_minutes","doors_open","doors_close","card_required_when_free","terms","max_per_order","max_per_person","supervision_ratio","barcode","upgrade_ids","created_at"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"ticketed_events.create","tags":["Ticketed events"],"summary":"Add a ticketed event","description":"Adds an event that sells tickets on the dates given. It sells nothing until it has a tier (`ticket_tiers.create`). With timed entry, tickets are for slots every `slot_interval_minutes` between `doors_open` and `doors_close`, so both are needed. Guests can buy online straight away unless `active` or `offered_online` is false.","security":[{"oauth2":["booking_setup:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":250},"description":{"anyOf":[{"type":"string","maxLength":1020},{"type":"null"}]},"active":{"default":true,"type":"boolean"},"offered_online":{"default":true,"type":"boolean"},"pool":{"default":"per_date","type":"string","enum":["per_date","whole_event"]},"timed_entry":{"default":false,"type":"boolean"},"slot_interval_minutes":{"default":15,"type":"integer","minimum":5,"maximum":240,"multipleOf":5},"doors_open":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},{"type":"null"}]},"doors_close":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},{"type":"null"}]},"card_required_when_free":{"default":false,"type":"boolean"},"terms":{"description":"HTML or plain text. Null or empty: none.","anyOf":[{"type":"string","maxLength":60000},{"type":"null"}]},"max_per_order":{"description":"The most tickets in one order, across tiers. Null: no limit.","anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]},"max_per_person":{"description":"The most tickets one person can buy for the event. Null: no limit.","anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]},"supervision_ratio":{"description":"Supervised tickets allowed per adult ticket. Null: no limit.","anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]},"barcode":{"default":"stampede","type":"string","enum":["stampede","square"]},"upgrade_ids":{"description":"The upgrades it offers, from `booking_upgrades.list`. Replaces the whole list. Empty: none.","maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"dates":{"minItems":1,"maxItems":366,"type":"array","items":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date on the venue's own clock, YYYY-MM-DD."},"description":"Every day it is on, YYYY-MM-DD. Replaces the whole list."}},"required":["name","dates"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"active":{"type":"boolean","description":"Inactive events sell nothing."},"offered_online":{"type":"boolean","description":"Guests can buy tickets themselves. False: sold by staff only."},"dates":{"type":"array","items":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date on the venue's own clock, YYYY-MM-DD."},"description":"The days it is on, earliest first. Tickets are for one of these days, unless `pool` is `whole_event`."},"pool":{"type":"string","enum":["per_date","whole_event"],"description":"`per_date`: each tier's `capacity` is places on each date (each slot, with timed entry). `whole_event`: one pool of places for the whole event, whatever the date."},"timed_entry":{"type":"boolean","description":"Tickets are for a time slot, every `slot_interval_minutes` from `doors_open` to `doors_close` (the last one included)."},"slot_interval_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How far apart the entry slots are, with timed entry."},"doors_open":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},{"type":"null"}]},"doors_close":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},{"type":"null"}],"description":"At or before `doors_open`: the doors close after midnight."},"card_required_when_free":{"type":"boolean","description":"A guest buying only free tickets online still gives a card, which is not charged."},"terms":{"description":"Terms a guest must accept to buy online, as HTML. Null: none.","type":["string","null"]},"max_per_order":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The most tickets in one order, across tiers. Null: no limit."},"max_per_person":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The most tickets one person (by email or phone) can buy for the event. Null: no limit."},"supervision_ratio":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Tickets of tiers that need supervision allowed per adult ticket. Null: no rule."},"barcode":{"type":"string","enum":["stampede","square"],"description":"What a pass's QR code carries: `stampede` for Stampede's own scanner (`tickets.check_in`), or `square` for the guest's Stampede ID read by a Square handheld."},"upgrade_ids":{"type":"array","items":{"type":"string"},"description":"The upgrades it offers (`booking_upgrades.list`)."},"created_at":{"type":["string","null"]}},"required":["id","name","description","active","offered_online","dates","pool","timed_entry","slot_interval_minutes","doors_open","doors_close","card_required_when_free","terms","max_per_order","max_per_person","supervision_ratio","barcode","upgrade_ids","created_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/ticketed-events/{event_id}":{"get":{"operationId":"ticketed_events.get","tags":["Ticketed events"],"summary":"Get a ticketed event","description":"Its dates and how its tickets are sold. Its tiers and prices are in `ticket_tiers.list`.","security":[{"oauth2":["bookings:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"event_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"active":{"type":"boolean","description":"Inactive events sell nothing."},"offered_online":{"type":"boolean","description":"Guests can buy tickets themselves. False: sold by staff only."},"dates":{"type":"array","items":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date on the venue's own clock, YYYY-MM-DD."},"description":"The days it is on, earliest first. Tickets are for one of these days, unless `pool` is `whole_event`."},"pool":{"type":"string","enum":["per_date","whole_event"],"description":"`per_date`: each tier's `capacity` is places on each date (each slot, with timed entry). `whole_event`: one pool of places for the whole event, whatever the date."},"timed_entry":{"type":"boolean","description":"Tickets are for a time slot, every `slot_interval_minutes` from `doors_open` to `doors_close` (the last one included)."},"slot_interval_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How far apart the entry slots are, with timed entry."},"doors_open":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},{"type":"null"}]},"doors_close":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},{"type":"null"}],"description":"At or before `doors_open`: the doors close after midnight."},"card_required_when_free":{"type":"boolean","description":"A guest buying only free tickets online still gives a card, which is not charged."},"terms":{"description":"Terms a guest must accept to buy online, as HTML. Null: none.","type":["string","null"]},"max_per_order":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The most tickets in one order, across tiers. Null: no limit."},"max_per_person":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The most tickets one person (by email or phone) can buy for the event. Null: no limit."},"supervision_ratio":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Tickets of tiers that need supervision allowed per adult ticket. Null: no rule."},"barcode":{"type":"string","enum":["stampede","square"],"description":"What a pass's QR code carries: `stampede` for Stampede's own scanner (`tickets.check_in`), or `square` for the guest's Stampede ID read by a Square handheld."},"upgrade_ids":{"type":"array","items":{"type":"string"},"description":"The upgrades it offers (`booking_upgrades.list`)."},"created_at":{"type":["string","null"]}},"required":["id","name","description","active","offered_online","dates","pool","timed_entry","slot_interval_minutes","doors_open","doors_close","card_required_when_free","terms","max_per_order","max_per_person","supervision_ratio","barcode","upgrade_ids","created_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"ticketed_events.update","tags":["Ticketed events"],"summary":"Change a ticketed event","description":"Changes the fields sent and nothing else. `dates` replaces the whole list: a new date gets places in every tier straight away, and a date with tickets sold is kept (it comes back in `dates_not_removed`) until they are cancelled. `pool`, `timed_entry`, the doors and the slot interval decide the pools of places, so they cannot change once tickets are sold (a 409). Orders already made keep what they bought.","security":[{"oauth2":["booking_setup:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"event_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":250},"description":{"anyOf":[{"type":"string","maxLength":1020},{"type":"null"}]},"active":{"type":"boolean"},"offered_online":{"type":"boolean"},"pool":{"type":"string","enum":["per_date","whole_event"]},"timed_entry":{"type":"boolean"},"slot_interval_minutes":{"type":"integer","minimum":5,"maximum":240,"multipleOf":5},"doors_open":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},{"type":"null"}]},"doors_close":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},{"type":"null"}]},"card_required_when_free":{"type":"boolean"},"terms":{"description":"HTML or plain text. Null or empty: none.","anyOf":[{"type":"string","maxLength":60000},{"type":"null"}]},"max_per_order":{"description":"The most tickets in one order, across tiers. Null: no limit.","anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]},"max_per_person":{"description":"The most tickets one person can buy for the event. Null: no limit.","anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]},"supervision_ratio":{"description":"Supervised tickets allowed per adult ticket. Null: no limit.","anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]},"barcode":{"type":"string","enum":["stampede","square"]},"upgrade_ids":{"description":"The upgrades it offers, from `booking_upgrades.list`. Replaces the whole list. Empty: none.","maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"dates":{"minItems":1,"maxItems":366,"type":"array","items":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date on the venue's own clock, YYYY-MM-DD."},"description":"Every day it is on, YYYY-MM-DD. Replaces the whole list."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"active":{"type":"boolean","description":"Inactive events sell nothing."},"offered_online":{"type":"boolean","description":"Guests can buy tickets themselves. False: sold by staff only."},"dates":{"type":"array","items":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date on the venue's own clock, YYYY-MM-DD."},"description":"The days it is on, earliest first. Tickets are for one of these days, unless `pool` is `whole_event`."},"pool":{"type":"string","enum":["per_date","whole_event"],"description":"`per_date`: each tier's `capacity` is places on each date (each slot, with timed entry). `whole_event`: one pool of places for the whole event, whatever the date."},"timed_entry":{"type":"boolean","description":"Tickets are for a time slot, every `slot_interval_minutes` from `doors_open` to `doors_close` (the last one included)."},"slot_interval_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How far apart the entry slots are, with timed entry."},"doors_open":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},{"type":"null"}]},"doors_close":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},{"type":"null"}],"description":"At or before `doors_open`: the doors close after midnight."},"card_required_when_free":{"type":"boolean","description":"A guest buying only free tickets online still gives a card, which is not charged."},"terms":{"description":"Terms a guest must accept to buy online, as HTML. Null: none.","type":["string","null"]},"max_per_order":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The most tickets in one order, across tiers. Null: no limit."},"max_per_person":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The most tickets one person (by email or phone) can buy for the event. Null: no limit."},"supervision_ratio":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Tickets of tiers that need supervision allowed per adult ticket. Null: no rule."},"barcode":{"type":"string","enum":["stampede","square"],"description":"What a pass's QR code carries: `stampede` for Stampede's own scanner (`tickets.check_in`), or `square` for the guest's Stampede ID read by a Square handheld."},"upgrade_ids":{"type":"array","items":{"type":"string"},"description":"The upgrades it offers (`booking_upgrades.list`)."},"created_at":{"type":["string","null"]},"dates_not_removed":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date on the venue's own clock, YYYY-MM-DD."},"live_tickets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["date","live_tickets"],"additionalProperties":false},"description":"Dates asked to be removed that were kept, because tickets are sold for them. Cancel those first."}},"required":["id","name","description","active","offered_online","dates","pool","timed_entry","slot_interval_minutes","doors_open","doors_close","card_required_when_free","terms","max_per_order","max_per_person","supervision_ratio","barcode","upgrade_ids","created_at","dates_not_removed"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"ticketed_events.delete","tags":["Ticketed events"],"summary":"Delete a ticketed event","description":"Removes the event so no more tickets are sold. Refused (409) while it has orders that are not cancelled for today or a later date: cancel them first (`ticket_orders.cancel`). To stop selling for now, set `active` to false instead.","security":[{"oauth2":["booking_setup:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"event_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/ticketed-events/{event_id}/tiers":{"get":{"operationId":"ticket_tiers.list","tags":["Ticketed events"],"summary":"List a ticketed event's tiers","description":"The kinds of ticket it sells (adult, child, early bird and so on), with their prices, places and how many are sold. Places left per date are in `ticket_availability.get`.","security":[{"oauth2":["bookings:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"event_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"event_id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Order on the page, lowest first."},"active":{"type":"boolean","description":"Inactive tiers are not sold."},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"capacity":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Places on each date (each slot, with timed entry), or for the whole event when the event's `pool` is `whole_event`. Null: it has no pools yet."},"pools":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many pools of places it has. 0: it sells nothing yet; give the event its dates, and its doors with timed entry."},"sold":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tickets sold, across every pool."},"held":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tickets in a guest checkout now, across every pool."},"min_per_order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The fewest of this tier in an order that has any. 0: no minimum."},"max_per_order":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The most of this tier in one order. Null: no limit."},"counts_toward_capacity":{"type":"boolean","description":"False for a tier, such as infants, whose tickets do not use up a place."},"adult":{"type":"boolean","description":"Counts as an adult for `supervision_ratio`."},"needs_supervision":{"type":"boolean","description":"Cannot be bought without adult tickets, by the event's `supervision_ratio`."},"own_pass":{"type":"boolean","description":"Each ticket can go to its own holder. False: it rides on an adult's pass."}},"required":["id","event_id","name","description","position","active","price","capacity","pools","sold","held","min_per_order","max_per_order","counts_toward_capacity","adult","needs_supervision","own_pass"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"ticket_tiers.create","tags":["Ticketed events"],"summary":"Add a ticket tier","description":"Adds a kind of ticket at a price, with `capacity` places on each date (each slot, with timed entry, or the whole event with one pool). It goes on sale straight away unless `active` is false. `pools` 0 on the answer means it sells nothing yet: give the event its dates, and its doors with timed entry.","security":[{"oauth2":["booking_setup:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"event_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"description":"Per ticket, in GBP minor units. 0 for a free tier."},"capacity":{"type":"integer","minimum":0,"maximum":100000,"description":"Places on each date (each slot, with timed entry), or for the whole event when its `pool` is `whole_event`. Not shared between dates."},"position":{"type":"integer","minimum":0,"maximum":999},"active":{"type":"boolean"},"min_per_order":{"type":"integer","minimum":0,"maximum":1000},"max_per_order":{"description":"Null: no limit.","anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]},"counts_toward_capacity":{"type":"boolean"},"adult":{"type":"boolean"},"needs_supervision":{"type":"boolean"},"own_pass":{"type":"boolean"}},"required":["name","price","capacity"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"event_id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Order on the page, lowest first."},"active":{"type":"boolean","description":"Inactive tiers are not sold."},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"capacity":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Places on each date (each slot, with timed entry), or for the whole event when the event's `pool` is `whole_event`. Null: it has no pools yet."},"pools":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many pools of places it has. 0: it sells nothing yet; give the event its dates, and its doors with timed entry."},"sold":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tickets sold, across every pool."},"held":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tickets in a guest checkout now, across every pool."},"min_per_order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The fewest of this tier in an order that has any. 0: no minimum."},"max_per_order":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The most of this tier in one order. Null: no limit."},"counts_toward_capacity":{"type":"boolean","description":"False for a tier, such as infants, whose tickets do not use up a place."},"adult":{"type":"boolean","description":"Counts as an adult for `supervision_ratio`."},"needs_supervision":{"type":"boolean","description":"Cannot be bought without adult tickets, by the event's `supervision_ratio`."},"own_pass":{"type":"boolean","description":"Each ticket can go to its own holder. False: it rides on an adult's pass."}},"required":["id","event_id","name","description","position","active","price","capacity","pools","sold","held","min_per_order","max_per_order","counts_toward_capacity","adult","needs_supervision","own_pass"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/ticketed-events/{event_id}/tiers/{tier_id}":{"patch":{"operationId":"ticket_tiers.update","tags":["Ticketed events"],"summary":"Change a ticket tier","description":"Changes the fields sent and nothing else. A new price applies to tickets sold from then on: tickets already sold keep what they paid. `capacity` applies to every pool and cannot go below what one has already sold or has in a checkout (409 `CAPACITY_BELOW_SOLD`).","security":[{"oauth2":["booking_setup:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"event_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"tier_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"description":"Per ticket, in GBP minor units. 0 for a free tier."},"capacity":{"type":"integer","minimum":0,"maximum":100000,"description":"Places on each date (each slot, with timed entry), or for the whole event when its `pool` is `whole_event`. Not shared between dates."},"position":{"type":"integer","minimum":0,"maximum":999},"active":{"type":"boolean"},"min_per_order":{"type":"integer","minimum":0,"maximum":1000},"max_per_order":{"description":"Null: no limit.","anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]},"counts_toward_capacity":{"type":"boolean"},"adult":{"type":"boolean"},"needs_supervision":{"type":"boolean"},"own_pass":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"event_id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Order on the page, lowest first."},"active":{"type":"boolean","description":"Inactive tiers are not sold."},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"capacity":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Places on each date (each slot, with timed entry), or for the whole event when the event's `pool` is `whole_event`. Null: it has no pools yet."},"pools":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many pools of places it has. 0: it sells nothing yet; give the event its dates, and its doors with timed entry."},"sold":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tickets sold, across every pool."},"held":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tickets in a guest checkout now, across every pool."},"min_per_order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The fewest of this tier in an order that has any. 0: no minimum."},"max_per_order":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The most of this tier in one order. Null: no limit."},"counts_toward_capacity":{"type":"boolean","description":"False for a tier, such as infants, whose tickets do not use up a place."},"adult":{"type":"boolean","description":"Counts as an adult for `supervision_ratio`."},"needs_supervision":{"type":"boolean","description":"Cannot be bought without adult tickets, by the event's `supervision_ratio`."},"own_pass":{"type":"boolean","description":"Each ticket can go to its own holder. False: it rides on an adult's pass."}},"required":["id","event_id","name","description","position","active","price","capacity","pools","sold","held","min_per_order","max_per_order","counts_toward_capacity","adult","needs_supervision","own_pass"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"ticket_tiers.delete","tags":["Ticketed events"],"summary":"Delete a ticket tier","description":"Stops the tier selling and takes it off the event. Tickets already sold on it stay valid and on the door list. To stop selling it for now, set `active` to false instead.","security":[{"oauth2":["booking_setup:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"event_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"tier_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true},"tickets_sold":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","deleted","tickets_sold"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/ticketed-events/{event_id}/availability":{"get":{"operationId":"ticket_availability.get","tags":["Tickets"],"summary":"See how many tickets are left","description":"Places left per date (and entry slot, with timed entry) for each tier on sale, from today on the venue's clock unless `date` or `from` says otherwise. Places in a guest checkout count as taken until it ends. A number is right when asked, not held.","security":[{"oauth2":["tickets:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"event_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"date","in":"query","required":false,"description":"Only this day.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"from","in":"query","required":false,"description":"The first day. Defaults to today.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"description":"The last day.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"event_id":{"type":"string"},"pool":{"type":"string","enum":["per_date","whole_event"]},"timed_entry":{"type":"boolean"},"dates":{"type":"array","items":{"type":"object","properties":{"date":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date on the venue's own clock, YYYY-MM-DD."},{"type":"null"}],"description":"Null for a `whole_event` pool, which covers every date."},"slots":{"type":"array","items":{"type":"object","properties":{"time":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"A time on the venue's own clock, HH:MM."},{"type":"null"}],"description":"The entry slot, with timed entry. Null otherwise."},"tiers":{"type":"array","items":{"type":"object","properties":{"tier_id":{"type":"string"},"name":{"type":"string"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"capacity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sold":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"held":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In a guest checkout now: not free, but may come back."},"remaining":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Places left to sell now."},"sold_out":{"type":"boolean"}},"required":["tier_id","name","price","capacity","sold","held","remaining","sold_out"],"additionalProperties":false}}},"required":["time","tiers"],"additionalProperties":false},"description":"Empty: nothing is on sale for that date yet."}},"required":["date","slots"],"additionalProperties":false},"description":"Earliest first."}},"required":["event_id","pool","timed_entry","dates"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/ticket-orders":{"get":{"operationId":"ticket_orders.list","tags":["Tickets"],"summary":"List a venue's ticket orders","description":"Ticket orders, newest first, paged. Each carries the purchaser's contact details, so this needs `guests:read` as well. `search` matches the reference, email, or first or last name.","security":[{"oauth2":["tickets:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"event_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"date","in":"query","required":false,"description":"Orders for this day. Needs `event_id`.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pending","confirmed","cancelled"]}},{"name":"search","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `cursor` from the previous page.","schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"reference":{"type":"string","description":"The reference the purchaser was given, also on the door list."},"venue_id":{"type":"string"},"event":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"date":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date on the venue's own clock, YYYY-MM-DD."},{"type":"null"}],"description":"The day the tickets are for. Null for a `whole_event` pool."},"status":{"type":"string","enum":["pending","confirmed","cancelled"],"description":"`pending` while a guest's payment is in flight; `confirmed` once paid or free; `cancelled` by the venue."},"purchaser":{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["first_name","last_name","email","phone"],"additionalProperties":false},"total":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"What the order cost."},"paid":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Taken by card through Stampede. 0 for a free order, or one paid elsewhere or given away."},"refunded":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"refund_pending":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Refunds on their way back to the card."},"live_tickets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tickets not cancelled."},"note":{"description":"For staff, never shown to the purchaser. Null on an order a guest made.","type":["string","null"]},"created_by":{"description":"The Stampede user who made the order as staff, by their user ID. Null on an order a guest made.","type":["string","null"]},"created_at":{"type":"string"}},"required":["id","reference","venue_id","event","date","status","purchaser","total","paid","refunded","refund_pending","live_tickets","note","created_by","created_at"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"ticket_orders.create","tags":["Tickets"],"summary":"Sell tickets as staff","description":"Makes a confirmed order as staff do, under the event's rules and places. Refused with 409 `SOLD_OUT` (the `field` names the line whose tier has no places left), `TICKET_RULE_BROKEN` (a tier's or the order's most or fewest tickets, or too few adult tickets for those that need supervision), `PER_PERSON_LIMIT` (the purchaser would have more than one person may), `NOT_ON_SALE_THAT_DATE` (a tier has no places on that date or slot) or `ORDER_IN_PROGRESS` (the same `idempotency_key` is still being made: send it again in a moment), and 400 `SLOT_REQUIRED` with timed entry and no `slot_time`. No card is taken: `complimentary` gives the tickets away, and `paid_elsewhere` records the tier prices as the total with nothing paid through Stampede, so nothing can be refunded here. Passes are emailed to the purchaser only when `notify_purchaser` is true. Send an `idempotency_key` so a call that fails or times out can be sent again safely. Needs `guests:read` as well, as the answer carries the purchaser.","security":[{"oauth2":["tickets:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"event_id":{"type":"string","minLength":1,"maxLength":64},"date":{"description":"The day. Required unless the event's `pool` is `whole_event`.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"slot_time":{"description":"The entry slot, with timed entry: one in `ticket_availability.get`.","type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"lines":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"tier_id":{"type":"string","minLength":1,"maxLength":64},"quantity":{"type":"integer","minimum":1,"maximum":100}},"required":["tier_id","quantity"]}},"purchaser":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"maxLength":50},"last_name":{"type":"string","maxLength":50},"email":{"type":"string","maxLength":255,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","minLength":5,"maxLength":20}},"required":["first_name","email"]},"payment":{"type":"string","enum":["complimentary","paid_elsewhere"],"description":"`complimentary`: free. `paid_elsewhere`: paid outside Stampede, such as at the till."},"note":{"description":"For staff, never shown to the purchaser.","type":"string","maxLength":2000},"notify_purchaser":{"type":"boolean","description":"Email the purchaser. Required: ask the person each time."},"idempotency_key":{"description":"Any unique string, such as a UUID. Send the same key again and you get the order the first call made, never a second one, so use a new key for each order.","type":"string","minLength":8,"maxLength":96,"pattern":"^[A-Za-z0-9_-]+$"}},"required":["event_id","lines","purchaser","payment","notify_purchaser"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"reference":{"type":"string","description":"The reference the purchaser was given, also on the door list."},"venue_id":{"type":"string"},"event":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"date":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date on the venue's own clock, YYYY-MM-DD."},{"type":"null"}],"description":"The day the tickets are for. Null for a `whole_event` pool."},"status":{"type":"string","enum":["pending","confirmed","cancelled"],"description":"`pending` while a guest's payment is in flight; `confirmed` once paid or free; `cancelled` by the venue."},"purchaser":{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["first_name","last_name","email","phone"],"additionalProperties":false},"total":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"What the order cost."},"paid":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Taken by card through Stampede. 0 for a free order, or one paid elsewhere or given away."},"refunded":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"refund_pending":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Refunds on their way back to the card."},"live_tickets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tickets not cancelled."},"note":{"description":"For staff, never shown to the purchaser. Null on an order a guest made.","type":["string","null"]},"created_by":{"description":"The Stampede user who made the order as staff, by their user ID. Null on an order a guest made.","type":["string","null"]},"created_at":{"type":"string"},"holders":{"type":"array","items":{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"id":{"type":"string","description":"Pass `ticket_orders.resend` this to email the holder their passes again."},"purchaser":{"type":"boolean","description":"The purchaser's own pass."},"emailed_at":{"description":"When their passes were last emailed.","type":["string","null"]},"tickets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string","description":"The ticket's own code, for support. Not what a pass's QR carries."},"tier":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"status":{"type":"string","enum":["valid","checked_in","cancelled","refunded"]},"price_paid":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"checked_in_at":{"type":["string","null"]}},"required":["id","code","tier","status","price_paid","checked_in_at"],"additionalProperties":false}}},"required":["first_name","last_name","email","phone","id","purchaser","emailed_at","tickets"],"additionalProperties":false},"description":"Who holds the tickets: each holder has one pass for all of theirs."},"cancelled_at":{"type":["string","null"]},"cancel_note":{"type":["string","null"]}},"required":["id","reference","venue_id","event","date","status","purchaser","total","paid","refunded","refund_pending","live_tickets","note","created_by","created_at","holders","cancelled_at","cancel_note"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/ticket-orders/{order_id}":{"get":{"operationId":"ticket_orders.get","tags":["Tickets"],"summary":"Get a ticket order","description":"The order with who holds each ticket, and which are checked in or cancelled. Needs `guests:read` as well, for the purchaser and holders.","security":[{"oauth2":["tickets:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"order_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"reference":{"type":"string","description":"The reference the purchaser was given, also on the door list."},"venue_id":{"type":"string"},"event":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"date":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date on the venue's own clock, YYYY-MM-DD."},{"type":"null"}],"description":"The day the tickets are for. Null for a `whole_event` pool."},"status":{"type":"string","enum":["pending","confirmed","cancelled"],"description":"`pending` while a guest's payment is in flight; `confirmed` once paid or free; `cancelled` by the venue."},"purchaser":{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["first_name","last_name","email","phone"],"additionalProperties":false},"total":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"What the order cost."},"paid":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Taken by card through Stampede. 0 for a free order, or one paid elsewhere or given away."},"refunded":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"refund_pending":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Refunds on their way back to the card."},"live_tickets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tickets not cancelled."},"note":{"description":"For staff, never shown to the purchaser. Null on an order a guest made.","type":["string","null"]},"created_by":{"description":"The Stampede user who made the order as staff, by their user ID. Null on an order a guest made.","type":["string","null"]},"created_at":{"type":"string"},"holders":{"type":"array","items":{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"id":{"type":"string","description":"Pass `ticket_orders.resend` this to email the holder their passes again."},"purchaser":{"type":"boolean","description":"The purchaser's own pass."},"emailed_at":{"description":"When their passes were last emailed.","type":["string","null"]},"tickets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string","description":"The ticket's own code, for support. Not what a pass's QR carries."},"tier":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"status":{"type":"string","enum":["valid","checked_in","cancelled","refunded"]},"price_paid":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"checked_in_at":{"type":["string","null"]}},"required":["id","code","tier","status","price_paid","checked_in_at"],"additionalProperties":false}}},"required":["first_name","last_name","email","phone","id","purchaser","emailed_at","tickets"],"additionalProperties":false},"description":"Who holds the tickets: each holder has one pass for all of theirs."},"cancelled_at":{"type":["string","null"]},"cancel_note":{"type":["string","null"]}},"required":["id","reference","venue_id","event","date","status","purchaser","total","paid","refunded","refund_pending","live_tickets","note","created_by","created_at","holders","cancelled_at","cancel_note"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/ticket-orders/{order_id}/cancel":{"post":{"operationId":"ticket_orders.cancel","tags":["Tickets"],"summary":"Cancel tickets, and refund them","description":"Cancels the whole order, or the tickets in `ticket_ids`, and puts the places back on sale. Send `dry_run: true` first: nothing changes, and `cancellation.refundable` says the most that can go back to the card. Then send it again without `dry_run`, with the `refund_amount` the person chooses (none unless sent; never more than `refundable`). Only money taken by card through Stampede can be refunded here. Food pre-ordered for the tickets is not: refund it in Stampede. The purchaser is emailed only when `notify_guest` is true. Send a `client_request_id` so a retry never refunds twice. Refused with 409 `ALREADY_CANCELLED` when the order or those tickets are, and 400 `REFUND_TOO_LARGE` above `refundable`. 502 `REFUND_FAILED` means the tickets were cancelled but the money was not returned: refund it in Stampede, never cancel again.","security":[{"oauth2":["tickets:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"order_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"dry_run":{"default":false,"description":"Only say what cancelling would cancel and could refund.","type":"boolean"},"ticket_ids":{"description":"Cancel only these tickets (from `ticket_orders.get`). None: every ticket left on the order.","minItems":1,"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"refund_amount":{"description":"Back to the card, in GBP minor units. None: no refund.","type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"]},"refund_reason":{"type":"string","enum":["venue_cancelled","guest_cancelled","charged_in_error","goodwill"]},"note":{"description":"Why, kept on the order and the refund.","type":"string","maxLength":2000},"notify_guest":{"description":"Email the purchaser about it. Required unless `dry_run`: ask the person each time.","type":"boolean"},"client_request_id":{"description":"Any unique string, such as a UUID, sent again on a retry so the refund is only made once.","type":"string","minLength":8,"maxLength":96,"pattern":"^[A-Za-z0-9_-]+$"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"dry_run":{"type":"boolean"},"cancellation":{"type":"object","properties":{"whole_order":{"type":"boolean","description":"Every ticket left on the order would be cancelled, which cancels the order."},"lines":{"type":"array","items":{"type":"object","properties":{"tier_name":{"type":"string"},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"amount":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."}},"required":["tier_name","quantity","amount"],"additionalProperties":false}},"refundable":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"The most that can be refunded for these tickets: what was paid for them by card, with any extras on them."},"pre_order_not_refundable":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Food pre-ordered for these tickets. Not refunded here: refund it in Stampede."},"order_paid":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"order_already_refunded":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."}},"required":["whole_order","lines","refundable","pre_order_not_refundable","order_paid","order_already_refunded"],"additionalProperties":false},"refund":{"anyOf":[{"type":"object","properties":{"amount":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"id":{"type":["string","null"]}},"required":["amount","id"],"additionalProperties":false},{"type":"null"}],"description":"What went back to the card. Null when nothing did, or on a dry run."},"order":{"type":"object","properties":{"id":{"type":"string"},"reference":{"type":"string","description":"The reference the purchaser was given, also on the door list."},"venue_id":{"type":"string"},"event":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"date":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date on the venue's own clock, YYYY-MM-DD."},{"type":"null"}],"description":"The day the tickets are for. Null for a `whole_event` pool."},"status":{"type":"string","enum":["pending","confirmed","cancelled"],"description":"`pending` while a guest's payment is in flight; `confirmed` once paid or free; `cancelled` by the venue."},"purchaser":{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["first_name","last_name","email","phone"],"additionalProperties":false},"total":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"What the order cost."},"paid":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Taken by card through Stampede. 0 for a free order, or one paid elsewhere or given away."},"refunded":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"refund_pending":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Refunds on their way back to the card."},"live_tickets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tickets not cancelled."},"note":{"description":"For staff, never shown to the purchaser. Null on an order a guest made.","type":["string","null"]},"created_by":{"description":"The Stampede user who made the order as staff, by their user ID. Null on an order a guest made.","type":["string","null"]},"created_at":{"type":"string"},"holders":{"type":"array","items":{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"id":{"type":"string","description":"Pass `ticket_orders.resend` this to email the holder their passes again."},"purchaser":{"type":"boolean","description":"The purchaser's own pass."},"emailed_at":{"description":"When their passes were last emailed.","type":["string","null"]},"tickets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string","description":"The ticket's own code, for support. Not what a pass's QR carries."},"tier":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"status":{"type":"string","enum":["valid","checked_in","cancelled","refunded"]},"price_paid":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"checked_in_at":{"type":["string","null"]}},"required":["id","code","tier","status","price_paid","checked_in_at"],"additionalProperties":false}}},"required":["first_name","last_name","email","phone","id","purchaser","emailed_at","tickets"],"additionalProperties":false},"description":"Who holds the tickets: each holder has one pass for all of theirs."},"cancelled_at":{"type":["string","null"]},"cancel_note":{"type":["string","null"]}},"required":["id","reference","venue_id","event","date","status","purchaser","total","paid","refunded","refund_pending","live_tickets","note","created_by","created_at","holders","cancelled_at","cancel_note"],"additionalProperties":false}},"required":["dry_run","cancellation","refund","order"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/ticket-orders/{order_id}/holders/{holder_id}/resend":{"post":{"operationId":"ticket_orders.resend","tags":["Tickets"],"summary":"Email a holder's passes again","description":"For \"they never got it\": emails the holder their passes again, to the email on the order.","security":[{"oauth2":["tickets:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"order_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"holder_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"order_id":{"type":"string"},"holder_id":{"type":"string"},"sent":{"type":"boolean","const":true}},"required":["order_id","holder_id","sent"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/tickets/check-in":{"post":{"operationId":"tickets.check_in","tags":["Tickets"],"summary":"Check tickets in at the door","description":"Lets a pass's holder in: `count` of their tickets (one unless sent; a group may arrive in parts). Send the event and the day so a pass for another event or day is turned away. Always answers 200 when the scan was read: `admitted` says whether anyone came in and `reason` why not. A pass scanned twice is never let in twice. The holder's name needs `guests:read` as well.","security":[{"oauth2":["tickets:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":64,"description":"What the scanner read off the pass, or the pass code from the door list."},"count":{"default":1,"description":"How many of their tickets are coming in now.","type":"integer","minimum":1,"maximum":50},"event_id":{"description":"Only let in passes for this event.","type":"string","minLength":1,"maxLength":64},"date":{"description":"Only let in passes for this day.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["code"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"admitted":{"type":"boolean","description":"Someone was let in on this scan."},"admitted_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tickets checked in by this scan."},"already_admitted":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tickets on the pass checked in before."},"remaining":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tickets on the pass still to come in."},"reason":{"anyOf":[{"type":"string","enum":["not_found","cancelled","already_admitted","nothing_left","wrong_event","wrong_date","other"]},{"type":"null"}],"description":"Why nobody was let in. Null when someone was. `wrong_event` and `wrong_date`: a real pass, for another event or day."},"message":{"description":"What to tell the door, in words.","type":["string","null"]},"holder":{"anyOf":[{"type":"object","properties":{"name":{"description":"Null without `guests:read`.","type":["string","null"]},"reference":{"type":"string"},"tickets":{"type":"array","items":{"type":"object","properties":{"tier_name":{"type":"string"},"admitted":{"type":"boolean"}},"required":["tier_name","admitted"],"additionalProperties":false}}},"required":["name","reference","tickets"],"additionalProperties":false},{"type":"null"}]}},"required":["admitted","admitted_count","already_admitted","remaining","reason","message","holder"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/ticketed-events/{event_id}/door-list":{"get":{"operationId":"ticket_door_list.get","tags":["Tickets"],"summary":"Get the door list","description":"Everyone holding a ticket, by surname, with their pass code and which tickets are checked in: for a door with no signal, or to look someone up. Needs `guests:read` as well. Without `date`, every date's holders.","security":[{"oauth2":["tickets:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"event_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"date","in":"query","required":false,"description":"Only this day.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"event_id":{"type":"string"},"date":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date on the venue's own clock, YYYY-MM-DD."},{"type":"null"}],"description":"The day asked for. Null: every date."},"holders":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Or their email, when no name was given."},"email":{"type":["string","null"]},"reference":{"type":"string"},"pass_code":{"type":"string","description":"What their pass's QR carries: type it into `tickets.check_in` when a scan fails."},"tickets":{"type":"array","items":{"type":"object","properties":{"tier_name":{"type":"string"},"code":{"type":"string"},"admitted":{"type":"boolean"}},"required":["tier_name","code","admitted"],"additionalProperties":false}},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"admitted":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["name","email","reference","pass_code","tickets","total","admitted"],"additionalProperties":false},"description":"By surname. Cancelled tickets are left out."},"totals":{"type":"object","properties":{"holders":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tickets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"admitted":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["holders","tickets","admitted"],"additionalProperties":false}},"required":["event_id","date","holders","totals"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/enquiries":{"get":{"operationId":"enquiries.list","tags":["Enquiries"],"summary":"List a venue's enquiries","description":"Newest first, paged. Every stage is included unless `stage_id` or `stage_class` narrows it. When it is narrowed by stage, a page can hold fewer than `limit`: keep following `cursor` until it is null.","security":[{"oauth2":["enquiries:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"stage_id","in":"query","required":false,"description":"One or more stage IDs from `enquiry_stages.list`, comma-separated.","style":"form","explode":false,"schema":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}}},{"name":"stage_class","in":"query","required":false,"description":"One or more of open, held, confirmed, done, lost, comma-separated.","style":"form","explode":false,"schema":{"minItems":1,"type":"array","items":{"type":"string","enum":["open","held","confirmed","done","lost"]}}},{"name":"created_from","in":"query","required":false,"description":"Only enquiries that came in at or after this instant.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"created_to","in":"query","required":false,"description":"Only enquiries that came in at or before this instant.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"starts_from","in":"query","required":false,"description":"Only enquiries for a date at or after this instant.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"starts_to","in":"query","required":false,"description":"Only enquiries for a date at or before this instant.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"needs_reply","in":"query","required":false,"description":"`true`: only those whose guest is waiting for an answer.","schema":{"type":"string","const":"true"}},{"name":"owner_id","in":"query","required":false,"description":"Only those this Stampede user owns; `me` for your own.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"search","in":"query","required":false,"description":"Matches the guest's name, email, phone, the reference or the message.","schema":{"type":"string","minLength":1,"maxLength":120}},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `cursor` from the previous page.","schema":{"type":"string","pattern":"^[1-9]\\d{0,4}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"reference":{"description":"The reference the guest was given.","type":["string","null"]},"venue_id":{"type":"string"},"type":{"type":"string","enum":["general","large_booking","private_event","corporate","special_occasion","booking_type","notify","other"]},"stage":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"The venue's own name for it."},"class":{"type":"string","enum":["open","held","confirmed","done","lost"],"description":"`open`: being worked. `held`: a table is held for it. `confirmed`: booked. `done`: it has happened. `lost`: it will not happen."}},"required":["id","name","class"],"additionalProperties":false},"lost_reason":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":["string","null"]}},"required":["id","label"],"additionalProperties":false},{"type":"null"}],"description":"Why it was lost. Null unless its stage is `lost`."},"guest":{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["first_name","last_name","email","phone"],"additionalProperties":false},"company":{"description":"Who the guest is booking for, if anyone.","type":["string","null"]},"party_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"starts_at":{"type":"string","description":"When they want to come: an ISO 8601 instant."},"flexible_date":{"type":"boolean","description":"The guest said the date can move."},"budget":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"What the guest means to spend, in the venue's currency, in minor units: 150000 is £1,500.00. When the guest gives none, Stampede fills in the venue's average spend per cover times the party size."},"booking_type_id":{"description":"The booking type it is about, if any.","type":["string","null"]},"event_id":{"description":"The event it is about, if any.","type":["string","null"]},"booking_id":{"description":"The booking made for it, once there is one.","type":["string","null"]},"owner_id":{"description":"The Stampede user who owns it. Null: no one yet.","type":["string","null"]},"source":{"description":"Where it came from, as the venue records it: web_form, phone, walk_in, email, referral, google, other.","type":["string","null"]},"created_at":{"type":"string"},"message":{"description":"The guest's message.","type":["string","null"]},"priority":{"anyOf":[{"type":"string","enum":["none","low","medium","high","urgent"]},{"type":"null"}]},"needs_reply":{"type":"boolean","description":"The guest wrote last and is waiting for an answer."},"summary":{"description":"The conversation so far, in a few sentences, as staff or Stampede last wrote it.","type":["string","null"]}},"required":["id","reference","venue_id","type","stage","lost_reason","guest","company","party_size","starts_at","flexible_date","budget","booking_type_id","event_id","booking_id","owner_id","source","created_at","message","priority","needs_reply","summary"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"enquiries.create","tags":["Enquiries"],"summary":"Take an enquiry","description":"`source: online` is a guest's own enquiry, from your own enquiry form: the venue's rules for its online form apply (enquiries switched on, its party sizes, the questions it requires and whether a booking type or event must be named). `source: staff` is one staff take down, as in Stampede, with none of those rules. Either way Stampede emails the guest that their enquiry has arrived, when they have an email address, and tells the venue, as it always does. Each call takes a new enquiry: list them first so one is not taken twice.","security":[{"oauth2":["enquiries:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"string","enum":["online","staff"]},"guest":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"maxLength":50},"last_name":{"type":"string","minLength":1,"maxLength":50},"email":{"type":"string","maxLength":255,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","minLength":3,"maxLength":20}},"required":["first_name","last_name","email","phone"]},"party_size":{"type":"integer","minimum":1,"maximum":10000},"starts_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"When they want to come."},"flexible_date":{"description":"The date can move.","type":"boolean"},"message":{"type":"string","minLength":1,"maxLength":5000,"description":"The guest's message."},"type":{"description":"Staff only. Default: general.","type":"string","enum":["general","large_booking","private_event","corporate","special_occasion","booking_type","notify","other"]},"booking_type_id":{"description":"The booking type it is about.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"event_id":{"description":"The event it is about.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"budget":{"description":"What they mean to spend, in minor units. None: the venue's average spend per cover times the party size.","type":"integer","minimum":1,"maximum":100000000},"answers":{"description":"Answers to the questions in `enquiry_questions.list`.","maxItems":50,"type":"array","items":{"type":"object","properties":{"question_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"From `enquiry_questions.list`."},"value":{"anyOf":[{"type":"string","maxLength":5000},{"maxItems":100,"type":"array","items":{"type":"string","maxLength":255}},{"type":"boolean"},{"type":"null"}],"description":"Text, the options chosen, or yes or no, as the question asks."}},"required":["question_id","value"]}},"internal_note":{"description":"Staff only. A note for staff, never shown to the guest.","type":"string","maxLength":5000}},"required":["source","guest","party_size","starts_at","message"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"reference":{"description":"The reference the guest was given.","type":["string","null"]},"venue_id":{"type":"string"},"type":{"type":"string","enum":["general","large_booking","private_event","corporate","special_occasion","booking_type","notify","other"]},"stage":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"The venue's own name for it."},"class":{"type":"string","enum":["open","held","confirmed","done","lost"],"description":"`open`: being worked. `held`: a table is held for it. `confirmed`: booked. `done`: it has happened. `lost`: it will not happen."}},"required":["id","name","class"],"additionalProperties":false},"lost_reason":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":["string","null"]}},"required":["id","label"],"additionalProperties":false},{"type":"null"}],"description":"Why it was lost. Null unless its stage is `lost`."},"guest":{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["first_name","last_name","email","phone"],"additionalProperties":false},"company":{"description":"Who the guest is booking for, if anyone.","type":["string","null"]},"party_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"starts_at":{"type":"string","description":"When they want to come: an ISO 8601 instant."},"flexible_date":{"type":"boolean","description":"The guest said the date can move."},"budget":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"What the guest means to spend, in the venue's currency, in minor units: 150000 is £1,500.00. When the guest gives none, Stampede fills in the venue's average spend per cover times the party size."},"booking_type_id":{"description":"The booking type it is about, if any.","type":["string","null"]},"event_id":{"description":"The event it is about, if any.","type":["string","null"]},"booking_id":{"description":"The booking made for it, once there is one.","type":["string","null"]},"owner_id":{"description":"The Stampede user who owns it. Null: no one yet.","type":["string","null"]},"source":{"description":"Where it came from, as the venue records it: web_form, phone, walk_in, email, referral, google, other.","type":["string","null"]},"created_at":{"type":"string"},"message":{"description":"The guest's message.","type":["string","null"]},"priority":{"anyOf":[{"type":"string","enum":["none","low","medium","high","urgent"]},{"type":"null"}]},"needs_reply":{"type":"boolean","description":"The guest wrote last and is waiting for an answer."},"summary":{"description":"The conversation so far, in a few sentences, as staff or Stampede last wrote it.","type":["string","null"]}},"required":["id","reference","venue_id","type","stage","lost_reason","guest","company","party_size","starts_at","flexible_date","budget","booking_type_id","event_id","booking_id","owner_id","source","created_at","message","priority","needs_reply","summary"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/enquiries/{enquiry_id}":{"get":{"operationId":"enquiries.get","tags":["Enquiries"],"summary":"Get an enquiry","description":"Stampede records that it was looked at on the enquiry's history, as it does when staff open one.","security":[{"oauth2":["enquiries:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"enquiry_id","in":"path","required":true,"description":"The enquiry ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"reference":{"description":"The reference the guest was given.","type":["string","null"]},"venue_id":{"type":"string"},"type":{"type":"string","enum":["general","large_booking","private_event","corporate","special_occasion","booking_type","notify","other"]},"stage":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"The venue's own name for it."},"class":{"type":"string","enum":["open","held","confirmed","done","lost"],"description":"`open`: being worked. `held`: a table is held for it. `confirmed`: booked. `done`: it has happened. `lost`: it will not happen."}},"required":["id","name","class"],"additionalProperties":false},"lost_reason":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":["string","null"]}},"required":["id","label"],"additionalProperties":false},{"type":"null"}],"description":"Why it was lost. Null unless its stage is `lost`."},"guest":{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["first_name","last_name","email","phone"],"additionalProperties":false},"company":{"description":"Who the guest is booking for, if anyone.","type":["string","null"]},"party_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"starts_at":{"type":"string","description":"When they want to come: an ISO 8601 instant."},"flexible_date":{"type":"boolean","description":"The guest said the date can move."},"budget":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"What the guest means to spend, in the venue's currency, in minor units: 150000 is £1,500.00. When the guest gives none, Stampede fills in the venue's average spend per cover times the party size."},"booking_type_id":{"description":"The booking type it is about, if any.","type":["string","null"]},"event_id":{"description":"The event it is about, if any.","type":["string","null"]},"booking_id":{"description":"The booking made for it, once there is one.","type":["string","null"]},"owner_id":{"description":"The Stampede user who owns it. Null: no one yet.","type":["string","null"]},"source":{"description":"Where it came from, as the venue records it: web_form, phone, walk_in, email, referral, google, other.","type":["string","null"]},"created_at":{"type":"string"},"message":{"description":"The guest's message.","type":["string","null"]},"priority":{"anyOf":[{"type":"string","enum":["none","low","medium","high","urgent"]},{"type":"null"}]},"needs_reply":{"type":"boolean","description":"The guest wrote last and is waiting for an answer."},"summary":{"description":"The conversation so far, in a few sentences, as staff or Stampede last wrote it.","type":["string","null"]}},"required":["id","reference","venue_id","type","stage","lost_reason","guest","company","party_size","starts_at","flexible_date","budget","booking_type_id","event_id","booking_id","owner_id","source","created_at","message","priority","needs_reply","summary"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"enquiries.update","tags":["Enquiries"],"summary":"Change an enquiry","description":"Changes the guest's details, the date, the party, what it is, the summary or the priority. Only the fields sent change. The details, the summary and the priority are each saved in turn, and each goes on the enquiry's history. The guest is not emailed.","security":[{"oauth2":["enquiries:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"enquiry_id","in":"path","required":true,"description":"The enquiry ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"guest":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"maxLength":50},"last_name":{"type":"string","minLength":1,"maxLength":50},"email":{"type":"string","maxLength":255,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","minLength":3,"maxLength":20}}},"party_size":{"type":"integer","minimum":1,"maximum":10000},"starts_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"An ISO 8601 instant."},"flexible_date":{"type":"boolean"},"type":{"type":"string","enum":["general","large_booking","private_event","corporate","special_occasion","booking_type","notify","other"]},"company":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"source":{"description":"Where it came from: web_form, phone, walk_in, email, referral, google, other.","anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"summary":{"description":"The conversation so far. Null clears it.","anyOf":[{"type":"string","maxLength":6000},{"type":"null"}]},"priority":{"type":"string","enum":["none","low","medium","high","urgent"]}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"reference":{"description":"The reference the guest was given.","type":["string","null"]},"venue_id":{"type":"string"},"type":{"type":"string","enum":["general","large_booking","private_event","corporate","special_occasion","booking_type","notify","other"]},"stage":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"The venue's own name for it."},"class":{"type":"string","enum":["open","held","confirmed","done","lost"],"description":"`open`: being worked. `held`: a table is held for it. `confirmed`: booked. `done`: it has happened. `lost`: it will not happen."}},"required":["id","name","class"],"additionalProperties":false},"lost_reason":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":["string","null"]}},"required":["id","label"],"additionalProperties":false},{"type":"null"}],"description":"Why it was lost. Null unless its stage is `lost`."},"guest":{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["first_name","last_name","email","phone"],"additionalProperties":false},"company":{"description":"Who the guest is booking for, if anyone.","type":["string","null"]},"party_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"starts_at":{"type":"string","description":"When they want to come: an ISO 8601 instant."},"flexible_date":{"type":"boolean","description":"The guest said the date can move."},"budget":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"What the guest means to spend, in the venue's currency, in minor units: 150000 is £1,500.00. When the guest gives none, Stampede fills in the venue's average spend per cover times the party size."},"booking_type_id":{"description":"The booking type it is about, if any.","type":["string","null"]},"event_id":{"description":"The event it is about, if any.","type":["string","null"]},"booking_id":{"description":"The booking made for it, once there is one.","type":["string","null"]},"owner_id":{"description":"The Stampede user who owns it. Null: no one yet.","type":["string","null"]},"source":{"description":"Where it came from, as the venue records it: web_form, phone, walk_in, email, referral, google, other.","type":["string","null"]},"created_at":{"type":"string"},"message":{"description":"The guest's message.","type":["string","null"]},"priority":{"anyOf":[{"type":"string","enum":["none","low","medium","high","urgent"]},{"type":"null"}]},"needs_reply":{"type":"boolean","description":"The guest wrote last and is waiting for an answer."},"summary":{"description":"The conversation so far, in a few sentences, as staff or Stampede last wrote it.","type":["string","null"]}},"required":["id","reference","venue_id","type","stage","lost_reason","guest","company","party_size","starts_at","flexible_date","budget","booking_type_id","event_id","booking_id","owner_id","source","created_at","message","priority","needs_reply","summary"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/enquiries/{enquiry_id}/move":{"post":{"operationId":"enquiries.move","tags":["Enquiries"],"summary":"Move an enquiry to another stage","description":"To one of the stages in `enquiry_stages.list`. A held, confirmed or done stage needs a booking for it first (`bookings.create` with `enquiry_id`), and moving there holds, confirms or keeps that booking to match: a held booking that is confirmed this way emails the guest its confirmation, as in Stampede. To lose it use `enquiries.mark_lost`, and to bring back a lost one `enquiries.reopen`. Moving it to the stage it is in changes nothing.","security":[{"oauth2":["enquiries:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"enquiry_id","in":"path","required":true,"description":"The enquiry ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"stage_id":{"type":"string","minLength":1,"maxLength":64}},"required":["stage_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"reference":{"description":"The reference the guest was given.","type":["string","null"]},"venue_id":{"type":"string"},"type":{"type":"string","enum":["general","large_booking","private_event","corporate","special_occasion","booking_type","notify","other"]},"stage":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"The venue's own name for it."},"class":{"type":"string","enum":["open","held","confirmed","done","lost"],"description":"`open`: being worked. `held`: a table is held for it. `confirmed`: booked. `done`: it has happened. `lost`: it will not happen."}},"required":["id","name","class"],"additionalProperties":false},"lost_reason":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":["string","null"]}},"required":["id","label"],"additionalProperties":false},{"type":"null"}],"description":"Why it was lost. Null unless its stage is `lost`."},"guest":{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["first_name","last_name","email","phone"],"additionalProperties":false},"company":{"description":"Who the guest is booking for, if anyone.","type":["string","null"]},"party_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"starts_at":{"type":"string","description":"When they want to come: an ISO 8601 instant."},"flexible_date":{"type":"boolean","description":"The guest said the date can move."},"budget":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"What the guest means to spend, in the venue's currency, in minor units: 150000 is £1,500.00. When the guest gives none, Stampede fills in the venue's average spend per cover times the party size."},"booking_type_id":{"description":"The booking type it is about, if any.","type":["string","null"]},"event_id":{"description":"The event it is about, if any.","type":["string","null"]},"booking_id":{"description":"The booking made for it, once there is one.","type":["string","null"]},"owner_id":{"description":"The Stampede user who owns it. Null: no one yet.","type":["string","null"]},"source":{"description":"Where it came from, as the venue records it: web_form, phone, walk_in, email, referral, google, other.","type":["string","null"]},"created_at":{"type":"string"},"message":{"description":"The guest's message.","type":["string","null"]},"priority":{"anyOf":[{"type":"string","enum":["none","low","medium","high","urgent"]},{"type":"null"}]},"needs_reply":{"type":"boolean","description":"The guest wrote last and is waiting for an answer."},"summary":{"description":"The conversation so far, in a few sentences, as staff or Stampede last wrote it.","type":["string","null"]}},"required":["id","reference","venue_id","type","stage","lost_reason","guest","company","party_size","starts_at","flexible_date","budget","booking_type_id","event_id","booking_id","owner_id","source","created_at","message","priority","needs_reply","summary"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/enquiries/{enquiry_id}/mark-lost":{"post":{"operationId":"enquiries.mark_lost","tags":["Enquiries"],"summary":"Mark an enquiry lost","description":"It will not happen. Give one of the reasons in `enquiry_lost_reasons.list`, by its ID or its label, and a note if there is more to say. A table held for it is let go. It can be brought back with `enquiries.reopen`.","security":[{"oauth2":["enquiries:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"enquiry_id","in":"path","required":true,"description":"The enquiry ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lost_reason_id":{"type":"string","minLength":1,"maxLength":64},"lost_reason":{"description":"The reason by its label, such as \"Price\".","type":"string","minLength":1,"maxLength":120},"note":{"description":"More on why, for staff.","type":"string","maxLength":2000}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"reference":{"description":"The reference the guest was given.","type":["string","null"]},"venue_id":{"type":"string"},"type":{"type":"string","enum":["general","large_booking","private_event","corporate","special_occasion","booking_type","notify","other"]},"stage":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"The venue's own name for it."},"class":{"type":"string","enum":["open","held","confirmed","done","lost"],"description":"`open`: being worked. `held`: a table is held for it. `confirmed`: booked. `done`: it has happened. `lost`: it will not happen."}},"required":["id","name","class"],"additionalProperties":false},"lost_reason":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":["string","null"]}},"required":["id","label"],"additionalProperties":false},{"type":"null"}],"description":"Why it was lost. Null unless its stage is `lost`."},"guest":{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["first_name","last_name","email","phone"],"additionalProperties":false},"company":{"description":"Who the guest is booking for, if anyone.","type":["string","null"]},"party_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"starts_at":{"type":"string","description":"When they want to come: an ISO 8601 instant."},"flexible_date":{"type":"boolean","description":"The guest said the date can move."},"budget":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"What the guest means to spend, in the venue's currency, in minor units: 150000 is £1,500.00. When the guest gives none, Stampede fills in the venue's average spend per cover times the party size."},"booking_type_id":{"description":"The booking type it is about, if any.","type":["string","null"]},"event_id":{"description":"The event it is about, if any.","type":["string","null"]},"booking_id":{"description":"The booking made for it, once there is one.","type":["string","null"]},"owner_id":{"description":"The Stampede user who owns it. Null: no one yet.","type":["string","null"]},"source":{"description":"Where it came from, as the venue records it: web_form, phone, walk_in, email, referral, google, other.","type":["string","null"]},"created_at":{"type":"string"},"message":{"description":"The guest's message.","type":["string","null"]},"priority":{"anyOf":[{"type":"string","enum":["none","low","medium","high","urgent"]},{"type":"null"}]},"needs_reply":{"type":"boolean","description":"The guest wrote last and is waiting for an answer."},"summary":{"description":"The conversation so far, in a few sentences, as staff or Stampede last wrote it.","type":["string","null"]}},"required":["id","reference","venue_id","type","stage","lost_reason","guest","company","party_size","starts_at","flexible_date","budget","booking_type_id","event_id","booking_id","owner_id","source","created_at","message","priority","needs_reply","summary"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/enquiries/{enquiry_id}/reopen":{"post":{"operationId":"enquiries.reopen","tags":["Enquiries"],"summary":"Bring back a lost enquiry","description":"Back to an open stage: the one named, or the venue's first. Its lost reason is cleared.","security":[{"oauth2":["enquiries:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"enquiry_id","in":"path","required":true,"description":"The enquiry ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"stage_id":{"description":"An open stage. Default: the first.","type":"string","minLength":1,"maxLength":64}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"reference":{"description":"The reference the guest was given.","type":["string","null"]},"venue_id":{"type":"string"},"type":{"type":"string","enum":["general","large_booking","private_event","corporate","special_occasion","booking_type","notify","other"]},"stage":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"The venue's own name for it."},"class":{"type":"string","enum":["open","held","confirmed","done","lost"],"description":"`open`: being worked. `held`: a table is held for it. `confirmed`: booked. `done`: it has happened. `lost`: it will not happen."}},"required":["id","name","class"],"additionalProperties":false},"lost_reason":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":["string","null"]}},"required":["id","label"],"additionalProperties":false},{"type":"null"}],"description":"Why it was lost. Null unless its stage is `lost`."},"guest":{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["first_name","last_name","email","phone"],"additionalProperties":false},"company":{"description":"Who the guest is booking for, if anyone.","type":["string","null"]},"party_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"starts_at":{"type":"string","description":"When they want to come: an ISO 8601 instant."},"flexible_date":{"type":"boolean","description":"The guest said the date can move."},"budget":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"What the guest means to spend, in the venue's currency, in minor units: 150000 is £1,500.00. When the guest gives none, Stampede fills in the venue's average spend per cover times the party size."},"booking_type_id":{"description":"The booking type it is about, if any.","type":["string","null"]},"event_id":{"description":"The event it is about, if any.","type":["string","null"]},"booking_id":{"description":"The booking made for it, once there is one.","type":["string","null"]},"owner_id":{"description":"The Stampede user who owns it. Null: no one yet.","type":["string","null"]},"source":{"description":"Where it came from, as the venue records it: web_form, phone, walk_in, email, referral, google, other.","type":["string","null"]},"created_at":{"type":"string"},"message":{"description":"The guest's message.","type":["string","null"]},"priority":{"anyOf":[{"type":"string","enum":["none","low","medium","high","urgent"]},{"type":"null"}]},"needs_reply":{"type":"boolean","description":"The guest wrote last and is waiting for an answer."},"summary":{"description":"The conversation so far, in a few sentences, as staff or Stampede last wrote it.","type":["string","null"]}},"required":["id","reference","venue_id","type","stage","lost_reason","guest","company","party_size","starts_at","flexible_date","budget","booking_type_id","event_id","booking_id","owner_id","source","created_at","message","priority","needs_reply","summary"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/enquiries/{enquiry_id}/assign":{"post":{"operationId":"enquiries.assign","tags":["Enquiries"],"summary":"Give an enquiry an owner","description":"The Stampede user who looks after it, who must be in the organisation, or `me`; null leaves it with no one. Stampede tells the people following it.","security":[{"oauth2":["enquiries:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"enquiry_id","in":"path","required":true,"description":"The enquiry ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"owner_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}],"description":"A Stampede user ID, `me`, or null."}},"required":["owner_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"reference":{"description":"The reference the guest was given.","type":["string","null"]},"venue_id":{"type":"string"},"type":{"type":"string","enum":["general","large_booking","private_event","corporate","special_occasion","booking_type","notify","other"]},"stage":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"The venue's own name for it."},"class":{"type":"string","enum":["open","held","confirmed","done","lost"],"description":"`open`: being worked. `held`: a table is held for it. `confirmed`: booked. `done`: it has happened. `lost`: it will not happen."}},"required":["id","name","class"],"additionalProperties":false},"lost_reason":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":["string","null"]}},"required":["id","label"],"additionalProperties":false},{"type":"null"}],"description":"Why it was lost. Null unless its stage is `lost`."},"guest":{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["first_name","last_name","email","phone"],"additionalProperties":false},"company":{"description":"Who the guest is booking for, if anyone.","type":["string","null"]},"party_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"starts_at":{"type":"string","description":"When they want to come: an ISO 8601 instant."},"flexible_date":{"type":"boolean","description":"The guest said the date can move."},"budget":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"What the guest means to spend, in the venue's currency, in minor units: 150000 is £1,500.00. When the guest gives none, Stampede fills in the venue's average spend per cover times the party size."},"booking_type_id":{"description":"The booking type it is about, if any.","type":["string","null"]},"event_id":{"description":"The event it is about, if any.","type":["string","null"]},"booking_id":{"description":"The booking made for it, once there is one.","type":["string","null"]},"owner_id":{"description":"The Stampede user who owns it. Null: no one yet.","type":["string","null"]},"source":{"description":"Where it came from, as the venue records it: web_form, phone, walk_in, email, referral, google, other.","type":["string","null"]},"created_at":{"type":"string"},"message":{"description":"The guest's message.","type":["string","null"]},"priority":{"anyOf":[{"type":"string","enum":["none","low","medium","high","urgent"]},{"type":"null"}]},"needs_reply":{"type":"boolean","description":"The guest wrote last and is waiting for an answer."},"summary":{"description":"The conversation so far, in a few sentences, as staff or Stampede last wrote it.","type":["string","null"]}},"required":["id","reference","venue_id","type","stage","lost_reason","guest","company","party_size","starts_at","flexible_date","budget","booking_type_id","event_id","booking_id","owner_id","source","created_at","message","priority","needs_reply","summary"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/enquiry-stages":{"get":{"operationId":"enquiry_stages.list","tags":["Enquiries"],"summary":"List the stages an enquiry moves through","description":"The organisation's own stages, in order. Each has a class, which is what the API's rules go by.","security":[{"oauth2":["enquiries:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"The venue's own name for it."},"class":{"type":"string","enum":["open","held","confirmed","done","lost"],"description":"`open`: being worked. `held`: a table is held for it. `confirmed`: booked. `done`: it has happened. `lost`: it will not happen."},"default":{"type":"boolean","description":"Where a new enquiry starts."}},"required":["id","name","class","default"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/enquiry-lost-reasons":{"get":{"operationId":"enquiry_lost_reasons.list","tags":["Enquiries"],"summary":"List the reasons an enquiry can be lost","security":[{"oauth2":["enquiries:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"worth_following_up":{"type":"boolean","description":"The guest may still come, another time or another way."}},"required":["id","label","worth_following_up"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/enquiry-questions":{"get":{"operationId":"enquiry_questions.list","tags":["Enquiries"],"summary":"List the questions on a venue's enquiry form","description":"What the form asks beyond the guest and the date. Answer them in `answers` on `enquiries.create`.","security":[{"oauth2":["enquiries:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["text","text-area","select","multi-select","yes-no"]},"options":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"The choices, for select and multi-select."},"required":{"type":"boolean","description":"An online enquiry must answer it."},"help_text":{"type":["string","null"]}},"required":["id","label","type","options","required","help_text"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/enquiries/{enquiry_id}/payment-links":{"get":{"operationId":"enquiry_payment_links.list","tags":["Enquiries"],"summary":"List an enquiry's payment links","description":"Every payment link sent for this enquiry and not withdrawn, newest first, paid or not, with its payment page.","security":[{"oauth2":["enquiries:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"enquiry_id","in":"path","required":true,"description":"The enquiry ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"booking_id":{"description":"The booking it is for. Null for one sent on an enquiry.","type":["string","null"]},"enquiry_id":{"description":"The enquiry it is for. Null for one sent on a booking.","type":["string","null"]},"type":{"type":"string","enum":["deposit","cancellation_charge","full_payment"],"description":"`deposit`: taken now. `cancellation_charge`: a card saved, charged only if they cancel late or do not come. `full_payment`: the whole bill."},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In the venue's currency, in minor units: 2000 is £20.00."},"status":{"type":"string","enum":["pending","paid","cancelled"]},"due_by":{"description":"When it must be paid by. Null: no deadline.","type":["string","null"]},"cancel_if_unpaid":{"type":"boolean","description":"The booking, or the enquiry, is cancelled if it is not paid by `due_by`."},"url":{"description":"The guest's payment page, to share another way than email. Null for a card charged by staff.","type":["string","null"]},"message":{"description":"Shown to the guest with the link.","type":["string","null"]},"created_at":{"type":["string","null"]}},"required":["id","booking_id","enquiry_id","type","amount","status","due_by","cancel_if_unpaid","url","message","created_at"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"enquiry_payment_links.create","tags":["Enquiries"],"summary":"Send a payment link for an enquiry","description":"Asks the guest to pay towards an enquiry, as Stampede's enquiry page does: a link to Stampede's payment page, emailed to the guest when `notify_guest` is true, and always returned as `url` to share another way. Send the type and the amount: enquiries have no rules to work one out from. Each call makes a new link: list them first so the guest is not asked twice.","security":[{"oauth2":["enquiries:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"enquiry_id","in":"path","required":true,"description":"The enquiry ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["deposit","cancellation_charge","full_payment"],"description":"`deposit`: taken now. `cancellation_charge`: a card saved, charged only if they cancel late or do not come. `full_payment`: the whole amount, by `due_by`."},"amount":{"type":"integer","minimum":1,"maximum":10000000,"description":"In the venue's currency, in minor units: 2000 is £20.00."},"due_by":{"description":"When it must be paid by, an ISO 8601 instant. None: no deadline.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"cancel_if_unpaid":{"description":"Cancel the enquiry if it is not paid by `due_by`; the guest is told so.","type":"boolean"},"message":{"description":"Shown to the guest with the link.","type":"string","maxLength":1000},"notify_guest":{"type":"boolean","description":"Email the guest about it. Required: ask the person each time."}},"required":["type","amount","notify_guest"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"booking_id":{"description":"The booking it is for. Null for one sent on an enquiry.","type":["string","null"]},"enquiry_id":{"description":"The enquiry it is for. Null for one sent on a booking.","type":["string","null"]},"type":{"type":"string","enum":["deposit","cancellation_charge","full_payment"],"description":"`deposit`: taken now. `cancellation_charge`: a card saved, charged only if they cancel late or do not come. `full_payment`: the whole bill."},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In the venue's currency, in minor units: 2000 is £20.00."},"status":{"type":"string","enum":["pending","paid","cancelled"]},"due_by":{"description":"When it must be paid by. Null: no deadline.","type":["string","null"]},"cancel_if_unpaid":{"type":"boolean","description":"The booking, or the enquiry, is cancelled if it is not paid by `due_by`."},"url":{"description":"The guest's payment page, to share another way than email. Null for a card charged by staff.","type":["string","null"]},"message":{"description":"Shown to the guest with the link.","type":["string","null"]},"created_at":{"type":["string","null"]}},"required":["id","booking_id","enquiry_id","type","amount","status","due_by","cancel_if_unpaid","url","message","created_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/enquiries/{enquiry_id}/payment-links/{payment_link_id}/send":{"post":{"operationId":"enquiry_payment_links.send","tags":["Enquiries"],"summary":"Email an enquiry payment link again","description":"Emails the guest the link again, for one not yet paid. The guest needs an email address.","security":[{"oauth2":["enquiries:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"enquiry_id","in":"path","required":true,"description":"The enquiry ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"payment_link_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"booking_id":{"description":"The booking it is for. Null for one sent on an enquiry.","type":["string","null"]},"enquiry_id":{"description":"The enquiry it is for. Null for one sent on a booking.","type":["string","null"]},"type":{"type":"string","enum":["deposit","cancellation_charge","full_payment"],"description":"`deposit`: taken now. `cancellation_charge`: a card saved, charged only if they cancel late or do not come. `full_payment`: the whole bill."},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In the venue's currency, in minor units: 2000 is £20.00."},"status":{"type":"string","enum":["pending","paid","cancelled"]},"due_by":{"description":"When it must be paid by. Null: no deadline.","type":["string","null"]},"cancel_if_unpaid":{"type":"boolean","description":"The booking, or the enquiry, is cancelled if it is not paid by `due_by`."},"url":{"description":"The guest's payment page, to share another way than email. Null for a card charged by staff.","type":["string","null"]},"message":{"description":"Shown to the guest with the link.","type":["string","null"]},"created_at":{"type":["string","null"]}},"required":["id","booking_id","enquiry_id","type","amount","status","due_by","cancel_if_unpaid","url","message","created_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/enquiries/{enquiry_id}/payment-links/{payment_link_id}":{"delete":{"operationId":"enquiry_payment_links.delete","tags":["Enquiries"],"summary":"Withdraw an enquiry payment link","description":"The guest can no longer pay through it, and its reminders stop. A paid link stays: refund it in Stampede.","security":[{"oauth2":["enquiries:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"enquiry_id","in":"path","required":true,"description":"The enquiry ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"payment_link_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/enquiries/{enquiry_id}/notes":{"get":{"operationId":"enquiries.notes.list","tags":["Enquiries"],"summary":"List an enquiry's notes","description":"Every note on an enquiry, newest first: written ones, and conversations recorded in Stampede with their transcript once it is done. Reading them records nothing on the enquiry.","security":[{"oauth2":["enquiries:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"enquiry_id","in":"path","required":true,"description":"The enquiry ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enquiry_id":{"type":"string"},"kind":{"type":"string","enum":["note","recording"],"description":"`note`: written. `recording`: a conversation recorded in Stampede, read only here."},"title":{"type":["string","null"]},"body":{"description":"The note as plain text. A recording's is its transcript, unless someone wrote one.","type":["string","null"]},"author":{"description":"The name of whoever wrote it, or \"The Coordinator\". Null when Stampede has no name for them.","type":["string","null"]},"revision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"1 when written, one more each time it is changed."},"recording":{"anyOf":[{"type":"object","properties":{"seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How long it is."},"transcript_status":{"anyOf":[{"type":"string","enum":["pending","done","failed"]},{"type":"null"}],"description":"`pending` until it has been transcribed."},"transcript":{"description":"What was said, once `transcript_status` is `done`. Null before.","type":["string","null"]}},"required":["seconds","transcript_status","transcript"],"additionalProperties":false},{"type":"null"}],"description":"For a recording, what is known about it. Null for a written note. The audio itself is not shared."},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","enquiry_id","kind","title","body","author","revision","recording","created_at","updated_at"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"enquiries.notes.create","tags":["Enquiries"],"summary":"Add a note to an enquiry","description":"A written note on an enquiry, under the signed-in person's name. It goes on the enquiry's history. The guest never sees it and is not emailed.","security":[{"oauth2":["enquiries:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"enquiry_id","in":"path","required":true,"description":"The enquiry ID.","schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"description":"A heading for it. None: no title.","type":"string","maxLength":160},"body":{"type":"string","minLength":1,"maxLength":20000,"description":"The note, as plain text. A blank line starts a new paragraph."}},"required":["body"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"enquiry_id":{"type":"string"},"kind":{"type":"string","enum":["note","recording"],"description":"`note`: written. `recording`: a conversation recorded in Stampede, read only here."},"title":{"type":["string","null"]},"body":{"description":"The note as plain text. A recording's is its transcript, unless someone wrote one.","type":["string","null"]},"author":{"description":"The name of whoever wrote it, or \"The Coordinator\". Null when Stampede has no name for them.","type":["string","null"]},"revision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"1 when written, one more each time it is changed."},"recording":{"anyOf":[{"type":"object","properties":{"seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How long it is."},"transcript_status":{"anyOf":[{"type":"string","enum":["pending","done","failed"]},{"type":"null"}],"description":"`pending` until it has been transcribed."},"transcript":{"description":"What was said, once `transcript_status` is `done`. Null before.","type":["string","null"]}},"required":["seconds","transcript_status","transcript"],"additionalProperties":false},{"type":"null"}],"description":"For a recording, what is known about it. Null for a written note. The audio itself is not shared."},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","enquiry_id","kind","title","body","author","revision","recording","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/enquiries/{enquiry_id}/notes/{note_id}":{"patch":{"operationId":"enquiries.notes.update","tags":["Enquiries"],"summary":"Change a note on an enquiry","description":"Changes a written note's title, its text, or both: only what is sent changes, and `title: null` clears the title. Each change is a new revision, on the enquiry's history. A recording cannot be changed here (409).","security":[{"oauth2":["enquiries:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"enquiry_id","in":"path","required":true,"description":"The enquiry ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"note_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"description":"Null clears it.","anyOf":[{"type":"string","maxLength":160},{"type":"null"}]},"body":{"type":"string","minLength":1,"maxLength":20000,"description":"The note, as plain text. A blank line starts a new paragraph."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"enquiry_id":{"type":"string"},"kind":{"type":"string","enum":["note","recording"],"description":"`note`: written. `recording`: a conversation recorded in Stampede, read only here."},"title":{"type":["string","null"]},"body":{"description":"The note as plain text. A recording's is its transcript, unless someone wrote one.","type":["string","null"]},"author":{"description":"The name of whoever wrote it, or \"The Coordinator\". Null when Stampede has no name for them.","type":["string","null"]},"revision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"1 when written, one more each time it is changed."},"recording":{"anyOf":[{"type":"object","properties":{"seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How long it is."},"transcript_status":{"anyOf":[{"type":"string","enum":["pending","done","failed"]},{"type":"null"}],"description":"`pending` until it has been transcribed."},"transcript":{"description":"What was said, once `transcript_status` is `done`. Null before.","type":["string","null"]}},"required":["seconds","transcript_status","transcript"],"additionalProperties":false},{"type":"null"}],"description":"For a recording, what is known about it. Null for a written note. The audio itself is not shared."},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","enquiry_id","kind","title","body","author","revision","recording","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"enquiries.notes.delete","tags":["Enquiries"],"summary":"Delete a note on an enquiry","description":"Removes a written note from the enquiry. Its removal goes on the enquiry's history. A recording cannot be deleted here (409).","security":[{"oauth2":["enquiries:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"description":"The venue ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"enquiry_id","in":"path","required":true,"description":"The enquiry ID.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"note_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/wifi/settings":{"get":{"operationId":"wifi.settings.get","tags":["WiFi"],"summary":"Get a venue's WiFi sign-in page settings","description":"What guests see and fill in to get online: free or paid, the fields asked, the marketing box, email and phone checks, the welcome message, where guests go next and the brand kit.","security":[{"oauth2":["wifi:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"venue_id":{"type":"string"},"access":{"type":"string","enum":["free","paid","hybrid"],"description":"free: guests sign in. paid: guests buy a plan. hybrid: retired, set in Stampede only."},"fields":{"type":"array","items":{"type":"string","enum":["email","first_name","last_name","phone","postcode","birthday","gender","country"]},"description":"What guests fill in, in the order the page asks."},"password_required":{"type":"boolean","description":"Guests must also enter the venue's access password (set in Stampede)."},"marketing_consent":{"type":"object","properties":{"asked":{"type":"boolean","description":"The page has a box to opt in to marketing."},"text":{"description":"The box's words.","type":["string","null"]},"pre_ticked":{"type":"boolean","description":"Set in Stampede only."},"required":{"type":"boolean","description":"Set in Stampede only."}},"required":["asked","text","pre_ticked","required"],"additionalProperties":false},"email_checks":{"type":"object","properties":{"verify":{"type":"boolean","description":"Checks the email address can receive mail."},"business_only":{"type":"boolean"},"allow_disposable":{"type":"boolean"}},"required":["verify","business_only","allow_disposable"],"additionalProperties":false},"sms_verification":{"type":"boolean","description":"Guests confirm their phone with a code."},"apple_sign_in":{"type":"boolean"},"welcome_message":{"type":["string","null"]},"landing_url":{"description":"Where guests go once online.","type":["string","null"]},"brand_kit_id":{"description":"The brand kit the page is drawn in.","type":["string","null"]},"language":{"type":["string","null"]},"translate":{"type":"boolean"},"payments_set_up":{"type":"boolean","description":"A payment account is connected, so paid access can work (set in Stampede)."}},"required":["venue_id","access","fields","password_required","marketing_consent","email_checks","sms_verification","apple_sign_in","welcome_message","landing_url","brand_kit_id","language","translate","payments_set_up"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"wifi.settings.update","tags":["WiFi"],"summary":"Change a venue's WiFi sign-in page","description":"Send only what changes. Guests see it the next time the page loads, so describe the change and confirm first. fields replaces the list (email is always asked). access paid needs a payment account and at least one plan. The access password and whether the marketing box is pre-ticked or required are set in Stampede.","security":[{"oauth2":["wifi:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"access":{"type":"string","enum":["free","paid"]},"fields":{"minItems":1,"type":"array","items":{"type":"string","enum":["email","first_name","last_name","phone","postcode","birthday","gender","country"]}},"marketing_consent":{"type":"object","properties":{"asked":{"type":"boolean"},"text":{"type":"string","minLength":1,"maxLength":128}}},"email_checks":{"type":"object","properties":{"verify":{"type":"boolean"},"business_only":{"type":"boolean"},"allow_disposable":{"type":"boolean"}}},"sms_verification":{"type":"boolean"},"apple_sign_in":{"type":"boolean"},"welcome_message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"landing_url":{"type":"string","maxLength":200,"format":"uri"},"brand_kit_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"venue_id":{"type":"string"},"access":{"type":"string","enum":["free","paid","hybrid"],"description":"free: guests sign in. paid: guests buy a plan. hybrid: retired, set in Stampede only."},"fields":{"type":"array","items":{"type":"string","enum":["email","first_name","last_name","phone","postcode","birthday","gender","country"]},"description":"What guests fill in, in the order the page asks."},"password_required":{"type":"boolean","description":"Guests must also enter the venue's access password (set in Stampede)."},"marketing_consent":{"type":"object","properties":{"asked":{"type":"boolean","description":"The page has a box to opt in to marketing."},"text":{"description":"The box's words.","type":["string","null"]},"pre_ticked":{"type":"boolean","description":"Set in Stampede only."},"required":{"type":"boolean","description":"Set in Stampede only."}},"required":["asked","text","pre_ticked","required"],"additionalProperties":false},"email_checks":{"type":"object","properties":{"verify":{"type":"boolean","description":"Checks the email address can receive mail."},"business_only":{"type":"boolean"},"allow_disposable":{"type":"boolean"}},"required":["verify","business_only","allow_disposable"],"additionalProperties":false},"sms_verification":{"type":"boolean","description":"Guests confirm their phone with a code."},"apple_sign_in":{"type":"boolean"},"welcome_message":{"type":["string","null"]},"landing_url":{"description":"Where guests go once online.","type":["string","null"]},"brand_kit_id":{"description":"The brand kit the page is drawn in.","type":["string","null"]},"language":{"type":["string","null"]},"translate":{"type":"boolean"},"payments_set_up":{"type":"boolean","description":"A payment account is connected, so paid access can work (set in Stampede)."}},"required":["venue_id","access","fields","password_required","marketing_consent","email_checks","sms_verification","apple_sign_in","welcome_message","landing_url","brand_kit_id","language","translate","payments_set_up"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/wifi/plans":{"get":{"operationId":"wifi.plans.list","tags":["WiFi"],"summary":"List a venue's paid WiFi plans","description":"What guests can buy when access is paid. Longest first.","security":[{"oauth2":["wifi:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"devices":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many devices one purchase covers."},"duration_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long access lasts after paying."},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."}},"required":["id","name","devices","duration_seconds","price"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"wifi.plans.create","tags":["WiFi"],"summary":"Create a paid WiFi plan","description":"Guests can buy it on the sign-in page at once if access is paid: confirm the name, price, length and devices first.","security":[{"oauth2":["wifi:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":36},"devices":{"type":"integer","minimum":1,"maximum":50},"duration_seconds":{"type":"integer","minimum":60,"maximum":31622400,"description":"How long access lasts after paying: 3600 is an hour, 86400 a day."},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"In minor units: 500 is £5.00."},"currency":{"type":"string","enum":["GBP","EUR","USD"],"description":"The venue's currency."}},"required":["amount","currency"]}},"required":["name","devices","duration_seconds","price"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"devices":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many devices one purchase covers."},"duration_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long access lasts after paying."},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."}},"required":["id","name","devices","duration_seconds","price"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/wifi/plans/{plan_id}":{"patch":{"operationId":"wifi.plans.update","tags":["WiFi"],"summary":"Change a paid WiFi plan","description":"Send only what changes. Guests who already paid keep what they bought.","security":[{"oauth2":["wifi:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":36},"devices":{"type":"integer","minimum":1,"maximum":50},"duration_seconds":{"type":"integer","minimum":60,"maximum":31622400,"description":"How long access lasts after paying: 3600 is an hour, 86400 a day."},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"In minor units: 500 is £5.00."},"currency":{"type":"string","enum":["GBP","EUR","USD"],"description":"The venue's currency."}},"required":["amount","currency"]}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"devices":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many devices one purchase covers."},"duration_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long access lasts after paying."},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."}},"required":["id","name","devices","duration_seconds","price"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"wifi.plans.delete","tags":["WiFi"],"summary":"Delete a paid WiFi plan","description":"Guests can no longer buy it. Those who already paid keep their access, and past payments keep the plan.","security":[{"oauth2":["wifi:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/wifi/payments":{"get":{"operationId":"wifi.payments.list","tags":["WiFi"],"summary":"List a venue's WiFi payments","description":"Newest first: paid on the sign-in page, or recorded by staff. The guest's details need guests:read.","security":[{"oauth2":["wifi:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `cursor` from the previous page.","schema":{"type":"string","minLength":1}},{"name":"since","in":"query","required":false,"description":"Only payments made at or after this time.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"guest_id":{"type":"string"},"guest":{"anyOf":[{"type":"object","properties":{"email":{"type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]}},"required":["email","first_name","last_name"],"additionalProperties":false},{"type":"null"}],"description":"Needs guests:read."},"plan":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]}},"required":["id","name"],"additionalProperties":false},"source":{"type":"string","enum":["online","manual"],"description":"online: paid on the sign-in page. manual: recorded by staff."},"amount":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"devices":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"reason":{"type":["string","null"]},"paid_at":{"type":"string"},"expires_at":{"type":"string"}},"required":["id","guest_id","guest","plan","source","amount","devices","reason","paid_at","expires_at"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"wifi.payments.create","tags":["WiFi"],"summary":"Record a WiFi payment taken in person","description":"For a guest who paid staff (cash or card at the bar): gives them paid access on the plan, at once. devices, duration_seconds and amount default to the plan's. Not for giving access away: amount is what they paid.","security":[{"oauth2":["wifi:write"]}],"x-kind":"write","x-mcp":true,"x-support":false,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"guest_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"plan_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"devices":{"type":"integer","minimum":1,"maximum":50},"duration_seconds":{"type":"integer","minimum":60,"maximum":31622400,"description":"How long access lasts after paying: 3600 is an hour, 86400 a day."},"amount":{"description":"What they paid, in minor units.","type":"integer","minimum":1,"maximum":9007199254740991},"reason":{"type":"string","maxLength":255}},"required":["guest_id","plan_id"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"guest_id":{"type":"string"},"guest":{"anyOf":[{"type":"object","properties":{"email":{"type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]}},"required":["email","first_name","last_name"],"additionalProperties":false},{"type":"null"}],"description":"Needs guests:read."},"plan":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]}},"required":["id","name"],"additionalProperties":false},"source":{"type":"string","enum":["online","manual"],"description":"online: paid on the sign-in page. manual: recorded by staff."},"amount":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"devices":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"reason":{"type":["string","null"]},"paid_at":{"type":"string"},"expires_at":{"type":"string"}},"required":["id","guest_id","guest","plan","source","amount","devices","reason","paid_at","expires_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/wifi/stats":{"get":{"operationId":"wifi.stats","tags":["WiFi"],"summary":"Count WiFi sign-ins per venue per day","description":"One row per venue and day (UTC) with at least one session, newest first, for the caller's venues. Up to 366 days.","security":[{"oauth2":["wifi:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"from","in":"query","required":true,"description":"First day, YYYY-MM-DD.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":true,"description":"Last day, YYYY-MM-DD, included.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"venue_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"venue_id":{"type":"string"},"venue_name":{"type":["string","null"]},"sessions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["date","venue_id","venue_name","sessions"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/wifi/sessions":{"get":{"operationId":"wifi.sessions.list","tags":["WiFi"],"summary":"List a venue's guest WiFi sessions","description":"Newest first.","security":[{"oauth2":["wifi:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `cursor` from the previous page.","schema":{"type":"string","minLength":1}},{"name":"since","in":"query","required":false,"description":"Only sessions that started at or after this time.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"guest_id","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"guest_id":{"type":["string","null"]},"guest":{"type":"object","properties":{"email":{"type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]}},"required":["email","first_name","last_name"],"additionalProperties":false},"device":{"type":"object","properties":{"mac":{"type":["string","null"]},"type":{"type":["string","null"]},"brand":{"type":["string","null"]},"model":{"type":["string","null"]},"mobile":{"type":"boolean"}},"required":["mac","type","brand","model","mobile"],"additionalProperties":false},"started_at":{"type":"string"},"ended_at":{"type":["string","null"]}},"required":["id","guest_id","guest","device","started_at","ended_at"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/wifi/snapguard":{"get":{"operationId":"wifi.snapguard.setup","tags":["WiFi"],"summary":"Where a venue's SNAPguard setup stands","description":"The SNAPguard is Stampede's router box. This checks live data for each setup step (ordered, plugged in, confirmed and linked, networks, pushed to the box, guests online) and gives the next step with what to tell the person. Check again after each step: a box takes 2 to 3 minutes to come online and a push a few minutes to finish.","security":[{"oauth2":["wifi:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"venue_id":{"type":"string"},"box":{"anyOf":[{"type":"object","properties":{"serial":{"type":"string"},"model":{"type":["string","null"]},"online":{"type":"boolean"},"linked":{"type":"boolean","description":"Linked to this venue."},"order":{"anyOf":[{"type":"object","properties":{"reference":{"type":["string","null"]},"status":{"type":["string","null"]}},"required":["reference","status"],"additionalProperties":false},{"type":"null"}]}},"required":["serial","model","online","linked","order"],"additionalProperties":false},{"type":"null"}],"description":"This venue's box, or one of the organisation's boxes still to be set up."},"boxes_waiting":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The organisation's boxes not yet linked to a venue."},"networks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"Also the WiFi name guests and staff see."},"purpose":{"type":"string","enum":["guest","other"],"description":"guest: guests sign in on the venue's WiFi page. other: staff, tills and the rest."},"address":{"type":"string","description":"The network, e.g. 172.16.0.0/16."},"gateway":{"type":["string","null"]},"vlan_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"changed_at":{"type":["string","null"]}},"required":["id","name","purpose","address","gateway","vlan_id","changed_at"],"additionalProperties":false}},"build":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","done","failed"],"description":"queued: waiting to start. running: the box is taking it. done: the box has it. failed: see error."},"progress":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"0 to 100."},"stage":{"description":"What the box is doing now.","type":["string","null"]},"error":{"type":["string","null"]},"started_at":{"type":["string","null"]},"finished_at":{"type":["string","null"]}},"required":["id","status","progress","stage","error","started_at","finished_at"],"additionalProperties":false},{"type":"null"}],"description":"The latest push to the box."},"steps":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["order","plug_in","confirm_and_link","wifi_equipment","networks","push","controller","guests_online"]},"title":{"type":"string"},"status":{"type":"string","enum":["done","to_do","waiting","failed","ask"],"description":"done; to_do; waiting (something is under way: check again in a minute); failed (see evidence); ask (only the person knows: ask them, it is not recorded)."},"done_by":{"type":"string","enum":["person","person_in_stampede","assistant","automatic"],"description":"person: they do it by hand at the venue. person_in_stampede: they do it in Stampede, not through the API. assistant: an operation here does it, after they confirm. automatic: it happens by itself."},"operation":{"description":"The operation that does it, when done_by is assistant.","type":["string","null"]},"evidence":{"type":"string","description":"What the live data shows."},"instructions":{"type":"array","items":{"type":"string"},"description":"What to tell the person, in order."}},"required":["key","title","status","done_by","operation","evidence","instructions"],"additionalProperties":false}},"next_step":{"anyOf":[{"type":"string","enum":["order","plug_in","confirm_and_link","wifi_equipment","networks","push","controller","guests_online"]},{"type":"null"}],"description":"The first step not done, or null when setup is finished."}},"required":["venue_id","box","boxes_waiting","networks","build","steps","next_step"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/wifi/snapguard/build":{"get":{"operationId":"wifi.snapguard.build","tags":["WiFi"],"summary":"The latest push to a venue's SNAPguard","description":"Whether the box has taken its setup: queued, running (with what it is doing now), done or failed (with the reason). Null when nothing has been pushed.","security":[{"oauth2":["wifi:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","done","failed"],"description":"queued: waiting to start. running: the box is taking it. done: the box has it. failed: see error."},"progress":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"0 to 100."},"stage":{"description":"What the box is doing now.","type":["string","null"]},"error":{"type":["string","null"]},"started_at":{"type":["string","null"]},"finished_at":{"type":["string","null"]}},"required":["id","status","progress","stage","error","started_at","finished_at"],"additionalProperties":false},{"type":"null"}]}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/wifi/networks":{"get":{"operationId":"wifi.networks.list","tags":["WiFi"],"summary":"List a venue's SNAPguard networks","description":"The networks the box makes: guest WiFi, tills and the rest. WiFi passwords are not shown.","security":[{"oauth2":["wifi:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"Also the WiFi name guests and staff see."},"purpose":{"type":"string","enum":["guest","other"],"description":"guest: guests sign in on the venue's WiFi page. other: staff, tills and the rest."},"address":{"type":"string","description":"The network, e.g. 172.16.0.0/16."},"gateway":{"type":["string","null"]},"vlan_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"changed_at":{"type":["string","null"]}},"required":["id","name","purpose","address","gateway","vlan_id","changed_at"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"wifi.networks.create","tags":["WiFi"],"summary":"Create a SNAPguard network","description":"guest: guests sign in on the venue's WiFi page (named after the venue unless a name is given). till: for the tills (PayOS unless a name is given). The address and VLAN are chosen to fit beside the venue's other networks. Nothing reaches the box until wifi.snapguard.provision. Confirm the name first. WiFi passwords are set in Stampede.","security":[{"oauth2":["wifi:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"purpose":{"type":"string","enum":["guest","till"]},"name":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[^\"\\\\]+$","description":"Also the WiFi name: up to 32 characters."},"own_wifi_equipment":{"default":false,"description":"The venue has its own access points (UniFi, Omada or similar) on the box.","type":"boolean"}},"required":["purpose"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"Also the WiFi name guests and staff see."},"purpose":{"type":"string","enum":["guest","other"],"description":"guest: guests sign in on the venue's WiFi page. other: staff, tills and the rest."},"address":{"type":"string","description":"The network, e.g. 172.16.0.0/16."},"gateway":{"type":["string","null"]},"vlan_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"changed_at":{"type":["string","null"]}},"required":["id","name","purpose","address","gateway","vlan_id","changed_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/wifi/networks/{network_id}":{"patch":{"operationId":"wifi.networks.update","tags":["WiFi"],"summary":"Rename a SNAPguard network","description":"Changes the network and WiFi name. People on it reconnect under the new name once it is pushed (wifi.snapguard.provision). Confirm first.","security":[{"oauth2":["wifi:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"network_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[^\"\\\\]+$","description":"Also the WiFi name: up to 32 characters."}},"required":["name"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"Also the WiFi name guests and staff see."},"purpose":{"type":"string","enum":["guest","other"],"description":"guest: guests sign in on the venue's WiFi page. other: staff, tills and the rest."},"address":{"type":"string","description":"The network, e.g. 172.16.0.0/16."},"gateway":{"type":["string","null"]},"vlan_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"changed_at":{"type":["string","null"]}},"required":["id","name","purpose","address","gateway","vlan_id","changed_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/wifi/snapguard/provision":{"post":{"operationId":"wifi.snapguard.provision","tags":["WiFi"],"summary":"Push a venue's setup to its SNAPguard","description":"Sends the venue's networks and sign-in page to the box. The box must be online and linked. While it runs, the venue's WiFi can drop for a minute or two, so confirm first, ideally outside busy hours. Push once, then follow it with wifi.snapguard.build; refused while a push is already under way.","security":[{"oauth2":["wifi:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"venue_id":{"type":"string"},"queued":{"type":"boolean","const":true}},"required":["venue_id","queued"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/wifi/snapguard/reboot":{"post":{"operationId":"wifi.snapguard.reboot","tags":["WiFi"],"summary":"Restart a venue's SNAPguard","description":"Restarts the box. Guest WiFi and the tills go offline until it is back, usually 2 to 3 minutes, so tell the person that and confirm first, ideally outside busy hours. The box must be online and linked; refused while a push is under way and within 10 minutes of the last restart through the API. Check wifi.snapguard.setup afterwards to see it back online. A restart does not change the setup: if the networks are wrong, push again (wifi.snapguard.provision). There is no reset here: for that, the person contacts Stampede support.","security":[{"oauth2":["wifi:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"venue_id":{"type":"string"},"queued":{"type":"boolean","const":true}},"required":["venue_id","queued"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/inbox/threads":{"get":{"operationId":"inbox.threads.list","tags":["Inbox"],"summary":"List inbox conversations","description":"Most recent activity first, 15 a page (a page can hold fewer: threads at venues the caller cannot see are left out). status open and read false is what still needs answering.","security":[{"oauth2":["inbox:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"cursor","in":"query","required":false,"description":"The `cursor` from the previous page.","schema":{"type":"string","maxLength":2000}},{"name":"venue_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["open","closed"]}},{"name":"read","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}},{"name":"assignee_id","in":"query","required":false,"description":"A Stampede user ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"tag","in":"query","required":false,"schema":{"type":"string","maxLength":255}},{"name":"tag_value","in":"query","required":false,"schema":{"type":"string","maxLength":255}},{"name":"context_type","in":"query","required":false,"schema":{"type":"string","maxLength":255}},{"name":"context_id","in":"query","required":false,"schema":{"type":"string","maxLength":255}},{"name":"contact_email","in":"query","required":false,"description":"Threads with this guest on them.","schema":{"type":"string","maxLength":255,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"venue_id":{"type":["string","null"]},"subject":{"type":["string","null"]},"channel":{"type":"string","enum":["email","sms","whatsapp"]},"status":{"type":"string","enum":["open","closed"]},"read":{"type":"boolean"},"context":{"anyOf":[{"type":"object","properties":{"type":{"type":"string"},"id":{"type":["string","null"]}},"required":["type","id"],"additionalProperties":false},{"type":"null"}],"description":"What the conversation is about: booking, booking-enquiry, review, form, loyalty, voucher, gifting, email-campaign or wifi."},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"guest_id":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["id","guest_id","name","email","phone"],"additionalProperties":false},"description":"Who replies go to: every contact gets each message."},"assignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"string"},"role":{"type":"string","enum":["owner","subscriber"]},"name":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["id","user_id","role","name","email"],"additionalProperties":false}},"tags":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":["string","null"]}},"required":["name","value"],"additionalProperties":false}},"last_activity_at":{"type":["string","null"]},"last_guest_message_at":{"type":["string","null"]},"last_reply_at":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["id","venue_id","subject","channel","status","read","context","contacts","assignees","tags","last_activity_at","last_guest_message_at","last_reply_at","created_at"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/inbox/threads/{thread_id}":{"get":{"operationId":"inbox.threads.get","tags":["Inbox"],"summary":"Get an inbox conversation","description":"Its contacts, assignees, tags and status. The messages are in inbox.threads.timeline.","security":[{"oauth2":["inbox:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"venue_id":{"type":["string","null"]},"subject":{"type":["string","null"]},"channel":{"type":"string","enum":["email","sms","whatsapp"]},"status":{"type":"string","enum":["open","closed"]},"read":{"type":"boolean"},"context":{"anyOf":[{"type":"object","properties":{"type":{"type":"string"},"id":{"type":["string","null"]}},"required":["type","id"],"additionalProperties":false},{"type":"null"}],"description":"What the conversation is about: booking, booking-enquiry, review, form, loyalty, voucher, gifting, email-campaign or wifi."},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"guest_id":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["id","guest_id","name","email","phone"],"additionalProperties":false},"description":"Who replies go to: every contact gets each message."},"assignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"string"},"role":{"type":"string","enum":["owner","subscriber"]},"name":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["id","user_id","role","name","email"],"additionalProperties":false}},"tags":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":["string","null"]}},"required":["name","value"],"additionalProperties":false}},"last_activity_at":{"type":["string","null"]},"last_guest_message_at":{"type":["string","null"]},"last_reply_at":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["id","venue_id","subject","channel","status","read","context","contacts","assignees","tags","last_activity_at","last_guest_message_at","last_reply_at","created_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"inbox.threads.update","tags":["Inbox"],"summary":"Mark a conversation read or unread, or close or reopen it","description":"Closing marks it read. A guest writing again reopens it by itself.","security":[{"oauth2":["inbox:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"read":{"type":"boolean"},"status":{"type":"string","enum":["open","closed"]}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"venue_id":{"type":["string","null"]},"subject":{"type":["string","null"]},"channel":{"type":"string","enum":["email","sms","whatsapp"]},"status":{"type":"string","enum":["open","closed"]},"read":{"type":"boolean"},"context":{"anyOf":[{"type":"object","properties":{"type":{"type":"string"},"id":{"type":["string","null"]}},"required":["type","id"],"additionalProperties":false},{"type":"null"}],"description":"What the conversation is about: booking, booking-enquiry, review, form, loyalty, voucher, gifting, email-campaign or wifi."},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"guest_id":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["id","guest_id","name","email","phone"],"additionalProperties":false},"description":"Who replies go to: every contact gets each message."},"assignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"string"},"role":{"type":"string","enum":["owner","subscriber"]},"name":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["id","user_id","role","name","email"],"additionalProperties":false}},"tags":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":["string","null"]}},"required":["name","value"],"additionalProperties":false}},"last_activity_at":{"type":["string","null"]},"last_guest_message_at":{"type":["string","null"]},"last_reply_at":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["id","venue_id","subject","channel","status","read","context","contacts","assignees","tags","last_activity_at","last_guest_message_at","last_reply_at","created_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/inbox/threads/{thread_id}/timeline":{"get":{"operationId":"inbox.threads.timeline","tags":["Inbox"],"summary":"Read a conversation's messages and notes","description":"Newest first, 15 a page: the guest's messages, replies sent, staff notes and system notes. Reading the first page records that the signed-in person viewed the thread, as opening it in Stampede does.","security":[{"oauth2":["inbox:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":2000}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["guest_email","guest_sms","guest_whatsapp","guest_reply","form","reply","note","system"],"description":"guest_*: the guest wrote (guest_reply: on the web page linked from an email). form: a form they filled in. reply: sent to the guest. note: a staff note the guest never sees. system: what Stampede did (closed, assigned)."},"at":{"type":"string"},"from":{"anyOf":[{"type":"object","properties":{"name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["name","email","phone"],"additionalProperties":false},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"user_id":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["user_id","name","email"],"additionalProperties":false},{"type":"null"}],"description":"The Stampede user who wrote a reply or note."},"subject":{"type":["string","null"]},"text":{"description":"Plain text where there is one.","type":["string","null"]},"html":{"type":["string","null"]},"auto_reply":{"type":"boolean","description":"An out-of-office or other automatic email."},"answers":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answers":{}},"required":["question","answers"],"additionalProperties":false}},{"type":"null"}],"description":"A form submission."}},"required":["id","kind","at","from","author","subject","text","html","auto_reply","answers"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/inbox/threads/{thread_id}/assignees":{"post":{"operationId":"inbox.threads.assign","tags":["Inbox"],"summary":"Assign a conversation to someone","description":"owner: the person answering it (one per thread; a new owner replaces the old). subscriber: follows it. user_id is a user of this organisation.","security":[{"oauth2":["inbox:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"role":{"default":"owner","type":"string","enum":["owner","subscriber"]}},"required":["user_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"venue_id":{"type":["string","null"]},"subject":{"type":["string","null"]},"channel":{"type":"string","enum":["email","sms","whatsapp"]},"status":{"type":"string","enum":["open","closed"]},"read":{"type":"boolean"},"context":{"anyOf":[{"type":"object","properties":{"type":{"type":"string"},"id":{"type":["string","null"]}},"required":["type","id"],"additionalProperties":false},{"type":"null"}],"description":"What the conversation is about: booking, booking-enquiry, review, form, loyalty, voucher, gifting, email-campaign or wifi."},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"guest_id":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["id","guest_id","name","email","phone"],"additionalProperties":false},"description":"Who replies go to: every contact gets each message."},"assignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"string"},"role":{"type":"string","enum":["owner","subscriber"]},"name":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["id","user_id","role","name","email"],"additionalProperties":false}},"tags":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":["string","null"]}},"required":["name","value"],"additionalProperties":false}},"last_activity_at":{"type":["string","null"]},"last_guest_message_at":{"type":["string","null"]},"last_reply_at":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["id","venue_id","subject","channel","status","read","context","contacts","assignees","tags","last_activity_at","last_guest_message_at","last_reply_at","created_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/inbox/threads/{thread_id}/assignees/{assignee_id}":{"delete":{"operationId":"inbox.threads.unassign","tags":["Inbox"],"summary":"Take someone off a conversation","description":"assignee_id is the id in the thread's assignees, not the user ID.","security":[{"oauth2":["inbox:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"assignee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"venue_id":{"type":["string","null"]},"subject":{"type":["string","null"]},"channel":{"type":"string","enum":["email","sms","whatsapp"]},"status":{"type":"string","enum":["open","closed"]},"read":{"type":"boolean"},"context":{"anyOf":[{"type":"object","properties":{"type":{"type":"string"},"id":{"type":["string","null"]}},"required":["type","id"],"additionalProperties":false},{"type":"null"}],"description":"What the conversation is about: booking, booking-enquiry, review, form, loyalty, voucher, gifting, email-campaign or wifi."},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"guest_id":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["id","guest_id","name","email","phone"],"additionalProperties":false},"description":"Who replies go to: every contact gets each message."},"assignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"string"},"role":{"type":"string","enum":["owner","subscriber"]},"name":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["id","user_id","role","name","email"],"additionalProperties":false}},"tags":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":["string","null"]}},"required":["name","value"],"additionalProperties":false}},"last_activity_at":{"type":["string","null"]},"last_guest_message_at":{"type":["string","null"]},"last_reply_at":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["id","venue_id","subject","channel","status","read","context","contacts","assignees","tags","last_activity_at","last_guest_message_at","last_reply_at","created_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/inbox/threads/{thread_id}/tags":{"post":{"operationId":"inbox.threads.tag","tags":["Inbox"],"summary":"Tag a conversation","description":"A name, and a value if wanted. Up to 25 tags a thread. Tags are removed in Stampede.","security":[{"oauth2":["inbox:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"value":{"type":"string","maxLength":255}},"required":["name"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"venue_id":{"type":["string","null"]},"subject":{"type":["string","null"]},"channel":{"type":"string","enum":["email","sms","whatsapp"]},"status":{"type":"string","enum":["open","closed"]},"read":{"type":"boolean"},"context":{"anyOf":[{"type":"object","properties":{"type":{"type":"string"},"id":{"type":["string","null"]}},"required":["type","id"],"additionalProperties":false},{"type":"null"}],"description":"What the conversation is about: booking, booking-enquiry, review, form, loyalty, voucher, gifting, email-campaign or wifi."},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"guest_id":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["id","guest_id","name","email","phone"],"additionalProperties":false},"description":"Who replies go to: every contact gets each message."},"assignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"string"},"role":{"type":"string","enum":["owner","subscriber"]},"name":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["id","user_id","role","name","email"],"additionalProperties":false}},"tags":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":["string","null"]}},"required":["name","value"],"additionalProperties":false}},"last_activity_at":{"type":["string","null"]},"last_guest_message_at":{"type":["string","null"]},"last_reply_at":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["id","venue_id","subject","channel","status","read","context","contacts","assignees","tags","last_activity_at","last_guest_message_at","last_reply_at","created_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/inbox/threads/{thread_id}/notes":{"post":{"operationId":"inbox.notes.create","tags":["Inbox"],"summary":"Add a staff note to a conversation","description":"Only Stampede users see notes; the guest never does. Marks the thread read.","security":[{"oauth2":["inbox:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":10000}},"required":["text"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["guest_email","guest_sms","guest_whatsapp","guest_reply","form","reply","note","system"],"description":"guest_*: the guest wrote (guest_reply: on the web page linked from an email). form: a form they filled in. reply: sent to the guest. note: a staff note the guest never sees. system: what Stampede did (closed, assigned)."},"at":{"type":"string"},"from":{"anyOf":[{"type":"object","properties":{"name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["name","email","phone"],"additionalProperties":false},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"user_id":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["user_id","name","email"],"additionalProperties":false},{"type":"null"}],"description":"The Stampede user who wrote a reply or note."},"subject":{"type":["string","null"]},"text":{"description":"Plain text where there is one.","type":["string","null"]},"html":{"type":["string","null"]},"auto_reply":{"type":"boolean","description":"An out-of-office or other automatic email."},"answers":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answers":{}},"required":["question","answers"],"additionalProperties":false}},{"type":"null"}],"description":"A form submission."}},"required":["id","kind","at","from","author","subject","text","html","auto_reply","answers"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/inbox/threads/{thread_id}/messages":{"post":{"operationId":"inbox.messages.send","tags":["Inbox"],"summary":"Email a reply to the guest","description":"Emails every contact on the thread from Stampede, under the venue's name; their answer comes back to the thread. It cannot be taken back: show the person the exact words and who it goes to, and send only after they say yes. Email threads only. Needs inbox:send, given by name. Reopens the thread and marks it read.","security":[{"oauth2":["inbox:send"]}],"x-kind":"write","x-mcp":true,"x-support":false,"x-admin-only":true,"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":10000,"description":"Plain text; blank lines make paragraphs."}},"required":["text"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["guest_email","guest_sms","guest_whatsapp","guest_reply","form","reply","note","system"],"description":"guest_*: the guest wrote (guest_reply: on the web page linked from an email). form: a form they filled in. reply: sent to the guest. note: a staff note the guest never sees. system: what Stampede did (closed, assigned)."},"at":{"type":"string"},"from":{"anyOf":[{"type":"object","properties":{"name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["name","email","phone"],"additionalProperties":false},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"user_id":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["user_id","name","email"],"additionalProperties":false},{"type":"null"}],"description":"The Stampede user who wrote a reply or note."},"subject":{"type":["string","null"]},"text":{"description":"Plain text where there is one.","type":["string","null"]},"html":{"type":["string","null"]},"auto_reply":{"type":"boolean","description":"An out-of-office or other automatic email."},"answers":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answers":{}},"required":["question","answers"],"additionalProperties":false}},{"type":"null"}],"description":"A form submission."}},"required":["id","kind","at","from","author","subject","text","html","auto_reply","answers"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/gift-cards/products":{"get":{"operationId":"gift_cards.products.list","tags":["Gift cards"],"summary":"List gift card products","description":"The organisation's gift cards on sale: each has its own purchase page, currency and preset amounts, and is for one venue or the whole organisation.","security":[{"oauth2":["gift_cards:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"venue_id":{"description":"Its venue. Null when it is for the whole organisation.","type":["string","null"]},"currency":{"type":"string","enum":["GBP","EUR","USD"]},"amounts":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"The values the purchase page offers, in minor units. A guest can also type their own."},"created_at":{"type":["string","null"]}},"required":["id","name","description","venue_id","currency","amounts","created_at"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/gift-cards":{"get":{"operationId":"gift_cards.list","tags":["Gift cards"],"summary":"List gift cards","description":"Gift cards sold or issued, newest first (by when they were redeemed with `status=redeemed`, refunded with `status=refunded`). `search` finds a card by its code, or, with guests:read, by part of the holder's name or email. The cards of a product at a venue the caller cannot see are left out, so a page can be short; follow `cursor` to the end. Outstanding value: list `status=active` and add up `value` (the balance left on each), per currency. A card whose refund is pending is not listed with `status=active`.","security":[{"oauth2":["gift_cards:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `cursor` from the previous page.","schema":{"type":"string","minLength":1}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["active","unpaid","redeemed","refunded","deactivated"]}},{"name":"product_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"search","in":"query","required":false,"schema":{"type":"string","minLength":2,"maxLength":100}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string","description":"What is printed on the card and in its email: five groups of five letters and digits. Every gift card operation takes it as well as the id."},"product_id":{"type":"string"},"product_name":{"type":["string","null"]},"venue_id":{"description":"The product's venue. Null when it is for the whole organisation.","type":["string","null"]},"value":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"What the card is worth now. While it is active this is what can be taken off a bill with it: an organisation on Stampede's new gifting service can spend part of a card in Stampede, and then this is the balance left. Once redeemed or refunded it is what the card was first worth. 0 while a refund is pending. In the answer to gift_cards.redeem it is what was taken off the card."},"status":{"type":"string","enum":["active","unpaid","redeemed","refunded","deactivated","refund_pending"],"description":"active: paid for or issued, with value left on it. unpaid: bought online but never paid for. refund_pending: a refund has been asked for and is waiting on Stripe; the card can no longer be used (only on Stampede's new gifting service). redeemed, refunded, deactivated: no longer usable."},"sold_by":{"type":"string","enum":["online","staff"],"description":"online: bought by card on the purchase page. staff: issued by hand."},"guest_id":{"description":"Who holds it, for guests.get.","type":["string","null"]},"guest":{"anyOf":[{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["first_name","last_name","email"],"additionalProperties":false},{"type":"null"}],"description":"Who holds it. Null without guests:read."},"created_at":{"type":"string"},"activated_at":{"description":"When it was paid for or issued.","type":["string","null"]},"redeemed_at":{"type":["string","null"]},"refunded_at":{"type":["string","null"]}},"required":["id","code","product_id","product_name","venue_id","value","status","sold_by","guest_id","guest","created_at","activated_at","redeemed_at","refunded_at"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"gift_cards.issue","tags":["Gift cards"],"summary":"Issue a gift card by hand","description":"Gives a guest a gift card of one product, for an amount you choose, with nothing paid: as staff do in Stampede for a complaint, a prize or a card paid for elsewhere. The guest is emailed the card straight away. Give the guest as typed (`guest`) or a guest Stampede knows (`guest_id`), one or the other; either way they need an email. The guest's marketing consent is left as it is. There is no idempotency key: if a call fails or times out, look for the card with `gift_cards.list` before trying again.","security":[{"oauth2":["gift_cards:write"]}],"x-kind":"write","x-mcp":true,"x-support":false,"x-admin-only":true,"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"product_id":{"type":"string","minLength":1,"maxLength":64,"description":"From gift_cards.products.list."},"amount":{"type":"integer","minimum":1,"maximum":500000,"description":"In minor units, in the product's currency: 2500 is £25."},"guest_id":{"description":"A guest Stampede knows (guests.search), instead of `guest`.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"guest":{"description":"Who it is for, as typed. Or `guest_id`.","type":"object","properties":{"first_name":{"type":"string","minLength":1,"maxLength":100},"last_name":{"type":"string","maxLength":100},"email":{"type":"string","maxLength":255,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["first_name","email"]}},"required":["product_id","amount"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string","description":"What is printed on the card and in its email: five groups of five letters and digits. Every gift card operation takes it as well as the id."},"product_id":{"type":"string"},"product_name":{"type":["string","null"]},"venue_id":{"description":"The product's venue. Null when it is for the whole organisation.","type":["string","null"]},"value":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"What the card is worth now. While it is active this is what can be taken off a bill with it: an organisation on Stampede's new gifting service can spend part of a card in Stampede, and then this is the balance left. Once redeemed or refunded it is what the card was first worth. 0 while a refund is pending. In the answer to gift_cards.redeem it is what was taken off the card."},"status":{"type":"string","enum":["active","unpaid","redeemed","refunded","deactivated","refund_pending"],"description":"active: paid for or issued, with value left on it. unpaid: bought online but never paid for. refund_pending: a refund has been asked for and is waiting on Stripe; the card can no longer be used (only on Stampede's new gifting service). redeemed, refunded, deactivated: no longer usable."},"sold_by":{"type":"string","enum":["online","staff"],"description":"online: bought by card on the purchase page. staff: issued by hand."},"guest_id":{"description":"Who holds it, for guests.get.","type":["string","null"]},"guest":{"anyOf":[{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["first_name","last_name","email"],"additionalProperties":false},{"type":"null"}],"description":"Who holds it. Null without guests:read."},"created_at":{"type":"string"},"activated_at":{"description":"When it was paid for or issued.","type":["string","null"]},"redeemed_at":{"type":["string","null"]},"refunded_at":{"type":["string","null"]}},"required":["id","code","product_id","product_name","venue_id","value","status","sold_by","guest_id","guest","created_at","activated_at","redeemed_at","refunded_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/gift-cards/{gift_card_id}":{"get":{"operationId":"gift_cards.get","tags":["Gift cards"],"summary":"Get a gift card","description":"By its id or the code printed on it. Check a card's `status` and `value` (the balance left on it) before redeeming it.","security":[{"oauth2":["gift_cards:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"gift_card_id","in":"path","required":true,"description":"The card's id, or the code printed on it.","schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string","description":"What is printed on the card and in its email: five groups of five letters and digits. Every gift card operation takes it as well as the id."},"product_id":{"type":"string"},"product_name":{"type":["string","null"]},"venue_id":{"description":"The product's venue. Null when it is for the whole organisation.","type":["string","null"]},"value":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"What the card is worth now. While it is active this is what can be taken off a bill with it: an organisation on Stampede's new gifting service can spend part of a card in Stampede, and then this is the balance left. Once redeemed or refunded it is what the card was first worth. 0 while a refund is pending. In the answer to gift_cards.redeem it is what was taken off the card."},"status":{"type":"string","enum":["active","unpaid","redeemed","refunded","deactivated","refund_pending"],"description":"active: paid for or issued, with value left on it. unpaid: bought online but never paid for. refund_pending: a refund has been asked for and is waiting on Stripe; the card can no longer be used (only on Stampede's new gifting service). redeemed, refunded, deactivated: no longer usable."},"sold_by":{"type":"string","enum":["online","staff"],"description":"online: bought by card on the purchase page. staff: issued by hand."},"guest_id":{"description":"Who holds it, for guests.get.","type":["string","null"]},"guest":{"anyOf":[{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["first_name","last_name","email"],"additionalProperties":false},{"type":"null"}],"description":"Who holds it. Null without guests:read."},"created_at":{"type":"string"},"activated_at":{"description":"When it was paid for or issued.","type":["string","null"]},"redeemed_at":{"type":["string","null"]},"refunded_at":{"type":["string","null"]}},"required":["id","code","product_id","product_name","venue_id","value","status","sold_by","guest_id","guest","created_at","activated_at","redeemed_at","refunded_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/gift-cards/{gift_card_id}/redeem":{"post":{"operationId":"gift_cards.redeem","tags":["Gift cards"],"summary":"Redeem a gift card","description":"Uses the card up: everything left on it is taken off, and it cannot be used again. Take the `value` in this answer off the bill at the till yourself (Stampede does not): it is what was taken off the card, which for a card part spent in Stampede is the balance that was left, not what the card was first worth. Only an active card: one never paid for, already redeemed, refunded, waiting on a refund or deactivated is refused (409). A card of one venue is only redeemed there (409 `GIFT_CARD_NOT_VALID_HERE`); on Stampede's new gifting service, a caller who can act for more than one venue says which is redeeming such a card with `venue_id` (400 without it).","security":[{"oauth2":["gift_cards:write"]}],"x-kind":"write","x-mcp":true,"x-support":false,"x-admin-only":true,"parameters":[{"name":"gift_card_id","in":"path","required":true,"description":"The card's id, or the code printed on it.","schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"venue_id":{"description":"The venue redeeming it: a Stampede venue ID or your own ID for it (a venue mapping). Needed for a card of one venue when you can act for more than one venue, on Stampede's new gifting service.","type":"string","minLength":1,"maxLength":64}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string","description":"What is printed on the card and in its email: five groups of five letters and digits. Every gift card operation takes it as well as the id."},"product_id":{"type":"string"},"product_name":{"type":["string","null"]},"venue_id":{"description":"The product's venue. Null when it is for the whole organisation.","type":["string","null"]},"value":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"What the card is worth now. While it is active this is what can be taken off a bill with it: an organisation on Stampede's new gifting service can spend part of a card in Stampede, and then this is the balance left. Once redeemed or refunded it is what the card was first worth. 0 while a refund is pending. In the answer to gift_cards.redeem it is what was taken off the card."},"status":{"type":"string","enum":["active","unpaid","redeemed","refunded","deactivated","refund_pending"],"description":"active: paid for or issued, with value left on it. unpaid: bought online but never paid for. refund_pending: a refund has been asked for and is waiting on Stripe; the card can no longer be used (only on Stampede's new gifting service). redeemed, refunded, deactivated: no longer usable."},"sold_by":{"type":"string","enum":["online","staff"],"description":"online: bought by card on the purchase page. staff: issued by hand."},"guest_id":{"description":"Who holds it, for guests.get.","type":["string","null"]},"guest":{"anyOf":[{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["first_name","last_name","email"],"additionalProperties":false},{"type":"null"}],"description":"Who holds it. Null without guests:read."},"created_at":{"type":"string"},"activated_at":{"description":"When it was paid for or issued.","type":["string","null"]},"redeemed_at":{"type":["string","null"]},"refunded_at":{"type":["string","null"]}},"required":["id","code","product_id","product_name","venue_id","value","status","sold_by","guest_id","guest","created_at","activated_at","redeemed_at","refunded_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/gift-cards/{gift_card_id}/deactivate":{"post":{"operationId":"gift_cards.deactivate","tags":["Gift cards"],"summary":"Deactivate a gift card","description":"Stops a card being used, without refunding it: for one lost, stolen or given in error. It cannot be undone. A redeemed or refunded card is refused (409). To give the guest their money back, refund it instead.","security":[{"oauth2":["gift_cards:write"]}],"x-kind":"write","x-mcp":true,"x-support":false,"x-admin-only":true,"parameters":[{"name":"gift_card_id","in":"path","required":true,"description":"The card's id, or the code printed on it.","schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string","description":"What is printed on the card and in its email: five groups of five letters and digits. Every gift card operation takes it as well as the id."},"product_id":{"type":"string"},"product_name":{"type":["string","null"]},"venue_id":{"description":"The product's venue. Null when it is for the whole organisation.","type":["string","null"]},"value":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"What the card is worth now. While it is active this is what can be taken off a bill with it: an organisation on Stampede's new gifting service can spend part of a card in Stampede, and then this is the balance left. Once redeemed or refunded it is what the card was first worth. 0 while a refund is pending. In the answer to gift_cards.redeem it is what was taken off the card."},"status":{"type":"string","enum":["active","unpaid","redeemed","refunded","deactivated","refund_pending"],"description":"active: paid for or issued, with value left on it. unpaid: bought online but never paid for. refund_pending: a refund has been asked for and is waiting on Stripe; the card can no longer be used (only on Stampede's new gifting service). redeemed, refunded, deactivated: no longer usable."},"sold_by":{"type":"string","enum":["online","staff"],"description":"online: bought by card on the purchase page. staff: issued by hand."},"guest_id":{"description":"Who holds it, for guests.get.","type":["string","null"]},"guest":{"anyOf":[{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["first_name","last_name","email"],"additionalProperties":false},{"type":"null"}],"description":"Who holds it. Null without guests:read."},"created_at":{"type":"string"},"activated_at":{"description":"When it was paid for or issued.","type":["string","null"]},"redeemed_at":{"type":["string","null"]},"refunded_at":{"type":["string","null"]}},"required":["id","code","product_id","product_name","venue_id","value","status","sold_by","guest_id","guest","created_at","activated_at","redeemed_at","refunded_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/gift-cards/{gift_card_id}/refund":{"post":{"operationId":"gift_cards.refund","tags":["Gift cards"],"summary":"Refund a gift card","description":"Refunds a card bought online, to the card it was paid with (through the venue's Stripe account), and emails the guest: the whole card, or on Stampede's new gifting service the balance left on it. The card can no longer be used. On Stampede's new gifting service Stripe can take a while: the card then comes back `refund_pending`, and reads `refunded` once Stripe has paid it. Only an active card bought online: one issued by hand has nothing to refund (deactivate it instead), and one redeemed, refunded, already waiting on a refund or deactivated is refused (409). It cannot be undone.","security":[{"oauth2":["gift_cards:write"]}],"x-kind":"write","x-mcp":true,"x-support":false,"x-admin-only":true,"parameters":[{"name":"gift_card_id","in":"path","required":true,"description":"The card's id, or the code printed on it.","schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string","description":"What is printed on the card and in its email: five groups of five letters and digits. Every gift card operation takes it as well as the id."},"product_id":{"type":"string"},"product_name":{"type":["string","null"]},"venue_id":{"description":"The product's venue. Null when it is for the whole organisation.","type":["string","null"]},"value":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"What the card is worth now. While it is active this is what can be taken off a bill with it: an organisation on Stampede's new gifting service can spend part of a card in Stampede, and then this is the balance left. Once redeemed or refunded it is what the card was first worth. 0 while a refund is pending. In the answer to gift_cards.redeem it is what was taken off the card."},"status":{"type":"string","enum":["active","unpaid","redeemed","refunded","deactivated","refund_pending"],"description":"active: paid for or issued, with value left on it. unpaid: bought online but never paid for. refund_pending: a refund has been asked for and is waiting on Stripe; the card can no longer be used (only on Stampede's new gifting service). redeemed, refunded, deactivated: no longer usable."},"sold_by":{"type":"string","enum":["online","staff"],"description":"online: bought by card on the purchase page. staff: issued by hand."},"guest_id":{"description":"Who holds it, for guests.get.","type":["string","null"]},"guest":{"anyOf":[{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["first_name","last_name","email"],"additionalProperties":false},{"type":"null"}],"description":"Who holds it. Null without guests:read."},"created_at":{"type":"string"},"activated_at":{"description":"When it was paid for or issued.","type":["string","null"]},"redeemed_at":{"type":["string","null"]},"refunded_at":{"type":["string","null"]}},"required":["id","code","product_id","product_name","venue_id","value","status","sold_by","guest_id","guest","created_at","activated_at","redeemed_at","refunded_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/gift-cards/{gift_card_id}/resend":{"post":{"operationId":"gift_cards.resend","tags":["Gift cards"],"summary":"Email a gift card to its holder again","description":"Sends the gift card email again, to the holder only. Only an active card. It can take a few minutes to arrive.","security":[{"oauth2":["gift_cards:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"gift_card_id","in":"path","required":true,"description":"The card's id, or the code printed on it.","schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string","description":"What is printed on the card and in its email: five groups of five letters and digits. Every gift card operation takes it as well as the id."},"product_id":{"type":"string"},"product_name":{"type":["string","null"]},"venue_id":{"description":"The product's venue. Null when it is for the whole organisation.","type":["string","null"]},"value":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"What the card is worth now. While it is active this is what can be taken off a bill with it: an organisation on Stampede's new gifting service can spend part of a card in Stampede, and then this is the balance left. Once redeemed or refunded it is what the card was first worth. 0 while a refund is pending. In the answer to gift_cards.redeem it is what was taken off the card."},"status":{"type":"string","enum":["active","unpaid","redeemed","refunded","deactivated","refund_pending"],"description":"active: paid for or issued, with value left on it. unpaid: bought online but never paid for. refund_pending: a refund has been asked for and is waiting on Stripe; the card can no longer be used (only on Stampede's new gifting service). redeemed, refunded, deactivated: no longer usable."},"sold_by":{"type":"string","enum":["online","staff"],"description":"online: bought by card on the purchase page. staff: issued by hand."},"guest_id":{"description":"Who holds it, for guests.get.","type":["string","null"]},"guest":{"anyOf":[{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["first_name","last_name","email"],"additionalProperties":false},{"type":"null"}],"description":"Who holds it. Null without guests:read."},"created_at":{"type":"string"},"activated_at":{"description":"When it was paid for or issued.","type":["string","null"]},"redeemed_at":{"type":["string","null"]},"refunded_at":{"type":["string","null"]}},"required":["id","code","product_id","product_name","venue_id","value","status","sold_by","guest_id","guest","created_at","activated_at","redeemed_at","refunded_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/voice/calls":{"get":{"operationId":"voice.calls.list","tags":["Voice AI"],"summary":"List the AI phone's calls","description":"Calls to and from the venues' AI phone numbers, newest first, paged. Give `venue_id` for one venue; without it, every venue's calls, which needs access to every venue. `guest_phone` needs `guests:read`. The transcript is on `voice.calls.get`.","security":[{"oauth2":["voice:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"query","required":false,"description":"One venue's calls.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"from","in":"query","required":false,"description":"Calls started at or after this ISO 8601 instant.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"to","in":"query","required":false,"description":"Calls started before this ISO 8601 instant.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"status","in":"query","required":false,"description":"One or more of ringing, answered, completed, failed, comma-separated.","schema":{"type":"string"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","enum":["inbound","outbound"]}},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `cursor` from the previous page.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"venue_id":{"description":"The venue the number belongs to. Null for an organisation-wide number.","type":["string","null"]},"number":{"description":"The venue's AI phone number that was rung, or that rang out.","type":["string","null"]},"direction":{"type":"string","enum":["inbound","outbound"]},"status":{"type":"string","enum":["ringing","answered","completed","failed"],"description":"`failed`: never connected."},"answered_by":{"anyOf":[{"type":"string","enum":["ai","venue"]},{"type":"null"}],"description":"Who picked up an inbound call: the AI, or the venue's own phone (venue first). Null if nobody did."},"guest_phone":{"description":"The guest's number: who rang (inbound) or who was rung (outbound). Needs `guests:read`; null without it, or when withheld.","type":["string","null"]},"enquiry_id":{"description":"The enquiry the call was made from or logged against.","type":["string","null"]},"placed_by":{"anyOf":[{"type":"object","properties":{"user_id":{"type":"string"},"name":{"type":["string","null"]}},"required":["user_id","name"],"additionalProperties":false},{"type":"null"}],"description":"The member of staff who placed an outbound call."},"started_at":{"type":"string"},"answered_at":{"type":["string","null"]},"ended_at":{"type":["string","null"]},"duration_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"From answer to hang-up. Null until it ends."},"has_transcript":{"description":"Whether `voice.calls.get` has a transcript for it. Null where unknown.","type":["boolean","null"]}},"required":["id","venue_id","number","direction","status","answered_by","guest_phone","enquiry_id","placed_by","started_at","answered_at","ended_at","duration_seconds","has_transcript"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/voice/calls/{call_id}":{"get":{"operationId":"voice.calls.get","tags":["Voice AI"],"summary":"Get a call with its transcript","description":"One call, with what happened on it and, with `guests:read`, its transcript turn by turn and the guest's number. A call at a venue you cannot see is not found.","security":[{"oauth2":["voice:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"venue_id":{"description":"The venue the number belongs to. Null for an organisation-wide number.","type":["string","null"]},"number":{"description":"The venue's AI phone number that was rung, or that rang out.","type":["string","null"]},"direction":{"type":"string","enum":["inbound","outbound"]},"status":{"type":"string","enum":["ringing","answered","completed","failed"],"description":"`failed`: never connected."},"answered_by":{"anyOf":[{"type":"string","enum":["ai","venue"]},{"type":"null"}],"description":"Who picked up an inbound call: the AI, or the venue's own phone (venue first). Null if nobody did."},"guest_phone":{"description":"The guest's number: who rang (inbound) or who was rung (outbound). Needs `guests:read`; null without it, or when withheld.","type":["string","null"]},"enquiry_id":{"description":"The enquiry the call was made from or logged against.","type":["string","null"]},"placed_by":{"anyOf":[{"type":"object","properties":{"user_id":{"type":"string"},"name":{"type":["string","null"]}},"required":["user_id","name"],"additionalProperties":false},{"type":"null"}],"description":"The member of staff who placed an outbound call."},"started_at":{"type":"string"},"answered_at":{"type":["string","null"]},"ended_at":{"type":["string","null"]},"duration_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"From answer to hang-up. Null until it ends."},"has_transcript":{"description":"Whether `voice.calls.get` has a transcript for it. Null where unknown.","type":["boolean","null"]},"transcript":{"anyOf":[{"type":"object","properties":{"turns":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["agent","guest","staff"],"description":"`agent`: the AI. `guest`: the caller. `staff`: a member of staff on an outbound call."},"text":{"type":"string","description":"What was said. Empty on a turn where the AI only acted (its `tools`) without speaking."},"tools":{"type":"array","items":{"type":"object","properties":{"tool":{"type":"string","description":"The tool, e.g. `get_available_times`, `create_booking`, `create_payment_request` (the card-details link), `create_enquiry`, `text_guest`, `end_call`."},"status":{"type":"string","enum":["called","returned","failed"],"description":"`called`: the AI asked for it. `returned`: it answered. `failed`: it answered with an error, so it did not happen."}},"required":["tool","status"],"additionalProperties":false},"description":"What the AI did at that point, in order: each tool it called, and what came back. A booking was made where `create_booking` returned; a `failed` one was refused."},"at_seconds":{"description":"Seconds from the start of the call, when known.","type":["number","null"]}},"required":["role","text","tools","at_seconds"],"additionalProperties":false}},"duration_seconds":{"type":["number","null"]}},"required":["turns","duration_seconds"],"additionalProperties":false},{"type":"null"}],"description":"What was said, turn by turn. Needs `guests:read`; null without it, or when there is none (still in progress, or the venue answered)."},"events":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"at":{"type":"string"}},"required":["type","at"],"additionalProperties":false},"description":"The call as it happened: ringing, answered, bridged, transcript, ended and so on."}},"required":["id","venue_id","number","direction","status","answered_by","guest_phone","enquiry_id","placed_by","started_at","answered_at","ended_at","duration_seconds","has_transcript","transcript","events"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/voice/stats":{"get":{"operationId":"voice.stats","tags":["Voice AI"],"summary":"A venue's AI phone figures","description":"How many calls the AI phone took, who answered them, how many the AI made a booking on, and the talk time, for the days asked and all time. Days run on the venue's clock.","security":[{"oauth2":["voice:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"from","in":"query","required":false,"description":"The first day, YYYY-MM-DD.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"description":"The last day, YYYY-MM-DD.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"from":{"type":["string","null"]},"to":{"type":["string","null"]},"range":{"type":"object","properties":{"calls":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"answered_by_ai":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"answered_by_venue":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"with_booking":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls in which the AI made a booking."},"talk_time_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["calls","answered_by_ai","answered_by_venue","with_booking","talk_time_seconds"],"additionalProperties":false,"description":"The days asked for."},"all_time":{"type":"object","properties":{"calls":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"answered_by_ai":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"answered_by_venue":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"with_booking":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls in which the AI made a booking."},"talk_time_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["calls","answered_by_ai","answered_by_venue","with_booking","talk_time_seconds"],"additionalProperties":false},"first_call_at":{"type":["string","null"]}},"required":["from","to","range","all_time","first_call_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/voice/numbers":{"get":{"operationId":"voice.numbers.list","tags":["Voice AI"],"summary":"List AI phone numbers and how they answer","description":"The AI phone numbers at the venues you can see, with each one's settings: how it answers, its voice, greeting and languages. A venue can have a test-only number too (`test_only`). Give `venue_id` for one venue.","security":[{"oauth2":["voice:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"venue_id":{"description":"Null for an organisation-wide number.","type":["string","null"]},"venue_name":{"description":"The name the AI says.","type":["string","null"]},"status":{"type":"string","enum":["pending","provisioning","active","released"]},"test_only":{"type":"boolean","description":"A number only for test calls from Stampede, which guests cannot ring."},"settings":{"type":"object","properties":{"call_mode":{"type":"string","enum":["ai_first","venue_first"],"description":"`ai_first`: the AI answers straight away. `venue_first`: the venue's own phone rings first, and the AI takes the call if nobody answers."},"venue_phone":{"description":"The venue's own phone, rung first in `venue_first`. A UK number.","type":["string","null"]},"ring_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long the venue's phone rings before the AI answers, 5 to 60."},"venue_hours_start":{"description":"With `venue_hours_end`, when `venue_first` applies (HH:MM, venue time); outside it the AI answers straight away. Both null: all day.","type":["string","null"]},"venue_hours_end":{"type":["string","null"]},"switchboard_numbers":{"type":"array","items":{"type":"string"},"description":"Lines that reach this number through the venue's switchboard, so their caller ID is the switchboard's and not the guest's: the AI asks those callers for their number."},"voice_id":{"description":"The voice, from `voice.voices.list`. Null: the default.","type":["string","null"]},"greeting":{"description":"What the AI says first. Null: the default.","type":["string","null"]},"personality":{"description":"How the AI should sound: house style, tone. Null: the default.","type":["string","null"]},"venue_context":{"description":"Facts the AI should know about the venue: parking, dogs, the private room, where the entrance is.","type":["string","null"]},"language_default":{"description":"The language it opens in, e.g. `en`.","type":["string","null"]},"languages_extra":{"type":"array","items":{"type":"string"},"description":"Other languages it may switch to."}},"required":["call_mode","venue_phone","ring_seconds","venue_hours_start","venue_hours_end","switchboard_numbers","voice_id","greeting","personality","venue_context","language_default","languages_extra"],"additionalProperties":false},"created_at":{"type":"string"}},"required":["id","number","venue_id","venue_name","status","test_only","settings","created_at"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/voice/numbers/{number_id}":{"patch":{"operationId":"voice.numbers.update","tags":["Voice AI"],"summary":"Change how an AI phone number answers","description":"Changes only the settings sent. Venue first or AI first, the venue's own phone (a UK number) and how long it rings, the hours venue first applies, switchboard lines, the voice (from `voice.voices.list`), greeting, personality, what the AI knows about the venue, and its languages. Takes effect on the next call. Admins and the owner only. Buying or releasing numbers, outbound calls and recording are changed in Stampede.","security":[{"oauth2":["voice:write"]}],"x-kind":"write","x-mcp":true,"x-support":false,"x-admin-only":true,"parameters":[{"name":"number_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"call_mode":{"type":"string","enum":["ai_first","venue_first"]},"venue_phone":{"anyOf":[{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"},{"type":"null"}]},"ring_seconds":{"type":"integer","minimum":5,"maximum":60},"venue_hours_start":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},{"type":"null"}]},"venue_hours_end":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},{"type":"null"}]},"switchboard_numbers":{"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"}},"voice_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"greeting":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]},"personality":{"anyOf":[{"type":"string","minLength":1,"maxLength":2000},{"type":"null"}]},"venue_context":{"anyOf":[{"type":"string","minLength":1,"maxLength":4000},{"type":"null"}]},"language_default":{"anyOf":[{"type":"string","pattern":"^[a-z]{2}$"},{"type":"null"}]},"languages_extra":{"maxItems":10,"type":"array","items":{"type":"string","pattern":"^[a-z]{2}$"}}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"venue_id":{"description":"Null for an organisation-wide number.","type":["string","null"]},"venue_name":{"description":"The name the AI says.","type":["string","null"]},"status":{"type":"string","enum":["pending","provisioning","active","released"]},"test_only":{"type":"boolean","description":"A number only for test calls from Stampede, which guests cannot ring."},"settings":{"type":"object","properties":{"call_mode":{"type":"string","enum":["ai_first","venue_first"],"description":"`ai_first`: the AI answers straight away. `venue_first`: the venue's own phone rings first, and the AI takes the call if nobody answers."},"venue_phone":{"description":"The venue's own phone, rung first in `venue_first`. A UK number.","type":["string","null"]},"ring_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long the venue's phone rings before the AI answers, 5 to 60."},"venue_hours_start":{"description":"With `venue_hours_end`, when `venue_first` applies (HH:MM, venue time); outside it the AI answers straight away. Both null: all day.","type":["string","null"]},"venue_hours_end":{"type":["string","null"]},"switchboard_numbers":{"type":"array","items":{"type":"string"},"description":"Lines that reach this number through the venue's switchboard, so their caller ID is the switchboard's and not the guest's: the AI asks those callers for their number."},"voice_id":{"description":"The voice, from `voice.voices.list`. Null: the default.","type":["string","null"]},"greeting":{"description":"What the AI says first. Null: the default.","type":["string","null"]},"personality":{"description":"How the AI should sound: house style, tone. Null: the default.","type":["string","null"]},"venue_context":{"description":"Facts the AI should know about the venue: parking, dogs, the private room, where the entrance is.","type":["string","null"]},"language_default":{"description":"The language it opens in, e.g. `en`.","type":["string","null"]},"languages_extra":{"type":"array","items":{"type":"string"},"description":"Other languages it may switch to."}},"required":["call_mode","venue_phone","ring_seconds","venue_hours_start","venue_hours_end","switchboard_numbers","voice_id","greeting","personality","venue_context","language_default","languages_extra"],"additionalProperties":false},"created_at":{"type":"string"}},"required":["id","number","venue_id","venue_name","status","test_only","settings","created_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/voice/voices":{"get":{"operationId":"voice.voices.list","tags":["Voice AI"],"summary":"List the voices the AI can speak in","description":"The voices an AI phone number can use, UK accents first, each with a short preview clip. Only voices that work on a live call are offered. Set one with `voice.numbers.update` (`voice_id`).","security":[{"oauth2":["voice:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"labels":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"e.g. accent, gender, age."},"preview_url":{"type":["string","null"]}},"required":["id","name","labels","preview_url"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/email-templates":{"get":{"operationId":"email_templates.list","tags":["Email templates"],"summary":"List email templates","description":"The organisation's own templates, most recently changed first, then those a parent organisation shares with it (shared_from_parent). Every kind is listed; only kind construct can be changed here. A page can hold fewer than `limit`.","security":[{"oauth2":["marketing:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `cursor` from the previous page.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["construct","builder","html","quick","other"],"description":"How the template was made. construct: Stampede's email builder, the only kind that can be written here. builder: the classic drag-and-drop editor. html: pasted HTML. quick: a quick email."},"editable":{"type":"boolean","description":"Can be changed with email_templates.update: made in the email builder (kind construct) and this organisation's own."},"shared_from_parent":{"type":"boolean","description":"Shared by a parent organisation. It can be read, previewed and copied, never changed or deleted here."},"shared_with_sub_organisations":{"type":"boolean","description":"This organisation's own template, shared with its sub-organisations."},"preview_image_url":{"description":"A desktop thumbnail Stampede made when the template was last saved. Null until made.","type":["string","null"]},"preview_image_mobile_url":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","kind","editable","shared_from_parent","shared_with_sub_organisations","preview_image_url","preview_image_mobile_url","created_at","updated_at"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"email_templates.create","tags":["Email templates"],"summary":"Create an email template","description":"Makes a template in Stampede's email builder from a design, rendered and stored as the builder stores it, so it opens in the builder in Stampede. Check the design with email_templates.preview first. A design the builder cannot render is refused with 422 INVALID_DESIGN, naming where the problem is. The answer carries the review's warnings.","security":[{"oauth2":["marketing:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"description":"Also the subject of a test send."},"design":{"type":"object","properties":{"doc":{"minItems":1,"maxItems":60,"type":"array","items":{"type":"object","properties":{"id":{"description":"Filled in when missing.","type":"string","maxLength":64},"columns":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"object","properties":{"id":{"description":"Filled in when missing.","type":"string","maxLength":64},"blocks":{"maxItems":40,"type":"array","items":{"type":"object","properties":{"id":{"description":"Unique in the design. Filled in when missing.","type":"string","maxLength":64},"type":{"type":"string","enum":["heading","text","button","image","divider","spacer","social"]},"props":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"heading { text, level 1|2|3, align, color }, text { text (HTML: p, a, strong, em, ul, ol, li, br), align, color }, button { text, href, align, color (its background), textColor }, image { src, alt, href, naturalAspect (true keeps its shape; otherwise cropped to height, 240 by default), fullWidth (default true), width }, divider { color, thickness }, spacer { height }, social { items [{ platform, url }], align, size, style brand|mono }. Any block: padding { top, right, bottom, left }, hideOn mobile|desktop. align is left, center or right; colours #rrggbb."}},"required":["type","props"],"additionalProperties":{}}},"props":{"description":"background, padding, borderColor, borderWidth, borderStyle, borderRadius.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["blocks"],"additionalProperties":{}}},"props":{"description":"background, padding, columnWidths (percentages summing to 100), columnGap, stackOnMobile, reverseOnMobile, verticalAlign, hideOn.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["columns"],"additionalProperties":{}},"description":"Rows from top to bottom. Each row has one to four columns side by side; each column a stack of blocks."},"settings":{"description":"Overrides on the brand for this email: pageBackground, emailBackground, linkColor, bodyFontFamily, headingFontFamily, emailRadius, emailPadding.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"brand_id":{"description":"One of the organisation's brand kits, whose colours and fonts fill in what the design leaves unset. Left out or null: the default brand kit.","anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]}},"required":["doc"]}},"required":["name","design"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["construct","builder","html","quick","other"],"description":"How the template was made. construct: Stampede's email builder, the only kind that can be written here. builder: the classic drag-and-drop editor. html: pasted HTML. quick: a quick email."},"editable":{"type":"boolean","description":"Can be changed with email_templates.update: made in the email builder (kind construct) and this organisation's own."},"shared_from_parent":{"type":"boolean","description":"Shared by a parent organisation. It can be read, previewed and copied, never changed or deleted here."},"shared_with_sub_organisations":{"type":"boolean","description":"This organisation's own template, shared with its sub-organisations."},"preview_image_url":{"description":"A desktop thumbnail Stampede made when the template was last saved. Null until made.","type":["string","null"]},"preview_image_mobile_url":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"design":{"anyOf":[{"type":"object","properties":{"doc":{"type":"array","items":{}},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"brand_id":{"type":["string","null"]}},"required":["doc","settings","brand_id"],"additionalProperties":false},{"type":"null"}],"description":"The design, for kind construct: rows of columns of blocks, its settings and the brand it is drawn in. Null for other kinds."},"html":{"description":"The stored HTML, for kinds other than construct. A construct template's HTML comes from its design: email_templates.preview with template_id gives it.","type":["string","null"]},"footer":{"type":"string","enum":["design","stampede"],"description":"design: the HTML has both #stampede_campaign_url# and #stampede_unsubscribe_url# links, so Stampede adds no footer when it sends. stampede: Stampede adds its own footer (view in browser and unsubscribe) at the bottom when it sends."},"warnings":{"type":"array","items":{"type":"object","properties":{"level":{"type":"string","enum":["fix","improve","note"],"description":"fix: will look broken or lose clicks. improve: hurts delivery, accessibility or engagement. note: renders a little differently in some email apps."},"code":{"type":"string"},"title":{"type":"string"},"message":{"type":"string"},"block_id":{"type":["string","null"]}},"required":["level","code","title","message","block_id"],"additionalProperties":false}}},"required":["id","name","kind","editable","shared_from_parent","shared_with_sub_organisations","preview_image_url","preview_image_mobile_url","created_at","updated_at","design","html","footer","warnings"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/email-templates/{template_id}":{"get":{"operationId":"email_templates.get","tags":["Email templates"],"summary":"Get an email template","description":"For kind construct, with its design (rows, settings and brand_id), which email_templates.create and email_templates.update take back. For other kinds, with the stored HTML.","security":[{"oauth2":["marketing:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["construct","builder","html","quick","other"],"description":"How the template was made. construct: Stampede's email builder, the only kind that can be written here. builder: the classic drag-and-drop editor. html: pasted HTML. quick: a quick email."},"editable":{"type":"boolean","description":"Can be changed with email_templates.update: made in the email builder (kind construct) and this organisation's own."},"shared_from_parent":{"type":"boolean","description":"Shared by a parent organisation. It can be read, previewed and copied, never changed or deleted here."},"shared_with_sub_organisations":{"type":"boolean","description":"This organisation's own template, shared with its sub-organisations."},"preview_image_url":{"description":"A desktop thumbnail Stampede made when the template was last saved. Null until made.","type":["string","null"]},"preview_image_mobile_url":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"design":{"anyOf":[{"type":"object","properties":{"doc":{"type":"array","items":{}},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"brand_id":{"type":["string","null"]}},"required":["doc","settings","brand_id"],"additionalProperties":false},{"type":"null"}],"description":"The design, for kind construct: rows of columns of blocks, its settings and the brand it is drawn in. Null for other kinds."},"html":{"description":"The stored HTML, for kinds other than construct. A construct template's HTML comes from its design: email_templates.preview with template_id gives it.","type":["string","null"]}},"required":["id","name","kind","editable","shared_from_parent","shared_with_sub_organisations","preview_image_url","preview_image_mobile_url","created_at","updated_at","design","html"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"email_templates.update","tags":["Email templates"],"summary":"Change an email template","description":"Only kind construct, the organisation's own (409 otherwise). Send the name, the design or both. A design replaces the whole doc; its settings replace the saved ones when given, and are kept when left out; brand_id changes the brand when given, null goes back to the default, and left out keeps the saved one. The template is rendered again and saved as the builder saves it.","security":[{"oauth2":["marketing:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"design":{"type":"object","properties":{"doc":{"minItems":1,"maxItems":60,"type":"array","items":{"type":"object","properties":{"id":{"description":"Filled in when missing.","type":"string","maxLength":64},"columns":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"object","properties":{"id":{"description":"Filled in when missing.","type":"string","maxLength":64},"blocks":{"maxItems":40,"type":"array","items":{"type":"object","properties":{"id":{"description":"Unique in the design. Filled in when missing.","type":"string","maxLength":64},"type":{"type":"string","enum":["heading","text","button","image","divider","spacer","social"]},"props":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"heading { text, level 1|2|3, align, color }, text { text (HTML: p, a, strong, em, ul, ol, li, br), align, color }, button { text, href, align, color (its background), textColor }, image { src, alt, href, naturalAspect (true keeps its shape; otherwise cropped to height, 240 by default), fullWidth (default true), width }, divider { color, thickness }, spacer { height }, social { items [{ platform, url }], align, size, style brand|mono }. Any block: padding { top, right, bottom, left }, hideOn mobile|desktop. align is left, center or right; colours #rrggbb."}},"required":["type","props"],"additionalProperties":{}}},"props":{"description":"background, padding, borderColor, borderWidth, borderStyle, borderRadius.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["blocks"],"additionalProperties":{}}},"props":{"description":"background, padding, columnWidths (percentages summing to 100), columnGap, stackOnMobile, reverseOnMobile, verticalAlign, hideOn.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["columns"],"additionalProperties":{}},"description":"Rows from top to bottom. Each row has one to four columns side by side; each column a stack of blocks."},"settings":{"description":"Overrides on the brand for this email: pageBackground, emailBackground, linkColor, bodyFontFamily, headingFontFamily, emailRadius, emailPadding.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"brand_id":{"description":"One of the organisation's brand kits, whose colours and fonts fill in what the design leaves unset. Left out or null: the default brand kit.","anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]}},"required":["doc"]}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["construct","builder","html","quick","other"],"description":"How the template was made. construct: Stampede's email builder, the only kind that can be written here. builder: the classic drag-and-drop editor. html: pasted HTML. quick: a quick email."},"editable":{"type":"boolean","description":"Can be changed with email_templates.update: made in the email builder (kind construct) and this organisation's own."},"shared_from_parent":{"type":"boolean","description":"Shared by a parent organisation. It can be read, previewed and copied, never changed or deleted here."},"shared_with_sub_organisations":{"type":"boolean","description":"This organisation's own template, shared with its sub-organisations."},"preview_image_url":{"description":"A desktop thumbnail Stampede made when the template was last saved. Null until made.","type":["string","null"]},"preview_image_mobile_url":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"design":{"anyOf":[{"type":"object","properties":{"doc":{"type":"array","items":{}},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"brand_id":{"type":["string","null"]}},"required":["doc","settings","brand_id"],"additionalProperties":false},{"type":"null"}],"description":"The design, for kind construct: rows of columns of blocks, its settings and the brand it is drawn in. Null for other kinds."},"html":{"description":"The stored HTML, for kinds other than construct. A construct template's HTML comes from its design: email_templates.preview with template_id gives it.","type":["string","null"]},"footer":{"type":"string","enum":["design","stampede"],"description":"design: the HTML has both #stampede_campaign_url# and #stampede_unsubscribe_url# links, so Stampede adds no footer when it sends. stampede: Stampede adds its own footer (view in browser and unsubscribe) at the bottom when it sends."},"warnings":{"type":"array","items":{"type":"object","properties":{"level":{"type":"string","enum":["fix","improve","note"],"description":"fix: will look broken or lose clicks. improve: hurts delivery, accessibility or engagement. note: renders a little differently in some email apps."},"code":{"type":"string"},"title":{"type":"string"},"message":{"type":"string"},"block_id":{"type":["string","null"]}},"required":["level","code","title","message","block_id"],"additionalProperties":false}}},"required":["id","name","kind","editable","shared_from_parent","shared_with_sub_organisations","preview_image_url","preview_image_mobile_url","created_at","updated_at","design","html","footer","warnings"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"email_templates.delete","tags":["Email templates"],"summary":"Delete an email template","description":"Any kind, the organisation's own only. Campaigns already made from it keep their own copy of the email.","security":[{"oauth2":["marketing:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/email-templates/preview":{"post":{"operationId":"email_templates.preview","tags":["Email templates"],"summary":"Preview an email","description":"Renders a design, or a saved template, without saving anything: the HTML and plain text as they would be stored, the size, the email builder's review (warnings, worst first) and pictures of the whole email on a desktop and a phone. Pictures are null when they could not be made, and a warning says why. Send design, or template_id, not both. subject and preheader are only for checking: a template stores neither.","security":[{"oauth2":["marketing:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"design":{"type":"object","properties":{"doc":{"minItems":1,"maxItems":60,"type":"array","items":{"type":"object","properties":{"id":{"description":"Filled in when missing.","type":"string","maxLength":64},"columns":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"object","properties":{"id":{"description":"Filled in when missing.","type":"string","maxLength":64},"blocks":{"maxItems":40,"type":"array","items":{"type":"object","properties":{"id":{"description":"Unique in the design. Filled in when missing.","type":"string","maxLength":64},"type":{"type":"string","enum":["heading","text","button","image","divider","spacer","social"]},"props":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"heading { text, level 1|2|3, align, color }, text { text (HTML: p, a, strong, em, ul, ol, li, br), align, color }, button { text, href, align, color (its background), textColor }, image { src, alt, href, naturalAspect (true keeps its shape; otherwise cropped to height, 240 by default), fullWidth (default true), width }, divider { color, thickness }, spacer { height }, social { items [{ platform, url }], align, size, style brand|mono }. Any block: padding { top, right, bottom, left }, hideOn mobile|desktop. align is left, center or right; colours #rrggbb."}},"required":["type","props"],"additionalProperties":{}}},"props":{"description":"background, padding, borderColor, borderWidth, borderStyle, borderRadius.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["blocks"],"additionalProperties":{}}},"props":{"description":"background, padding, columnWidths (percentages summing to 100), columnGap, stackOnMobile, reverseOnMobile, verticalAlign, hideOn.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["columns"],"additionalProperties":{}},"description":"Rows from top to bottom. Each row has one to four columns side by side; each column a stack of blocks."},"settings":{"description":"Overrides on the brand for this email: pageBackground, emailBackground, linkColor, bodyFontFamily, headingFontFamily, emailRadius, emailPadding.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"brand_id":{"description":"One of the organisation's brand kits, whose colours and fonts fill in what the design leaves unset. Left out or null: the default brand kit.","anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]}},"required":["doc"]},"template_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"description":"Written into the HTML's title, as the template's name is. Defaults to the template's name, or 'Preview'.","type":"string","minLength":1,"maxLength":255},"subject":{"description":"Checked when given.","anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"preheader":{"description":"The preview text inboxes show after the subject. Checked and shown when given.","anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"images":{"default":true,"description":"false skips the pictures.","type":"boolean"},"mark_warnings":{"default":false,"description":"true adds marked: the email with each block a warning names labelled and outlined, for a person to see where the problems are.","type":"boolean"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"html":{"type":"string","description":"As it is stored and sent, merge tags and footer links still in place."},"text":{"description":"The plain-text part sent with it. Null for a saved template not made in the email builder.","type":["string","null"]},"size_bytes":{"type":"number","description":"Gmail hides everything after about 102KB behind 'View entire message'."},"html_hash":{"type":"string"},"footer":{"type":"string","enum":["design","stampede"],"description":"design: the HTML has both #stampede_campaign_url# and #stampede_unsubscribe_url# links, so Stampede adds no footer when it sends. stampede: Stampede adds its own footer (view in browser and unsubscribe) at the bottom when it sends."},"warnings":{"type":"array","items":{"type":"object","properties":{"level":{"type":"string","enum":["fix","improve","note"],"description":"fix: will look broken or lose clicks. improve: hurts delivery, accessibility or engagement. note: renders a little differently in some email apps."},"code":{"type":"string"},"title":{"type":"string"},"message":{"type":"string"},"block_id":{"type":["string","null"]}},"required":["level","code","title","message","block_id"],"additionalProperties":false},"description":"Worst first."},"marked":{"anyOf":[{"type":"object","properties":{"html":{"type":"string"},"warnings":{"type":"array","items":{"type":"number"},"description":"Which warnings are labelled: warnings[k] is the place in warnings of the label numbered k + 1."}},"required":["html","warnings"],"additionalProperties":false},{"type":"null"}],"description":"With mark_warnings: the email again, with each block a warning names labelled with its number and outlined, for a person to see where the problems are. Never store or send it. Null without mark_warnings, for a template not made in the email builder, or when no warning names a block."},"images":{"type":"object","properties":{"desktop":{"anyOf":[{"type":"object","properties":{"device":{"type":"string","enum":["desktop","mobile"]},"mime_type":{"type":"string","const":"image/png"},"data":{"type":"string","description":"The PNG, base64."},"width":{"type":"number"},"height":{"type":"number"}},"required":["device","mime_type","data","width","height"],"additionalProperties":false},{"type":"null"}]},"mobile":{"anyOf":[{"type":"object","properties":{"device":{"type":"string","enum":["desktop","mobile"]},"mime_type":{"type":"string","const":"image/png"},"data":{"type":"string","description":"The PNG, base64."},"width":{"type":"number"},"height":{"type":"number"}},"required":["device","mime_type","data","width","height"],"additionalProperties":false},{"type":"null"}]}},"required":["desktop","mobile"],"additionalProperties":false,"description":"The whole email (up to 8000px tall) in a desktop (1024px wide) and a phone (430px wide) inbox, with its images loaded where they arrive within a few seconds. Null when no picture could be made: a warning says why."}},"required":["html","text","size_bytes","html_hash","footer","warnings","marked","images"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/email-templates/{template_id}/send-preview":{"post":{"operationId":"email_templates.send_preview","tags":["Email templates"],"summary":"Send a test of an email template","description":"Emails the saved template to one address, from one of the organisation's verified sender addresses (email_senders.list), with ' [preview]' after its name as the subject. Merge tags are left blank. It can take a few minutes to arrive. The organisation's own templates only.","security":[{"oauth2":["marketing:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sender_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"From email_senders.list."},"to_email":{"type":"string","maxLength":255,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"to_name":{"type":"string","maxLength":255}},"required":["sender_id","to_email"]}}}},"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"template_id":{"type":"string"},"to_email":{"type":"string"},"from_email":{"type":"string"},"queued":{"type":"boolean","const":true}},"required":["template_id","to_email","from_email","queued"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/email-starters":{"get":{"operationId":"email_starters.list","tags":["Email templates"],"summary":"List starting points for an email","description":"What Stampede's email builder offers to start from. starters: hand-made emails (email_starters.get gives the design, in their own colours and fonts). purposes: what email_starters.generate draws, in the organisation's brand, each with the three layouts that suit it.","security":[{"oauth2":["marketing:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"starters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"thumbnail_url":{"type":["string","null"]}},"required":["id","name","description","thumbnail_url"],"additionalProperties":false}},"purposes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"layouts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"recommended":{"type":"boolean","description":"The layout Stampede recommends for this purpose."},"takes_copy":{"type":"boolean","description":"Takes your own words (copy in email_starters.generate). The others are drawn with sample words to replace."}},"required":["id","label","description","recommended","takes_copy"],"additionalProperties":false},"description":"The three layouts that suit it, the recommended one first."}},"required":["id","label","description","layouts"],"additionalProperties":false}}},"required":["starters","purposes"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/email-starters/{starter_id}":{"get":{"operationId":"email_starters.get","tags":["Email templates"],"summary":"Get a starter email","description":"A hand-made starter's whole design, in its own colours, fonts and stock photos, with sample words for a made-up venue. To use one, change the words, photos and colours to the venue's, then preview it and create a template from it. Also worth reading as examples of what a good design is made of.","security":[{"oauth2":["marketing:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"starter_id","in":"path","required":true,"description":"From email_starters.list.","schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"thumbnail_url":{"type":["string","null"]},"design":{"type":"object","properties":{"doc":{"type":"array","items":{}},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"brand_id":{"type":["string","null"]}},"required":["doc","settings","brand_id"],"additionalProperties":false,"description":"Pass to email_templates.preview and email_templates.create as design, as it is or changed."}},"required":["id","name","description","thumbnail_url","design"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/email-starters/generate":{"post":{"operationId":"email_starters.generate","tags":["Email templates"],"summary":"Draw an email from a purpose and a layout","description":"Draws a design as Template Studio in Stampede does: a layout made for the purpose, in the organisation's brand (colours, fonts, logo), with its name, and the venue's own words when copy is given (layouts with takes_copy only; the others carry sample words to replace). Saves nothing: pass the design to email_templates.create, after previewing it (preview here, or email_templates.preview).","security":[{"oauth2":["marketing:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"purpose":{"type":"string","enum":["bookings","reviews","loyalty","gift-cards","offer","event","newsletter","win-back"]},"layout":{"description":"One of the purpose's layouts (email_starters.list). Left out: the recommended one, or with copy, the first that takes copy.","type":"string","enum":["invitation","poster","bento","letter","ticket","magazine","card","numbered"]},"copy":{"type":"object","properties":{"eyebrow":{"description":"A few words above the headline, e.g. WINTER MENU.","type":"string","maxLength":60},"headline":{"type":"string","minLength":1,"maxLength":120},"lead":{"type":"string","minLength":1,"maxLength":800,"description":"The first paragraph. Line breaks are kept."},"letter":{"description":"A second paragraph. Left out, none.","type":"string","maxLength":800},"callout_label":{"description":"Above the callout box, which holds the button.","type":"string","maxLength":60},"callout_body":{"description":"The words in the callout box, e.g. dates and times.","type":"string","maxLength":400},"button_text":{"description":"Left out or null: no button, and no callout unless voucher.","anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"sign_off":{"description":"The line above 'The team at {venue}', e.g. See you soon,","type":"string","maxLength":80},"voucher":{"description":"Print a voucher (its code, QR code and expiry) in the callout. Only an email sent with a voucher fills it in.","type":"boolean"},"offer_title":{"description":"Above the voucher code.","type":"string","maxLength":80}},"required":["headline","lead"],"description":"The venue's own words, as plain text (no HTML). Every slot the layout has is filled from here: one left out prints nothing, never a sample."},"button_url":{"description":"Where every button goes. Left out, buttons have no link yet.","type":"string","maxLength":2048,"format":"uri"},"brand_id":{"description":"One of the organisation's brand kits, for its colours, fonts and logo. Left out or null: the default.","anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"venue_name":{"description":"Printed in the header and sign-off. Left out: the organisation's name.","type":"string","minLength":1,"maxLength":120},"logo_url":{"description":"Left out: the brand kit's logo. null: the venue's name in type instead.","anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"hero_image_url":{"description":"The main photo. Use the venue's own. Left out: a stock photo that suits the purpose. null: none.","anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"tone":{"description":"brand: the brand kit's own background and text colours. Left out: brand when the kit has them, else warm.","type":"string","enum":["brand","warm","light","dark"]},"accent_color":{"description":"Buttons, labels and bands. Left out: the brand kit's button colour.","type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"fonts":{"description":"brand: the brand kit's fonts. layout: the layout's own pairing. Left out: brand when the kit has a heading font.","type":"string","enum":["brand","layout"]},"preview":{"description":"Preview the design in the same call, as email_templates.preview would. Left out, no preview.","type":"object","properties":{"images":{"default":true,"description":"false skips the pictures.","type":"boolean"},"mark_warnings":{"default":false,"description":"As email_templates.preview.","type":"boolean"},"subject":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"preheader":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]}}}},"required":["purpose"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"purpose":{"type":"string"},"layout":{"type":"string"},"sample_copy":{"type":"boolean","description":"The words are Stampede's samples, written for a made-up venue. Replace every one before it is sent."},"design":{"type":"object","properties":{"doc":{"type":"array","items":{}},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"brand_id":{"type":["string","null"]}},"required":["doc","settings","brand_id"],"additionalProperties":false,"description":"Pass to email_templates.preview and email_templates.create as design, as it is or changed."},"preview":{"anyOf":[{"type":"object","properties":{"html":{"type":"string","description":"As it is stored and sent, merge tags and footer links still in place."},"text":{"description":"The plain-text part sent with it. Null for a saved template not made in the email builder.","type":["string","null"]},"size_bytes":{"type":"number","description":"Gmail hides everything after about 102KB behind 'View entire message'."},"html_hash":{"type":"string"},"footer":{"type":"string","enum":["design","stampede"],"description":"design: the HTML has both #stampede_campaign_url# and #stampede_unsubscribe_url# links, so Stampede adds no footer when it sends. stampede: Stampede adds its own footer (view in browser and unsubscribe) at the bottom when it sends."},"warnings":{"type":"array","items":{"type":"object","properties":{"level":{"type":"string","enum":["fix","improve","note"],"description":"fix: will look broken or lose clicks. improve: hurts delivery, accessibility or engagement. note: renders a little differently in some email apps."},"code":{"type":"string"},"title":{"type":"string"},"message":{"type":"string"},"block_id":{"type":["string","null"]}},"required":["level","code","title","message","block_id"],"additionalProperties":false},"description":"Worst first."},"marked":{"anyOf":[{"type":"object","properties":{"html":{"type":"string"},"warnings":{"type":"array","items":{"type":"number"},"description":"Which warnings are labelled: warnings[k] is the place in warnings of the label numbered k + 1."}},"required":["html","warnings"],"additionalProperties":false},{"type":"null"}],"description":"With mark_warnings: the email again, with each block a warning names labelled with its number and outlined, for a person to see where the problems are. Never store or send it. Null without mark_warnings, for a template not made in the email builder, or when no warning names a block."},"images":{"type":"object","properties":{"desktop":{"anyOf":[{"type":"object","properties":{"device":{"type":"string","enum":["desktop","mobile"]},"mime_type":{"type":"string","const":"image/png"},"data":{"type":"string","description":"The PNG, base64."},"width":{"type":"number"},"height":{"type":"number"}},"required":["device","mime_type","data","width","height"],"additionalProperties":false},{"type":"null"}]},"mobile":{"anyOf":[{"type":"object","properties":{"device":{"type":"string","enum":["desktop","mobile"]},"mime_type":{"type":"string","const":"image/png"},"data":{"type":"string","description":"The PNG, base64."},"width":{"type":"number"},"height":{"type":"number"}},"required":["device","mime_type","data","width","height"],"additionalProperties":false},{"type":"null"}]}},"required":["desktop","mobile"],"additionalProperties":false,"description":"The whole email (up to 8000px tall) in a desktop (1024px wide) and a phone (430px wide) inbox, with its images loaded where they arrive within a few seconds. Null when no picture could be made: a warning says why."}},"required":["html","text","size_bytes","html_hash","footer","warnings","marked","images"],"additionalProperties":false},{"type":"null"}],"description":"With preview: the design previewed, as email_templates.preview gives it. Null without."}},"required":["name","description","purpose","layout","sample_copy","design","preview"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/email-senders":{"get":{"operationId":"email_senders.list","tags":["Email templates"],"summary":"List sender addresses","description":"The organisation's verified addresses emails can be sent from, by address. Use one's id as sender_id for email_templates.send_preview, email_campaigns.create and email_campaigns.send_test.","security":[{"oauth2":["marketing:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `cursor` from the previous page.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"email":{"type":"string"},"primary":{"type":"boolean"}},"required":["id","name","email","primary"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/audiences/filters":{"get":{"operationId":"audiences.filters","tags":["Audiences"],"summary":"List the filters an audience is built from","description":"Every filter a rule can use, with the values it takes: their names, types, whether required and what to send. Tags, when a guest was added, emails sent, opened and clicked, birthdays, postcode, email and phone, visits to venues, answers to custom questions, completed bookings and when they opted in. Read this before writing rules.","security":[{"oauth2":["marketing:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"filter":{"type":"string","description":"The key to send as a rule's filter, e.g. \"tags.has_any\"."},"label":{"type":"string","description":"[x] and [date] stand for the values."},"description":{"type":"string"},"values":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The key to send it under in a rule's values."},"label":{"type":"string"},"type":{"type":"string","description":"string, string[] (a list, at least one), number, date (YYYY-MM-DD) or select (one of options, by value)."},"required":{"type":"boolean"},"description":{"description":"What to send, and where to find it.","type":["string","null"]},"options":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},{"type":"null"}],"description":"For type select: the values allowed."}},"required":["name","label","type","required","description","options"],"additionalProperties":false},"description":"What the rule takes. Empty for a filter that takes nothing."}},"required":["filter","label","description","values"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/audiences":{"get":{"operationId":"audiences.list","tags":["Audiences"],"summary":"List audiences","description":"The organisation's audiences, by name, with their rules and the counts last taken.","security":[{"oauth2":["marketing:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `cursor` from the previous page.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"rules":{"type":"array","items":{"type":"object","properties":{"filter":{"type":"string"},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["filter","values"],"additionalProperties":false},"description":"Every rule must hold (AND). Venue IDs are under venue_ids."},"counts":{"type":"object","properties":{"email":{"type":["number","null"]},"sms":{"type":["number","null"]},"all":{"type":["number","null"]}},"required":["email","sms","all"],"additionalProperties":false,"description":"Guests it reached when last counted, per channel; null if never counted. Stampede recounts audiences from time to time, so these can be from before the latest change to the rules: audiences.count with audience_id counts now."},"counted_at":{"description":"When the most recent of the counts was taken. Null if never counted.","type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string","description":"Changes when the audience is changed, and when it is counted."}},"required":["id","name","rules","counts","counted_at","created_at","updated_at"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"audiences.create","tags":["Audiences"],"summary":"Create an audience","description":"Saves an audience, ready to be chosen for an email campaign (email_campaigns.create) or an SMS campaign in Stampede. Check it with audiences.count first. A rule that does not fit its filter is refused with 422 INVALID_RULE, naming the rule and the value.","security":[{"oauth2":["marketing:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"rules":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"filter":{"type":"string","minLength":1,"description":"A filter from audiences.filters, e.g. \"tags.has_any\"."},"values":{"default":{},"description":"The filter's values by name, e.g. { \"tag_ids\": [\"...\"] }. Leave out for a filter that takes none.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["filter"]},"description":"At least one. A guest is in the audience only if every rule holds (AND); there is no OR. Get the filters from audiences.filters."}},"required":["name","rules"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"rules":{"type":"array","items":{"type":"object","properties":{"filter":{"type":"string"},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["filter","values"],"additionalProperties":false},"description":"Every rule must hold (AND). Venue IDs are under venue_ids."},"counts":{"type":"object","properties":{"email":{"type":["number","null"]},"sms":{"type":["number","null"]},"all":{"type":["number","null"]}},"required":["email","sms","all"],"additionalProperties":false,"description":"Guests it reached when last counted, per channel; null if never counted. Stampede recounts audiences from time to time, so these can be from before the latest change to the rules: audiences.count with audience_id counts now."},"counted_at":{"description":"When the most recent of the counts was taken. Null if never counted.","type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string","description":"Changes when the audience is changed, and when it is counted."}},"required":["id","name","rules","counts","counted_at","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/audiences/{audience_id}":{"get":{"operationId":"audiences.get","tags":["Audiences"],"summary":"Get an audience","description":"Its rules, and the counts last taken.","security":[{"oauth2":["marketing:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"audience_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"rules":{"type":"array","items":{"type":"object","properties":{"filter":{"type":"string"},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["filter","values"],"additionalProperties":false},"description":"Every rule must hold (AND). Venue IDs are under venue_ids."},"counts":{"type":"object","properties":{"email":{"type":["number","null"]},"sms":{"type":["number","null"]},"all":{"type":["number","null"]}},"required":["email","sms","all"],"additionalProperties":false,"description":"Guests it reached when last counted, per channel; null if never counted. Stampede recounts audiences from time to time, so these can be from before the latest change to the rules: audiences.count with audience_id counts now."},"counted_at":{"description":"When the most recent of the counts was taken. Null if never counted.","type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string","description":"Changes when the audience is changed, and when it is counted."}},"required":["id","name","rules","counts","counted_at","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"audiences.update","tags":["Audiences"],"summary":"Change an audience","description":"Send the name, the rules or both. rules replaces every rule, so get the audience first and send back the ones to keep. Campaigns that use it send to the new rules from then on. Check new rules with audiences.count first.","security":[{"oauth2":["marketing:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"audience_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"rules":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"filter":{"type":"string","minLength":1,"description":"A filter from audiences.filters, e.g. \"tags.has_any\"."},"values":{"default":{},"description":"The filter's values by name, e.g. { \"tag_ids\": [\"...\"] }. Leave out for a filter that takes none.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["filter"]},"description":"At least one. A guest is in the audience only if every rule holds (AND); there is no OR. Get the filters from audiences.filters."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"rules":{"type":"array","items":{"type":"object","properties":{"filter":{"type":"string"},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["filter","values"],"additionalProperties":false},"description":"Every rule must hold (AND). Venue IDs are under venue_ids."},"counts":{"type":"object","properties":{"email":{"type":["number","null"]},"sms":{"type":["number","null"]},"all":{"type":["number","null"]}},"required":["email","sms","all"],"additionalProperties":false,"description":"Guests it reached when last counted, per channel; null if never counted. Stampede recounts audiences from time to time, so these can be from before the latest change to the rules: audiences.count with audience_id counts now."},"counted_at":{"description":"When the most recent of the counts was taken. Null if never counted.","type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string","description":"Changes when the audience is changed, and when it is counted."}},"required":["id","name","rules","counts","counted_at","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"audiences.delete","tags":["Audiences"],"summary":"Delete an audience","description":"Refused with 409 AUDIENCE_IN_USE, naming them, while an email or SMS campaign that will still send to it uses it (draft, scheduled, sending, or automated and active or paused). Campaigns already sent keep their reports.","security":[{"oauth2":["marketing:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"audience_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/audiences/count":{"post":{"operationId":"audiences.count","tags":["Audiences"],"summary":"Count an audience","description":"How many guests an audience reaches on a channel, counted now. Send rules to check an audience before saving it (nothing is saved), or audience_id to count a saved one (its count is kept on it). Send rules or audience_id, not both. Guests are never listed, only counted.","security":[{"oauth2":["marketing:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rules":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"filter":{"type":"string","minLength":1,"description":"A filter from audiences.filters, e.g. \"tags.has_any\"."},"values":{"default":{},"description":"The filter's values by name, e.g. { \"tag_ids\": [\"...\"] }. Leave out for a filter that takes none.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["filter"]},"description":"At least one. A guest is in the audience only if every rule holds (AND); there is no OR. Get the filters from audiences.filters."},"audience_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channel":{"default":"email","type":"string","enum":["email","sms","all"],"description":"email: guests who have opted in to email and have an email address. sms: opted in to SMS with a phone number. all: every guest who has agreed to their data being kept, whether they can be messaged or not."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"channel":{"type":"string","enum":["email","sms","all"],"description":"email: guests who have opted in to email and have an email address. sms: opted in to SMS with a phone number. all: every guest who has agreed to their data being kept, whether they can be messaged or not."},"count":{"type":"number","description":"Guests reached on this channel, now."}},"required":["channel","count"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/email-campaigns":{"get":{"operationId":"email_campaigns.list","tags":["Email campaigns"],"summary":"List email campaigns","description":"The organisation's email campaigns, most recently changed first: one-off campaigns, and automated ones (automated true, read only here). Filter by status and audience. A page can hold fewer than `limit`.","security":[{"oauth2":["marketing:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `cursor` from the previous page.","schema":{"type":"string","minLength":1}},{"name":"status","in":"query","required":false,"description":"Only these statuses, separated by commas, e.g. \"scheduled,sending\".","style":"form","explode":false,"schema":{"minItems":1,"type":"array","items":{"type":"string","enum":["draft","scheduled","sending","sent","failed","cancelled","active","paused"]}}},{"name":"audience_id","in":"query","required":false,"description":"Only campaigns sent to this audience.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"automated","in":"query","required":false,"description":"true: only automated campaigns. false: only one-off campaigns. Left out: both.","schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","scheduled","sending","sent","failed","cancelled","active","paused","unknown"],"description":"draft: being written, nothing sent. scheduled: will send at scheduled_for. sending: going out now. sent: done. failed: Stampede could not send it. cancelled: stopped. active and paused are for automated campaigns only."},"automated":{"type":"boolean","description":"An automated campaign, sent to guests as they join its audience. Read only here: change it in Stampede."},"audience_id":{"description":"The audience it is sent to (audiences.get). Null when none is chosen.","type":["string","null"]},"sender_id":{"description":"The address it is sent from (email_senders.list). Null when none is chosen.","type":["string","null"]},"subject":{"type":["string","null"]},"preheader":{"description":"The preview text inboxes show after the subject.","type":["string","null"]},"scheduled_for":{"description":"When a scheduled campaign sends. Null unless scheduled.","type":["string","null"]},"sent_at":{"description":"When sending started.","type":["string","null"]},"estimated_recipients":{"description":"Stampede's last estimate of the guests it reaches by email, refreshed from time to time. audiences.count with audience_id counts now.","type":["number","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","status","automated","audience_id","sender_id","subject","preheader","scheduled_for","sent_at","estimated_recipients","created_at","updated_at"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"email_campaigns.create","tags":["Email campaigns"],"summary":"Create a draft email campaign","description":"Makes a one-off campaign as a draft, which sends nothing: a copy of a template's email (the organisation's own, or one a parent shares), an audience, a sender, a name and a subject. Later changes to the template do not change the campaign. Every http(s) link in the copy is tagged as Stampede's email builder tags it: utm_source email_campaign, utm_medium stampede, utm_campaign the campaign's name, utm_id its ID; a UTM a link already has is kept, and links with merge tags are left alone. Next: email_campaigns.send_test to see it in an inbox, then email_campaigns.send or email_campaigns.schedule. Templates with a voucher code, and quick emails, are set up in Stampede.","security":[{"oauth2":["marketing:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"description":"For people in Stampede; guests never see it."},"subject":{"type":"string","minLength":1,"maxLength":255,"description":"Merge tags such as {{ profile.first }} are filled in per guest."},"preheader":{"anyOf":[{"type":"string","maxLength":255,"description":"The preview text inboxes show after the subject."},{"type":"null"}]},"template_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"From email_templates.list."},"audience_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"From audiences.list."},"sender_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"A verified address, from email_senders.list."}},"required":["name","subject","template_id","audience_id","sender_id"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","scheduled","sending","sent","failed","cancelled","active","paused","unknown"],"description":"draft: being written, nothing sent. scheduled: will send at scheduled_for. sending: going out now. sent: done. failed: Stampede could not send it. cancelled: stopped. active and paused are for automated campaigns only."},"automated":{"type":"boolean","description":"An automated campaign, sent to guests as they join its audience. Read only here: change it in Stampede."},"audience_id":{"description":"The audience it is sent to (audiences.get). Null when none is chosen.","type":["string","null"]},"sender_id":{"description":"The address it is sent from (email_senders.list). Null when none is chosen.","type":["string","null"]},"subject":{"type":["string","null"]},"preheader":{"description":"The preview text inboxes show after the subject.","type":["string","null"]},"scheduled_for":{"description":"When a scheduled campaign sends. Null unless scheduled.","type":["string","null"]},"sent_at":{"description":"When sending started.","type":["string","null"]},"estimated_recipients":{"description":"Stampede's last estimate of the guests it reaches by email, refreshed from time to time. audiences.count with audience_id counts now.","type":["number","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"audience":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email_count":{"description":"Guests it reached by email when last counted.","type":["number","null"]},"counted_at":{"type":["string","null"]}},"required":["id","name","email_count","counted_at"],"additionalProperties":false},{"type":"null"}],"description":"Null when none is chosen, or the audience has been deleted (audience_id still says which)."},"sender":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"email":{"type":"string"},"verified":{"type":"boolean","description":"Only a verified address can send."}},"required":["id","name","email","verified"],"additionalProperties":false},{"type":"null"}]},"content":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["construct","builder","html","quick","other"],"description":"How the email was made, as for email templates."},"footer":{"type":"string","enum":["design","stampede"],"description":"design: the email has its own view in browser and unsubscribe links. stampede: Stampede adds its footer when it sends."},"size_bytes":{"type":"number"},"html_hash":{"type":"string"},"has_voucher":{"type":"boolean","description":"Sends a voucher code to each guest. Set up in Stampede."},"preview_image_url":{"type":["string","null"]},"preview_image_mobile_url":{"type":["string","null"]}},"required":["kind","footer","size_bytes","html_hash","has_voucher","preview_image_url","preview_image_mobile_url"],"additionalProperties":false},{"type":"null"}],"description":"The campaign's own copy of the email, copied from a template when it was made. Changing the template afterwards does not change it. Null when it has none."},"problems":{"type":"array","items":{"type":"string"},"description":"For a draft: what would stop it being sent now. The number of guests is counted when it is sent, not here. Empty when nothing does, and for any other status."},"cancellable_until":{"description":"Until when email_campaigns.cancel can still unschedule it (up to 10 minutes before it sends) or stop it (up to 10 minutes after sending started). Null when it cannot.","type":["string","null"]}},"required":["id","name","status","automated","audience_id","sender_id","subject","preheader","scheduled_for","sent_at","estimated_recipients","created_at","updated_at","audience","sender","content","problems","cancellable_until"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/email-campaigns/{campaign_id}":{"get":{"operationId":"email_campaigns.get","tags":["Email campaigns"],"summary":"Get an email campaign","description":"With its audience, sender, a summary of its email, what would stop a draft being sent (problems), until when it can be cancelled, and once it has started sending, its stats: sent, delivered, opened, clicked, bounced, unsubscribed.","security":[{"oauth2":["marketing:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","scheduled","sending","sent","failed","cancelled","active","paused","unknown"],"description":"draft: being written, nothing sent. scheduled: will send at scheduled_for. sending: going out now. sent: done. failed: Stampede could not send it. cancelled: stopped. active and paused are for automated campaigns only."},"automated":{"type":"boolean","description":"An automated campaign, sent to guests as they join its audience. Read only here: change it in Stampede."},"audience_id":{"description":"The audience it is sent to (audiences.get). Null when none is chosen.","type":["string","null"]},"sender_id":{"description":"The address it is sent from (email_senders.list). Null when none is chosen.","type":["string","null"]},"subject":{"type":["string","null"]},"preheader":{"description":"The preview text inboxes show after the subject.","type":["string","null"]},"scheduled_for":{"description":"When a scheduled campaign sends. Null unless scheduled.","type":["string","null"]},"sent_at":{"description":"When sending started.","type":["string","null"]},"estimated_recipients":{"description":"Stampede's last estimate of the guests it reaches by email, refreshed from time to time. audiences.count with audience_id counts now.","type":["number","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"audience":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email_count":{"description":"Guests it reached by email when last counted.","type":["number","null"]},"counted_at":{"type":["string","null"]}},"required":["id","name","email_count","counted_at"],"additionalProperties":false},{"type":"null"}],"description":"Null when none is chosen, or the audience has been deleted (audience_id still says which)."},"sender":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"email":{"type":"string"},"verified":{"type":"boolean","description":"Only a verified address can send."}},"required":["id","name","email","verified"],"additionalProperties":false},{"type":"null"}]},"content":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["construct","builder","html","quick","other"],"description":"How the email was made, as for email templates."},"footer":{"type":"string","enum":["design","stampede"],"description":"design: the email has its own view in browser and unsubscribe links. stampede: Stampede adds its footer when it sends."},"size_bytes":{"type":"number"},"html_hash":{"type":"string"},"has_voucher":{"type":"boolean","description":"Sends a voucher code to each guest. Set up in Stampede."},"preview_image_url":{"type":["string","null"]},"preview_image_mobile_url":{"type":["string","null"]}},"required":["kind","footer","size_bytes","html_hash","has_voucher","preview_image_url","preview_image_mobile_url"],"additionalProperties":false},{"type":"null"}],"description":"The campaign's own copy of the email, copied from a template when it was made. Changing the template afterwards does not change it. Null when it has none."},"problems":{"type":"array","items":{"type":"string"},"description":"For a draft: what would stop it being sent now. The number of guests is counted when it is sent, not here. Empty when nothing does, and for any other status."},"cancellable_until":{"description":"Until when email_campaigns.cancel can still unschedule it (up to 10 minutes before it sends) or stop it (up to 10 minutes after sending started). Null when it cannot.","type":["string","null"]},"stats":{"anyOf":[{"type":"object","properties":{"sent":{"type":"number","description":"Emails handed to the mail service."},"delivered":{"type":"number"},"opened":{"type":"number","description":"Guests who opened it at least once. Apple Mail opens some emails itself, so this reads high."},"total_opens":{"type":"number"},"clicked":{"type":"number","description":"Guests who clicked a link at least once."},"total_clicks":{"type":"number"},"bounced":{"type":"number"},"unsubscribed":{"type":"number"},"complained":{"type":"number","description":"Marked as spam."},"rejected":{"type":"number"}},"required":["sent","delivered","opened","total_opens","clicked","total_clicks","bounced","unsubscribed","complained","rejected"],"additionalProperties":false,"description":"Counts so far, from the email events Stampede has received."},{"type":"null"}],"description":"Once it has started sending. Null before."}},"required":["id","name","status","automated","audience_id","sender_id","subject","preheader","scheduled_for","sent_at","estimated_recipients","created_at","updated_at","audience","sender","content","problems","cancellable_until","stats"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"email_campaigns.update","tags":["Email campaigns"],"summary":"Change a draft email campaign","description":"Only a one-off draft (409 otherwise). Send only what changes: name, subject, preheader (null clears it), audience_id, sender_id, or template_id to copy a template's email in again, replacing the campaign's, with its links tagged as email_campaigns.create tags them (a new name alone does not change links already tagged). Everything else is kept as it is.","security":[{"oauth2":["marketing:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"subject":{"type":"string","minLength":1,"maxLength":255,"description":"Merge tags such as {{ profile.first }} are filled in per guest."},"preheader":{"anyOf":[{"type":"string","maxLength":255,"description":"The preview text inboxes show after the subject."},{"type":"null"}]},"template_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"audience_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"sender_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","scheduled","sending","sent","failed","cancelled","active","paused","unknown"],"description":"draft: being written, nothing sent. scheduled: will send at scheduled_for. sending: going out now. sent: done. failed: Stampede could not send it. cancelled: stopped. active and paused are for automated campaigns only."},"automated":{"type":"boolean","description":"An automated campaign, sent to guests as they join its audience. Read only here: change it in Stampede."},"audience_id":{"description":"The audience it is sent to (audiences.get). Null when none is chosen.","type":["string","null"]},"sender_id":{"description":"The address it is sent from (email_senders.list). Null when none is chosen.","type":["string","null"]},"subject":{"type":["string","null"]},"preheader":{"description":"The preview text inboxes show after the subject.","type":["string","null"]},"scheduled_for":{"description":"When a scheduled campaign sends. Null unless scheduled.","type":["string","null"]},"sent_at":{"description":"When sending started.","type":["string","null"]},"estimated_recipients":{"description":"Stampede's last estimate of the guests it reaches by email, refreshed from time to time. audiences.count with audience_id counts now.","type":["number","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","status","automated","audience_id","sender_id","subject","preheader","scheduled_for","sent_at","estimated_recipients","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"email_campaigns.delete","tags":["Email campaigns"],"summary":"Delete a draft email campaign","description":"Only a one-off draft: Stampede keeps scheduled and sent campaigns, with their reports. To stop a scheduled one, use email_campaigns.cancel.","security":[{"oauth2":["marketing:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/email-campaigns/{campaign_id}/send-test":{"post":{"operationId":"email_campaigns.send_test","tags":["Email campaigns"],"summary":"Send a test of an email campaign","description":"Emails the campaign to one address, never to guests, with ' [preview]' after its subject and merge tags filled in with sample details. It can take a few minutes to arrive. From the campaign's own sender unless sender_id names another verified address. Stampede checks the campaign could be sent first (sender, audience, subject, email), so a test also shows what is missing.","security":[{"oauth2":["marketing:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to_email":{"type":"string","maxLength":255,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"to_name":{"type":"string","maxLength":255},"sender_id":{"description":"From email_senders.list. Left out: the campaign's own.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["to_email"]}}}},"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"campaign_id":{"type":"string"},"to_email":{"type":"string"},"from_email":{"type":"string"},"queued":{"type":"boolean","const":true}},"required":["campaign_id","to_email","from_email","queued"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/email-campaigns/{campaign_id}/send":{"post":{"operationId":"email_campaigns.send","tags":["Email campaigns"],"summary":"Send an email campaign as soon as it can be","description":"Schedules a draft campaign for the earliest time it can go: 31 minutes from now. Nothing is ever sent straight away through the API, so there is time to put a mistake right: until 10 minutes before it goes, email_campaigns.cancel puts it back to a draft. After that it emails real guests and cannot be undone. Needs the marketing:send scope, which full access does not include, an admin or the owner, and access to every venue. Before anything is sent, v2 checks that the campaign is a one-off draft with an audience that still exists, a verified sender, a subject and an email, then counts the audience by email now: it must reach at least one guest, and exactly confirm_recipients. So count the audience first (audiences.count with its audience_id), tell the person the number, and only call this with the number they agreed to. A different count is refused with 409 RECIPIENTS_NOT_CONFIRMED, giving the count now. The answer gives the number counted and when it goes. Stampede works out the guests again as it sends, so the number sent can differ a little if guests join or leave in between.","security":[{"oauth2":["marketing:send"]}],"x-kind":"write","x-mcp":true,"x-support":false,"x-admin-only":true,"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm_recipients":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"The number of guests the person agreed to send to: the audience's email count from audiences.count (channel email) with this audience_id, read out to them first. Anything else is refused with 409 RECIPIENTS_NOT_CONFIRMED and the count now."}},"required":["confirm_recipients"]}}}},"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["draft","scheduled","sending","sent","failed","cancelled","active","paused","unknown"],"description":"draft: being written, nothing sent. scheduled: will send at scheduled_for. sending: going out now. sent: done. failed: Stampede could not send it. cancelled: stopped. active and paused are for automated campaigns only."},"scheduled_for":{"type":"string","description":"When it sends."},"recipients":{"type":"number","description":"Guests the audience reached by email when it was scheduled."},"audience_id":{"type":"string"},"from_email":{"type":"string"},"cancellable_until":{"description":"Until when email_campaigns.cancel can put it back to a draft.","type":["string","null"]}},"required":["id","status","scheduled_for","recipients","audience_id","from_email","cancellable_until"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/email-campaigns/{campaign_id}/schedule":{"post":{"operationId":"email_campaigns.schedule","tags":["Email campaigns"],"summary":"Schedule an email campaign","description":"Schedules a draft campaign to send to its audience at send_at, at least 31 minutes and at most 90 days from now. It then emails real guests at that time with no further step. Until 10 minutes before, email_campaigns.cancel puts it back to a draft. Needs the marketing:send scope, which full access does not include, an admin or the owner, and access to every venue. Before anything is sent, v2 checks that the campaign is a one-off draft with an audience that still exists, a verified sender, a subject and an email, then counts the audience by email now: it must reach at least one guest, and exactly confirm_recipients. So count the audience first (audiences.count with its audience_id), tell the person the number, and only call this with the number they agreed to. A different count is refused with 409 RECIPIENTS_NOT_CONFIRMED, giving the count now. The guests are worked out again when it sends, so the number then follows the audience as it is at that time; if the audience's rules change in between, so do the guests who get it.","security":[{"oauth2":["marketing:send"]}],"x-kind":"write","x-mcp":true,"x-support":false,"x-admin-only":true,"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"send_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"An ISO 8601 instant with its offset, e.g. 2026-12-01T18:00:00Z."},"confirm_recipients":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"The number of guests the person agreed to send to: the audience's email count from audiences.count (channel email) with this audience_id, read out to them first. Anything else is refused with 409 RECIPIENTS_NOT_CONFIRMED and the count now."}},"required":["send_at","confirm_recipients"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["draft","scheduled","sending","sent","failed","cancelled","active","paused","unknown"],"description":"draft: being written, nothing sent. scheduled: will send at scheduled_for. sending: going out now. sent: done. failed: Stampede could not send it. cancelled: stopped. active and paused are for automated campaigns only."},"scheduled_for":{"type":"string","description":"When it sends."},"recipients":{"type":"number","description":"Guests the audience reached by email when it was scheduled."},"audience_id":{"type":"string"},"from_email":{"type":"string"},"cancellable_until":{"description":"Until when email_campaigns.cancel can put it back to a draft.","type":["string","null"]}},"required":["id","status","scheduled_for","recipients","audience_id","from_email","cancellable_until"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/email-campaigns/{campaign_id}/cancel":{"post":{"operationId":"email_campaigns.cancel","tags":["Email campaigns"],"summary":"Cancel an email campaign","description":"A scheduled campaign is unscheduled and goes back to a draft, up to 10 minutes before it sends. A campaign that has started sending is stopped, up to 10 minutes after it started: guests already sent it keep it, and it cannot be sent again. Anything else is refused with 409 CAMPAIGN_NOT_CANCELLABLE. Needs the marketing:send scope, an admin or the owner, and access to every venue. outcome says which happened.","security":[{"oauth2":["marketing:send"]}],"x-kind":"write","x-mcp":true,"x-support":false,"x-admin-only":true,"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"outcome":{"type":"string","enum":["unscheduled","stopped"],"description":"unscheduled: back to a draft, nothing sent. stopped: sending stopped part way."},"status":{"type":"string","enum":["draft","scheduled","sending","sent","failed","cancelled","active","paused","unknown"],"description":"draft: being written, nothing sent. scheduled: will send at scheduled_for. sending: going out now. sent: done. failed: Stampede could not send it. cancelled: stopped. active and paused are for automated campaigns only."}},"required":["id","outcome","status"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/forms":{"get":{"operationId":"forms.list","tags":["Forms"],"summary":"List forms","description":"The organisation's sign-up forms: where guests fill each in, what it asks for, the tags it gives and its venues. forms.get adds its custom questions and an embed snippet.","security":[{"oauth2":["marketing:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string","description":"Where guests fill it in. It works as soon as the form is made."},"venue_ids":{"type":"array","items":{"type":"string"},"description":"The venues a fill is recorded against; each fill is recorded once per venue. Empty for none."},"fields":{"type":"array","items":{"type":"string","enum":["email","first_name","last_name","phone","birthday"]},"description":"The guest details it asks for. email is always asked."},"tags":{"type":"array","items":{"type":"string"},"description":"Tag names given to every guest who fills it in. A tag is made if the organisation has none by that name."},"message":{"description":"Text shown above the form, e.g. what signing up gets the guest.","type":["string","null"]},"consent_text":{"description":"The opt-in wording shown with the submit button. Filling in the form opts the guest in to marketing email and SMS, so this should say so.","type":["string","null"]},"submit_button_text":{"type":["string","null"]},"success_message":{"description":"Shown once the form is sent, unless redirect_url is set.","type":["string","null"]},"redirect_url":{"description":"Where the guest is taken once the form is sent.","type":["string","null"]},"show_terms":{"type":"boolean","description":"Whether Stampede's terms are linked."},"hide_footer":{"type":"boolean","description":"Whether Stampede's footer is hidden."},"send_to_inbox":{"type":"boolean","description":"Whether each fill also reaches the organisation's Stampede inbox."},"brand_kit_id":{"description":"The brand kit the form is shown in (brand_kits.list). Null for Stampede's plain look.","type":["string","null"]},"created_at":{"type":"string"}},"required":["id","name","url","venue_ids","fields","tags","message","consent_text","submit_button_text","success_message","redirect_url","show_terms","hide_footer","send_to_inbox","brand_kit_id","created_at"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"forms.create","tags":["Forms"],"summary":"Create a form","description":"Makes a sign-up form. It has no draft state: its link works at once, for anyone who has it. Anyone who fills it in is added to the organisation's guests and opted in to data, marketing email and SMS, and given its tags, so its consent_text should say what they are signing up to. Custom questions come from forms.questions.list (or forms.questions.create). The answer has its link and an embed snippet.","security":[{"oauth2":["marketing:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"description":"What it is called in Stampede. Guests do not see it."},"fields":{"default":["email","first_name","last_name"],"maxItems":5,"type":"array","items":{"type":"string","enum":["email","first_name","last_name","phone","birthday"]},"description":"The guest details to ask for. email is always asked, whether listed or not."},"venue_ids":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1},"description":"Venue IDs from venues.list. Each fill is recorded once per venue, so a form for one venue names one. Empty for none."},"tags":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":255},"description":"Tag names to give every guest who fills it in. A tag is made if the organisation has none by that name."},"questions":{"default":[],"maxItems":50,"type":"array","items":{"type":"object","properties":{"question_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"From forms.questions.list, or forms.questions.create."},"required":{"default":false,"type":"boolean"}},"required":["question_id"]},"description":"The custom questions to ask, in this order. Replaces the whole list, so send every question to keep."},"message":{"description":"Text shown above the form, e.g. what signing up gets the guest.","anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"consent_text":{"description":"The opt-in wording shown with the submit button. Filling in the form opts the guest in to marketing email and SMS, so this should say so.","anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"submit_button_text":{"description":"Up to 36 characters. Null for the default.","anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"success_message":{"description":"Up to 255 characters. Null for the default.","anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"redirect_url":{"description":"Where the guest is taken once the form is sent.","anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"show_terms":{"type":"boolean"},"hide_footer":{"type":"boolean"},"send_to_inbox":{"type":"boolean"},"brand_kit_id":{"description":"A brand kit from brand_kits.list: the form's colours, fonts and logo. Null for Stampede's plain look.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]}},"required":["name"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string","description":"Where guests fill it in. It works as soon as the form is made."},"venue_ids":{"type":"array","items":{"type":"string"},"description":"The venues a fill is recorded against; each fill is recorded once per venue. Empty for none."},"fields":{"type":"array","items":{"type":"string","enum":["email","first_name","last_name","phone","birthday"]},"description":"The guest details it asks for. email is always asked."},"tags":{"type":"array","items":{"type":"string"},"description":"Tag names given to every guest who fills it in. A tag is made if the organisation has none by that name."},"message":{"description":"Text shown above the form, e.g. what signing up gets the guest.","type":["string","null"]},"consent_text":{"description":"The opt-in wording shown with the submit button. Filling in the form opts the guest in to marketing email and SMS, so this should say so.","type":["string","null"]},"submit_button_text":{"type":["string","null"]},"success_message":{"description":"Shown once the form is sent, unless redirect_url is set.","type":["string","null"]},"redirect_url":{"description":"Where the guest is taken once the form is sent.","type":["string","null"]},"show_terms":{"type":"boolean","description":"Whether Stampede's terms are linked."},"hide_footer":{"type":"boolean","description":"Whether Stampede's footer is hidden."},"send_to_inbox":{"type":"boolean","description":"Whether each fill also reaches the organisation's Stampede inbox."},"brand_kit_id":{"description":"The brand kit the form is shown in (brand_kits.list). Null for Stampede's plain look.","type":["string","null"]},"created_at":{"type":"string"},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"question":{"type":"string"},"type":{"type":"string","enum":["text","long_text","choose_one","choose_many","yes_no"],"description":"text: a line of text. long_text: a paragraph. choose_one: one of options. choose_many: any of options. yes_no: yes or no."},"options":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"For choose_one and choose_many: the choices. Null otherwise."},"required":{"type":"boolean"}},"required":["id","question","type","options","required"],"additionalProperties":false},"description":"The custom questions it asks, in order."},"embed_html":{"type":"string","description":"An iframe to paste into a website's HTML to show the form there."}},"required":["id","name","url","venue_ids","fields","tags","message","consent_text","submit_button_text","success_message","redirect_url","show_terms","hide_footer","send_to_inbox","brand_kit_id","created_at","questions","embed_html"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/forms/{form_id}":{"get":{"operationId":"forms.get","tags":["Forms"],"summary":"Get a form","description":"Everything it asks for, including its custom questions in order, its wording and settings, its link and a snippet to embed it in a website.","security":[{"oauth2":["marketing:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string","description":"Where guests fill it in. It works as soon as the form is made."},"venue_ids":{"type":"array","items":{"type":"string"},"description":"The venues a fill is recorded against; each fill is recorded once per venue. Empty for none."},"fields":{"type":"array","items":{"type":"string","enum":["email","first_name","last_name","phone","birthday"]},"description":"The guest details it asks for. email is always asked."},"tags":{"type":"array","items":{"type":"string"},"description":"Tag names given to every guest who fills it in. A tag is made if the organisation has none by that name."},"message":{"description":"Text shown above the form, e.g. what signing up gets the guest.","type":["string","null"]},"consent_text":{"description":"The opt-in wording shown with the submit button. Filling in the form opts the guest in to marketing email and SMS, so this should say so.","type":["string","null"]},"submit_button_text":{"type":["string","null"]},"success_message":{"description":"Shown once the form is sent, unless redirect_url is set.","type":["string","null"]},"redirect_url":{"description":"Where the guest is taken once the form is sent.","type":["string","null"]},"show_terms":{"type":"boolean","description":"Whether Stampede's terms are linked."},"hide_footer":{"type":"boolean","description":"Whether Stampede's footer is hidden."},"send_to_inbox":{"type":"boolean","description":"Whether each fill also reaches the organisation's Stampede inbox."},"brand_kit_id":{"description":"The brand kit the form is shown in (brand_kits.list). Null for Stampede's plain look.","type":["string","null"]},"created_at":{"type":"string"},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"question":{"type":"string"},"type":{"type":"string","enum":["text","long_text","choose_one","choose_many","yes_no"],"description":"text: a line of text. long_text: a paragraph. choose_one: one of options. choose_many: any of options. yes_no: yes or no."},"options":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"For choose_one and choose_many: the choices. Null otherwise."},"required":{"type":"boolean"}},"required":["id","question","type","options","required"],"additionalProperties":false},"description":"The custom questions it asks, in order."},"embed_html":{"type":"string","description":"An iframe to paste into a website's HTML to show the form there."}},"required":["id","name","url","venue_ids","fields","tags","message","consent_text","submit_button_text","success_message","redirect_url","show_terms","hide_footer","send_to_inbox","brand_kit_id","created_at","questions","embed_html"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"forms.update","tags":["Forms"],"summary":"Change a form","description":"Send only what changes. questions, fields, venue_ids and tags each replace the whole list, so get the form first and send back what to keep. The form is live, so guests see a change the next time it loads; past fills are kept as they were.","security":[{"oauth2":["marketing:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"fields":{"maxItems":5,"type":"array","items":{"type":"string","enum":["email","first_name","last_name","phone","birthday"]},"description":"The guest details to ask for. email is always asked, whether listed or not."},"venue_ids":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1},"description":"Venue IDs from venues.list. Each fill is recorded once per venue, so a form for one venue names one. Empty for none."},"tags":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":255},"description":"Tag names to give every guest who fills it in. A tag is made if the organisation has none by that name."},"questions":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"question_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"From forms.questions.list, or forms.questions.create."},"required":{"default":false,"type":"boolean"}},"required":["question_id"]},"description":"The custom questions to ask, in this order. Replaces the whole list, so send every question to keep."},"message":{"description":"Text shown above the form, e.g. what signing up gets the guest.","anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"consent_text":{"description":"The opt-in wording shown with the submit button. Filling in the form opts the guest in to marketing email and SMS, so this should say so.","anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"submit_button_text":{"description":"Up to 36 characters. Null for the default.","anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"success_message":{"description":"Up to 255 characters. Null for the default.","anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"redirect_url":{"description":"Where the guest is taken once the form is sent.","anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"show_terms":{"type":"boolean"},"hide_footer":{"type":"boolean"},"send_to_inbox":{"type":"boolean"},"brand_kit_id":{"description":"A brand kit from brand_kits.list: the form's colours, fonts and logo. Null for Stampede's plain look.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string","description":"Where guests fill it in. It works as soon as the form is made."},"venue_ids":{"type":"array","items":{"type":"string"},"description":"The venues a fill is recorded against; each fill is recorded once per venue. Empty for none."},"fields":{"type":"array","items":{"type":"string","enum":["email","first_name","last_name","phone","birthday"]},"description":"The guest details it asks for. email is always asked."},"tags":{"type":"array","items":{"type":"string"},"description":"Tag names given to every guest who fills it in. A tag is made if the organisation has none by that name."},"message":{"description":"Text shown above the form, e.g. what signing up gets the guest.","type":["string","null"]},"consent_text":{"description":"The opt-in wording shown with the submit button. Filling in the form opts the guest in to marketing email and SMS, so this should say so.","type":["string","null"]},"submit_button_text":{"type":["string","null"]},"success_message":{"description":"Shown once the form is sent, unless redirect_url is set.","type":["string","null"]},"redirect_url":{"description":"Where the guest is taken once the form is sent.","type":["string","null"]},"show_terms":{"type":"boolean","description":"Whether Stampede's terms are linked."},"hide_footer":{"type":"boolean","description":"Whether Stampede's footer is hidden."},"send_to_inbox":{"type":"boolean","description":"Whether each fill also reaches the organisation's Stampede inbox."},"brand_kit_id":{"description":"The brand kit the form is shown in (brand_kits.list). Null for Stampede's plain look.","type":["string","null"]},"created_at":{"type":"string"},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"question":{"type":"string"},"type":{"type":"string","enum":["text","long_text","choose_one","choose_many","yes_no"],"description":"text: a line of text. long_text: a paragraph. choose_one: one of options. choose_many: any of options. yes_no: yes or no."},"options":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"For choose_one and choose_many: the choices. Null otherwise."},"required":{"type":"boolean"}},"required":["id","question","type","options","required"],"additionalProperties":false},"description":"The custom questions it asks, in order."},"embed_html":{"type":"string","description":"An iframe to paste into a website's HTML to show the form there."}},"required":["id","name","url","venue_ids","fields","tags","message","consent_text","submit_button_text","success_message","redirect_url","show_terms","hide_footer","send_to_inbox","brand_kit_id","created_at","questions","embed_html"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"forms.delete","tags":["Forms"],"summary":"Delete a form","description":"Removes it from Stampede. Its past fills, and the guests and answers they added, are kept. A workflow started by this form is not changed: switch it off or change its trigger in Stampede.","security":[{"oauth2":["marketing:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/forms/{form_id}/preview":{"get":{"operationId":"forms.preview","tags":["Forms"],"summary":"Preview a form","description":"Pictures of the form as guests see it at its link, on a computer and a phone, with its brand kit. Nothing is filled in. Pictures need Stampede's renderer; without it, or when it is busy, the answer says why there are none.","security":[{"oauth2":["marketing:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"form":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string","description":"Where guests fill it in. It works as soon as the form is made."},"venue_ids":{"type":"array","items":{"type":"string"},"description":"The venues a fill is recorded against; each fill is recorded once per venue. Empty for none."},"fields":{"type":"array","items":{"type":"string","enum":["email","first_name","last_name","phone","birthday"]},"description":"The guest details it asks for. email is always asked."},"tags":{"type":"array","items":{"type":"string"},"description":"Tag names given to every guest who fills it in. A tag is made if the organisation has none by that name."},"message":{"description":"Text shown above the form, e.g. what signing up gets the guest.","type":["string","null"]},"consent_text":{"description":"The opt-in wording shown with the submit button. Filling in the form opts the guest in to marketing email and SMS, so this should say so.","type":["string","null"]},"submit_button_text":{"type":["string","null"]},"success_message":{"description":"Shown once the form is sent, unless redirect_url is set.","type":["string","null"]},"redirect_url":{"description":"Where the guest is taken once the form is sent.","type":["string","null"]},"show_terms":{"type":"boolean","description":"Whether Stampede's terms are linked."},"hide_footer":{"type":"boolean","description":"Whether Stampede's footer is hidden."},"send_to_inbox":{"type":"boolean","description":"Whether each fill also reaches the organisation's Stampede inbox."},"brand_kit_id":{"description":"The brand kit the form is shown in (brand_kits.list). Null for Stampede's plain look.","type":["string","null"]},"created_at":{"type":"string"},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"question":{"type":"string"},"type":{"type":"string","enum":["text","long_text","choose_one","choose_many","yes_no"],"description":"text: a line of text. long_text: a paragraph. choose_one: one of options. choose_many: any of options. yes_no: yes or no."},"options":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"For choose_one and choose_many: the choices. Null otherwise."},"required":{"type":"boolean"}},"required":["id","question","type","options","required"],"additionalProperties":false},"description":"The custom questions it asks, in order."},"embed_html":{"type":"string","description":"An iframe to paste into a website's HTML to show the form there."}},"required":["id","name","url","venue_ids","fields","tags","message","consent_text","submit_button_text","success_message","redirect_url","show_terms","hide_footer","send_to_inbox","brand_kit_id","created_at","questions","embed_html"],"additionalProperties":false},"images":{"type":"object","properties":{"desktop":{"anyOf":[{"type":"object","properties":{"device":{"type":"string","enum":["desktop","mobile"]},"mime_type":{"type":"string","const":"image/png"},"data":{"type":"string","description":"Base64."},"width":{"type":"number"},"height":{"type":"number"}},"required":["device","mime_type","data","width","height"],"additionalProperties":false},{"type":"null"}]},"mobile":{"anyOf":[{"type":"object","properties":{"device":{"type":"string","enum":["desktop","mobile"]},"mime_type":{"type":"string","const":"image/png"},"data":{"type":"string","description":"Base64."},"width":{"type":"number"},"height":{"type":"number"}},"required":["device","mime_type","data","width","height"],"additionalProperties":false},{"type":"null"}]}},"required":["desktop","mobile"],"additionalProperties":false},"images_missing":{"anyOf":[{"type":"string","enum":["off","busy","failed"]},{"type":"null"}],"description":"Why there are no pictures, when there are none: off (not set up here), busy (try again shortly) or failed."}},"required":["form","images","images_missing"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/forms/questions":{"get":{"operationId":"forms.questions.list","tags":["Forms"],"summary":"List custom questions","description":"The organisation's custom questions, which its forms and its venues' WiFi pages ask. A form names the ones it asks with their IDs.","security":[{"oauth2":["marketing:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"question":{"type":"string"},"type":{"type":"string","enum":["text","long_text","choose_one","choose_many","yes_no"],"description":"text: a line of text. long_text: a paragraph. choose_one: one of options. choose_many: any of options. yes_no: yes or no."},"options":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"For choose_one and choose_many: the choices. Null otherwise."},"created_at":{"type":"string"}},"required":["id","question","type","options","created_at"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"forms.questions.create","tags":["Forms"],"summary":"Create a custom question","description":"Makes a question any form can ask (add it to one with forms.create or forms.update). Check forms.questions.list first and reuse a question that already asks the same thing, so its answers stay together. Questions are changed and deleted in Stampede, as forms and WiFi pages share them.","security":[{"oauth2":["marketing:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string","minLength":1,"maxLength":255},"type":{"type":"string","enum":["text","long_text","choose_one","choose_many","yes_no"],"description":"text: a line of text. long_text: a paragraph. choose_one: one of options. choose_many: any of options. yes_no: yes or no."},"options":{"description":"For choose_one and choose_many: the choices, at least two.","minItems":2,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}}},"required":["question","type"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"question":{"type":"string"},"type":{"type":"string","enum":["text","long_text","choose_one","choose_many","yes_no"],"description":"text: a line of text. long_text: a paragraph. choose_one: one of options. choose_many: any of options. yes_no: yes or no."},"options":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"For choose_one and choose_many: the choices. Null otherwise."},"created_at":{"type":"string"}},"required":["id","question","type","options","created_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/forms/submissions":{"get":{"operationId":"forms.submissions.list","tags":["Forms"],"summary":"List form fills","description":"Who filled in the forms and what they said, newest first: the guest, their answers and the UTM parameters they came with. Holds guests' details, so it also needs guests:read.","security":[{"oauth2":["marketing:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `cursor` from the previous page.","schema":{"type":"string","minLength":1}},{"name":"form_id","in":"query","required":false,"description":"Only this form's fills.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"venue_id","in":"query","required":false,"description":"Only fills recorded against this venue.","schema":{"type":"string","minLength":1}},{"name":"since","in":"query","required":false,"description":"Only fills from this time, ISO 8601.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"until","in":"query","required":false,"description":"Only fills up to this time, ISO 8601.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"search","in":"query","required":false,"description":"An email address (exact), a phone number (starting + or 0), or the start of a name.","schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"form":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"venue_id":{"type":["string","null"]},"submitted_at":{"type":"string"},"source":{"description":"web (the form's page or an embed) or in-venue-form.","type":["string","null"]},"guest":{"type":"object","properties":{"id":{"type":"string","description":"The guest ID, as guests.get takes it."},"email":{"type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["id","email","first_name","last_name","phone"],"additionalProperties":false},"birthday":{"anyOf":[{"type":"object","properties":{"day":{"type":"number"},"month":{"type":"number"}},"required":["day","month"],"additionalProperties":false},{"type":"null"}],"description":"As given on the form, if asked."},"message":{"type":["string","null"]},"answers":{"type":"array","items":{"type":"object","properties":{"question_id":{"type":"string"},"question":{"description":"Null if the question has since been deleted.","type":["string","null"]},"answer":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},{"type":"null"}]}},"required":["question_id","question","answer"],"additionalProperties":false}},"utm":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"UTM parameters on the link the guest came from, e.g. utm_source."}},"required":["id","form","venue_id","submitted_at","source","guest","birthday","message","answers","utm"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/forms/submissions/{submission_id}":{"get":{"operationId":"forms.submissions.get","tags":["Forms"],"summary":"Get a form fill","description":"One fill: the guest, their answers and the UTM parameters they came with. Also needs guests:read.","security":[{"oauth2":["marketing:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"submission_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"form":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"venue_id":{"type":["string","null"]},"submitted_at":{"type":"string"},"source":{"description":"web (the form's page or an embed) or in-venue-form.","type":["string","null"]},"guest":{"type":"object","properties":{"id":{"type":"string","description":"The guest ID, as guests.get takes it."},"email":{"type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["id","email","first_name","last_name","phone"],"additionalProperties":false},"birthday":{"anyOf":[{"type":"object","properties":{"day":{"type":"number"},"month":{"type":"number"}},"required":["day","month"],"additionalProperties":false},{"type":"null"}],"description":"As given on the form, if asked."},"message":{"type":["string","null"]},"answers":{"type":"array","items":{"type":"object","properties":{"question_id":{"type":"string"},"question":{"description":"Null if the question has since been deleted.","type":["string","null"]},"answer":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},{"type":"null"}]}},"required":["question_id","question","answer"],"additionalProperties":false}},"utm":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"UTM parameters on the link the guest came from, e.g. utm_source."}},"required":["id","form","venue_id","submitted_at","source","guest","birthday","message","answers","utm"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/brand-kits":{"get":{"operationId":"brand_kits.list","tags":["Brand kits"],"summary":"List brand kits","description":"The organisation's brand kits: colours, fonts and logo. WiFi sign-in pages, forms (forms.create, forms.update), review pages, loyalty schemes and email designs (brand_id) are each drawn in one. brand_kits.get gives a kit in full.","security":[{"oauth2":["marketing:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"is_default":{"type":"boolean","description":"The kit used when none is named: new emails and forms are drawn in it."},"colours":{"type":"object","properties":{"primary":{"description":"Buttons and links.","type":["string","null"]},"background":{"type":["string","null"]},"text":{"type":["string","null"]},"header":{"type":["string","null"]},"interface":{"type":["string","null"]}},"required":["primary","background","text","header","interface"],"additionalProperties":false},"fonts":{"type":"object","properties":{"heading":{"type":["string","null"]},"body":{"type":["string","null"]}},"required":["heading","body"],"additionalProperties":false},"logo_url":{"type":["string","null"]}},"required":["id","name","is_default","colours","fonts","logo_url"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"brand_kits.create","tags":["Brand kits"],"summary":"Create a brand kit","description":"Makes a brand kit. Anything not sent starts as Stampede's new kit does (white and yellow, Montserrat, Stampede's header picture): send at least the colours and the logo. Pictures are https URLs: upload one first with images.upload. is_default makes it the kit used where none is named (the old default stops being one); an organisation's first kit is always the default.","security":[{"oauth2":["marketing:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"colours":{"type":"object","properties":{"primary":{"type":"string","pattern":"^(#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?|rgba?\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*(,\\s*(0|1|0?\\.\\d+)\\s*)?\\))$"},"background":{"type":"string","pattern":"^(#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?|rgba?\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*(,\\s*(0|1|0?\\.\\d+)\\s*)?\\))$"},"text":{"type":"string","pattern":"^(#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?|rgba?\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*(,\\s*(0|1|0?\\.\\d+)\\s*)?\\))$"},"header":{"type":"string","pattern":"^(#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?|rgba?\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*(,\\s*(0|1|0?\\.\\d+)\\s*)?\\))$"},"interface":{"type":"string","pattern":"^(#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?|rgba?\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*(,\\s*(0|1|0?\\.\\d+)\\s*)?\\))$"},"footer":{"type":"string","pattern":"^(#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?|rgba?\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*(,\\s*(0|1|0?\\.\\d+)\\s*)?\\))$"},"input":{"type":"string","pattern":"^(#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?|rgba?\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*(,\\s*(0|1|0?\\.\\d+)\\s*)?\\))$"}}},"fonts":{"type":"object","properties":{"heading":{"type":"string","minLength":1,"maxLength":100},"body":{"type":"string","minLength":1,"maxLength":100}}},"logo_url":{"anyOf":[{"type":"string","maxLength":512,"format":"uri","description":"An https URL. Upload a picture first with images.upload and use its URL."},{"type":"null"}]},"background_image_url":{"anyOf":[{"type":"string","maxLength":512,"format":"uri","description":"An https URL. Upload a picture first with images.upload and use its URL."},{"type":"null"}]},"background_style":{"type":"string","enum":["gradient","solid"]},"message":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"layout":{"type":"object","properties":{"rounded_inputs":{"type":"boolean"},"rounded_corners":{"type":"object","properties":{"top_left":{"type":"boolean"},"top_right":{"type":"boolean"},"bottom_left":{"type":"boolean"},"bottom_right":{"type":"boolean"}}},"header_logo_padding":{"type":"boolean"},"header_top_radius":{"type":"boolean"},"box_shadow":{"type":"boolean"},"hide_footer":{"type":"boolean"}}},"is_default":{"default":false,"type":"boolean"}},"required":["name"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"is_default":{"type":"boolean","description":"The kit used when none is named: new emails and forms are drawn in it."},"colours":{"type":"object","properties":{"primary":{"description":"Buttons and links.","type":["string","null"]},"background":{"type":["string","null"]},"text":{"type":["string","null"]},"header":{"type":["string","null"]},"interface":{"type":["string","null"]},"footer":{"type":["string","null"]},"input":{"description":"Form fields.","type":["string","null"]}},"required":["primary","background","text","header","interface","footer","input"],"additionalProperties":false},"fonts":{"type":"object","properties":{"heading":{"type":["string","null"]},"body":{"type":["string","null"]}},"required":["heading","body"],"additionalProperties":false},"logo_url":{"type":["string","null"]},"background_style":{"type":"string","enum":["gradient","solid"]},"background_image_url":{"type":["string","null"]},"message":{"description":"Words shown on the WiFi sign-in page.","type":["string","null"]},"layout":{"type":"object","properties":{"rounded_inputs":{"type":"boolean"},"rounded_corners":{"type":"object","properties":{"top_left":{"type":"boolean"},"top_right":{"type":"boolean"},"bottom_left":{"type":"boolean"},"bottom_right":{"type":"boolean"}},"required":["top_left","top_right","bottom_left","bottom_right"],"additionalProperties":false},"header_logo_padding":{"type":"boolean"},"header_top_radius":{"type":"boolean"},"box_shadow":{"type":"boolean"},"hide_footer":{"type":"boolean"}},"required":["rounded_inputs","rounded_corners","header_logo_padding","header_top_radius","box_shadow","hide_footer"],"additionalProperties":false},"has_custom_css":{"type":"boolean","description":"Custom CSS is set in Stampede only."}},"required":["id","name","is_default","colours","fonts","logo_url","background_style","background_image_url","message","layout","has_custom_css"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/brand-kits/{brand_kit_id}":{"get":{"operationId":"brand_kits.get","tags":["Brand kits"],"summary":"Get a brand kit","description":"Every setting of a kit: colours, fonts, logo and background, the WiFi sign-in message and the layout.","security":[{"oauth2":["marketing:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"brand_kit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"is_default":{"type":"boolean","description":"The kit used when none is named: new emails and forms are drawn in it."},"colours":{"type":"object","properties":{"primary":{"description":"Buttons and links.","type":["string","null"]},"background":{"type":["string","null"]},"text":{"type":["string","null"]},"header":{"type":["string","null"]},"interface":{"type":["string","null"]},"footer":{"type":["string","null"]},"input":{"description":"Form fields.","type":["string","null"]}},"required":["primary","background","text","header","interface","footer","input"],"additionalProperties":false},"fonts":{"type":"object","properties":{"heading":{"type":["string","null"]},"body":{"type":["string","null"]}},"required":["heading","body"],"additionalProperties":false},"logo_url":{"type":["string","null"]},"background_style":{"type":"string","enum":["gradient","solid"]},"background_image_url":{"type":["string","null"]},"message":{"description":"Words shown on the WiFi sign-in page.","type":["string","null"]},"layout":{"type":"object","properties":{"rounded_inputs":{"type":"boolean"},"rounded_corners":{"type":"object","properties":{"top_left":{"type":"boolean"},"top_right":{"type":"boolean"},"bottom_left":{"type":"boolean"},"bottom_right":{"type":"boolean"}},"required":["top_left","top_right","bottom_left","bottom_right"],"additionalProperties":false},"header_logo_padding":{"type":"boolean"},"header_top_radius":{"type":"boolean"},"box_shadow":{"type":"boolean"},"hide_footer":{"type":"boolean"}},"required":["rounded_inputs","rounded_corners","header_logo_padding","header_top_radius","box_shadow","hide_footer"],"additionalProperties":false},"has_custom_css":{"type":"boolean","description":"Custom CSS is set in Stampede only."}},"required":["id","name","is_default","colours","fonts","logo_url","background_style","background_image_url","message","layout","has_custom_css"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"brand_kits.update","tags":["Brand kits"],"summary":"Change a brand kit","description":"Send only what changes. Everything drawn in the kit (WiFi sign-in pages, forms, review pages, loyalty passes, emails made from it) shows the change, so say so and confirm first. To make it the default, brand_kits.set_default.","security":[{"oauth2":["marketing:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"brand_kit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"colours":{"type":"object","properties":{"primary":{"type":"string","pattern":"^(#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?|rgba?\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*(,\\s*(0|1|0?\\.\\d+)\\s*)?\\))$"},"background":{"type":"string","pattern":"^(#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?|rgba?\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*(,\\s*(0|1|0?\\.\\d+)\\s*)?\\))$"},"text":{"type":"string","pattern":"^(#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?|rgba?\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*(,\\s*(0|1|0?\\.\\d+)\\s*)?\\))$"},"header":{"type":"string","pattern":"^(#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?|rgba?\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*(,\\s*(0|1|0?\\.\\d+)\\s*)?\\))$"},"interface":{"type":"string","pattern":"^(#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?|rgba?\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*(,\\s*(0|1|0?\\.\\d+)\\s*)?\\))$"},"footer":{"type":"string","pattern":"^(#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?|rgba?\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*(,\\s*(0|1|0?\\.\\d+)\\s*)?\\))$"},"input":{"type":"string","pattern":"^(#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?|rgba?\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*(,\\s*(0|1|0?\\.\\d+)\\s*)?\\))$"}}},"fonts":{"type":"object","properties":{"heading":{"type":"string","minLength":1,"maxLength":100},"body":{"type":"string","minLength":1,"maxLength":100}}},"logo_url":{"anyOf":[{"type":"string","maxLength":512,"format":"uri","description":"An https URL. Upload a picture first with images.upload and use its URL."},{"type":"null"}]},"background_image_url":{"anyOf":[{"type":"string","maxLength":512,"format":"uri","description":"An https URL. Upload a picture first with images.upload and use its URL."},{"type":"null"}]},"background_style":{"type":"string","enum":["gradient","solid"]},"message":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"layout":{"type":"object","properties":{"rounded_inputs":{"type":"boolean"},"rounded_corners":{"type":"object","properties":{"top_left":{"type":"boolean"},"top_right":{"type":"boolean"},"bottom_left":{"type":"boolean"},"bottom_right":{"type":"boolean"}}},"header_logo_padding":{"type":"boolean"},"header_top_radius":{"type":"boolean"},"box_shadow":{"type":"boolean"},"hide_footer":{"type":"boolean"}}}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"is_default":{"type":"boolean","description":"The kit used when none is named: new emails and forms are drawn in it."},"colours":{"type":"object","properties":{"primary":{"description":"Buttons and links.","type":["string","null"]},"background":{"type":["string","null"]},"text":{"type":["string","null"]},"header":{"type":["string","null"]},"interface":{"type":["string","null"]},"footer":{"type":["string","null"]},"input":{"description":"Form fields.","type":["string","null"]}},"required":["primary","background","text","header","interface","footer","input"],"additionalProperties":false},"fonts":{"type":"object","properties":{"heading":{"type":["string","null"]},"body":{"type":["string","null"]}},"required":["heading","body"],"additionalProperties":false},"logo_url":{"type":["string","null"]},"background_style":{"type":"string","enum":["gradient","solid"]},"background_image_url":{"type":["string","null"]},"message":{"description":"Words shown on the WiFi sign-in page.","type":["string","null"]},"layout":{"type":"object","properties":{"rounded_inputs":{"type":"boolean"},"rounded_corners":{"type":"object","properties":{"top_left":{"type":"boolean"},"top_right":{"type":"boolean"},"bottom_left":{"type":"boolean"},"bottom_right":{"type":"boolean"}},"required":["top_left","top_right","bottom_left","bottom_right"],"additionalProperties":false},"header_logo_padding":{"type":"boolean"},"header_top_radius":{"type":"boolean"},"box_shadow":{"type":"boolean"},"hide_footer":{"type":"boolean"}},"required":["rounded_inputs","rounded_corners","header_logo_padding","header_top_radius","box_shadow","hide_footer"],"additionalProperties":false},"has_custom_css":{"type":"boolean","description":"Custom CSS is set in Stampede only."}},"required":["id","name","is_default","colours","fonts","logo_url","background_style","background_image_url","message","layout","has_custom_css"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"brand_kits.delete","tags":["Brand kits"],"summary":"Delete a brand kit","description":"Refused for the default kit (make another the default first), and with 409 BRAND_KIT_IN_USE, naming them, while a venue, form, review page or loyalty scheme is drawn in it: move them to another kit first. Emails keep their own copy and fall back to the default kit when edited.","security":[{"oauth2":["marketing:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"brand_kit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/brand-kits/{brand_kit_id}/set-default":{"post":{"operationId":"brand_kits.set_default","tags":["Brand kits"],"summary":"Make a brand kit the default","description":"Makes it the kit used wherever none is named (new emails, new forms, venues without their own); the old default stops being one.","security":[{"oauth2":["marketing:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"brand_kit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"is_default":{"type":"boolean","description":"The kit used when none is named: new emails and forms are drawn in it."},"colours":{"type":"object","properties":{"primary":{"description":"Buttons and links.","type":["string","null"]},"background":{"type":["string","null"]},"text":{"type":["string","null"]},"header":{"type":["string","null"]},"interface":{"type":["string","null"]},"footer":{"type":["string","null"]},"input":{"description":"Form fields.","type":["string","null"]}},"required":["primary","background","text","header","interface","footer","input"],"additionalProperties":false},"fonts":{"type":"object","properties":{"heading":{"type":["string","null"]},"body":{"type":["string","null"]}},"required":["heading","body"],"additionalProperties":false},"logo_url":{"type":["string","null"]},"background_style":{"type":"string","enum":["gradient","solid"]},"background_image_url":{"type":["string","null"]},"message":{"description":"Words shown on the WiFi sign-in page.","type":["string","null"]},"layout":{"type":"object","properties":{"rounded_inputs":{"type":"boolean"},"rounded_corners":{"type":"object","properties":{"top_left":{"type":"boolean"},"top_right":{"type":"boolean"},"bottom_left":{"type":"boolean"},"bottom_right":{"type":"boolean"}},"required":["top_left","top_right","bottom_left","bottom_right"],"additionalProperties":false},"header_logo_padding":{"type":"boolean"},"header_top_radius":{"type":"boolean"},"box_shadow":{"type":"boolean"},"hide_footer":{"type":"boolean"}},"required":["rounded_inputs","rounded_corners","header_logo_padding","header_top_radius","box_shadow","hide_footer"],"additionalProperties":false},"has_custom_css":{"type":"boolean","description":"Custom CSS is set in Stampede only."}},"required":["id","name","is_default","colours","fonts","logo_url","background_style","background_image_url","message","layout","has_custom_css"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/reviews":{"get":{"operationId":"reviews.list","tags":["Reviews"],"summary":"List reviews","description":"Reviews of the organisation's venues, newest first: Google, Stampede's review page and WiFi, with rating, text, sentiment and any reply. Guests' details need guests:read. Filters are applied by Stampede and again here, so a page can hold fewer than limit; follow cursor until it is null.","security":[{"oauth2":["reviews:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `cursor` from the previous page.","schema":{"type":"string","minLength":1}},{"name":"venue_id","in":"query","required":false,"description":"Only this venue's. Without it, every venue you can see.","schema":{"type":"string","minLength":1}},{"name":"platform","in":"query","required":false,"description":"google: from the venue's Google Business Profile. stampede: Stampede's review page. wifi: left when signing in to the WiFi.","schema":{"type":"string","enum":["google","stampede","wifi","tripadvisor","facebook"]}},{"name":"rating","in":"query","required":false,"description":"Only reviews with this many stars.","schema":{"type":"integer","minimum":1,"maximum":5}},{"name":"sentiment","in":"query","required":false,"schema":{"type":"string","enum":["positive","negative","neutral","mixed"]}},{"name":"handled","in":"query","required":false,"description":"true: only those marked handled or replied to. false: only those still to deal with.","schema":{"type":"string","enum":["true","false"]}},{"name":"text","in":"query","required":false,"description":"Only reviews whose text contains this.","schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"sort","in":"query","required":false,"schema":{"default":"newest","type":"string","enum":["newest","oldest"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"venue_id":{"type":["string","null"]},"review_page_id":{"type":"string"},"platform":{"type":"string","enum":["google","stampede","wifi","tripadvisor","facebook"],"description":"google: from the venue's Google Business Profile. stampede: Stampede's review page. wifi: left when signing in to the WiFi."},"rating":{"description":"1 to 5.","type":["number","null"]},"text":{"type":["string","null"]},"sentiment":{"anyOf":[{"type":"string","enum":["positive","negative","neutral","mixed"]},{"type":"null"}],"description":"Worked out by Stampede from the text. Null when there is no text to judge."},"keywords":{"type":"array","items":{"type":"string"},"description":"Phrases Stampede picked out of the text."},"reviewer_name":{"description":"The name Google shows for a Google review. Null for others: see guest.","type":["string","null"]},"guest_id":{"description":"The guest who left it (guests.get), when Stampede knows them. Most Google reviews have none.","type":["string","null"]},"guest":{"anyOf":[{"type":"object","properties":{"email":{"type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]}},"required":["email","first_name","last_name"],"additionalProperties":false},{"type":"null"}],"description":"The guest's details, with guests:read. Null without it, or when there is no guest."},"handled":{"type":"boolean","description":"Marked as dealt with (reviews.update), or replied to."},"handled_at":{"type":["string","null"]},"reply":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"replied_at":{"type":["string","null"]}},"required":["text","replied_at"],"additionalProperties":false},{"type":"null"}],"description":"The reply on Google. Email replies to Stampede and WiFi reviews are not shown here."},"replied_at":{"type":["string","null"]},"can_reply":{"type":"boolean","description":"Whether reviews.reply can answer it: a Google review from a Business Profile connected to Stampede, or a Stampede or WiFi review from a guest with an email address."},"reply_via":{"anyOf":[{"type":"string","enum":["google","email"]},{"type":"null"}],"description":"How reviews.reply answers it: posted on Google, or emailed to the guest. Null when it cannot."},"created_at":{"type":"string"}},"required":["id","venue_id","review_page_id","platform","rating","text","sentiment","keywords","reviewer_name","guest_id","guest","handled","handled_at","reply","replied_at","can_reply","reply_via","created_at"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/reviews/{review_id}":{"get":{"operationId":"reviews.get","tags":["Reviews"],"summary":"Get a review","description":"One review, with any reply. The guest's details need guests:read.","security":[{"oauth2":["reviews:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"venue_id":{"type":["string","null"]},"review_page_id":{"type":"string"},"platform":{"type":"string","enum":["google","stampede","wifi","tripadvisor","facebook"],"description":"google: from the venue's Google Business Profile. stampede: Stampede's review page. wifi: left when signing in to the WiFi."},"rating":{"description":"1 to 5.","type":["number","null"]},"text":{"type":["string","null"]},"sentiment":{"anyOf":[{"type":"string","enum":["positive","negative","neutral","mixed"]},{"type":"null"}],"description":"Worked out by Stampede from the text. Null when there is no text to judge."},"keywords":{"type":"array","items":{"type":"string"},"description":"Phrases Stampede picked out of the text."},"reviewer_name":{"description":"The name Google shows for a Google review. Null for others: see guest.","type":["string","null"]},"guest_id":{"description":"The guest who left it (guests.get), when Stampede knows them. Most Google reviews have none.","type":["string","null"]},"guest":{"anyOf":[{"type":"object","properties":{"email":{"type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]}},"required":["email","first_name","last_name"],"additionalProperties":false},{"type":"null"}],"description":"The guest's details, with guests:read. Null without it, or when there is no guest."},"handled":{"type":"boolean","description":"Marked as dealt with (reviews.update), or replied to."},"handled_at":{"type":["string","null"]},"reply":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"replied_at":{"type":["string","null"]}},"required":["text","replied_at"],"additionalProperties":false},{"type":"null"}],"description":"The reply on Google. Email replies to Stampede and WiFi reviews are not shown here."},"replied_at":{"type":["string","null"]},"can_reply":{"type":"boolean","description":"Whether reviews.reply can answer it: a Google review from a Business Profile connected to Stampede, or a Stampede or WiFi review from a guest with an email address."},"reply_via":{"anyOf":[{"type":"string","enum":["google","email"]},{"type":"null"}],"description":"How reviews.reply answers it: posted on Google, or emailed to the guest. Null when it cannot."},"created_at":{"type":"string"}},"required":["id","venue_id","review_page_id","platform","rating","text","sentiment","keywords","reviewer_name","guest_id","guest","handled","handled_at","reply","replied_at","can_reply","reply_via","created_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"reviews.update","tags":["Reviews"],"summary":"Mark a review handled","description":"Marks a review as dealt with, or not. Nothing is sent to the guest.","security":[{"oauth2":["reviews:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"handled":{"type":"boolean"}},"required":["handled"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"venue_id":{"type":["string","null"]},"review_page_id":{"type":"string"},"platform":{"type":"string","enum":["google","stampede","wifi","tripadvisor","facebook"],"description":"google: from the venue's Google Business Profile. stampede: Stampede's review page. wifi: left when signing in to the WiFi."},"rating":{"description":"1 to 5.","type":["number","null"]},"text":{"type":["string","null"]},"sentiment":{"anyOf":[{"type":"string","enum":["positive","negative","neutral","mixed"]},{"type":"null"}],"description":"Worked out by Stampede from the text. Null when there is no text to judge."},"keywords":{"type":"array","items":{"type":"string"},"description":"Phrases Stampede picked out of the text."},"reviewer_name":{"description":"The name Google shows for a Google review. Null for others: see guest.","type":["string","null"]},"guest_id":{"description":"The guest who left it (guests.get), when Stampede knows them. Most Google reviews have none.","type":["string","null"]},"guest":{"anyOf":[{"type":"object","properties":{"email":{"type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]}},"required":["email","first_name","last_name"],"additionalProperties":false},{"type":"null"}],"description":"The guest's details, with guests:read. Null without it, or when there is no guest."},"handled":{"type":"boolean","description":"Marked as dealt with (reviews.update), or replied to."},"handled_at":{"type":["string","null"]},"reply":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"replied_at":{"type":["string","null"]}},"required":["text","replied_at"],"additionalProperties":false},{"type":"null"}],"description":"The reply on Google. Email replies to Stampede and WiFi reviews are not shown here."},"replied_at":{"type":["string","null"]},"can_reply":{"type":"boolean","description":"Whether reviews.reply can answer it: a Google review from a Business Profile connected to Stampede, or a Stampede or WiFi review from a guest with an email address."},"reply_via":{"anyOf":[{"type":"string","enum":["google","email"]},{"type":"null"}],"description":"How reviews.reply answers it: posted on Google, or emailed to the guest. Null when it cannot."},"created_at":{"type":"string"}},"required":["id","venue_id","review_page_id","platform","rating","text","sentiment","keywords","reviewer_name","guest_id","guest","handled","handled_at","reply","replied_at","can_reply","reply_via","created_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/reviews/stats":{"get":{"operationId":"reviews.stats","tags":["Reviews"],"summary":"Review stats","description":"How reviews went over a period: how many, the average rating, how many of each star, NPS, each platform, sentiment, and the same over time by day, week or month. For one venue, or every venue (which needs access to every venue). The period defaults to the last 30 days.","security":[{"oauth2":["reviews:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"since","in":"query","required":false,"description":"ISO 8601. Default 30 days ago.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"until","in":"query","required":false,"description":"ISO 8601. Default now.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"group_by","in":"query","required":false,"schema":{"default":"week","type":"string","enum":["day","week","month"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"since":{"type":"string"},"until":{"type":"string"},"reviews":{"type":"number"},"average_rating":{"description":"Null when there are no reviews.","type":["number","null"]},"ratings":{"type":"object","properties":{"1":{"type":"number"},"2":{"type":"number"},"3":{"type":"number"},"4":{"type":"number"},"5":{"type":"number"}},"required":["1","2","3","4","5"],"additionalProperties":false},"nps":{"description":"Share of 5 star reviews minus share of 1 and 2 star reviews, -100 to 100. Null when there are none.","type":["number","null"]},"platforms":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","enum":["google","stampede","wifi","tripadvisor","facebook"],"description":"google: from the venue's Google Business Profile. stampede: Stampede's review page. wifi: left when signing in to the WiFi."},"reviews":{"type":"number"},"average_rating":{"type":["number","null"]}},"required":["platform","reviews","average_rating"],"additionalProperties":false}},"sentiment":{"type":"object","properties":{"positive":{"type":"number"},"negative":{"type":"number"},"neutral":{"type":"number"},"mixed":{"type":"number"},"none":{"type":"number","description":"No text to judge."}},"required":["positive","negative","neutral","mixed","none"],"additionalProperties":false},"over_time":{"type":"array","items":{"type":"object","properties":{"period_start":{"type":"string"},"reviews":{"type":"number"},"average_rating":{"type":["number","null"]},"positive":{"type":"number"},"negative":{"type":"number"},"mixed":{"type":"number"}},"required":["period_start","reviews","average_rating","positive","negative","mixed"],"additionalProperties":false}}},"required":["since","until","reviews","average_rating","ratings","nps","platforms","sentiment","over_time"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/review-pages":{"get":{"operationId":"review_pages.list","tags":["Reviews"],"summary":"List review pages","description":"Each venue's review page: where guests leave a review, and whether it is switched on.","security":[{"oauth2":["reviews:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"venue_id":{"type":"string"},"title":{"type":["string","null"]},"active":{"type":"boolean"},"url":{"type":"string","description":"Where guests leave a review."}},"required":["id","venue_id","title","active","url"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"review_pages.create","tags":["Reviews"],"summary":"Create a review page","description":"Makes a venue's review page, where guests leave a review, with Stampede's default request email (sent an hour after a visit) in the organisation's default brand kit. A venue has one page: refused with 409 if it already has one. Change it after with review_pages.update.","security":[{"oauth2":["reviews:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"venue_id":{"type":"string","minLength":1},"title":{"description":"The heading guests see. Default the venue's name.","type":"string","minLength":1,"maxLength":255},"active":{"default":true,"type":"boolean"},"google_place_id":{"default":null,"description":"The venue's Google Place ID, to send happy guests on to Google.","anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"brand_kit_id":{"description":"From brand_kits.list. Default the organisation's default kit.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["venue_id"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"venue_id":{"type":"string"},"title":{"type":["string","null"]},"active":{"type":"boolean"},"url":{"type":"string","description":"Where guests leave a review."},"request_email":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether a guest is emailed asking for a review after a visit."},"subject":{"type":["string","null"]},"body":{"type":["string","null"]},"footer":{"type":["string","null"]},"send_after_minutes":{"description":"How long after the visit.","type":["number","null"]}},"required":["enabled","subject","body","footer","send_after_minutes"],"additionalProperties":false},"external":{"type":"object","properties":{"google_enabled":{"type":"boolean"},"google_place_id":{"type":["string","null"]},"tripadvisor_url":{"type":["string","null"]},"from_rating":{"description":"Guests who rate this many stars or more are asked to post on Google or TripAdvisor too.","type":["number","null"]}},"required":["google_enabled","google_place_id","tripadvisor_url","from_rating"],"additionalProperties":false},"brand_kit_id":{"type":["string","null"]}},"required":["id","venue_id","title","active","url","request_email","external","brand_kit_id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/review-pages/{review_page_id}":{"get":{"operationId":"review_pages.get","tags":["Reviews"],"summary":"Get a review page","description":"A review page: its link, the email asking guests for a review after a visit, whether happy guests are sent on to Google or TripAdvisor, and its brand kit. Changed in Stampede.","security":[{"oauth2":["reviews:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"review_page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"venue_id":{"type":"string"},"title":{"type":["string","null"]},"active":{"type":"boolean"},"url":{"type":"string","description":"Where guests leave a review."},"request_email":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether a guest is emailed asking for a review after a visit."},"subject":{"type":["string","null"]},"body":{"type":["string","null"]},"footer":{"type":["string","null"]},"send_after_minutes":{"description":"How long after the visit.","type":["number","null"]}},"required":["enabled","subject","body","footer","send_after_minutes"],"additionalProperties":false},"external":{"type":"object","properties":{"google_enabled":{"type":"boolean"},"google_place_id":{"type":["string","null"]},"tripadvisor_url":{"type":["string","null"]},"from_rating":{"description":"Guests who rate this many stars or more are asked to post on Google or TripAdvisor too.","type":["number","null"]}},"required":["google_enabled","google_place_id","tripadvisor_url","from_rating"],"additionalProperties":false},"brand_kit_id":{"type":["string","null"]}},"required":["id","venue_id","title","active","url","request_email","external","brand_kit_id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"review_pages.update","tags":["Reviews"],"summary":"Change a review page","description":"Changes a venue's review page and the email asking guests for a review after a visit. Send only what changes. Guests see it at once; the request email goes to guests after their next visits. Confirm with the person first, and send a test (review_pages.send_test) after changing the email.","security":[{"oauth2":["reviews:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"review_page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"description":"The heading guests see on the page.","type":"string","minLength":1,"maxLength":255},"active":{"description":"Whether the page takes reviews.","type":"boolean"},"request_email":{"type":"object","properties":{"enabled":{"description":"Email guests after a visit asking for a review.","type":"boolean"},"subject":{"type":"string","minLength":1,"maxLength":255},"body":{"type":"string","minLength":1,"maxLength":5000},"footer":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"send_after_minutes":{"description":"How long after the visit, up to 14 days.","type":"integer","minimum":0,"maximum":20160}}},"external":{"type":"object","properties":{"google_enabled":{"description":"Ask happy guests to post on Google too.","type":"boolean"},"tripadvisor_url":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"from_rating":{"description":"Guests who rate this many stars or more are asked.","type":"integer","minimum":1,"maximum":5}}},"brand_kit_id":{"description":"From brand_kits.list.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"venue_id":{"type":"string"},"title":{"type":["string","null"]},"active":{"type":"boolean"},"url":{"type":"string","description":"Where guests leave a review."},"request_email":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether a guest is emailed asking for a review after a visit."},"subject":{"type":["string","null"]},"body":{"type":["string","null"]},"footer":{"type":["string","null"]},"send_after_minutes":{"description":"How long after the visit.","type":["number","null"]}},"required":["enabled","subject","body","footer","send_after_minutes"],"additionalProperties":false},"external":{"type":"object","properties":{"google_enabled":{"type":"boolean"},"google_place_id":{"type":["string","null"]},"tripadvisor_url":{"type":["string","null"]},"from_rating":{"description":"Guests who rate this many stars or more are asked to post on Google or TripAdvisor too.","type":["number","null"]}},"required":["google_enabled","google_place_id","tripadvisor_url","from_rating"],"additionalProperties":false},"brand_kit_id":{"type":["string","null"]}},"required":["id","venue_id","title","active","url","request_email","external","brand_kit_id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"review_pages.delete","tags":["Reviews"],"summary":"Delete a review page","description":"Takes a venue's review page down: guests can no longer leave a review there and no review request emails go out for it. Its reviews are kept. Confirm with the person first.","security":[{"oauth2":["reviews:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"review_page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/reviews/{review_id}/reply-suggestion":{"post":{"operationId":"reviews.reply_suggestion","tags":["Reviews"],"summary":"Suggest a reply","description":"A reply written by Stampede's AI in the venue's voice (its review page's prompt, when it has one). Nothing is posted or saved: show it to the person, change it with them, then post it with reviews.reply.","security":[{"oauth2":["reviews:write"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/reviews/{review_id}/reply":{"post":{"operationId":"reviews.reply","tags":["Reviews"],"summary":"Reply to a review","description":"Answers a review as reply_via says, and marks it handled. A Google review: the reply is posted on Google, in public, under the venue's name. A Stampede or WiFi review: the reply is emailed to the guest from Stampede's inbox (a thread tied to the review, where their answer arrives), and cannot be taken back. Show the person the exact words and get their yes first. A review already answered is refused unless replace is true (on Google it replaces the reply; by email it sends another). A review that cannot be answered (can_reply false) is refused with REPLY_NOT_SUPPORTED. Needs reviews:reply, which a token only has when given it by name.","security":[{"oauth2":["reviews:reply"]}],"x-kind":"write","x-mcp":true,"x-support":false,"x-admin-only":true,"parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":4000,"description":"The reply, as the guest will read it. Plain text; line breaks are kept."},"subject":{"description":"For an emailed reply: its subject. Default \"Thank you for your review\".","type":"string","minLength":1,"maxLength":200},"replace":{"default":false,"description":"Answer a review that already has a reply: on Google it replaces it, by email it sends another.","type":"boolean"}},"required":["text"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"venue_id":{"type":["string","null"]},"review_page_id":{"type":"string"},"platform":{"type":"string","enum":["google","stampede","wifi","tripadvisor","facebook"],"description":"google: from the venue's Google Business Profile. stampede: Stampede's review page. wifi: left when signing in to the WiFi."},"rating":{"description":"1 to 5.","type":["number","null"]},"text":{"type":["string","null"]},"sentiment":{"anyOf":[{"type":"string","enum":["positive","negative","neutral","mixed"]},{"type":"null"}],"description":"Worked out by Stampede from the text. Null when there is no text to judge."},"keywords":{"type":"array","items":{"type":"string"},"description":"Phrases Stampede picked out of the text."},"reviewer_name":{"description":"The name Google shows for a Google review. Null for others: see guest.","type":["string","null"]},"guest_id":{"description":"The guest who left it (guests.get), when Stampede knows them. Most Google reviews have none.","type":["string","null"]},"guest":{"anyOf":[{"type":"object","properties":{"email":{"type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]}},"required":["email","first_name","last_name"],"additionalProperties":false},{"type":"null"}],"description":"The guest's details, with guests:read. Null without it, or when there is no guest."},"handled":{"type":"boolean","description":"Marked as dealt with (reviews.update), or replied to."},"handled_at":{"type":["string","null"]},"reply":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"replied_at":{"type":["string","null"]}},"required":["text","replied_at"],"additionalProperties":false},{"type":"null"}],"description":"The reply on Google. Email replies to Stampede and WiFi reviews are not shown here."},"replied_at":{"type":["string","null"]},"can_reply":{"type":"boolean","description":"Whether reviews.reply can answer it: a Google review from a Business Profile connected to Stampede, or a Stampede or WiFi review from a guest with an email address."},"reply_via":{"anyOf":[{"type":"string","enum":["google","email"]},{"type":"null"}],"description":"How reviews.reply answers it: posted on Google, or emailed to the guest. Null when it cannot."},"created_at":{"type":"string"}},"required":["id","venue_id","review_page_id","platform","rating","text","sentiment","keywords","reviewer_name","guest_id","guest","handled","handled_at","reply","replied_at","can_reply","reply_via","created_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"reviews.reply.delete","tags":["Reviews"],"summary":"Delete a reply","description":"Takes the venue's reply to a Google review off Google. Confirm with the person first.","security":[{"oauth2":["reviews:reply"]}],"x-kind":"write","x-mcp":true,"x-support":false,"x-admin-only":true,"parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"venue_id":{"type":["string","null"]},"review_page_id":{"type":"string"},"platform":{"type":"string","enum":["google","stampede","wifi","tripadvisor","facebook"],"description":"google: from the venue's Google Business Profile. stampede: Stampede's review page. wifi: left when signing in to the WiFi."},"rating":{"description":"1 to 5.","type":["number","null"]},"text":{"type":["string","null"]},"sentiment":{"anyOf":[{"type":"string","enum":["positive","negative","neutral","mixed"]},{"type":"null"}],"description":"Worked out by Stampede from the text. Null when there is no text to judge."},"keywords":{"type":"array","items":{"type":"string"},"description":"Phrases Stampede picked out of the text."},"reviewer_name":{"description":"The name Google shows for a Google review. Null for others: see guest.","type":["string","null"]},"guest_id":{"description":"The guest who left it (guests.get), when Stampede knows them. Most Google reviews have none.","type":["string","null"]},"guest":{"anyOf":[{"type":"object","properties":{"email":{"type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]}},"required":["email","first_name","last_name"],"additionalProperties":false},{"type":"null"}],"description":"The guest's details, with guests:read. Null without it, or when there is no guest."},"handled":{"type":"boolean","description":"Marked as dealt with (reviews.update), or replied to."},"handled_at":{"type":["string","null"]},"reply":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"replied_at":{"type":["string","null"]}},"required":["text","replied_at"],"additionalProperties":false},{"type":"null"}],"description":"The reply on Google. Email replies to Stampede and WiFi reviews are not shown here."},"replied_at":{"type":["string","null"]},"can_reply":{"type":"boolean","description":"Whether reviews.reply can answer it: a Google review from a Business Profile connected to Stampede, or a Stampede or WiFi review from a guest with an email address."},"reply_via":{"anyOf":[{"type":"string","enum":["google","email"]},{"type":"null"}],"description":"How reviews.reply answers it: posted on Google, or emailed to the guest. Null when it cannot."},"created_at":{"type":"string"}},"required":["id","venue_id","review_page_id","platform","rating","text","sentiment","keywords","reviewer_name","guest_id","guest","handled","handled_at","reply","replied_at","can_reply","reply_via","created_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/review-pages/{review_page_id}/send-test":{"post":{"operationId":"review_pages.send_test","tags":["Reviews"],"summary":"Send a test review request","description":"Sends the page's review request email to one address, as a guest would get it after a visit, so the person can check it in their inbox. Never to guests.","security":[{"oauth2":["reviews:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"review_page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"The person's own address."},"name":{"default":"Test guest","description":"The name the email greets.","type":"string","minLength":1,"maxLength":100}},"required":["email"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"sent_to":{"type":"string"}},"required":["sent_to"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/reviews/reply-drafts":{"get":{"operationId":"reviews.drafts.list","tags":["Reviews"],"summary":"List AI draft replies","description":"Replies Stampede's AI drafted by itself, from the organisation's automatic reply rules, newest first. pending ones wait for a person: read each with its review, change it if needed (reviews.drafts.update), then approve (reviews.drafts.approve, which sends it) or reject.","security":[{"oauth2":["reviews:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `cursor` from the previous page.","schema":{"type":"string","minLength":1}},{"name":"status","in":"query","required":false,"schema":{"default":"pending","type":"string","enum":["pending","approved","sent","rejected","expired"]}},{"name":"review_page_id","in":"query","required":false,"description":"Only this review page's (one venue).","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"review":{"type":"object","properties":{"id":{"type":"string"},"venue_id":{"type":["string","null"]},"review_page_id":{"type":"string"},"platform":{"type":"string","enum":["google","stampede","wifi","tripadvisor","facebook"],"description":"google: from the venue's Google Business Profile. stampede: Stampede's review page. wifi: left when signing in to the WiFi."},"rating":{"description":"1 to 5.","type":["number","null"]},"text":{"type":["string","null"]},"sentiment":{"anyOf":[{"type":"string","enum":["positive","negative","neutral","mixed"]},{"type":"null"}],"description":"Worked out by Stampede from the text. Null when there is no text to judge."},"keywords":{"type":"array","items":{"type":"string"},"description":"Phrases Stampede picked out of the text."},"reviewer_name":{"description":"The name Google shows for a Google review. Null for others: see guest.","type":["string","null"]},"guest_id":{"description":"The guest who left it (guests.get), when Stampede knows them. Most Google reviews have none.","type":["string","null"]},"guest":{"anyOf":[{"type":"object","properties":{"email":{"type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]}},"required":["email","first_name","last_name"],"additionalProperties":false},{"type":"null"}],"description":"The guest's details, with guests:read. Null without it, or when there is no guest."},"handled":{"type":"boolean","description":"Marked as dealt with (reviews.update), or replied to."},"handled_at":{"type":["string","null"]},"reply":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"replied_at":{"type":["string","null"]}},"required":["text","replied_at"],"additionalProperties":false},{"type":"null"}],"description":"The reply on Google. Email replies to Stampede and WiFi reviews are not shown here."},"replied_at":{"type":["string","null"]},"can_reply":{"type":"boolean","description":"Whether reviews.reply can answer it: a Google review from a Business Profile connected to Stampede, or a Stampede or WiFi review from a guest with an email address."},"reply_via":{"anyOf":[{"type":"string","enum":["google","email"]},{"type":"null"}],"description":"How reviews.reply answers it: posted on Google, or emailed to the guest. Null when it cannot."},"created_at":{"type":"string"}},"required":["id","venue_id","review_page_id","platform","rating","text","sentiment","keywords","reviewer_name","guest_id","guest","handled","handled_at","reply","replied_at","can_reply","reply_via","created_at"],"additionalProperties":false},"text":{"type":"string"},"status":{"type":"string","enum":["pending","approved","sent","rejected","expired"],"description":"pending: waiting for a person. approved: being sent. sent. rejected. expired: the review was dealt with another way."},"auto":{"type":"boolean","description":"Drafted by one of the organisation's automatic reply rules."},"created_at":{"type":"string"},"edited_at":{"type":["string","null"]},"decided_at":{"description":"When it was approved or rejected.","type":["string","null"]},"sent_at":{"type":["string","null"]},"error":{"description":"Why sending failed, when it did.","type":["string","null"]}},"required":["id","review","text","status","auto","created_at","edited_at","decided_at","sent_at","error"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/reviews/reply-drafts/{draft_id}":{"patch":{"operationId":"reviews.drafts.update","tags":["Reviews"],"summary":"Change an AI draft reply","description":"Rewrites a pending draft before it is approved. Nothing is sent.","security":[{"oauth2":["reviews:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":4000}},"required":["text"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"review":{"type":"object","properties":{"id":{"type":"string"},"venue_id":{"type":["string","null"]},"review_page_id":{"type":"string"},"platform":{"type":"string","enum":["google","stampede","wifi","tripadvisor","facebook"],"description":"google: from the venue's Google Business Profile. stampede: Stampede's review page. wifi: left when signing in to the WiFi."},"rating":{"description":"1 to 5.","type":["number","null"]},"text":{"type":["string","null"]},"sentiment":{"anyOf":[{"type":"string","enum":["positive","negative","neutral","mixed"]},{"type":"null"}],"description":"Worked out by Stampede from the text. Null when there is no text to judge."},"keywords":{"type":"array","items":{"type":"string"},"description":"Phrases Stampede picked out of the text."},"reviewer_name":{"description":"The name Google shows for a Google review. Null for others: see guest.","type":["string","null"]},"guest_id":{"description":"The guest who left it (guests.get), when Stampede knows them. Most Google reviews have none.","type":["string","null"]},"guest":{"anyOf":[{"type":"object","properties":{"email":{"type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]}},"required":["email","first_name","last_name"],"additionalProperties":false},{"type":"null"}],"description":"The guest's details, with guests:read. Null without it, or when there is no guest."},"handled":{"type":"boolean","description":"Marked as dealt with (reviews.update), or replied to."},"handled_at":{"type":["string","null"]},"reply":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"replied_at":{"type":["string","null"]}},"required":["text","replied_at"],"additionalProperties":false},{"type":"null"}],"description":"The reply on Google. Email replies to Stampede and WiFi reviews are not shown here."},"replied_at":{"type":["string","null"]},"can_reply":{"type":"boolean","description":"Whether reviews.reply can answer it: a Google review from a Business Profile connected to Stampede, or a Stampede or WiFi review from a guest with an email address."},"reply_via":{"anyOf":[{"type":"string","enum":["google","email"]},{"type":"null"}],"description":"How reviews.reply answers it: posted on Google, or emailed to the guest. Null when it cannot."},"created_at":{"type":"string"}},"required":["id","venue_id","review_page_id","platform","rating","text","sentiment","keywords","reviewer_name","guest_id","guest","handled","handled_at","reply","replied_at","can_reply","reply_via","created_at"],"additionalProperties":false},"text":{"type":"string"},"status":{"type":"string","enum":["pending","approved","sent","rejected","expired"],"description":"pending: waiting for a person. approved: being sent. sent. rejected. expired: the review was dealt with another way."},"auto":{"type":"boolean","description":"Drafted by one of the organisation's automatic reply rules."},"created_at":{"type":"string"},"edited_at":{"type":["string","null"]},"decided_at":{"description":"When it was approved or rejected.","type":["string","null"]},"sent_at":{"type":["string","null"]},"error":{"description":"Why sending failed, when it did.","type":["string","null"]}},"required":["id","review","text","status","auto","created_at","edited_at","decided_at","sent_at","error"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/reviews/reply-drafts/{draft_id}/approve":{"post":{"operationId":"reviews.drafts.approve","tags":["Reviews"],"summary":"Approve and send an AI draft reply","description":"Sends a pending draft as it stands: posted on Google in public for a Google review, emailed to the guest for a Stampede or WiFi review. Show the person the exact words and get their yes first. Needs reviews:reply, which a token only has when given it by name.","security":[{"oauth2":["reviews:reply"]}],"x-kind":"write","x-mcp":true,"x-support":false,"x-admin-only":true,"parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"review":{"type":"object","properties":{"id":{"type":"string"},"venue_id":{"type":["string","null"]},"review_page_id":{"type":"string"},"platform":{"type":"string","enum":["google","stampede","wifi","tripadvisor","facebook"],"description":"google: from the venue's Google Business Profile. stampede: Stampede's review page. wifi: left when signing in to the WiFi."},"rating":{"description":"1 to 5.","type":["number","null"]},"text":{"type":["string","null"]},"sentiment":{"anyOf":[{"type":"string","enum":["positive","negative","neutral","mixed"]},{"type":"null"}],"description":"Worked out by Stampede from the text. Null when there is no text to judge."},"keywords":{"type":"array","items":{"type":"string"},"description":"Phrases Stampede picked out of the text."},"reviewer_name":{"description":"The name Google shows for a Google review. Null for others: see guest.","type":["string","null"]},"guest_id":{"description":"The guest who left it (guests.get), when Stampede knows them. Most Google reviews have none.","type":["string","null"]},"guest":{"anyOf":[{"type":"object","properties":{"email":{"type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]}},"required":["email","first_name","last_name"],"additionalProperties":false},{"type":"null"}],"description":"The guest's details, with guests:read. Null without it, or when there is no guest."},"handled":{"type":"boolean","description":"Marked as dealt with (reviews.update), or replied to."},"handled_at":{"type":["string","null"]},"reply":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"replied_at":{"type":["string","null"]}},"required":["text","replied_at"],"additionalProperties":false},{"type":"null"}],"description":"The reply on Google. Email replies to Stampede and WiFi reviews are not shown here."},"replied_at":{"type":["string","null"]},"can_reply":{"type":"boolean","description":"Whether reviews.reply can answer it: a Google review from a Business Profile connected to Stampede, or a Stampede or WiFi review from a guest with an email address."},"reply_via":{"anyOf":[{"type":"string","enum":["google","email"]},{"type":"null"}],"description":"How reviews.reply answers it: posted on Google, or emailed to the guest. Null when it cannot."},"created_at":{"type":"string"}},"required":["id","venue_id","review_page_id","platform","rating","text","sentiment","keywords","reviewer_name","guest_id","guest","handled","handled_at","reply","replied_at","can_reply","reply_via","created_at"],"additionalProperties":false},"text":{"type":"string"},"status":{"type":"string","enum":["pending","approved","sent","rejected","expired"],"description":"pending: waiting for a person. approved: being sent. sent. rejected. expired: the review was dealt with another way."},"auto":{"type":"boolean","description":"Drafted by one of the organisation's automatic reply rules."},"created_at":{"type":"string"},"edited_at":{"type":["string","null"]},"decided_at":{"description":"When it was approved or rejected.","type":["string","null"]},"sent_at":{"type":["string","null"]},"error":{"description":"Why sending failed, when it did.","type":["string","null"]}},"required":["id","review","text","status","auto","created_at","edited_at","decided_at","sent_at","error"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/reviews/reply-drafts/{draft_id}/reject":{"post":{"operationId":"reviews.drafts.reject","tags":["Reviews"],"summary":"Reject an AI draft reply","description":"Throws a pending draft away. Nothing is sent; the review stays to be answered another way.","security":[{"oauth2":["reviews:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"review":{"type":"object","properties":{"id":{"type":"string"},"venue_id":{"type":["string","null"]},"review_page_id":{"type":"string"},"platform":{"type":"string","enum":["google","stampede","wifi","tripadvisor","facebook"],"description":"google: from the venue's Google Business Profile. stampede: Stampede's review page. wifi: left when signing in to the WiFi."},"rating":{"description":"1 to 5.","type":["number","null"]},"text":{"type":["string","null"]},"sentiment":{"anyOf":[{"type":"string","enum":["positive","negative","neutral","mixed"]},{"type":"null"}],"description":"Worked out by Stampede from the text. Null when there is no text to judge."},"keywords":{"type":"array","items":{"type":"string"},"description":"Phrases Stampede picked out of the text."},"reviewer_name":{"description":"The name Google shows for a Google review. Null for others: see guest.","type":["string","null"]},"guest_id":{"description":"The guest who left it (guests.get), when Stampede knows them. Most Google reviews have none.","type":["string","null"]},"guest":{"anyOf":[{"type":"object","properties":{"email":{"type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]}},"required":["email","first_name","last_name"],"additionalProperties":false},{"type":"null"}],"description":"The guest's details, with guests:read. Null without it, or when there is no guest."},"handled":{"type":"boolean","description":"Marked as dealt with (reviews.update), or replied to."},"handled_at":{"type":["string","null"]},"reply":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"replied_at":{"type":["string","null"]}},"required":["text","replied_at"],"additionalProperties":false},{"type":"null"}],"description":"The reply on Google. Email replies to Stampede and WiFi reviews are not shown here."},"replied_at":{"type":["string","null"]},"can_reply":{"type":"boolean","description":"Whether reviews.reply can answer it: a Google review from a Business Profile connected to Stampede, or a Stampede or WiFi review from a guest with an email address."},"reply_via":{"anyOf":[{"type":"string","enum":["google","email"]},{"type":"null"}],"description":"How reviews.reply answers it: posted on Google, or emailed to the guest. Null when it cannot."},"created_at":{"type":"string"}},"required":["id","venue_id","review_page_id","platform","rating","text","sentiment","keywords","reviewer_name","guest_id","guest","handled","handled_at","reply","replied_at","can_reply","reply_via","created_at"],"additionalProperties":false},"text":{"type":"string"},"status":{"type":"string","enum":["pending","approved","sent","rejected","expired"],"description":"pending: waiting for a person. approved: being sent. sent. rejected. expired: the review was dealt with another way."},"auto":{"type":"boolean","description":"Drafted by one of the organisation's automatic reply rules."},"created_at":{"type":"string"},"edited_at":{"type":["string","null"]},"decided_at":{"description":"When it was approved or rejected.","type":["string","null"]},"sent_at":{"type":["string","null"]},"error":{"description":"Why sending failed, when it did.","type":["string","null"]}},"required":["id","review","text","status","auto","created_at","edited_at","decided_at","sent_at","error"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/reviews/insights":{"get":{"operationId":"reviews.insights","tags":["Reviews"],"summary":"Review insights","description":"What guests say about one venue, worked out by Stampede from review text over a period. view picks one:\n- dishes: each dish guests mention, with mentions, positive and negative counts, \"wow\" mentions, its best and worst quote, and form (up, down or level) against the period before.\n- wishes: what guests ask for, with how many guests asked, quotes, who they were (booking type, party size, time) and status (open, doing, later, no).\n- times: a score and review count for each day of the week and service, with the aspects behind it; aspect narrows it to one (e.g. food, service, value).\n- comeback: for each aspect guests criticised, how many came back, and how that differed when the venue replied.\nQuotes are guests' own words from reviews, with the review's ID (reviews.get). The insight is in Stampede's own shape.","security":[{"oauth2":["reviews:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"view","in":"query","required":true,"schema":{"type":"string","enum":["dishes","wishes","times","comeback"]}},{"name":"venue_id","in":"query","required":true,"description":"From venues.list. Insights are per venue.","schema":{"type":"string","minLength":1}},{"name":"from","in":"query","required":false,"description":"YYYY-MM-DD, venue time. Default a year before to.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"description":"YYYY-MM-DD. Default today.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"aspect","in":"query","required":false,"description":"For times: one aspect, e.g. food, service, value, drinks, atmosphere.","schema":{"type":"string","minLength":1,"maxLength":40}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"view":{"type":"string","enum":["dishes","wishes","times","comeback"]},"venue_id":{"type":"string"},"from":{"type":["string","null"]},"to":{"type":["string","null"]},"insight":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Stampede's insight, as its pages read it."}},"required":["view","venue_id","from","to","insight"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/reviews/insights/phrases":{"get":{"operationId":"reviews.insights.phrases","tags":["Reviews"],"summary":"What guests say after a word","description":"For one venue: the words guests most often use after a starting word or phrase, e.g. seed \"service\" gives \"service was slow\", \"service was friendly\". path goes a word deeper each time (comma separated, e.g. \"was,slow\"). Then reviews.insights.quotes for the reviews behind one.","security":[{"oauth2":["reviews:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"query","required":true,"description":"From venues.list. Insights are per venue.","schema":{"type":"string","minLength":1}},{"name":"from","in":"query","required":false,"description":"YYYY-MM-DD, venue time. Default a year before to.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"description":"YYYY-MM-DD. Default today.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"seed","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":60}},{"name":"path","in":"query","required":false,"schema":{"type":"string","maxLength":400}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"venue_id":{"type":"string"},"seed":{"type":"string"},"tree":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["venue_id","seed","tree"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/reviews/insights/quotes":{"get":{"operationId":"reviews.insights.quotes","tags":["Reviews"],"summary":"Quotes about something","description":"For one venue: how many reviews say a phrase (e.g. \"slow service\", \"sticky toffee\"), and quotes from them, newest first. The quickest way to answer \"what are guests saying about X\".","security":[{"oauth2":["reviews:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"query","required":true,"description":"From venues.list. Insights are per venue.","schema":{"type":"string","minLength":1}},{"name":"from","in":"query","required":false,"description":"YYYY-MM-DD, venue time. Default a year before to.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"description":"YYYY-MM-DD. Default today.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"phrase","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"limit","in":"query","required":false,"schema":{"default":5,"type":"integer","minimum":1,"maximum":20}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"venue_id":{"type":"string"},"phrase":{"type":"string"},"count":{"type":"number"},"quotes":{"type":"array","items":{"type":"object","properties":{"review_id":{"type":"string"},"text":{"type":"string"},"rating":{"type":["number","null"]},"platform":{"type":"string"},"date":{"type":"string"}},"required":["review_id","text","rating","platform","date"],"additionalProperties":false}}},"required":["venue_id","phrase","count","quotes"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/reviews/insights/wishes/{wish_key}":{"patch":{"operationId":"reviews.insights.wishes.update","tags":["Reviews"],"summary":"Set what is done about a wish","description":"Records what the venue is doing about something guests ask for (from reviews.insights view wishes): open, doing, later or no. Only Stampede's own note; guests see nothing.","security":[{"oauth2":["reviews:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"wish_key","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":120}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"venue_id":{"type":"string","minLength":1},"status":{"type":"string","enum":["open","doing","later","no"]}},"required":["venue_id","status"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/reviews/summaries":{"get":{"operationId":"reviews.summaries","tags":["Reviews"],"summary":"Review summaries","description":"Stampede's weekly overviews of reviews (period week: new reviews, rating change, platforms, sentiment, keywords, new topics, critical reviews, the week before) or its overview of one day (period day), each with the AI's summary and recommendations once written. For one venue, or the whole organisation (which needs access to every venue).","security":[{"oauth2":["reviews:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"period","in":"query","required":false,"schema":{"default":"week","type":"string","enum":["week","day"]}},{"name":"venue_id","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"since","in":"query","required":false,"description":"For week: weeks starting on or after this day. Default 8 weeks ago.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"until","in":"query","required":false,"description":"For week: weeks ending on or before this day.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"date","in":"query","required":false,"description":"For day: the day. Default yesterday.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"weeks":{"type":"array","items":{"type":"object","properties":{"week_start":{"type":"string"},"week_end":{"type":"string"},"venue_id":{"description":"Null for the whole organisation.","type":["string","null"]},"new_reviews":{"type":"number"},"average_rating":{"type":"object","properties":{"before":{"type":["number","null"]},"after":{"type":["number","null"]},"change":{"type":["number","null"]}},"required":["before","after","change"],"additionalProperties":false},"by_platform":{"description":"New reviews per platform."},"sentiment":{"description":"New reviews per sentiment, and the shift from the week before."},"top_keywords":{},"emerging_topics":{"description":"Topics new this week."},"critical_reviews":{"description":"1 and 2 star reviews to deal with."},"vs_previous_week":{},"ai_summary":{"anyOf":[{"type":"object","properties":{"text":{"type":["string","null"]},"key_insights":{},"highlights":{},"recommendations":{},"written_at":{"type":["string","null"]}},"required":["text","key_insights","highlights","recommendations","written_at"],"additionalProperties":false},{"type":"null"}],"description":"Stampede's AI summary of the period, once written. Null until then."}},"required":["week_start","week_end","venue_id","new_reviews","average_rating","by_platform","sentiment","top_keywords","emerging_topics","critical_reviews","vs_previous_week","ai_summary"],"additionalProperties":false},"description":"Newest first. Empty for period day."},"day":{"anyOf":[{"type":"object","properties":{"date":{"type":"string"},"venue_id":{"description":"Null for the whole organisation.","type":["string","null"]},"reviews":{"type":"number"},"average_rating":{"type":["number","null"]},"ratings":{},"sentiment":{},"top_keywords":{},"key_insights":{},"highlights":{},"comparison":{"description":"Against the day and week before."},"ai_summary":{"anyOf":[{"type":"object","properties":{"text":{"type":["string","null"]},"key_insights":{},"highlights":{},"recommendations":{},"written_at":{"type":["string","null"]}},"required":["text","key_insights","highlights","recommendations","written_at"],"additionalProperties":false},{"type":"null"}],"description":"Stampede's AI summary of the period, once written. Null until then."}},"required":["date","venue_id","reviews","average_rating","ratings","sentiment","top_keywords","key_insights","highlights","comparison","ai_summary"],"additionalProperties":false},{"type":"null"}],"description":"For period day. Null when there is none for that day."}},"required":["weeks","day"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/reviews/prompts":{"get":{"operationId":"reviews.prompts.list","tags":["Reviews"],"summary":"List reply prompts","description":"The instructions Stampede's AI writes review replies with: the venue's voice, what to mention and avoid. Rules and review pages name one.","security":[{"oauth2":["reviews:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"instructions":{"type":"string","description":"What the AI is told when it writes a reply: the venue's voice, what to mention, what to avoid."},"is_default":{"type":"boolean","description":"Used when a review page or rule names none."},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","instructions","is_default","created_at","updated_at"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"reviews.prompts.create","tags":["Reviews"],"summary":"Create a reply prompt","description":"Writes new instructions for Stampede's AI replies. Try them with reviews.reply_suggestion on a real review once a page or rule uses them.","security":[{"oauth2":["reviews:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"instructions":{"type":"string","minLength":1,"maxLength":10000},"is_default":{"default":false,"description":"Make it the organisation's default (the old default stops being one).","type":"boolean"}},"required":["name","instructions"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"instructions":{"type":"string","description":"What the AI is told when it writes a reply: the venue's voice, what to mention, what to avoid."},"is_default":{"type":"boolean","description":"Used when a review page or rule names none."},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","instructions","is_default","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/reviews/prompts/{prompt_id}":{"patch":{"operationId":"reviews.prompts.update","tags":["Reviews"],"summary":"Change a reply prompt","description":"Send only what changes. Every rule and review page using it writes with the new instructions from then on.","security":[{"oauth2":["reviews:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"instructions":{"type":"string","minLength":1,"maxLength":10000},"is_default":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"instructions":{"type":"string","description":"What the AI is told when it writes a reply: the venue's voice, what to mention, what to avoid."},"is_default":{"type":"boolean","description":"Used when a review page or rule names none."},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","instructions","is_default","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"reviews.prompts.delete","tags":["Reviews"],"summary":"Delete a reply prompt","description":"Stampede refuses while an enabled rule uses it: change those rules first.","security":[{"oauth2":["reviews:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/reviews/rules":{"get":{"operationId":"reviews.rules.list","tags":["Reviews"],"summary":"List automatic reply rules","description":"The rules that make Stampede's AI draft replies by itself when a matching review comes in. auto_send rules also send them, with no person approving.","security":[{"oauth2":["reviews:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"enabled":{"type":"boolean"},"review_page_ids":{"type":"array","items":{"type":"string"},"description":"The review pages (venues) it covers."},"min_rating":{"type":["number","null"]},"max_rating":{"type":["number","null"]},"sentiments":{"type":"array","items":{"type":"string"},"description":"Empty for any."},"platforms":{"type":"array","items":{"type":"string"},"description":"Empty for any."},"only_with_text":{"type":"boolean","description":"Only reviews with readable text."},"prompt_id":{"description":"The reply prompt it uses. Null for the default.","type":["string","null"]},"auto_send":{"type":"boolean","description":"Sends the AI reply by itself after delay_minutes, with no person approving: posted on Google in public, or emailed to the guest."},"delay_minutes":{"type":"number"},"priority":{"type":"number","description":"When two rules match, the lower number wins."},"created_at":{"type":"string"}},"required":["id","name","enabled","review_page_ids","min_rating","max_rating","sentiments","platforms","only_with_text","prompt_id","auto_send","delay_minutes","priority","created_at"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"reviews.rules.create","tags":["Reviews"],"summary":"Create an automatic reply rule","description":"When a review on one of review_page_ids matches (stars, sentiment, platform, readable text), Stampede's AI drafts a reply with prompt_id. Drafts wait in reviews.drafts.list for a person. auto_send true sends them by itself after delay_minutes, posted on Google in public or emailed to the guest, with no person looking: that needs reviews:reply too, and the person's clear yes to exactly which reviews it will answer.","security":[{"oauth2":["reviews:write"]}],"x-kind":"write","x-mcp":true,"x-support":false,"x-admin-only":true,"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"enabled":{"default":true,"type":"boolean"},"review_page_ids":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"min_rating":{"default":null,"anyOf":[{"type":"integer","minimum":1,"maximum":5},{"type":"null"}]},"max_rating":{"default":null,"anyOf":[{"type":"integer","minimum":1,"maximum":5},{"type":"null"}]},"sentiments":{"default":[],"maxItems":4,"type":"array","items":{"type":"string","enum":["positive","negative","neutral","mixed"]}},"platforms":{"default":[],"maxItems":2,"type":"array","items":{"type":"string","enum":["google","stampede"]},"description":"google, or stampede (Stampede's review page and WiFi)."},"only_with_text":{"default":true,"type":"boolean"},"prompt_id":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"auto_send":{"default":false,"type":"boolean"},"delay_minutes":{"default":30,"type":"integer","minimum":0,"maximum":10080}},"required":["name","review_page_ids"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"enabled":{"type":"boolean"},"review_page_ids":{"type":"array","items":{"type":"string"},"description":"The review pages (venues) it covers."},"min_rating":{"type":["number","null"]},"max_rating":{"type":["number","null"]},"sentiments":{"type":"array","items":{"type":"string"},"description":"Empty for any."},"platforms":{"type":"array","items":{"type":"string"},"description":"Empty for any."},"only_with_text":{"type":"boolean","description":"Only reviews with readable text."},"prompt_id":{"description":"The reply prompt it uses. Null for the default.","type":["string","null"]},"auto_send":{"type":"boolean","description":"Sends the AI reply by itself after delay_minutes, with no person approving: posted on Google in public, or emailed to the guest."},"delay_minutes":{"type":"number"},"priority":{"type":"number","description":"When two rules match, the lower number wins."},"created_at":{"type":"string"}},"required":["id","name","enabled","review_page_ids","min_rating","max_rating","sentiments","platforms","only_with_text","prompt_id","auto_send","delay_minutes","priority","created_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/reviews/rules/{rule_id}":{"patch":{"operationId":"reviews.rules.update","tags":["Reviews"],"summary":"Change an automatic reply rule","description":"Send only what changes; review_page_ids, sentiments and platforms replace their lists. Turning auto_send on, or changing which reviews an auto_send rule answers, needs reviews:reply too.","security":[{"oauth2":["reviews:write"]}],"x-kind":"write","x-mcp":true,"x-support":false,"x-admin-only":true,"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"enabled":{"type":"boolean"},"review_page_ids":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"min_rating":{"anyOf":[{"type":"integer","minimum":1,"maximum":5},{"type":"null"}]},"max_rating":{"anyOf":[{"type":"integer","minimum":1,"maximum":5},{"type":"null"}]},"sentiments":{"maxItems":4,"type":"array","items":{"type":"string","enum":["positive","negative","neutral","mixed"]}},"platforms":{"maxItems":2,"type":"array","items":{"type":"string","enum":["google","stampede"]},"description":"google, or stampede (Stampede's review page and WiFi)."},"only_with_text":{"type":"boolean"},"prompt_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"auto_send":{"type":"boolean"},"delay_minutes":{"type":"integer","minimum":0,"maximum":10080}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"enabled":{"type":"boolean"},"review_page_ids":{"type":"array","items":{"type":"string"},"description":"The review pages (venues) it covers."},"min_rating":{"type":["number","null"]},"max_rating":{"type":["number","null"]},"sentiments":{"type":"array","items":{"type":"string"},"description":"Empty for any."},"platforms":{"type":"array","items":{"type":"string"},"description":"Empty for any."},"only_with_text":{"type":"boolean","description":"Only reviews with readable text."},"prompt_id":{"description":"The reply prompt it uses. Null for the default.","type":["string","null"]},"auto_send":{"type":"boolean","description":"Sends the AI reply by itself after delay_minutes, with no person approving: posted on Google in public, or emailed to the guest."},"delay_minutes":{"type":"number"},"priority":{"type":"number","description":"When two rules match, the lower number wins."},"created_at":{"type":"string"}},"required":["id","name","enabled","review_page_ids","min_rating","max_rating","sentiments","platforms","only_with_text","prompt_id","auto_send","delay_minutes","priority","created_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"reviews.rules.delete","tags":["Reviews"],"summary":"Delete an automatic reply rule","description":"No more drafts from it. Drafts it already made stay in reviews.drafts.list.","security":[{"oauth2":["reviews:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/images":{"get":{"operationId":"images.list","tags":["Images"],"summary":"List the organisation's pictures","description":"The pictures in the organisation's gallery in Stampede, the newest first: the ones its email builder offers. Use the venue's own photos in an email before any stock photo. Search by name.","security":[{"oauth2":["marketing:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `cursor` from the previous page.","schema":{"type":"string","minLength":1}},{"name":"search","in":"query","required":false,"description":"Part of a picture name.","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"kind","in":"query","required":false,"description":"Only one gallery, e.g. marketing. Left out, all of them.","schema":{"type":"string","maxLength":64,"pattern":"^[a-zA-Z0-9]+$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","description":"Public and permanent: put it in an image block's src. Stampede's own copy."},"name":{"type":["string","null"]},"kind":{"description":"The gallery it is filed under in Stampede, e.g. marketing.","type":["string","null"]},"created_at":{"type":["string","null"]}},"required":["id","url","name","kind","created_at"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"images.upload","tags":["Images"],"summary":"Add pictures to the organisation","description":"Copies up to 6 pictures into the organisation's gallery in Stampede, from a public URL or sent as base64, and gives back their permanent URLs for an email's image blocks. Each is made fit for email: turned upright, its metadata (including where a photo was taken) removed, at most 1200px wide, JPEG (PNG when it has transparency, a GIF as it is). Every picture is checked before any is added, so one that cannot be used adds none. Only pictures the venue may use: its own, or ones it has the rights to.","security":[{"oauth2":["marketing:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"images":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"object","properties":{"source_url":{"description":"An https address of the picture itself (ends in .jpg or similar, not the page it is on), on the public internet. Stampede downloads it: up to 15MB.","type":"string","maxLength":2048},"data":{"description":"The picture itself, base64. The whole request is 1MB at most, so make a big photo smaller first (1600px wide is plenty), or use source_url.","type":"string","maxLength":1000000},"name":{"description":"What it shows, e.g. 'Terrace at sunset'. It is what the gallery in Stampede calls it. Left out, from the file name.","type":"string","minLength":1,"maxLength":100}}}}},"required":["images"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","description":"Public and permanent: put it in an image block's src. Stampede's own copy."},"name":{"type":["string","null"]},"kind":{"description":"The gallery it is filed under in Stampede, e.g. marketing.","type":["string","null"]},"created_at":{"type":["string","null"]},"width":{"type":"number"},"height":{"type":"number"},"size_bytes":{"type":"number"},"source":{"type":"string","description":"Where it came from: a URL's host, or 'sent' for bytes sent."}},"required":["id","url","name","kind","created_at","width","height","size_bytes","source"],"additionalProperties":false}}},"required":["images"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/loyalty/schemes":{"get":{"operationId":"loyalty.schemes.list","tags":["Loyalty"],"summary":"List loyalty schemes","description":"The organisation's loyalty schemes, and the venues each runs at.","security":[{"oauth2":["loyalty:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"live":{"type":"boolean","description":"loyalty-v2's isLive flag. Nothing sets or checks it today: a scheme takes members from the moment it exists."},"every_venue":{"type":"boolean","description":"Runs at every venue of the organisation."},"venue_ids":{"type":"array","items":{"type":"string"},"description":"Its venues, when not every venue."},"created_at":{"type":["string","null"]}},"required":["id","name","live","every_venue","venue_ids","created_at"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"loyalty.schemes.create","tags":["Loyalty"],"summary":"Create a loyalty scheme","description":"Makes a points scheme at some venues (venue_ids) or all of them (every_venue), in a brand kit (the organisation's default unless named). There is no draft: guests can join it from the moment it exists, and with auto_enrol they are joined and emailed straight away. So agree the name, venues and earning with the person, make it, then add rewards (loyalty.rewards.create), points for visits and spend (loyalty.automations.update, loyalty.points_for_spend.update), Square groups and discounts, and gift cards (loyalty.schemes.gift_cards.update) before sharing it.","security":[{"oauth2":["loyalty:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"venue_ids":{"default":[],"description":"From venues.list.","maxItems":200,"type":"array","items":{"type":"string","minLength":1}},"every_venue":{"default":false,"description":"Run it at every venue, now and later. Then venue_ids is not needed.","type":"boolean"},"brand_kit_id":{"description":"From brand_kits.list: its look, emails and wallet passes.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"sign_up_points":{"default":null,"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}],"description":"Points for joining. Null for none."},"referral_points":{"default":null,"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}],"description":"Points a member gets when a friend they referred first earns. Null for off."},"limits":{"default":{"per_transaction":100,"per_member":1000},"type":"object","properties":{"per_transaction":{"description":"Most points one award can give.","type":"integer","minimum":1,"maximum":1000000},"per_member":{"description":"Most points a member can hold.","type":"integer","minimum":1,"maximum":1000000},"cool_down":{"description":"Null for off.","anyOf":[{"type":"object","properties":{"seconds":{"type":"integer","minimum":60,"maximum":2592000},"points":{"type":"integer","minimum":1,"maximum":1000000,"description":"Most points a member can earn within seconds."}},"required":["seconds","points"]},{"type":"null"}]}}},"auto_enrol":{"default":false,"type":"boolean","description":"Join guests automatically when they book or use the WiFi at the scheme's venues. Each one is emailed a welcome with their card. Off unless the person asks for it."},"about":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"description":"What the scheme is, shown on its join page."}},"required":["name"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"live":{"type":"boolean","description":"loyalty-v2's isLive flag. Nothing sets or checks it today: a scheme takes members from the moment it exists."},"every_venue":{"type":"boolean","description":"Runs at every venue of the organisation."},"venue_ids":{"type":"array","items":{"type":"string"},"description":"Its venues, when not every venue."},"created_at":{"type":["string","null"]},"about":{"type":["string","null"]},"points_label":{"type":"string","description":"What the wallet pass calls a point."},"currency":{"type":"string"},"earning":{"type":"object","properties":{"sign_up_points":{"description":"Points for joining. Null when none.","type":["number","null"]},"referral_points":{"description":"Points for referring a friend who earns. Null when off.","type":["number","null"]},"for_spend":{"anyOf":[{"type":"object","properties":{"rules":{"type":"array","items":{"type":"object","properties":{"min_spend":{"type":"number","description":"In pence (or cents): a spend of at least this earns points."},"points":{"type":"number"}},"required":["min_spend","points"],"additionalProperties":false},"description":"The highest rule a spend reaches pays its points."},"per_amount":{"anyOf":[{"type":"object","properties":{"amount":{"type":"number"},"points":{"type":"number"}},"required":["amount","points"],"additionalProperties":false},{"type":"null"}],"description":"Without rules: these points for each amount (pence) spent."}},"required":["rules","per_amount"],"additionalProperties":false},{"type":"null"}],"description":"Points for spend through Square. Null when off."},"automations":{"type":"string","description":"Points for visits, WiFi, bookings and reviews: see loyalty.automations.list."}},"required":["sign_up_points","referral_points","for_spend","automations"],"additionalProperties":false},"limits":{"type":"object","properties":{"per_transaction":{"type":["number","null"]},"per_member":{"type":["number","null"]},"cool_down":{"anyOf":[{"type":"object","properties":{"seconds":{"type":"number"},"points":{"type":["number","null"]}},"required":["seconds","points"],"additionalProperties":false},{"type":"null"}],"description":"At most points within seconds. Null when off."}},"required":["per_transaction","per_member","cool_down"],"additionalProperties":false},"auto_enrol":{"type":"boolean","description":"Guests are joined automatically from WiFi, bookings and forms."}},"required":["id","name","live","every_venue","venue_ids","created_at","about","points_label","currency","earning","limits","auto_enrol"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/loyalty/schemes/{scheme_id}":{"get":{"operationId":"loyalty.schemes.get","tags":["Loyalty"],"summary":"Get a loyalty scheme","description":"How guests earn points (sign-up, referrals, spend; visits, WiFi, bookings and reviews are in loyalty.automations.list) and the limits on earning.","security":[{"oauth2":["loyalty:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"scheme_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"live":{"type":"boolean","description":"loyalty-v2's isLive flag. Nothing sets or checks it today: a scheme takes members from the moment it exists."},"every_venue":{"type":"boolean","description":"Runs at every venue of the organisation."},"venue_ids":{"type":"array","items":{"type":"string"},"description":"Its venues, when not every venue."},"created_at":{"type":["string","null"]},"about":{"type":["string","null"]},"points_label":{"type":"string","description":"What the wallet pass calls a point."},"currency":{"type":"string"},"earning":{"type":"object","properties":{"sign_up_points":{"description":"Points for joining. Null when none.","type":["number","null"]},"referral_points":{"description":"Points for referring a friend who earns. Null when off.","type":["number","null"]},"for_spend":{"anyOf":[{"type":"object","properties":{"rules":{"type":"array","items":{"type":"object","properties":{"min_spend":{"type":"number","description":"In pence (or cents): a spend of at least this earns points."},"points":{"type":"number"}},"required":["min_spend","points"],"additionalProperties":false},"description":"The highest rule a spend reaches pays its points."},"per_amount":{"anyOf":[{"type":"object","properties":{"amount":{"type":"number"},"points":{"type":"number"}},"required":["amount","points"],"additionalProperties":false},{"type":"null"}],"description":"Without rules: these points for each amount (pence) spent."}},"required":["rules","per_amount"],"additionalProperties":false},{"type":"null"}],"description":"Points for spend through Square. Null when off."},"automations":{"type":"string","description":"Points for visits, WiFi, bookings and reviews: see loyalty.automations.list."}},"required":["sign_up_points","referral_points","for_spend","automations"],"additionalProperties":false},"limits":{"type":"object","properties":{"per_transaction":{"type":["number","null"]},"per_member":{"type":["number","null"]},"cool_down":{"anyOf":[{"type":"object","properties":{"seconds":{"type":"number"},"points":{"type":["number","null"]}},"required":["seconds","points"],"additionalProperties":false},{"type":"null"}],"description":"At most points within seconds. Null when off."}},"required":["per_transaction","per_member","cool_down"],"additionalProperties":false},"auto_enrol":{"type":"boolean","description":"Guests are joined automatically from WiFi, bookings and forms."}},"required":["id","name","live","every_venue","venue_ids","created_at","about","points_label","currency","earning","limits","auto_enrol"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"loyalty.schemes.update","tags":["Loyalty"],"summary":"Change a loyalty scheme","description":"Send only what changes: name, venues, brand kit, sign-up and referral points, limits, auto-enrol, about. venue_ids replaces the venue list. Members keep their points. Wallet passes are updated.","security":[{"oauth2":["loyalty:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"scheme_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"venue_ids":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","minLength":1}},"every_venue":{"type":"boolean"},"brand_kit_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"sign_up_points":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}],"description":"Points for joining. Null for none."},"referral_points":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}],"description":"Points a member gets when a friend they referred first earns. Null for off."},"limits":{"type":"object","properties":{"per_transaction":{"description":"Most points one award can give.","type":"integer","minimum":1,"maximum":1000000},"per_member":{"description":"Most points a member can hold.","type":"integer","minimum":1,"maximum":1000000},"cool_down":{"description":"Null for off.","anyOf":[{"type":"object","properties":{"seconds":{"type":"integer","minimum":60,"maximum":2592000},"points":{"type":"integer","minimum":1,"maximum":1000000,"description":"Most points a member can earn within seconds."}},"required":["seconds","points"]},{"type":"null"}]}}},"auto_enrol":{"type":"boolean","description":"Join guests automatically when they book or use the WiFi at the scheme's venues. Each one is emailed a welcome with their card. Off unless the person asks for it."},"about":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"description":"What the scheme is, shown on its join page."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"live":{"type":"boolean","description":"loyalty-v2's isLive flag. Nothing sets or checks it today: a scheme takes members from the moment it exists."},"every_venue":{"type":"boolean","description":"Runs at every venue of the organisation."},"venue_ids":{"type":"array","items":{"type":"string"},"description":"Its venues, when not every venue."},"created_at":{"type":["string","null"]},"about":{"type":["string","null"]},"points_label":{"type":"string","description":"What the wallet pass calls a point."},"currency":{"type":"string"},"earning":{"type":"object","properties":{"sign_up_points":{"description":"Points for joining. Null when none.","type":["number","null"]},"referral_points":{"description":"Points for referring a friend who earns. Null when off.","type":["number","null"]},"for_spend":{"anyOf":[{"type":"object","properties":{"rules":{"type":"array","items":{"type":"object","properties":{"min_spend":{"type":"number","description":"In pence (or cents): a spend of at least this earns points."},"points":{"type":"number"}},"required":["min_spend","points"],"additionalProperties":false},"description":"The highest rule a spend reaches pays its points."},"per_amount":{"anyOf":[{"type":"object","properties":{"amount":{"type":"number"},"points":{"type":"number"}},"required":["amount","points"],"additionalProperties":false},{"type":"null"}],"description":"Without rules: these points for each amount (pence) spent."}},"required":["rules","per_amount"],"additionalProperties":false},{"type":"null"}],"description":"Points for spend through Square. Null when off."},"automations":{"type":"string","description":"Points for visits, WiFi, bookings and reviews: see loyalty.automations.list."}},"required":["sign_up_points","referral_points","for_spend","automations"],"additionalProperties":false},"limits":{"type":"object","properties":{"per_transaction":{"type":["number","null"]},"per_member":{"type":["number","null"]},"cool_down":{"anyOf":[{"type":"object","properties":{"seconds":{"type":"number"},"points":{"type":["number","null"]}},"required":["seconds","points"],"additionalProperties":false},{"type":"null"}],"description":"At most points within seconds. Null when off."}},"required":["per_transaction","per_member","cool_down"],"additionalProperties":false},"auto_enrol":{"type":"boolean","description":"Guests are joined automatically from WiFi, bookings and forms."}},"required":["id","name","live","every_venue","venue_ids","created_at","about","points_label","currency","earning","limits","auto_enrol"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/loyalty/schemes/{scheme_id}/stats":{"get":{"operationId":"loyalty.schemes.stats","tags":["Loyalty"],"summary":"Loyalty scheme stats","description":"Members, wallet passes, and day by day sign-ups, rewards redeemed and points given over a period (default the last 30 days).","security":[{"oauth2":["loyalty:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"scheme_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"from","in":"query","required":false,"description":"YYYY-MM-DD.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"description":"YYYY-MM-DD.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"members":{"type":"number"},"wallet_passes":{"type":"object","properties":{"apple":{"type":"number"},"google":{"type":"number"}},"required":["apple","google"],"additionalProperties":false},"days":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"sign_ups":{"type":"number"},"rewards_redeemed":{"type":"number"},"points_given":{"type":"number"}},"required":["date","sign_ups","rewards_redeemed","points_given"],"additionalProperties":false}}},"required":["from","to","members","wallet_passes","days"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/loyalty/schemes/{scheme_id}/members":{"get":{"operationId":"loyalty.members.list","tags":["Loyalty"],"summary":"List loyalty members","description":"A scheme's members, newest first, with their points. search is an exact email, or part of a name or email. Members' details need guests:read.","security":[{"oauth2":["loyalty:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"scheme_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `cursor` from the previous page.","schema":{"type":"string","minLength":1}},{"name":"search","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":191}},{"name":"joined_from","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"joined_to","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The membership ID: what the guest's loyalty card QR code holds."},"scheme":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"guest_id":{"description":"The guest (guests.get), when Stampede has linked them.","type":["string","null"]},"points":{"type":"number"},"member":{"anyOf":[{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["first_name","last_name","email","phone"],"additionalProperties":false},{"type":"null"}],"description":"The member's details, with guests:read. Null without it."},"wallet":{"type":"object","properties":{"apple":{"type":"boolean"},"google":{"type":"boolean"}},"required":["apple","google"],"additionalProperties":false,"description":"Whether the pass is in a wallet."},"joined_at":{"type":"string"}},"required":["id","scheme","guest_id","points","member","wallet","joined_at"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/loyalty/schemes/{scheme_id}/members/{member_id}":{"get":{"operationId":"loyalty.members.get","tags":["Loyalty"],"summary":"Look up a loyalty member","description":"A membership, with points and the rewards it holds. member_id is the membership ID from the guest's card QR code.","security":[{"oauth2":["loyalty:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"scheme_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"member_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"The membership ID: what the guest's loyalty card QR code holds."},"scheme":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"guest_id":{"description":"The guest (guests.get), when Stampede has linked them.","type":["string","null"]},"points":{"type":"number"},"member":{"anyOf":[{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["first_name","last_name","email","phone"],"additionalProperties":false},{"type":"null"}],"description":"The member's details, with guests:read. Null without it."},"wallet":{"type":"object","properties":{"apple":{"type":"boolean"},"google":{"type":"boolean"}},"required":["apple","google"],"additionalProperties":false,"description":"Whether the pass is in a wallet."},"joined_at":{"type":"string"},"rewards":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"points":{"type":"number"},"redeemed_at":{"type":["string","null"]}},"required":["id","title","points","redeemed_at"],"additionalProperties":false},"description":"Up to three rewards it holds, newest first."}},"required":["id","scheme","guest_id","points","member","wallet","joined_at","rewards"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/loyalty/guests/{guest_id}":{"get":{"operationId":"loyalty.members.for_guest","tags":["Loyalty"],"summary":"A guest's loyalty memberships","description":"Every scheme the guest (guests.get) belongs to, with points in each.","security":[{"oauth2":["loyalty:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"guest_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"scheme":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"points":{"type":"number"}},"required":["id","scheme","points"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/loyalty/schemes/{scheme_id}/history":{"get":{"operationId":"loyalty.members.history","tags":["Loyalty"],"summary":"Loyalty history","description":"Points added and spent in a scheme, newest first: for one member (member_id), or the whole scheme.","security":[{"oauth2":["loyalty:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"scheme_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `cursor` from the previous page.","schema":{"type":"string","minLength":1}},{"name":"member_id","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"membership_id":{"type":"string"},"kind":{"type":"string","description":"points_added, reward_redeemed, voucher_redeemed, referral_points, gift_card (points turned into a gift card) or points_adjusted."},"points":{"type":"number","description":"Always positive: kind says whether they were added or spent."},"reward":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"}},"required":["id","title"],"additionalProperties":false},{"type":"null"}]},"by_staff":{"type":"boolean","description":"Recorded by a member of staff."},"at":{"type":"string"}},"required":["id","membership_id","kind","points","reward","by_staff","at"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/loyalty/schemes/{scheme_id}/rewards":{"get":{"operationId":"loyalty.rewards.list","tags":["Loyalty"],"summary":"List rewards","description":"What members can spend points on, and what each costs. archived true lists archived ones instead.","security":[{"oauth2":["loyalty:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"scheme_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `cursor` from the previous page.","schema":{"type":"string","minLength":1}},{"name":"archived","in":"query","required":false,"schema":{"default":false}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":["string","null"]},"points":{"type":"number","description":"What it costs."},"type":{"type":"string","enum":["food","dessert","drink","merchandise","event"]},"image_url":{"type":["string","null"]},"active":{"type":"boolean"},"archived":{"type":"boolean"},"valid_from":{"type":["string","null"]},"valid_to":{"type":["string","null"]},"redemption_limit":{"description":"How many times it can be redeemed in all. Null for no limit.","type":["number","null"]}},"required":["id","title","description","points","type","image_url","active","archived","valid_from","valid_to","redemption_limit"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"loyalty.rewards.create","tags":["Loyalty"],"summary":"Create a reward","description":"Adds a reward members can spend points on. Members see it in their loyalty app straight away when active.","security":[{"oauth2":["loyalty:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"scheme_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":191},"description":{"default":null,"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"points":{"type":"integer","minimum":1,"maximum":1000000},"type":{"default":"food","type":"string","enum":["food","dessert","drink","merchandise","event"]},"image_url":{"default":null,"anyOf":[{"type":"string","maxLength":1000,"format":"uri"},{"type":"null"}]},"active":{"default":true,"type":"boolean"},"valid_from":{"default":null,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"valid_to":{"default":null,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"redemption_limit":{"default":null,"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]}},"required":["title","points"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":["string","null"]},"points":{"type":"number","description":"What it costs."},"type":{"type":"string","enum":["food","dessert","drink","merchandise","event"]},"image_url":{"type":["string","null"]},"active":{"type":"boolean"},"archived":{"type":"boolean"},"valid_from":{"type":["string","null"]},"valid_to":{"type":["string","null"]},"redemption_limit":{"description":"How many times it can be redeemed in all. Null for no limit.","type":["number","null"]}},"required":["id","title","description","points","type","image_url","active","archived","valid_from","valid_to","redemption_limit"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/loyalty/schemes/{scheme_id}/rewards/{reward_id}":{"patch":{"operationId":"loyalty.rewards.update","tags":["Loyalty"],"summary":"Change a reward","description":"Send only what changes. Rewards members already redeemed keep what they cost then.","security":[{"oauth2":["loyalty:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"scheme_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"reward_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":191},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"points":{"type":"integer","minimum":1,"maximum":1000000},"type":{"type":"string","enum":["food","dessert","drink","merchandise","event"]},"image_url":{"anyOf":[{"type":"string","maxLength":1000,"format":"uri"},{"type":"null"}]},"active":{"type":"boolean"},"valid_from":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"valid_to":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"redemption_limit":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":["string","null"]},"points":{"type":"number","description":"What it costs."},"type":{"type":"string","enum":["food","dessert","drink","merchandise","event"]},"image_url":{"type":["string","null"]},"active":{"type":"boolean"},"archived":{"type":"boolean"},"valid_from":{"type":["string","null"]},"valid_to":{"type":["string","null"]},"redemption_limit":{"description":"How many times it can be redeemed in all. Null for no limit.","type":["number","null"]}},"required":["id","title","description","points","type","image_url","active","archived","valid_from","valid_to","redemption_limit"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"loyalty.rewards.archive","tags":["Loyalty"],"summary":"Archive a reward","description":"Members can no longer redeem it. Rewards already redeemed stay in their history.","security":[{"oauth2":["loyalty:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"scheme_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"reward_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"archived":{"type":"boolean","const":true}},"required":["id","archived"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/loyalty/schemes/{scheme_id}/members/{member_id}/points":{"post":{"operationId":"loyalty.points.add","tags":["Loyalty"],"summary":"Give a member points","description":"Adds points to a membership, as staff do in Stampede: the scheme's limits apply, the wallet pass updates and the guest is emailed. reason is kept in the audit trail. Confirm the member and the number with the person first.","security":[{"oauth2":["loyalty:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"scheme_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"member_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"points":{"type":"integer","minimum":1,"maximum":100000},"reason":{"type":"string","minLength":1,"maxLength":255,"description":"Why, in a few words. Kept in the audit trail."},"venue_id":{"description":"Where they were earned, for a scheme at some venues.","type":"string","minLength":1}},"required":["points","reason"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"membership_id":{"type":"string"},"points_added":{"type":"number"},"points":{"type":"number"}},"required":["membership_id","points_added","points"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/loyalty/schemes/{scheme_id}/members/{member_id}/points/adjust":{"post":{"operationId":"loyalty.points.adjust","tags":["Loyalty"],"summary":"Correct a member's points","description":"Adds or takes away points to put a mistake right (points negative takes them away), with a reason kept in the member's history. A balance cannot go below zero. Confirm with the person first.","security":[{"oauth2":["loyalty:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"scheme_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"member_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"points":{"type":"integer","minimum":-1000000,"maximum":1000000},"reason":{"type":"string","minLength":1,"maxLength":255}},"required":["points","reason"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"membership_id":{"type":"string"},"points_change":{"type":"number"},"points":{"type":"number"}},"required":["membership_id","points_change","points"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/loyalty/schemes/{scheme_id}/members/{member_id}/redeem":{"post":{"operationId":"loyalty.rewards.redeem","tags":["Loyalty"],"summary":"Redeem rewards for a member","description":"Spends a member's points on rewards, as staff do at the till. Every reward must be the scheme's, active and in its dates, and the member must have the points. This spends the guest's points and cannot be undone here: tell the person what it costs and what is left, and get their yes first.","security":[{"oauth2":["loyalty:write"]}],"x-kind":"write","x-mcp":true,"x-support":false,"x-admin-only":false,"parameters":[{"name":"scheme_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"member_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rewards":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"reward_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"quantity":{"default":1,"type":"integer","minimum":1,"maximum":20}},"required":["reward_id"]}},"venue_id":{"description":"Where they are redeemed.","type":"string","minLength":1}},"required":["rewards"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"membership_id":{"type":"string"},"redeemed":{"type":"array","items":{"type":"object","properties":{"reward_id":{"type":"string"},"title":{"type":"string"},"quantity":{"type":"number"},"points":{"type":"number"}},"required":["reward_id","title","quantity","points"],"additionalProperties":false}},"points_spent":{"type":"number"},"points_left":{"type":"number"}},"required":["membership_id","redeemed","points_spent","points_left"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/loyalty/schemes/{scheme_id}/points-for-spend":{"put":{"operationId":"loyalty.points_for_spend.update","tags":["Loyalty"],"summary":"Set points for spend","description":"Replaces the rules for points earned on spend through Square: a spend of at least min_spend (pence) earns points; the highest rule reached pays. An empty list removes them all. Read the current ones with loyalty.schemes.get.","security":[{"oauth2":["loyalty:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"scheme_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rules":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"min_spend":{"type":"integer","minimum":1,"maximum":9007199254740991},"points":{"type":"integer","minimum":1,"maximum":100000}},"required":["min_spend","points"]}}},"required":["rules"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"min_spend":{"type":"number","description":"In pence (or cents): a spend of at least this earns points."},"points":{"type":"number"}},"required":["min_spend","points"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/loyalty/schemes/{scheme_id}/automations":{"get":{"operationId":"loyalty.automations.list","tags":["Loyalty"],"summary":"Points for visits","description":"Points the scheme gives by itself for a WiFi visit, a booking, a review and so on, and how often a member can earn each (limit_between_seconds).","security":[{"oauth2":["loyalty:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"scheme_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"source_id":{"type":"string"},"name":{"type":"string"},"active":{"type":"boolean"},"points":{"type":"number"},"limit_between_seconds":{"type":"number","description":"At most once in this many seconds. 0 for no limit."}},"required":["source_id","name","active","points","limit_between_seconds"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/loyalty/schemes/{scheme_id}/automations/{source_id}":{"put":{"operationId":"loyalty.automations.update","tags":["Loyalty"],"summary":"Set points for a kind of visit","description":"Turns points for one source (from loyalty.automations.list) on or off, and sets how many and how often. Members earn on their next visit of that kind.","security":[{"oauth2":["loyalty:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"scheme_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"source_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean"},"points":{"type":"integer","minimum":0,"maximum":100000},"limit_between_seconds":{"default":0,"type":"integer","minimum":0,"maximum":31536000}},"required":["active","points"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"source_id":{"type":"string"},"active":{"type":"boolean"},"points":{"type":"number"},"limit_between_seconds":{"type":"number"}},"required":["source_id","active","points","limit_between_seconds"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/square/accounts":{"get":{"operationId":"square.accounts.list","tags":["Loyalty"],"summary":"List Square accounts","description":"The Square accounts connected to the organisation. Customer groups and discounts belong to an account.","security":[{"oauth2":["loyalty:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The Square account (account_id elsewhere)."},"merchant_name":{"type":["string","null"]},"environment":{"description":"production or sandbox.","type":["string","null"]},"locations":{"type":"number","description":"Square locations mapped to Stampede venues."}},"required":["id","merchant_name","environment","locations"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/square/customer-groups":{"get":{"operationId":"square.customer_groups.list","tags":["Loyalty"],"summary":"List Square customer groups","description":"The customer groups in one Square account, or in all of them. Loyalty puts members in groups, and discounts can be for a group.","security":[{"oauth2":["loyalty:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"account_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"account_id":{"type":"string"},"created_at":{"type":["string","null"]}},"required":["id","name","account_id","created_at"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/square/accounts/{account_id}/customer-groups":{"post":{"operationId":"square.customer_groups.create","tags":["Loyalty"],"summary":"Create a Square customer group","description":"Makes a customer group in a Square account. Link it to a reward (loyalty.rewards.square.link) or a scheme (loyalty.schemes.square_groups.update), and make a discount for it (square.discounts.create).","security":[{"oauth2":["loyalty:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255}},"required":["name"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"account_id":{"type":"string"},"created_at":{"type":["string","null"]}},"required":["id","name","account_id","created_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/square/accounts/{account_id}/customer-groups/{group_id}":{"delete":{"operationId":"square.customer_groups.delete","tags":["Loyalty"],"summary":"Delete a Square customer group","description":"Deletes a group in Square. Refused with 409 GROUP_IN_USE, naming them, while a loyalty scheme, a reward or a discount uses it.","security":[{"oauth2":["loyalty:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"group_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/square/accounts/{account_id}/discounts":{"get":{"operationId":"square.discounts.list","tags":["Loyalty"],"summary":"List Square discounts","description":"An account's discounts as the till applies them: how much off, on what, for which customer groups, when.","security":[{"oauth2":["loyalty:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"customer_group_id","in":"query","required":false,"description":"Only discounts for this group (a reward's).","schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The discount's pricing rule in Square."},"name":{"type":"string"},"kind":{"type":"string","enum":["percentage","amount"]},"percentage":{"type":["number","null"]},"amount":{"anyOf":[{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minor units, e.g. 500 for £5.00."},"currency":{"type":"string"}},"required":["amount","currency"],"additionalProperties":false},{"type":"null"}]},"maximum_amount":{"anyOf":[{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minor units, e.g. 500 for £5.00."},"currency":{"type":"string"}},"required":["amount","currency"],"additionalProperties":false},{"type":"null"}]},"applies_to":{"type":"object","properties":{"all_items":{"type":"boolean"},"product_ids":{"type":"array","items":{"type":"string"},"description":"Square catalogue item or category ids."},"max_quantity":{"description":"At most this many matching items per bill.","type":["number","null"]}},"required":["all_items","product_ids","max_quantity"],"additionalProperties":false},"excluded_product_ids":{"type":"array","items":{"type":"string"}},"customer_group_ids":{"type":"array","items":{"type":"string"},"description":"Only customers in one of these groups get it."},"valid_from":{"type":["string","null"]},"valid_until":{"type":["string","null"]},"minimum_spend":{"anyOf":[{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minor units, e.g. 500 for £5.00."},"currency":{"type":"string"}},"required":["amount","currency"],"additionalProperties":false},{"type":"null"}]},"automatic":{"type":"boolean","description":"Applied by the till by itself. False: a plain discount staff apply."},"editable":{"type":"boolean","description":"False for discounts made in Square in a way this cannot change."},"managed_by":{"type":["string","null"]}},"required":["id","name","kind","percentage","amount","maximum_amount","applies_to","excluded_product_ids","customer_group_ids","valid_from","valid_until","minimum_spend","automatic","editable","managed_by"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"square.discounts.create","tags":["Loyalty"],"summary":"Create a Square discount","description":"Makes a discount the Square till applies by itself: a percentage or an amount off all items or some, for everyone or only customers in customer_group_ids (a reward's group), with optional dates and minimum spend. It changes prices at every location of the account at once: tell the person exactly what it takes off, on what and for whom, and get their yes first.","security":[{"oauth2":["loyalty:write"]}],"x-kind":"write","x-mcp":true,"x-support":false,"x-admin-only":true,"parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"kind":{"type":"string","enum":["percentage","amount"]},"percentage":{"description":"For kind percentage, e.g. 20 for 20% off.","type":"number","exclusiveMinimum":0,"maximum":100},"amount":{"description":"For kind amount: minor units, e.g. 500 for £5.00 off.","type":"integer","minimum":1,"maximum":9007199254740991},"currency":{"default":"GBP","description":"The account's currency, e.g. GBP.","type":"string","minLength":3,"maxLength":3},"maximum_amount":{"description":"For kind percentage: the most it can take off, in minor units.","type":"integer","minimum":1,"maximum":9007199254740991},"all_items":{"default":false,"type":"boolean"},"product_ids":{"default":[],"description":"Square catalogue item or category ids it applies to, when not all_items.","maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"max_quantity":{"description":"At most this many matching items per bill. 1 makes a reward discount one item per bill.","type":"integer","minimum":1,"maximum":9007199254740991},"excluded_product_ids":{"default":[],"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"customer_group_ids":{"default":[],"description":"Only customers in one of these groups get it (a reward's group). Empty: everyone.","maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"valid_from":{"description":"YYYY-MM-DD.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"valid_until":{"description":"YYYY-MM-DD.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"minimum_spend":{"description":"Minor units.","type":"integer","minimum":1,"maximum":9007199254740991}},"required":["name","kind"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"The discount's pricing rule in Square."},"name":{"type":"string"},"kind":{"type":"string","enum":["percentage","amount"]},"percentage":{"type":["number","null"]},"amount":{"anyOf":[{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minor units, e.g. 500 for £5.00."},"currency":{"type":"string"}},"required":["amount","currency"],"additionalProperties":false},{"type":"null"}]},"maximum_amount":{"anyOf":[{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minor units, e.g. 500 for £5.00."},"currency":{"type":"string"}},"required":["amount","currency"],"additionalProperties":false},{"type":"null"}]},"applies_to":{"type":"object","properties":{"all_items":{"type":"boolean"},"product_ids":{"type":"array","items":{"type":"string"},"description":"Square catalogue item or category ids."},"max_quantity":{"description":"At most this many matching items per bill.","type":["number","null"]}},"required":["all_items","product_ids","max_quantity"],"additionalProperties":false},"excluded_product_ids":{"type":"array","items":{"type":"string"}},"customer_group_ids":{"type":"array","items":{"type":"string"},"description":"Only customers in one of these groups get it."},"valid_from":{"type":["string","null"]},"valid_until":{"type":["string","null"]},"minimum_spend":{"anyOf":[{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minor units, e.g. 500 for £5.00."},"currency":{"type":"string"}},"required":["amount","currency"],"additionalProperties":false},{"type":"null"}]},"automatic":{"type":"boolean","description":"Applied by the till by itself. False: a plain discount staff apply."},"editable":{"type":"boolean","description":"False for discounts made in Square in a way this cannot change."},"managed_by":{"type":["string","null"]}},"required":["id","name","kind","percentage","amount","maximum_amount","applies_to","excluded_product_ids","customer_group_ids","valid_from","valid_until","minimum_spend","automatic","editable","managed_by"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/square/accounts/{account_id}/discounts/{discount_id}":{"patch":{"operationId":"square.discounts.update","tags":["Loyalty"],"summary":"Change a Square discount","description":"Send only what changes; product_ids, excluded_product_ids and customer_group_ids replace their lists. Changes prices at the till at once: confirm with the person first. Discounts made in Square in a way this cannot change (editable false) are refused.","security":[{"oauth2":["loyalty:write"]}],"x-kind":"write","x-mcp":true,"x-support":false,"x-admin-only":true,"parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"discount_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"kind":{"type":"string","enum":["percentage","amount"]},"percentage":{"description":"For kind percentage, e.g. 20 for 20% off.","type":"number","exclusiveMinimum":0,"maximum":100},"amount":{"description":"For kind amount: minor units, e.g. 500 for £5.00 off.","type":"integer","minimum":1,"maximum":9007199254740991},"currency":{"type":"string","minLength":3,"maxLength":3},"maximum_amount":{"description":"For kind percentage: the most it can take off, in minor units.","type":"integer","minimum":1,"maximum":9007199254740991},"all_items":{"type":"boolean"},"product_ids":{"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"max_quantity":{"description":"At most this many matching items per bill. 1 makes a reward discount one item per bill.","type":"integer","minimum":1,"maximum":9007199254740991},"excluded_product_ids":{"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"customer_group_ids":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"valid_from":{"description":"YYYY-MM-DD.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"valid_until":{"description":"YYYY-MM-DD.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"minimum_spend":{"description":"Minor units.","type":"integer","minimum":1,"maximum":9007199254740991}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"The discount's pricing rule in Square."},"name":{"type":"string"},"kind":{"type":"string","enum":["percentage","amount"]},"percentage":{"type":["number","null"]},"amount":{"anyOf":[{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minor units, e.g. 500 for £5.00."},"currency":{"type":"string"}},"required":["amount","currency"],"additionalProperties":false},{"type":"null"}]},"maximum_amount":{"anyOf":[{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minor units, e.g. 500 for £5.00."},"currency":{"type":"string"}},"required":["amount","currency"],"additionalProperties":false},{"type":"null"}]},"applies_to":{"type":"object","properties":{"all_items":{"type":"boolean"},"product_ids":{"type":"array","items":{"type":"string"},"description":"Square catalogue item or category ids."},"max_quantity":{"description":"At most this many matching items per bill.","type":["number","null"]}},"required":["all_items","product_ids","max_quantity"],"additionalProperties":false},"excluded_product_ids":{"type":"array","items":{"type":"string"}},"customer_group_ids":{"type":"array","items":{"type":"string"},"description":"Only customers in one of these groups get it."},"valid_from":{"type":["string","null"]},"valid_until":{"type":["string","null"]},"minimum_spend":{"anyOf":[{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minor units, e.g. 500 for £5.00."},"currency":{"type":"string"}},"required":["amount","currency"],"additionalProperties":false},{"type":"null"}]},"automatic":{"type":"boolean","description":"Applied by the till by itself. False: a plain discount staff apply."},"editable":{"type":"boolean","description":"False for discounts made in Square in a way this cannot change."},"managed_by":{"type":["string","null"]}},"required":["id","name","kind","percentage","amount","maximum_amount","applies_to","excluded_product_ids","customer_group_ids","valid_from","valid_until","minimum_spend","automatic","editable","managed_by"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"square.discounts.delete","tags":["Loyalty"],"summary":"Delete a Square discount","description":"Takes the discount off the till at once. A reward that relied on it stops taking money off: confirm with the person first.","security":[{"oauth2":["loyalty:write"]}],"x-kind":"write","x-mcp":true,"x-support":false,"x-admin-only":true,"parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"discount_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/loyalty/schemes/{scheme_id}/square-groups":{"get":{"operationId":"loyalty.schemes.square_groups.get","tags":["Loyalty"],"summary":"A scheme's Square groups","description":"The Square groups a scheme puts every member in, and the marketing groups members can pick from, with whether each still exists in Square.","security":[{"oauth2":["loyalty:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"scheme_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"scheme_id":{"type":"string"},"customer_groups":{"type":"array","items":{"type":"object","properties":{"account_id":{"type":["string","null"]},"group_id":{"type":"string"},"name":{"type":["string","null"]},"exists":{"type":["boolean","null"]}},"required":["account_id","group_id","name","exists"],"additionalProperties":false},"description":"Every member is put in these groups when they join."},"marketing":{"type":"object","properties":{"enabled":{"type":"boolean"},"explainer":{"type":["string","null"]},"groups":{"type":"array","items":{"type":"object","properties":{"account_id":{"type":["string","null"]},"group_id":{"type":"string"},"display_name":{"type":["string","null"]},"exists":{"type":["boolean","null"]}},"required":["account_id","group_id","display_name","exists"],"additionalProperties":false},"description":"Groups a member can pick from when they join, e.g. their favourite venue."}},"required":["enabled","explainer","groups"],"additionalProperties":false}},"required":["scheme_id","customer_groups","marketing"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"put":{"operationId":"loyalty.schemes.square_groups.update","tags":["Loyalty"],"summary":"Set a scheme's Square groups","description":"Sets the Square groups every member is put in when they join, and the marketing groups they can pick from. Each list sent replaces the whole list; leave one out to keep it. Every group must exist in its account (SQUARE_GROUP_MISSING otherwise: make it with square.customer_groups.create first). Members who join from then on are added; existing members are not moved.","security":[{"oauth2":["loyalty:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"scheme_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"customer_groups":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"account_id":{"type":"string","minLength":1,"maxLength":64},"group_id":{"type":"string","minLength":1,"maxLength":64}},"required":["account_id","group_id"]}},"marketing_groups":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"account_id":{"type":"string","minLength":1,"maxLength":64},"group_id":{"type":"string","minLength":1,"maxLength":64},"display_name":{"type":"string","minLength":1,"maxLength":191,"description":"What the member sees, e.g. the venue name."}},"required":["account_id","group_id","display_name"]}},"marketing_enabled":{"type":"boolean"},"marketing_explainer":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"scheme_id":{"type":"string"},"customer_groups":{"type":"array","items":{"type":"object","properties":{"account_id":{"type":["string","null"]},"group_id":{"type":"string"},"name":{"type":["string","null"]},"exists":{"type":["boolean","null"]}},"required":["account_id","group_id","name","exists"],"additionalProperties":false},"description":"Every member is put in these groups when they join."},"marketing":{"type":"object","properties":{"enabled":{"type":"boolean"},"explainer":{"type":["string","null"]},"groups":{"type":"array","items":{"type":"object","properties":{"account_id":{"type":["string","null"]},"group_id":{"type":"string"},"display_name":{"type":["string","null"]},"exists":{"type":["boolean","null"]}},"required":["account_id","group_id","display_name","exists"],"additionalProperties":false},"description":"Groups a member can pick from when they join, e.g. their favourite venue."}},"required":["enabled","explainer","groups"],"additionalProperties":false}},"required":["scheme_id","customer_groups","marketing"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/loyalty/schemes/{scheme_id}/rewards/{reward_id}/square":{"get":{"operationId":"loyalty.rewards.square.get","tags":["Loyalty"],"summary":"A reward's Square set-up","description":"For each Square account the scheme uses: the customer group a redeeming member is put in, whether it still exists, and the discounts for it, which is what the member gets at the till. problem says what stops it working, and fix what to do.","security":[{"oauth2":["loyalty:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"scheme_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"reward_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"reward_id":{"type":"string"},"accounts":{"type":"array","items":{"type":"object","properties":{"account_id":{"type":"string"},"merchant_name":{"type":["string","null"]},"customer_group":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"exists":{"type":["boolean","null"]}},"required":["id","name","exists"],"additionalProperties":false},{"type":"null"}],"description":"The group a redeeming member is put in. Null when none is linked."},"discounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The discount's pricing rule in Square."},"name":{"type":"string"},"kind":{"type":"string","enum":["percentage","amount"]},"percentage":{"type":["number","null"]},"amount":{"anyOf":[{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minor units, e.g. 500 for £5.00."},"currency":{"type":"string"}},"required":["amount","currency"],"additionalProperties":false},{"type":"null"}]},"maximum_amount":{"anyOf":[{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minor units, e.g. 500 for £5.00."},"currency":{"type":"string"}},"required":["amount","currency"],"additionalProperties":false},{"type":"null"}]},"applies_to":{"type":"object","properties":{"all_items":{"type":"boolean"},"product_ids":{"type":"array","items":{"type":"string"},"description":"Square catalogue item or category ids."},"max_quantity":{"description":"At most this many matching items per bill.","type":["number","null"]}},"required":["all_items","product_ids","max_quantity"],"additionalProperties":false},"excluded_product_ids":{"type":"array","items":{"type":"string"}},"customer_group_ids":{"type":"array","items":{"type":"string"},"description":"Only customers in one of these groups get it."},"valid_from":{"type":["string","null"]},"valid_until":{"type":["string","null"]},"minimum_spend":{"anyOf":[{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minor units, e.g. 500 for £5.00."},"currency":{"type":"string"}},"required":["amount","currency"],"additionalProperties":false},{"type":"null"}]},"automatic":{"type":"boolean","description":"Applied by the till by itself. False: a plain discount staff apply."},"editable":{"type":"boolean","description":"False for discounts made in Square in a way this cannot change."},"managed_by":{"type":["string","null"]}},"required":["id","name","kind","percentage","amount","maximum_amount","applies_to","excluded_product_ids","customer_group_ids","valid_from","valid_until","minimum_spend","automatic","editable","managed_by"],"additionalProperties":false},"description":"Discounts for that group: what the member gets at the till."},"problem":{"anyOf":[{"type":"string","enum":["NO_GROUP","SQUARE_GROUP_MISSING","NO_DISCOUNT"]},{"type":"null"}],"description":"What stops the reward working at the till on this account, if anything."},"fix":{"type":["string","null"]}},"required":["account_id","merchant_name","customer_group","discounts","problem","fix"],"additionalProperties":false}}},"required":["reward_id","accounts"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/loyalty/schemes/{scheme_id}/rewards/{reward_id}/square/{account_id}":{"post":{"operationId":"loyalty.rewards.square.link","tags":["Loyalty"],"summary":"Link a reward to a Square customer group","description":"Links the group a member is put in when they redeem the reward, on one Square account. With customer_group_id, that existing group (it must exist in the account). Without it, Stampede keeps a linked group that still exists, or makes a new \"Reward: <title>\" group when none is linked or the linked one was deleted in Square: the way to recover from SQUARE_GROUP_MISSING. Replacing a different linked group needs replace: true. Then make a discount for the group (square.discounts.create).","security":[{"oauth2":["loyalty:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"scheme_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"reward_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"customer_group_id":{"type":"string","minLength":1,"maxLength":64},"replace":{"default":false,"type":"boolean"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"account_id":{"type":"string"},"customer_group_id":{"type":"string"},"created":{"type":"boolean"}},"required":["account_id","customer_group_id","created"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"loyalty.rewards.square.unlink","tags":["Loyalty"],"summary":"Unlink a reward from its Square group","description":"Stops putting redeeming members in the account's group for this reward. The group and its discounts stay in Square.","security":[{"oauth2":["loyalty:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"scheme_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"reward_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"account_id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["account_id","deleted"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/loyalty/schemes/{scheme_id}/gift-cards/settings":{"get":{"operationId":"loyalty.schemes.gift_cards.get","tags":["Loyalty"],"summary":"A scheme's gift card settings","description":"Whether members can turn points into Square gift cards, at what rate, the least and most points per card, the Square accounts cards are issued on, and how many have been made.","security":[{"oauth2":["loyalty:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"scheme_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"scheme_id":{"type":"string"},"enabled":{"type":"boolean"},"currency":{"type":"string"},"points_per_unit":{"description":"Points for 1 unit of currency (£1 for GBP). 500 points at 100 per unit makes a £5 card.","type":["number","null"]},"min_points":{"description":"Fewest points one card can take.","type":["number","null"]},"max_points":{"description":"Most points one card can take.","type":["number","null"]},"accounts":{"type":"array","items":{"type":"object","properties":{"account_id":{"type":"string"},"merchant_name":{"type":["string","null"]},"display_name":{"type":"string","description":"What a member sees when choosing where to use the card."},"default_venue_id":{"description":"The venue whose Square location issues the card.","type":["string","null"]}},"required":["account_id","merchant_name","display_name","default_venue_id"],"additionalProperties":false},"description":"The Square accounts gift cards are issued on."},"issued":{"anyOf":[{"type":"object","properties":{"cards":{"type":"number"},"points":{"type":"number"},"value":{"type":"number","description":"Minor units (pence)."}},"required":["cards","points","value"],"additionalProperties":false},{"type":"null"}],"description":"Gift cards made so far. Null when Stampede could not count them."}},"required":["scheme_id","enabled","currency","points_per_unit","min_points","max_points","accounts","issued"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"loyalty.schemes.gift_cards.update","tags":["Loyalty"],"summary":"Set up gift cards on a scheme","description":"Turns gift card mode on or off and sets it up. Members then turn points into a Square gift card in the loyalty app (points / points_per_unit = its value), usable at the till; it spends their points and cannot be undone. Turning it on needs points_per_unit and at least one Square account (square.accounts.list); each account issues cards at its default venue (default_venue_id, one of that account's venues; the first one when left out). accounts replaces the list. Tell the person the rate as money (e.g. 500 points = £5) and get their yes first.","security":[{"oauth2":["loyalty:write"]}],"x-kind":"write","x-mcp":true,"x-support":false,"x-admin-only":true,"parameters":[{"name":"scheme_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"points_per_unit":{"description":"Points for 1 unit of currency (£1 for GBP).","type":"integer","minimum":1,"maximum":100000},"min_points":{"description":"Null for no minimum.","anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]},"max_points":{"description":"Null for no maximum.","anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]},"accounts":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"account_id":{"type":"string","minLength":1},"display_name":{"description":"Default the account's merchant name.","type":"string","minLength":1,"maxLength":100},"default_venue_id":{"type":"string","minLength":1}},"required":["account_id"]}}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"scheme_id":{"type":"string"},"enabled":{"type":"boolean"},"currency":{"type":"string"},"points_per_unit":{"description":"Points for 1 unit of currency (£1 for GBP). 500 points at 100 per unit makes a £5 card.","type":["number","null"]},"min_points":{"description":"Fewest points one card can take.","type":["number","null"]},"max_points":{"description":"Most points one card can take.","type":["number","null"]},"accounts":{"type":"array","items":{"type":"object","properties":{"account_id":{"type":"string"},"merchant_name":{"type":["string","null"]},"display_name":{"type":"string","description":"What a member sees when choosing where to use the card."},"default_venue_id":{"description":"The venue whose Square location issues the card.","type":["string","null"]}},"required":["account_id","merchant_name","display_name","default_venue_id"],"additionalProperties":false},"description":"The Square accounts gift cards are issued on."},"issued":{"anyOf":[{"type":"object","properties":{"cards":{"type":"number"},"points":{"type":"number"},"value":{"type":"number","description":"Minor units (pence)."}},"required":["cards","points","value"],"additionalProperties":false},{"type":"null"}],"description":"Gift cards made so far. Null when Stampede could not count them."}},"required":["scheme_id","enabled","currency","points_per_unit","min_points","max_points","accounts","issued"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/loyalty/schemes/{scheme_id}/gift-cards":{"get":{"operationId":"loyalty.gift_cards.list","tags":["Loyalty"],"summary":"List a scheme's gift cards","description":"Gift cards members made from points, newest first: value left (as last synced from Square), points spent, the account, and whether it was sent to someone else. Card numbers are shown as their last four digits only. Who made it needs guests:read.","security":[{"oauth2":["loyalty:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"scheme_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The cursor from the previous page.","schema":{"type":"string","pattern":"^\\d+$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"membership_id":{"type":"string"},"member":{"anyOf":[{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["first_name","last_name","email"],"additionalProperties":false},{"type":"null"}],"description":"Who made it. Needs guests:read; null without it."},"card_last4":{"description":"The last four digits of the card number. The full number is never shown here.","type":["string","null"]},"balance":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string"}},"required":["amount","currency"],"additionalProperties":false,"description":"As last synced from Square, minor units."},"points_spent":{"type":"number"},"state":{"type":["string","null"]},"account":{"type":"object","properties":{"id":{"type":"string"},"merchant_name":{"type":["string","null"]}},"required":["id","merchant_name"],"additionalProperties":false},"gift":{"anyOf":[{"type":"object","properties":{"recipient_name":{"type":["string","null"]},"recipient_email":{"type":["string","null"]}},"required":["recipient_name","recipient_email"],"additionalProperties":false},{"type":"null"}],"description":"When sent to someone else. The email needs guests:read."},"created_at":{"type":"string"}},"required":["id","membership_id","member","card_last4","balance","points_spent","state","account","gift","created_at"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/menus":{"get":{"operationId":"menus.list","tags":["Ordering"],"summary":"List menus","description":"Every menu in the organisation, live or not. With `venue_id`, only the menus set up at that venue: `live` says whether guests can see each one.","security":[{"oauth2":["ordering:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"query","required":false,"description":"Only the menus set up at this venue.","schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"currency":{"type":"string"},"active":{"type":"boolean","description":"Switched on."},"live":{"type":"boolean","description":"Switched on and at one or more venues. Guests order from it when online ordering (table or collection) or pre-orders are on in its settings, and it is not paused or outside its hours."},"venue_ids":{"type":"array","items":{"type":"string"},"description":"The venues it is live at that you can see."},"sections_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"settings":{"anyOf":[{"type":"object","properties":{"online_ordering":{"type":"boolean","description":"Guests can order from it online."},"fulfilment":{"anyOf":[{"type":"string","enum":["in_store","pickup"]},{"type":"null"}],"description":"In the venue, or collected."},"pre_orders":{"type":"boolean","description":"Guests can order ahead of a booking."},"payment_mode":{"anyOf":[{"type":"string","enum":["at_venue","lead_pays_ahead","each_pays_ahead"]},{"type":"null"}]},"tipping":{"type":"boolean"},"tip_presets_percent":{"anyOf":[{"type":"array","items":{"type":"number"}},{"type":"null"}]},"service_charge_percent":{"type":["number","null"]},"paused_until":{"description":"Ordering is paused until this time.","type":["string","null"]}},"required":["online_ordering","fulfilment","pre_orders","payment_mode","tipping","tip_presets_percent","service_charge_percent","paused_until"],"additionalProperties":false},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","description","currency","active","live","venue_ids","sections_count","settings","created_at","updated_at"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"menus.create","tags":["Ordering"],"summary":"Create a draft menu","description":"A new, empty menu that is not live anywhere. Add sections and Square products to it, turn on online ordering or pre-orders (`menus.settings.update`), then put it live with `menus.publish` (scope `ordering:publish`). Payments go through your Square account.","security":[{"oauth2":["ordering:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"currency":{"default":"GBP","description":"The currency its products are priced in. Defaults to GBP.","type":"string","pattern":"^[A-Z]{3}$"}},"required":["name"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"currency":{"type":"string"},"active":{"type":"boolean","description":"Switched on."},"live":{"type":"boolean","description":"Switched on and at one or more venues. Guests order from it when online ordering (table or collection) or pre-orders are on in its settings, and it is not paused or outside its hours."},"venue_ids":{"type":"array","items":{"type":"string"},"description":"The venues it is live at that you can see."},"settings":{"anyOf":[{"type":"object","properties":{"online_ordering":{"type":"boolean","description":"Guests can order from it online."},"fulfilment":{"anyOf":[{"type":"string","enum":["in_store","pickup"]},{"type":"null"}],"description":"In the venue, or collected."},"pre_orders":{"type":"boolean","description":"Guests can order ahead of a booking."},"payment_mode":{"anyOf":[{"type":"string","enum":["at_venue","lead_pays_ahead","each_pays_ahead"]},{"type":"null"}]},"tipping":{"type":"boolean"},"tip_presets_percent":{"anyOf":[{"type":"array","items":{"type":"number"}},{"type":"null"}]},"service_charge_percent":{"type":["number","null"]},"paused_until":{"description":"Ordering is paused until this time.","type":["string","null"]}},"required":["online_ordering","fulfilment","pre_orders","payment_mode","tipping","tip_presets_percent","service_charge_percent","paused_until"],"additionalProperties":false},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"payment_venue_id":{"description":"The venue whose Square account takes the whole payment for every order, wherever it is placed. Null means none is set. On Square, a basket made at one venue is charged at that venue and a basket made at two or more cannot be paid, so a Square food hall needs one. On Stripe it is not used: each venue is paid for its own food. Also null when it is a venue you cannot see.","type":["string","null"]},"payment_provider":{"anyOf":[{"type":"string","enum":["square","stripe"]},{"type":"null"}],"description":"Who takes the payments for this menu. Putting a menu live through these tools is Square only. Null when it is neither."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","description":"Local time, e.g. \"18:00\"."},"closes":{"type":"string","description":"Local time, e.g. \"02:00\"."},"closes_next_day":{"type":"boolean","description":"True when the window runs past midnight."}},"required":["day","opens","closes","closes_next_day"],"additionalProperties":false},"description":"When it is available. Empty means always."},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"parent_id":{"type":["string","null"]},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"boolean"},"description":{"type":["string","null"]},"notice":{"type":["string","null"]},"paused_until":{"type":["string","null"]},"made_at_venue_id":{"description":"The venue whose kitchen makes this section's items and gets their tickets: in a food hall, the vendor. Null means none is set on this section: its items are made at the venue named by the nearest section above it that names one, or if none does, by catalogue: the venue the guest orders at if the Square catalogue of the item covers that venue, or else the one other venue that sells it. If several other venues sell an item, it does not appear at that venue at all, which is why a food-hall section should name its venue. Also null when it is a venue you cannot see.","type":["string","null"]},"service":{"anyOf":[{"type":"string","enum":["to_table","collect","either"]},{"type":"null"}],"description":"What the kitchen ticket says: brought to the table or collected. Tickets use the value on the section the item sits in, else the setting of the making venue, else that of the ordering venue; it is not taken from the section above, so set it on each section inside a vendor. `either` is ticketed as to the table. A collection ordering point or a pickup menu makes the ticket collected whatever this says. Null: as the venue does it."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","description":"Local time, e.g. \"18:00\"."},"closes":{"type":"string","description":"Local time, e.g. \"02:00\"."},"closes_next_day":{"type":"boolean","description":"True when the window runs past midnight."}},"required":["day","opens","closes","closes_next_day"],"additionalProperties":false},"description":"When it is available. Empty means always."},"items":{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string"},"name":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"boolean","description":"Shown on this menu."},"product_active":{"type":"boolean","description":"The product itself is active."},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"active":{"type":"boolean"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"venue_prices":{"type":"array","items":{"type":"object","properties":{"venue_id":{"type":"string"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."}},"required":["venue_id","price"],"additionalProperties":false}}},"required":["id","name","active","price","venue_prices"],"additionalProperties":false}},"modifier_groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"min_selected":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"max_selected":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"choices":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many options it offers."}},"required":["id","name","min_selected","max_selected","choices"],"additionalProperties":false}},"sold_out_at":{"type":"array","items":{"type":"string"},"description":"Venue IDs."},"hidden_at":{"type":"array","items":{"type":"string"},"description":"Venue IDs."}},"required":["product_id","name","position","active","product_active","variants","modifier_groups","sold_out_at","hidden_at"],"additionalProperties":false}}},"required":["id","name","parent_id","position","active","description","notice","paused_until","made_at_venue_id","service","hours","items"],"additionalProperties":false}}},"required":["id","name","description","currency","active","live","venue_ids","settings","created_at","updated_at","payment_venue_id","payment_provider","hours","sections"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/menus/{menu_id}":{"get":{"operationId":"menus.get","tags":["Ordering"],"summary":"Get a menu","description":"The menu with its sections and items, prices at each venue, opening hours and ordering settings. In a food hall each section can be made at its own venue (`made_at_venue_id`) and every payment taken at one (`payment_venue_id`). Ask for a product for its modifiers.","security":[{"oauth2":["ordering:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"menu_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"currency":{"type":"string"},"active":{"type":"boolean","description":"Switched on."},"live":{"type":"boolean","description":"Switched on and at one or more venues. Guests order from it when online ordering (table or collection) or pre-orders are on in its settings, and it is not paused or outside its hours."},"venue_ids":{"type":"array","items":{"type":"string"},"description":"The venues it is live at that you can see."},"settings":{"anyOf":[{"type":"object","properties":{"online_ordering":{"type":"boolean","description":"Guests can order from it online."},"fulfilment":{"anyOf":[{"type":"string","enum":["in_store","pickup"]},{"type":"null"}],"description":"In the venue, or collected."},"pre_orders":{"type":"boolean","description":"Guests can order ahead of a booking."},"payment_mode":{"anyOf":[{"type":"string","enum":["at_venue","lead_pays_ahead","each_pays_ahead"]},{"type":"null"}]},"tipping":{"type":"boolean"},"tip_presets_percent":{"anyOf":[{"type":"array","items":{"type":"number"}},{"type":"null"}]},"service_charge_percent":{"type":["number","null"]},"paused_until":{"description":"Ordering is paused until this time.","type":["string","null"]}},"required":["online_ordering","fulfilment","pre_orders","payment_mode","tipping","tip_presets_percent","service_charge_percent","paused_until"],"additionalProperties":false},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"payment_venue_id":{"description":"The venue whose Square account takes the whole payment for every order, wherever it is placed. Null means none is set. On Square, a basket made at one venue is charged at that venue and a basket made at two or more cannot be paid, so a Square food hall needs one. On Stripe it is not used: each venue is paid for its own food. Also null when it is a venue you cannot see.","type":["string","null"]},"payment_provider":{"anyOf":[{"type":"string","enum":["square","stripe"]},{"type":"null"}],"description":"Who takes the payments for this menu. Putting a menu live through these tools is Square only. Null when it is neither."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","description":"Local time, e.g. \"18:00\"."},"closes":{"type":"string","description":"Local time, e.g. \"02:00\"."},"closes_next_day":{"type":"boolean","description":"True when the window runs past midnight."}},"required":["day","opens","closes","closes_next_day"],"additionalProperties":false},"description":"When it is available. Empty means always."},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"parent_id":{"type":["string","null"]},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"boolean"},"description":{"type":["string","null"]},"notice":{"type":["string","null"]},"paused_until":{"type":["string","null"]},"made_at_venue_id":{"description":"The venue whose kitchen makes this section's items and gets their tickets: in a food hall, the vendor. Null means none is set on this section: its items are made at the venue named by the nearest section above it that names one, or if none does, by catalogue: the venue the guest orders at if the Square catalogue of the item covers that venue, or else the one other venue that sells it. If several other venues sell an item, it does not appear at that venue at all, which is why a food-hall section should name its venue. Also null when it is a venue you cannot see.","type":["string","null"]},"service":{"anyOf":[{"type":"string","enum":["to_table","collect","either"]},{"type":"null"}],"description":"What the kitchen ticket says: brought to the table or collected. Tickets use the value on the section the item sits in, else the setting of the making venue, else that of the ordering venue; it is not taken from the section above, so set it on each section inside a vendor. `either` is ticketed as to the table. A collection ordering point or a pickup menu makes the ticket collected whatever this says. Null: as the venue does it."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","description":"Local time, e.g. \"18:00\"."},"closes":{"type":"string","description":"Local time, e.g. \"02:00\"."},"closes_next_day":{"type":"boolean","description":"True when the window runs past midnight."}},"required":["day","opens","closes","closes_next_day"],"additionalProperties":false},"description":"When it is available. Empty means always."},"items":{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string"},"name":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"boolean","description":"Shown on this menu."},"product_active":{"type":"boolean","description":"The product itself is active."},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"active":{"type":"boolean"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"venue_prices":{"type":"array","items":{"type":"object","properties":{"venue_id":{"type":"string"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."}},"required":["venue_id","price"],"additionalProperties":false}}},"required":["id","name","active","price","venue_prices"],"additionalProperties":false}},"modifier_groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"min_selected":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"max_selected":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"choices":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many options it offers."}},"required":["id","name","min_selected","max_selected","choices"],"additionalProperties":false}},"sold_out_at":{"type":"array","items":{"type":"string"},"description":"Venue IDs."},"hidden_at":{"type":"array","items":{"type":"string"},"description":"Venue IDs."}},"required":["product_id","name","position","active","product_active","variants","modifier_groups","sold_out_at","hidden_at"],"additionalProperties":false}}},"required":["id","name","parent_id","position","active","description","notice","paused_until","made_at_venue_id","service","hours","items"],"additionalProperties":false}}},"required":["id","name","description","currency","active","live","venue_ids","settings","created_at","updated_at","payment_venue_id","payment_provider","hours","sections"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"put":{"operationId":"menus.update","tags":["Ordering"],"summary":"Change a draft menu's name, description or currency","description":"Drafts only. Anything not sent stays as it is. The currency can change only while every product on the menu is priced in the new one.","security":[{"oauth2":["ordering:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"menu_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"currency":{"type":"string"},"active":{"type":"boolean","description":"Switched on."},"live":{"type":"boolean","description":"Switched on and at one or more venues. Guests order from it when online ordering (table or collection) or pre-orders are on in its settings, and it is not paused or outside its hours."},"venue_ids":{"type":"array","items":{"type":"string"},"description":"The venues it is live at that you can see."},"settings":{"anyOf":[{"type":"object","properties":{"online_ordering":{"type":"boolean","description":"Guests can order from it online."},"fulfilment":{"anyOf":[{"type":"string","enum":["in_store","pickup"]},{"type":"null"}],"description":"In the venue, or collected."},"pre_orders":{"type":"boolean","description":"Guests can order ahead of a booking."},"payment_mode":{"anyOf":[{"type":"string","enum":["at_venue","lead_pays_ahead","each_pays_ahead"]},{"type":"null"}]},"tipping":{"type":"boolean"},"tip_presets_percent":{"anyOf":[{"type":"array","items":{"type":"number"}},{"type":"null"}]},"service_charge_percent":{"type":["number","null"]},"paused_until":{"description":"Ordering is paused until this time.","type":["string","null"]}},"required":["online_ordering","fulfilment","pre_orders","payment_mode","tipping","tip_presets_percent","service_charge_percent","paused_until"],"additionalProperties":false},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"payment_venue_id":{"description":"The venue whose Square account takes the whole payment for every order, wherever it is placed. Null means none is set. On Square, a basket made at one venue is charged at that venue and a basket made at two or more cannot be paid, so a Square food hall needs one. On Stripe it is not used: each venue is paid for its own food. Also null when it is a venue you cannot see.","type":["string","null"]},"payment_provider":{"anyOf":[{"type":"string","enum":["square","stripe"]},{"type":"null"}],"description":"Who takes the payments for this menu. Putting a menu live through these tools is Square only. Null when it is neither."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","description":"Local time, e.g. \"18:00\"."},"closes":{"type":"string","description":"Local time, e.g. \"02:00\"."},"closes_next_day":{"type":"boolean","description":"True when the window runs past midnight."}},"required":["day","opens","closes","closes_next_day"],"additionalProperties":false},"description":"When it is available. Empty means always."},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"parent_id":{"type":["string","null"]},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"boolean"},"description":{"type":["string","null"]},"notice":{"type":["string","null"]},"paused_until":{"type":["string","null"]},"made_at_venue_id":{"description":"The venue whose kitchen makes this section's items and gets their tickets: in a food hall, the vendor. Null means none is set on this section: its items are made at the venue named by the nearest section above it that names one, or if none does, by catalogue: the venue the guest orders at if the Square catalogue of the item covers that venue, or else the one other venue that sells it. If several other venues sell an item, it does not appear at that venue at all, which is why a food-hall section should name its venue. Also null when it is a venue you cannot see.","type":["string","null"]},"service":{"anyOf":[{"type":"string","enum":["to_table","collect","either"]},{"type":"null"}],"description":"What the kitchen ticket says: brought to the table or collected. Tickets use the value on the section the item sits in, else the setting of the making venue, else that of the ordering venue; it is not taken from the section above, so set it on each section inside a vendor. `either` is ticketed as to the table. A collection ordering point or a pickup menu makes the ticket collected whatever this says. Null: as the venue does it."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","description":"Local time, e.g. \"18:00\"."},"closes":{"type":"string","description":"Local time, e.g. \"02:00\"."},"closes_next_day":{"type":"boolean","description":"True when the window runs past midnight."}},"required":["day","opens","closes","closes_next_day"],"additionalProperties":false},"description":"When it is available. Empty means always."},"items":{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string"},"name":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"boolean","description":"Shown on this menu."},"product_active":{"type":"boolean","description":"The product itself is active."},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"active":{"type":"boolean"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"venue_prices":{"type":"array","items":{"type":"object","properties":{"venue_id":{"type":"string"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."}},"required":["venue_id","price"],"additionalProperties":false}}},"required":["id","name","active","price","venue_prices"],"additionalProperties":false}},"modifier_groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"min_selected":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"max_selected":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"choices":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many options it offers."}},"required":["id","name","min_selected","max_selected","choices"],"additionalProperties":false}},"sold_out_at":{"type":"array","items":{"type":"string"},"description":"Venue IDs."},"hidden_at":{"type":"array","items":{"type":"string"},"description":"Venue IDs."}},"required":["product_id","name","position","active","product_active","variants","modifier_groups","sold_out_at","hidden_at"],"additionalProperties":false}}},"required":["id","name","parent_id","position","active","description","notice","paused_until","made_at_venue_id","service","hours","items"],"additionalProperties":false}}},"required":["id","name","description","currency","active","live","venue_ids","settings","created_at","updated_at","payment_venue_id","payment_provider","hours","sections"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"menus.delete","tags":["Ordering"],"summary":"Delete a draft menu","description":"Drafts only: a live menu must be taken off first (`menus.unpublish`). Orders already taken from it are kept.","security":[{"oauth2":["ordering:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"menu_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/catalogues":{"get":{"operationId":"catalogues.list","tags":["Ordering"],"summary":"List the Square catalogues","description":"The Square catalogues menus are built from. Products are created and changed in Square, then synced into Stampede.","security":[{"oauth2":["ordering:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"venue_ids":{"type":"array","items":{"type":"string"},"description":"The venues it serves that you can see."}},"required":["id","name","venue_ids"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/catalogues/{catalogue_id}/products":{"get":{"operationId":"products.list","tags":["Ordering"],"summary":"List the products in a Square catalogue","description":"Products come from Square and cannot be changed through this API. With `venue_id`, only what that venue sells.","security":[{"oauth2":["ordering:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"catalogue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `cursor` from the previous page.","schema":{"type":"string","minLength":1}},{"name":"search","in":"query","required":false,"description":"Match on the product name.","schema":{"type":"string","minLength":1,"maxLength":120}},{"name":"venue_id","in":"query","required":false,"description":"Only what this venue sells.","schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"catalogue_id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"kind":{"type":["string","null"]},"is_alcohol":{"type":"boolean"},"calories":{"type":["number","null"]},"active":{"type":"boolean"},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"active":{"type":"boolean"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"vat_percent":{"type":["number","null"]},"sku":{"type":["string","null"]}},"required":["id","name","active","price","vat_percent","sku"],"additionalProperties":false}},"tags":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"kind":{"type":["string","null"]}},"required":["name","kind"],"additionalProperties":false},"description":"Allergens, dietary and other labels."},"sold_at":{"type":"array","items":{"type":"string"},"description":"The venues that sell it that you can see."}},"required":["id","catalogue_id","name","description","kind","is_alcohol","calories","active","variants","tags","sold_at"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/products/{product_id}":{"get":{"operationId":"products.get","tags":["Ordering"],"summary":"Get a product","description":"A Square product with its prices, modifier groups and modifiers, and where it is sold out or hidden. It cannot be changed through this API.","security":[{"oauth2":["ordering:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"catalogue_id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"kind":{"type":["string","null"]},"is_alcohol":{"type":"boolean"},"calories":{"type":["number","null"]},"active":{"type":"boolean"},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"active":{"type":"boolean"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"vat_percent":{"type":["number","null"]},"sku":{"type":["string","null"]}},"required":["id","name","active","price","vat_percent","sku"],"additionalProperties":false}},"tags":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"kind":{"type":["string","null"]}},"required":["name","kind"],"additionalProperties":false},"description":"Allergens, dietary and other labels."},"sold_at":{"type":"array","items":{"type":"string"},"description":"The venues that sell it that you can see."},"modifier_groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"min_selected":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"max_selected":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"modifiers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"on_by_default":{"type":"boolean"},"active":{"type":"boolean"}},"required":["id","name","price","on_by_default","active"],"additionalProperties":false}}},"required":["id","name","min_selected","max_selected","modifiers"],"additionalProperties":false}},"sold_out_at":{"type":"array","items":{"type":"string"},"description":"Venue IDs."},"hidden_at":{"type":"array","items":{"type":"string"},"description":"Venue IDs."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","description":"Local time, e.g. \"18:00\"."},"closes":{"type":"string","description":"Local time, e.g. \"02:00\"."},"closes_next_day":{"type":"boolean","description":"True when the window runs past midnight."}},"required":["day","opens","closes","closes_next_day"],"additionalProperties":false},"description":"When it is available. Empty means always."}},"required":["id","catalogue_id","name","description","kind","is_alcohol","calories","active","variants","tags","sold_at","modifier_groups","sold_out_at","hidden_at","hours"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/ordering-settings":{"get":{"operationId":"ordering_settings.get","tags":["Ordering"],"summary":"Get a venue's ordering settings","description":"How orders are fulfilled at the venue, and its kitchen timings. Times are in seconds.","security":[{"oauth2":["ordering:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"venue_id":{"type":"string"},"fulfilment_mode":{"description":"Delivered to the table, collected, or either.","type":["string","null"]},"default_prep_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"capacity":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How many orders the kitchen makes at once."},"minimum_wait_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"wait_padding_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"last_orders_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How long before closing ordering stops."},"notify_when_ready":{"type":["boolean","null"]}},"required":["venue_id","fulfilment_mode","default_prep_seconds","capacity","minimum_wait_seconds","wait_padding_seconds","last_orders_seconds","notify_when_ready"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"put":{"operationId":"ordering_settings.update","tags":["Ordering"],"summary":"Change a venue's kitchen timings","description":"Prep time, how many orders the kitchen makes at once, waits and last orders. Times are in seconds, up to two hours; null goes back to the default. Anything not sent stays as it is.","security":[{"oauth2":["ordering:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"default_prep_seconds":{"anyOf":[{"type":"integer","minimum":0,"maximum":7200},{"type":"null"}]},"capacity":{"anyOf":[{"type":"integer","minimum":1,"maximum":50},{"type":"null"}]},"minimum_wait_seconds":{"anyOf":[{"type":"integer","minimum":0,"maximum":7200},{"type":"null"}]},"wait_padding_seconds":{"anyOf":[{"type":"integer","minimum":0,"maximum":7200},{"type":"null"}]},"last_orders_seconds":{"anyOf":[{"type":"integer","minimum":0,"maximum":7200},{"type":"null"}]},"notify_when_ready":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"venue_id":{"type":"string"},"fulfilment_mode":{"description":"Delivered to the table, collected, or either.","type":["string","null"]},"default_prep_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"capacity":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How many orders the kitchen makes at once."},"minimum_wait_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"wait_padding_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"last_orders_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How long before closing ordering stops."},"notify_when_ready":{"type":["boolean","null"]}},"required":["venue_id","fulfilment_mode","default_prep_seconds","capacity","minimum_wait_seconds","wait_padding_seconds","last_orders_seconds","notify_when_ready"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/products/{product_id}/availability":{"put":{"operationId":"products.availability.update","tags":["Ordering"],"summary":"Mark a product sold out or hidden at a venue","description":"For Stampede ordering only: the till is not changed. Send `sold_out`, `hidden` or both; anything not sent stays as it is. Sold out still shows the item, marked unavailable; hidden takes it off the menu. Square can mark an item sold out from the till too, and the latest change wins.","security":[{"oauth2":["ordering:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sold_out":{"type":"boolean"},"hidden":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"product_id":{"type":"string"},"venue_id":{"type":"string"},"sold_out":{"type":"boolean"},"hidden":{"type":"boolean"}},"required":["product_id","venue_id","sold_out","hidden"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/modifiers/{modifier_id}/visibility":{"put":{"operationId":"modifiers.visibility.update","tags":["Ordering"],"summary":"Hide a modifier, or show it again","description":"Takes a modifier, such as a side or a milk, off every menu at every venue, for Stampede ordering only: the till still shows it. Needs access to every venue, because it applies to all of them.","security":[{"oauth2":["ordering:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"modifier_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"hidden":{"type":"boolean"}},"required":["hidden"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"modifier_id":{"type":"string"},"name":{"type":"string"},"hidden":{"type":"boolean"}},"required":["modifier_id","name","hidden"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/menus/{menu_id}/pause":{"put":{"operationId":"menus.pause","tags":["Ordering"],"summary":"Pause ordering from a menu, or resume it","description":"Guests cannot order from the menu until `paused_until`; null resumes it now. Applies at every venue the menu is live at, so you need access to all of them.","security":[{"oauth2":["ordering:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"menu_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"paused_until":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}],"description":"When ordering starts again. Null resumes it now."}},"required":["paused_until"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"menu_id":{"type":"string"},"paused_until":{"type":["string","null"]}},"required":["menu_id","paused_until"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/menus/{menu_id}/duplicate":{"post":{"operationId":"menus.duplicate","tags":["Ordering"],"summary":"Copy a menu as a draft","description":"A draft copy of any menu, live or not: its sections, products, hours, images and ordering settings, and the payment account and collecting venue (`payment_venue_id`) it uses. The copy is not paused, and is at no venue. This is how to change a live menu: change the copy, put it live (`menus.publish`), then take the old one off (`menus.unpublish`), in that order so guests are never without a menu.","security":[{"oauth2":["ordering:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"menu_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"currency":{"type":"string"},"active":{"type":"boolean","description":"Switched on."},"live":{"type":"boolean","description":"Switched on and at one or more venues. Guests order from it when online ordering (table or collection) or pre-orders are on in its settings, and it is not paused or outside its hours."},"venue_ids":{"type":"array","items":{"type":"string"},"description":"The venues it is live at that you can see."},"settings":{"anyOf":[{"type":"object","properties":{"online_ordering":{"type":"boolean","description":"Guests can order from it online."},"fulfilment":{"anyOf":[{"type":"string","enum":["in_store","pickup"]},{"type":"null"}],"description":"In the venue, or collected."},"pre_orders":{"type":"boolean","description":"Guests can order ahead of a booking."},"payment_mode":{"anyOf":[{"type":"string","enum":["at_venue","lead_pays_ahead","each_pays_ahead"]},{"type":"null"}]},"tipping":{"type":"boolean"},"tip_presets_percent":{"anyOf":[{"type":"array","items":{"type":"number"}},{"type":"null"}]},"service_charge_percent":{"type":["number","null"]},"paused_until":{"description":"Ordering is paused until this time.","type":["string","null"]}},"required":["online_ordering","fulfilment","pre_orders","payment_mode","tipping","tip_presets_percent","service_charge_percent","paused_until"],"additionalProperties":false},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"payment_venue_id":{"description":"The venue whose Square account takes the whole payment for every order, wherever it is placed. Null means none is set. On Square, a basket made at one venue is charged at that venue and a basket made at two or more cannot be paid, so a Square food hall needs one. On Stripe it is not used: each venue is paid for its own food. Also null when it is a venue you cannot see.","type":["string","null"]},"payment_provider":{"anyOf":[{"type":"string","enum":["square","stripe"]},{"type":"null"}],"description":"Who takes the payments for this menu. Putting a menu live through these tools is Square only. Null when it is neither."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","description":"Local time, e.g. \"18:00\"."},"closes":{"type":"string","description":"Local time, e.g. \"02:00\"."},"closes_next_day":{"type":"boolean","description":"True when the window runs past midnight."}},"required":["day","opens","closes","closes_next_day"],"additionalProperties":false},"description":"When it is available. Empty means always."},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"parent_id":{"type":["string","null"]},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"boolean"},"description":{"type":["string","null"]},"notice":{"type":["string","null"]},"paused_until":{"type":["string","null"]},"made_at_venue_id":{"description":"The venue whose kitchen makes this section's items and gets their tickets: in a food hall, the vendor. Null means none is set on this section: its items are made at the venue named by the nearest section above it that names one, or if none does, by catalogue: the venue the guest orders at if the Square catalogue of the item covers that venue, or else the one other venue that sells it. If several other venues sell an item, it does not appear at that venue at all, which is why a food-hall section should name its venue. Also null when it is a venue you cannot see.","type":["string","null"]},"service":{"anyOf":[{"type":"string","enum":["to_table","collect","either"]},{"type":"null"}],"description":"What the kitchen ticket says: brought to the table or collected. Tickets use the value on the section the item sits in, else the setting of the making venue, else that of the ordering venue; it is not taken from the section above, so set it on each section inside a vendor. `either` is ticketed as to the table. A collection ordering point or a pickup menu makes the ticket collected whatever this says. Null: as the venue does it."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","description":"Local time, e.g. \"18:00\"."},"closes":{"type":"string","description":"Local time, e.g. \"02:00\"."},"closes_next_day":{"type":"boolean","description":"True when the window runs past midnight."}},"required":["day","opens","closes","closes_next_day"],"additionalProperties":false},"description":"When it is available. Empty means always."},"items":{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string"},"name":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"boolean","description":"Shown on this menu."},"product_active":{"type":"boolean","description":"The product itself is active."},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"active":{"type":"boolean"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"venue_prices":{"type":"array","items":{"type":"object","properties":{"venue_id":{"type":"string"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."}},"required":["venue_id","price"],"additionalProperties":false}}},"required":["id","name","active","price","venue_prices"],"additionalProperties":false}},"modifier_groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"min_selected":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"max_selected":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"choices":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many options it offers."}},"required":["id","name","min_selected","max_selected","choices"],"additionalProperties":false}},"sold_out_at":{"type":"array","items":{"type":"string"},"description":"Venue IDs."},"hidden_at":{"type":"array","items":{"type":"string"},"description":"Venue IDs."}},"required":["product_id","name","position","active","product_active","variants","modifier_groups","sold_out_at","hidden_at"],"additionalProperties":false}}},"required":["id","name","parent_id","position","active","description","notice","paused_until","made_at_venue_id","service","hours","items"],"additionalProperties":false}}},"required":["id","name","description","currency","active","live","venue_ids","settings","created_at","updated_at","payment_venue_id","payment_provider","hours","sections"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/menus/{menu_id}/hours":{"put":{"operationId":"menus.hours.update","tags":["Ordering"],"summary":"Set a draft menu's hours","description":"Replaces the whole week. Local times; a window that runs past midnight sets `closes_next_day`. An empty list means always available.","security":[{"oauth2":["ordering:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"menu_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"hours":{"maxItems":56,"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"closes":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"closes_next_day":{"default":false,"type":"boolean"}},"required":["day","opens","closes"]}}},"required":["hours"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"currency":{"type":"string"},"active":{"type":"boolean","description":"Switched on."},"live":{"type":"boolean","description":"Switched on and at one or more venues. Guests order from it when online ordering (table or collection) or pre-orders are on in its settings, and it is not paused or outside its hours."},"venue_ids":{"type":"array","items":{"type":"string"},"description":"The venues it is live at that you can see."},"settings":{"anyOf":[{"type":"object","properties":{"online_ordering":{"type":"boolean","description":"Guests can order from it online."},"fulfilment":{"anyOf":[{"type":"string","enum":["in_store","pickup"]},{"type":"null"}],"description":"In the venue, or collected."},"pre_orders":{"type":"boolean","description":"Guests can order ahead of a booking."},"payment_mode":{"anyOf":[{"type":"string","enum":["at_venue","lead_pays_ahead","each_pays_ahead"]},{"type":"null"}]},"tipping":{"type":"boolean"},"tip_presets_percent":{"anyOf":[{"type":"array","items":{"type":"number"}},{"type":"null"}]},"service_charge_percent":{"type":["number","null"]},"paused_until":{"description":"Ordering is paused until this time.","type":["string","null"]}},"required":["online_ordering","fulfilment","pre_orders","payment_mode","tipping","tip_presets_percent","service_charge_percent","paused_until"],"additionalProperties":false},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"payment_venue_id":{"description":"The venue whose Square account takes the whole payment for every order, wherever it is placed. Null means none is set. On Square, a basket made at one venue is charged at that venue and a basket made at two or more cannot be paid, so a Square food hall needs one. On Stripe it is not used: each venue is paid for its own food. Also null when it is a venue you cannot see.","type":["string","null"]},"payment_provider":{"anyOf":[{"type":"string","enum":["square","stripe"]},{"type":"null"}],"description":"Who takes the payments for this menu. Putting a menu live through these tools is Square only. Null when it is neither."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","description":"Local time, e.g. \"18:00\"."},"closes":{"type":"string","description":"Local time, e.g. \"02:00\"."},"closes_next_day":{"type":"boolean","description":"True when the window runs past midnight."}},"required":["day","opens","closes","closes_next_day"],"additionalProperties":false},"description":"When it is available. Empty means always."},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"parent_id":{"type":["string","null"]},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"boolean"},"description":{"type":["string","null"]},"notice":{"type":["string","null"]},"paused_until":{"type":["string","null"]},"made_at_venue_id":{"description":"The venue whose kitchen makes this section's items and gets their tickets: in a food hall, the vendor. Null means none is set on this section: its items are made at the venue named by the nearest section above it that names one, or if none does, by catalogue: the venue the guest orders at if the Square catalogue of the item covers that venue, or else the one other venue that sells it. If several other venues sell an item, it does not appear at that venue at all, which is why a food-hall section should name its venue. Also null when it is a venue you cannot see.","type":["string","null"]},"service":{"anyOf":[{"type":"string","enum":["to_table","collect","either"]},{"type":"null"}],"description":"What the kitchen ticket says: brought to the table or collected. Tickets use the value on the section the item sits in, else the setting of the making venue, else that of the ordering venue; it is not taken from the section above, so set it on each section inside a vendor. `either` is ticketed as to the table. A collection ordering point or a pickup menu makes the ticket collected whatever this says. Null: as the venue does it."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","description":"Local time, e.g. \"18:00\"."},"closes":{"type":"string","description":"Local time, e.g. \"02:00\"."},"closes_next_day":{"type":"boolean","description":"True when the window runs past midnight."}},"required":["day","opens","closes","closes_next_day"],"additionalProperties":false},"description":"When it is available. Empty means always."},"items":{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string"},"name":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"boolean","description":"Shown on this menu."},"product_active":{"type":"boolean","description":"The product itself is active."},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"active":{"type":"boolean"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"venue_prices":{"type":"array","items":{"type":"object","properties":{"venue_id":{"type":"string"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."}},"required":["venue_id","price"],"additionalProperties":false}}},"required":["id","name","active","price","venue_prices"],"additionalProperties":false}},"modifier_groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"min_selected":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"max_selected":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"choices":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many options it offers."}},"required":["id","name","min_selected","max_selected","choices"],"additionalProperties":false}},"sold_out_at":{"type":"array","items":{"type":"string"},"description":"Venue IDs."},"hidden_at":{"type":"array","items":{"type":"string"},"description":"Venue IDs."}},"required":["product_id","name","position","active","product_active","variants","modifier_groups","sold_out_at","hidden_at"],"additionalProperties":false}}},"required":["id","name","parent_id","position","active","description","notice","paused_until","made_at_venue_id","service","hours","items"],"additionalProperties":false}}},"required":["id","name","description","currency","active","live","venue_ids","settings","created_at","updated_at","payment_venue_id","payment_provider","hours","sections"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/menus/{menu_id}/settings":{"put":{"operationId":"menus.settings.update","tags":["Ordering"],"summary":"Change a draft menu's ordering settings","description":"Drafts only. Online ordering, collection or in the venue, pre-orders, who pays and when, tips and a service charge. Anything not sent stays as it is. Percentages, e.g. 12.5.","security":[{"oauth2":["ordering:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"menu_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"online_ordering":{"type":"boolean","description":"Guests can order from it online."},"fulfilment":{"anyOf":[{"type":"string","enum":["in_store","pickup"]},{"type":"null"}],"description":"In the venue, or collected."},"pre_orders":{"type":"boolean","description":"Guests can order ahead of a booking."},"payment_mode":{"type":"string","enum":["at_venue","lead_pays_ahead","each_pays_ahead"],"description":"Who pays, and when."},"tipping":{"type":"boolean"},"tip_presets_percent":{"anyOf":[{"maxItems":3,"type":"array","items":{"type":"number","minimum":0.01,"maximum":100}},{"type":"null"}],"description":"Up to three, e.g. [10, 12.5, 15]."},"service_charge_percent":{"anyOf":[{"type":"number","minimum":0,"maximum":100},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"currency":{"type":"string"},"active":{"type":"boolean","description":"Switched on."},"live":{"type":"boolean","description":"Switched on and at one or more venues. Guests order from it when online ordering (table or collection) or pre-orders are on in its settings, and it is not paused or outside its hours."},"venue_ids":{"type":"array","items":{"type":"string"},"description":"The venues it is live at that you can see."},"settings":{"anyOf":[{"type":"object","properties":{"online_ordering":{"type":"boolean","description":"Guests can order from it online."},"fulfilment":{"anyOf":[{"type":"string","enum":["in_store","pickup"]},{"type":"null"}],"description":"In the venue, or collected."},"pre_orders":{"type":"boolean","description":"Guests can order ahead of a booking."},"payment_mode":{"anyOf":[{"type":"string","enum":["at_venue","lead_pays_ahead","each_pays_ahead"]},{"type":"null"}]},"tipping":{"type":"boolean"},"tip_presets_percent":{"anyOf":[{"type":"array","items":{"type":"number"}},{"type":"null"}]},"service_charge_percent":{"type":["number","null"]},"paused_until":{"description":"Ordering is paused until this time.","type":["string","null"]}},"required":["online_ordering","fulfilment","pre_orders","payment_mode","tipping","tip_presets_percent","service_charge_percent","paused_until"],"additionalProperties":false},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"payment_venue_id":{"description":"The venue whose Square account takes the whole payment for every order, wherever it is placed. Null means none is set. On Square, a basket made at one venue is charged at that venue and a basket made at two or more cannot be paid, so a Square food hall needs one. On Stripe it is not used: each venue is paid for its own food. Also null when it is a venue you cannot see.","type":["string","null"]},"payment_provider":{"anyOf":[{"type":"string","enum":["square","stripe"]},{"type":"null"}],"description":"Who takes the payments for this menu. Putting a menu live through these tools is Square only. Null when it is neither."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","description":"Local time, e.g. \"18:00\"."},"closes":{"type":"string","description":"Local time, e.g. \"02:00\"."},"closes_next_day":{"type":"boolean","description":"True when the window runs past midnight."}},"required":["day","opens","closes","closes_next_day"],"additionalProperties":false},"description":"When it is available. Empty means always."},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"parent_id":{"type":["string","null"]},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"boolean"},"description":{"type":["string","null"]},"notice":{"type":["string","null"]},"paused_until":{"type":["string","null"]},"made_at_venue_id":{"description":"The venue whose kitchen makes this section's items and gets their tickets: in a food hall, the vendor. Null means none is set on this section: its items are made at the venue named by the nearest section above it that names one, or if none does, by catalogue: the venue the guest orders at if the Square catalogue of the item covers that venue, or else the one other venue that sells it. If several other venues sell an item, it does not appear at that venue at all, which is why a food-hall section should name its venue. Also null when it is a venue you cannot see.","type":["string","null"]},"service":{"anyOf":[{"type":"string","enum":["to_table","collect","either"]},{"type":"null"}],"description":"What the kitchen ticket says: brought to the table or collected. Tickets use the value on the section the item sits in, else the setting of the making venue, else that of the ordering venue; it is not taken from the section above, so set it on each section inside a vendor. `either` is ticketed as to the table. A collection ordering point or a pickup menu makes the ticket collected whatever this says. Null: as the venue does it."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","description":"Local time, e.g. \"18:00\"."},"closes":{"type":"string","description":"Local time, e.g. \"02:00\"."},"closes_next_day":{"type":"boolean","description":"True when the window runs past midnight."}},"required":["day","opens","closes","closes_next_day"],"additionalProperties":false},"description":"When it is available. Empty means always."},"items":{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string"},"name":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"boolean","description":"Shown on this menu."},"product_active":{"type":"boolean","description":"The product itself is active."},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"active":{"type":"boolean"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"venue_prices":{"type":"array","items":{"type":"object","properties":{"venue_id":{"type":"string"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."}},"required":["venue_id","price"],"additionalProperties":false}}},"required":["id","name","active","price","venue_prices"],"additionalProperties":false}},"modifier_groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"min_selected":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"max_selected":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"choices":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many options it offers."}},"required":["id","name","min_selected","max_selected","choices"],"additionalProperties":false}},"sold_out_at":{"type":"array","items":{"type":"string"},"description":"Venue IDs."},"hidden_at":{"type":"array","items":{"type":"string"},"description":"Venue IDs."}},"required":["product_id","name","position","active","product_active","variants","modifier_groups","sold_out_at","hidden_at"],"additionalProperties":false}}},"required":["id","name","parent_id","position","active","description","notice","paused_until","made_at_venue_id","service","hours","items"],"additionalProperties":false}}},"required":["id","name","description","currency","active","live","venue_ids","settings","created_at","updated_at","payment_venue_id","payment_provider","hours","sections"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/menus/{menu_id}/sections":{"post":{"operationId":"menu_sections.create","tags":["Ordering"],"summary":"Add a section to a draft menu","description":"A heading such as Starters or Drinks, or in a food hall a vendor (set `made_at_venue_id` to the venue that makes its items). With `parent_id`, it sits inside another section (one level deep). Put products in it with `menu_sections.items.set`.","security":[{"oauth2":["ordering:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"menu_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"parent_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"notice":{"description":"Shown before a guest orders from it.","anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"made_at_venue_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}],"description":"The venue whose kitchen makes this section's items and gets their tickets: in a food hall, the vendor. Sections inside it that name no venue follow it. Null clears it: its items are made at the venue named by the nearest section above it that names one, or if none does, by catalogue: the venue the guest orders at if the Square catalogue of the item covers that venue, or else the one other venue that sells it. If several other venues sell an item, it does not appear at that venue at all, which is why a food-hall section should name its venue."},"service":{"anyOf":[{"type":"string","enum":["to_table","collect","either"]},{"type":"null"}],"description":"What the kitchen ticket says: brought to the table or collected. Tickets use the value on the section the item sits in, else the setting of the making venue, else that of the ordering venue; it is not taken from the section above, so set it on each section inside a vendor. `either` is ticketed as to the table. A collection ordering point or a pickup menu makes the ticket collected whatever this says. Null: as the venue does it."}},"required":["name"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"currency":{"type":"string"},"active":{"type":"boolean","description":"Switched on."},"live":{"type":"boolean","description":"Switched on and at one or more venues. Guests order from it when online ordering (table or collection) or pre-orders are on in its settings, and it is not paused or outside its hours."},"venue_ids":{"type":"array","items":{"type":"string"},"description":"The venues it is live at that you can see."},"settings":{"anyOf":[{"type":"object","properties":{"online_ordering":{"type":"boolean","description":"Guests can order from it online."},"fulfilment":{"anyOf":[{"type":"string","enum":["in_store","pickup"]},{"type":"null"}],"description":"In the venue, or collected."},"pre_orders":{"type":"boolean","description":"Guests can order ahead of a booking."},"payment_mode":{"anyOf":[{"type":"string","enum":["at_venue","lead_pays_ahead","each_pays_ahead"]},{"type":"null"}]},"tipping":{"type":"boolean"},"tip_presets_percent":{"anyOf":[{"type":"array","items":{"type":"number"}},{"type":"null"}]},"service_charge_percent":{"type":["number","null"]},"paused_until":{"description":"Ordering is paused until this time.","type":["string","null"]}},"required":["online_ordering","fulfilment","pre_orders","payment_mode","tipping","tip_presets_percent","service_charge_percent","paused_until"],"additionalProperties":false},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"payment_venue_id":{"description":"The venue whose Square account takes the whole payment for every order, wherever it is placed. Null means none is set. On Square, a basket made at one venue is charged at that venue and a basket made at two or more cannot be paid, so a Square food hall needs one. On Stripe it is not used: each venue is paid for its own food. Also null when it is a venue you cannot see.","type":["string","null"]},"payment_provider":{"anyOf":[{"type":"string","enum":["square","stripe"]},{"type":"null"}],"description":"Who takes the payments for this menu. Putting a menu live through these tools is Square only. Null when it is neither."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","description":"Local time, e.g. \"18:00\"."},"closes":{"type":"string","description":"Local time, e.g. \"02:00\"."},"closes_next_day":{"type":"boolean","description":"True when the window runs past midnight."}},"required":["day","opens","closes","closes_next_day"],"additionalProperties":false},"description":"When it is available. Empty means always."},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"parent_id":{"type":["string","null"]},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"boolean"},"description":{"type":["string","null"]},"notice":{"type":["string","null"]},"paused_until":{"type":["string","null"]},"made_at_venue_id":{"description":"The venue whose kitchen makes this section's items and gets their tickets: in a food hall, the vendor. Null means none is set on this section: its items are made at the venue named by the nearest section above it that names one, or if none does, by catalogue: the venue the guest orders at if the Square catalogue of the item covers that venue, or else the one other venue that sells it. If several other venues sell an item, it does not appear at that venue at all, which is why a food-hall section should name its venue. Also null when it is a venue you cannot see.","type":["string","null"]},"service":{"anyOf":[{"type":"string","enum":["to_table","collect","either"]},{"type":"null"}],"description":"What the kitchen ticket says: brought to the table or collected. Tickets use the value on the section the item sits in, else the setting of the making venue, else that of the ordering venue; it is not taken from the section above, so set it on each section inside a vendor. `either` is ticketed as to the table. A collection ordering point or a pickup menu makes the ticket collected whatever this says. Null: as the venue does it."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","description":"Local time, e.g. \"18:00\"."},"closes":{"type":"string","description":"Local time, e.g. \"02:00\"."},"closes_next_day":{"type":"boolean","description":"True when the window runs past midnight."}},"required":["day","opens","closes","closes_next_day"],"additionalProperties":false},"description":"When it is available. Empty means always."},"items":{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string"},"name":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"boolean","description":"Shown on this menu."},"product_active":{"type":"boolean","description":"The product itself is active."},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"active":{"type":"boolean"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"venue_prices":{"type":"array","items":{"type":"object","properties":{"venue_id":{"type":"string"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."}},"required":["venue_id","price"],"additionalProperties":false}}},"required":["id","name","active","price","venue_prices"],"additionalProperties":false}},"modifier_groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"min_selected":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"max_selected":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"choices":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many options it offers."}},"required":["id","name","min_selected","max_selected","choices"],"additionalProperties":false}},"sold_out_at":{"type":"array","items":{"type":"string"},"description":"Venue IDs."},"hidden_at":{"type":"array","items":{"type":"string"},"description":"Venue IDs."}},"required":["product_id","name","position","active","product_active","variants","modifier_groups","sold_out_at","hidden_at"],"additionalProperties":false}}},"required":["id","name","parent_id","position","active","description","notice","paused_until","made_at_venue_id","service","hours","items"],"additionalProperties":false}}},"required":["id","name","description","currency","active","live","venue_ids","settings","created_at","updated_at","payment_venue_id","payment_provider","hours","sections"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/menus/{menu_id}/sections/{section_id}":{"put":{"operationId":"menu_sections.update","tags":["Ordering"],"summary":"Change a section of a draft menu","description":"Drafts only. Anything not sent stays as it is. `position` orders sections, from 0; `active: false` keeps the section but hides it; `made_at_venue_id` is the venue that makes its items (a food hall vendor).","security":[{"oauth2":["ordering:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"menu_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"section_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"notice":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"position":{"type":"integer","minimum":0,"maximum":1000},"active":{"type":"boolean"},"made_at_venue_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}],"description":"The venue whose kitchen makes this section's items and gets their tickets: in a food hall, the vendor. Sections inside it that name no venue follow it. Null clears it: its items are made at the venue named by the nearest section above it that names one, or if none does, by catalogue: the venue the guest orders at if the Square catalogue of the item covers that venue, or else the one other venue that sells it. If several other venues sell an item, it does not appear at that venue at all, which is why a food-hall section should name its venue."},"service":{"anyOf":[{"type":"string","enum":["to_table","collect","either"]},{"type":"null"}],"description":"What the kitchen ticket says: brought to the table or collected. Tickets use the value on the section the item sits in, else the setting of the making venue, else that of the ordering venue; it is not taken from the section above, so set it on each section inside a vendor. `either` is ticketed as to the table. A collection ordering point or a pickup menu makes the ticket collected whatever this says. Null: as the venue does it."}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"currency":{"type":"string"},"active":{"type":"boolean","description":"Switched on."},"live":{"type":"boolean","description":"Switched on and at one or more venues. Guests order from it when online ordering (table or collection) or pre-orders are on in its settings, and it is not paused or outside its hours."},"venue_ids":{"type":"array","items":{"type":"string"},"description":"The venues it is live at that you can see."},"settings":{"anyOf":[{"type":"object","properties":{"online_ordering":{"type":"boolean","description":"Guests can order from it online."},"fulfilment":{"anyOf":[{"type":"string","enum":["in_store","pickup"]},{"type":"null"}],"description":"In the venue, or collected."},"pre_orders":{"type":"boolean","description":"Guests can order ahead of a booking."},"payment_mode":{"anyOf":[{"type":"string","enum":["at_venue","lead_pays_ahead","each_pays_ahead"]},{"type":"null"}]},"tipping":{"type":"boolean"},"tip_presets_percent":{"anyOf":[{"type":"array","items":{"type":"number"}},{"type":"null"}]},"service_charge_percent":{"type":["number","null"]},"paused_until":{"description":"Ordering is paused until this time.","type":["string","null"]}},"required":["online_ordering","fulfilment","pre_orders","payment_mode","tipping","tip_presets_percent","service_charge_percent","paused_until"],"additionalProperties":false},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"payment_venue_id":{"description":"The venue whose Square account takes the whole payment for every order, wherever it is placed. Null means none is set. On Square, a basket made at one venue is charged at that venue and a basket made at two or more cannot be paid, so a Square food hall needs one. On Stripe it is not used: each venue is paid for its own food. Also null when it is a venue you cannot see.","type":["string","null"]},"payment_provider":{"anyOf":[{"type":"string","enum":["square","stripe"]},{"type":"null"}],"description":"Who takes the payments for this menu. Putting a menu live through these tools is Square only. Null when it is neither."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","description":"Local time, e.g. \"18:00\"."},"closes":{"type":"string","description":"Local time, e.g. \"02:00\"."},"closes_next_day":{"type":"boolean","description":"True when the window runs past midnight."}},"required":["day","opens","closes","closes_next_day"],"additionalProperties":false},"description":"When it is available. Empty means always."},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"parent_id":{"type":["string","null"]},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"boolean"},"description":{"type":["string","null"]},"notice":{"type":["string","null"]},"paused_until":{"type":["string","null"]},"made_at_venue_id":{"description":"The venue whose kitchen makes this section's items and gets their tickets: in a food hall, the vendor. Null means none is set on this section: its items are made at the venue named by the nearest section above it that names one, or if none does, by catalogue: the venue the guest orders at if the Square catalogue of the item covers that venue, or else the one other venue that sells it. If several other venues sell an item, it does not appear at that venue at all, which is why a food-hall section should name its venue. Also null when it is a venue you cannot see.","type":["string","null"]},"service":{"anyOf":[{"type":"string","enum":["to_table","collect","either"]},{"type":"null"}],"description":"What the kitchen ticket says: brought to the table or collected. Tickets use the value on the section the item sits in, else the setting of the making venue, else that of the ordering venue; it is not taken from the section above, so set it on each section inside a vendor. `either` is ticketed as to the table. A collection ordering point or a pickup menu makes the ticket collected whatever this says. Null: as the venue does it."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","description":"Local time, e.g. \"18:00\"."},"closes":{"type":"string","description":"Local time, e.g. \"02:00\"."},"closes_next_day":{"type":"boolean","description":"True when the window runs past midnight."}},"required":["day","opens","closes","closes_next_day"],"additionalProperties":false},"description":"When it is available. Empty means always."},"items":{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string"},"name":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"boolean","description":"Shown on this menu."},"product_active":{"type":"boolean","description":"The product itself is active."},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"active":{"type":"boolean"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"venue_prices":{"type":"array","items":{"type":"object","properties":{"venue_id":{"type":"string"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."}},"required":["venue_id","price"],"additionalProperties":false}}},"required":["id","name","active","price","venue_prices"],"additionalProperties":false}},"modifier_groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"min_selected":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"max_selected":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"choices":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many options it offers."}},"required":["id","name","min_selected","max_selected","choices"],"additionalProperties":false}},"sold_out_at":{"type":"array","items":{"type":"string"},"description":"Venue IDs."},"hidden_at":{"type":"array","items":{"type":"string"},"description":"Venue IDs."}},"required":["product_id","name","position","active","product_active","variants","modifier_groups","sold_out_at","hidden_at"],"additionalProperties":false}}},"required":["id","name","parent_id","position","active","description","notice","paused_until","made_at_venue_id","service","hours","items"],"additionalProperties":false}}},"required":["id","name","description","currency","active","live","venue_ids","settings","created_at","updated_at","payment_venue_id","payment_provider","hours","sections"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"menu_sections.delete","tags":["Ordering"],"summary":"Remove a section from a draft menu","description":"Drafts only. The sections inside it go too. The products stay in your Square catalogue.","security":[{"oauth2":["ordering:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"menu_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"section_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"currency":{"type":"string"},"active":{"type":"boolean","description":"Switched on."},"live":{"type":"boolean","description":"Switched on and at one or more venues. Guests order from it when online ordering (table or collection) or pre-orders are on in its settings, and it is not paused or outside its hours."},"venue_ids":{"type":"array","items":{"type":"string"},"description":"The venues it is live at that you can see."},"settings":{"anyOf":[{"type":"object","properties":{"online_ordering":{"type":"boolean","description":"Guests can order from it online."},"fulfilment":{"anyOf":[{"type":"string","enum":["in_store","pickup"]},{"type":"null"}],"description":"In the venue, or collected."},"pre_orders":{"type":"boolean","description":"Guests can order ahead of a booking."},"payment_mode":{"anyOf":[{"type":"string","enum":["at_venue","lead_pays_ahead","each_pays_ahead"]},{"type":"null"}]},"tipping":{"type":"boolean"},"tip_presets_percent":{"anyOf":[{"type":"array","items":{"type":"number"}},{"type":"null"}]},"service_charge_percent":{"type":["number","null"]},"paused_until":{"description":"Ordering is paused until this time.","type":["string","null"]}},"required":["online_ordering","fulfilment","pre_orders","payment_mode","tipping","tip_presets_percent","service_charge_percent","paused_until"],"additionalProperties":false},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"payment_venue_id":{"description":"The venue whose Square account takes the whole payment for every order, wherever it is placed. Null means none is set. On Square, a basket made at one venue is charged at that venue and a basket made at two or more cannot be paid, so a Square food hall needs one. On Stripe it is not used: each venue is paid for its own food. Also null when it is a venue you cannot see.","type":["string","null"]},"payment_provider":{"anyOf":[{"type":"string","enum":["square","stripe"]},{"type":"null"}],"description":"Who takes the payments for this menu. Putting a menu live through these tools is Square only. Null when it is neither."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","description":"Local time, e.g. \"18:00\"."},"closes":{"type":"string","description":"Local time, e.g. \"02:00\"."},"closes_next_day":{"type":"boolean","description":"True when the window runs past midnight."}},"required":["day","opens","closes","closes_next_day"],"additionalProperties":false},"description":"When it is available. Empty means always."},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"parent_id":{"type":["string","null"]},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"boolean"},"description":{"type":["string","null"]},"notice":{"type":["string","null"]},"paused_until":{"type":["string","null"]},"made_at_venue_id":{"description":"The venue whose kitchen makes this section's items and gets their tickets: in a food hall, the vendor. Null means none is set on this section: its items are made at the venue named by the nearest section above it that names one, or if none does, by catalogue: the venue the guest orders at if the Square catalogue of the item covers that venue, or else the one other venue that sells it. If several other venues sell an item, it does not appear at that venue at all, which is why a food-hall section should name its venue. Also null when it is a venue you cannot see.","type":["string","null"]},"service":{"anyOf":[{"type":"string","enum":["to_table","collect","either"]},{"type":"null"}],"description":"What the kitchen ticket says: brought to the table or collected. Tickets use the value on the section the item sits in, else the setting of the making venue, else that of the ordering venue; it is not taken from the section above, so set it on each section inside a vendor. `either` is ticketed as to the table. A collection ordering point or a pickup menu makes the ticket collected whatever this says. Null: as the venue does it."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","description":"Local time, e.g. \"18:00\"."},"closes":{"type":"string","description":"Local time, e.g. \"02:00\"."},"closes_next_day":{"type":"boolean","description":"True when the window runs past midnight."}},"required":["day","opens","closes","closes_next_day"],"additionalProperties":false},"description":"When it is available. Empty means always."},"items":{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string"},"name":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"boolean","description":"Shown on this menu."},"product_active":{"type":"boolean","description":"The product itself is active."},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"active":{"type":"boolean"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"venue_prices":{"type":"array","items":{"type":"object","properties":{"venue_id":{"type":"string"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."}},"required":["venue_id","price"],"additionalProperties":false}}},"required":["id","name","active","price","venue_prices"],"additionalProperties":false}},"modifier_groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"min_selected":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"max_selected":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"choices":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many options it offers."}},"required":["id","name","min_selected","max_selected","choices"],"additionalProperties":false}},"sold_out_at":{"type":"array","items":{"type":"string"},"description":"Venue IDs."},"hidden_at":{"type":"array","items":{"type":"string"},"description":"Venue IDs."}},"required":["product_id","name","position","active","product_active","variants","modifier_groups","sold_out_at","hidden_at"],"additionalProperties":false}}},"required":["id","name","parent_id","position","active","description","notice","paused_until","made_at_venue_id","service","hours","items"],"additionalProperties":false}}},"required":["id","name","description","currency","active","live","venue_ids","settings","created_at","updated_at","payment_venue_id","payment_provider","hours","sections"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/menus/{menu_id}/sections/{section_id}/items":{"put":{"operationId":"menu_sections.items.set","tags":["Ordering"],"summary":"Set the products in a section of a draft menu","description":"Replaces the section's products with these, in this order: products not listed come off the section. Square products only, priced in the menu's currency, up to 100. An empty list empties the section.","security":[{"oauth2":["ordering:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"menu_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"section_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"product_ids":{"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["product_ids"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"currency":{"type":"string"},"active":{"type":"boolean","description":"Switched on."},"live":{"type":"boolean","description":"Switched on and at one or more venues. Guests order from it when online ordering (table or collection) or pre-orders are on in its settings, and it is not paused or outside its hours."},"venue_ids":{"type":"array","items":{"type":"string"},"description":"The venues it is live at that you can see."},"settings":{"anyOf":[{"type":"object","properties":{"online_ordering":{"type":"boolean","description":"Guests can order from it online."},"fulfilment":{"anyOf":[{"type":"string","enum":["in_store","pickup"]},{"type":"null"}],"description":"In the venue, or collected."},"pre_orders":{"type":"boolean","description":"Guests can order ahead of a booking."},"payment_mode":{"anyOf":[{"type":"string","enum":["at_venue","lead_pays_ahead","each_pays_ahead"]},{"type":"null"}]},"tipping":{"type":"boolean"},"tip_presets_percent":{"anyOf":[{"type":"array","items":{"type":"number"}},{"type":"null"}]},"service_charge_percent":{"type":["number","null"]},"paused_until":{"description":"Ordering is paused until this time.","type":["string","null"]}},"required":["online_ordering","fulfilment","pre_orders","payment_mode","tipping","tip_presets_percent","service_charge_percent","paused_until"],"additionalProperties":false},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"payment_venue_id":{"description":"The venue whose Square account takes the whole payment for every order, wherever it is placed. Null means none is set. On Square, a basket made at one venue is charged at that venue and a basket made at two or more cannot be paid, so a Square food hall needs one. On Stripe it is not used: each venue is paid for its own food. Also null when it is a venue you cannot see.","type":["string","null"]},"payment_provider":{"anyOf":[{"type":"string","enum":["square","stripe"]},{"type":"null"}],"description":"Who takes the payments for this menu. Putting a menu live through these tools is Square only. Null when it is neither."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","description":"Local time, e.g. \"18:00\"."},"closes":{"type":"string","description":"Local time, e.g. \"02:00\"."},"closes_next_day":{"type":"boolean","description":"True when the window runs past midnight."}},"required":["day","opens","closes","closes_next_day"],"additionalProperties":false},"description":"When it is available. Empty means always."},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"parent_id":{"type":["string","null"]},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"boolean"},"description":{"type":["string","null"]},"notice":{"type":["string","null"]},"paused_until":{"type":["string","null"]},"made_at_venue_id":{"description":"The venue whose kitchen makes this section's items and gets their tickets: in a food hall, the vendor. Null means none is set on this section: its items are made at the venue named by the nearest section above it that names one, or if none does, by catalogue: the venue the guest orders at if the Square catalogue of the item covers that venue, or else the one other venue that sells it. If several other venues sell an item, it does not appear at that venue at all, which is why a food-hall section should name its venue. Also null when it is a venue you cannot see.","type":["string","null"]},"service":{"anyOf":[{"type":"string","enum":["to_table","collect","either"]},{"type":"null"}],"description":"What the kitchen ticket says: brought to the table or collected. Tickets use the value on the section the item sits in, else the setting of the making venue, else that of the ordering venue; it is not taken from the section above, so set it on each section inside a vendor. `either` is ticketed as to the table. A collection ordering point or a pickup menu makes the ticket collected whatever this says. Null: as the venue does it."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","description":"Local time, e.g. \"18:00\"."},"closes":{"type":"string","description":"Local time, e.g. \"02:00\"."},"closes_next_day":{"type":"boolean","description":"True when the window runs past midnight."}},"required":["day","opens","closes","closes_next_day"],"additionalProperties":false},"description":"When it is available. Empty means always."},"items":{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string"},"name":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"boolean","description":"Shown on this menu."},"product_active":{"type":"boolean","description":"The product itself is active."},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"active":{"type":"boolean"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"venue_prices":{"type":"array","items":{"type":"object","properties":{"venue_id":{"type":"string"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."}},"required":["venue_id","price"],"additionalProperties":false}}},"required":["id","name","active","price","venue_prices"],"additionalProperties":false}},"modifier_groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"min_selected":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"max_selected":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"choices":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many options it offers."}},"required":["id","name","min_selected","max_selected","choices"],"additionalProperties":false}},"sold_out_at":{"type":"array","items":{"type":"string"},"description":"Venue IDs."},"hidden_at":{"type":"array","items":{"type":"string"},"description":"Venue IDs."}},"required":["product_id","name","position","active","product_active","variants","modifier_groups","sold_out_at","hidden_at"],"additionalProperties":false}}},"required":["id","name","parent_id","position","active","description","notice","paused_until","made_at_venue_id","service","hours","items"],"additionalProperties":false}}},"required":["id","name","description","currency","active","live","venue_ids","settings","created_at","updated_at","payment_venue_id","payment_provider","hours","sections"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/menus/{menu_id}/live":{"put":{"operationId":"menus.publish","tags":["Ordering"],"summary":"Put a menu live at venues","description":"Switches the menu on at these venues, straight away. Guests order from it there when online ordering (table or collection) or pre-orders are on in its settings (`menus.settings.update`), and it is not paused or outside its hours. Sets the whole list: a venue the menu is live at that is not listed is taken off. Payments need Square: the payment venue of the menu (`payment_venue_id`) must be on Square, or if none is set, every venue listed must be. The payment venue need not be one of the venues listed. With no payment venue, a basket made at two or more venues cannot be paid. At each venue guests must have something they can order: an item made somewhere, by the nearest section that names a venue or by catalogue. You need access to every venue listed and every venue the menu is set up at. At a new venue it goes live in every area; an area limit it already has at a venue (e.g. the bar only) is kept, and area limits are set in Stampede. To replace a live menu, put the new one live first, then take the old one off.","security":[{"oauth2":["ordering:publish"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"menu_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"venue_ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"Where it goes live. To take it off everywhere, use `menus.unpublish`."}},"required":["venue_ids"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"currency":{"type":"string"},"active":{"type":"boolean","description":"Switched on."},"live":{"type":"boolean","description":"Switched on and at one or more venues. Guests order from it when online ordering (table or collection) or pre-orders are on in its settings, and it is not paused or outside its hours."},"venue_ids":{"type":"array","items":{"type":"string"},"description":"The venues it is live at that you can see."},"settings":{"anyOf":[{"type":"object","properties":{"online_ordering":{"type":"boolean","description":"Guests can order from it online."},"fulfilment":{"anyOf":[{"type":"string","enum":["in_store","pickup"]},{"type":"null"}],"description":"In the venue, or collected."},"pre_orders":{"type":"boolean","description":"Guests can order ahead of a booking."},"payment_mode":{"anyOf":[{"type":"string","enum":["at_venue","lead_pays_ahead","each_pays_ahead"]},{"type":"null"}]},"tipping":{"type":"boolean"},"tip_presets_percent":{"anyOf":[{"type":"array","items":{"type":"number"}},{"type":"null"}]},"service_charge_percent":{"type":["number","null"]},"paused_until":{"description":"Ordering is paused until this time.","type":["string","null"]}},"required":["online_ordering","fulfilment","pre_orders","payment_mode","tipping","tip_presets_percent","service_charge_percent","paused_until"],"additionalProperties":false},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"payment_venue_id":{"description":"The venue whose Square account takes the whole payment for every order, wherever it is placed. Null means none is set. On Square, a basket made at one venue is charged at that venue and a basket made at two or more cannot be paid, so a Square food hall needs one. On Stripe it is not used: each venue is paid for its own food. Also null when it is a venue you cannot see.","type":["string","null"]},"payment_provider":{"anyOf":[{"type":"string","enum":["square","stripe"]},{"type":"null"}],"description":"Who takes the payments for this menu. Putting a menu live through these tools is Square only. Null when it is neither."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","description":"Local time, e.g. \"18:00\"."},"closes":{"type":"string","description":"Local time, e.g. \"02:00\"."},"closes_next_day":{"type":"boolean","description":"True when the window runs past midnight."}},"required":["day","opens","closes","closes_next_day"],"additionalProperties":false},"description":"When it is available. Empty means always."},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"parent_id":{"type":["string","null"]},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"boolean"},"description":{"type":["string","null"]},"notice":{"type":["string","null"]},"paused_until":{"type":["string","null"]},"made_at_venue_id":{"description":"The venue whose kitchen makes this section's items and gets their tickets: in a food hall, the vendor. Null means none is set on this section: its items are made at the venue named by the nearest section above it that names one, or if none does, by catalogue: the venue the guest orders at if the Square catalogue of the item covers that venue, or else the one other venue that sells it. If several other venues sell an item, it does not appear at that venue at all, which is why a food-hall section should name its venue. Also null when it is a venue you cannot see.","type":["string","null"]},"service":{"anyOf":[{"type":"string","enum":["to_table","collect","either"]},{"type":"null"}],"description":"What the kitchen ticket says: brought to the table or collected. Tickets use the value on the section the item sits in, else the setting of the making venue, else that of the ordering venue; it is not taken from the section above, so set it on each section inside a vendor. `either` is ticketed as to the table. A collection ordering point or a pickup menu makes the ticket collected whatever this says. Null: as the venue does it."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","description":"Local time, e.g. \"18:00\"."},"closes":{"type":"string","description":"Local time, e.g. \"02:00\"."},"closes_next_day":{"type":"boolean","description":"True when the window runs past midnight."}},"required":["day","opens","closes","closes_next_day"],"additionalProperties":false},"description":"When it is available. Empty means always."},"items":{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string"},"name":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"boolean","description":"Shown on this menu."},"product_active":{"type":"boolean","description":"The product itself is active."},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"active":{"type":"boolean"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"venue_prices":{"type":"array","items":{"type":"object","properties":{"venue_id":{"type":"string"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."}},"required":["venue_id","price"],"additionalProperties":false}}},"required":["id","name","active","price","venue_prices"],"additionalProperties":false}},"modifier_groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"min_selected":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"max_selected":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"choices":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many options it offers."}},"required":["id","name","min_selected","max_selected","choices"],"additionalProperties":false}},"sold_out_at":{"type":"array","items":{"type":"string"},"description":"Venue IDs."},"hidden_at":{"type":"array","items":{"type":"string"},"description":"Venue IDs."}},"required":["product_id","name","position","active","product_active","variants","modifier_groups","sold_out_at","hidden_at"],"additionalProperties":false}}},"required":["id","name","parent_id","position","active","description","notice","paused_until","made_at_venue_id","service","hours","items"],"additionalProperties":false}}},"required":["id","name","description","currency","active","live","venue_ids","settings","created_at","updated_at","payment_venue_id","payment_provider","hours","sections"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"menus.unpublish","tags":["Ordering"],"summary":"Take a menu off at every venue","description":"Guests can no longer see or order from it. Orders already taken are kept. The menu becomes a draft again, so it can be changed and put live again. You need access to every venue it is live at.","security":[{"oauth2":["ordering:publish"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"menu_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"currency":{"type":"string"},"active":{"type":"boolean","description":"Switched on."},"live":{"type":"boolean","description":"Switched on and at one or more venues. Guests order from it when online ordering (table or collection) or pre-orders are on in its settings, and it is not paused or outside its hours."},"venue_ids":{"type":"array","items":{"type":"string"},"description":"The venues it is live at that you can see."},"settings":{"anyOf":[{"type":"object","properties":{"online_ordering":{"type":"boolean","description":"Guests can order from it online."},"fulfilment":{"anyOf":[{"type":"string","enum":["in_store","pickup"]},{"type":"null"}],"description":"In the venue, or collected."},"pre_orders":{"type":"boolean","description":"Guests can order ahead of a booking."},"payment_mode":{"anyOf":[{"type":"string","enum":["at_venue","lead_pays_ahead","each_pays_ahead"]},{"type":"null"}]},"tipping":{"type":"boolean"},"tip_presets_percent":{"anyOf":[{"type":"array","items":{"type":"number"}},{"type":"null"}]},"service_charge_percent":{"type":["number","null"]},"paused_until":{"description":"Ordering is paused until this time.","type":["string","null"]}},"required":["online_ordering","fulfilment","pre_orders","payment_mode","tipping","tip_presets_percent","service_charge_percent","paused_until"],"additionalProperties":false},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"payment_venue_id":{"description":"The venue whose Square account takes the whole payment for every order, wherever it is placed. Null means none is set. On Square, a basket made at one venue is charged at that venue and a basket made at two or more cannot be paid, so a Square food hall needs one. On Stripe it is not used: each venue is paid for its own food. Also null when it is a venue you cannot see.","type":["string","null"]},"payment_provider":{"anyOf":[{"type":"string","enum":["square","stripe"]},{"type":"null"}],"description":"Who takes the payments for this menu. Putting a menu live through these tools is Square only. Null when it is neither."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","description":"Local time, e.g. \"18:00\"."},"closes":{"type":"string","description":"Local time, e.g. \"02:00\"."},"closes_next_day":{"type":"boolean","description":"True when the window runs past midnight."}},"required":["day","opens","closes","closes_next_day"],"additionalProperties":false},"description":"When it is available. Empty means always."},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"parent_id":{"type":["string","null"]},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"boolean"},"description":{"type":["string","null"]},"notice":{"type":["string","null"]},"paused_until":{"type":["string","null"]},"made_at_venue_id":{"description":"The venue whose kitchen makes this section's items and gets their tickets: in a food hall, the vendor. Null means none is set on this section: its items are made at the venue named by the nearest section above it that names one, or if none does, by catalogue: the venue the guest orders at if the Square catalogue of the item covers that venue, or else the one other venue that sells it. If several other venues sell an item, it does not appear at that venue at all, which is why a food-hall section should name its venue. Also null when it is a venue you cannot see.","type":["string","null"]},"service":{"anyOf":[{"type":"string","enum":["to_table","collect","either"]},{"type":"null"}],"description":"What the kitchen ticket says: brought to the table or collected. Tickets use the value on the section the item sits in, else the setting of the making venue, else that of the ordering venue; it is not taken from the section above, so set it on each section inside a vendor. `either` is ticketed as to the table. A collection ordering point or a pickup menu makes the ticket collected whatever this says. Null: as the venue does it."},"hours":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"opens":{"type":"string","description":"Local time, e.g. \"18:00\"."},"closes":{"type":"string","description":"Local time, e.g. \"02:00\"."},"closes_next_day":{"type":"boolean","description":"True when the window runs past midnight."}},"required":["day","opens","closes","closes_next_day"],"additionalProperties":false},"description":"When it is available. Empty means always."},"items":{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string"},"name":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"boolean","description":"Shown on this menu."},"product_active":{"type":"boolean","description":"The product itself is active."},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"active":{"type":"boolean"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"venue_prices":{"type":"array","items":{"type":"object","properties":{"venue_id":{"type":"string"},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."}},"required":["venue_id","price"],"additionalProperties":false}}},"required":["id","name","active","price","venue_prices"],"additionalProperties":false}},"modifier_groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"min_selected":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"max_selected":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"choices":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many options it offers."}},"required":["id","name","min_selected","max_selected","choices"],"additionalProperties":false}},"sold_out_at":{"type":"array","items":{"type":"string"},"description":"Venue IDs."},"hidden_at":{"type":"array","items":{"type":"string"},"description":"Venue IDs."}},"required":["product_id","name","position","active","product_active","variants","modifier_groups","sold_out_at","hidden_at"],"additionalProperties":false}}},"required":["id","name","parent_id","position","active","description","notice","paused_until","made_at_venue_id","service","hours","items"],"additionalProperties":false}}},"required":["id","name","description","currency","active","live","venue_ids","settings","created_at","updated_at","payment_venue_id","payment_provider","hours","sections"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/tables":{"get":{"operationId":"tables.list","tags":["Ordering"],"summary":"List a venue's tables and their QR codes","description":"Every place guests scan to order at the venue (tables, counters, seats, rooms or areas), with the link each QR code holds.","security":[{"oauth2":["ordering:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"venue_id":{"type":"string"},"name":{"type":"string","description":"What guests and staff call it, e.g. \"Table 12\"."},"reference":{"type":"string","description":"What the kitchen ticket says. Unique at the venue; defaults to the name."},"kind":{"type":"string","enum":["table","counter","seat","room","zone"]},"area":{"description":"An area of the venue, e.g. \"Terrace\". Menus can be limited to areas.","type":["string","null"]},"service":{"type":"string","enum":["to_table","collect","either"],"description":"Whether orders are brought to the table, collected, or either."},"active":{"type":"boolean","description":"Off: scanning the code does not let guests order."},"qr_url":{"type":"string","description":"The link the QR code holds. Print it as a QR code; anyone with it can order to this table."},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","venue_id","name","reference","kind","area","service","active","qr_url","created_at","updated_at"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"tables.create","tags":["Ordering"],"summary":"Add a table","description":"A new place to scan and order, with its own QR code. Print `qr_url` as a QR code. Guests can order there from the menus live at the venue (and in its area, if a menu is limited to areas).","security":[{"oauth2":["ordering:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"description":"e.g. \"Table 12\"."},"reference":{"description":"What the kitchen ticket says. Defaults to the name.","type":"string","minLength":1,"maxLength":64},"kind":{"default":"table","type":"string","enum":["table","counter","seat","room","zone"]},"area":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"service":{"default":"to_table","type":"string","enum":["to_table","collect","either"]}},"required":["name"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"venue_id":{"type":"string"},"name":{"type":"string","description":"What guests and staff call it, e.g. \"Table 12\"."},"reference":{"type":"string","description":"What the kitchen ticket says. Unique at the venue; defaults to the name."},"kind":{"type":"string","enum":["table","counter","seat","room","zone"]},"area":{"description":"An area of the venue, e.g. \"Terrace\". Menus can be limited to areas.","type":["string","null"]},"service":{"type":"string","enum":["to_table","collect","either"],"description":"Whether orders are brought to the table, collected, or either."},"active":{"type":"boolean","description":"Off: scanning the code does not let guests order."},"qr_url":{"type":"string","description":"The link the QR code holds. Print it as a QR code; anyone with it can order to this table."},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","venue_id","name","reference","kind","area","service","active","qr_url","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/venues/{venue_id}/tables/bulk":{"post":{"operationId":"tables.create_many","tags":["Ordering"],"summary":"Add many tables at once","description":"One table per name, each with its own QR code, up to 500. A name already used as a reference at the venue is skipped and listed in `skipped`, so sending the same list twice adds nothing twice.","security":[{"oauth2":["ordering:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"venue_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"names":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"e.g. [\"Table 1\", \"Table 2\"]."},"kind":{"default":"table","type":"string","enum":["table","counter","seat","room","zone"]},"area":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"service":{"default":"to_table","type":"string","enum":["to_table","collect","either"]}},"required":["names"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"venue_id":{"type":"string"},"name":{"type":"string","description":"What guests and staff call it, e.g. \"Table 12\"."},"reference":{"type":"string","description":"What the kitchen ticket says. Unique at the venue; defaults to the name."},"kind":{"type":"string","enum":["table","counter","seat","room","zone"]},"area":{"description":"An area of the venue, e.g. \"Terrace\". Menus can be limited to areas.","type":["string","null"]},"service":{"type":"string","enum":["to_table","collect","either"],"description":"Whether orders are brought to the table, collected, or either."},"active":{"type":"boolean","description":"Off: scanning the code does not let guests order."},"qr_url":{"type":"string","description":"The link the QR code holds. Print it as a QR code; anyone with it can order to this table."},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","venue_id","name","reference","kind","area","service","active","qr_url","created_at","updated_at"],"additionalProperties":false}},"skipped":{"type":"array","items":{"type":"string"},"description":"Names already in use at the venue."}},"required":["created","skipped"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/tables/{table_id}":{"put":{"operationId":"tables.update","tags":["Ordering"],"summary":"Change a table","description":"Rename it, change its reference, kind, area or service, or switch it off (`active: false`) so scanning its code no longer lets guests order. Anything not sent stays as it is. Its QR code does not change.","security":[{"oauth2":["ordering:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"reference":{"type":"string","minLength":1,"maxLength":64},"kind":{"type":"string","enum":["table","counter","seat","room","zone"]},"area":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"service":{"type":"string","enum":["to_table","collect","either"]},"active":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"venue_id":{"type":"string"},"name":{"type":"string","description":"What guests and staff call it, e.g. \"Table 12\"."},"reference":{"type":"string","description":"What the kitchen ticket says. Unique at the venue; defaults to the name."},"kind":{"type":"string","enum":["table","counter","seat","room","zone"]},"area":{"description":"An area of the venue, e.g. \"Terrace\". Menus can be limited to areas.","type":["string","null"]},"service":{"type":"string","enum":["to_table","collect","either"],"description":"Whether orders are brought to the table, collected, or either."},"active":{"type":"boolean","description":"Off: scanning the code does not let guests order."},"qr_url":{"type":"string","description":"The link the QR code holds. Print it as a QR code; anyone with it can order to this table."},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","venue_id","name","reference","kind","area","service","active","qr_url","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"tables.delete","tags":["Ordering"],"summary":"Remove a table","description":"Its QR code stops working. Orders already placed there are kept. To stop orders for a while instead, switch it off with `tables.update`.","security":[{"oauth2":["ordering:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/tables/{table_id}/qr":{"post":{"operationId":"tables.qr.replace","tags":["Ordering"],"summary":"Replace a table's QR code","description":"A new link for the table. The old printed code stops working at once, so the table takes no orders until the new one is on it: print the returned `qr_url` straight away. For a code that has been copied or shared where it should not be.","security":[{"oauth2":["ordering:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"venue_id":{"type":"string"},"name":{"type":"string","description":"What guests and staff call it, e.g. \"Table 12\"."},"reference":{"type":"string","description":"What the kitchen ticket says. Unique at the venue; defaults to the name."},"kind":{"type":"string","enum":["table","counter","seat","room","zone"]},"area":{"description":"An area of the venue, e.g. \"Terrace\". Menus can be limited to areas.","type":["string","null"]},"service":{"type":"string","enum":["to_table","collect","either"],"description":"Whether orders are brought to the table, collected, or either."},"active":{"type":"boolean","description":"Off: scanning the code does not let guests order."},"qr_url":{"type":"string","description":"The link the QR code holds. Print it as a QR code; anyone with it can order to this table."},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","venue_id","name","reference","kind","area","service","active","qr_url","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/orders":{"get":{"operationId":"orders.list","tags":["Orders"],"summary":"List orders","description":"Orders taken through Stampede, newest first. Lines are not included; get one order for its lines.","security":[{"oauth2":["orders:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"venue_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"channel","in":"query","required":false,"description":"One or more of pre_order, table, collection, comma-separated.","style":"form","explode":false,"schema":{"minItems":1,"type":"array","items":{"type":"string","enum":["pre_order","table","collection"]}}},{"name":"status","in":"query","required":false,"description":"One or more, comma-separated.","style":"form","explode":false,"schema":{"minItems":1,"type":"array","items":{"type":"string","enum":["draft","locked","placed","in_progress","ready","completed","cancelled"]}}},{"name":"payment_status","in":"query","required":false,"description":"One or more, comma-separated.","style":"form","explode":false,"schema":{"minItems":1,"type":"array","items":{"type":"string","enum":["unpaid","partial","paid","refunded","partially_refunded","comped"]}}},{"name":"placed_from","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"placed_to","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":512}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"reference":{"type":"string","description":"The short code on the receipt and the Square ticket."},"venue_id":{"type":["string","null"]},"channel":{"type":"string","enum":["pre_order","table","collection"],"description":"`pre_order` on a booking, `table` ordering, or `collection`."},"status":{"type":"string","enum":["draft","locked","placed","in_progress","ready","completed","cancelled"],"description":"A pre-order goes draft, locked (cut-off), placed, completed. A table or collection order goes placed, in_progress, ready, completed. Any order can be cancelled."},"payment_status":{"type":"string","enum":["unpaid","partial","paid","refunded","partially_refunded","comped"],"description":"Kept apart from `status`: payment is never implied by it."},"context":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["booking","enquiry","ticket_order","table"]},"id":{"type":["string","null"]}},"required":["type","id"],"additionalProperties":false},{"type":"null"}],"description":"What the order belongs to: for a pre-order, the booking."},"guest_id":{"description":"The guest who started it, the lead on a group order (`guests.get`), as on bookings, reviews, loyalty and wifi. Null when Stampede has not linked them to a guest.","type":["string","null"]},"table":{"type":["string","null"]},"subtotal":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"The lines with their modifiers, before discount, service charge, tip and tax."},"discount":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"service_charge":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"tip":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"tax":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"total":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"set_menu":{"description":"A set menu: each line is the menu and its modifiers are the dishes, a modifier's `group` the course. Null when not known.","type":["boolean","null"]},"lines":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"quantity":{"type":"number"},"total":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"section":{"description":"The menu section it was ordered from (\"Starters\", \"Mains\"): the course on an ordinary menu. On a set menu the courses are the modifiers' `group`. Null when it has none or it is not known.","type":["string","null"]},"variant":{"description":"The size or option of the item (\"Large\"). Null when it has none.","type":["string","null"]},"note":{"description":"What the guest asked for on this line, as they wrote it.","type":["string","null"]},"modifiers":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"group":{"description":"The modifier group it was chosen from. On a set menu (`set_menu`) this is the course: \"Starter\", \"Main\".","type":["string","null"]},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Each, on top of the line. 0 when it is included."}},"required":["name","group","quantity","price"],"additionalProperties":false}},{"type":"null"}],"description":"What was added to or chosen for the line, in menu order. On a set menu these are the dishes. Null when not known."},"participant_id":{"description":"Who on a group pre-order it is for: an `id` in `participants` (`orders.get`). Null when the order has only one guest or it is not known.","type":["string","null"]}},"required":["name","quantity","total","section","variant","note","modifiers","participant_id"],"additionalProperties":false}},"placed_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"cancelled_at":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["id","reference","venue_id","channel","status","payment_status","context","guest_id","table","subtotal","discount","service_charge","tip","tax","total","set_menu","lines","placed_at","completed_at","cancelled_at","created_at"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/orders/{order_id}":{"get":{"operationId":"orders.get","tags":["Orders"],"summary":"Get an order with its lines","description":"One order with what a kitchen sheet needs: each line's menu section (the course), variant, note and modifiers (on a set menu the modifiers are the dishes and a modifier's `group` the course), its tickets, and everyone on it (`participants`). On a group pre-order each line names who it is for (`participant_id`), and each participant has the allergens and dietary requirements they gave for this order, which need `guests:read` as well, as their names do.","security":[{"oauth2":["orders:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"order_id","in":"path","required":true,"description":"The order ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"reference":{"type":"string","description":"The short code on the receipt and the Square ticket."},"venue_id":{"type":["string","null"]},"channel":{"type":"string","enum":["pre_order","table","collection"],"description":"`pre_order` on a booking, `table` ordering, or `collection`."},"status":{"type":"string","enum":["draft","locked","placed","in_progress","ready","completed","cancelled"],"description":"A pre-order goes draft, locked (cut-off), placed, completed. A table or collection order goes placed, in_progress, ready, completed. Any order can be cancelled."},"payment_status":{"type":"string","enum":["unpaid","partial","paid","refunded","partially_refunded","comped"],"description":"Kept apart from `status`: payment is never implied by it."},"context":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["booking","enquiry","ticket_order","table"]},"id":{"type":["string","null"]}},"required":["type","id"],"additionalProperties":false},{"type":"null"}],"description":"What the order belongs to: for a pre-order, the booking."},"guest_id":{"description":"The guest who started it, the lead on a group order (`guests.get`), as on bookings, reviews, loyalty and wifi. Null when Stampede has not linked them to a guest.","type":["string","null"]},"table":{"type":["string","null"]},"subtotal":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"The lines with their modifiers, before discount, service charge, tip and tax."},"discount":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"service_charge":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"tip":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"tax":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"total":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"set_menu":{"description":"A set menu: each line is the menu and its modifiers are the dishes, a modifier's `group` the course. Null when not known.","type":["boolean","null"]},"lines":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"quantity":{"type":"number"},"total":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"section":{"description":"The menu section it was ordered from (\"Starters\", \"Mains\"): the course on an ordinary menu. On a set menu the courses are the modifiers' `group`. Null when it has none or it is not known.","type":["string","null"]},"variant":{"description":"The size or option of the item (\"Large\"). Null when it has none.","type":["string","null"]},"note":{"description":"What the guest asked for on this line, as they wrote it.","type":["string","null"]},"modifiers":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"group":{"description":"The modifier group it was chosen from. On a set menu (`set_menu`) this is the course: \"Starter\", \"Main\".","type":["string","null"]},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Each, on top of the line. 0 when it is included."}},"required":["name","group","quantity","price"],"additionalProperties":false}},{"type":"null"}],"description":"What was added to or chosen for the line, in menu order. On a set menu these are the dishes. Null when not known."},"participant_id":{"description":"Who on a group pre-order it is for: an `id` in `participants` (`orders.get`). Null when the order has only one guest or it is not known.","type":["string","null"]}},"required":["name","quantity","total","section","variant","note","modifiers","participant_id"],"additionalProperties":false}},"placed_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"cancelled_at":{"type":["string","null"]},"created_at":{"type":"string"},"tickets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"venue_id":{"type":"string","description":"The kitchen that makes it."},"name":{"description":"What the guest is told the ticket is, e.g. the bar.","type":["string","null"]},"status":{"type":"string","enum":["pending","sent","accepted","in_progress","ready","completed","failed","cancelled"]},"moved_by":{"type":"string","enum":["till","stampede"],"description":"`till`: Square moves it as the till works the order, and it cannot be moved here. `stampede`: a venue with no till, moved by staff in Connect or through this API."},"accepted_at":{"type":["string","null"]},"ready_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"cancelled_at":{"type":["string","null"]}},"required":["id","venue_id","name","status","moved_by","accepted_at","ready_at","completed_at","cancelled_at"],"additionalProperties":false},"description":"One per kitchen the order went to, at the venues you can see."},"participants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"What `lines[].participant_id` names."},"role":{"type":"string","enum":["lead","guest"]},"guest_id":{"description":"Their guest record (`guests.get`), when Stampede has linked them to one.","type":["string","null"]},"name":{"description":"The name they gave. Needs `guests:read` as well: without it, null.","type":["string","null"]},"allergens":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"The allergens they gave for this order (`[\"Nuts\"]`); empty when they gave none. Needs `guests:read` as well, because it is health information: without it, null. Also null when not known."},"dietary_requirements":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Their dietary requirements for this order (`[\"Vegan\"]`); empty when they gave none. Needs `guests:read` as well, because it is health information: without it, null. Also null when not known."}},"required":["id","role","guest_id","name","allergens","dietary_requirements"],"additionalProperties":false},"description":"Everyone on the order, lead first: on a group pre-order each guest, with what they told the venue for the kitchen. Empty when mouse does not say."}},"required":["id","reference","venue_id","channel","status","payment_status","context","guest_id","table","subtotal","discount","service_charge","tip","tax","total","set_menu","lines","placed_at","completed_at","cancelled_at","created_at","tickets","participants"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/orders/summary":{"get":{"operationId":"orders.summary","tags":["Orders"],"summary":"Add up orders","description":"The same orders `orders.list` finds, grouped and added up: units, orders and value per dish, section, venue, day and so on. For example `group_by=dish` with a date range is a prep list. Without `venue_id` it covers every venue, which needs access to all of them.","security":[{"oauth2":["orders:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"group_by","in":"query","required":true,"description":"One or more of dish, course, section, venue, day, source, status, payment, comma-separated. The first is the outer grouping.","style":"form","explode":false,"schema":{"minItems":1,"type":"array","items":{"type":"string","enum":["dish","course","section","venue","day","source","status","payment"]}}},{"name":"venue_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"channel","in":"query","required":false,"style":"form","explode":false,"schema":{"minItems":1,"type":"array","items":{"type":"string","enum":["pre_order","table","collection"]}}},{"name":"status","in":"query","required":false,"style":"form","explode":false,"schema":{"minItems":1,"type":"array","items":{"type":"string","enum":["draft","locked","placed","in_progress","ready","completed","cancelled"]}}},{"name":"payment_status","in":"query","required":false,"style":"form","explode":false,"schema":{"minItems":1,"type":"array","items":{"type":"string","enum":["unpaid","partial","paid","refunded","partially_refunded","comped"]}}},{"name":"placed_from","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"placed_to","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"group_by":{"type":"array","items":{"type":"string","enum":["dish","course","section","venue","day","source","status","payment"]}},"rows":{"type":"array","items":{"type":"object","properties":{"keys":{"type":"array","items":{"type":["string","null"]},"description":"One label per `group_by` dimension, in the same order. A venue is its ID."},"units":{"type":"number","description":"Units ordered, not lines."},"orders":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Orders this row appears on, each counted once."},"value":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."}},"required":["keys","units","orders","value"],"additionalProperties":false}},"totals":{"type":"object","properties":{"units":{"type":"number"},"value":{"anyOf":[{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},{"type":"null"}],"description":"Null when nothing matched."}},"required":["units","value"],"additionalProperties":false,"description":"Across every row. There is no order count here: one order can be in several rows, so adding them up would count it more than once."}},"required":["group_by","rows","totals"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/orders/takings":{"get":{"operationId":"orders.takings","tags":["Orders"],"summary":"Takings: the money from orders","description":"Orders, items, discounts, service charge, tips, tax, total, refunds, net and the average order. Filtered like `orders.list`, except that dates are when each order was placed (the money taken), so a pre-order built on Sunday and placed on Monday counts on Monday, and `placed_to` is not included, so one day ends where the next begins. One row per group, or one row of totals with no `group_by`. Every order is counted once. A day runs midnight to midnight on the venue clock; with `menu_id`, on the clock of that menu report, so `net` for a menu and day equals the `takings` of that day in `menus.report` (for whole first and last days, start and end the range at the venue local midnight, e.g. 2026-07-01T00:00:00+01:00 in a London summer). Grouping by day needs `placed_from` and a range of a year at most. Without `status`, only orders that were placed and not cancelled; a locked pre-order counts once it is placed. Without `venue_id` it covers every venue, which needs access to all of them.","security":[{"oauth2":["orders:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"group_by","in":"query","required":false,"description":"Up to three of day, venue, channel, source, status, payment, comma-separated.","style":"form","explode":false,"schema":{"maxItems":3,"type":"array","items":{"type":"string","enum":["day","venue","channel","source","status","payment"]}}},{"name":"venue_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"menu_id","in":"query","required":false,"description":"Only this menu's orders: the same orders as its `menus.report`.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"channel","in":"query","required":false,"style":"form","explode":false,"schema":{"minItems":1,"type":"array","items":{"type":"string","enum":["pre_order","table","collection"]}}},{"name":"status","in":"query","required":false,"style":"form","explode":false,"schema":{"minItems":1,"type":"array","items":{"type":"string","enum":["draft","locked","placed","in_progress","ready","completed","cancelled"]}}},{"name":"payment_status","in":"query","required":false,"style":"form","explode":false,"schema":{"minItems":1,"type":"array","items":{"type":"string","enum":["unpaid","partial","paid","refunded","partially_refunded","comped"]}}},{"name":"placed_from","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"placed_to","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"group_by":{"type":"array","items":{"type":"string","enum":["day","venue","channel","source","status","payment"]}},"currency":{"description":"Null when nothing matched.","type":["string","null"]},"rows":{"type":"array","items":{"type":"object","properties":{"orders":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Orders, each counted once."},"items":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Items and their modifiers, before discounts."},"discounts":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"service_charge":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"tips":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"tax":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Included in the total, not added to it."},"total":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"What these orders came to, not counting tips (tips are separate)."},"refunded":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Refunds that went through against these orders, whenever they were made: a refund this week to an order from last week changes last week. A refund can include the tip."},"net":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"What the orders brought in: total plus tips, less refunded. The same figure as `takings` in `menus.report`."},"average_order":{"anyOf":[{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},{"type":"null"}],"description":"Net divided by orders. Null with no orders."},"keys":{"type":"array","items":{"type":["string","null"]},"description":"One label per `group_by` dimension, in the same order. A venue is its ID; a day is a local date, YYYY-MM-DD."}},"required":["orders","items","discounts","service_charge","tips","tax","total","refunded","net","average_order","keys"],"additionalProperties":false}},"totals":{"anyOf":[{"type":"object","properties":{"orders":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Orders, each counted once."},"items":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Items and their modifiers, before discounts."},"discounts":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"service_charge":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"tips":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"tax":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Included in the total, not added to it."},"total":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"What these orders came to, not counting tips (tips are separate)."},"refunded":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Refunds that went through against these orders, whenever they were made: a refund this week to an order from last week changes last week. A refund can include the tip."},"net":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"What the orders brought in: total plus tips, less refunded. The same figure as `takings` in `menus.report`."},"average_order":{"anyOf":[{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},{"type":"null"}],"description":"Net divided by orders. Null with no orders."}},"required":["orders","items","discounts","service_charge","tips","tax","total","refunded","net","average_order"],"additionalProperties":false},{"type":"null"}],"description":"Across every row. Null when nothing matched."}},"required":["group_by","currency","rows","totals"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/orders/{order_id}/tickets/{ticket_id}":{"put":{"operationId":"orders.tickets.update","tags":["Orders"],"summary":"Move an order's ticket on in the kitchen","description":"For a venue with no till: accepted, in progress, ready, then completed. Forward only, and a step can be skipped. A ticket the till moves (`moved_by: till`) is refused: move it on the till. Cancelling is not offered, because it needs a refund.","security":[{"oauth2":["orders:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"order_id","in":"path","required":true,"description":"The order ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"ticket_id","in":"path","required":true,"description":"A ticket ID from the order.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["accepted","in_progress","ready","completed"]}},"required":["status"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"reference":{"type":"string","description":"The short code on the receipt and the Square ticket."},"venue_id":{"type":["string","null"]},"channel":{"type":"string","enum":["pre_order","table","collection"],"description":"`pre_order` on a booking, `table` ordering, or `collection`."},"status":{"type":"string","enum":["draft","locked","placed","in_progress","ready","completed","cancelled"],"description":"A pre-order goes draft, locked (cut-off), placed, completed. A table or collection order goes placed, in_progress, ready, completed. Any order can be cancelled."},"payment_status":{"type":"string","enum":["unpaid","partial","paid","refunded","partially_refunded","comped"],"description":"Kept apart from `status`: payment is never implied by it."},"context":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["booking","enquiry","ticket_order","table"]},"id":{"type":["string","null"]}},"required":["type","id"],"additionalProperties":false},{"type":"null"}],"description":"What the order belongs to: for a pre-order, the booking."},"guest_id":{"description":"The guest who started it, the lead on a group order (`guests.get`), as on bookings, reviews, loyalty and wifi. Null when Stampede has not linked them to a guest.","type":["string","null"]},"table":{"type":["string","null"]},"subtotal":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"The lines with their modifiers, before discount, service charge, tip and tax."},"discount":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"service_charge":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"tip":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"tax":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"total":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"set_menu":{"description":"A set menu: each line is the menu and its modifiers are the dishes, a modifier's `group` the course. Null when not known.","type":["boolean","null"]},"lines":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"quantity":{"type":"number"},"total":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},"section":{"description":"The menu section it was ordered from (\"Starters\", \"Mains\"): the course on an ordinary menu. On a set menu the courses are the modifiers' `group`. Null when it has none or it is not known.","type":["string","null"]},"variant":{"description":"The size or option of the item (\"Large\"). Null when it has none.","type":["string","null"]},"note":{"description":"What the guest asked for on this line, as they wrote it.","type":["string","null"]},"modifiers":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"group":{"description":"The modifier group it was chosen from. On a set menu (`set_menu`) this is the course: \"Starter\", \"Main\".","type":["string","null"]},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"Each, on top of the line. 0 when it is included."}},"required":["name","group","quantity","price"],"additionalProperties":false}},{"type":"null"}],"description":"What was added to or chosen for the line, in menu order. On a set menu these are the dishes. Null when not known."},"participant_id":{"description":"Who on a group pre-order it is for: an `id` in `participants` (`orders.get`). Null when the order has only one guest or it is not known.","type":["string","null"]}},"required":["name","quantity","total","section","variant","note","modifiers","participant_id"],"additionalProperties":false}},"placed_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"cancelled_at":{"type":["string","null"]},"created_at":{"type":"string"},"tickets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"venue_id":{"type":"string","description":"The kitchen that makes it."},"name":{"description":"What the guest is told the ticket is, e.g. the bar.","type":["string","null"]},"status":{"type":"string","enum":["pending","sent","accepted","in_progress","ready","completed","failed","cancelled"]},"moved_by":{"type":"string","enum":["till","stampede"],"description":"`till`: Square moves it as the till works the order, and it cannot be moved here. `stampede`: a venue with no till, moved by staff in Connect or through this API."},"accepted_at":{"type":["string","null"]},"ready_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"cancelled_at":{"type":["string","null"]}},"required":["id","venue_id","name","status","moved_by","accepted_at","ready_at","completed_at","cancelled_at"],"additionalProperties":false},"description":"One per kitchen the order went to, at the venues you can see."},"participants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"What `lines[].participant_id` names."},"role":{"type":"string","enum":["lead","guest"]},"guest_id":{"description":"Their guest record (`guests.get`), when Stampede has linked them to one.","type":["string","null"]},"name":{"description":"The name they gave. Needs `guests:read` as well: without it, null.","type":["string","null"]},"allergens":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"The allergens they gave for this order (`[\"Nuts\"]`); empty when they gave none. Needs `guests:read` as well, because it is health information: without it, null. Also null when not known."},"dietary_requirements":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Their dietary requirements for this order (`[\"Vegan\"]`); empty when they gave none. Needs `guests:read` as well, because it is health information: without it, null. Also null when not known."}},"required":["id","role","guest_id","name","allergens","dietary_requirements"],"additionalProperties":false},"description":"Everyone on the order, lead first: on a group pre-order each guest, with what they told the venue for the kitchen. Empty when mouse does not say."}},"required":["id","reference","venue_id","channel","status","payment_status","context","guest_id","table","subtotal","discount","service_charge","tip","tax","total","set_menu","lines","placed_at","completed_at","cancelled_at","created_at","tickets","participants"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/menus/{menu_id}/report":{"get":{"operationId":"menus.report","tags":["Orders"],"summary":"How a menu traded on a day","description":"One day of a menu's orders, in the venue's own time zone: orders, takings and the average order, hour by hour, compared with the same weekday last week; the best-selling sections and dishes, dishes ordered together, the busiest tables, kitchen times, and how many baskets became orders. With `date` the whole day is covered, midnight to midnight on the venue clock, so its figures match `orders.takings` for this menu (`menu_id`) over the same window: `placed_from` and `placed_to` at the venue local midnights, which the report returns as `window`; without it, today on the venue clock up to 23:45 only: ask with the date for the rest of the day. Orders after midnight belong to the next date. `from` and `to` narrow it to local times (they need `date`; an end at or before the start runs into the next day). Needs access to every venue in the organisation, because it counts orders from venues the menu has since left too.","security":[{"oauth2":["orders:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"menu_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"date","in":"query","required":false,"description":"YYYY-MM-DD. Defaults to today on the venue’s clock.","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"from","in":"query","required":false,"description":"Local start time, e.g. \"17:00\".","schema":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},{"name":"to","in":"query","required":false,"description":"Local end time, not included, e.g. \"23:00\".","schema":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"menu_id":{"type":"string"},"menu_name":{"type":"string"},"venue_ids":{"type":"array","items":{"type":"string"},"description":"The venues the menu is live at."},"window":{"type":"object","properties":{"from":{"type":"string","description":"The start, as an instant."},"to":{"type":"string","description":"The end, as an instant."},"timezone":{"type":"string","description":"The venue's time zone the day was read in."}},"required":["from","to","timezone"],"additionalProperties":false},"orders":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"takings":{"anyOf":[{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},{"type":"null"}],"description":"What the orders brought in: their totals plus tips, less refunds. The same figure as `net` in `orders.takings`. Null when there were no orders."},"items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Items ordered."},"average_order":{"anyOf":[{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},{"type":"null"}],"description":"`takings` divided by orders, as `orders.takings` works it out."},"by_hour":{"type":"array","items":{"type":"object","properties":{"hour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"orders":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"takings":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."}},"required":["hour","orders","takings"],"additionalProperties":false},"description":"Hour of the day on the venue's clock, 0 to 23."},"same_day_last_week":{"anyOf":[{"type":"object","properties":{"orders":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"takings":{"anyOf":[{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."},{"type":"null"}]}},"required":["orders","takings"],"additionalProperties":false},{"type":"null"}],"description":"The same weekday a week earlier, for comparison."},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sales":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."}},"required":["id","name","items","sales"],"additionalProperties":false},"description":"The top 10 top-level sections (vendors, in a food hall), best first. `sales` is what their items came to (with modifiers, after line discounts); service charge and tips are on the order, so these do not add up to `takings`."},"dishes":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"variant":{"type":["string","null"]},"section":{"type":["string","null"]},"items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"orders":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sales":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."}},"required":["name","variant","section","items","orders","sales"],"additionalProperties":false},"description":"The top 10 dishes by `sales`, best first. `sales` is what the item came to, as for sections."},"ordered_together":{"type":"array","items":{"type":"object","properties":{"a":{"type":"string"},"b":{"type":"string"},"baskets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["a","b","baskets"],"additionalProperties":false},"description":"Up to 10 pairs of dishes that were in the same basket at least three times, most often first."},"tables":{"type":"array","items":{"type":"object","properties":{"table":{"type":"string"},"orders":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"takings":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units: 1250 is £12.50."},"currency":{"type":"string","enum":["GBP","EUR","USD"]}},"required":["amount","currency"],"additionalProperties":false,"description":"An amount of money in minor units."}},"required":["table","orders","takings"],"additionalProperties":false},"description":"The 10 busiest tables, by what their orders brought in."},"kitchen":{"anyOf":[{"type":"object","properties":{"tickets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"never_ready":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tickets never marked ready."},"median_seconds":{"type":"object","properties":{"basket":{"description":"From starting a basket to placing it.","type":["number","null"]},"accept":{"description":"From placing to the kitchen accepting.","type":["number","null"]},"prep":{"description":"From accepting to ready.","type":["number","null"]}},"required":["basket","accept","prep"],"additionalProperties":false},"by_kitchen":{"type":"array","items":{"type":"object","properties":{"venue_id":{"type":"string"},"name":{"type":"string"},"tickets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"median_prep_seconds":{"type":["number","null"]}},"required":["venue_id","name","tickets","median_prep_seconds"],"additionalProperties":false}}},"required":["tickets","never_ready","median_seconds","by_kitchen"],"additionalProperties":false},{"type":"null"}]},"baskets":{"anyOf":[{"type":"object","properties":{"started":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"placed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["started","placed"],"additionalProperties":false},{"type":"null"}],"description":"Baskets guests started, and how many became orders."}},"required":["menu_id","menu_name","venue_ids","window","orders","takings","items","average_order","by_hour","same_day_last_week","sections","dishes","ordered_together","tables","kitchen","baskets"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/workflows/catalogue":{"get":{"operationId":"workflows.catalogue","tags":["Workflows"],"summary":"What a workflow can be built from","description":"The triggers that can start a workflow, with their conditions, and the step types, with their settings and exits: everything workflows.create_draft takes. SMS steps, inbox messages and older kinds are not offered.","security":[{"oauth2":["workflows:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"triggers":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"conditions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"comparators":{"type":"array","items":{"type":"string"}},"required":{"type":"boolean"},"value":{"type":"string","description":"number, text, texts (a list of text), currency (GBP, EUR or USD), form_id (forms are made in Stampede), loyalty_scheme_id or sentiment (positive, neutral, mixed or negative)."},"accepted_values":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"value":{"type":"number"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},{"type":"null"}]},"note":{"type":["string","null"]}},"required":["key","label","comparators","required","value","accepted_values","note"],"additionalProperties":false}},"custom_conditions":{"type":"boolean","description":"Takes conditions on any key of your own event, with any comparator. Values are text, or a list of text for any_of_contains."}},"required":["type","label","description","conditions","custom_conditions"],"additionalProperties":false}},"steps":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"exits":{"type":"string","description":"How it leads on, in words; exit_labels lists the labels it needs."},"exit_labels":{"type":"array","items":{"type":"string"}},"settings":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string"},"required":{"type":"boolean"},"description":{"type":"string"}},"required":["key","type","required","description"],"additionalProperties":false}}},"required":["type","label","description","exits","exit_labels","settings"],"additionalProperties":false}},"comparators":{"type":"array","items":{"type":"string"}},"limits":{"type":"object","properties":{"emails":{"type":"number"},"steps":{"type":"number"},"conditions":{"type":"number"},"min_debounce_seconds":{"type":"number"},"max_wait_seconds":{"type":"number"}},"required":["emails","steps","conditions","min_debounce_seconds","max_wait_seconds"],"additionalProperties":false}},"required":["triggers","steps","comparators","limits"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/workflows":{"get":{"operationId":"workflows.list","tags":["Workflows"],"summary":"List workflows","description":"Active first, then by most recently changed. Only workflows at venues you can see; one for every venue needs access to every venue. A page can hold fewer than the service's page of 15, or none, and still have a cursor.","security":[{"oauth2":["workflows:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"status","in":"query","required":false,"description":"One status, e.g. active. Several, comma separated, are filtered here.","style":"form","explode":false,"schema":{"minItems":1,"type":"array","items":{"type":"string","enum":["draft","active","paused","cancelled"]}}},{"name":"name","in":"query","required":false,"description":"Part of the name.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"venue_id","in":"query","required":false,"description":"Only workflows that list this venue (not those for every venue).","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":512}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","active","paused","cancelled","unknown"],"description":"draft: being built, never run. active: running: its trigger starts runs. paused: switched off; no new runs, and runs already started stop at their next step and fail after about 15 minutes. cancelled: stopped for good."},"venue_ids":{"type":"array","items":{"type":"string"},"description":"The venues it runs at. Empty: every venue, including ones added later."},"every_venue":{"type":"boolean","description":"Runs at every venue (venue_ids is empty)."},"debounce_seconds":{"type":"number","description":"After a guest starts a run, how long before they can start another of this workflow."},"triggers":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"What starts a run. See workflows.catalogue."},"conditions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"comparator":{"type":"string"},"value":{}},"required":["key","comparator","value"],"additionalProperties":false},"description":"Every one must hold for a run to start."}},"required":["type","conditions"],"additionalProperties":false}},"totals":{"anyOf":[{"type":"object","properties":{"successful_runs":{"type":"number"},"unsuccessful_runs":{"type":"number"},"conversion_rate":{"type":"number","description":"Successful runs as a percentage of all runs, 0 to 100."}},"required":["successful_runs","unsuccessful_runs","conversion_rate"],"additionalProperties":false},{"type":"null"}],"description":"Runs that ended at an end step. Null for workflows made before Stampede counted them."},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","status","venue_ids","every_venue","debounce_seconds","triggers","totals","created_at","updated_at"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/workflows/{workflow_id}":{"get":{"operationId":"workflows.get","tags":["Workflows"],"summary":"Get a workflow","description":"With its trigger, its steps (each with its settings and exits, from the first step down) and a summary of its emails. SMS and other steps the API does not make are shown with read_only true.","security":[{"oauth2":["workflows:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","active","paused","cancelled","unknown"],"description":"draft: being built, never run. active: running: its trigger starts runs. paused: switched off; no new runs, and runs already started stop at their next step and fail after about 15 minutes. cancelled: stopped for good."},"venue_ids":{"type":"array","items":{"type":"string"},"description":"The venues it runs at. Empty: every venue, including ones added later."},"every_venue":{"type":"boolean","description":"Runs at every venue (venue_ids is empty)."},"debounce_seconds":{"type":"number","description":"After a guest starts a run, how long before they can start another of this workflow."},"triggers":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"What starts a run. See workflows.catalogue."},"conditions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"comparator":{"type":"string"},"value":{}},"required":["key","comparator","value"],"additionalProperties":false},"description":"Every one must hold for a run to start."}},"required":["type","conditions"],"additionalProperties":false}},"totals":{"anyOf":[{"type":"object","properties":{"successful_runs":{"type":"number"},"unsuccessful_runs":{"type":"number"},"conversion_rate":{"type":"number","description":"Successful runs as a percentage of all runs, 0 to 100."}},"required":["successful_runs","unsuccessful_runs","conversion_rate"],"additionalProperties":false},{"type":"null"}],"description":"Runs that ended at an end step. Null for workflows made before Stampede counted them."},"created_at":{"type":"string"},"updated_at":{"type":"string"},"revision":{"type":"string","description":"A fingerprint of its name, venues, debounce, trigger, steps, links and email details. Send it to workflows.update as expected_revision to be told if anyone changed it since."},"first_step_id":{"description":"Where every run starts. Null when it has no steps.","type":["string","null"]},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string","description":"The same as id: how workflows.update names this step, so a workflow can be got, changed and sent back."},"type":{"type":"string"},"label":{"type":"string"},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"As workflows.catalogue describes them; an email is named by its email_id in this workflow's emails."},"exits":{"type":"array","items":{"type":"object","properties":{"label":{"description":"yes or no after a check, event_detected or event_not_detected after a wait for something, null otherwise.","type":["string","null"]},"to":{"type":"string","description":"The step it leads to."}},"required":["label","to"],"additionalProperties":false}},"runs_through":{"type":"number","description":"How many runs have passed through this step."},"read_only":{"type":"boolean","description":"A kind of step the API does not make (SMS, inbox messages and older kinds). Change it in Stampede."}},"required":["id","key","type","label","settings","exits","runs_through","read_only"],"additionalProperties":false},"description":"From the first step, each step after the one it hangs from."},"emails":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string","description":"The same as id: how workflows.update and its steps name this email."},"name":{"type":"string"},"subject":{"type":["string","null"]},"preheader":{"type":["string","null"]},"sender_id":{"type":["string","null"]},"kind":{"type":"string","enum":["construct","builder","html","quick","other"],"description":"How it was made, as for email templates. construct: Stampede's email builder."},"has_voucher":{"type":"boolean","description":"Sends each guest a voucher code. Set up in Stampede."}},"required":["id","key","name","subject","preheader","sender_id","kind","has_voucher"],"additionalProperties":false}},"diagram":{"type":"object","properties":{"mermaid":{"type":"string","description":"The workflow as a Mermaid flowchart: the trigger, then each step with its settings in words, and each link with its label."}},"required":["mermaid"],"additionalProperties":false,"description":"For drawing it. Over MCP the person sees it drawn, and the model reads it as an outline."}},"required":["id","name","status","venue_ids","every_venue","debounce_seconds","triggers","totals","created_at","updated_at","revision","first_step_id","steps","emails","diagram"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"workflows.delete_draft","tags":["Workflows"],"summary":"Delete a draft workflow","description":"Only a draft that has never run. A workflow that has been switched on is paused in Stampede, never deleted here.","security":[{"oauth2":["workflows:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"put":{"operationId":"workflows.update","tags":["Workflows"],"summary":"Change a workflow","description":"Changes a draft or paused workflow to the whole workflow it is sent, in the shape workflows.get answers and create_draft takes: get it, change what the person wants, send it back. Each step and email keeps its key (its ID); a step or email with any other key is added, and one left out is removed. Only what differs is changed; the same workflow sent back changes nothing. An active workflow is refused (WORKFLOW_ACTIVE): pause it (workflows.pause), change it, switch it on again (workflows.activate). Every check create_draft makes is made on the whole body first (422, each problem named), and new or changed emails are rendered and their links tagged as create_draft does. Stampede cannot change a step's type, move a link, or delete a step that has steps after it, so a step whose type changes, or that comes after another step or exit (a step put in the middle of a path, say), is removed and made again with everything after it, and changes.steps.recreated says which and why; their run history stays with the old IDs. An email whose content is of another kind is made again too. Steps that go, or are made again, while runs wait at them are refused (STEPS_HAVE_RUNS, 409, with how many) unless confirm_remove_steps_with_runs is true: Runs waiting at a step that goes, or at a step after a timed wait that goes, fail when they reach it (when their wait ends, or at their next try): those guests get nothing more from this workflow. Their history stays. SMS and other steps the API does not make are kept as they are; changing, moving or removing one is refused. expected_revision (workflows.get's revision) refuses the change if anyone changed the workflow since (WORKFLOW_CHANGED, 409), and it is checked again just before the first change. Preview it first with workflows.preview and workflow_id. There is no transaction: if a call fails half way, the answer is UPDATE_INCOMPLETE, with data saying what was done and what was not and the workflow as it now is; send the same body again to finish. The answer is the workflow as workflows.get shows it, with changes.","security":[{"oauth2":["workflows:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"venue_ids":{"description":"The venues it runs at (venues.list). Empty with every_venue true for every venue, as workflows.get gives it.","maxItems":1000,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"all_venues":{"description":"true: runs at every venue. The same as every_venue.","type":"boolean"},"every_venue":{"description":"true: runs at every venue, including ones added later. Needs access to every venue.","type":"boolean"},"debounce_seconds":{"description":"Left out: as it is.","type":"integer","minimum":300,"maximum":2147483647},"trigger":{"description":"What starts it. Send trigger or triggers.","type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":64},"conditions":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":255},"comparator":{"type":"string","enum":["equals","not_equals","greater_than","greater_than_equals","less_than","less_than_equals","contains","not_contains","fuzzy_contains","any_of_contains"]},"value":{}},"required":["key","comparator","value"]}}},"required":["type"]},"triggers":{"description":"As workflows.get gives them; each type once. A trigger of the same type has its conditions changed; any other is removed or added.","minItems":1,"maxItems":5,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":64},"conditions":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":255},"comparator":{"type":"string","enum":["equals","not_equals","greater_than","greater_than_equals","less_than","less_than_equals","contains","not_contains","fuzzy_contains","any_of_contains"]},"value":{}},"required":["key","comparator","value"]}}},"required":["type"]}},"steps":{"minItems":2,"maxItems":50,"type":"array","items":{"type":"object","properties":{"key":{"description":"A step of the stored workflow: its ID, as workflows.get gives it in key. Any other key adds a new step.","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"id":{"description":"Read as key when key is left out, so a step from workflows.get goes back as it is.","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"type":{"type":"string","minLength":1,"maxLength":64,"description":"A step type from workflows.catalogue."},"label":{"description":"What Stampede's editor shows on the step. Left out or empty: as it is, or the type's label for a new step.","type":"string","maxLength":255},"settings":{"description":"As workflows.catalogue lists them; an email is named by its key in settings.email (email_id from workflows.get is read the same).","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"exits":{"description":"Where the step leads, naming steps by key. None for an end step.","maxItems":10,"type":"array","items":{"type":"object","properties":{"label":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"to":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"required":["to"]}}},"required":["type"]},"description":"Every step, the first first: where every run starts. Every path ends at end_successful or end_unsuccessful."},"emails":{"default":[],"description":"Every email the workflow keeps or adds. One left out is removed.","maxItems":50,"type":"array","items":{"type":"object","properties":{"key":{"description":"One of the workflow's emails: its ID, as workflows.get gives it in key. Any other key adds a new email.","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"id":{"description":"Read as key when key is left out.","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"name":{"description":"For people in Stampede. Left out: as it is, or the subject for a new email.","type":"string","minLength":1,"maxLength":255},"subject":{"description":"Left out or null: as it is. A new email needs one.","anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"preheader":{"description":"Left out: as it is. Empty or null: none.","anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"sender_id":{"description":"A verified sender address (email_senders.list). Left out or null: as it is. A new email needs one.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"design":{"description":"New content, as email_templates.create takes a design. Left out with template_id: the content stays as it is.","type":"object","properties":{"doc":{"minItems":1,"maxItems":60,"type":"array","items":{"type":"object","properties":{"id":{"description":"Filled in when missing.","type":"string","maxLength":64},"columns":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"object","properties":{"id":{"description":"Filled in when missing.","type":"string","maxLength":64},"blocks":{"maxItems":40,"type":"array","items":{"type":"object","properties":{"id":{"description":"Unique in the design. Filled in when missing.","type":"string","maxLength":64},"type":{"type":"string","enum":["heading","text","button","image","divider","spacer","social"]},"props":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"heading { text, level 1|2|3, align, color }, text { text (HTML: p, a, strong, em, ul, ol, li, br), align, color }, button { text, href, align, color (its background), textColor }, image { src, alt, href, naturalAspect (true keeps its shape; otherwise cropped to height, 240 by default), fullWidth (default true), width }, divider { color, thickness }, spacer { height }, social { items [{ platform, url }], align, size, style brand|mono }. Any block: padding { top, right, bottom, left }, hideOn mobile|desktop. align is left, center or right; colours #rrggbb."}},"required":["type","props"],"additionalProperties":{}}},"props":{"description":"background, padding, borderColor, borderWidth, borderStyle, borderRadius.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["blocks"],"additionalProperties":{}}},"props":{"description":"background, padding, columnWidths (percentages summing to 100), columnGap, stackOnMobile, reverseOnMobile, verticalAlign, hideOn.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["columns"],"additionalProperties":{}},"description":"Rows from top to bottom. Each row has one to four columns side by side; each column a stack of blocks."},"settings":{"description":"Overrides on the brand for this email: pageBackground, emailBackground, linkColor, bodyFontFamily, headingFontFamily, emailRadius, emailPadding.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"brand_id":{"description":"One of the organisation's brand kits, whose colours and fonts fill in what the design leaves unset. Left out or null: the default brand kit.","anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]}},"required":["doc"]},"template_id":{"description":"New content copied from an email template. Not with design.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}}},"expected_revision":{"description":"workflows.get's revision when it was read: refused with WORKFLOW_CHANGED if anyone changed it since.","type":"string","minLength":1,"maxLength":64},"confirm_remove_steps_with_runs":{"description":"true: remove steps even though runs are waiting at them; those runs fail. Only after the person agreed.","type":"boolean"}},"required":["name","steps"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","active","paused","cancelled","unknown"],"description":"draft: being built, never run. active: running: its trigger starts runs. paused: switched off; no new runs, and runs already started stop at their next step and fail after about 15 minutes. cancelled: stopped for good."},"venue_ids":{"type":"array","items":{"type":"string"},"description":"The venues it runs at. Empty: every venue, including ones added later."},"every_venue":{"type":"boolean","description":"Runs at every venue (venue_ids is empty)."},"debounce_seconds":{"type":"number","description":"After a guest starts a run, how long before they can start another of this workflow."},"triggers":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"What starts a run. See workflows.catalogue."},"conditions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"comparator":{"type":"string"},"value":{}},"required":["key","comparator","value"],"additionalProperties":false},"description":"Every one must hold for a run to start."}},"required":["type","conditions"],"additionalProperties":false}},"totals":{"anyOf":[{"type":"object","properties":{"successful_runs":{"type":"number"},"unsuccessful_runs":{"type":"number"},"conversion_rate":{"type":"number","description":"Successful runs as a percentage of all runs, 0 to 100."}},"required":["successful_runs","unsuccessful_runs","conversion_rate"],"additionalProperties":false},{"type":"null"}],"description":"Runs that ended at an end step. Null for workflows made before Stampede counted them."},"created_at":{"type":"string"},"updated_at":{"type":"string"},"revision":{"type":"string","description":"A fingerprint of its name, venues, debounce, trigger, steps, links and email details. Send it to workflows.update as expected_revision to be told if anyone changed it since."},"first_step_id":{"description":"Where every run starts. Null when it has no steps.","type":["string","null"]},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string","description":"The same as id: how workflows.update names this step, so a workflow can be got, changed and sent back."},"type":{"type":"string"},"label":{"type":"string"},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"As workflows.catalogue describes them; an email is named by its email_id in this workflow's emails."},"exits":{"type":"array","items":{"type":"object","properties":{"label":{"description":"yes or no after a check, event_detected or event_not_detected after a wait for something, null otherwise.","type":["string","null"]},"to":{"type":"string","description":"The step it leads to."}},"required":["label","to"],"additionalProperties":false}},"runs_through":{"type":"number","description":"How many runs have passed through this step."},"read_only":{"type":"boolean","description":"A kind of step the API does not make (SMS, inbox messages and older kinds). Change it in Stampede."}},"required":["id","key","type","label","settings","exits","runs_through","read_only"],"additionalProperties":false},"description":"From the first step, each step after the one it hangs from."},"emails":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string","description":"The same as id: how workflows.update and its steps name this email."},"name":{"type":"string"},"subject":{"type":["string","null"]},"preheader":{"type":["string","null"]},"sender_id":{"type":["string","null"]},"kind":{"type":"string","enum":["construct","builder","html","quick","other"],"description":"How it was made, as for email templates. construct: Stampede's email builder."},"has_voucher":{"type":"boolean","description":"Sends each guest a voucher code. Set up in Stampede."}},"required":["id","key","name","subject","preheader","sender_id","kind","has_voucher"],"additionalProperties":false}},"diagram":{"type":"object","properties":{"mermaid":{"type":"string","description":"The workflow as a Mermaid flowchart: the trigger, then each step with its settings in words, and each link with its label."}},"required":["mermaid"],"additionalProperties":false,"description":"For drawing it. Over MCP the person sees it drawn, and the model reads it as an outline."},"changes":{"type":"object","properties":{"none":{"type":"boolean","description":"true: the body is the workflow as it is; nothing would be called."},"name":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"venues":{"anyOf":[{"type":"object","properties":{"from":{"type":"array","items":{"type":"string"}},"to":{"type":"array","items":{"type":"string"}},"every_venue_before":{"type":"boolean"},"every_venue_after":{"type":"boolean"}},"required":["from","to","every_venue_before","every_venue_after"],"additionalProperties":false},{"type":"null"}]},"debounce_seconds":{"anyOf":[{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"trigger":{"anyOf":[{"type":"object","properties":{"from":{"type":"array","items":{"type":"string"}},"to":{"type":"array","items":{"type":"string"}}},"required":["from","to"],"additionalProperties":false},{"type":"null"}],"description":"Each trigger with its conditions, in words."},"steps":{"type":"object","properties":{"added":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"id":{"description":"Its new ID, once made.","type":["string","null"]},"type":{"type":"string"},"label":{"type":"string"},"summary":{"type":"string"}},"required":["key","id","type","label","summary"],"additionalProperties":false}},"changed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"label":{"type":"string"},"what":{"type":"array","items":{"type":"string"},"description":"What changes, in words."}},"required":["id","type","label","what"],"additionalProperties":false}},"recreated":{"type":"array","items":{"type":"object","properties":{"old_id":{"type":"string"},"id":{"description":"Its new ID, once made.","type":["string","null"]},"type":{"type":"string"},"label":{"type":"string"},"why":{"type":"string"},"runs_waiting":{"type":["number","null"]}},"required":["old_id","id","type","label","why","runs_waiting"],"additionalProperties":false},"description":"Removed and made again with a new ID, because Stampede cannot change them in place. Their run history stays with the old ID; runs waiting at the old step fail."},"removed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"label":{"type":"string"},"summary":{"type":"string"},"runs_waiting":{"description":"Runs waiting at it now; null when not counted.","type":["number","null"]}},"required":["id","type","label","summary","runs_waiting"],"additionalProperties":false}}},"required":["added","changed","recreated","removed"],"additionalProperties":false},"emails":{"type":"object","properties":{"added":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"id":{"type":["string","null"]},"name":{"type":"string"},"subject":{"type":"string"}},"required":["key","id","name","subject"],"additionalProperties":false}},"changed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"what":{"type":"array","items":{"type":"string"}}},"required":["id","name","what"],"additionalProperties":false}},"recreated":{"type":"array","items":{"type":"object","properties":{"old_id":{"type":"string"},"id":{"type":["string","null"]},"name":{"type":"string"},"why":{"type":"string"}},"required":["old_id","id","name","why"],"additionalProperties":false},"description":"Made again with a new ID; what Stampede counted for the old one (opens, clicks) stays with it."},"removed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"subject":{"type":["string","null"]}},"required":["id","name","subject"],"additionalProperties":false}}},"required":["added","changed","recreated","removed"],"additionalProperties":false},"runs":{"anyOf":[{"type":"object","properties":{"open":{"type":"number","description":"Runs under way now (pending, waiting, processing or retrying)."},"checked":{"type":"number","description":"How many of them were looked at."},"at_removed_steps":{"type":"number","description":"Of those looked at, how many wait at a step that goes."}},"required":["open","checked","at_removed_steps"],"additionalProperties":false},{"type":"null"}],"description":"Counted only when steps go."},"in_words":{"type":"array","items":{"type":"string"},"description":"Each change in a sentence: tell the person these."}},"required":["none","name","venues","debounce_seconds","trigger","steps","emails","runs","in_words"],"additionalProperties":false},"email_warnings":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"email_id":{"type":"string"},"warnings":{"type":"array","items":{"type":"object","properties":{"level":{"type":"string","enum":["fix","improve","note"],"description":"fix: will look broken or lose clicks. improve: hurts delivery, accessibility or engagement. note: renders a little differently in some email apps."},"code":{"type":"string"},"title":{"type":"string"},"message":{"type":"string"},"block_id":{"type":["string","null"]}},"required":["level","code","title","message","block_id"],"additionalProperties":false}}},"required":["key","email_id","warnings"],"additionalProperties":false},"description":"The email builder's review of each email given new content, worst first."},"next":{"type":"string"}},"required":["id","name","status","venue_ids","every_venue","debounce_seconds","triggers","totals","created_at","updated_at","revision","first_step_id","steps","emails","diagram","changes","email_warnings","next"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/workflows/{workflow_id}/readiness":{"get":{"operationId":"workflows.readiness","tags":["Workflows"],"summary":"Check a workflow's emails are ready to send","description":"Stampede's own check, run before a workflow is switched on: every send_email step has an email with a subject, content, a verified sender, and a voucher only with a voucher code. enforced says whether Stampede refuses to switch it on while it is not ready; today it usually does not, so read this before telling a person it can be switched on.","security":[{"oauth2":["workflows:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ready":{"type":"boolean","description":"Every send_email step has an email ready to send."},"checked":{"type":"boolean","description":"false when Stampede could not finish the check: ready is then false."},"enforced":{"type":"boolean","description":"true: switching it on in Stampede is refused while it is not ready. false (the default today): it is switched on anyway and the problems are only logged."},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"email_missing, subject_missing, content_missing, content_unreadable, sender_missing, sender_deleted, sender_not_verified, voucher_not_shown, voucher_missing or voucher_not_found."},"message":{"type":"string"},"step_id":{"type":"string"},"email_id":{"type":["string","null"]},"email_name":{"type":["string","null"]}},"required":["code","message","step_id","email_id","email_name"],"additionalProperties":false}}},"required":["ready","checked","enforced","issues"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/workflows/{workflow_id}/report":{"get":{"operationId":"workflows.report","tags":["Workflows"],"summary":"Count a workflow's runs","description":"Every run of the workflow, and how many are at each status now.","security":[{"oauth2":["workflows:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"total_runs":{"type":"number"},"by_status":{"type":"object","properties":{"pending":{"type":"number"},"waiting":{"type":"number"},"processing":{"type":"number"},"complete":{"type":"number"},"failed":{"type":"number"},"retrying":{"type":"number"}},"required":["pending","waiting","processing","complete","failed","retrying"],"additionalProperties":false},"totals":{"anyOf":[{"type":"object","properties":{"successful_runs":{"type":"number"},"unsuccessful_runs":{"type":"number"},"conversion_rate":{"type":"number","description":"Successful runs as a percentage of all runs, 0 to 100."}},"required":["successful_runs","unsuccessful_runs","conversion_rate"],"additionalProperties":false},{"type":"null"}],"description":"Runs that ended at an end step. Null for workflows made before Stampede counted them."}},"required":["total_runs","by_status","totals"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/workflows/{workflow_id}/runs":{"get":{"operationId":"workflows.runs.list","tags":["Workflows"],"summary":"List a workflow's runs","description":"Newest first, 15 to a page. Each run is one guest going through the workflow; guest_id says who (guests.get).","security":[{"oauth2":["workflows:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"status","in":"query","required":false,"description":"Comma separated, e.g. failed,retrying.","style":"form","explode":false,"schema":{"minItems":1,"type":"array","items":{"type":"string","enum":["pending","waiting","processing","complete","failed","retrying"]}}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":512}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"guest_id":{"type":"string","description":"guests.get gives who it is (guests:read)."},"status":{"type":"string","enum":["pending","waiting","processing","complete","failed","retrying","unknown"],"description":"pending: about to start. waiting: at a wait step. processing: on a step now. complete: reached the end. failed: stopped on an error. retrying: trying a step again."},"started_by":{"description":"The trigger that started it; user_initiated when someone started it by hand or through the API.","type":["string","null"]},"steps_done":{"type":"number"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","guest_id","status","started_by","steps_done","created_at","updated_at"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/workflows/{workflow_id}/runs/{run_id}":{"get":{"operationId":"workflows.runs.get","tags":["Workflows"],"summary":"Get a workflow run","description":"One guest's run, with what happened at each step. The descriptions can name the guest's email address, so this needs guests:read as well.","security":[{"oauth2":["workflows:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"guest_id":{"type":"string","description":"guests.get gives who it is (guests:read)."},"status":{"type":"string","enum":["pending","waiting","processing","complete","failed","retrying","unknown"],"description":"pending: about to start. waiting: at a wait step. processing: on a step now. complete: reached the end. failed: stopped on an error. retrying: trying a step again."},"started_by":{"description":"The trigger that started it; user_initiated when someone started it by hand or through the API.","type":["string","null"]},"steps_done":{"type":"number"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"activity":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","description":"complete, waiting_for_event, failed or information."},"description":{"type":["string","null"]},"step_id":{"type":["string","null"]},"step_type":{"type":["string","null"]},"at":{"type":"string"}},"required":["id","status","description","step_id","step_type","at"],"additionalProperties":false},"description":"What happened at each step, oldest first."}},"required":["id","guest_id","status","started_by","steps_done","created_at","updated_at","activity"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/workflows/drafts":{"post":{"operationId":"workflows.create_draft","tags":["Workflows"],"summary":"Create a whole workflow as a draft","description":"Makes a draft workflow in one call: its venues, trigger, steps and emails. Read workflows.catalogue first. Everything is checked before anything is saved: an unknown trigger, condition or step type, settings, exits, a step no run reaches, a path with no end, an email no step uses or that no step can find, and venues, loyalty schemes, forms, senders and templates that are not this organisation's are refused with 422 (or 400), each problem named. Emails are rendered by Stampede's email builder, as email_templates.create does; preview each first with email_templates.preview, and the whole workflow with workflows.preview. Every http(s) link in each email is tagged as Stampede's email builder tags it: utm_source workflow_email, utm_medium stampede, utm_campaign the email's name, utm_id its ID; a UTM a link already has is kept, and links with merge tags are left alone. A wait_for_booking_created_event step with from_email waits for a booking made from that email's links. To start from one of Stampede's own workflows, see workflow_starters.list. The draft is never switched on: a person reviews it, then it is switched on in Stampede or with workflows.activate. The answer is the draft as workflows.get shows it, with each email's review warnings.","security":[{"oauth2":["workflows:write"]}],"x-kind":"write","x-mcp":true,"x-support":true,"x-admin-only":true,"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"venue_ids":{"description":"The venues it runs at (venues.list).","minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"all_venues":{"description":"Runs at every venue, including ones added later. Needs access to every venue.","type":"boolean","const":true},"debounce_seconds":{"description":"After a guest starts a run, how long before they can start another of this workflow. At least 300; left out, 300. For a guest's birthday or a lapsed guest, a month or more (2592000).","type":"integer","minimum":300,"maximum":2147483647},"trigger":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":64},"conditions":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":255},"comparator":{"type":"string","enum":["equals","not_equals","greater_than","greater_than_equals","less_than","less_than_equals","contains","not_contains","fuzzy_contains","any_of_contains"]},"value":{}},"required":["key","comparator","value"]}}},"required":["type"]},"steps":{"minItems":2,"maxItems":50,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"How exits name this step."},"type":{"type":"string","minLength":1,"maxLength":64,"description":"A step type from workflows.catalogue."},"label":{"description":"What Stampede's editor shows on the step. Left out: the type's label.","type":"string","minLength":1,"maxLength":255},"settings":{"description":"As workflows.catalogue lists them for the type.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"exits":{"description":"Where the step leads: as workflows.catalogue says for the type. None for an end step.","maxItems":10,"type":"array","items":{"type":"object","properties":{"label":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"to":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"required":["to"]}}},"required":["key","type"]},"description":"The first is where every run starts. Every path ends at end_successful or end_unsuccessful."},"emails":{"default":[],"maxItems":50,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"How steps name this email (settings.email)."},"name":{"description":"For people in Stampede. Left out: the subject.","type":"string","minLength":1,"maxLength":255},"subject":{"type":"string","minLength":1,"maxLength":255,"description":"Merge tags such as {{ profile.first }} are filled in per guest."},"preheader":{"description":"The preview text inboxes show after the subject.","type":"string","maxLength":255},"sender_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"A verified sender address, from email_senders.list."},"design":{"description":"A design, as email_templates.create takes it: rendered and stored in the email builder. Preview it first with email_templates.preview.","type":"object","properties":{"doc":{"minItems":1,"maxItems":60,"type":"array","items":{"type":"object","properties":{"id":{"description":"Filled in when missing.","type":"string","maxLength":64},"columns":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"object","properties":{"id":{"description":"Filled in when missing.","type":"string","maxLength":64},"blocks":{"maxItems":40,"type":"array","items":{"type":"object","properties":{"id":{"description":"Unique in the design. Filled in when missing.","type":"string","maxLength":64},"type":{"type":"string","enum":["heading","text","button","image","divider","spacer","social"]},"props":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"heading { text, level 1|2|3, align, color }, text { text (HTML: p, a, strong, em, ul, ol, li, br), align, color }, button { text, href, align, color (its background), textColor }, image { src, alt, href, naturalAspect (true keeps its shape; otherwise cropped to height, 240 by default), fullWidth (default true), width }, divider { color, thickness }, spacer { height }, social { items [{ platform, url }], align, size, style brand|mono }. Any block: padding { top, right, bottom, left }, hideOn mobile|desktop. align is left, center or right; colours #rrggbb."}},"required":["type","props"],"additionalProperties":{}}},"props":{"description":"background, padding, borderColor, borderWidth, borderStyle, borderRadius.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["blocks"],"additionalProperties":{}}},"props":{"description":"background, padding, columnWidths (percentages summing to 100), columnGap, stackOnMobile, reverseOnMobile, verticalAlign, hideOn.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["columns"],"additionalProperties":{}},"description":"Rows from top to bottom. Each row has one to four columns side by side; each column a stack of blocks."},"settings":{"description":"Overrides on the brand for this email: pageBackground, emailBackground, linkColor, bodyFontFamily, headingFontFamily, emailRadius, emailPadding.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"brand_id":{"description":"One of the organisation's brand kits, whose colours and fonts fill in what the design leaves unset. Left out or null: the default brand kit.","anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]}},"required":["doc"]},"template_id":{"description":"An email template to copy (email_templates.list): made in the email builder, the classic editor or HTML.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["key","subject","sender_id"]}}},"required":["name","trigger","steps"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","active","paused","cancelled","unknown"],"description":"draft: being built, never run. active: running: its trigger starts runs. paused: switched off; no new runs, and runs already started stop at their next step and fail after about 15 minutes. cancelled: stopped for good."},"venue_ids":{"type":"array","items":{"type":"string"},"description":"The venues it runs at. Empty: every venue, including ones added later."},"every_venue":{"type":"boolean","description":"Runs at every venue (venue_ids is empty)."},"debounce_seconds":{"type":"number","description":"After a guest starts a run, how long before they can start another of this workflow."},"triggers":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"What starts a run. See workflows.catalogue."},"conditions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"comparator":{"type":"string"},"value":{}},"required":["key","comparator","value"],"additionalProperties":false},"description":"Every one must hold for a run to start."}},"required":["type","conditions"],"additionalProperties":false}},"totals":{"anyOf":[{"type":"object","properties":{"successful_runs":{"type":"number"},"unsuccessful_runs":{"type":"number"},"conversion_rate":{"type":"number","description":"Successful runs as a percentage of all runs, 0 to 100."}},"required":["successful_runs","unsuccessful_runs","conversion_rate"],"additionalProperties":false},{"type":"null"}],"description":"Runs that ended at an end step. Null for workflows made before Stampede counted them."},"created_at":{"type":"string"},"updated_at":{"type":"string"},"revision":{"type":"string","description":"A fingerprint of its name, venues, debounce, trigger, steps, links and email details. Send it to workflows.update as expected_revision to be told if anyone changed it since."},"first_step_id":{"description":"Where every run starts. Null when it has no steps.","type":["string","null"]},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string","description":"The same as id: how workflows.update names this step, so a workflow can be got, changed and sent back."},"type":{"type":"string"},"label":{"type":"string"},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"As workflows.catalogue describes them; an email is named by its email_id in this workflow's emails."},"exits":{"type":"array","items":{"type":"object","properties":{"label":{"description":"yes or no after a check, event_detected or event_not_detected after a wait for something, null otherwise.","type":["string","null"]},"to":{"type":"string","description":"The step it leads to."}},"required":["label","to"],"additionalProperties":false}},"runs_through":{"type":"number","description":"How many runs have passed through this step."},"read_only":{"type":"boolean","description":"A kind of step the API does not make (SMS, inbox messages and older kinds). Change it in Stampede."}},"required":["id","key","type","label","settings","exits","runs_through","read_only"],"additionalProperties":false},"description":"From the first step, each step after the one it hangs from."},"emails":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string","description":"The same as id: how workflows.update and its steps name this email."},"name":{"type":"string"},"subject":{"type":["string","null"]},"preheader":{"type":["string","null"]},"sender_id":{"type":["string","null"]},"kind":{"type":"string","enum":["construct","builder","html","quick","other"],"description":"How it was made, as for email templates. construct: Stampede's email builder."},"has_voucher":{"type":"boolean","description":"Sends each guest a voucher code. Set up in Stampede."}},"required":["id","key","name","subject","preheader","sender_id","kind","has_voucher"],"additionalProperties":false}},"diagram":{"type":"object","properties":{"mermaid":{"type":"string","description":"The workflow as a Mermaid flowchart: the trigger, then each step with its settings in words, and each link with its label."}},"required":["mermaid"],"additionalProperties":false,"description":"For drawing it. Over MCP the person sees it drawn, and the model reads it as an outline."},"email_warnings":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"email_id":{"type":"string"},"warnings":{"type":"array","items":{"type":"object","properties":{"level":{"type":"string","enum":["fix","improve","note"],"description":"fix: will look broken or lose clicks. improve: hurts delivery, accessibility or engagement. note: renders a little differently in some email apps."},"code":{"type":"string"},"title":{"type":"string"},"message":{"type":"string"},"block_id":{"type":["string","null"]}},"required":["level","code","title","message","block_id"],"additionalProperties":false}}},"required":["key","email_id","warnings"],"additionalProperties":false},"description":"The email builder's review of each email, worst first."},"next":{"type":"string"}},"required":["id","name","status","venue_ids","every_venue","debounce_seconds","triggers","totals","created_at","updated_at","revision","first_step_id","steps","emails","diagram","email_warnings","next"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/workflows/preview":{"post":{"operationId":"workflows.preview","tags":["Workflows"],"summary":"Check and draw a workflow, or a change to one, before making it","description":"The way to check a workflow, and show it to a person, before workflows.create_draft, or a change before workflows.update. Without workflow_id it takes create_draft's body; with workflow_id, update's body for that workflow (the whole workflow, as workflows.get gives it, changed). Runs every check the other would run (the catalogue, the tree, venues, loyalty schemes, forms, senders and templates being this organisation's, each email rendered by the email builder) and saves nothing. problems lists every refusal at once, each with the step key it is about, and is empty when the call would be accepted. diagram draws it even when there are problems: as a Mermaid flowchart, an outline with one line per step, and the steps and links themselves; with workflow_id each step is marked added, changed or recreated, and the steps that go are listed in diagram.removed. changes (with workflow_id) says what changes, in words too, and how many runs wait at steps that go. emails gives each email's review warnings. A body that is not a workflow at all (a missing name, fewer than two steps) is still a 400.","security":[{"oauth2":["workflows:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"venue_ids":{"description":"The venues it runs at (venues.list). Empty with every_venue true for every venue, as workflows.get gives it.","maxItems":1000,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"all_venues":{"description":"true: runs at every venue. The same as every_venue.","type":"boolean"},"every_venue":{"description":"true: runs at every venue, including ones added later. Needs access to every venue.","type":"boolean"},"debounce_seconds":{"description":"Left out: as it is.","type":"integer","minimum":300,"maximum":2147483647},"trigger":{"description":"What starts it. Send trigger or triggers.","type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":64},"conditions":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":255},"comparator":{"type":"string","enum":["equals","not_equals","greater_than","greater_than_equals","less_than","less_than_equals","contains","not_contains","fuzzy_contains","any_of_contains"]},"value":{}},"required":["key","comparator","value"]}}},"required":["type"]},"triggers":{"description":"As workflows.get gives them; each type once. A trigger of the same type has its conditions changed; any other is removed or added.","minItems":1,"maxItems":5,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":64},"conditions":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":255},"comparator":{"type":"string","enum":["equals","not_equals","greater_than","greater_than_equals","less_than","less_than_equals","contains","not_contains","fuzzy_contains","any_of_contains"]},"value":{}},"required":["key","comparator","value"]}}},"required":["type"]}},"steps":{"minItems":2,"maxItems":50,"type":"array","items":{"type":"object","properties":{"key":{"description":"A step of the stored workflow: its ID, as workflows.get gives it in key. Any other key adds a new step.","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"id":{"description":"Read as key when key is left out, so a step from workflows.get goes back as it is.","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"type":{"type":"string","minLength":1,"maxLength":64,"description":"A step type from workflows.catalogue."},"label":{"description":"What Stampede's editor shows on the step. Left out or empty: as it is, or the type's label for a new step.","type":"string","maxLength":255},"settings":{"description":"As workflows.catalogue lists them; an email is named by its key in settings.email (email_id from workflows.get is read the same).","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"exits":{"description":"Where the step leads, naming steps by key. None for an end step.","maxItems":10,"type":"array","items":{"type":"object","properties":{"label":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"to":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"required":["to"]}}},"required":["type"]},"description":"Every step, the first first: where every run starts. Every path ends at end_successful or end_unsuccessful."},"emails":{"default":[],"description":"Every email the workflow keeps or adds. One left out is removed.","maxItems":50,"type":"array","items":{"type":"object","properties":{"key":{"description":"One of the workflow's emails: its ID, as workflows.get gives it in key. Any other key adds a new email.","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"id":{"description":"Read as key when key is left out.","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"name":{"description":"For people in Stampede. Left out: as it is, or the subject for a new email.","type":"string","minLength":1,"maxLength":255},"subject":{"description":"Left out or null: as it is. A new email needs one.","anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"preheader":{"description":"Left out: as it is. Empty or null: none.","anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"sender_id":{"description":"A verified sender address (email_senders.list). Left out or null: as it is. A new email needs one.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"design":{"description":"New content, as email_templates.create takes a design. Left out with template_id: the content stays as it is.","type":"object","properties":{"doc":{"minItems":1,"maxItems":60,"type":"array","items":{"type":"object","properties":{"id":{"description":"Filled in when missing.","type":"string","maxLength":64},"columns":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"object","properties":{"id":{"description":"Filled in when missing.","type":"string","maxLength":64},"blocks":{"maxItems":40,"type":"array","items":{"type":"object","properties":{"id":{"description":"Unique in the design. Filled in when missing.","type":"string","maxLength":64},"type":{"type":"string","enum":["heading","text","button","image","divider","spacer","social"]},"props":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"heading { text, level 1|2|3, align, color }, text { text (HTML: p, a, strong, em, ul, ol, li, br), align, color }, button { text, href, align, color (its background), textColor }, image { src, alt, href, naturalAspect (true keeps its shape; otherwise cropped to height, 240 by default), fullWidth (default true), width }, divider { color, thickness }, spacer { height }, social { items [{ platform, url }], align, size, style brand|mono }. Any block: padding { top, right, bottom, left }, hideOn mobile|desktop. align is left, center or right; colours #rrggbb."}},"required":["type","props"],"additionalProperties":{}}},"props":{"description":"background, padding, borderColor, borderWidth, borderStyle, borderRadius.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["blocks"],"additionalProperties":{}}},"props":{"description":"background, padding, columnWidths (percentages summing to 100), columnGap, stackOnMobile, reverseOnMobile, verticalAlign, hideOn.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["columns"],"additionalProperties":{}},"description":"Rows from top to bottom. Each row has one to four columns side by side; each column a stack of blocks."},"settings":{"description":"Overrides on the brand for this email: pageBackground, emailBackground, linkColor, bodyFontFamily, headingFontFamily, emailRadius, emailPadding.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"brand_id":{"description":"One of the organisation's brand kits, whose colours and fonts fill in what the design leaves unset. Left out or null: the default brand kit.","anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]}},"required":["doc"]},"template_id":{"description":"New content copied from an email template. Not with design.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}}},"expected_revision":{"description":"workflows.get's revision when it was read: refused with WORKFLOW_CHANGED if anyone changed it since.","type":"string","minLength":1,"maxLength":64},"confirm_remove_steps_with_runs":{"description":"true: remove steps even though runs are waiting at them; those runs fail. Only after the person agreed.","type":"boolean"},"workflow_id":{"description":"Check the body as workflows.update of this workflow, and show what changes. Left out: as workflows.create_draft.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["name","steps"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"accepted":{"type":"boolean","description":"true: workflows.create_draft (or workflows.update, with workflow_id) would take it as it is."},"problems":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"As create_draft or update would answer it, e.g. INVALID_GRAPH."},"detail":{"type":"string"},"field":{"type":"string"},"step_key":{"description":"The key of the step it is about, when it is about one; a key given twice is drawn as key~2.","type":["string","null"]}},"required":["code","detail","field","step_key"],"additionalProperties":false}},"diagram":{"type":"object","properties":{"mermaid":{"type":"string","description":"A Mermaid flowchart."},"outline":{"type":"string","description":"One line per step, in the order a run goes, each branch indented under its label."},"name":{"type":["string","null"]},"trigger":{"anyOf":[{"type":"object","properties":{"type":{"type":"string"},"label":{"type":"string"},"conditions":{"type":"array","items":{"type":"string"},"description":"Each condition in words."}},"required":["type","label","conditions"],"additionalProperties":false},{"type":"null"}]},"first":{"description":"The step every run starts at.","type":["string","null"]},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"In a preview, the step key."},"label":{"type":"string"},"type":{"type":"string"},"summary":{"type":"string","description":"Its settings in words, e.g. \"Wait 3 days\"."},"kind":{"type":"string","enum":["action","wait","condition","split","end"]},"read_only":{"type":"boolean"},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"runs_through":{"type":"number"},"change":{"description":"With workflow_id: new, changed in place, or removed and made again.","type":"string","enum":["added","changed","recreated"]}},"required":["id","label","type","summary","kind","settings"],"additionalProperties":false}},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"label":{"description":"Yes, No, Event detected, Not detected, or a random split path with its share.","type":["string","null"]}},"required":["from","to","label"],"additionalProperties":false}},"removed":{"description":"With workflow_id: the stored steps that go, including those made again.","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"},"summary":{"type":"string"},"kind":{"type":"string","enum":["action","wait","condition","split","end"]},"runs_waiting":{"type":["number","null"]}},"required":["id","label","type","summary","kind","runs_waiting"],"additionalProperties":false}}},"required":["mermaid","outline","name","trigger","first","nodes","edges"],"additionalProperties":false},"emails":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"rendered":{"type":"boolean","description":"false when it brings no new content, or it could not be made: a problem then says why."},"warnings":{"type":"array","items":{"type":"object","properties":{"level":{"type":"string","enum":["fix","improve","note"],"description":"fix: will look broken or lose clicks. improve: hurts delivery, accessibility or engagement. note: renders a little differently in some email apps."},"code":{"type":"string"},"title":{"type":"string"},"message":{"type":"string"},"block_id":{"type":["string","null"]}},"required":["level","code","title","message","block_id"],"additionalProperties":false},"description":"The email builder's review, worst first."}},"required":["key","rendered","warnings"],"additionalProperties":false},"description":"In the order given."},"changes":{"anyOf":[{"type":"object","properties":{"none":{"type":"boolean","description":"true: the body is the workflow as it is; nothing would be called."},"name":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"venues":{"anyOf":[{"type":"object","properties":{"from":{"type":"array","items":{"type":"string"}},"to":{"type":"array","items":{"type":"string"}},"every_venue_before":{"type":"boolean"},"every_venue_after":{"type":"boolean"}},"required":["from","to","every_venue_before","every_venue_after"],"additionalProperties":false},{"type":"null"}]},"debounce_seconds":{"anyOf":[{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"trigger":{"anyOf":[{"type":"object","properties":{"from":{"type":"array","items":{"type":"string"}},"to":{"type":"array","items":{"type":"string"}}},"required":["from","to"],"additionalProperties":false},{"type":"null"}],"description":"Each trigger with its conditions, in words."},"steps":{"type":"object","properties":{"added":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"id":{"description":"Its new ID, once made.","type":["string","null"]},"type":{"type":"string"},"label":{"type":"string"},"summary":{"type":"string"}},"required":["key","id","type","label","summary"],"additionalProperties":false}},"changed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"label":{"type":"string"},"what":{"type":"array","items":{"type":"string"},"description":"What changes, in words."}},"required":["id","type","label","what"],"additionalProperties":false}},"recreated":{"type":"array","items":{"type":"object","properties":{"old_id":{"type":"string"},"id":{"description":"Its new ID, once made.","type":["string","null"]},"type":{"type":"string"},"label":{"type":"string"},"why":{"type":"string"},"runs_waiting":{"type":["number","null"]}},"required":["old_id","id","type","label","why","runs_waiting"],"additionalProperties":false},"description":"Removed and made again with a new ID, because Stampede cannot change them in place. Their run history stays with the old ID; runs waiting at the old step fail."},"removed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"label":{"type":"string"},"summary":{"type":"string"},"runs_waiting":{"description":"Runs waiting at it now; null when not counted.","type":["number","null"]}},"required":["id","type","label","summary","runs_waiting"],"additionalProperties":false}}},"required":["added","changed","recreated","removed"],"additionalProperties":false},"emails":{"type":"object","properties":{"added":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"id":{"type":["string","null"]},"name":{"type":"string"},"subject":{"type":"string"}},"required":["key","id","name","subject"],"additionalProperties":false}},"changed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"what":{"type":"array","items":{"type":"string"}}},"required":["id","name","what"],"additionalProperties":false}},"recreated":{"type":"array","items":{"type":"object","properties":{"old_id":{"type":"string"},"id":{"type":["string","null"]},"name":{"type":"string"},"why":{"type":"string"}},"required":["old_id","id","name","why"],"additionalProperties":false},"description":"Made again with a new ID; what Stampede counted for the old one (opens, clicks) stays with it."},"removed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"subject":{"type":["string","null"]}},"required":["id","name","subject"],"additionalProperties":false}}},"required":["added","changed","recreated","removed"],"additionalProperties":false},"runs":{"anyOf":[{"type":"object","properties":{"open":{"type":"number","description":"Runs under way now (pending, waiting, processing or retrying)."},"checked":{"type":"number","description":"How many of them were looked at."},"at_removed_steps":{"type":"number","description":"Of those looked at, how many wait at a step that goes."}},"required":["open","checked","at_removed_steps"],"additionalProperties":false},{"type":"null"}],"description":"Counted only when steps go."},"in_words":{"type":"array","items":{"type":"string"},"description":"Each change in a sentence: tell the person these."}},"required":["none","name","venues","debounce_seconds","trigger","steps","emails","runs","in_words"],"additionalProperties":false},{"type":"null"}],"description":"With workflow_id: what changes. Null for a new workflow."},"revision":{"description":"With workflow_id: the revision it was compared with; send it to workflows.update as expected_revision.","type":["string","null"]},"next":{"type":"string"}},"required":["accepted","problems","diagram","emails","changes","revision","next"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/workflows/{workflow_id}/activate":{"post":{"operationId":"workflows.activate","tags":["Workflows"],"summary":"Switch a workflow on","description":"Switches a draft or paused workflow on: from then on its trigger starts a run for each guest who sets it off, and its emails go to guests who have agreed to marketing emails. Needs the marketing:send scope, which full access does not include, an admin or the owner, and access to every venue the workflow runs at (every venue, for one that runs at every venue). confirm_name must be the workflow's name exactly, so tell the person its name, trigger, venues and emails first (workflows.get) and get their yes. Before anything changes, v2 checks the stored workflow as workflows.create_draft checks a draft (its trigger, a first step, every step's settings and exits, an end on every path, no loyalty points loop), that every form, loyalty scheme and sender it names is the organisation's, that every email it sends has a subject and content from a verified sender, and that Stampede's readiness check (workflows.readiness) says ready. Each problem is named in a 409 and nothing changes. A workflow with SMS or other steps the API does not make is refused: switch it on in Stampede. The answer says what will happen now.","security":[{"oauth2":["marketing:send"]}],"x-kind":"write","x-mcp":true,"x-support":false,"x-admin-only":true,"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm_name":{"type":"string","minLength":1,"maxLength":255,"description":"The workflow's name, exactly, as the person agreed to switch it on."}},"required":["confirm_name"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","active","paused","cancelled","unknown"],"description":"As Stampede reads it back afterwards."},"was":{"type":"string","enum":["draft","active","paused"]},"venue_ids":{"type":"array","items":{"type":"string"}},"every_venue":{"type":"boolean"},"triggers":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"label":{"type":"string","description":"The trigger's name in workflows.catalogue."}},"required":["type","label"],"additionalProperties":false}},"what_happens":{"type":"string","description":"Tell the person this, in your own words."},"emails":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"subject":{"type":"string"}},"required":["id","name","subject"],"additionalProperties":false},"description":"The emails its send_email steps send."}},"required":["id","name","status","was","venue_ids","every_venue","triggers","what_happens","emails"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/workflows/{workflow_id}/pause":{"post":{"operationId":"workflows.pause","tags":["Workflows"],"summary":"Pause a workflow","description":"Pauses an active workflow: its trigger starts no new runs. A run already under way stops at its next step; Stampede tries that step again every 5 minutes, and if the workflow is still paused about 15 minutes later the run fails and that guest gets nothing more from it. A run waiting at a wait step is not touched until its wait ends. A workflow must be paused before it is changed in Stampede. Needs the marketing:send scope, which full access does not include, an admin or the owner, and access to every venue the workflow runs at (every venue, for one that runs at every venue). Tell the person this and get their yes first.","security":[{"oauth2":["marketing:send"]}],"x-kind":"write","x-mcp":true,"x-support":false,"x-admin-only":true,"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","active","paused","cancelled","unknown"],"description":"As Stampede reads it back afterwards."},"was":{"type":"string","enum":["draft","active","paused"]},"venue_ids":{"type":"array","items":{"type":"string"}},"every_venue":{"type":"boolean"},"triggers":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"label":{"type":"string","description":"The trigger's name in workflows.catalogue."}},"required":["type","label"],"additionalProperties":false}},"what_happens":{"type":"string","description":"Tell the person this, in your own words."}},"required":["id","name","status","was","venue_ids","every_venue","triggers","what_happens"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/workflow-starters":{"get":{"operationId":"workflow_starters.list","tags":["Workflows"],"summary":"List starter workflows","description":"The workflows Stampede's \"New workflow\" page offers, three for each moment (simple, with follow-ups, with rewards), in its order. workflow_starters.get gives one whole, ready for workflows.create_draft.","security":[{"oauth2":["workflows:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"starters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","description":"What it does, in a sentence or two."},"moment":{"type":"string","description":"When it starts, in Stampede's words."},"trigger":{"type":"string","description":"The trigger type (workflows.catalogue)."},"tier":{"type":"string","enum":["simple","follow_ups","rewards"],"description":"simple: one email. follow_ups: more emails or a check after the first. rewards: gives loyalty points too."},"step_count":{"type":"number"},"email_count":{"type":"number"},"needs_loyalty_scheme":{"type":"boolean","description":"It gives loyalty points: each add_loyalty_points step needs a loyalty_scheme_id."},"every_venue":{"type":"boolean","description":"Made for every venue (all_venues: true), as Stampede makes it. Otherwise venue_ids are chosen."}},"required":["id","name","description","moment","trigger","tier","step_count","email_count","needs_loyalty_scheme","every_venue"],"additionalProperties":false}}},"required":["starters"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/workflow-starters/{starter_id}":{"get":{"operationId":"workflow_starters.get","tags":["Workflows"],"summary":"Get a starter workflow, ready to make","description":"One starter as a whole workflows.create_draft body (draft): its trigger, steps with their waits, checks and exits, and its emails, each drawn in the organisation's brand with Stampede's own words, as the \"New workflow\" page draws them. Left for you to fill (to_fill): the venues, each email's sender, and the loyalty scheme of any add_loyalty_points step. Change words, waits and branches as the venue wants, preview each email with email_templates.preview, show the person the plan, then pass draft to workflows.create_draft. Saves nothing.","security":[{"oauth2":["workflows:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"starter_id","in":"path","required":true,"description":"From workflow_starters.list.","schema":{"type":"string","maxLength":64}},{"name":"venue_id","in":"query","required":false,"description":"The venue it is for: buttons go to its booking page and venue_ids is filled. Left out, buttons go to the organisation's booking page, where the guest picks a venue.","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"button_url","in":"query","required":false,"description":"Where every button goes instead. Without it, the emails of an order starter have no button.","schema":{"type":"string","maxLength":2048,"format":"uri"}},{"name":"look","in":"query","required":false,"description":"The layout of every email, as on the \"New workflow\" page. Left out: letter.","schema":{"type":"string","enum":["letter","poster","invitation"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","description":"What it does, in a sentence or two."},"moment":{"type":"string","description":"When it starts, in Stampede's words."},"trigger":{"type":"string","description":"The trigger type (workflows.catalogue)."},"tier":{"type":"string","enum":["simple","follow_ups","rewards"],"description":"simple: one email. follow_ups: more emails or a check after the first. rewards: gives loyalty points too."},"step_count":{"type":"number"},"email_count":{"type":"number"},"needs_loyalty_scheme":{"type":"boolean","description":"It gives loyalty points: each add_loyalty_points step needs a loyalty_scheme_id."},"every_venue":{"type":"boolean","description":"Made for every venue (all_venues: true), as Stampede makes it. Otherwise venue_ids are chosen."},"draft":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The body for workflows.create_draft, once to_fill is filled."},"emails":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"purpose":{"type":"string"},"words":{"type":"string","enum":["stampede","yours_to_write"],"description":"stampede: Stampede's approved words, ready to send or change. yours_to_write: a heading and a line saying what it is for, to be written before it is sent."},"can_carry_voucher":{"type":"boolean","description":"Stampede offers a voucher in this email. The API never adds one: a person adds it in Stampede after the draft is made."},"button_url":{"description":"Where its button goes; null: it has no button.","type":["string","null"]}},"required":["key","purpose","words","can_carry_voucher","button_url"],"additionalProperties":false}},"to_fill":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"what":{"type":"string"}},"required":["path","what"],"additionalProperties":false}},"how_to_use":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","moment","trigger","tier","step_count","email_count","needs_loyalty_scheme","every_venue","draft","emails","to_fill","how_to_use"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/webhooks/event-types":{"get":{"operationId":"webhooks.event_types.list","tags":["Webhooks"],"summary":"List the event types an endpoint can receive","security":[{"oauth2":["webhooks:read"]}],"x-kind":"read","x-mcp":false,"x-support":true,"x-admin-only":false,"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"description":{"type":"string"},"scope":{"type":"string","description":"The scope that reads what it is about. Some events need more: see `scopes`."},"scopes":{"type":"array","items":{"type":"string"},"description":"Every scope needed to subscribe, and to read what was sent: `guests:read` as well for an event that carries a guest's contact details."}},"required":["type","description","scope","scopes"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/webhooks/endpoints":{"get":{"operationId":"webhooks.endpoints.list","tags":["Webhooks"],"summary":"List webhook endpoints","security":[{"oauth2":["webhooks:read"]}],"x-kind":"read","x-mcp":false,"x-support":true,"x-admin-only":false,"parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"description":{"type":["string","null"]},"event_types":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"disabled_reason":{"anyOf":[{"type":"string","enum":["by_customer","by_stampede","failing"]},{"type":"null"}],"description":"`failing`: Stampede switched it off after 5 days of failed deliveries."},"failing_since":{"description":"When deliveries started failing with no success since.","type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","url","description","event_types","enabled","disabled_reason","failing_since","created_at","updated_at"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"webhooks.endpoints.create","tags":["Webhooks"],"summary":"Add a webhook endpoint","description":"The answer includes the signing secret. Events start with the next one that happens; nothing earlier is sent.","security":[{"oauth2":["webhooks:write"]}],"x-kind":"write","x-mcp":false,"x-support":true,"x-admin-only":false,"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"description":"An https:// URL on the public internet."},"event_types":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string"},"description":"Event types to receive. See `GET /webhooks/event-types`."},"description":{"type":"string","maxLength":255}},"required":["url","event_types"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"description":{"type":["string","null"]},"event_types":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"disabled_reason":{"anyOf":[{"type":"string","enum":["by_customer","by_stampede","failing"]},{"type":"null"}],"description":"`failing`: Stampede switched it off after 5 days of failed deliveries."},"failing_since":{"description":"When deliveries started failing with no success since.","type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"secret":{"type":"string","description":"Verifies the `webhook-signature` header. Keep it out of your code and logs."}},"required":["id","url","description","event_types","enabled","disabled_reason","failing_since","created_at","updated_at","secret"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/webhooks/endpoints/{endpoint_id}":{"get":{"operationId":"webhooks.endpoints.get","tags":["Webhooks"],"summary":"Get a webhook endpoint","security":[{"oauth2":["webhooks:read"]}],"x-kind":"read","x-mcp":false,"x-support":true,"x-admin-only":false,"parameters":[{"name":"endpoint_id","in":"path","required":true,"description":"The endpoint ID (we_...).","schema":{"type":"string","minLength":1,"maxLength":32}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"description":{"type":["string","null"]},"event_types":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"disabled_reason":{"anyOf":[{"type":"string","enum":["by_customer","by_stampede","failing"]},{"type":"null"}],"description":"`failing`: Stampede switched it off after 5 days of failed deliveries."},"failing_since":{"description":"When deliveries started failing with no success since.","type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","url","description","event_types","enabled","disabled_reason","failing_since","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"put":{"operationId":"webhooks.endpoints.update","tags":["Webhooks"],"summary":"Change a webhook endpoint","description":"Send only what changes. `enabled: true` switches an endpoint back on after it was switched off for failing (not one Stampede switched off). 409 `ENDPOINT_CHANGED` if its settings changed since this request read it: read it again and retry.","security":[{"oauth2":["webhooks:write"]}],"x-kind":"write","x-mcp":false,"x-support":true,"x-admin-only":false,"parameters":[{"name":"endpoint_id","in":"path","required":true,"description":"The endpoint ID (we_...).","schema":{"type":"string","minLength":1,"maxLength":32}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048},"event_types":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string"},"description":"Event types to receive. See `GET /webhooks/event-types`."},"description":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"enabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"description":{"type":["string","null"]},"event_types":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"disabled_reason":{"anyOf":[{"type":"string","enum":["by_customer","by_stampede","failing"]},{"type":"null"}],"description":"`failing`: Stampede switched it off after 5 days of failed deliveries."},"failing_since":{"description":"When deliveries started failing with no success since.","type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","url","description","event_types","enabled","disabled_reason","failing_since","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"webhooks.endpoints.delete","tags":["Webhooks"],"summary":"Delete a webhook endpoint","description":"Deliveries still waiting for it are stopped.","security":[{"oauth2":["webhooks:write"]}],"x-kind":"write","x-mcp":false,"x-support":true,"x-admin-only":false,"parameters":[{"name":"endpoint_id","in":"path","required":true,"description":"The endpoint ID (we_...).","schema":{"type":"string","minLength":1,"maxLength":32}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/webhooks/endpoints/{endpoint_id}/secret":{"get":{"operationId":"webhooks.endpoints.secret.get","tags":["Webhooks"],"summary":"Get an endpoint's signing secret","security":[{"oauth2":["webhooks:write"]}],"x-kind":"read","x-mcp":false,"x-support":true,"x-admin-only":false,"parameters":[{"name":"endpoint_id","in":"path","required":true,"description":"The endpoint ID (we_...).","schema":{"type":"string","minLength":1,"maxLength":32}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"secret":{"type":"string"}},"required":["secret"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/webhooks/endpoints/{endpoint_id}/rotate-secret":{"post":{"operationId":"webhooks.endpoints.secret.rotate","tags":["Webhooks"],"summary":"Replace an endpoint's signing secret","description":"For 24 hours deliveries carry signatures from both the old and the new secret, so you can switch over without missing anything. 409 `ENDPOINT_CHANGED` if the endpoint changed meanwhile: retry.","security":[{"oauth2":["webhooks:write"]}],"x-kind":"write","x-mcp":false,"x-support":true,"x-admin-only":false,"parameters":[{"name":"endpoint_id","in":"path","required":true,"description":"The endpoint ID (we_...).","schema":{"type":"string","minLength":1,"maxLength":32}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"description":{"type":["string","null"]},"event_types":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"disabled_reason":{"anyOf":[{"type":"string","enum":["by_customer","by_stampede","failing"]},{"type":"null"}],"description":"`failing`: Stampede switched it off after 5 days of failed deliveries."},"failing_since":{"description":"When deliveries started failing with no success since.","type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"secret":{"type":"string","description":"Verifies the `webhook-signature` header. Keep it out of your code and logs."}},"required":["id","url","description","event_types","enabled","disabled_reason","failing_since","created_at","updated_at","secret"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/webhooks/endpoints/{endpoint_id}/test":{"post":{"operationId":"webhooks.endpoints.test","tags":["Webhooks"],"summary":"Send a test event to an endpoint","description":"Sends one `webhook.test` event now, signed like any other, and says what your endpoint answered. Not retried.","security":[{"oauth2":["webhooks:write"]}],"x-kind":"write","x-mcp":false,"x-support":true,"x-admin-only":false,"parameters":[{"name":"endpoint_id","in":"path","required":true,"description":"The endpoint ID (we_...).","schema":{"type":"string","minLength":1,"maxLength":32}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"delivered":{"type":"boolean"},"status":{"type":["number","null"]},"error":{"type":["string","null"]},"duration_ms":{"type":"number"}},"required":["delivered","status","error","duration_ms"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/webhooks/deliveries":{"get":{"operationId":"webhooks.deliveries.list","tags":["Webhooks"],"summary":"List deliveries","description":"Newest first. Kept for 30 days.","security":[{"oauth2":["webhooks:read"]}],"x-kind":"read","x-mcp":false,"x-support":true,"x-admin-only":false,"parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"endpoint_id","in":"query","required":false,"description":"The endpoint ID (we_...).","schema":{"type":"string","minLength":1,"maxLength":32}},{"name":"event_type","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pending","succeeded","failed"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"endpoint_id":{"type":"string"},"event_id":{"type":"string","description":"Also the `webhook-id` header."},"event_type":{"type":"string"},"status":{"type":"string","enum":["pending","succeeded","failed"]},"attempts":{"type":"number"},"last_attempt_at":{"type":["string","null"]},"last_status":{"description":"Your HTTP status on the last attempt; null if there was no answer.","type":["number","null"]},"last_error":{"type":["string","null"]},"next_attempt_at":{"type":["string","null"]},"succeeded_at":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["id","endpoint_id","event_id","event_type","status","attempts","last_attempt_at","last_status","last_error","next_attempt_at","succeeded_at","created_at"],"additionalProperties":false}},"cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]}},"required":["data","cursor"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/webhooks/deliveries/{delivery_id}":{"get":{"operationId":"webhooks.deliveries.get","tags":["Webhooks"],"summary":"Get a delivery and the event it carries","security":[{"oauth2":["webhooks:read"]}],"x-kind":"read","x-mcp":false,"x-support":true,"x-admin-only":false,"parameters":[{"name":"delivery_id","in":"path","required":true,"description":"The delivery ID (msg_...).","schema":{"type":"string","minLength":1,"maxLength":32}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"endpoint_id":{"type":"string"},"event_id":{"type":"string","description":"Also the `webhook-id` header."},"event_type":{"type":"string"},"status":{"type":"string","enum":["pending","succeeded","failed"]},"attempts":{"type":"number"},"last_attempt_at":{"type":["string","null"]},"last_status":{"description":"Your HTTP status on the last attempt; null if there was no answer.","type":["number","null"]},"last_error":{"type":["string","null"]},"next_attempt_at":{"type":["string","null"]},"succeeded_at":{"type":["string","null"]},"created_at":{"type":"string"},"event":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"The body that was sent. Null once the event is older than 30 days, or if your token cannot read what it carries."}},"required":["id","endpoint_id","event_id","event_type","status","attempts","last_attempt_at","last_status","last_error","next_attempt_at","succeeded_at","created_at","event"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/webhooks/deliveries/{delivery_id}/redeliver":{"post":{"operationId":"webhooks.deliveries.redeliver","tags":["Webhooks"],"summary":"Send a delivery again","description":"Starts its attempts again from the first, with the same `webhook-id`. For a delivery that failed, or one you want again.","security":[{"oauth2":["webhooks:write"]}],"x-kind":"write","x-mcp":false,"x-support":true,"x-admin-only":false,"parameters":[{"name":"delivery_id","in":"path","required":true,"description":"The delivery ID (msg_...).","schema":{"type":"string","minLength":1,"maxLength":32}}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"endpoint_id":{"type":"string"},"event_id":{"type":"string","description":"Also the `webhook-id` header."},"event_type":{"type":"string"},"status":{"type":"string","enum":["pending","succeeded","failed"]},"attempts":{"type":"number"},"last_attempt_at":{"type":["string","null"]},"last_status":{"description":"Your HTTP status on the last attempt; null if there was no answer.","type":["number","null"]},"last_error":{"type":["string","null"]},"next_attempt_at":{"type":["string","null"]},"succeeded_at":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["id","endpoint_id","event_id","event_type","status","attempts","last_attempt_at","last_status","last_error","next_attempt_at","succeeded_at","created_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/reports/meta":{"get":{"operationId":"reports.meta","tags":["Reports"],"summary":"List every report with its figures, slices and groupings","description":"The catalogue for reports.*: each report with what it can be grouped by, its slices (and their values, where fixed), its figures (unit, whether they add up) and the relative ranges. Read it before building a query. Reports are history (up to yesterday) on the venue trading day, 05:00 to 04:59.","security":[{"oauth2":["reports:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"day":{"type":"string","const":"trading"},"ranges":{"type":"array","items":{"type":"string"}},"having_operators":{"type":"array","items":{"type":"string"}},"compare":{"type":"array","items":{"type":"string"}},"reports":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"path":{"type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"hourly":{"type":"boolean"},"group_by":{"type":"array","items":{"type":"string"}},"slices":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"always_split":{"type":"boolean","description":"Every row and total is split by it, because it must never be added across."},"daily_only":{"type":"boolean"},"values":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Its values, when they are a fixed list."},"description":{"type":["string","null"]}},"required":["name","always_split","daily_only","values","description"],"additionalProperties":false}},"figures":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"unit":{"type":"string","enum":["count","minor_units","seconds","number"]},"adds_up":{"type":"boolean","description":"Whether rows can be added together (an average or a distinct count cannot)."},"daily_only":{"type":"boolean"},"description":{"type":["string","null"]}},"required":["name","unit","adds_up","daily_only","description"],"additionalProperties":false}}},"required":["id","path","summary","description","hourly","group_by","slices","figures"],"additionalProperties":false}}},"required":["day","ranges","having_operators","compare","reports"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/reports/orders":{"get":{"operationId":"reports.orders","tags":["Reports"],"summary":"Report on takings: orders and money","description":"Orders and money in minor units, sliced by source, menu, pre-order, group order and order value band, and kept apart by channel (`square_pos`: the Square till; `zion_preorder`: pre-orders taken with bookings; `stampede_ordering`: Stampede table, collection and pre-order ordering) and by currency. Never add the channels together: a Stampede order is also rung through the till, so it would count twice. `net` is after discounts and refunds and leaves out tips; tips, service charge and tax are separate. On `stampede_ordering`, `net` is before refunds and `refunds` is null, because its refunds are not in the reports yet. Figures: orders, refund_orders, open_tabs, gross_sales, discounts, refunds, net, tips, service_charge, tax, average_order. History only: days that are over, up to yesterday (a later `to` is cut to yesterday). A day is the venue trading day, 05:00 to 04:59 on the venue clock, so late-night trade counts on the night it belongs to. Give `from` and `to` (trading days, both included, up to three years) or a `range` (last_30_days, last_week, last_month, this_year_to_date and so on). reports.meta lists every report, figure and slice. `group_by` takes up to four of: one of day, week (from Monday) or month; weekday; hour where offered; venue (with its name); and any slice, comma-separated. With no `group_by` there are only `totals`. Filter on any slice or split with a comma-separated list, and on figures with `having` (net:gt:1000000 keeps rows whose net is over 10,000.00; totals are not filtered). `sort` orders rows by a figure, largest first, and `limit` keeps the first rows (top 10 dishes: group_by=item, sort=quantity, limit=10). `compare` adds `previous` figures for the same days just before (`previous_period`) or 52 weeks earlier, same weekdays (`last_year`): on totals always, and on rows when no row is a date. Without `venue_id` it covers the venues you can see (and figures no venue could be matched to, `venue_id` null, if you see them all). `as_of` says when the report tables were last rebuilt; most figures are loaded overnight.","security":[{"oauth2":["reports:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"from","in":"query","required":false,"description":"First trading day, YYYY-MM-DD. Or use `range`.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"description":"Last trading day, YYYY-MM-DD, included. Cut to yesterday.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"range","in":"query","required":false,"description":"Instead of from and to: days counted back from yesterday.","schema":{"type":"string","enum":["yesterday","last_7_days","last_30_days","last_90_days","last_365_days","this_week_to_date","last_week","this_month_to_date","last_month","this_quarter_to_date","last_quarter","this_year_to_date","last_year"]}},{"name":"having","in":"query","required":false,"description":"Keep only rows whose figures pass, comma-separated figure:op:number (op gt, gte, lt, lte, eq, ne). Money is in minor units.","schema":{"type":"string","maxLength":500}},{"name":"group_by","in":"query","required":false,"description":"Up to four of day, week, month, weekday, hour, venue, source, menu, pre_order, group_order, value_band, comma-separated.","style":"form","explode":false,"schema":{"maxItems":4,"type":"array","items":{"type":"string","enum":["day","week","month","weekday","hour","venue","source","menu","pre_order","group_order","value_band"]}}},{"name":"venue_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"sort","in":"query","required":false,"description":"A figure to sort rows by, largest first.","schema":{"type":"string","enum":["orders","refund_orders","open_tabs","gross_sales","discounts","refunds","net","tips","service_charge","tax","average_order"]}},{"name":"limit","in":"query","required":false,"description":"Keep only the first rows.","schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"compare","in":"query","required":false,"description":"Add figures for an earlier period alongside.","schema":{"type":"string","enum":["previous_period","last_year"]}},{"name":"channel","in":"query","required":false,"description":"Only these channel values, comma-separated.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"currency","in":"query","required":false,"description":"Only these currency values, comma-separated.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"source","in":"query","required":false,"description":"Only these, comma-separated: Where the order came from. square_pos: the till's own source name (e.g. Square Point of Sale, Deliveroo). zion_preorder: zion. stampede_ordering: pre_order, table, collection, walk_in or pos (walk_in and pos are till sales Stampede mirrors; Stampede's own takings are pre_order, table and collection).","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"menu","in":"query","required":false,"description":"Only these, comma-separated: The Stampede ordering menu name (empty on other channels).","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"pre_order","in":"query","required":false,"description":"Only these, comma-separated: yes or no.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"group_order","in":"query","required":false,"description":"Only these, comma-separated: yes or no.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"value_band","in":"query","required":false,"description":"Only these, comma-separated: The order's net in major units: 0-10, 10-20, 20-50, 50-100, 100+, refund or unknown.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string","description":"The last day covered: never later than yesterday."},"day":{"type":"string","const":"trading"},"group_by":{"type":"array","items":{"type":"string"}},"compare":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["previous_period","last_year"]},"from":{"type":"string"},"to":{"type":"string"}},"required":["period","from","to"],"additionalProperties":false},{"type":"null"}]},"as_of":{"description":"When the report tables were last rebuilt.","type":["string","null"]},"rows":{"type":"array","items":{"type":"object","properties":{"keys":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","null"]}},"figures":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},"previous":{"description":"The same figures over the comparison period.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},{"type":"null"}]}},"required":["keys","figures"],"additionalProperties":false}},"totals":{"type":"array","items":{"type":"object","properties":{"keys":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","null"]}},"figures":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},"previous":{"description":"The same figures over the comparison period.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},{"type":"null"}]}},"required":["keys","figures"],"additionalProperties":false}}},"required":["from","to","day","group_by","compare","as_of","rows","totals"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/reports/items":{"get":{"operationId":"reports.items","tags":["Reports"],"summary":"Report on what sold: items, variations and categories","description":"Units sold (net of returns) and their sales in minor units, by item, variation and category, kept apart by channel and currency. `sales` is the items before tax, tips, service charge and order-level discounts, so it never equals `reports.orders` net. `orders` counts the orders an item was on. Till returns sit on their own row with no category or variation: group by item alone to net them against sales. Figures: quantity, gross_sales, discounts, sales, orders. History only: days that are over, up to yesterday (a later `to` is cut to yesterday). A day is the venue trading day, 05:00 to 04:59 on the venue clock, so late-night trade counts on the night it belongs to. Give `from` and `to` (trading days, both included, up to three years) or a `range` (last_30_days, last_week, last_month, this_year_to_date and so on). reports.meta lists every report, figure and slice. `group_by` takes up to four of: one of day, week (from Monday) or month; weekday; hour where offered; venue (with its name); and any slice, comma-separated. With no `group_by` there are only `totals`. Filter on any slice or split with a comma-separated list, and on figures with `having` (net:gt:1000000 keeps rows whose net is over 10,000.00; totals are not filtered). `sort` orders rows by a figure, largest first, and `limit` keeps the first rows (top 10 dishes: group_by=item, sort=quantity, limit=10). `compare` adds `previous` figures for the same days just before (`previous_period`) or 52 weeks earlier, same weekdays (`last_year`): on totals always, and on rows when no row is a date. Without `venue_id` it covers the venues you can see (and figures no venue could be matched to, `venue_id` null, if you see them all). `as_of` says when the report tables were last rebuilt; most figures are loaded overnight.","security":[{"oauth2":["reports:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"from","in":"query","required":false,"description":"First trading day, YYYY-MM-DD. Or use `range`.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"description":"Last trading day, YYYY-MM-DD, included. Cut to yesterday.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"range","in":"query","required":false,"description":"Instead of from and to: days counted back from yesterday.","schema":{"type":"string","enum":["yesterday","last_7_days","last_30_days","last_90_days","last_365_days","this_week_to_date","last_week","this_month_to_date","last_month","this_quarter_to_date","last_quarter","this_year_to_date","last_year"]}},{"name":"having","in":"query","required":false,"description":"Keep only rows whose figures pass, comma-separated figure:op:number (op gt, gte, lt, lte, eq, ne). Money is in minor units.","schema":{"type":"string","maxLength":500}},{"name":"group_by","in":"query","required":false,"description":"Up to four of day, week, month, weekday, venue, category, item, variation, comma-separated.","style":"form","explode":false,"schema":{"maxItems":4,"type":"array","items":{"type":"string","enum":["day","week","month","weekday","venue","category","item","variation"]}}},{"name":"venue_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"sort","in":"query","required":false,"description":"A figure to sort rows by, largest first.","schema":{"type":"string","enum":["quantity","gross_sales","discounts","sales","orders"]}},{"name":"limit","in":"query","required":false,"description":"Keep only the first rows.","schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"compare","in":"query","required":false,"description":"Add figures for an earlier period alongside.","schema":{"type":"string","enum":["previous_period","last_year"]}},{"name":"channel","in":"query","required":false,"description":"Only these channel values, comma-separated.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"currency","in":"query","required":false,"description":"Only these currency values, comma-separated.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"category","in":"query","required":false,"description":"Only these, comma-separated: The Square category, or the top menu section for Stampede ordering.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"item","in":"query","required":false,"description":"Only these item values, comma-separated.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"variation","in":"query","required":false,"description":"Only these variation values, comma-separated.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string","description":"The last day covered: never later than yesterday."},"day":{"type":"string","const":"trading"},"group_by":{"type":"array","items":{"type":"string"}},"compare":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["previous_period","last_year"]},"from":{"type":"string"},"to":{"type":"string"}},"required":["period","from","to"],"additionalProperties":false},{"type":"null"}]},"as_of":{"description":"When the report tables were last rebuilt.","type":["string","null"]},"rows":{"type":"array","items":{"type":"object","properties":{"keys":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","null"]}},"figures":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},"previous":{"description":"The same figures over the comparison period.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},{"type":"null"}]}},"required":["keys","figures"],"additionalProperties":false}},"totals":{"type":"array","items":{"type":"object","properties":{"keys":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","null"]}},"figures":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},"previous":{"description":"The same figures over the comparison period.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},{"type":"null"}]}},"required":["keys","figures"],"additionalProperties":false}}},"required":["from","to","day","group_by","compare","as_of","rows","totals"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/reports/bookings":{"get":{"operationId":"reports.bookings","tags":["Reports"],"summary":"Report on bookings and covers","description":"Bookings counted on the trading day they were for, sliced by booking type, area, source, party size band and how far ahead they were booked. `covers` are guests at bookings that were served; `covers_booked` are guests on every booking not cancelled. Figures: bookings, served_bookings, covers, covers_booked, cancellations, no_shows, walk_ins, online_bookings, first_visits, loyalty_members, vips, with_pre_order, special_requirements, from_waitlist, average_party_size, median_lead_time_seconds. History only: days that are over, up to yesterday (a later `to` is cut to yesterday). A day is the venue trading day, 05:00 to 04:59 on the venue clock, so late-night trade counts on the night it belongs to. Give `from` and `to` (trading days, both included, up to three years) or a `range` (last_30_days, last_week, last_month, this_year_to_date and so on). reports.meta lists every report, figure and slice. `group_by` takes up to four of: one of day, week (from Monday) or month; weekday; hour where offered; venue (with its name); and any slice, comma-separated. With no `group_by` there are only `totals`. Filter on any slice or split with a comma-separated list, and on figures with `having` (net:gt:1000000 keeps rows whose net is over 10,000.00; totals are not filtered). `sort` orders rows by a figure, largest first, and `limit` keeps the first rows (top 10 dishes: group_by=item, sort=quantity, limit=10). `compare` adds `previous` figures for the same days just before (`previous_period`) or 52 weeks earlier, same weekdays (`last_year`): on totals always, and on rows when no row is a date. Without `venue_id` it covers the venues you can see (and figures no venue could be matched to, `venue_id` null, if you see them all). `as_of` says when the report tables were last rebuilt; most figures are loaded overnight.","security":[{"oauth2":["reports:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"from","in":"query","required":false,"description":"First trading day, YYYY-MM-DD. Or use `range`.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"description":"Last trading day, YYYY-MM-DD, included. Cut to yesterday.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"range","in":"query","required":false,"description":"Instead of from and to: days counted back from yesterday.","schema":{"type":"string","enum":["yesterday","last_7_days","last_30_days","last_90_days","last_365_days","this_week_to_date","last_week","this_month_to_date","last_month","this_quarter_to_date","last_quarter","this_year_to_date","last_year"]}},{"name":"having","in":"query","required":false,"description":"Keep only rows whose figures pass, comma-separated figure:op:number (op gt, gte, lt, lte, eq, ne). Money is in minor units.","schema":{"type":"string","maxLength":500}},{"name":"group_by","in":"query","required":false,"description":"Up to four of day, week, month, weekday, hour, venue, booking_type, area, source, party_size_band, lead_time_band, event, comma-separated.","style":"form","explode":false,"schema":{"maxItems":4,"type":"array","items":{"type":"string","enum":["day","week","month","weekday","hour","venue","booking_type","area","source","party_size_band","lead_time_band","event"]}}},{"name":"venue_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"sort","in":"query","required":false,"description":"A figure to sort rows by, largest first.","schema":{"type":"string","enum":["bookings","served_bookings","covers","covers_booked","cancellations","no_shows","walk_ins","online_bookings","first_visits","loyalty_members","vips","with_pre_order","special_requirements","from_waitlist","average_party_size","median_lead_time_seconds"]}},{"name":"limit","in":"query","required":false,"description":"Keep only the first rows.","schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"compare","in":"query","required":false,"description":"Add figures for an earlier period alongside.","schema":{"type":"string","enum":["previous_period","last_year"]}},{"name":"booking_type","in":"query","required":false,"description":"Only these booking_type values, comma-separated.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"area","in":"query","required":false,"description":"Only these area values, comma-separated.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"source","in":"query","required":false,"description":"Only these, comma-separated: google, walk_in, online or staff.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"party_size_band","in":"query","required":false,"description":"Only these, comma-separated: 1, 2, 3-4, 5-6, 7-10, 11+ or unknown.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"lead_time_band","in":"query","required":false,"description":"Only these, comma-separated: How far ahead it was booked: walk_in, same_day, 1-2_days, 3-7_days, 8-14_days, 15-30_days or 31_days_plus.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"event","in":"query","required":false,"description":"Only these, comma-separated: The event the booking was for (empty for an ordinary booking).","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string","description":"The last day covered: never later than yesterday."},"day":{"type":"string","const":"trading"},"group_by":{"type":"array","items":{"type":"string"}},"compare":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["previous_period","last_year"]},"from":{"type":"string"},"to":{"type":"string"}},"required":["period","from","to"],"additionalProperties":false},{"type":"null"}]},"as_of":{"description":"When the report tables were last rebuilt.","type":["string","null"]},"rows":{"type":"array","items":{"type":"object","properties":{"keys":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","null"]}},"figures":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},"previous":{"description":"The same figures over the comparison period.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},{"type":"null"}]}},"required":["keys","figures"],"additionalProperties":false}},"totals":{"type":"array","items":{"type":"object","properties":{"keys":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","null"]}},"figures":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},"previous":{"description":"The same figures over the comparison period.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},{"type":"null"}]}},"required":["keys","figures"],"additionalProperties":false}}},"required":["from","to","day","group_by","compare","as_of","rows","totals"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/reports/wifi":{"get":{"operationId":"reports.wifi","tags":["Reports"],"summary":"Report on WiFi sign-ins","description":"The WiFi sign-in page from first view to online, sessions, unique devices and guests, and the median session length in seconds, sliced by how well the guest is known, the furthest step reached, session length and (by day) new or returning. For new guests, filter guest_status=new and read unique_guests. Unique guests are not offered by hour (null). Figures: page_views, sign_in_started, registered, online, surveys_completed, sessions, identified_sessions, unique_devices, unique_guests, median_session_seconds. History only: days that are over, up to yesterday (a later `to` is cut to yesterday). A day is the venue trading day, 05:00 to 04:59 on the venue clock, so late-night trade counts on the night it belongs to. Give `from` and `to` (trading days, both included, up to three years) or a `range` (last_30_days, last_week, last_month, this_year_to_date and so on). reports.meta lists every report, figure and slice. `group_by` takes up to four of: one of day, week (from Monday) or month; weekday; hour where offered; venue (with its name); and any slice, comma-separated. With no `group_by` there are only `totals`. Filter on any slice or split with a comma-separated list, and on figures with `having` (net:gt:1000000 keeps rows whose net is over 10,000.00; totals are not filtered). `sort` orders rows by a figure, largest first, and `limit` keeps the first rows (top 10 dishes: group_by=item, sort=quantity, limit=10). `compare` adds `previous` figures for the same days just before (`previous_period`) or 52 weeks earlier, same weekdays (`last_year`): on totals always, and on rows when no row is a date. Without `venue_id` it covers the venues you can see (and figures no venue could be matched to, `venue_id` null, if you see them all). `as_of` says when the report tables were last rebuilt; most figures are loaded overnight.","security":[{"oauth2":["reports:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"from","in":"query","required":false,"description":"First trading day, YYYY-MM-DD. Or use `range`.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"description":"Last trading day, YYYY-MM-DD, included. Cut to yesterday.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"range","in":"query","required":false,"description":"Instead of from and to: days counted back from yesterday.","schema":{"type":"string","enum":["yesterday","last_7_days","last_30_days","last_90_days","last_365_days","this_week_to_date","last_week","this_month_to_date","last_month","this_quarter_to_date","last_quarter","this_year_to_date","last_year"]}},{"name":"having","in":"query","required":false,"description":"Keep only rows whose figures pass, comma-separated figure:op:number (op gt, gte, lt, lte, eq, ne). Money is in minor units.","schema":{"type":"string","maxLength":500}},{"name":"group_by","in":"query","required":false,"description":"Up to four of day, week, month, weekday, hour, venue, identity, outcome, stay_band, guest_status, comma-separated.","style":"form","explode":false,"schema":{"maxItems":4,"type":"array","items":{"type":"string","enum":["day","week","month","weekday","hour","venue","identity","outcome","stay_band","guest_status"]}}},{"name":"venue_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"sort","in":"query","required":false,"description":"A figure to sort rows by, largest first.","schema":{"type":"string","enum":["page_views","sign_in_started","registered","online","surveys_completed","sessions","identified_sessions","unique_devices","unique_guests","median_session_seconds"]}},{"name":"limit","in":"query","required":false,"description":"Keep only the first rows.","schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"compare","in":"query","required":false,"description":"Add figures for an earlier period alongside.","schema":{"type":"string","enum":["previous_period","last_year"]}},{"name":"identity","in":"query","required":false,"description":"Only these, comma-separated: How well the guest is known: person, device or anon.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"outcome","in":"query","required":false,"description":"Only these, comma-separated: The furthest step reached: connected, authed, registered, landed or opened.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"stay_band","in":"query","required":false,"description":"Only these, comma-separated: Session length: 0-15m, 15-30m, 30-60m, 1-2h, 2-4h, 4h+, untimed or no_session.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"guest_status","in":"query","required":false,"description":"Only these, comma-separated: new (first time on this venue's WiFi), returning or anonymous. Not by hour.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string","description":"The last day covered: never later than yesterday."},"day":{"type":"string","const":"trading"},"group_by":{"type":"array","items":{"type":"string"}},"compare":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["previous_period","last_year"]},"from":{"type":"string"},"to":{"type":"string"}},"required":["period","from","to"],"additionalProperties":false},{"type":"null"}]},"as_of":{"description":"When the report tables were last rebuilt.","type":["string","null"]},"rows":{"type":"array","items":{"type":"object","properties":{"keys":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","null"]}},"figures":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},"previous":{"description":"The same figures over the comparison period.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},{"type":"null"}]}},"required":["keys","figures"],"additionalProperties":false}},"totals":{"type":"array","items":{"type":"object","properties":{"keys":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","null"]}},"figures":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},"previous":{"description":"The same figures over the comparison period.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},{"type":"null"}]}},"required":["keys","figures"],"additionalProperties":false}}},"required":["from","to","day","group_by","compare","as_of","rows","totals"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/reports/reviews":{"get":{"operationId":"reports.reviews","tags":["Reports"],"summary":"Report on reviews and ratings","description":"Reviews kept apart by platform, never blended: count, average rating out of 5, promoters (5), passives (4) and detractors (3 and below), NPS from those, replies and the median time to reply in seconds, sliced by star rating, sentiment, length of the written review and whether it was replied to. Figures: reviews, rated, average_rating, promoters, passives, detractors, nps, replied_reviews, median_reply_seconds. History only: days that are over, up to yesterday (a later `to` is cut to yesterday). A day is the venue trading day, 05:00 to 04:59 on the venue clock, so late-night trade counts on the night it belongs to. Give `from` and `to` (trading days, both included, up to three years) or a `range` (last_30_days, last_week, last_month, this_year_to_date and so on). reports.meta lists every report, figure and slice. `group_by` takes up to four of: one of day, week (from Monday) or month; weekday; hour where offered; venue (with its name); and any slice, comma-separated. With no `group_by` there are only `totals`. Filter on any slice or split with a comma-separated list, and on figures with `having` (net:gt:1000000 keeps rows whose net is over 10,000.00; totals are not filtered). `sort` orders rows by a figure, largest first, and `limit` keeps the first rows (top 10 dishes: group_by=item, sort=quantity, limit=10). `compare` adds `previous` figures for the same days just before (`previous_period`) or 52 weeks earlier, same weekdays (`last_year`): on totals always, and on rows when no row is a date. Without `venue_id` it covers the venues you can see (and figures no venue could be matched to, `venue_id` null, if you see them all). `as_of` says when the report tables were last rebuilt; most figures are loaded overnight.","security":[{"oauth2":["reports:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"from","in":"query","required":false,"description":"First trading day, YYYY-MM-DD. Or use `range`.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"description":"Last trading day, YYYY-MM-DD, included. Cut to yesterday.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"range","in":"query","required":false,"description":"Instead of from and to: days counted back from yesterday.","schema":{"type":"string","enum":["yesterday","last_7_days","last_30_days","last_90_days","last_365_days","this_week_to_date","last_week","this_month_to_date","last_month","this_quarter_to_date","last_quarter","this_year_to_date","last_year"]}},{"name":"having","in":"query","required":false,"description":"Keep only rows whose figures pass, comma-separated figure:op:number (op gt, gte, lt, lte, eq, ne). Money is in minor units.","schema":{"type":"string","maxLength":500}},{"name":"group_by","in":"query","required":false,"description":"Up to four of day, week, month, weekday, venue, rating, sentiment, text_band, replied, comma-separated.","style":"form","explode":false,"schema":{"maxItems":4,"type":"array","items":{"type":"string","enum":["day","week","month","weekday","venue","rating","sentiment","text_band","replied"]}}},{"name":"venue_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"sort","in":"query","required":false,"description":"A figure to sort rows by, largest first.","schema":{"type":"string","enum":["reviews","rated","average_rating","promoters","passives","detractors","nps","replied_reviews","median_reply_seconds"]}},{"name":"limit","in":"query","required":false,"description":"Keep only the first rows.","schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"compare","in":"query","required":false,"description":"Add figures for an earlier period alongside.","schema":{"type":"string","enum":["previous_period","last_year"]}},{"name":"platform","in":"query","required":false,"description":"Only these platform values, comma-separated.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"rating","in":"query","required":false,"description":"Only these, comma-separated: 1 to 5 stars (empty when unrated).","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"sentiment","in":"query","required":false,"description":"Only these, comma-separated: positive, negative, mixed or neutral (empty when not scored).","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"text_band","in":"query","required":false,"description":"Only these, comma-separated: Length of the written review in characters: none, 1-100, 101-300 or 301+.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"replied","in":"query","required":false,"description":"Only these, comma-separated: yes or no.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string","description":"The last day covered: never later than yesterday."},"day":{"type":"string","const":"trading"},"group_by":{"type":"array","items":{"type":"string"}},"compare":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["previous_period","last_year"]},"from":{"type":"string"},"to":{"type":"string"}},"required":["period","from","to"],"additionalProperties":false},{"type":"null"}]},"as_of":{"description":"When the report tables were last rebuilt.","type":["string","null"]},"rows":{"type":"array","items":{"type":"object","properties":{"keys":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","null"]}},"figures":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},"previous":{"description":"The same figures over the comparison period.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},{"type":"null"}]}},"required":["keys","figures"],"additionalProperties":false}},"totals":{"type":"array","items":{"type":"object","properties":{"keys":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","null"]}},"figures":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},"previous":{"description":"The same figures over the comparison period.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},{"type":"null"}]}},"required":["keys","figures"],"additionalProperties":false}}},"required":["from","to","day","group_by","compare","as_of","rows","totals"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/reports/loyalty":{"get":{"operationId":"reports.loyalty","tags":["Reports"],"summary":"Report on loyalty points and members","description":"Stampede loyalty, kept apart by scheme because one scheme's points are not another's: transactions, points earned and redeemed, active members, enrolments (bulk imports counted apart) and revocations, sliced by kind (earn, redeem a reward and so on). Figures: transactions, earn_events, points_earned, redeem_events, points_redeemed, active_members, enrolments, bulk_enrolments, revocations. History only: days that are over, up to yesterday (a later `to` is cut to yesterday). A day is the venue trading day, 05:00 to 04:59 on the venue clock, so late-night trade counts on the night it belongs to. Give `from` and `to` (trading days, both included, up to three years) or a `range` (last_30_days, last_week, last_month, this_year_to_date and so on). reports.meta lists every report, figure and slice. `group_by` takes up to four of: one of day, week (from Monday) or month; weekday; hour where offered; venue (with its name); and any slice, comma-separated. With no `group_by` there are only `totals`. Filter on any slice or split with a comma-separated list, and on figures with `having` (net:gt:1000000 keeps rows whose net is over 10,000.00; totals are not filtered). `sort` orders rows by a figure, largest first, and `limit` keeps the first rows (top 10 dishes: group_by=item, sort=quantity, limit=10). `compare` adds `previous` figures for the same days just before (`previous_period`) or 52 weeks earlier, same weekdays (`last_year`): on totals always, and on rows when no row is a date. Without `venue_id` it covers the venues you can see (and figures no venue could be matched to, `venue_id` null, if you see them all). `as_of` says when the report tables were last rebuilt; most figures are loaded overnight.","security":[{"oauth2":["reports:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"from","in":"query","required":false,"description":"First trading day, YYYY-MM-DD. Or use `range`.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"description":"Last trading day, YYYY-MM-DD, included. Cut to yesterday.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"range","in":"query","required":false,"description":"Instead of from and to: days counted back from yesterday.","schema":{"type":"string","enum":["yesterday","last_7_days","last_30_days","last_90_days","last_365_days","this_week_to_date","last_week","this_month_to_date","last_month","this_quarter_to_date","last_quarter","this_year_to_date","last_year"]}},{"name":"having","in":"query","required":false,"description":"Keep only rows whose figures pass, comma-separated figure:op:number (op gt, gte, lt, lte, eq, ne). Money is in minor units.","schema":{"type":"string","maxLength":500}},{"name":"group_by","in":"query","required":false,"description":"Up to four of day, week, month, weekday, venue, kind, comma-separated.","style":"form","explode":false,"schema":{"maxItems":4,"type":"array","items":{"type":"string","enum":["day","week","month","weekday","venue","kind"]}}},{"name":"venue_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"sort","in":"query","required":false,"description":"A figure to sort rows by, largest first.","schema":{"type":"string","enum":["transactions","earn_events","points_earned","redeem_events","points_redeemed","active_members","enrolments","bulk_enrolments","revocations"]}},{"name":"limit","in":"query","required":false,"description":"Keep only the first rows.","schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"compare","in":"query","required":false,"description":"Add figures for an earlier period alongside.","schema":{"type":"string","enum":["previous_period","last_year"]}},{"name":"scheme_id","in":"query","required":false,"description":"Only these scheme_id values, comma-separated.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"kind","in":"query","required":false,"description":"Only these, comma-separated: earn, referral, adjust, redeem_reward, redeem_voucher or redeem_gift_card for points, enrolled or revoked for members.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string","description":"The last day covered: never later than yesterday."},"day":{"type":"string","const":"trading"},"group_by":{"type":"array","items":{"type":"string"}},"compare":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["previous_period","last_year"]},"from":{"type":"string"},"to":{"type":"string"}},"required":["period","from","to"],"additionalProperties":false},{"type":"null"}]},"as_of":{"description":"When the report tables were last rebuilt.","type":["string","null"]},"rows":{"type":"array","items":{"type":"object","properties":{"keys":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","null"]}},"figures":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},"previous":{"description":"The same figures over the comparison period.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},{"type":"null"}]}},"required":["keys","figures"],"additionalProperties":false}},"totals":{"type":"array","items":{"type":"object","properties":{"keys":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","null"]}},"figures":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},"previous":{"description":"The same figures over the comparison period.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},{"type":"null"}]}},"required":["keys","figures"],"additionalProperties":false}}},"required":["from","to","day","group_by","compare","as_of","rows","totals"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/reports/booking_spend":{"get":{"operationId":"reports.booking_spend","tags":["Reports"],"summary":"Report on spend per booking and per head","description":"What bookings spent, counted on the trading day of the booking, by booking type, area, source, party size band and event, kept apart by channel (the Square till, pre-orders, Stampede ordering) and currency. `net` leaves out tips, as in `reports.orders`. `spend_per_head` is net over the covers of bookings that spent; exact where the party size is known. Pre-ordered dishes copied onto the till bill are in both the till and the pre-order channels here: never add the channels together. For what one booking spent with those taken off once, use `on_till` in `reports.booking_orders`. Figures: bookings_with_spend, covers_with_spend, orders, net, tips, spend_per_booking, spend_per_head. History only: days that are over, up to yesterday (a later `to` is cut to yesterday). A day is the venue trading day, 05:00 to 04:59 on the venue clock, so late-night trade counts on the night it belongs to. Give `from` and `to` (trading days, both included, up to three years) or a `range` (last_30_days, last_week, last_month, this_year_to_date and so on). reports.meta lists every report, figure and slice. `group_by` takes up to four of: one of day, week (from Monday) or month; weekday; hour where offered; venue (with its name); and any slice, comma-separated. With no `group_by` there are only `totals`. Filter on any slice or split with a comma-separated list, and on figures with `having` (net:gt:1000000 keeps rows whose net is over 10,000.00; totals are not filtered). `sort` orders rows by a figure, largest first, and `limit` keeps the first rows (top 10 dishes: group_by=item, sort=quantity, limit=10). `compare` adds `previous` figures for the same days just before (`previous_period`) or 52 weeks earlier, same weekdays (`last_year`): on totals always, and on rows when no row is a date. Without `venue_id` it covers the venues you can see (and figures no venue could be matched to, `venue_id` null, if you see them all). `as_of` says when the report tables were last rebuilt; most figures are loaded overnight.","security":[{"oauth2":["reports:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"from","in":"query","required":false,"description":"First trading day, YYYY-MM-DD. Or use `range`.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"description":"Last trading day, YYYY-MM-DD, included. Cut to yesterday.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"range","in":"query","required":false,"description":"Instead of from and to: days counted back from yesterday.","schema":{"type":"string","enum":["yesterday","last_7_days","last_30_days","last_90_days","last_365_days","this_week_to_date","last_week","this_month_to_date","last_month","this_quarter_to_date","last_quarter","this_year_to_date","last_year"]}},{"name":"having","in":"query","required":false,"description":"Keep only rows whose figures pass, comma-separated figure:op:number (op gt, gte, lt, lte, eq, ne). Money is in minor units.","schema":{"type":"string","maxLength":500}},{"name":"group_by","in":"query","required":false,"description":"Up to four of day, week, month, weekday, venue, booking_type, area, source, party_size_band, event, comma-separated.","style":"form","explode":false,"schema":{"maxItems":4,"type":"array","items":{"type":"string","enum":["day","week","month","weekday","venue","booking_type","area","source","party_size_band","event"]}}},{"name":"venue_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"sort","in":"query","required":false,"description":"A figure to sort rows by, largest first.","schema":{"type":"string","enum":["bookings_with_spend","covers_with_spend","orders","net","tips","spend_per_booking","spend_per_head"]}},{"name":"limit","in":"query","required":false,"description":"Keep only the first rows.","schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"compare","in":"query","required":false,"description":"Add figures for an earlier period alongside.","schema":{"type":"string","enum":["previous_period","last_year"]}},{"name":"channel","in":"query","required":false,"description":"Only these channel values, comma-separated.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"currency","in":"query","required":false,"description":"Only these currency values, comma-separated.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"booking_type","in":"query","required":false,"description":"Only these booking_type values, comma-separated.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"area","in":"query","required":false,"description":"Only these area values, comma-separated.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"source","in":"query","required":false,"description":"Only these, comma-separated: google, walk_in, online or staff.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"party_size_band","in":"query","required":false,"description":"Only these, comma-separated: 1, 2, 3-4, 5-6, 7-10, 11+ or unknown.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"event","in":"query","required":false,"description":"Only these, comma-separated: The event the booking was for (empty for an ordinary booking).","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string","description":"The last day covered: never later than yesterday."},"day":{"type":"string","const":"trading"},"group_by":{"type":"array","items":{"type":"string"}},"compare":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["previous_period","last_year"]},"from":{"type":"string"},"to":{"type":"string"}},"required":["period","from","to"],"additionalProperties":false},{"type":"null"}]},"as_of":{"description":"When the report tables were last rebuilt.","type":["string","null"]},"rows":{"type":"array","items":{"type":"object","properties":{"keys":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","null"]}},"figures":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},"previous":{"description":"The same figures over the comparison period.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},{"type":"null"}]}},"required":["keys","figures"],"additionalProperties":false}},"totals":{"type":"array","items":{"type":"object","properties":{"keys":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","null"]}},"figures":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},"previous":{"description":"The same figures over the comparison period.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},{"type":"null"}]}},"required":["keys","figures"],"additionalProperties":false}}},"required":["from","to","day","group_by","compare","as_of","rows","totals"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/reports/tickets":{"get":{"operationId":"reports.tickets","tags":["Reports"],"summary":"Report on tickets for ticketed events","description":"Tickets counted on the trading day of the event, by event, tier, ticket and order status and who sold them. `tickets` are tickets sold (confirmed orders, valid or used tickets); `ticket_value` is the price paid for each ticket; `checked_in` were scanned at the door. Figures: tickets, ticket_value, checked_in, ticket_orders. History only: days that are over, up to yesterday (a later `to` is cut to yesterday). A day is the venue trading day, 05:00 to 04:59 on the venue clock, so late-night trade counts on the night it belongs to. Give `from` and `to` (trading days, both included, up to three years) or a `range` (last_30_days, last_week, last_month, this_year_to_date and so on). reports.meta lists every report, figure and slice. `group_by` takes up to four of: one of day, week (from Monday) or month; weekday; hour where offered; venue (with its name); and any slice, comma-separated. With no `group_by` there are only `totals`. Filter on any slice or split with a comma-separated list, and on figures with `having` (net:gt:1000000 keeps rows whose net is over 10,000.00; totals are not filtered). `sort` orders rows by a figure, largest first, and `limit` keeps the first rows (top 10 dishes: group_by=item, sort=quantity, limit=10). `compare` adds `previous` figures for the same days just before (`previous_period`) or 52 weeks earlier, same weekdays (`last_year`): on totals always, and on rows when no row is a date. Without `venue_id` it covers the venues you can see (and figures no venue could be matched to, `venue_id` null, if you see them all). `as_of` says when the report tables were last rebuilt; most figures are loaded overnight.","security":[{"oauth2":["reports:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"from","in":"query","required":false,"description":"First trading day, YYYY-MM-DD. Or use `range`.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"description":"Last trading day, YYYY-MM-DD, included. Cut to yesterday.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"range","in":"query","required":false,"description":"Instead of from and to: days counted back from yesterday.","schema":{"type":"string","enum":["yesterday","last_7_days","last_30_days","last_90_days","last_365_days","this_week_to_date","last_week","this_month_to_date","last_month","this_quarter_to_date","last_quarter","this_year_to_date","last_year"]}},{"name":"having","in":"query","required":false,"description":"Keep only rows whose figures pass, comma-separated figure:op:number (op gt, gte, lt, lte, eq, ne). Money is in minor units.","schema":{"type":"string","maxLength":500}},{"name":"group_by","in":"query","required":false,"description":"Up to four of day, week, month, weekday, venue, event, tier, ticket_status, order_status, sold_by, date_basis, comma-separated.","style":"form","explode":false,"schema":{"maxItems":4,"type":"array","items":{"type":"string","enum":["day","week","month","weekday","venue","event","tier","ticket_status","order_status","sold_by","date_basis"]}}},{"name":"venue_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"sort","in":"query","required":false,"description":"A figure to sort rows by, largest first.","schema":{"type":"string","enum":["tickets","ticket_value","checked_in","ticket_orders"]}},{"name":"limit","in":"query","required":false,"description":"Keep only the first rows.","schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"compare","in":"query","required":false,"description":"Add figures for an earlier period alongside.","schema":{"type":"string","enum":["previous_period","last_year"]}},{"name":"currency","in":"query","required":false,"description":"Only these currency values, comma-separated.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"event","in":"query","required":false,"description":"Only these event values, comma-separated.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"tier","in":"query","required":false,"description":"Only these, comma-separated: The ticket tier.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"ticket_status","in":"query","required":false,"description":"Only these, comma-separated: valid, used, cancelled or refunded.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"order_status","in":"query","required":false,"description":"Only these, comma-separated: pending, confirmed or cancelled.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"sold_by","in":"query","required":false,"description":"Only these, comma-separated: staff or guest.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"date_basis","in":"query","required":false,"description":"Only these, comma-separated: event_date, or sale_date for events with no dated occurrence (shared ticket pools), which are counted on the day of sale.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string","description":"The last day covered: never later than yesterday."},"day":{"type":"string","const":"trading"},"group_by":{"type":"array","items":{"type":"string"}},"compare":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["previous_period","last_year"]},"from":{"type":"string"},"to":{"type":"string"}},"required":["period","from","to"],"additionalProperties":false},{"type":"null"}]},"as_of":{"description":"When the report tables were last rebuilt.","type":["string","null"]},"rows":{"type":"array","items":{"type":"object","properties":{"keys":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","null"]}},"figures":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},"previous":{"description":"The same figures over the comparison period.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},{"type":"null"}]}},"required":["keys","figures"],"additionalProperties":false}},"totals":{"type":"array","items":{"type":"object","properties":{"keys":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","null"]}},"figures":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},"previous":{"description":"The same figures over the comparison period.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},{"type":"null"}]}},"required":["keys","figures"],"additionalProperties":false}}},"required":["from","to","day","group_by","compare","as_of","rows","totals"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/reports/ticket_orders":{"get":{"operationId":"reports.ticket_orders","tags":["Reports"],"summary":"Report on ticket orders and their money","description":"Ticket orders counted on the trading day of the event: quoted, paid (upgrades added later included), refunded, refund pending and kept (paid less refunded), in minor units. Figures: ticket_orders, quoted, paid, refunded, refund_pending, kept. History only: days that are over, up to yesterday (a later `to` is cut to yesterday). A day is the venue trading day, 05:00 to 04:59 on the venue clock, so late-night trade counts on the night it belongs to. Give `from` and `to` (trading days, both included, up to three years) or a `range` (last_30_days, last_week, last_month, this_year_to_date and so on). reports.meta lists every report, figure and slice. `group_by` takes up to four of: one of day, week (from Monday) or month; weekday; hour where offered; venue (with its name); and any slice, comma-separated. With no `group_by` there are only `totals`. Filter on any slice or split with a comma-separated list, and on figures with `having` (net:gt:1000000 keeps rows whose net is over 10,000.00; totals are not filtered). `sort` orders rows by a figure, largest first, and `limit` keeps the first rows (top 10 dishes: group_by=item, sort=quantity, limit=10). `compare` adds `previous` figures for the same days just before (`previous_period`) or 52 weeks earlier, same weekdays (`last_year`): on totals always, and on rows when no row is a date. Without `venue_id` it covers the venues you can see (and figures no venue could be matched to, `venue_id` null, if you see them all). `as_of` says when the report tables were last rebuilt; most figures are loaded overnight.","security":[{"oauth2":["reports:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"from","in":"query","required":false,"description":"First trading day, YYYY-MM-DD. Or use `range`.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"description":"Last trading day, YYYY-MM-DD, included. Cut to yesterday.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"range","in":"query","required":false,"description":"Instead of from and to: days counted back from yesterday.","schema":{"type":"string","enum":["yesterday","last_7_days","last_30_days","last_90_days","last_365_days","this_week_to_date","last_week","this_month_to_date","last_month","this_quarter_to_date","last_quarter","this_year_to_date","last_year"]}},{"name":"having","in":"query","required":false,"description":"Keep only rows whose figures pass, comma-separated figure:op:number (op gt, gte, lt, lte, eq, ne). Money is in minor units.","schema":{"type":"string","maxLength":500}},{"name":"group_by","in":"query","required":false,"description":"Up to four of day, week, month, weekday, venue, event, order_status, sold_by, date_basis, comma-separated.","style":"form","explode":false,"schema":{"maxItems":4,"type":"array","items":{"type":"string","enum":["day","week","month","weekday","venue","event","order_status","sold_by","date_basis"]}}},{"name":"venue_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"sort","in":"query","required":false,"description":"A figure to sort rows by, largest first.","schema":{"type":"string","enum":["ticket_orders","quoted","paid","refunded","refund_pending","kept"]}},{"name":"limit","in":"query","required":false,"description":"Keep only the first rows.","schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"compare","in":"query","required":false,"description":"Add figures for an earlier period alongside.","schema":{"type":"string","enum":["previous_period","last_year"]}},{"name":"currency","in":"query","required":false,"description":"Only these currency values, comma-separated.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"event","in":"query","required":false,"description":"Only these event values, comma-separated.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"order_status","in":"query","required":false,"description":"Only these, comma-separated: pending, confirmed or cancelled.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"sold_by","in":"query","required":false,"description":"Only these, comma-separated: staff or guest.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"date_basis","in":"query","required":false,"description":"Only these, comma-separated: event_date, or sale_date for events with no dated occurrence (shared ticket pools), which are counted on the day of sale.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string","description":"The last day covered: never later than yesterday."},"day":{"type":"string","const":"trading"},"group_by":{"type":"array","items":{"type":"string"}},"compare":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["previous_period","last_year"]},"from":{"type":"string"},"to":{"type":"string"}},"required":["period","from","to"],"additionalProperties":false},{"type":"null"}]},"as_of":{"description":"When the report tables were last rebuilt.","type":["string","null"]},"rows":{"type":"array","items":{"type":"object","properties":{"keys":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","null"]}},"figures":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},"previous":{"description":"The same figures over the comparison period.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},{"type":"null"}]}},"required":["keys","figures"],"additionalProperties":false}},"totals":{"type":"array","items":{"type":"object","properties":{"keys":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","null"]}},"figures":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},"previous":{"description":"The same figures over the comparison period.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},{"type":"null"}]}},"required":["keys","figures"],"additionalProperties":false}}},"required":["from","to","day","group_by","compare","as_of","rows","totals"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/reports/upgrades":{"get":{"operationId":"reports.upgrades","tags":["Reports"],"summary":"Report on booking and ticket upgrades","description":"Upgrades sold with bookings and ticket orders, counted on the trading day of the booking or event: units, money paid ahead, and their value at today's list price (no upgrade keeps the price it sold at). Figures: units, paid, list_value, bookings_or_orders. History only: days that are over, up to yesterday (a later `to` is cut to yesterday). A day is the venue trading day, 05:00 to 04:59 on the venue clock, so late-night trade counts on the night it belongs to. Give `from` and `to` (trading days, both included, up to three years) or a `range` (last_30_days, last_week, last_month, this_year_to_date and so on). reports.meta lists every report, figure and slice. `group_by` takes up to four of: one of day, week (from Monday) or month; weekday; hour where offered; venue (with its name); and any slice, comma-separated. With no `group_by` there are only `totals`. Filter on any slice or split with a comma-separated list, and on figures with `having` (net:gt:1000000 keeps rows whose net is over 10,000.00; totals are not filtered). `sort` orders rows by a figure, largest first, and `limit` keeps the first rows (top 10 dishes: group_by=item, sort=quantity, limit=10). `compare` adds `previous` figures for the same days just before (`previous_period`) or 52 weeks earlier, same weekdays (`last_year`): on totals always, and on rows when no row is a date. Without `venue_id` it covers the venues you can see (and figures no venue could be matched to, `venue_id` null, if you see them all). `as_of` says when the report tables were last rebuilt; most figures are loaded overnight.","security":[{"oauth2":["reports:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"from","in":"query","required":false,"description":"First trading day, YYYY-MM-DD. Or use `range`.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"description":"Last trading day, YYYY-MM-DD, included. Cut to yesterday.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"range","in":"query","required":false,"description":"Instead of from and to: days counted back from yesterday.","schema":{"type":"string","enum":["yesterday","last_7_days","last_30_days","last_90_days","last_365_days","this_week_to_date","last_week","this_month_to_date","last_month","this_quarter_to_date","last_quarter","this_year_to_date","last_year"]}},{"name":"having","in":"query","required":false,"description":"Keep only rows whose figures pass, comma-separated figure:op:number (op gt, gte, lt, lte, eq, ne). Money is in minor units.","schema":{"type":"string","maxLength":500}},{"name":"group_by","in":"query","required":false,"description":"Up to four of day, week, month, weekday, venue, upgrade, parent, booking_type, payment, cancelled, comma-separated.","style":"form","explode":false,"schema":{"maxItems":4,"type":"array","items":{"type":"string","enum":["day","week","month","weekday","venue","upgrade","parent","booking_type","payment","cancelled"]}}},{"name":"venue_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"sort","in":"query","required":false,"description":"A figure to sort rows by, largest first.","schema":{"type":"string","enum":["units","paid","list_value","bookings_or_orders"]}},{"name":"limit","in":"query","required":false,"description":"Keep only the first rows.","schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"compare","in":"query","required":false,"description":"Add figures for an earlier period alongside.","schema":{"type":"string","enum":["previous_period","last_year"]}},{"name":"currency","in":"query","required":false,"description":"Only these currency values, comma-separated.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"upgrade","in":"query","required":false,"description":"Only these, comma-separated: The upgrade name.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"parent","in":"query","required":false,"description":"Only these, comma-separated: booking or ticket_order.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"booking_type","in":"query","required":false,"description":"Only these booking_type values, comma-separated.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"payment","in":"query","required":false,"description":"Only these, comma-separated: included, prepaid or pay_at_venue.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"cancelled","in":"query","required":false,"description":"Only these, comma-separated: yes or no.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string","description":"The last day covered: never later than yesterday."},"day":{"type":"string","const":"trading"},"group_by":{"type":"array","items":{"type":"string"}},"compare":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["previous_period","last_year"]},"from":{"type":"string"},"to":{"type":"string"}},"required":["period","from","to"],"additionalProperties":false},{"type":"null"}]},"as_of":{"description":"When the report tables were last rebuilt.","type":["string","null"]},"rows":{"type":"array","items":{"type":"object","properties":{"keys":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","null"]}},"figures":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},"previous":{"description":"The same figures over the comparison period.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},{"type":"null"}]}},"required":["keys","figures"],"additionalProperties":false}},"totals":{"type":"array","items":{"type":"object","properties":{"keys":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","null"]}},"figures":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},"previous":{"description":"The same figures over the comparison period.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},{"type":"null"}]}},"required":["keys","figures"],"additionalProperties":false}}},"required":["from","to","day","group_by","compare","as_of","rows","totals"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/reports/gift_cards":{"get":{"operationId":"reports.gift_cards","tags":["Reports"],"summary":"Report on gift cards: sold, redeemed and refunded","description":"Stampede gift cards (gifting), each event counted on its own trading day: `issued` are cards paid for online or issued by staff, `redeemed`, `refunded` and `deactivated` are cards used, refunded or stopped that day, each with its value in minor units, by product and by who sold it (`online` or `staff`), kept apart by currency. A product for the whole organisation has no venue: its cards are on the venue `''` row and left out when filtering by venue. Cards never paid for are not counted. Value outstanding is not a daily figure: list active cards with `gift_cards.list`. Not the Square gift cards loyalty members get for points (`reports.loyalty`, kind `redeem_gift_card`). Figures: issued, issued_value, redeemed, redeemed_value, refunded, refunded_value, deactivated, deactivated_value. History only: days that are over, up to yesterday (a later `to` is cut to yesterday). A day is the venue trading day, 05:00 to 04:59 on the venue clock, so late-night trade counts on the night it belongs to. Give `from` and `to` (trading days, both included, up to three years) or a `range` (last_30_days, last_week, last_month, this_year_to_date and so on). reports.meta lists every report, figure and slice. `group_by` takes up to four of: one of day, week (from Monday) or month; weekday; hour where offered; venue (with its name); and any slice, comma-separated. With no `group_by` there are only `totals`. Filter on any slice or split with a comma-separated list, and on figures with `having` (net:gt:1000000 keeps rows whose net is over 10,000.00; totals are not filtered). `sort` orders rows by a figure, largest first, and `limit` keeps the first rows (top 10 dishes: group_by=item, sort=quantity, limit=10). `compare` adds `previous` figures for the same days just before (`previous_period`) or 52 weeks earlier, same weekdays (`last_year`): on totals always, and on rows when no row is a date. Without `venue_id` it covers the venues you can see (and figures no venue could be matched to, `venue_id` null, if you see them all). `as_of` says when the report tables were last rebuilt; most figures are loaded overnight.","security":[{"oauth2":["reports:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"from","in":"query","required":false,"description":"First trading day, YYYY-MM-DD. Or use `range`.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"description":"Last trading day, YYYY-MM-DD, included. Cut to yesterday.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"range","in":"query","required":false,"description":"Instead of from and to: days counted back from yesterday.","schema":{"type":"string","enum":["yesterday","last_7_days","last_30_days","last_90_days","last_365_days","this_week_to_date","last_week","this_month_to_date","last_month","this_quarter_to_date","last_quarter","this_year_to_date","last_year"]}},{"name":"having","in":"query","required":false,"description":"Keep only rows whose figures pass, comma-separated figure:op:number (op gt, gte, lt, lte, eq, ne). Money is in minor units.","schema":{"type":"string","maxLength":500}},{"name":"group_by","in":"query","required":false,"description":"Up to four of day, week, month, weekday, venue, product, sold_by, comma-separated.","style":"form","explode":false,"schema":{"maxItems":4,"type":"array","items":{"type":"string","enum":["day","week","month","weekday","venue","product","sold_by"]}}},{"name":"venue_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"sort","in":"query","required":false,"description":"A figure to sort rows by, largest first.","schema":{"type":"string","enum":["issued","issued_value","redeemed","redeemed_value","refunded","refunded_value","deactivated","deactivated_value"]}},{"name":"limit","in":"query","required":false,"description":"Keep only the first rows.","schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"compare","in":"query","required":false,"description":"Add figures for an earlier period alongside.","schema":{"type":"string","enum":["previous_period","last_year"]}},{"name":"currency","in":"query","required":false,"description":"Only these currency values, comma-separated.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"product","in":"query","required":false,"description":"Only these, comma-separated: The gift card product (its name in Stampede).","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"sold_by","in":"query","required":false,"description":"Only these, comma-separated: online (bought by card on the purchase page) or staff (issued by hand).","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string","description":"The last day covered: never later than yesterday."},"day":{"type":"string","const":"trading"},"group_by":{"type":"array","items":{"type":"string"}},"compare":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["previous_period","last_year"]},"from":{"type":"string"},"to":{"type":"string"}},"required":["period","from","to"],"additionalProperties":false},{"type":"null"}]},"as_of":{"description":"When the report tables were last rebuilt.","type":["string","null"]},"rows":{"type":"array","items":{"type":"object","properties":{"keys":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","null"]}},"figures":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},"previous":{"description":"The same figures over the comparison period.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},{"type":"null"}]}},"required":["keys","figures"],"additionalProperties":false}},"totals":{"type":"array","items":{"type":"object","properties":{"keys":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","null"]}},"figures":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},"previous":{"description":"The same figures over the comparison period.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},{"type":"null"}]}},"required":["keys","figures"],"additionalProperties":false}}},"required":["from","to","day","group_by","compare","as_of","rows","totals"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/reports/deposits":{"get":{"operationId":"reports.deposits","tags":["Reports"],"summary":"Report on deposits and cancellation charges","description":"Deposits, full payments and cancellation charges for bookings and enquiries, counted on the trading day they were created: agreed, paid, outstanding, refunded, refund pending, kept (paid less refunded) and forfeited (kept when the guest cancelled or did not come), by kind, status, provider, whether overdue and outcome. Figures: deposits, agreed, paid, outstanding, refunded, refund_pending, refunded_transactions, kept, forfeited. History only: days that are over, up to yesterday (a later `to` is cut to yesterday). A day is the venue trading day, 05:00 to 04:59 on the venue clock, so late-night trade counts on the night it belongs to. Give `from` and `to` (trading days, both included, up to three years) or a `range` (last_30_days, last_week, last_month, this_year_to_date and so on). reports.meta lists every report, figure and slice. `group_by` takes up to four of: one of day, week (from Monday) or month; weekday; hour where offered; venue (with its name); and any slice, comma-separated. With no `group_by` there are only `totals`. Filter on any slice or split with a comma-separated list, and on figures with `having` (net:gt:1000000 keeps rows whose net is over 10,000.00; totals are not filtered). `sort` orders rows by a figure, largest first, and `limit` keeps the first rows (top 10 dishes: group_by=item, sort=quantity, limit=10). `compare` adds `previous` figures for the same days just before (`previous_period`) or 52 weeks earlier, same weekdays (`last_year`): on totals always, and on rows when no row is a date. Without `venue_id` it covers the venues you can see (and figures no venue could be matched to, `venue_id` null, if you see them all). `as_of` says when the report tables were last rebuilt; most figures are loaded overnight.","security":[{"oauth2":["reports:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"from","in":"query","required":false,"description":"First trading day, YYYY-MM-DD. Or use `range`.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"description":"Last trading day, YYYY-MM-DD, included. Cut to yesterday.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"range","in":"query","required":false,"description":"Instead of from and to: days counted back from yesterday.","schema":{"type":"string","enum":["yesterday","last_7_days","last_30_days","last_90_days","last_365_days","this_week_to_date","last_week","this_month_to_date","last_month","this_quarter_to_date","last_quarter","this_year_to_date","last_year"]}},{"name":"having","in":"query","required":false,"description":"Keep only rows whose figures pass, comma-separated figure:op:number (op gt, gte, lt, lte, eq, ne). Money is in minor units.","schema":{"type":"string","maxLength":500}},{"name":"group_by","in":"query","required":false,"description":"Up to four of day, week, month, weekday, venue, kind, status, provider, overdue, outcome, comma-separated.","style":"form","explode":false,"schema":{"maxItems":4,"type":"array","items":{"type":"string","enum":["day","week","month","weekday","venue","kind","status","provider","overdue","outcome"]}}},{"name":"venue_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"sort","in":"query","required":false,"description":"A figure to sort rows by, largest first.","schema":{"type":"string","enum":["deposits","agreed","paid","outstanding","refunded","refund_pending","refunded_transactions","kept","forfeited"]}},{"name":"limit","in":"query","required":false,"description":"Keep only the first rows.","schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"compare","in":"query","required":false,"description":"Add figures for an earlier period alongside.","schema":{"type":"string","enum":["previous_period","last_year"]}},{"name":"currency","in":"query","required":false,"description":"Only these currency values, comma-separated.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"kind","in":"query","required":false,"description":"Only these, comma-separated: booking_deposit, enquiry_deposit, booking_full_payment, enquiry_full_payment, booking_cancellation_charge or enquiry_cancellation_charge.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"status","in":"query","required":false,"description":"Only these, comma-separated: pending (or unpaid for charges), partially_paid, paid, partially_refunded or refunded.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"provider","in":"query","required":false,"description":"Only these, comma-separated: stripe, square, mixed or none.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"overdue","in":"query","required":false,"description":"Only these, comma-separated: yes or no.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"outcome","in":"query","required":false,"description":"Only these, comma-separated: What became of it: unpaid, refunded, partly_refunded, kept_cancellation_charge, kept_on_cancellation (forfeited: the guest cancelled or did not come and it was kept), applied (it went towards the visit) or pending (not decided yet).","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string","description":"The last day covered: never later than yesterday."},"day":{"type":"string","const":"trading"},"group_by":{"type":"array","items":{"type":"string"}},"compare":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["previous_period","last_year"]},"from":{"type":"string"},"to":{"type":"string"}},"required":["period","from","to"],"additionalProperties":false},{"type":"null"}]},"as_of":{"description":"When the report tables were last rebuilt.","type":["string","null"]},"rows":{"type":"array","items":{"type":"object","properties":{"keys":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","null"]}},"figures":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},"previous":{"description":"The same figures over the comparison period.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},{"type":"null"}]}},"required":["keys","figures"],"additionalProperties":false}},"totals":{"type":"array","items":{"type":"object","properties":{"keys":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","null"]}},"figures":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},"previous":{"description":"The same figures over the comparison period.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},{"type":"null"}]}},"required":["keys","figures"],"additionalProperties":false}}},"required":["from","to","day","group_by","compare","as_of","rows","totals"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/reports/booking_orders":{"get":{"operationId":"reports.booking_orders","tags":["Reports"],"summary":"List bookings with the orders they spent and their items","description":"Every booking on the trading days asked (up to 31, history only: up to yesterday), with its booking type, area, source, party size, event and what happened (served, cancelled, no-show), and each order it spent: channel (the Square till, a pre-order or Stampede ordering), when it was placed and closed on the venue clock, net (without tips), tips, service charge, tax and its items with quantity and sales, all in minor units. The same orders as `reports.booking_spend`. Pre-ordered dishes are copied onto the till bill when the party is seated, so a dish can be on both: they are matched by Square item, and `on_till` is the part of a pre-order already inside the till `net` (null on a till check). So what a booking spent, per currency, is the `net` of all its orders less the pre-orders' `on_till`; `reports.booking_spend` does not take it off. Filter by venue, one booking (`booking_id`, with its trading day), booking type, order channel (keeps the booking, shows only those orders) or `has_orders`. Paged: pass `cursor` from the last page. Booking IDs only: no guest details.","security":[{"oauth2":["reports:read"]}],"x-kind":"read","x-mcp":true,"x-support":true,"x-admin-only":false,"parameters":[{"name":"from","in":"query","required":false,"description":"First trading day, YYYY-MM-DD. Or use `range`.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"description":"Last trading day, YYYY-MM-DD, included. Cut to yesterday; at most 31 days.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"range","in":"query","required":false,"description":"Instead of from and to, e.g. yesterday or last_week.","schema":{"type":"string","enum":["yesterday","last_7_days","last_30_days","last_90_days","last_365_days","this_week_to_date","last_week","this_month_to_date","last_month","this_quarter_to_date","last_quarter","this_year_to_date","last_year"]}},{"name":"venue_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"booking_id","in":"query","required":false,"description":"Only this booking. Pass its trading day as `from` and `to` (a booking starting before 05:00 is on the day before).","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"booking_type","in":"query","required":false,"description":"Only these booking types, comma-separated.","style":"form","explode":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}},{"name":"channel","in":"query","required":false,"description":"Only orders on these channels, comma-separated.","style":"form","explode":false,"schema":{"maxItems":3,"type":"array","items":{"type":"string","enum":["square_pos","zion_preorder","stampede_ordering"]}}},{"name":"has_orders","in":"query","required":false,"description":"yes: only bookings that spent; no: only those that did not.","schema":{"type":"string","enum":["yes","no"]}},{"name":"limit","in":"query","required":false,"description":"Bookings per page, 50 by default.","schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":500}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"booking_id":{"type":"string"},"day":{"type":"string","description":"The trading day of the booking."},"venue_id":{"type":["string","null"]},"venue_name":{"type":["string","null"]},"start_hour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"booking_type":{"type":["string","null"]},"area":{"type":["string","null"]},"source":{"type":["string","null"]},"party_size":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"event":{"type":["string","null"]},"status":{"type":["string","null"]},"served":{"type":"boolean"},"cancelled":{"type":"boolean"},"no_show":{"type":"boolean"},"orders":{"type":"array","items":{"type":"object","properties":{"order_id":{"type":"string"},"channel":{"type":["string","null"]},"placed_local":{"type":["string","null"]},"closed_local":{"type":["string","null"]},"currency":{"type":["string","null"]},"net":{"type":"number"},"tips":{"type":"number"},"service_charge":{"type":"number"},"tax":{"type":"number"},"on_till":{"description":"The part of this pre-order found on the booking's till bills, already inside the till `net`. Null on a till check.","type":["number","null"]},"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"quantity":{"type":"number"},"sales":{"type":"number"}},"required":["name","quantity","sales"],"additionalProperties":false}}},"required":["order_id","channel","placed_local","closed_local","currency","net","tips","service_charge","tax","on_till","items"],"additionalProperties":false}}},"required":["booking_id","day","venue_id","venue_name","start_hour","booking_type","area","source","party_size","event","status","served","cancelled","no_show","orders"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["from","to","data","cursor"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}}}}},"components":{"securitySchemes":{"oauth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://global.stampede.ai/oauth/token","scopes":{"organisation:read":"See your organisation's details","venues:read":"See your venues","guests:read":"See guests and their tags","guests:write":"Create guests and change their tags","activity:write":"Record bookings, orders, WiFi logins and form fills from other systems","bookings:read":"See bookings, availability and booking setup: booking types, special dates, events and ticketed events with their ticket tiers, areas, tables, table combinations, blocks and a venue's booking settings","bookings:write":"Block tables, and make, change and cancel bookings","booking_setup:write":"Change how venues take bookings: add, change and remove booking types and events (and the money they ask for), special dates, and ticketed events with their ticket tiers, add and change booking areas, tables and table combinations, and change a venue's booking settings","tickets:read":"See how many tickets are left for ticketed events, ticket orders and the door list (purchasers' details also need guests:read)","tickets:write":"Sell tickets as staff, cancel and refund them, email passes again and check tickets in at the door","enquiries:read":"See enquiries, their stages, lost reasons, form questions and payment links","enquiries:write":"Take, change, move and close enquiries, and send their payment links","wifi:read":"See WiFi sign-in page settings, paid plans, payments, sessions, sign-in counts and SNAPguard setup","wifi:write":"Change WiFi sign-in pages, paid plans and SNAPguard networks, push setup to and restart the SNAPguard, and record WiFi payments","inbox:read":"Read inbox conversations with guests, their messages and notes","inbox:write":"Mark inbox conversations read or closed, assign, tag and add staff notes","inbox:send":"Email replies to guests from the inbox, under the venue's name","deals:read":"See deals and look up deal codes","deals:write":"Create deals, redeem and revoke codes","gift_cards:read":"See gift card products and the gift cards sold or issued: their value, status and when they were bought, redeemed or refunded (the holder's details also need guests:read)","gift_cards:write":"Redeem gift cards, resend them to their holder, issue them by hand, deactivate them and refund ones bought online","loyalty:read":"See loyalty schemes, how members earn points, members and their points, points history, rewards and scheme stats (members' details also need guests:read)","loyalty:write":"Add points and redeem rewards for members; for admins, also correct points, create, change and archive rewards, and set points for spend and for visits","marketing:read":"See email templates and the addresses emails are sent from, and preview emails; see audiences and count the guests they reach; see email campaigns and how they did; see sign-up forms, preview them, and see their questions and who filled them in (their details also need guests:read); see brand kits in full; see whether a guest can be emailed","marketing:write":"Create, change and delete email templates, audiences, draft email campaigns, sign-up forms and brand kits (and set the default kit), create form questions, and send test emails of templates and campaigns; opt a guest out of marketing emails when they ask (never in)","marketing:send":"Send email campaigns to guests, schedule them, and cancel them while that is still possible; switch marketing workflows on and pause them","workflows:read":"See marketing workflows: their triggers, steps and emails, whether they are ready to switch on, and their runs (a run's step by step history also needs guests:read)","workflows:write":"Build draft workflows, change draft or paused ones, and delete drafts that never ran (never switch one on); send events to workflows and start workflow runs","reviews:read":"See reviews of your venues (Google, Stampede's review page and WiFi) with their sentiment and replies, review stats and review pages, what guests say about each venue (dishes, wishes, times, phrases) and Stampede's daily and weekly AI summaries, the AI's reply prompts and automatic reply rules (the reviewer's details also need guests:read)","reviews:write":"Mark reviews as handled, get a reply written by Stampede's AI to check before posting, edit and reject the AI's drafted replies, write the AI's reply prompts and automatic reply rules (a rule that sends replies by itself also needs reviews:reply), make, change and delete review pages and send a test review request email","reviews:reply":"Reply to reviews: post and delete replies to Google reviews, in public under the venue's name, email a reply to a guest who reviewed on Stampede's review page or WiFi, approve replies Stampede's AI drafted, and let an automatic reply rule send replies by itself","ordering:read":"See menus, the Square catalogue they are built from, ordering settings, and tables with their QR codes","ordering:write":"Build draft menus, hide items or mark them sold out, pause menus, change kitchen timings, and manage tables and QR codes","ordering:publish":"Put menus live at venues, or take them off","orders:read":"See orders taken through Stampede: pre-orders, table orders and collection","orders:write":"Move orders through the kitchen: accepted, in progress, ready and completed","payments:read":"See card payments and refunds as they happen, for every venue: amounts, what they were for, and the Stripe or Square reference","reports:read":"See report figures for your venues by day, week, month or hour: takings, bookings and covers, WiFi sign-ins, reviews and loyalty","voice:read":"See your AI phone (Voice AI): its calls with their outcome and transcript, call figures, the venue's numbers with how they answer, and the voices it can speak in (callers' numbers and transcripts also need guests:read)","voice:write":"Change how your AI phone answers: venue first or AI first, the venue's own phone and how long it rings, hours, switchboard lines, the voice, greeting, personality, what it knows about the venue and its languages","webhooks:read":"See your webhook endpoints and what was sent to them","webhooks:write":"Add, change and remove webhook endpoints"}}}}},"responses":{"Error":{"description":"An error. See `errors[].code`.","content":{"application/json":{"schema":{"type":"object","required":["errors","request_id"],"properties":{"errors":{"type":"array","items":{"type":"object","required":["category","code","detail"],"properties":{"category":{"type":"string"},"code":{"type":"string","description":"Stable. Match on this."},"detail":{"type":"string","description":"For people. May change."},"field":{"type":"string","description":"For example `body.email`."}}}},"data":{"type":"object","description":"Rare: more than a sentence can say, such as what a change that stopped half way did and did not do (UPDATE_INCOMPLETE)."},"request_id":{"type":"string","description":"Quote this when asking for help."}}}}}}}}}