{
  "openapi": "3.1.0",
  "paths": {
    "/v1/organization": {
      "get": {
        "description": "Who you are talking as: the organization the key belongs to, and what the key may do.\n\n**Scope:** `read`.",
        "operationId": "getOrganization",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhoAmI"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed (a bad cursor, a missing Idempotency-Key).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is unknown or revoked.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found — or not this key’s organization or event.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The resource is in a state that does not allow this.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The body or query failed validation; `errors` names each field.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key; wait `Retry-After` seconds.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "The organization and the key",
        "tags": [
          "Organization"
        ],
        "x-lupeno-scopes": [
          "read"
        ]
      }
    },
    "/v1/events": {
      "get": {
        "description": "Newest first. An event key lists its one event; a test key, events in test mode.\n\n**Scope:** `read`.",
        "operationId": "listEvents",
        "parameters": [
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "state",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "published",
                "archived",
                "cancelled"
              ]
            }
          },
          {
            "name": "endsAfter",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventPage"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed (a bad cursor, a missing Idempotency-Key).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is unknown or revoked.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found — or not this key’s organization or event.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The resource is in a state that does not allow this.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The body or query failed validation; `errors` names each field.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key; wait `Retry-After` seconds.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List events",
        "tags": [
          "Events"
        ],
        "x-lupeno-scopes": [
          "read"
        ]
      }
    },
    "/v1/events/{eventId}": {
      "get": {
        "description": "**Scope:** `read`.",
        "operationId": "getEvent",
        "parameters": [
          {
            "name": "eventId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Event"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed (a bad cursor, a missing Idempotency-Key).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is unknown or revoked.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found — or not this key’s organization or event.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The resource is in a state that does not allow this.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The body or query failed validation; `errors` names each field.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key; wait `Retry-After` seconds.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Get an event",
        "tags": [
          "Events"
        ],
        "x-lupeno-scopes": [
          "read"
        ]
      }
    },
    "/v1/events/{eventId}/gallery": {
      "get": {
        "description": "The photos and YouTube/Vimeo videos the event page shows, in the organizer’s order (at most 24); an item Lupeno took down is never listed. Pictures are served from the event’s own origin; a video’s `playerUrl` is the privacy-friendly player the page loads on a press (1.10.0).\n\n**Scope:** `read`.",
        "operationId": "listGalleryItems",
        "parameters": [
          {
            "name": "eventId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GalleryItemList"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed (a bad cursor, a missing Idempotency-Key).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is unknown or revoked.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found — or not this key’s organization or event.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The resource is in a state that does not allow this.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The body or query failed validation; `errors` names each field.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key; wait `Retry-After` seconds.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List an event’s gallery",
        "tags": [
          "Events"
        ],
        "x-lupeno-scopes": [
          "read"
        ]
      }
    },
    "/v1/events/{eventId}/tiers": {
      "get": {
        "description": "`availability` is what a buyer sees right now, after every stop that applies — the same answer the event page and checkout give.\n\n**Scope:** `read`.",
        "operationId": "listTiers",
        "parameters": [
          {
            "name": "eventId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TierList"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed (a bad cursor, a missing Idempotency-Key).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is unknown or revoked.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found — or not this key’s organization or event.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The resource is in a state that does not allow this.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The body or query failed validation; `errors` names each field.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key; wait `Retry-After` seconds.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List an event’s ticket tiers",
        "tags": [
          "Events"
        ],
        "x-lupeno-scopes": [
          "read"
        ]
      }
    },
    "/v1/events/{eventId}/orders": {
      "get": {
        "description": "Newest first, with every bundle order that sold one of the event’s ticket types (1.12.0) — the same order, by its `id`, on each included event: sum an event’s own `items` (their `eventId`), never `totalMinor`, for what it took. Buyer e-mails are masked unless the key has the `pii` scope.\n\n**Scope:** `read`.",
        "operationId": "listOrders",
        "parameters": [
          {
            "name": "eventId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "state",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "pending_approval",
                "approved",
                "declined",
                "pending_payment",
                "overdue",
                "paid",
                "partially_refunded",
                "refunded",
                "cancelled",
                "expired"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderPage"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed (a bad cursor, a missing Idempotency-Key).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is unknown or revoked.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found — or not this key’s organization or event.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The resource is in a state that does not allow this.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The body or query failed validation; `errors` names each field.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key; wait `Retry-After` seconds.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List an event’s orders",
        "tags": [
          "Orders"
        ],
        "x-lupeno-scopes": [
          "read"
        ]
      },
      "post": {
        "description": "The organizer’s own channel (no buyer pays through the API): stock is counted and the order numbered as at checkout, the buyer is mailed as a buyer would be. A test-mode event takes orders from a test key only, at most 50 test tickets per event (`409 order.test_limit_reached`). Each order mails one person and counts against the organization’s daily reach — rolling 24 hours, shared with its own attendee messages and comps. Past it: `409 bulk.over_daily_cap` with `context: { limit, remaining, resetsAt }`. A guest list belongs in the portal’s bulk comps.\n\n**Scope:** `write` (which includes `read`).\n\n**Idempotent:** send an `Idempotency-Key`; a retry with the same key and body answers the first result.",
        "operationId": "createOrder",
        "parameters": [
          {
            "name": "eventId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "description": "16–128 characters of A–Z, a–z, 0–9, _ and -, chosen per intended create; reuse it to retry.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrder"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed (a bad cursor, a missing Idempotency-Key).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is unknown or revoked.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found — or not this key’s organization or event.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The resource is in a state that does not allow this.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The body or query failed validation; `errors` names each field.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key; wait `Retry-After` seconds.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Enter an order: comp, paid outside Lupeno, or a proforma",
        "tags": [
          "Orders"
        ],
        "x-lupeno-scopes": [
          "write"
        ]
      }
    },
    "/v1/events/{eventId}/tickets": {
      "get": {
        "description": "**Scope:** `read`.",
        "operationId": "listTickets",
        "parameters": [
          {
            "name": "eventId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "orderId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "valid",
                "voided"
              ]
            }
          },
          {
            "name": "checkedIn",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TicketPage"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed (a bad cursor, a missing Idempotency-Key).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is unknown or revoked.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found — or not this key’s organization or event.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The resource is in a state that does not allow this.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The body or query failed validation; `errors` names each field.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key; wait `Retry-After` seconds.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List an event’s tickets",
        "tags": [
          "Tickets"
        ],
        "x-lupeno-scopes": [
          "read"
        ]
      }
    },
    "/v1/events/{eventId}/attendees": {
      "get": {
        "description": "One row per admission — a valid ticket of a paid order — under its holder’s name or else the buyer’s. E-mails are masked unless the key has the `pii` scope.\n\n**Scope:** `read`.",
        "operationId": "listAttendees",
        "parameters": [
          {
            "name": "eventId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttendeePage"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed (a bad cursor, a missing Idempotency-Key).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is unknown or revoked.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found — or not this key’s organization or event.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The resource is in a state that does not allow this.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The body or query failed validation; `errors` names each field.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key; wait `Retry-After` seconds.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List an event’s attendees",
        "tags": [
          "Attendees"
        ],
        "x-lupeno-scopes": [
          "read"
        ]
      }
    },
    "/v1/orders/{orderId}": {
      "get": {
        "description": "**Scope:** `read`.",
        "operationId": "getOrder",
        "parameters": [
          {
            "name": "orderId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed (a bad cursor, a missing Idempotency-Key).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is unknown or revoked.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found — or not this key’s organization or event.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The resource is in a state that does not allow this.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The body or query failed validation; `errors` names each field.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key; wait `Retry-After` seconds.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Get an order",
        "tags": [
          "Orders"
        ],
        "x-lupeno-scopes": [
          "read"
        ]
      }
    },
    "/v1/orders/{orderId}/cancel": {
      "post": {
        "description": "Its tickets go back on sale. A paid order is refunded from the Orders tab, never cancelled. A bundle order is cancelled by its home event’s key or the organization’s.\n\n**Scope:** `write` (which includes `read`).",
        "operationId": "cancelOrder",
        "parameters": [
          {
            "name": "orderId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed (a bad cursor, a missing Idempotency-Key).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is unknown or revoked.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found — or not this key’s organization or event.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The resource is in a state that does not allow this.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The body or query failed validation; `errors` names each field.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key; wait `Retry-After` seconds.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Cancel an unpaid order",
        "tags": [
          "Orders"
        ],
        "x-lupeno-scopes": [
          "write"
        ]
      }
    },
    "/v1/tickets/{ticketId}": {
      "get": {
        "description": "**Scope:** `read`.",
        "operationId": "getTicket",
        "parameters": [
          {
            "name": "ticketId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ticket"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed (a bad cursor, a missing Idempotency-Key).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is unknown or revoked.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found — or not this key’s organization or event.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The resource is in a state that does not allow this.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The body or query failed validation; `errors` names each field.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key; wait `Retry-After` seconds.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Get a ticket",
        "tags": [
          "Tickets"
        ],
        "x-lupeno-scopes": [
          "read"
        ]
      }
    },
    "/v1/tickets/{ticketId}/assign": {
      "post": {
        "description": "A valid ticket of a paid order gets its holder’s name and e-mail, and the holder gets the ticket by mail; it admits under that name from then on. Unassigned tickets admit under the buyer’s name. Naming someone else on a ticket that already has a holder hands it on: the ticket keeps its id and gets a new QR — the old one stops admitting — and `ticket.transferred` is sent instead of `ticket.assigned`. The same name with a different e-mail is a correction and keeps the code. A ticket that came in, was voided, or whose event is over or cancelled is refused (`ticket.not_assignable`). Each holder named is mailed, and counts against the organization’s daily reach like an order entered by hand: past it, `bulk.over_daily_cap`. A forgotten order’s ticket takes no new holder (`order.forgotten`).\n\n**Scope:** `write` (which includes `read`).",
        "operationId": "assignTicket",
        "parameters": [
          {
            "name": "ticketId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignTicket"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ticket"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed (a bad cursor, a missing Idempotency-Key).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is unknown or revoked.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found — or not this key’s organization or event.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The resource is in a state that does not allow this.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The body or query failed validation; `errors` names each field.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key; wait `Retry-After` seconds.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Name who a ticket is for",
        "tags": [
          "Tickets"
        ],
        "x-lupeno-scopes": [
          "write"
        ]
      }
    },
    "/v1/events/{eventId}/discount-codes": {
      "get": {
        "description": "**Scope:** `read`.",
        "operationId": "listDiscountCodes",
        "parameters": [
          {
            "name": "eventId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscountCodePage"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed (a bad cursor, a missing Idempotency-Key).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is unknown or revoked.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found — or not this key’s organization or event.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The resource is in a state that does not allow this.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The body or query failed validation; `errors` names each field.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key; wait `Retry-After` seconds.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List an event’s discount codes",
        "tags": [
          "Discount codes"
        ],
        "x-lupeno-scopes": [
          "read"
        ]
      },
      "post": {
        "description": "One code you name (A–Z, 0–9, `_`, `-`; spaces are dropped, letters upper-cased). A code the event already has is refused.\n\n**Scope:** `write` (which includes `read`).\n\n**Idempotent:** send an `Idempotency-Key`; a retry with the same key and body answers the first result.",
        "operationId": "createDiscountCode",
        "parameters": [
          {
            "name": "eventId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "description": "16–128 characters of A–Z, a–z, 0–9, _ and -, chosen per intended create; reuse it to retry.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDiscountCode"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscountCode"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed (a bad cursor, a missing Idempotency-Key).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is unknown or revoked.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found — or not this key’s organization or event.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The resource is in a state that does not allow this.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The body or query failed validation; `errors` names each field.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key; wait `Retry-After` seconds.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Create a discount code",
        "tags": [
          "Discount codes"
        ],
        "x-lupeno-scopes": [
          "write"
        ]
      }
    },
    "/v1/events/{eventId}/check-ins": {
      "get": {
        "description": "Checked-in tickets, the latest entry first.\n\n**Scope:** `read`.",
        "operationId": "listCheckins",
        "parameters": [
          {
            "name": "eventId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckinPage"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed (a bad cursor, a missing Idempotency-Key).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is unknown or revoked.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found — or not this key’s organization or event.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The resource is in a state that does not allow this.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The body or query failed validation; `errors` names each field.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key; wait `Retry-After` seconds.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List who came in",
        "tags": [
          "Check-in"
        ],
        "x-lupeno-scopes": [
          "read"
        ]
      },
      "post": {
        "description": "By ticket id, or by the string its QR code holds as scanned (verified before anything is looked up). A ticket already in answers unchanged, with the time it first came in.\n\n**Scope:** `checkin` (which includes `read`).",
        "operationId": "checkIn",
        "parameters": [
          {
            "name": "eventId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckinRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ticket"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed (a bad cursor, a missing Idempotency-Key).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is unknown or revoked.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found — or not this key’s organization or event.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The resource is in a state that does not allow this.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The body or query failed validation; `errors` names each field.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key; wait `Retry-After` seconds.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Check a ticket in",
        "tags": [
          "Check-in"
        ],
        "x-lupeno-scopes": [
          "checkin"
        ]
      }
    },
    "/v1/events/{eventId}/check-ins/{ticketId}": {
      "delete": {
        "description": "**Scope:** `checkin` (which includes `read`).",
        "operationId": "revertCheckin",
        "parameters": [
          {
            "name": "eventId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ticketId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ticket"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed (a bad cursor, a missing Idempotency-Key).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is unknown or revoked.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found — or not this key’s organization or event.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The resource is in a state that does not allow this.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The body or query failed validation; `errors` names each field.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key; wait `Retry-After` seconds.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Check a ticket back out",
        "tags": [
          "Check-in"
        ],
        "x-lupeno-scopes": [
          "checkin"
        ]
      }
    },
    "/v1/discount-codes/{codeId}": {
      "get": {
        "description": "**Scope:** `read`.",
        "operationId": "getDiscountCode",
        "parameters": [
          {
            "name": "codeId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscountCode"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed (a bad cursor, a missing Idempotency-Key).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is unknown or revoked.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found — or not this key’s organization or event.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The resource is in a state that does not allow this.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The body or query failed validation; `errors` names each field.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key; wait `Retry-After` seconds.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Get a discount code",
        "tags": [
          "Discount codes"
        ],
        "x-lupeno-scopes": [
          "read"
        ]
      }
    },
    "/v1/discount-codes/{codeId}/revoke": {
      "post": {
        "description": "Orders already placed keep their discount.\n\n**Scope:** `write` (which includes `read`).",
        "operationId": "revokeDiscountCode",
        "parameters": [
          {
            "name": "codeId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscountCode"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed (a bad cursor, a missing Idempotency-Key).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is unknown or revoked.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found — or not this key’s organization or event.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The resource is in a state that does not allow this.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The body or query failed validation; `errors` names each field.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key; wait `Retry-After` seconds.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Deactivate a discount code",
        "tags": [
          "Discount codes"
        ],
        "x-lupeno-scopes": [
          "write"
        ]
      }
    },
    "/v1/orders/{orderId}/documents": {
      "get": {
        "description": "Its proforma, tax document and credit notes, as issued. A bundle order’s are its home event’s: a key of another included event gets 404.\n\n**Scope:** `read`.",
        "operationId": "listOrderDocuments",
        "parameters": [
          {
            "name": "orderId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentList"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed (a bad cursor, a missing Idempotency-Key).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is unknown or revoked.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found — or not this key’s organization or event.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The resource is in a state that does not allow this.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The body or query failed validation; `errors` names each field.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key; wait `Retry-After` seconds.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List an order’s documents",
        "tags": [
          "Documents"
        ],
        "x-lupeno-scopes": [
          "read"
        ]
      }
    },
    "/v1/documents/{documentId}/pdf": {
      "get": {
        "description": "The PDF prints the buyer unmasked, so the key needs the `pii` scope as well. A forgotten order’s documents are kept for its accountant only: refused with `409 order.forgotten`.\n\n**Scope:** `read` and `pii`.",
        "operationId": "getDocumentPdf",
        "parameters": [
          {
            "name": "documentId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The PDF",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed (a bad cursor, a missing Idempotency-Key).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is unknown or revoked.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found — or not this key’s organization or event.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The resource is in a state that does not allow this.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The body or query failed validation; `errors` names each field.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key; wait `Retry-After` seconds.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Download a document",
        "tags": [
          "Documents"
        ],
        "x-lupeno-scopes": [
          "read",
          "pii"
        ]
      }
    },
    "/v1/webhook-subscriptions": {
      "get": {
        "description": "The subscriptions this key made — not those of other keys, nor the endpoints added on the Webhooks screen.\n\n**Scope:** `read`.",
        "operationId": "listWebhookSubscriptions",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscriptionList"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed (a bad cursor, a missing Idempotency-Key).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is unknown or revoked.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found — or not this key’s organization or event.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The resource is in a state that does not allow this.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The body or query failed validation; `errors` names each field.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key; wait `Retry-After` seconds.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List this key’s webhook subscriptions",
        "tags": [
          "Webhook subscriptions"
        ],
        "x-lupeno-scopes": [
          "read"
        ]
      },
      "post": {
        "description": "Lupeno `POST`s each event of `eventTypes` to `url` — the same envelope, `Lupeno-Signature`, retries and pause as an endpoint added on the Webhooks screen, where the organization sees it under the key’s name. The answer carries the signing **secret, once**.\n\nThe subscription hears the key’s mode (a test key: test events only) and, for a key scoped to one event, that event’s occurrences only. It lives while the key does: revoking the key removes it. The URL must be `https://` on the public internet (`422 webhook.url_*` otherwise); no redirect is followed.\n\nSubscribing a URL this key already subscribed **replaces** that subscription (a new secret; what waited for the old one is cancelled), so a retry is safe without an `Idempotency-Key`. At most 20 per key and 50 per organization (`409 webhook.too_many_subscriptions`).\n\n**Scope:** `read`.",
        "operationId": "createWebhookSubscription",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWebhookSubscription"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedWebhookSubscription"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed (a bad cursor, a missing Idempotency-Key).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is unknown or revoked.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found — or not this key’s organization or event.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The resource is in a state that does not allow this.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The body or query failed validation; `errors` names each field.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key; wait `Retry-After` seconds.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Subscribe a URL to webhook events",
        "tags": [
          "Webhook subscriptions"
        ],
        "x-lupeno-scopes": [
          "read"
        ]
      }
    },
    "/v1/webhook-subscriptions/{subscriptionId}": {
      "delete": {
        "description": "Removes one of this key’s subscriptions; deliveries still waiting for it are cancelled. Answers the subscription with `state: \"deleted\"`; a second delete is `404`.\n\n**Scope:** `read`.",
        "operationId": "deleteWebhookSubscription",
        "parameters": [
          {
            "name": "subscriptionId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscription"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed (a bad cursor, a missing Idempotency-Key).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is unknown or revoked.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found — or not this key’s organization or event.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The resource is in a state that does not allow this.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The body or query failed validation; `errors` names each field.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key; wait `Retry-After` seconds.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Unsubscribe",
        "tags": [
          "Webhook subscriptions"
        ],
        "x-lupeno-scopes": [
          "read"
        ]
      }
    },
    "/v1/webhook-samples": {
      "get": {
        "description": "Envelopes as a subscription to `type` would receive them, newest first, for a tool to show sample data while a workflow is built: the newest resources of that kind the key reaches (masked unless the key has `pii`), or one made-up sample when there is none. Every one says `sample: true`; nothing is sent.\n\n**Scope:** `read`.",
        "operationId": "listWebhookSamples",
        "parameters": [
          {
            "name": "type",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "order.created",
                "order.paid",
                "order.expired",
                "order.cancelled",
                "ticket.assigned",
                "ticket.transferred",
                "ticket.voided",
                "refund.completed",
                "checkin.recorded",
                "checkin.reverted",
                "event.cancelled",
                "event.postponed",
                "document.issued",
                "order.forgotten"
              ]
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "default": 3,
              "type": "integer",
              "minimum": 1,
              "maximum": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSampleList"
                }
              }
            }
          },
          "400": {
            "description": "The request is malformed (a bad cursor, a missing Idempotency-Key).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is unknown or revoked.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Not found — or not this key’s organization or event.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The resource is in a state that does not allow this.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The body or query failed validation; `errors` names each field.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key; wait `Retry-After` seconds.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Sample webhook events",
        "tags": [
          "Webhook subscriptions"
        ],
        "x-lupeno-scopes": [
          "read"
        ]
      }
    }
  },
  "info": {
    "title": "Lupeno API",
    "description": "The Lupeno public API: your organization’s events, tiers, orders, tickets, attendees, discount codes, check-ins and documents.\n\n**Authentication.** Every request carries an API key made in the Organization tab: `Authorization: Bearer lup_live_…`. A `lup_test_…` key sees events in test mode and their test orders only; a live key never sees them. A key may be limited to one event.\n\n**Scopes.** `read` lists and gets; `write` creates and changes (and includes `read`); `checkin` records entries (and includes `read`); `pii` shows buyers’ and holders’ e-mails and phones unmasked.\n\n**Pages.** Lists return `{ items, nextCursor }`, newest first; pass `cursor` to continue, `limit` ≤ 100.\n\n**Idempotency.** Creates require an `Idempotency-Key`; a retry with the same key and body returns the first result.\n\n**Errors** are RFC 9457 problems with a stable `code`. **Limits:** 300 requests a minute per key (bursts of 60); a 429 says how long to wait in `Retry-After`. Orders and named holders also count against the organization’s daily reach (`409 bulk.over_daily_cap`, with `context.remaining` and `context.resetsAt`).\n\n**Versioning.** `/v1` only grows: new fields, operations and enum values may appear — ignore what you do not know. A breaking change would be `/v2`.\n\n**Webhooks** are signed: `Lupeno-Signature: t=<unix>,v1=<hex HMAC-SHA256 of \"<t>.<body>\">` under the endpoint’s secret.",
    "version": "1.12.1",
    "contact": {}
  },
  "tags": [
    {
      "name": "Organization",
      "description": "Who the key belongs to."
    },
    {
      "name": "Events",
      "description": "Events and their ticket tiers."
    },
    {
      "name": "Orders",
      "description": "Orders, and the organizer’s own: comp, paid outside Lupeno, proforma."
    },
    {
      "name": "Tickets",
      "description": "Tickets, and who they are for."
    },
    {
      "name": "Attendees",
      "description": "One row per admission."
    },
    {
      "name": "Discount codes",
      "description": "Codes buyers type at checkout."
    },
    {
      "name": "Check-in",
      "description": "The door."
    },
    {
      "name": "Documents",
      "description": "Proformas, tax documents and credit notes."
    }
  ],
  "servers": [
    {
      "url": "https://api.lupeno.com",
      "description": "Production"
    },
    {
      "url": "https://api.lupeno.dev",
      "description": "Development (Lupeno’s own testing)"
    }
  ],
  "components": {
    "securitySchemes": {
      "apiKey": {
        "scheme": "bearer",
        "bearerFormat": "lup_live_… | lup_test_…",
        "type": "http"
      }
    },
    "schemas": {
      "Answer": {
        "type": "object",
        "properties": {
          "fieldId": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "text",
              "longtext",
              "email",
              "select",
              "multiselect",
              "checkbox",
              "date",
              "consent"
            ]
          },
          "label": {
            "type": "string",
            "description": "The question as the buyer read it, in their language — for `consent`, the whole consent text."
          },
          "value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "boolean"
              }
            ],
            "description": "`checkbox` and `consent`: true or false. `multiselect`: the chosen options’ labels. `select`: the option’s label. `date`: `YYYY-MM-DD`. Otherwise the text as typed."
          },
          "formVersion": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "consentWordingId": {
            "description": "`consent` only: the first 16 hex characters of SHA-256 over `label` — one id per exact wording, the same in every form version that kept it. Keep it with the subscriber to show what they agreed to. Null for other types.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "fieldId",
          "type",
          "label",
          "value",
          "formVersion",
          "consentWordingId"
        ],
        "additionalProperties": false
      },
      "ApiKeyInfo": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "mode": {
            "type": "string",
            "enum": [
              "live",
              "test"
            ]
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "read",
                "write",
                "checkin",
                "pii"
              ]
            }
          },
          "eventId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "prefix",
          "mode",
          "scopes",
          "eventId"
        ],
        "additionalProperties": false
      },
      "AssignTicket": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "A person’s name. One holding a web address or a domain (`evil.cz`, `www.…`, `https://…`) is refused with 422 and `validation.no_links` at the field."
          },
          "email": {
            "type": "string",
            "maxLength": 254,
            "format": "email"
          }
        },
        "required": [
          "name",
          "email"
        ],
        "additionalProperties": false
      },
      "Attendee": {
        "type": "object",
        "properties": {
          "ticketId": {
            "type": "string",
            "format": "uuid"
          },
          "orderId": {
            "type": "string",
            "format": "uuid"
          },
          "orderNumber": {
            "type": "string"
          },
          "tierId": {
            "type": "string",
            "format": "uuid"
          },
          "tierName": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "checkedInAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "mode": {
            "type": "string",
            "enum": [
              "live",
              "test"
            ]
          },
          "answers": {
            "description": "The buyer’s answers to the checkout form (1.2.0). Present only with the `pii` scope — a webhook endpoint with personal data on; absent otherwise. Empty when nothing was asked or answered.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Answer"
            }
          },
          "seat": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TicketSeat"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where they sit, on an event with reserved seating (1.9.0); null otherwise."
          }
        },
        "required": [
          "ticketId",
          "orderId",
          "orderNumber",
          "tierId",
          "tierName",
          "name",
          "email",
          "checkedInAt",
          "mode",
          "seat"
        ],
        "additionalProperties": false
      },
      "AttendeePage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Attendee"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items",
          "nextCursor"
        ],
        "additionalProperties": false
      },
      "Checkin": {
        "type": "object",
        "properties": {
          "ticketId": {
            "type": "string",
            "format": "uuid"
          },
          "tierId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "checkedInAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "ticketId",
          "tierId",
          "name",
          "checkedInAt"
        ],
        "additionalProperties": false
      },
      "CheckinPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Checkin"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items",
          "nextCursor"
        ],
        "additionalProperties": false
      },
      "CheckinRequest": {
        "type": "object",
        "properties": {
          "ticketId": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512
          }
        },
        "additionalProperties": false
      },
      "CreateDiscountCode": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 3,
            "maxLength": 40
          },
          "kind": {
            "type": "string",
            "enum": [
              "percent",
              "fixed"
            ]
          },
          "percentBp": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10000
          },
          "amountMinor": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "tierIds": {
            "default": [],
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "validFrom": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "validUntil": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "maxUses": {
            "default": null,
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 1000000
              },
              {
                "type": "null"
              }
            ]
          },
          "maxPerOrder": {
            "default": null,
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 1000
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "code",
          "kind"
        ],
        "additionalProperties": false
      },
      "CreateOrder": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "comp",
              "paid_outside",
              "proforma"
            ]
          },
          "items": {
            "minItems": 1,
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tierId": {
                  "type": "string",
                  "format": "uuid"
                },
                "quantity": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 200
                },
                "amountMinor": {
                  "description": "A `pay_what_you_want` type’s price per ticket (1.4.0), between its `price` and `maxPrice`; left out, its `suggestedPrice`. Refused for a `fixed` type.",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 2147483647
                }
              },
              "required": [
                "tierId",
                "quantity"
              ]
            }
          },
          "buyer": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "description": "A person’s name. One holding a web address or a domain (`evil.cz`, `www.…`, `https://…`) is refused with 422 and `validation.no_links` at the field."
              },
              "email": {
                "type": "string",
                "maxLength": 254,
                "format": "email"
              },
              "phone": {
                "type": "string",
                "maxLength": 40
              }
            },
            "required": [
              "name",
              "email"
            ]
          },
          "locale": {
            "default": "cs",
            "type": "string",
            "enum": [
              "cs",
              "en"
            ]
          },
          "compReason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "method": {
            "type": "string",
            "enum": [
              "cash",
              "terminal",
              "other"
            ]
          },
          "paidOn": {
            "type": "string",
            "format": "date"
          },
          "holdDays": {
            "type": "integer",
            "minimum": 1,
            "maximum": 30
          },
          "note": {
            "type": "string",
            "maxLength": 1000
          }
        },
        "required": [
          "kind",
          "items",
          "buyer"
        ],
        "additionalProperties": false
      },
      "CreateWebhookSubscription": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "maxLength": 2000
          },
          "eventTypes": {
            "minItems": 1,
            "maxItems": 50,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "order.created",
                "order.paid",
                "order.expired",
                "order.cancelled",
                "ticket.assigned",
                "ticket.transferred",
                "ticket.voided",
                "refund.completed",
                "checkin.recorded",
                "checkin.reverted",
                "event.cancelled",
                "event.postponed",
                "document.issued",
                "order.forgotten"
              ]
            }
          },
          "description": {
            "type": "string",
            "maxLength": 200
          },
          "pii": {
            "type": "boolean"
          }
        },
        "required": [
          "url",
          "eventTypes"
        ],
        "additionalProperties": false
      },
      "CreatedWebhookSubscription": {
        "type": "object",
        "properties": {
          "subscription": {
            "$ref": "#/components/schemas/WebhookSubscription"
          },
          "secret": {
            "type": "string"
          }
        },
        "required": [
          "subscription",
          "secret"
        ],
        "additionalProperties": false
      },
      "DiscountCode": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "eventId": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "percent",
              "fixed"
            ]
          },
          "percentBp": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "amountMinor": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "tierIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "validFrom": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "validUntil": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "maxUses": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "maxPerOrder": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "unused",
              "used",
              "expired",
              "deactivated"
            ]
          },
          "ticketsUsed": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "id",
          "eventId",
          "code",
          "kind",
          "percentBp",
          "amountMinor",
          "currency",
          "tierIds",
          "validFrom",
          "validUntil",
          "maxUses",
          "maxPerOrder",
          "state",
          "ticketsUsed"
        ],
        "additionalProperties": false
      },
      "DiscountCodePage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiscountCode"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items",
          "nextCursor"
        ],
        "additionalProperties": false
      },
      "Document": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "orderId": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "proforma",
              "invoice",
              "credit_note"
            ]
          },
          "number": {
            "type": "string"
          },
          "mode": {
            "type": "string",
            "enum": [
              "live",
              "test"
            ]
          },
          "source": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3
          },
          "totalMinor": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "vatMinor": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "issuedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "orderId",
          "kind",
          "number",
          "mode",
          "source",
          "currency",
          "totalMinor",
          "vatMinor",
          "issuedAt"
        ],
        "additionalProperties": false
      },
      "DocumentList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Document"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": false
      },
      "Event": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "enum": [
              "draft",
              "published",
              "archived",
              "cancelled"
            ]
          },
          "startsAt": {
            "type": "string",
            "format": "date-time"
          },
          "endsAt": {
            "type": "string",
            "format": "date-time"
          },
          "postponedFrom": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "timezone": {
            "type": "string"
          },
          "format": {
            "type": "string",
            "enum": [
              "venue",
              "online",
              "hybrid"
            ]
          },
          "venue": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "address": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "name",
                  "address"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "url": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "listed": {
            "type": "boolean"
          },
          "testMode": {
            "type": "boolean"
          },
          "billingTier": {
            "type": "string",
            "enum": [
              "free",
              "paid"
            ]
          },
          "defaultLanguage": {
            "type": "string"
          },
          "languages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "venueGeo": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GeoPoint"
              },
              {
                "type": "null"
              }
            ],
            "description": "The venue’s coordinates (1.10.0) — only while they belong to the current address; null for an online event, an address not found yet, or one changed since."
          },
          "venueMap": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MapPicture"
              },
              {
                "type": "null"
              }
            ],
            "description": "The map picture the event page shows (1.10.0); null when none is shown — switched off, no address, or none saved yet."
          },
          "practical": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PracticalInfo"
              },
              {
                "type": "null"
              }
            ],
            "description": "Practical information (1.10.0); null when the organizer filled none."
          },
          "tour": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EventTour"
              },
              {
                "type": "null"
              }
            ],
            "description": "The tour it is a date of (1.10.0); null when it is in none."
          }
        },
        "required": [
          "id",
          "slug",
          "title",
          "state",
          "startsAt",
          "endsAt",
          "postponedFrom",
          "timezone",
          "format",
          "venue",
          "url",
          "listed",
          "testMode",
          "billingTier",
          "defaultLanguage",
          "languages",
          "createdAt",
          "updatedAt",
          "venueGeo",
          "venueMap",
          "practical",
          "tour"
        ],
        "additionalProperties": false
      },
      "EventPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Event"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items",
          "nextCursor"
        ],
        "additionalProperties": false
      },
      "EventTour": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "defaultLanguage": {
            "type": "string"
          },
          "translations": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "string"
              }
            },
            "description": "Other-language versions as `{ field: { locale: text } }`; the fields themselves are in the tour’s `defaultLanguage`, and a missing version falls back to them."
          },
          "url": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "dates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TourDate"
            },
            "description": "The tour’s other dates the key sees — published events in the key’s mode, past ones too, soonest first (at most 100). Drafts, cancelled and archived events are never listed; an event key sees only its one event, so it lists none."
          }
        },
        "required": [
          "slug",
          "name",
          "description",
          "defaultLanguage",
          "translations",
          "url",
          "dates"
        ],
        "additionalProperties": false
      },
      "GalleryItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "photo",
              "video"
            ]
          },
          "alt": {
            "type": "string"
          },
          "width": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "height": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "width": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "url": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "required": [
                "width",
                "url"
              ],
              "additionalProperties": false
            }
          },
          "video": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "provider": {
                    "type": "string",
                    "enum": [
                      "youtube",
                      "vimeo"
                    ]
                  },
                  "id": {
                    "type": "string"
                  },
                  "playerUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "pageUrl": {
                    "type": "string",
                    "format": "uri"
                  }
                },
                "required": [
                  "provider",
                  "id",
                  "playerUrl",
                  "pageUrl"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "translations": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "string"
              }
            },
            "description": "Other-language versions as `{ field: { locale: text } }`; the fields themselves are in the event’s `defaultLanguage`, and a missing version falls back to them."
          }
        },
        "required": [
          "id",
          "kind",
          "alt",
          "width",
          "height",
          "sources",
          "video",
          "translations"
        ],
        "additionalProperties": false
      },
      "GalleryItemList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GalleryItem"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": false
      },
      "GeoPoint": {
        "type": "object",
        "properties": {
          "lat": {
            "type": "number"
          },
          "lng": {
            "type": "number"
          }
        },
        "required": [
          "lat",
          "lng"
        ],
        "additionalProperties": false
      },
      "MapPicture": {
        "type": "object",
        "properties": {
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "width": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "url": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "required": [
                "width",
                "url"
              ],
              "additionalProperties": false
            }
          },
          "width": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "height": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "mode": {
            "type": "string",
            "enum": [
              "map",
              "image"
            ],
            "description": "What the picture is (1.11.0): `map` — a map with the venue’s pin, “© OpenStreetMap” drawn in its bottom-right corner; `image` — a picture the organizer uploaded instead."
          },
          "darkSources": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "width": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "url": {
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "required": [
                    "width",
                    "url"
                  ],
                  "additionalProperties": false
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "The same map drawn for a dark display (1.11.0), narrowest first — show it when your page is dark; null for an organizer’s image or a map saved before 1.11.0."
          }
        },
        "required": [
          "sources",
          "width",
          "height",
          "mode",
          "darkSources"
        ],
        "additionalProperties": false
      },
      "Money": {
        "type": "object",
        "properties": {
          "amountMinor": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3
          }
        },
        "required": [
          "amountMinor",
          "currency"
        ],
        "additionalProperties": false
      },
      "Order": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "eventId": {
            "type": "string",
            "format": "uuid"
          },
          "number": {
            "type": "string"
          },
          "mode": {
            "type": "string",
            "enum": [
              "live",
              "test"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "draft",
              "pending_approval",
              "approved",
              "declined",
              "pending_payment",
              "overdue",
              "paid",
              "partially_refunded",
              "refunded",
              "cancelled",
              "expired"
            ]
          },
          "channel": {
            "type": "string",
            "enum": [
              "gateway",
              "bank_transfer",
              "none",
              "manual"
            ]
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3
          },
          "totalMinor": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "vatMinor": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The VAT inside `totalMinor`. 0 when the seller is not a VAT payer, whatever rate its ticket types and extras carry (since 1.12.0)."
          },
          "discountMinor": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "donationMinor": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The donation inside `totalMinor` (1.4.0): an amount the buyer added at checkout, not a ticket — no VAT, no ticket fee. 0 for none."
          },
          "extrasMinor": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The extras inside `totalMinor` (1.5.0): what the buyer added to the tickets — a workshop, merch, parking — each with its own VAT; on a paid event each piece carries Lupeno’s fee as a ticket does. 0 for none."
          },
          "refundedMinor": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "buyer": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "company": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "companyId": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "vatId": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "name",
                      "companyId",
                      "vatId"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "name",
              "email",
              "phone",
              "company"
            ],
            "additionalProperties": false
          },
          "comp": {
            "type": "boolean"
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tierId": {
                  "type": "string",
                  "format": "uuid"
                },
                "tierName": {
                  "type": "string"
                },
                "quantity": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "unitPriceMinor": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "eventId": {
                  "type": "string",
                  "format": "uuid",
                  "description": "The line’s type’s event (1.7.0): the order’s own, or — on a bundle order — the included event’s."
                }
              },
              "required": [
                "tierId",
                "tierName",
                "quantity",
                "unitPriceMinor",
                "eventId"
              ],
              "additionalProperties": false
            }
          },
          "extras": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "extraId": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "quantity": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "unitPriceMinor": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "refundedQuantity": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991,
                  "description": "Of them, what was refunded or voided (1.12.0): `quantity − refundedQuantity` are still the buyer’s. A refund still on its way counts."
                }
              },
              "required": [
                "extraId",
                "name",
                "quantity",
                "unitPriceMinor",
                "refundedQuantity"
              ],
              "additionalProperties": false
            },
            "description": "The extras bought with the tickets (1.5.0), as placed; empty for none."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "paidAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "forgottenAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "answers": {
            "description": "The buyer’s answers to the checkout form (1.2.0). Present only with the `pii` scope — a webhook endpoint with personal data on; absent otherwise. Empty when nothing was asked or answered.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Answer"
            }
          },
          "upgradeOfTicketId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "description": "An upgrade order (1.6.0): it pays the difference to move this ticket of another order to its one line’s type. Once paid, that ticket is voided and this order’s ticket admits instead. Null otherwise."
          },
          "bundleId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "description": "A bundle order (1.7.0): one ticket of each of the bundle’s events per bundle, placed on its home event (this order’s `eventId`); each line names its event and costs the type’s share of the bundle’s price. Every included event lists it (1.12.0): an event’s part is the sum of its own lines, `totalMinor` and `refundedMinor` are the whole order’s. A key of one included event reads that event’s lines only. Null otherwise."
          },
          "bundleQuantity": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "How many bundles a bundle order bought (1.7.0); null otherwise."
          }
        },
        "required": [
          "id",
          "eventId",
          "number",
          "mode",
          "state",
          "channel",
          "currency",
          "totalMinor",
          "vatMinor",
          "discountMinor",
          "donationMinor",
          "extrasMinor",
          "refundedMinor",
          "buyer",
          "comp",
          "note",
          "items",
          "extras",
          "createdAt",
          "paidAt",
          "forgottenAt",
          "upgradeOfTicketId",
          "bundleId",
          "bundleQuantity"
        ],
        "additionalProperties": false
      },
      "OrderPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Order"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items",
          "nextCursor"
        ],
        "additionalProperties": false
      },
      "Organization": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "legalName": {
            "type": [
              "string",
              "null"
            ]
          },
          "companyId": {
            "type": [
              "string",
              "null"
            ]
          },
          "verificationStatus": {
            "type": "string",
            "enum": [
              "unverified",
              "pending",
              "verified",
              "rejected",
              "suspended"
            ]
          },
          "defaultCurrency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3
          },
          "timezone": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "legalName",
          "companyId",
          "verificationStatus",
          "defaultCurrency",
          "timezone"
        ],
        "additionalProperties": false
      },
      "PracticalInfo": {
        "type": "object",
        "properties": {
          "doorsOpenAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "ageLimit": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "ageLimitNote": {
            "type": [
              "string",
              "null"
            ]
          },
          "accessibility": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "step_free",
                "accessible_toilet",
                "hearing_loop",
                "wheelchair_spaces",
                "companion_free"
              ]
            },
            "description": "What the venue offers: `step_free` access, an `accessible_toilet`, a `hearing_loop`, `wheelchair_spaces`, and a ZTP/P holder’s companion free (`companion_free`). Tolerate values you do not know."
          },
          "accessibilityNote": {
            "type": [
              "string",
              "null"
            ]
          },
          "parkingNote": {
            "type": [
              "string",
              "null"
            ]
          },
          "transportNote": {
            "type": [
              "string",
              "null"
            ]
          },
          "instructions": {
            "description": "The organizer’s instructions — plain text with light marks: a blank line between paragraphs, `**bold**`, `*italic*`, lines starting `- ` as a list, a line starting `## ` as a heading.",
            "type": [
              "string",
              "null"
            ]
          },
          "translations": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "string"
              }
            },
            "description": "Other-language versions as `{ field: { locale: text } }`; the fields themselves are in the event’s `defaultLanguage`, and a missing version falls back to them."
          }
        },
        "required": [
          "doorsOpenAt",
          "ageLimit",
          "ageLimitNote",
          "accessibility",
          "accessibilityNote",
          "parkingNote",
          "transportNote",
          "instructions",
          "translations"
        ],
        "additionalProperties": false
      },
      "Problem": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "code": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "errors": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "context": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": [
                "string",
                "number",
                "boolean"
              ]
            }
          },
          "instance": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "code"
        ],
        "additionalProperties": false
      },
      "Refund": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "orderId": {
            "type": "string",
            "format": "uuid"
          },
          "eventId": {
            "type": "string",
            "format": "uuid"
          },
          "mode": {
            "type": "string",
            "enum": [
              "live",
              "test"
            ]
          },
          "amountMinor": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "succeeded",
              "failed"
            ]
          },
          "ticketIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "completedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "keptMinor": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The cancellation fee the organizer kept of the refunded tickets (1.12.0), not in `amountMinor`; 0 for none."
          },
          "donationMinor": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The donation inside `amountMinor` (1.12.0); 0 when none of it went back."
          },
          "extras": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "extraId": {
                  "type": "string",
                  "format": "uuid"
                },
                "quantity": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "amountMinor": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "extraId",
                "quantity",
                "amountMinor"
              ],
              "additionalProperties": false
            },
            "description": "The extras it returned (1.12.0), inside `amountMinor`; empty for none."
          }
        },
        "required": [
          "id",
          "orderId",
          "eventId",
          "mode",
          "amountMinor",
          "currency",
          "state",
          "ticketIds",
          "completedAt",
          "keptMinor",
          "donationMinor",
          "extras"
        ],
        "additionalProperties": false
      },
      "Ticket": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "orderId": {
            "type": "string",
            "format": "uuid"
          },
          "eventId": {
            "type": "string",
            "format": "uuid"
          },
          "tierId": {
            "type": "string",
            "format": "uuid"
          },
          "tierName": {
            "type": "string"
          },
          "mode": {
            "type": "string",
            "enum": [
              "live",
              "test"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "valid",
              "voided"
            ]
          },
          "holder": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "name",
                  "email"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "checkedInAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "issuedAt": {
            "type": "string",
            "format": "date-time"
          },
          "voidedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "answers": {
            "description": "The buyer’s answers to the checkout form (1.2.0). Present only with the `pii` scope — a webhook endpoint with personal data on; absent otherwise. Empty when nothing was asked or answered.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Answer"
            }
          },
          "upgradedFromTicketId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "description": "The ticket this one replaced by an upgrade (1.6.0), voided when it was paid; null otherwise."
          },
          "upgradedToTicketId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "description": "The ticket that replaced this one by an upgrade (1.6.0) — this one is then voided; null otherwise."
          },
          "seat": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TicketSeat"
              },
              {
                "type": "null"
              }
            ],
            "description": "Its seat on an event with reserved seating (1.9.0) — kept by a transfer, still named on a voided ticket; null otherwise."
          }
        },
        "required": [
          "id",
          "orderId",
          "eventId",
          "tierId",
          "tierName",
          "mode",
          "status",
          "holder",
          "checkedInAt",
          "issuedAt",
          "voidedAt",
          "upgradedFromTicketId",
          "upgradedToTicketId",
          "seat"
        ],
        "additionalProperties": false
      },
      "TicketPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Ticket"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items",
          "nextCursor"
        ],
        "additionalProperties": false
      },
      "TicketSeat": {
        "type": "object",
        "properties": {
          "section": {
            "type": "string"
          },
          "row": {
            "type": "string"
          },
          "seat": {
            "type": "string"
          },
          "accessible": {
            "type": "boolean"
          }
        },
        "required": [
          "section",
          "row",
          "seat",
          "accessible"
        ],
        "additionalProperties": false
      },
      "Tier": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "eventId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "price": {
            "$ref": "#/components/schemas/Money"
          },
          "vatRateBp": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "quantityTotal": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "quantitySold": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Tickets sold: live tickets still valid in a paid or (partly) refunded order — the count the organizer’s Insights shows. Test tickets, refunded tickets and unpaid holds are not in it; `availability` says whether a buyer can buy."
          },
          "availability": {
            "type": "string",
            "enum": [
              "on_sale",
              "few_left",
              "not_yet_on_sale",
              "sales_ended",
              "sold_out"
            ]
          },
          "salesStartAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "salesEndAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "visible": {
            "type": "boolean"
          },
          "minPerOrder": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "maxPerOrder": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "requiresApproval": {
            "type": "boolean"
          },
          "priceMode": {
            "type": "string",
            "enum": [
              "fixed",
              "pay_what_you_want"
            ],
            "description": "`pay_what_you_want` (1.4.0): the buyer chooses each ticket’s price at checkout, from `price` (the least) to `maxPrice`, offered `suggestedPrice` first."
          },
          "suggestedPrice": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Money"
              },
              {
                "type": "null"
              }
            ]
          },
          "maxPrice": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Money"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "eventId",
          "name",
          "description",
          "price",
          "vatRateBp",
          "quantityTotal",
          "quantitySold",
          "availability",
          "salesStartAt",
          "salesEndAt",
          "visible",
          "minPerOrder",
          "maxPerOrder",
          "requiresApproval",
          "priceMode",
          "suggestedPrice",
          "maxPrice"
        ],
        "additionalProperties": false
      },
      "TierList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tier"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": false
      },
      "TourDate": {
        "type": "object",
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "startsAt": {
            "type": "string",
            "format": "date-time"
          },
          "endsAt": {
            "type": "string",
            "format": "date-time"
          },
          "timezone": {
            "type": "string"
          },
          "venue": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "city": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "name",
                  "city"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "eventId",
          "slug",
          "title",
          "startsAt",
          "endsAt",
          "timezone",
          "venue",
          "url"
        ],
        "additionalProperties": false
      },
      "WebhookEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "enum": [
              "order.created",
              "order.paid",
              "order.expired",
              "order.cancelled",
              "ticket.assigned",
              "ticket.transferred",
              "ticket.voided",
              "refund.completed",
              "checkin.recorded",
              "checkin.reverted",
              "event.cancelled",
              "event.postponed",
              "document.issued",
              "order.forgotten"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "mode": {
            "type": "string",
            "enum": [
              "live",
              "test"
            ]
          },
          "apiVersion": {
            "type": "string",
            "const": "v1"
          },
          "sample": {
            "type": "boolean"
          },
          "data": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "id",
          "type",
          "occurredAt",
          "mode",
          "data"
        ],
        "additionalProperties": false
      },
      "WebhookSampleList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookEvent"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": false
      },
      "WebhookSubscription": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "url": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "eventTypes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "order.created",
                "order.paid",
                "order.expired",
                "order.cancelled",
                "ticket.assigned",
                "ticket.transferred",
                "ticket.voided",
                "refund.completed",
                "checkin.recorded",
                "checkin.reverted",
                "event.cancelled",
                "event.postponed",
                "document.issued",
                "order.forgotten"
              ]
            }
          },
          "mode": {
            "type": "string",
            "enum": [
              "live",
              "test"
            ]
          },
          "eventId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "pii": {
            "type": "boolean"
          },
          "secretPrefix": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "enum": [
              "active",
              "paused",
              "deleted"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "url",
          "description",
          "eventTypes",
          "mode",
          "eventId",
          "pii",
          "secretPrefix",
          "state",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "WebhookSubscriptionList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookSubscription"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": false
      },
      "WhoAmI": {
        "type": "object",
        "properties": {
          "organization": {
            "$ref": "#/components/schemas/Organization"
          },
          "key": {
            "$ref": "#/components/schemas/ApiKeyInfo"
          }
        },
        "required": [
          "organization",
          "key"
        ],
        "additionalProperties": false
      }
    }
  },
  "webhooks": {
    "order.created": {
      "post": {
        "summary": "order.created",
        "description": "Sent when order is created — `data` is the Order.",
        "parameters": [
          {
            "name": "Lupeno-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "order.created"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Order"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Anything else is retried."
          }
        }
      }
    },
    "order.paid": {
      "post": {
        "summary": "order.paid",
        "description": "Sent when order is paid — `data` is the Order.",
        "parameters": [
          {
            "name": "Lupeno-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "order.paid"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Order"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Anything else is retried."
          }
        }
      }
    },
    "order.expired": {
      "post": {
        "summary": "order.expired",
        "description": "Sent when order is expired — `data` is the Order.",
        "parameters": [
          {
            "name": "Lupeno-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "order.expired"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Order"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Anything else is retried."
          }
        }
      }
    },
    "order.cancelled": {
      "post": {
        "summary": "order.cancelled",
        "description": "Sent when order is cancelled — `data` is the Order.",
        "parameters": [
          {
            "name": "Lupeno-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "order.cancelled"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Order"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Anything else is retried."
          }
        }
      }
    },
    "ticket.assigned": {
      "post": {
        "summary": "ticket.assigned",
        "description": "Sent when ticket is assigned — `data` is the Ticket.",
        "parameters": [
          {
            "name": "Lupeno-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "ticket.assigned"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Ticket"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Anything else is retried."
          }
        }
      }
    },
    "ticket.transferred": {
      "post": {
        "summary": "ticket.transferred",
        "description": "Sent when ticket is transferred — `data` is the Ticket.",
        "parameters": [
          {
            "name": "Lupeno-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "ticket.transferred"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Ticket"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Anything else is retried."
          }
        }
      }
    },
    "ticket.voided": {
      "post": {
        "summary": "ticket.voided",
        "description": "Sent when ticket is voided — `data` is the Ticket.",
        "parameters": [
          {
            "name": "Lupeno-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "ticket.voided"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Ticket"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Anything else is retried."
          }
        }
      }
    },
    "refund.completed": {
      "post": {
        "summary": "refund.completed",
        "description": "Sent when refund is completed — `data` is the Refund.",
        "parameters": [
          {
            "name": "Lupeno-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "refund.completed"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Refund"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Anything else is retried."
          }
        }
      }
    },
    "checkin.recorded": {
      "post": {
        "summary": "checkin.recorded",
        "description": "Sent when checkin is recorded — `data` is the Ticket.",
        "parameters": [
          {
            "name": "Lupeno-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "checkin.recorded"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Ticket"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Anything else is retried."
          }
        }
      }
    },
    "checkin.reverted": {
      "post": {
        "summary": "checkin.reverted",
        "description": "Sent when checkin is reverted — `data` is the Ticket.",
        "parameters": [
          {
            "name": "Lupeno-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "checkin.reverted"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Ticket"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Anything else is retried."
          }
        }
      }
    },
    "event.cancelled": {
      "post": {
        "summary": "event.cancelled",
        "description": "Sent when event is cancelled — `data` is the Event.",
        "parameters": [
          {
            "name": "Lupeno-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "event.cancelled"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Event"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Anything else is retried."
          }
        }
      }
    },
    "event.postponed": {
      "post": {
        "summary": "event.postponed",
        "description": "Sent when event is postponed — `data` is the Event.",
        "parameters": [
          {
            "name": "Lupeno-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "event.postponed"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Event"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Anything else is retried."
          }
        }
      }
    },
    "document.issued": {
      "post": {
        "summary": "document.issued",
        "description": "Sent when document is issued — `data` is the Document.",
        "parameters": [
          {
            "name": "Lupeno-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "document.issued"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Document"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Anything else is retried."
          }
        }
      }
    },
    "order.forgotten": {
      "post": {
        "summary": "order.forgotten",
        "description": "Sent when order is forgotten — `data` is the Order.",
        "parameters": [
          {
            "name": "Lupeno-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "order.forgotten"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Order"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Anything else is retried."
          }
        }
      }
    }
  }
}
