{"openapi":"3.1.0","info":{"title":"CaptainTicket API","version":"1.4.0","description":"Access to a ticket shop: events with live availability, ticket shop URLs and payment methods, and — with the matching token scopes — orders, tickets, check-ins and sales statistics, plus a few safe writes (guest list, resending the ticket mail, discount codes). Never refunds, payouts, payment settings or members. Writes take an optional `Idempotency-Key` header. Authenticate with an API token (Dashboard → Instellingen → API-tokens) as `Authorization: Bearer ctk_…`. All timestamps are ISO 8601; event times are Europe/Amsterdam. Money is integer cents. A `null` capacity or availability means unlimited. Webhooks (Dashboard → Instellingen → Webhooks) are signed with `X-CaptainTicket-Signature: t=<unix>,v1=<hex HMAC-SHA256 of t.body>`."},"servers":[{"url":"https://captainticket.nl"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"ctk_","description":"A shop API token. Its scopes decide which endpoints it may call. `read`: The shop, events, live availability and payment methods. Every token has it. `orders:read`: Orders, order lines and refunds, including the buyer's name, e-mail and phone. `tickets:read`: Tickets per event: status, holder name, seat and check-in state. Never the QR code. `checkins:read`: Door scans and the checked-in counters per event and time slot. `stats:read`: Tickets sold and revenue per event and per day. `guestlist:write`: Add guests to an event's guest list (free tickets, mailed when an address is given). `orders:write`: Resend a paid order's ticket e-mail to the address on the order. `discounts:write`: List, create, activate and deactivate discount codes."}}},"security":[{"bearerAuth":[]}],"paths":{"/api/v1/shop":{"get":{"summary":"Get the shop","description":"The shop's public identity: name, slug, enabled locales and the absolute ticketshop URL per locale. `testMode` is true while the platform admin has the shop in Pay.nl test mode — surface it so buyers are never confused.","operationId":"getShop","security":[{"bearerAuth":[]}],"tags":["Shop"],"responses":{"200":{"description":"The shop.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"urls":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"locales":{"type":"array","items":{"type":"string"}},"testMode":{"type":"boolean"}},"required":["id","slug","name","urls","locales","testMode"],"additionalProperties":false}}}},"401":{"description":"Missing, invalid, expired or revoked token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded (600 requests per token per hour; 3000 for a token with an order or ticket scope).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}}}}},"/api/v1/events":{"get":{"summary":"List events","description":"The shop's public events (visible, not archived, not a concept) with a live sold-out flag per event. Events start with the earliest `startsAt`; events without one sort last. Page with `limit`/`offset`.","operationId":"listEvents","security":[{"bearerAuth":[]}],"tags":["Events"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Page size (1–100, default 50)."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0},"description":"Page offset (default 0)."}],"responses":{"200":{"description":"The shop's events.","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"name":{"type":"string"},"startsAt":{"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))$"},{"type":"null"}]},"endsAt":{"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))$"},{"type":"null"}]},"onSale":{"type":"boolean"},"soldOut":{"type":"boolean"},"url":{"type":"string"},"location":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"address":{"type":["string","null"]}},"required":["name","address"],"additionalProperties":false},{"type":"null"}]}},"required":["id","name","startsAt","endsAt","onSale","soldOut","url","location"],"additionalProperties":false}},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"offset":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["events","total","limit","offset"],"additionalProperties":false}}}},"400":{"description":"Malformed query parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"401":{"description":"Missing, invalid, expired or revoked token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded (600 requests per token per hour; 3000 for a token with an order or ticket scope).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}}}}},"/api/v1/events/{eventId}":{"get":{"summary":"Get an event","description":"One event's full public payload: description, sale window, location, per-tier prices and live availability, time slots, and the public URL per locale. An event that is missing, archived, invisible, a concept, or another shop's answers 404 exactly like a nonexistent id.","operationId":"getEvent","security":[{"bearerAuth":[]}],"tags":["Events"],"parameters":[{"name":"eventId","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"The event id, as returned by the list endpoint."}],"responses":{"200":{"description":"The event.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"name":{"type":"string"},"startsAt":{"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))$"},{"type":"null"}]},"endsAt":{"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))$"},{"type":"null"}]},"onSale":{"type":"boolean"},"soldOut":{"type":"boolean"},"url":{"type":"string"},"location":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"address":{"type":"string"},"latitude":{"type":["number","null"]},"longitude":{"type":["number","null"]}},"required":["name","address","latitude","longitude"],"additionalProperties":false},{"type":"null"}]},"description":{"type":"string"},"saleStartsAt":{"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))$"},{"type":"null"}]},"coverImageUrl":{"type":["string","null"]},"presale":{"type":"object","properties":{"enabled":{"type":"boolean"},"startsAt":{"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))$"},{"type":"null"}]}},"required":["enabled","startsAt"],"additionalProperties":false},"queue":{"type":"boolean"},"seated":{"type":"boolean"},"urls":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"tiers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"name":{"type":"string"},"description":{"type":["string","null"]},"priceCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"vatRate":{"type":"string","enum":["free","zero","low","high"]},"capacity":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"available":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"soldOut":{"type":"boolean"},"onSale":{"type":"boolean"},"waitingForTierId":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"seated":{"type":"boolean"},"freeSeats":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"minimumOrderCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"maximumOrderCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"increment":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"timeSlots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"name":{"type":["string","null"]},"start":{"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))$"},"end":{"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))$"}},"required":["id","name","start","end"],"additionalProperties":false}}},"required":["id","name","description","priceCents","vatRate","capacity","available","soldOut","onSale","waitingForTierId","seated","freeSeats","minimumOrderCount","maximumOrderCount","increment","timeSlots"],"additionalProperties":false}},"timeSlots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"name":{"type":["string","null"]},"start":{"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))$"},"end":{"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))$"}},"required":["id","name","start","end"],"additionalProperties":false}}},"required":["id","name","startsAt","endsAt","onSale","soldOut","url","location","description","saleStartsAt","coverImageUrl","presale","queue","seated","urls","tiers","timeSlots"],"additionalProperties":false}}}},"401":{"description":"Missing, invalid, expired or revoked token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"404":{"description":"No such event in this shop.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded (600 requests per token per hour; 3000 for a token with an order or ticket scope).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}}}}},"/api/v1/payment-methods":{"get":{"summary":"List active payment methods","description":"The shop's configured payment methods (its allowlist intersected with the platform-enabled set; no selection means iDEAL only). Read from the local reference tables — no provider call is made. The exact set a buyer may pick is re-resolved against Pay.nl at checkout, so treat this as configuration, not a checkout guarantee.","operationId":"listPaymentMethods","security":[{"bearerAuth":[]}],"tags":["Payment methods"],"responses":{"200":{"description":"The shop's payment methods.","content":{"application/json":{"schema":{"type":"object","properties":{"methods":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"name":{"type":"string"},"type":{"type":"string","enum":["standard","voucher"]}},"required":["id","name","type"],"additionalProperties":false}}},"required":["methods"],"additionalProperties":false}}}},"401":{"description":"Missing, invalid, expired or revoked token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded (600 requests per token per hour; 3000 for a token with an order or ticket scope).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}}}}},"/api/v1/orders":{"get":{"summary":"List orders","description":"The shop's orders with the buyer, oldest purchase first. Without `status` the list holds every real order (paid, free, guest list, imported, swapped, cancelled and refund-shaped); carts and failed payments only with an explicit `status`. Requires the `orders:read` scope (Orders, order lines and refunds, including the buyer's name, e-mail and phone).","operationId":"listOrders","security":[{"bearerAuth":[]}],"tags":["Orders"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"Comma-separated statuses: pending, reserved, paid, free, guestlist, imported, swapped, failed, expired, cancelled, refunding, refunded, partial_refund, chargeback."},{"name":"eventId","in":"query","required":false,"schema":{"type":"integer","minimum":1},"description":"Only this event's orders."},{"name":"since","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Purchased at or after this moment."},{"name":"until","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Purchased before this moment."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Page size (1–100, default 50)."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0},"description":"Page offset (default 0). Page on until `hasMore` is false."}],"responses":{"200":{"description":"A page of orders.","content":{"application/json":{"schema":{"type":"object","properties":{"orders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"eventId":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"eventName":{"type":["string","null"]},"status":{"type":"string","enum":["pending","reserved","paid","free","guestlist","imported","swapped","failed","expired","cancelled","refunding","refunded","partial_refund","chargeback"]},"paid":{"type":"boolean"},"purchasedAt":{"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))$"},{"type":"null"}]},"locale":{"type":"string"},"ticketCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totals":{"type":"object","properties":{"totalCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ticketsCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"serviceCostsCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"productsCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"donationCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"shippingCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"paymentCostsCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"discountCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["totalCents","ticketsCents","serviceCostsCents","productsCents","donationCents","shippingCents","paymentCostsCents","discountCents"],"additionalProperties":false},"discountCode":{"type":["string","null"]},"channel":{"type":"string","enum":["online","door","guestlist","internal"]},"customer":{"anyOf":[{"type":"object","properties":{"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"address":{"type":["string","null"]},"zipcode":{"type":["string","null"]},"city":{"type":["string","null"]},"country":{"type":["string","null"]}},"required":["firstName","lastName","email","phone","address","zipcode","city","country"],"additionalProperties":false},{"type":"null"}]}},"required":["id","eventId","eventName","status","paid","purchasedAt","locale","ticketCount","totals","discountCode","channel","customer"],"additionalProperties":false}},"hasMore":{"type":"boolean"},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"offset":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["orders","hasMore","limit","offset"],"additionalProperties":false}}}},"400":{"description":"Malformed path or query parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"401":{"description":"Missing, invalid, expired or revoked token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"The token lacks the `orders:read` scope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded (600 requests per token per hour; 3000 for a token with an order or ticket scope).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}}}}},"/api/v1/orders/{orderId}":{"get":{"summary":"Get an order","description":"One order with its lines, refunds and ticket ids. Requires the `orders:read` scope (Orders, order lines and refunds, including the buyer's name, e-mail and phone).","operationId":"getOrder","security":[{"bearerAuth":[]}],"tags":["Orders"],"parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"The order id."}],"responses":{"200":{"description":"The order.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"eventId":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"eventName":{"type":["string","null"]},"status":{"type":"string","enum":["pending","reserved","paid","free","guestlist","imported","swapped","failed","expired","cancelled","refunding","refunded","partial_refund","chargeback"]},"paid":{"type":"boolean"},"purchasedAt":{"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))$"},{"type":"null"}]},"locale":{"type":"string"},"ticketCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totals":{"type":"object","properties":{"totalCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ticketsCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"serviceCostsCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"productsCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"donationCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"shippingCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"paymentCostsCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"discountCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["totalCents","ticketsCents","serviceCostsCents","productsCents","donationCents","shippingCents","paymentCostsCents","discountCents"],"additionalProperties":false},"discountCode":{"type":["string","null"]},"channel":{"type":"string","enum":["online","door","guestlist","internal"]},"customer":{"anyOf":[{"type":"object","properties":{"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"address":{"type":["string","null"]},"zipcode":{"type":["string","null"]},"city":{"type":["string","null"]},"country":{"type":["string","null"]}},"required":["firstName","lastName","email","phone","address","zipcode","city","country"],"additionalProperties":false},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"kind":{"type":"string"},"ticketTypeId":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"productId":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"name":{"type":"string"},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unitPriceCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totalCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"serviceCostsCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"discountCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","kind","ticketTypeId","productId","name","quantity","unitPriceCents","totalCents","serviceCostsCents","discountCents"],"additionalProperties":false}},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"amountCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"confirmed":{"type":"boolean"},"createdAt":{"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))$"},{"type":"null"}]},"confirmedAt":{"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))$"},{"type":"null"}]}},"required":["id","amountCents","confirmed","createdAt","confirmedAt"],"additionalProperties":false}},"ticketIds":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["id","eventId","eventName","status","paid","purchasedAt","locale","ticketCount","totals","discountCode","channel","customer","lines","refunds","ticketIds"],"additionalProperties":false}}}},"400":{"description":"Malformed path or query parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"401":{"description":"Missing, invalid, expired or revoked token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"The token lacks the `orders:read` scope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"404":{"description":"No such order in this shop.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded (600 requests per token per hour; 3000 for a token with an order or ticket scope).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}}}}},"/api/v1/events/{eventId}/tickets":{"get":{"summary":"List an event's tickets","description":"Every ticket of the event by id, with status, holder, seat and check-in. Archived and hidden events of the shop are included. The QR code is never returned. Requires the `tickets:read` scope (Tickets per event: status, holder name, seat and check-in state. Never the QR code).","operationId":"listEventTickets","security":[{"bearerAuth":[]}],"tags":["Tickets"],"parameters":[{"name":"eventId","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"The event id."},{"name":"ticketTypeId","in":"query","required":false,"schema":{"type":"integer","minimum":1},"description":"Only tickets of this tier."},{"name":"checkedIn","in":"query","required":false,"schema":{"type":"boolean"},"description":"`true` for tickets with a valid scan, `false` for the rest."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"description":"Page size (1–500, default 100)."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0},"description":"Page offset (default 0). Page on until `hasMore` is false."}],"responses":{"200":{"description":"A page of tickets.","content":{"application/json":{"schema":{"type":"object","properties":{"tickets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"orderId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"eventId":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"ticketTypeId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ticketTypeName":{"type":["string","null"]},"status":{"type":"string","enum":["valid","invalidated","refunded","swapped","unpaid"]},"holderName":{"type":["string","null"]},"seat":{"anyOf":[{"type":"object","properties":{"section":{"type":["string","null"]},"row":{"type":"string"},"seat":{"type":"string"}},"required":["section","row","seat"],"additionalProperties":false},{"type":"null"}]},"checkedIn":{"type":"boolean"},"firstCheckInAt":{"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))$"},{"type":"null"}]},"createdAt":{"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))$"},{"type":"null"}]}},"required":["id","orderId","eventId","ticketTypeId","ticketTypeName","status","holderName","seat","checkedIn","firstCheckInAt","createdAt"],"additionalProperties":false}},"hasMore":{"type":"boolean"},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"offset":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["tickets","hasMore","limit","offset"],"additionalProperties":false}}}},"400":{"description":"Malformed path or query parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"401":{"description":"Missing, invalid, expired or revoked token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"The token lacks the `tickets:read` scope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"404":{"description":"No such event in this shop.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded (600 requests per token per hour; 3000 for a token with an order or ticket scope).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}}}}},"/api/v1/tickets/{ticketId}":{"get":{"summary":"Get a ticket","description":"One ticket. The QR code is never returned. Requires the `tickets:read` scope (Tickets per event: status, holder name, seat and check-in state. Never the QR code).","operationId":"getTicket","security":[{"bearerAuth":[]}],"tags":["Tickets"],"parameters":[{"name":"ticketId","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"The ticket id."}],"responses":{"200":{"description":"The ticket.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"orderId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"eventId":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"ticketTypeId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ticketTypeName":{"type":["string","null"]},"status":{"type":"string","enum":["valid","invalidated","refunded","swapped","unpaid"]},"holderName":{"type":["string","null"]},"seat":{"anyOf":[{"type":"object","properties":{"section":{"type":["string","null"]},"row":{"type":"string"},"seat":{"type":"string"}},"required":["section","row","seat"],"additionalProperties":false},{"type":"null"}]},"checkedIn":{"type":"boolean"},"firstCheckInAt":{"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))$"},{"type":"null"}]},"createdAt":{"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))$"},{"type":"null"}]}},"required":["id","orderId","eventId","ticketTypeId","ticketTypeName","status","holderName","seat","checkedIn","firstCheckInAt","createdAt"],"additionalProperties":false}}}},"400":{"description":"Malformed path or query parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"401":{"description":"Missing, invalid, expired or revoked token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"The token lacks the `tickets:read` scope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"404":{"description":"No such ticket in this shop.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded (600 requests per token per hour; 3000 for a token with an order or ticket scope).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}}}}},"/api/v1/events/{eventId}/checkins":{"get":{"summary":"Get an event's check-ins","description":"The door counters (distinct tickets checked in, tickets the door admits, per time slot) plus a page of scans, oldest first. Refused scans only with `includeRefused=true`. Who scanned is never returned. Requires the `checkins:read` scope (Door scans and the checked-in counters per event and time slot).","operationId":"listEventCheckins","security":[{"bearerAuth":[]}],"tags":["Check-ins"],"parameters":[{"name":"eventId","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"The event id."},{"name":"timeSlotId","in":"query","required":false,"schema":{"type":"integer","minimum":1},"description":"Only scans for this time slot."},{"name":"since","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Scanned at or after this moment (for incremental polling)."},{"name":"includeRefused","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"Also list scans the door refused."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"description":"Page size (1–500, default 100)."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0},"description":"Page offset (default 0). Page on until `hasMore` is false."}],"responses":{"200":{"description":"Counters and a page of scans.","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"type":"object","properties":{"checkedIn":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"admissible":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"timeSlots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"name":{"type":["string","null"]},"checkedIn":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","name","checkedIn"],"additionalProperties":false}}},"required":["checkedIn","admissible","timeSlots"],"additionalProperties":false},"checkins":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ticketId":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"ticketTypeId":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"timeSlotId":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"valid":{"type":"boolean"},"manual":{"type":"boolean"},"scannedAt":{"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))$"},{"type":"null"}]}},"required":["id","ticketId","ticketTypeId","timeSlotId","valid","manual","scannedAt"],"additionalProperties":false}},"hasMore":{"type":"boolean"},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"offset":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["summary","checkins","hasMore","limit","offset"],"additionalProperties":false}}}},"400":{"description":"Malformed path or query parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"401":{"description":"Missing, invalid, expired or revoked token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"The token lacks the `checkins:read` scope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"404":{"description":"No such event in this shop.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded (600 requests per token per hour; 3000 for a token with an order or ticket scope).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}}}}},"/api/v1/events/{eventId}/stats":{"get":{"summary":"Get an event's sales statistics","description":"Tickets per bucket (sold, guest list, refunded, swapped, charged back), revenue, paid orders and attendance, for the event and per tier — the numbers the dashboard shows. Requires the `stats:read` scope (Tickets sold and revenue per event and per day).","operationId":"getEventStats","security":[{"bearerAuth":[]}],"tags":["Statistics"],"parameters":[{"name":"eventId","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"The event id."}],"responses":{"200":{"description":"The event's statistics.","content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"eventName":{"type":"string"},"tickets":{"type":"object","properties":{"sold":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"guestlist":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"refunded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"swapped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"chargeback":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"checkedIn":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["sold","guestlist","refunded","swapped","chargeback","checkedIn"],"additionalProperties":false},"revenue":{"type":"object","properties":{"ticketsCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"serviceCostsCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"goodsCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"refundedCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["ticketsCents","serviceCostsCents","goodsCents","refundedCents"],"additionalProperties":false},"orders":{"type":"object","properties":{"paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["paid"],"additionalProperties":false},"tiers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"name":{"type":"string"},"sold":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"guestlist":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"revenueCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"checkedIn":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","name","sold","guestlist","revenueCents","checkedIn"],"additionalProperties":false}}},"required":["eventId","eventName","tickets","revenue","orders","tiers"],"additionalProperties":false}}}},"400":{"description":"Malformed path or query parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"401":{"description":"Missing, invalid, expired or revoked token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"The token lacks the `stats:read` scope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"404":{"description":"No such event in this shop.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded (600 requests per token per hour; 3000 for a token with an order or ticket scope).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}}}}},"/api/v1/stats/sales":{"get":{"summary":"Get sales per day","description":"Orders, tickets and revenue per Europe/Amsterdam day, shop-wide or for one event. Paid orders only, without the guest list and swaps. Days without sales are left out. At most 366 days per request. Requires the `stats:read` scope (Tickets sold and revenue per event and per day).","operationId":"getSalesByDay","security":[{"bearerAuth":[]}],"tags":["Statistics"],"parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"First day (YYYY-MM-DD). Default: 29 days before `to`."},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"Last day, inclusive (YYYY-MM-DD). Default: today."},{"name":"eventId","in":"query","required":false,"schema":{"type":"integer","minimum":1},"description":"Only this event's sales."}],"responses":{"200":{"description":"Sales per day.","content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"eventId":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"days":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"orders":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tickets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"revenueCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["date","orders","tickets","revenueCents"],"additionalProperties":false}}},"required":["from","to","eventId","days"],"additionalProperties":false}}}},"400":{"description":"Malformed path or query parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"401":{"description":"Missing, invalid, expired or revoked token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"The token lacks the `stats:read` scope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"404":{"description":"No such event in this shop.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded (600 requests per token per hour; 3000 for a token with an order or ticket scope).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}}}}},"/api/v1/events/{eventId}/guestlist":{"post":{"summary":"Add a guest to the guest list","description":"Creates a free guest-list order with tickets, exactly like the dashboard's Gastenlijst tab. With an e-mail address the guest gets the ticket mail. With `countsAsSold` true (the default) the places count against capacity and a full event answers 409; false leaves capacity alone. Rate limited to 500 guests per shop per hour. Requires the `guestlist:write` scope (Add guests to an event's guest list (free tickets, mailed when an address is given)).","operationId":"addGuest","security":[{"bearerAuth":[]}],"tags":["Writes"],"parameters":[{"name":"eventId","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"The event id."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":1,"maxLength":255},"description":"Any unique string (a UUID). A retry with the same key within 24 hours gets the first answer back (header `Idempotent-Replayed: true`) instead of writing twice; the same key on a different request is a 409."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":255},"lastName":{"default":"","type":"string","maxLength":255},"email":{"anyOf":[{"type":"string","const":""},{"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,}$"}]},"tickets":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"ticketTypeId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"count":{"type":"integer","minimum":1,"maximum":250}},"required":["ticketTypeId","count"]}},"countsAsSold":{"default":true,"type":"boolean"}},"required":["firstName","tickets"],"additionalProperties":false}}}},"responses":{"201":{"description":"The guest-list order.","content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"eventId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ticketCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ticketIds":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"emailQueued":{"type":"boolean","description":"true when the guest gets the ticket mail."}},"required":["orderId","eventId","ticketCount","ticketIds","emailQueued"],"additionalProperties":false}}}},"400":{"description":"Malformed body, unknown field, or an id that is not this shop's.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"401":{"description":"Missing, invalid, expired or revoked token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"The token lacks the `guestlist:write` scope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"404":{"description":"No such event in this shop.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"409":{"description":"Not enough places. Also: the Idempotency-Key was used for another request or is still running.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded (600 requests per token per hour; 3000 for a token with an order or ticket scope).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"503":{"description":"Maintenance: writes are paused. Retry after the `Retry-After` header.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}}}}},"/api/v1/orders/{orderId}/resend":{"post":{"summary":"Resend an order's ticket mail","description":"Sends the ordinary ticket mail (a link to the tickets) to the order's own address again, with an optional note under the heading. Only paid orders with a real address. The address cannot be changed here. Rate limited to 200 mails per shop per hour. Requires the `orders:write` scope (Resend a paid order's ticket e-mail to the address on the order).","operationId":"resendTicketMail","security":[{"bearerAuth":[]}],"tags":["Writes"],"parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"The order id."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":1,"maxLength":255},"description":"Any unique string (a UUID). A retry with the same key within 24 hours gets the first answer back (header `Idempotent-Replayed: true`) instead of writing twice; the same key on a different request is a 409."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","maxLength":1000}},"additionalProperties":false}}}},"responses":{"200":{"description":"The mail was accepted.","content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sent":{"type":"boolean","const":true}},"required":["orderId","sent"],"additionalProperties":false}}}},"400":{"description":"Malformed body, unknown field, or an id that is not this shop's.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"401":{"description":"Missing, invalid, expired or revoked token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"The token lacks the `orders:write` scope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"404":{"description":"No such order in this shop.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"409":{"description":"The order is not paid, has no address, or the mail provider refused. Also: the Idempotency-Key was used for another request or is still running.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded (600 requests per token per hour; 3000 for a token with an order or ticket scope).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"503":{"description":"Maintenance: writes are paused. Retry after the `Retry-After` header.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}}}}},"/api/v1/discounts":{"get":{"summary":"List discount codes","description":"The shop's discount codes, newest first, with how often each was used. Personal campaign codes are left out. Requires the `discounts:write` scope (List, create, activate and deactivate discount codes).","operationId":"listDiscounts","security":[{"bearerAuth":[]}],"tags":["Writes"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Page size (1–100, default 50)."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0},"description":"Page offset (default 0). Page on until `hasMore` is false."}],"responses":{"200":{"description":"A page of discount codes.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["percent","fixed_cents","free_product"]},"percent":{"type":["number","null"]},"amountCents":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"freeTicketTypeId":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"freeProductId":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"appliesTo":{"type":"string","enum":["order_total","scoped_lines"]},"minOrderCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"maxUses":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"0 = unlimited."},"used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"validFrom":{"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))$"},{"type":"null"}]},"validUntil":{"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))$"},{"type":"null"}]},"active":{"type":"boolean"},"scope":{"type":"object","properties":{"eventIds":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"ticketTypeIds":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"productIds":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["eventIds","ticketTypeIds","productIds"],"additionalProperties":false},"createdAt":{"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))$"}},"required":["id","code","name","kind","percent","amountCents","freeTicketTypeId","freeProductId","appliesTo","minOrderCents","maxUses","used","validFrom","validUntil","active","scope","createdAt"],"additionalProperties":false}},"hasMore":{"type":"boolean"},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"offset":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["data","hasMore","limit","offset"],"additionalProperties":false}}}},"400":{"description":"Malformed path or query parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"401":{"description":"Missing, invalid, expired or revoked token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"The token lacks the `discounts:write` scope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded (600 requests per token per hour; 3000 for a token with an order or ticket scope).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}}}},"post":{"summary":"Create a discount code","description":"A percentage, a fixed amount or one free ticket/product. No scope ids = the whole shop. Codes are unique per shop (409 on a duplicate). Requires the `discounts:write` scope (List, create, activate and deactivate discount codes).","operationId":"createDiscount","security":[{"bearerAuth":[]}],"tags":["Writes"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":1,"maxLength":255},"description":"Any unique string (a UUID). A retry with the same key within 24 hours gets the first answer back (header `Idempotent-Replayed: true`) instead of writing twice; the same key on a different request is a 409."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Za-z0-9_-]{3,50}$"},"name":{"type":"string","maxLength":255},"kind":{"type":"string","enum":["percent","fixed_cents","free_product"]},"percent":{"type":"number","exclusiveMinimum":0,"maximum":100},"amountCents":{"type":"integer","minimum":1,"maximum":100000000},"freeTicketTypeId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"freeProductId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"appliesTo":{"default":"order_total","type":"string","enum":["order_total","scoped_lines"]},"minOrderCents":{"default":0,"type":"integer","minimum":0,"maximum":100000000},"maxUses":{"default":0,"type":"integer","minimum":0,"maximum":1000000},"validFrom":{"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)))$"},"validUntil":{"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)))$"},"scope":{"type":"object","properties":{"eventIds":{"maxItems":200,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"ticketTypeIds":{"maxItems":200,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"productIds":{"maxItems":200,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}},"additionalProperties":false}},"required":["code","kind"],"additionalProperties":false}}}},"responses":{"201":{"description":"The new discount code.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["percent","fixed_cents","free_product"]},"percent":{"type":["number","null"]},"amountCents":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"freeTicketTypeId":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"freeProductId":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"appliesTo":{"type":"string","enum":["order_total","scoped_lines"]},"minOrderCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"maxUses":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"0 = unlimited."},"used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"validFrom":{"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))$"},{"type":"null"}]},"validUntil":{"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))$"},{"type":"null"}]},"active":{"type":"boolean"},"scope":{"type":"object","properties":{"eventIds":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"ticketTypeIds":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"productIds":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["eventIds","ticketTypeIds","productIds"],"additionalProperties":false},"createdAt":{"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))$"}},"required":["id","code","name","kind","percent","amountCents","freeTicketTypeId","freeProductId","appliesTo","minOrderCents","maxUses","used","validFrom","validUntil","active","scope","createdAt"],"additionalProperties":false}}}},"400":{"description":"Malformed body, unknown field, or an id that is not this shop's.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"401":{"description":"Missing, invalid, expired or revoked token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"The token lacks the `discounts:write` scope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"409":{"description":"A code with this name already exists. Also: the Idempotency-Key was used for another request or is still running.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded (600 requests per token per hour; 3000 for a token with an order or ticket scope).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"503":{"description":"Maintenance: writes are paused. Retry after the `Retry-After` header.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}}}}},"/api/v1/discounts/{discountId}":{"patch":{"summary":"Switch a discount code on or off","description":"Only `active` can be changed; other changes are made in the dashboard. Requires the `discounts:write` scope (List, create, activate and deactivate discount codes).","operationId":"setDiscountActive","security":[{"bearerAuth":[]}],"tags":["Writes"],"parameters":[{"name":"discountId","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"The discount id."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":1,"maxLength":255},"description":"Any unique string (a UUID). A retry with the same key within 24 hours gets the first answer back (header `Idempotent-Replayed: true`) instead of writing twice; the same key on a different request is a 409."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean"}},"required":["active"],"additionalProperties":false}}}},"responses":{"200":{"description":"The discount code.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["percent","fixed_cents","free_product"]},"percent":{"type":["number","null"]},"amountCents":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"freeTicketTypeId":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"freeProductId":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"appliesTo":{"type":"string","enum":["order_total","scoped_lines"]},"minOrderCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"maxUses":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"0 = unlimited."},"used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"validFrom":{"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))$"},{"type":"null"}]},"validUntil":{"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))$"},{"type":"null"}]},"active":{"type":"boolean"},"scope":{"type":"object","properties":{"eventIds":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"ticketTypeIds":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"productIds":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["eventIds","ticketTypeIds","productIds"],"additionalProperties":false},"createdAt":{"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))$"}},"required":["id","code","name","kind","percent","amountCents","freeTicketTypeId","freeProductId","appliesTo","minOrderCents","maxUses","used","validFrom","validUntil","active","scope","createdAt"],"additionalProperties":false}}}},"400":{"description":"Malformed body, unknown field, or an id that is not this shop's.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"401":{"description":"Missing, invalid, expired or revoked token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"The token lacks the `discounts:write` scope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"404":{"description":"No such discount code in this shop.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"409":{"description":"Also: the Idempotency-Key was used for another request or is still running.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded (600 requests per token per hour; 3000 for a token with an order or ticket scope).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"503":{"description":"Maintenance: writes are paused. Retry after the `Retry-After` header.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","service_unavailable"]},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}}}}}},"webhooks":{"order.paid":{"post":{"summary":"An order was paid (or completed for free) and its tickets were issued.","description":"Sent as a signed POST to your endpoint. Verify `X-CaptainTicket-Signature` over the raw body, answer any 2xx within 10 seconds; anything else is retried for up to 24 hours. `X-CaptainTicket-Delivery` is the event id, for deduplication.","operationId":"webhook_order_paid","tags":["Webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"`evt_…`: the same on every retry and every endpoint."},"type":{"type":"string","const":"order.paid"},"createdAt":{"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))$"},"shopId":{"type":"string"},"data":{"type":"object","properties":{"orderId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"eventId":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Null for an order from the shop's winkel only."},"status":{"type":"string","enum":["paid","free"]},"totalCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ticketCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["orderId","eventId","status","totalCents","ticketCount"],"additionalProperties":false}},"required":["id","type","createdAt","shopId","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Received."}}}},"order.refunded":{"post":{"summary":"A refund on an order was confirmed by the payment provider, full or partial.","description":"Sent as a signed POST to your endpoint. Verify `X-CaptainTicket-Signature` over the raw body, answer any 2xx within 10 seconds; anything else is retried for up to 24 hours. `X-CaptainTicket-Delivery` is the event id, for deduplication.","operationId":"webhook_order_refunded","tags":["Webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"`evt_…`: the same on every retry and every endpoint."},"type":{"type":"string","const":"order.refunded"},"createdAt":{"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))$"},"shopId":{"type":"string"},"data":{"type":"object","properties":{"orderId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"refundId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"amountCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"fullyRefunded":{"type":"boolean"}},"required":["orderId","refundId","amountCents","fullyRefunded"],"additionalProperties":false}},"required":["id","type","createdAt","shopId","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Received."}}}},"order.chargeback":{"post":{"summary":"The buyer reversed the payment through their bank (chargeback).","description":"Sent as a signed POST to your endpoint. Verify `X-CaptainTicket-Signature` over the raw body, answer any 2xx within 10 seconds; anything else is retried for up to 24 hours. `X-CaptainTicket-Delivery` is the event id, for deduplication.","operationId":"webhook_order_chargeback","tags":["Webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"`evt_…`: the same on every retry and every endpoint."},"type":{"type":"string","const":"order.chargeback"},"createdAt":{"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))$"},"shopId":{"type":"string"},"data":{"type":"object","properties":{"orderId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totalCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["orderId","totalCents"],"additionalProperties":false}},"required":["id","type","createdAt","shopId","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Received."}}}},"order.cancelled":{"post":{"summary":"A guest-list order was removed, or an order was cancelled by CaptainTicket support.","description":"Sent as a signed POST to your endpoint. Verify `X-CaptainTicket-Signature` over the raw body, answer any 2xx within 10 seconds; anything else is retried for up to 24 hours. `X-CaptainTicket-Delivery` is the event id, for deduplication.","operationId":"webhook_order_cancelled","tags":["Webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"`evt_…`: the same on every retry and every endpoint."},"type":{"type":"string","const":"order.cancelled"},"createdAt":{"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))$"},"shopId":{"type":"string"},"data":{"type":"object","properties":{"orderId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"eventId":{"description":"Set for a removed guest-list order.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"previousStatus":{"type":"string"}},"required":["orderId","previousStatus"],"additionalProperties":false}},"required":["id","type","createdAt","shopId","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Received."}}}},"ticket.checked_in":{"post":{"summary":"A ticket was admitted at the door, by camera or manual check-in.","description":"Sent as a signed POST to your endpoint. Verify `X-CaptainTicket-Signature` over the raw body, answer any 2xx within 10 seconds; anything else is retried for up to 24 hours. `X-CaptainTicket-Delivery` is the event id, for deduplication.","operationId":"webhook_ticket_checked_in","tags":["Webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"`evt_…`: the same on every retry and every endpoint."},"type":{"type":"string","const":"ticket.checked_in"},"createdAt":{"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))$"},"shopId":{"type":"string"},"data":{"type":"object","properties":{"ticketId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"eventId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ticketTypeId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"timeSlotId":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"manual":{"type":"boolean"},"scannedAt":{"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))$"}},"required":["ticketId","eventId","ticketTypeId","timeSlotId","manual","scannedAt"],"additionalProperties":false}},"required":["id","type","createdAt","shopId","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Received."}}}},"ticket.swapped":{"post":{"summary":"A ticket was resold through TicketSwap and re-issued to the new holder.","description":"Sent as a signed POST to your endpoint. Verify `X-CaptainTicket-Signature` over the raw body, answer any 2xx within 10 seconds; anything else is retried for up to 24 hours. `X-CaptainTicket-Delivery` is the event id, for deduplication.","operationId":"webhook_ticket_swapped","tags":["Webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"`evt_…`: the same on every retry and every endpoint."},"type":{"type":"string","const":"ticket.swapped"},"createdAt":{"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))$"},"shopId":{"type":"string"},"data":{"type":"object","properties":{"swapId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"eventId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"oldTicketId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"oldOrderId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"newTicketId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"newOrderId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["swapId","eventId","oldTicketId","oldOrderId","newTicketId","newOrderId"],"additionalProperties":false}},"required":["id","type","createdAt","shopId","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Received."}}}},"event.sold_out":{"post":{"summary":"Every ticket of an event is sold.","description":"Sent as a signed POST to your endpoint. Verify `X-CaptainTicket-Signature` over the raw body, answer any 2xx within 10 seconds; anything else is retried for up to 24 hours. `X-CaptainTicket-Delivery` is the event id, for deduplication.","operationId":"webhook_event_sold_out","tags":["Webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"`evt_…`: the same on every retry and every endpoint."},"type":{"type":"string","const":"event.sold_out"},"createdAt":{"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))$"},"shopId":{"type":"string"},"data":{"type":"object","properties":{"eventId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["eventId"],"additionalProperties":false}},"required":["id","type","createdAt","shopId","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Received."}}}},"ping":{"post":{"summary":"Test message","description":"Sent as a signed POST to your endpoint. Verify `X-CaptainTicket-Signature` over the raw body, answer any 2xx within 10 seconds; anything else is retried for up to 24 hours. `X-CaptainTicket-Delivery` is the event id, for deduplication.","operationId":"webhook_ping","tags":["Webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"`evt_…`: the same on every retry and every endpoint."},"type":{"type":"string","const":"ping"},"createdAt":{"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))$"},"shopId":{"type":"string"},"data":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["id","type","createdAt","shopId","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Received."}}}}}}