{
  "openapi": "3.1.0",
  "info": {
    "title": "Passlet API (Public)",
    "version": "0.1.0",
    "description": "Public integration API for Passlet — every route callable with a `plt_*` access token. Each operation lists the required access-token scope.",
    "license": {
      "name": "UNLICENSED",
      "identifier": "UNLICENSED"
    }
  },
  "servers": [
    {
      "url": "https://api.passlet.io",
      "description": "Production"
    }
  ],
  "paths": {
    "/v1/passes": {
      "get": {
        "operationId": "getV1Passes",
        "summary": "List passes",
        "tags": [
          "passes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Lists passes, newest first by default, with cursor pagination. Filter by status, project, template, stored variables (`variable=key:value`, repeatable), scanner validity (`validOn`), or redemption state (`redeemed`, optionally scoped to one scan context with `redeemedContext`).\n\nRequires the `passes:read` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "passes:read"
              ]
            }
          ]
        },
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "Number of items per page"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "description": "Opaque cursor returned by the previous page"
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "description": "Deprecated offset compatibility parameter"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "minItems": 1,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "QUEUED",
                  "ISSUING",
                  "ISSUED",
                  "VOID",
                  "FAILED",
                  "EXPIRED"
                ]
              }
            },
            "description": "Filter by one or more statuses"
          },
          {
            "name": "externalPassId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by external ID"
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "Search by label, status, or external pass ID"
          },
          {
            "name": "projectId",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                {
                  "type": "string",
                  "const": "null"
                }
              ]
            },
            "description": "Filter by project. UUID = that project; the string \"null\" = uncategorised passes."
          },
          {
            "name": "templateId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "description": "Filter by template — matches passes issued from any version of this template."
          },
          {
            "name": "variable",
            "in": "query",
            "required": false,
            "schema": {
              "minItems": 1,
              "maxItems": 5,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 3,
                "maxLength": 2177,
                "description": "Stored-variable filter entry in `key:value` form."
              }
            },
            "description": "Repeatable `key:value` filter on stored pass variables (exact, trimmed match; value = everything after the first \":\"). Same key repeated = any-of; different keys must all match. Max 5 entries. Example: variable=memberTier:gold&variable=region:EU"
          },
          {
            "name": "validOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "description": "Only passes valid for scanning on this date (YYYY-MM-DD). Matches passes with a redemption window containing the date; passes that declare no windows are always valid."
          },
          {
            "name": "redeemed",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter passes by whether they are redeemed — i.e. have an unreversed accepted scan (scoped by redeemedContext)."
          },
          {
            "name": "redeemedContext",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 128
            },
            "description": "Scope the redeemed filter to one scan context key (e.g. an event day). Only meaningful together with redeemed."
          },
          {
            "name": "sortBy",
            "in": "query",
            "required": false,
            "schema": {
              "default": "createdAt",
              "type": "string",
              "enum": [
                "createdAt",
                "updatedAt",
                "label",
                "status",
                "externalPassId"
              ]
            },
            "description": "Sort field"
          },
          {
            "name": "sortDir",
            "in": "query",
            "required": false,
            "schema": {
              "default": "desc",
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "description": "Sort direction"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicListPassesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "postV1Passes",
        "summary": "Create a pass",
        "tags": [
          "passes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Creates a wallet pass from a template and returns it with hosted add-to-wallet links. Issuance is asynchronous: the pass is returned in `QUEUED` status (`201`) and a background worker signs and issues it. Creation is idempotent on `externalPassId` — reusing one returns the existing pass with `200` instead of creating a duplicate. `variables` are validated against the template’s published version, which the pass is pinned to.\n\nRequires the `passes:write` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "passes:write"
              ]
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCreatePassRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicCreatePassResponse"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicCreatePassResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/passes/{id}": {
      "get": {
        "operationId": "getV1PassesId",
        "summary": "Get a pass",
        "tags": [
          "passes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Fetches a single pass. `hostedLinks` contains fresh add-to-wallet URLs while the pass is in an installable status, and `null` links otherwise (e.g. voided or failed).\n\nRequires the `passes:read` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "passes:read"
              ]
            }
          ]
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "description": "Pass identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicCreatePassResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/passes/{id}/links/revoke": {
      "post": {
        "operationId": "postV1PassesIdLinksRevoke",
        "summary": "Revoke hosted pass links",
        "tags": [
          "passes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Invalidates all currently active hosted add-to-wallet links for the pass — e.g. after a distribution link reached the wrong recipient. Wallet passes already installed on devices are unaffected (void the pass for that). Fetching the pass again returns freshly generated links.\n\nRequires the `passes:write` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "passes:write"
              ]
            }
          ]
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "description": "Pass identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevokePassLinksResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/passes/{id}/void": {
      "post": {
        "operationId": "postV1PassesIdVoid",
        "summary": "Void a pass",
        "tags": [
          "passes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Permanently voids a pass so it can no longer be scanned, and queues an update to wallet passes already installed on devices. The optional `reason` is forwarded to `pass.voided` webhook payloads. Voiding an already-voided pass returns `409` (`PASS_ALREADY_VOIDED`).\n\nRequires the `passes:write` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "passes:write"
              ]
            }
          ]
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "description": "Pass identifier"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "reason": {
                        "description": "Optional reason for voiding the pass (forwarded to webhook payloads)",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      }
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicVoidPassResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/passes/batch": {
      "post": {
        "operationId": "postV1PassesBatch",
        "summary": "Create passes in batch",
        "tags": [
          "passes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Creates up to 100 passes in one call. The call returns `200` even when individual passes fail — check each `results[]` entry for its `success` flag and error. Every pass follows the same rules as single create, including `externalPassId` idempotency.\n\nRequires the `passes:write` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "passes:write"
              ]
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCreateBatchPassesRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicCreateBatchPassesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/passes/batch/void": {
      "post": {
        "operationId": "postV1PassesBatchVoid",
        "summary": "Void passes in batch",
        "tags": [
          "passes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Voids up to 100 passes in one call. The call returns `200` even when individual passes fail — check each `results[]` entry for its `success` flag and error. The optional `reason` applies to every pass in the batch.\n\nRequires the `passes:write` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "passes:write"
              ]
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchVoidPassesRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicBatchVoidPassesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects": {
      "get": {
        "operationId": "getV1Projects",
        "summary": "List projects",
        "tags": [
          "projects"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Lists all projects with the number of templates in each.\n\nRequires the `templates:read` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "templates:read"
              ]
            }
          ]
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicListProjectsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "postV1Projects",
        "summary": "Create a project",
        "tags": [
          "projects"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Creates a project — an organizational grouping for templates and their passes. `color` defaults to `gray`.\n\nRequires the `templates:write` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "templates:write"
              ]
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProjectRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicProject"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/{id}": {
      "delete": {
        "operationId": "deleteV1ProjectsId",
        "summary": "Delete a project",
        "tags": [
          "projects"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Deletes a project. Its templates, passes, and scans are kept and become uncategorised (`projectId: null`) — nothing inside the project is deleted.\n\nRequires the `templates:write` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "templates:write"
              ]
            }
          ]
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "description": "Resource identifier"
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "getV1ProjectsId",
        "summary": "Get a project",
        "tags": [
          "projects"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Fetches a single project.\n\nRequires the `templates:read` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "templates:read"
              ]
            }
          ]
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "description": "Resource identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicProject"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "patchV1ProjectsId",
        "summary": "Update a project",
        "tags": [
          "projects"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Partially updates the name, description, or color. At least one field must be provided (`400` otherwise).\n\nRequires the `templates:write` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "templates:write"
              ]
            }
          ]
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "description": "Resource identifier"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProjectRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicProject"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/{id}/stats": {
      "get": {
        "operationId": "getV1ProjectsIdStats",
        "summary": "Get project statistics",
        "tags": [
          "projects"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Returns aggregate counts for the project: templates, total passes, live passes (currently `ISSUED` or `ISSUING`), and passes installed in Google Wallet.\n\nRequires the `templates:read` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "templates:read"
              ]
            }
          ]
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "description": "Resource identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectStatsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/scans": {
      "get": {
        "operationId": "getV1Scans",
        "summary": "List scans",
        "tags": [
          "scans"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Lists recorded scans, newest first, with cursor pagination. Filter by pass, project, template, result, scan context, or time window.\n\nRequires the `scans:read` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "scans:read"
              ]
            }
          ]
        },
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "Number of items per page"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "description": "Opaque cursor returned by the previous page"
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "description": "Deprecated offset compatibility parameter"
          },
          {
            "name": "projectId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "passId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "description": "Pass identifier"
          },
          {
            "name": "templateId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "description": "Template identifier"
          },
          {
            "name": "result",
            "in": "query",
            "required": false,
            "schema": {
              "minItems": 1,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "accepted",
                  "duplicate",
                  "unknown",
                  "ambiguous",
                  "denied",
                  "reversal"
                ]
              }
            },
            "description": "Filter by one or more scan results (any-of)."
          },
          {
            "name": "resultGroup",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "denied"
              ]
            }
          },
          {
            "name": "scanContextKey",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          },
          {
            "name": "scannedSince",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            },
            "description": "ISO 8601 timestamp"
          },
          {
            "name": "scannedUntil",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            },
            "description": "ISO 8601 timestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicListScansResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "postV1Scans",
        "summary": "Record a scan",
        "tags": [
          "scans"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Validates a pass and records the scan attempt. Identify the pass by `qrPayload` (the scanned QR content) or `passId`. The outcome is returned as `result` (`accepted`, `duplicate`, `unknown`, `ambiguous`, `denied` or `reversal`) plus a machine-readable `reasonCode`; non-accepted attempts are recorded and still return `200`. An `ambiguous` result includes `candidates[]` so the operator can pick a pass and re-submit with `passId`. Use `scanContextKey` to scope duplicate detection to a context (e.g. one event day), and pass a unique `externalRef` to make retries idempotent (replays return `idempotentReplay: true`).\n\nRequires the `scans:write` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "scans:write"
              ]
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordScanRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicRecordScanResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/scans/{id}": {
      "get": {
        "operationId": "getV1ScansId",
        "summary": "Get a scan",
        "tags": [
          "scans"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Fetches a single recorded scan.\n\nRequires the `scans:read` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "scans:read"
              ]
            }
          ]
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "description": "Resource identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicPassScan"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/scans/{id}/reverse": {
      "post": {
        "operationId": "postV1ScansIdReverse",
        "summary": "Reverse a scan",
        "tags": [
          "scans"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Undoes an accepted scan (e.g. an accidental duplicate scan) by recording a linked `reversal` scan — the original is kept for audit and the pass counts as not redeemed again. Returns both records; `404` when the scan does not exist or was already reversed.\n\nRequires the `scans:write` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "scans:write"
              ]
            }
          ]
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "description": "Resource identifier"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReverseScanRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicReverseScanResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/scans/batch": {
      "post": {
        "operationId": "postV1ScansBatch",
        "summary": "Record scans in bulk",
        "tags": [
          "scans"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Checks in many passes at once from an operator selection. Each pass is validated and recorded independently through the single-scan pipeline (its own redemption gates), so a denied or already-redeemed pass never blocks the rest. Always returns `200` with a per-pass `results[]` (`accepted` / `duplicate` / `denied` / …, or `result: null` on an unexpected error) plus `totalAccepted` / `totalRejected` / `totalFailed`. Send an `idempotencyKey` so re-submitting the same selection replays instead of double-recording.\n\nRequires the `scans:write` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "scans:write"
              ]
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchRecordScanRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchRecordScanResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/scans/stats": {
      "get": {
        "operationId": "getV1ScansStats",
        "summary": "Scan statistics",
        "tags": [
          "scans"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Aggregated counts for a scope in one call: issued passes valid in the scope (`totalPasses`), how many are redeemed — have an unreversed accepted scan (`redeemed`) — and how many do not (`open`), plus scan totals, denied totals and the latest scan time. Scope with `projectId`/`templateId`, one `scanContextKey`, a context-key range (`scanContextFrom`/`scanContextUntil`), or a capture-time window (`scannedSince`/`scannedUntil`). Pass `groupBy=project` for a per-project breakdown in `groups[]`. This endpoint replaces polling the list endpoints with `limit=1` count queries.\n\nRequires the `scans:read` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "scans:read"
              ]
            }
          ]
        },
        "parameters": [
          {
            "name": "projectId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "description": "Scope all counts to one project."
          },
          {
            "name": "templateId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "description": "Scope all counts to one template."
          },
          {
            "name": "scanContextKey",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          },
          {
            "name": "scanContextFrom",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "scanContextUntil",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "scannedSince",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            },
            "description": "ISO 8601 timestamp"
          },
          {
            "name": "scannedUntil",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            },
            "description": "ISO 8601 timestamp"
          },
          {
            "name": "groupBy",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "project"
              ]
            },
            "description": "Add a per-project breakdown (`groups[]`) alongside the totals."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScanStatsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/scans/stream": {
      "get": {
        "operationId": "getV1ScansStream",
        "summary": "Stream scans in real time (SSE)",
        "tags": [
          "scans"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Server-sent events (`text/event-stream`) stream of scans as they are recorded. Emits a `connected` event on open, then one `scan` event per recorded scan, with comment heartbeats every 25 seconds to keep the connection alive. The optional filters narrow the stream; reversal events are always delivered so consumers can undo earlier scans.\n\nRequires the `scans:read` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "scans:read"
              ]
            }
          ]
        },
        "parameters": [
          {
            "name": "projectId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "templateVersionId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "scanContextKey",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful response"
          }
        }
      }
    },
    "/v1/template-versions": {
      "get": {
        "operationId": "getV1TemplateVersions",
        "summary": "List template versions",
        "tags": [
          "template-versions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Lists all versions of a template, newest first. Returns `404` (`TEMPLATE_NOT_FOUND`) when the template does not exist, and an empty array when it exists but has no versions yet.\n\nRequires the `templates:read` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "templates:read"
              ]
            }
          ]
        },
        "parameters": [
          {
            "name": "templateId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "description": "Template identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicListTemplateVersionsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/template-versions/{id}": {
      "get": {
        "operationId": "getV1TemplateVersionsId",
        "summary": "Get a template version",
        "tags": [
          "template-versions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Fetches a single template version — useful for resolving the `templateVersionId` a pass was issued from.\n\nRequires the `templates:read` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "templates:read"
              ]
            }
          ]
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "description": "Resource identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicGetTemplateVersionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/templates": {
      "get": {
        "operationId": "getV1Templates",
        "summary": "List templates",
        "tags": [
          "templates"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Lists the organization’s pass templates. Filter by `projectId` (a project UUID, or the string `\"null\"` for templates not in any project).\n\nRequires the `templates:read` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "templates:read"
              ]
            }
          ]
        },
        "parameters": [
          {
            "name": "projectId",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                {
                  "type": "string",
                  "const": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicListTemplatesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/templates/{id}/published-version": {
      "get": {
        "operationId": "getV1TemplatesIdPublishedVersion",
        "summary": "Get the published template version",
        "tags": [
          "templates"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Returns the template’s currently published version — the version new passes are issued from. A template has at most one published version; `404` when nothing is published yet.\n\nRequires the `templates:read` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "templates:read"
              ]
            }
          ]
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "description": "Resource identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicGetTemplateVersionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/templates/{id}/published-version/variables-schema": {
      "get": {
        "operationId": "getV1TemplatesIdPublishedVersionVariablesSchema",
        "summary": "Get the template variables schema",
        "tags": [
          "templates"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Returns a JSON Schema describing the variables the template’s published version expects — one labelled string property per variable, with required variables listed. Use it to build dynamic input forms or validate `variables` before creating passes; the Power Automate connector uses it to render the Create Pass fields.\n\nRequires the `templates:read` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "templates:read"
              ]
            }
          ]
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "description": "Resource identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateVariablesSchemaResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhooks/deliveries": {
      "get": {
        "operationId": "getV1WebhooksDeliveries",
        "summary": "List webhook deliveries",
        "tags": [
          "webhooks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Lists delivery attempts, most recent first, with the last response code and error for each. Filter by `endpointId`, `status`, or `eventType` to debug a failing receiver.\n\nRequires the `webhooks:read` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "webhooks:read"
              ]
            }
          ]
        },
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "Number of items per page"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "description": "Opaque cursor returned by the previous page"
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "description": "Deprecated offset compatibility parameter"
          },
          {
            "name": "endpointId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "description": "Webhook endpoint identifier"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "PENDING",
                "SUCCESS",
                "FAILED"
              ]
            }
          },
          {
            "name": "eventType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pass.issued",
                "pass.updated",
                "pass.voided",
                "pass.failed",
                "pass.scanned",
                "pass.scan.reversed",
                "webhook.test"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListWebhookDeliveriesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhooks/deliveries/{id}/redeliver": {
      "post": {
        "operationId": "postV1WebhooksDeliveriesIdRedeliver",
        "summary": "Redeliver a webhook",
        "tags": [
          "webhooks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Queues a new delivery attempt for a failed delivery, reusing the original event payload. Set `force: true` to redeliver regardless of the current delivery status; pass an `idempotencyKey` to make retries of this call safe.\n\nRequires the `webhooks:write` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "webhooks:write"
              ]
            }
          ]
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RedeliverWebhookRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicRedeliverWebhookResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhooks/endpoints": {
      "get": {
        "operationId": "getV1WebhooksEndpoints",
        "summary": "List webhook endpoints",
        "tags": [
          "webhooks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Lists all webhook endpoints registered for the organization.\n\nRequires the `webhooks:read` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "webhooks:read"
              ]
            }
          ]
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicListWebhookEndpointsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "postV1WebhooksEndpoints",
        "summary": "Create a webhook endpoint",
        "tags": [
          "webhooks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Registers an HTTPS URL to receive event notifications. The response includes the HMAC `secret` (used to verify the `X-Passlet-Signature` header on deliveries) and the `simpleToken` sent as `X-Webhook-Token` — both are shown only once, at creation time.\n\nRequires the `webhooks:write` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "webhooks:write"
              ]
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWebhookEndpointRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicCreateWebhookEndpointResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhooks/endpoints/{id}": {
      "delete": {
        "operationId": "deleteV1WebhooksEndpointsId",
        "summary": "Delete a webhook endpoint",
        "tags": [
          "webhooks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Deletes a webhook endpoint and stops future deliveries to it. Endpoints managed by the Power Automate connector cannot be deleted here (`409`) — remove the trigger in Power Automate instead.\n\nRequires the `webhooks:write` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "webhooks:write"
              ]
            }
          ]
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "description": "Webhook endpoint identifier"
          }
        ],
        "responses": {
          "default": {
            "description": "Successful response"
          }
        }
      },
      "get": {
        "operationId": "getV1WebhooksEndpointsId",
        "summary": "Get a webhook endpoint",
        "tags": [
          "webhooks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Fetches a single webhook endpoint. Secrets are never included; they are only returned once when the endpoint is created.\n\nRequires the `webhooks:read` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "webhooks:read"
              ]
            }
          ]
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "description": "Webhook endpoint identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicWebhookEndpoint"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "patchV1WebhooksEndpointsId",
        "summary": "Update a webhook endpoint",
        "tags": [
          "webhooks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Partially updates the URL, subscribed events, enabled flag, or description. Endpoints managed by the Power Automate connector cannot be modified here (`409`).\n\nRequires the `webhooks:write` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "webhooks:write"
              ]
            }
          ]
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "description": "Webhook endpoint identifier"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWebhookEndpointRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicWebhookEndpoint"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhooks/endpoints/{id}/test": {
      "post": {
        "operationId": "postV1WebhooksEndpointsIdTest",
        "summary": "Send a test event",
        "tags": [
          "webhooks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Queues a one-off `webhook.test` delivery to the endpoint — regardless of its event subscriptions — so you can verify your receiver end to end, including signature validation. Rate limited per organization.\n\nRequires the `webhooks:write` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "webhooks:write"
              ]
            }
          ]
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "description": "Webhook endpoint identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicSendTestWebhookEventResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhooks/triggers/{eventType}": {
      "post": {
        "operationId": "postV1WebhooksTriggersEventType",
        "summary": "Create a trigger subscription (Power Automate)",
        "tags": [
          "webhooks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Webhook subscription endpoint implementing the Microsoft Power Platform connector contract; the Passlet Power Automate connector calls it when a flow using a Passlet trigger is turned on. Responds `201` with a `Location` header identifying the subscription, which Power Automate later calls with `DELETE` to unsubscribe.\n\nNot intended for direct integrations: subscriptions created here deliver a single event type, return no signing secret, and cannot be managed through the `/v1/webhooks/endpoints` API. Create a webhook endpoint via `POST /v1/webhooks/endpoints` instead.\n\nRequires the `webhooks:write` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "webhooks:write"
              ]
            }
          ]
        },
        "parameters": [
          {
            "name": "eventType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "pass.issued",
                "pass.updated",
                "pass.voided",
                "pass.failed",
                "pass.scanned",
                "pass.scan.reversed"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "callbackUrl": {
                    "type": "string",
                    "format": "uri"
                  }
                },
                "required": [
                  "callbackUrl"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "callbackUrl": {
                      "type": "string"
                    },
                    "eventType": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "callbackUrl",
                    "eventType"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhooks/triggers/{id}": {
      "delete": {
        "operationId": "deleteV1WebhooksTriggersId",
        "summary": "Delete a trigger subscription (Power Automate)",
        "tags": [
          "webhooks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Removes a webhook subscription created by `POST /v1/webhooks/triggers/{eventType}`. Power Automate calls this automatically — via the URL from the subscription response’s `Location` header — when a flow is turned off or deleted. Webhook endpoints created via `POST /v1/webhooks/endpoints` are not visible to this operation (`404`).\n\nRequires the `webhooks:write` scope on the access token.",
        "x-required-scopes": {
          "allOf": [
            {
              "anyOf": [
                "webhooks:write"
              ]
            }
          ]
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "deleted": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "id",
                    "deleted"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ApiError": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "errorCode": {
            "type": "string",
            "enum": [
              "UNAUTHORIZED",
              "FORBIDDEN",
              "TOKEN_EXPIRED",
              "TOKEN_INVALID",
              "CSRF_TOKEN_INVALID",
              "TENANT_EXPIRED",
              "TENANT_NOT_FOUND",
              "ORGANIZATION_REQUIRED",
              "TENANT_SUSPENDED",
              "VALIDATION_ERROR",
              "INVALID_INPUT",
              "MISSING_REQUIRED_FIELD",
              "INVALID_FORMAT",
              "NOT_FOUND",
              "PASS_NOT_FOUND",
              "TEMPLATE_NOT_FOUND",
              "WEBHOOK_NOT_FOUND",
              "NOTIFICATION_NOT_FOUND",
              "CONFLICT",
              "VERSION_CONFLICT",
              "DUPLICATE_PASS",
              "IDEMPOTENCY_CONFLICT",
              "TEMPLATE_VERSION_NOT_NEWER",
              "SCAN_REVERSAL_WINDOW_EXPIRED",
              "WEBHOOK_MANAGED_EXTERNALLY",
              "PASS_ALREADY_ISSUED",
              "PASS_ALREADY_VOIDED",
              "PASS_NOT_ISSUED",
              "PASS_ISSUING_FAILED",
              "APPLE_SIGNING_FAILED",
              "APPLE_APNS_FAILED",
              "GOOGLE_API_FAILED",
              "GOOGLE_JWT_FAILED",
              "PROVIDER_UNAVAILABLE",
              "LINK_EXPIRED",
              "LINK_REVOKED",
              "LINK_INVALID",
              "TOKEN_SIGNATURE_INVALID",
              "TOKEN_CLOCK_SKEW",
              "RATE_LIMITED",
              "TOO_MANY_REQUESTS",
              "INTERNAL_ERROR",
              "SERVICE_UNAVAILABLE",
              "JOB_FAILED"
            ],
            "description": "Machine-readable error code"
          },
          "message": {
            "type": "string",
            "description": "Human-readable error message"
          },
          "correlationId": {
            "type": "string",
            "description": "Request correlation ID for debugging"
          },
          "details": {
            "description": "Additional error details",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "errorCode",
          "message",
          "correlationId"
        ],
        "additionalProperties": false
      },
      "BatchRecordScanRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "passIds": {
            "minItems": 1,
            "maxItems": 200,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Pass identifier"
            },
            "description": "Pass IDs to check in (max 200)"
          },
          "projectId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "scanContextKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "validityDate": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "context": {
            "type": "object",
            "properties": {
              "gate": {
                "type": "string",
                "maxLength": 64
              },
              "lane": {
                "type": "string",
                "maxLength": 64
              },
              "location": {
                "type": "string",
                "maxLength": 255
              },
              "sessionId": {
                "type": "string",
                "maxLength": 255
              },
              "note": {
                "type": "string",
                "maxLength": 500
              }
            },
            "additionalProperties": {}
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": [
          "passIds"
        ]
      },
      "BatchRecordScanResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "totalRequested": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "totalAccepted": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "totalRejected": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "totalFailed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "passId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                  "description": "Pass identifier"
                },
                "result": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "accepted",
                        "duplicate",
                        "unknown",
                        "ambiguous",
                        "denied",
                        "reversal"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reasonCode": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "valid",
                        "stale_identifier",
                        "already_scanned",
                        "not_active",
                        "expired",
                        "revoked",
                        "wrong_scope",
                        "not_valid_context",
                        "out_of_window",
                        "quota_exhausted",
                        "cooldown",
                        "no_match",
                        "multiple_matches"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "passId",
                "result",
                "reasonCode",
                "message"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "totalRequested",
          "totalAccepted",
          "totalRejected",
          "totalFailed",
          "results"
        ],
        "additionalProperties": false
      },
      "BatchVoidPassesRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "passIds": {
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Pass identifier"
            },
            "description": "Pass IDs to void (max 100)"
          },
          "reason": {
            "description": "Optional reason for voiding all selected passes",
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          }
        },
        "required": [
          "passIds"
        ]
      },
      "CreateProjectRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ]
          },
          "color": {
            "type": "string",
            "enum": [
              "gray",
              "red",
              "orange",
              "yellow",
              "green",
              "blue",
              "indigo",
              "purple",
              "pink"
            ]
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      },
      "CreateWebhookEndpointRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Webhook delivery URL"
          },
          "events": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "pass.issued",
                "pass.updated",
                "pass.voided",
                "pass.failed",
                "pass.scanned",
                "pass.scan.reversed"
              ]
            },
            "description": "Events to subscribe to"
          },
          "enabled": {
            "default": true,
            "type": "boolean"
          },
          "description": {
            "description": "Optional human-readable label",
            "type": "string",
            "maxLength": 255
          }
        },
        "required": [
          "url",
          "events"
        ]
      },
      "ListWebhookDeliveriesResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "endpointId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                  "description": "Webhook endpoint identifier"
                },
                "eventType": {
                  "type": "string",
                  "enum": [
                    "pass.issued",
                    "pass.updated",
                    "pass.voided",
                    "pass.failed",
                    "pass.scanned",
                    "pass.scan.reversed",
                    "webhook.test"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "PENDING",
                    "SUCCESS",
                    "FAILED"
                  ]
                },
                "attempts": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "lastResponseCode": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "lastError": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
                  "description": "ISO 8601 timestamp"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
                  "description": "ISO 8601 timestamp"
                },
                "endpointUrl": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uri"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "endpointId",
                "eventType",
                "status",
                "attempts",
                "lastResponseCode",
                "lastError",
                "createdAt",
                "updatedAt",
                "endpointUrl"
              ],
              "additionalProperties": false
            }
          },
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Total number of items"
          },
          "limit": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Items per page"
          },
          "offset": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Items skipped"
          },
          "nextCursor": {
            "description": "Opaque cursor for the next page, or null when exhausted",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "hasMore": {
            "type": "boolean",
            "description": "Whether more items exist"
          }
        },
        "required": [
          "items",
          "total",
          "limit",
          "offset",
          "hasMore"
        ],
        "additionalProperties": false
      },
      "ProjectStatsResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "templateCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "livePassCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "totalPassCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "googleInstallCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "projectId",
          "templateCount",
          "livePassCount",
          "totalPassCount",
          "googleInstallCount"
        ],
        "additionalProperties": false
      },
      "PublicBatchVoidPassesResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "totalRequested": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "totalVoided": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "totalFailed": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "passId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                  "description": "Pass identifier"
                },
                "success": {
                  "type": "boolean"
                },
                "error": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "passId",
                "success"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "totalRequested",
          "totalVoided",
          "totalFailed",
          "results"
        ],
        "additionalProperties": false
      },
      "PublicCreateBatchPassesRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "passes": {
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "externalPassId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255,
                  "description": "External system pass ID (used for idempotency)"
                },
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255,
                  "description": "Pass holder display name"
                },
                "templateId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                  "description": "Template to use for this pass"
                },
                "variables": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {},
                  "description": "Variables to store as pass input data"
                }
              },
              "required": [
                "externalPassId",
                "label",
                "templateId",
                "variables"
              ],
              "additionalProperties": false
            },
            "description": "Array of passes to create (max 100)"
          }
        },
        "required": [
          "passes"
        ]
      },
      "PublicCreateBatchPassesResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "totalRequested": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Total passes requested"
          },
          "totalCreated": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Total passes successfully created"
          },
          "totalFailed": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Total passes that failed"
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "externalPassId": {
                  "type": "string",
                  "description": "External pass ID from request"
                },
                "success": {
                  "type": "boolean",
                  "description": "Whether this pass was created successfully"
                },
                "pass": {
                  "description": "Pass data if successful",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                      "description": "Pass identifier"
                    },
                    "externalPassId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255,
                      "description": "External system pass ID"
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255,
                      "description": "Pass holder display name"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "QUEUED",
                        "ISSUING",
                        "ISSUED",
                        "VOID",
                        "FAILED",
                        "EXPIRED"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991,
                      "description": "Optimistic locking version"
                    },
                    "templateVersionId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Template version the pass currently renders with. Pinned at issue time; only changes via an explicit template upgrade to a newer published version of the same template."
                    },
                    "templateId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "description": "Template identifier"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Template identifier this pass was issued from"
                    },
                    "projectId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Project the pass lives in"
                    },
                    "variables": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {},
                      "description": "Stored pass variables"
                    },
                    "redemption": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "windows": {
                              "minItems": 1,
                              "maxItems": 366,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "start": {
                                    "type": "string",
                                    "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?(Z|[+-]([01]\\d|2[0-3]):[0-5]\\d)$"
                                  },
                                  "end": {
                                    "type": "string",
                                    "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?(Z|[+-]([01]\\d|2[0-3]):[0-5]\\d)$"
                                  },
                                  "maxUses": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 100000
                                  }
                                },
                                "additionalProperties": false
                              }
                            },
                            "maxUses": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100000
                            },
                            "perPeriod": {
                              "type": "object",
                              "properties": {
                                "unit": {
                                  "type": "string",
                                  "enum": [
                                    "day",
                                    "week",
                                    "month"
                                  ]
                                },
                                "count": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 100000
                                },
                                "timezone": {
                                  "type": "string",
                                  "pattern": "^(?:UTC|GMT|[A-Za-z_]+\\/[A-Za-z0-9_+-]+(?:\\/[A-Za-z0-9_+-]+)?)$",
                                  "description": "IANA timezone identifier"
                                }
                              },
                              "required": [
                                "unit",
                                "count",
                                "timezone"
                              ],
                              "additionalProperties": false
                            },
                            "minIntervalMinutes": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 527040
                            },
                            "activation": {
                              "type": "object",
                              "properties": {
                                "basis": {
                                  "type": "string",
                                  "const": "firstScan"
                                },
                                "validForHours": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 87840
                                }
                              },
                              "required": [
                                "basis",
                                "validForHours"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Resolved redemption policy enforced at scan time"
                    },
                    "expiresAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
                          "description": "ISO 8601 timestamp"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Pass expiration timestamp"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
                      "description": "ISO 8601 timestamp"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
                      "description": "ISO 8601 timestamp"
                    },
                    "hostedLinks": {
                      "type": "object",
                      "properties": {
                        "apple": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uri"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Apple Wallet add link"
                        },
                        "google": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uri"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Google Wallet add link"
                        }
                      },
                      "required": [
                        "apple",
                        "google"
                      ],
                      "additionalProperties": false,
                      "description": "Hosted add-to-wallet links"
                    }
                  },
                  "required": [
                    "id",
                    "externalPassId",
                    "label",
                    "status",
                    "version",
                    "templateVersionId",
                    "templateId",
                    "projectId",
                    "variables",
                    "redemption",
                    "expiresAt",
                    "createdAt",
                    "updatedAt",
                    "hostedLinks"
                  ],
                  "additionalProperties": false
                },
                "error": {
                  "description": "Error details if failed",
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "externalPassId",
                "success"
              ],
              "additionalProperties": false
            },
            "description": "Results for each pass"
          }
        },
        "required": [
          "totalRequested",
          "totalCreated",
          "totalFailed",
          "results"
        ],
        "additionalProperties": false
      },
      "PublicCreatePassRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "externalPassId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "description": "External system pass ID (used for idempotency)"
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "description": "Pass holder display name"
          },
          "templateId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "Template to use for this pass"
          },
          "variables": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {},
            "description": "Variables to store as pass input data"
          }
        },
        "required": [
          "externalPassId",
          "label",
          "templateId",
          "variables"
        ],
        "additionalProperties": false
      },
      "PublicCreatePassResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "Pass identifier"
          },
          "externalPassId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "description": "External system pass ID"
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "description": "Pass holder display name"
          },
          "status": {
            "type": "string",
            "enum": [
              "QUEUED",
              "ISSUING",
              "ISSUED",
              "VOID",
              "FAILED",
              "EXPIRED"
            ]
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991,
            "description": "Optimistic locking version"
          },
          "templateVersionId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Template version the pass currently renders with. Pinned at issue time; only changes via an explicit template upgrade to a newer published version of the same template."
          },
          "templateId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "Template identifier"
              },
              {
                "type": "null"
              }
            ],
            "description": "Template identifier this pass was issued from"
          },
          "projectId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Project the pass lives in"
          },
          "variables": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {},
            "description": "Stored pass variables"
          },
          "redemption": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "windows": {
                    "minItems": 1,
                    "maxItems": 366,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string",
                          "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?(Z|[+-]([01]\\d|2[0-3]):[0-5]\\d)$"
                        },
                        "end": {
                          "type": "string",
                          "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?(Z|[+-]([01]\\d|2[0-3]):[0-5]\\d)$"
                        },
                        "maxUses": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 100000
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "maxUses": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100000
                  },
                  "perPeriod": {
                    "type": "object",
                    "properties": {
                      "unit": {
                        "type": "string",
                        "enum": [
                          "day",
                          "week",
                          "month"
                        ]
                      },
                      "count": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100000
                      },
                      "timezone": {
                        "type": "string",
                        "pattern": "^(?:UTC|GMT|[A-Za-z_]+\\/[A-Za-z0-9_+-]+(?:\\/[A-Za-z0-9_+-]+)?)$",
                        "description": "IANA timezone identifier"
                      }
                    },
                    "required": [
                      "unit",
                      "count",
                      "timezone"
                    ],
                    "additionalProperties": false
                  },
                  "minIntervalMinutes": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 527040
                  },
                  "activation": {
                    "type": "object",
                    "properties": {
                      "basis": {
                        "type": "string",
                        "const": "firstScan"
                      },
                      "validForHours": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 87840
                      }
                    },
                    "required": [
                      "basis",
                      "validForHours"
                    ],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "Resolved redemption policy enforced at scan time"
          },
          "expiresAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
                "description": "ISO 8601 timestamp"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pass expiration timestamp"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
            "description": "ISO 8601 timestamp"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
            "description": "ISO 8601 timestamp"
          },
          "hostedLinks": {
            "type": "object",
            "properties": {
              "apple": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Apple Wallet add link"
              },
              "google": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Google Wallet add link"
              }
            },
            "required": [
              "apple",
              "google"
            ],
            "additionalProperties": false,
            "description": "Hosted add-to-wallet links"
          }
        },
        "required": [
          "id",
          "externalPassId",
          "label",
          "status",
          "version",
          "templateVersionId",
          "templateId",
          "projectId",
          "variables",
          "redemption",
          "expiresAt",
          "createdAt",
          "updatedAt",
          "hostedLinks"
        ],
        "additionalProperties": false
      },
      "PublicCreateWebhookEndpointResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "Webhook endpoint identifier"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Webhook delivery URL"
          },
          "events": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "pass.issued",
                "pass.updated",
                "pass.voided",
                "pass.failed",
                "pass.scanned",
                "pass.scan.reversed"
              ]
            },
            "description": "Events to receive"
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether the endpoint is active"
          },
          "description": {
            "description": "Optional human-readable label for the endpoint",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
            "description": "ISO 8601 timestamp"
          },
          "secret": {
            "type": "string",
            "description": "HMAC secret (shown only once)"
          },
          "simpleToken": {
            "type": "string",
            "description": "Simple verification token for X-Webhook-Token header (for Power Automate)"
          }
        },
        "required": [
          "id",
          "url",
          "events",
          "enabled",
          "createdAt",
          "secret",
          "simpleToken"
        ],
        "additionalProperties": false
      },
      "PublicGetTemplateVersionResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "templateId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "Template identifier"
          },
          "version": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "stage": {
            "type": "string",
            "enum": [
              "draft",
              "published"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
            "description": "ISO 8601 timestamp"
          },
          "publishedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
                "description": "ISO 8601 timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
            "description": "ISO 8601 timestamp"
          }
        },
        "required": [
          "id",
          "templateId",
          "version",
          "stage",
          "createdAt",
          "publishedAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "PublicListPassesResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                  "description": "Pass identifier"
                },
                "externalPassId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255,
                  "description": "External system pass ID"
                },
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255,
                  "description": "Pass holder display name"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "QUEUED",
                    "ISSUING",
                    "ISSUED",
                    "VOID",
                    "FAILED",
                    "EXPIRED"
                  ]
                },
                "version": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991,
                  "description": "Optimistic locking version"
                },
                "templateVersionId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Template version the pass currently renders with. Pinned at issue time; only changes via an explicit template upgrade to a newer published version of the same template."
                },
                "templateId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                      "description": "Template identifier"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Template identifier this pass was issued from"
                },
                "projectId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Project the pass lives in"
                },
                "variables": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {},
                  "description": "Stored pass variables"
                },
                "redemption": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "windows": {
                          "minItems": 1,
                          "maxItems": 366,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "start": {
                                "type": "string",
                                "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?(Z|[+-]([01]\\d|2[0-3]):[0-5]\\d)$"
                              },
                              "end": {
                                "type": "string",
                                "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?(Z|[+-]([01]\\d|2[0-3]):[0-5]\\d)$"
                              },
                              "maxUses": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 100000
                              }
                            },
                            "additionalProperties": false
                          }
                        },
                        "maxUses": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 100000
                        },
                        "perPeriod": {
                          "type": "object",
                          "properties": {
                            "unit": {
                              "type": "string",
                              "enum": [
                                "day",
                                "week",
                                "month"
                              ]
                            },
                            "count": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100000
                            },
                            "timezone": {
                              "type": "string",
                              "pattern": "^(?:UTC|GMT|[A-Za-z_]+\\/[A-Za-z0-9_+-]+(?:\\/[A-Za-z0-9_+-]+)?)$",
                              "description": "IANA timezone identifier"
                            }
                          },
                          "required": [
                            "unit",
                            "count",
                            "timezone"
                          ],
                          "additionalProperties": false
                        },
                        "minIntervalMinutes": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 527040
                        },
                        "activation": {
                          "type": "object",
                          "properties": {
                            "basis": {
                              "type": "string",
                              "const": "firstScan"
                            },
                            "validForHours": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 87840
                            }
                          },
                          "required": [
                            "basis",
                            "validForHours"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Resolved redemption policy enforced at scan time"
                },
                "expiresAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
                      "description": "ISO 8601 timestamp"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Pass expiration timestamp"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
                  "description": "ISO 8601 timestamp"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
                  "description": "ISO 8601 timestamp"
                }
              },
              "required": [
                "id",
                "externalPassId",
                "label",
                "status",
                "version",
                "templateVersionId",
                "templateId",
                "projectId",
                "variables",
                "redemption",
                "expiresAt",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": false
            }
          },
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Total number of items"
          },
          "limit": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Items per page"
          },
          "offset": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Items skipped"
          },
          "nextCursor": {
            "description": "Opaque cursor for the next page, or null when exhausted",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "hasMore": {
            "type": "boolean",
            "description": "Whether more items exist"
          }
        },
        "required": [
          "items",
          "total",
          "limit",
          "offset",
          "hasMore"
        ],
        "additionalProperties": false
      },
      "PublicListProjectsResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "name": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 2000
                },
                {
                  "type": "null"
                }
              ]
            },
            "color": {
              "type": "string",
              "enum": [
                "gray",
                "red",
                "orange",
                "yellow",
                "green",
                "blue",
                "indigo",
                "purple",
                "pink"
              ]
            },
            "createdAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
              "description": "ISO 8601 timestamp"
            },
            "updatedAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
              "description": "ISO 8601 timestamp"
            },
            "templateCount": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "id",
            "name",
            "description",
            "color",
            "createdAt",
            "updatedAt",
            "templateCount"
          ],
          "additionalProperties": false
        }
      },
      "PublicListScansResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "passId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                      "description": "Pass identifier"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "projectId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "templateVersionId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "redemptionSnapshot": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "windows": {
                          "minItems": 1,
                          "maxItems": 366,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "start": {
                                "type": "string",
                                "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?(Z|[+-]([01]\\d|2[0-3]):[0-5]\\d)$"
                              },
                              "end": {
                                "type": "string",
                                "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?(Z|[+-]([01]\\d|2[0-3]):[0-5]\\d)$"
                              },
                              "maxUses": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 100000
                              }
                            },
                            "additionalProperties": false
                          }
                        },
                        "maxUses": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 100000
                        },
                        "perPeriod": {
                          "type": "object",
                          "properties": {
                            "unit": {
                              "type": "string",
                              "enum": [
                                "day",
                                "week",
                                "month"
                              ]
                            },
                            "count": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100000
                            },
                            "timezone": {
                              "type": "string",
                              "pattern": "^(?:UTC|GMT|[A-Za-z_]+\\/[A-Za-z0-9_+-]+(?:\\/[A-Za-z0-9_+-]+)?)$",
                              "description": "IANA timezone identifier"
                            }
                          },
                          "required": [
                            "unit",
                            "count",
                            "timezone"
                          ],
                          "additionalProperties": false
                        },
                        "minIntervalMinutes": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 527040
                        },
                        "activation": {
                          "type": "object",
                          "properties": {
                            "basis": {
                              "type": "string",
                              "const": "firstScan"
                            },
                            "validForHours": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 87840
                            }
                          },
                          "required": [
                            "basis",
                            "validForHours"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "scanContextKey": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 128
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "scannedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
                  "description": "ISO 8601 timestamp"
                },
                "recordedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
                  "description": "ISO 8601 timestamp"
                },
                "result": {
                  "type": "string",
                  "enum": [
                    "accepted",
                    "duplicate",
                    "unknown",
                    "ambiguous",
                    "denied",
                    "reversal"
                  ]
                },
                "reasonCode": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "valid",
                        "stale_identifier",
                        "already_scanned",
                        "not_active",
                        "expired",
                        "revoked",
                        "wrong_scope",
                        "not_valid_context",
                        "out_of_window",
                        "quota_exhausted",
                        "cooldown",
                        "no_match",
                        "multiple_matches"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reversesScanId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "deviceId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 128
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source": {
                  "type": "string",
                  "enum": [
                    "mobile_app",
                    "api",
                    "manual_admin"
                  ]
                },
                "matchedBy": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "scanner_qr_payload",
                        "pass_id",
                        "identifier",
                        "apple_serial",
                        "google_object_id"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "context": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "externalRef": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 255
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 500
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "matchedCount": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
                  "description": "ISO 8601 timestamp"
                }
              },
              "required": [
                "id",
                "passId",
                "projectId",
                "templateVersionId",
                "redemptionSnapshot",
                "scanContextKey",
                "scannedAt",
                "recordedAt",
                "result",
                "reasonCode",
                "reversesScanId",
                "deviceId",
                "source",
                "matchedBy",
                "context",
                "externalRef",
                "reason",
                "matchedCount",
                "createdAt"
              ],
              "additionalProperties": false
            }
          },
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Total number of items"
          },
          "limit": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Items per page"
          },
          "offset": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Items skipped"
          },
          "nextCursor": {
            "description": "Opaque cursor for the next page, or null when exhausted",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "hasMore": {
            "type": "boolean",
            "description": "Whether more items exist"
          }
        },
        "required": [
          "items",
          "total",
          "limit",
          "offset",
          "hasMore"
        ],
        "additionalProperties": false
      },
      "PublicListTemplatesResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Template identifier"
            },
            "name": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "createdAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
              "description": "ISO 8601 timestamp"
            },
            "updatedAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
              "description": "ISO 8601 timestamp"
            }
          },
          "required": [
            "id",
            "name",
            "createdAt",
            "updatedAt"
          ],
          "additionalProperties": false
        }
      },
      "PublicListTemplateVersionsResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "templateId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Template identifier"
            },
            "version": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "stage": {
              "type": "string",
              "enum": [
                "draft",
                "published"
              ]
            },
            "createdAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
              "description": "ISO 8601 timestamp"
            },
            "publishedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
                  "description": "ISO 8601 timestamp"
                },
                {
                  "type": "null"
                }
              ]
            },
            "updatedAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
              "description": "ISO 8601 timestamp"
            }
          },
          "required": [
            "id",
            "templateId",
            "version",
            "stage",
            "createdAt",
            "publishedAt",
            "updatedAt"
          ],
          "additionalProperties": false
        }
      },
      "PublicListWebhookEndpointsResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                  "description": "Webhook endpoint identifier"
                },
                "url": {
                  "type": "string",
                  "format": "uri",
                  "description": "Webhook delivery URL"
                },
                "events": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "pass.issued",
                      "pass.updated",
                      "pass.voided",
                      "pass.failed",
                      "pass.scanned",
                      "pass.scan.reversed"
                    ]
                  },
                  "description": "Events to receive"
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Whether the endpoint is active"
                },
                "description": {
                  "description": "Optional human-readable label for the endpoint",
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 255
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
                  "description": "ISO 8601 timestamp"
                }
              },
              "required": [
                "id",
                "url",
                "events",
                "enabled",
                "createdAt"
              ],
              "additionalProperties": false
            }
          },
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "items",
          "total"
        ],
        "additionalProperties": false
      },
      "PublicPassScan": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "passId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "Pass identifier"
              },
              {
                "type": "null"
              }
            ]
          },
          "projectId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "templateVersionId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "redemptionSnapshot": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "windows": {
                    "minItems": 1,
                    "maxItems": 366,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string",
                          "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?(Z|[+-]([01]\\d|2[0-3]):[0-5]\\d)$"
                        },
                        "end": {
                          "type": "string",
                          "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?(Z|[+-]([01]\\d|2[0-3]):[0-5]\\d)$"
                        },
                        "maxUses": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 100000
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "maxUses": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100000
                  },
                  "perPeriod": {
                    "type": "object",
                    "properties": {
                      "unit": {
                        "type": "string",
                        "enum": [
                          "day",
                          "week",
                          "month"
                        ]
                      },
                      "count": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100000
                      },
                      "timezone": {
                        "type": "string",
                        "pattern": "^(?:UTC|GMT|[A-Za-z_]+\\/[A-Za-z0-9_+-]+(?:\\/[A-Za-z0-9_+-]+)?)$",
                        "description": "IANA timezone identifier"
                      }
                    },
                    "required": [
                      "unit",
                      "count",
                      "timezone"
                    ],
                    "additionalProperties": false
                  },
                  "minIntervalMinutes": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 527040
                  },
                  "activation": {
                    "type": "object",
                    "properties": {
                      "basis": {
                        "type": "string",
                        "const": "firstScan"
                      },
                      "validForHours": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 87840
                      }
                    },
                    "required": [
                      "basis",
                      "validForHours"
                    ],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "scanContextKey": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 128
              },
              {
                "type": "null"
              }
            ]
          },
          "scannedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
            "description": "ISO 8601 timestamp"
          },
          "recordedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
            "description": "ISO 8601 timestamp"
          },
          "result": {
            "type": "string",
            "enum": [
              "accepted",
              "duplicate",
              "unknown",
              "ambiguous",
              "denied",
              "reversal"
            ]
          },
          "reasonCode": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "valid",
                  "stale_identifier",
                  "already_scanned",
                  "not_active",
                  "expired",
                  "revoked",
                  "wrong_scope",
                  "not_valid_context",
                  "out_of_window",
                  "quota_exhausted",
                  "cooldown",
                  "no_match",
                  "multiple_matches"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "reversesScanId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "deviceId": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 128
              },
              {
                "type": "null"
              }
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "mobile_app",
              "api",
              "manual_admin"
            ]
          },
          "matchedBy": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "scanner_qr_payload",
                  "pass_id",
                  "identifier",
                  "apple_serial",
                  "google_object_id"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "context": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "externalRef": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "reason": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          },
          "matchedCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
            "description": "ISO 8601 timestamp"
          }
        },
        "required": [
          "id",
          "passId",
          "projectId",
          "templateVersionId",
          "redemptionSnapshot",
          "scanContextKey",
          "scannedAt",
          "recordedAt",
          "result",
          "reasonCode",
          "reversesScanId",
          "deviceId",
          "source",
          "matchedBy",
          "context",
          "externalRef",
          "reason",
          "matchedCount",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "PublicProject": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ]
          },
          "color": {
            "type": "string",
            "enum": [
              "gray",
              "red",
              "orange",
              "yellow",
              "green",
              "blue",
              "indigo",
              "purple",
              "pink"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
            "description": "ISO 8601 timestamp"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
            "description": "ISO 8601 timestamp"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "color",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "PublicRecordScanResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "result": {
            "type": "string",
            "enum": [
              "accepted",
              "duplicate",
              "unknown",
              "ambiguous",
              "denied",
              "reversal"
            ]
          },
          "reasonCode": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "valid",
                  "stale_identifier",
                  "already_scanned",
                  "not_active",
                  "expired",
                  "revoked",
                  "wrong_scope",
                  "not_valid_context",
                  "out_of_window",
                  "quota_exhausted",
                  "cooldown",
                  "no_match",
                  "multiple_matches"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "scan": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "passId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                        "description": "Pass identifier"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "projectId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "templateVersionId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "redemptionSnapshot": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "windows": {
                            "minItems": 1,
                            "maxItems": 366,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "start": {
                                  "type": "string",
                                  "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?(Z|[+-]([01]\\d|2[0-3]):[0-5]\\d)$"
                                },
                                "end": {
                                  "type": "string",
                                  "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?(Z|[+-]([01]\\d|2[0-3]):[0-5]\\d)$"
                                },
                                "maxUses": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 100000
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "maxUses": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100000
                          },
                          "perPeriod": {
                            "type": "object",
                            "properties": {
                              "unit": {
                                "type": "string",
                                "enum": [
                                  "day",
                                  "week",
                                  "month"
                                ]
                              },
                              "count": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 100000
                              },
                              "timezone": {
                                "type": "string",
                                "pattern": "^(?:UTC|GMT|[A-Za-z_]+\\/[A-Za-z0-9_+-]+(?:\\/[A-Za-z0-9_+-]+)?)$",
                                "description": "IANA timezone identifier"
                              }
                            },
                            "required": [
                              "unit",
                              "count",
                              "timezone"
                            ],
                            "additionalProperties": false
                          },
                          "minIntervalMinutes": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 527040
                          },
                          "activation": {
                            "type": "object",
                            "properties": {
                              "basis": {
                                "type": "string",
                                "const": "firstScan"
                              },
                              "validForHours": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 87840
                              }
                            },
                            "required": [
                              "basis",
                              "validForHours"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "scanContextKey": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 128
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "scannedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
                    "description": "ISO 8601 timestamp"
                  },
                  "recordedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
                    "description": "ISO 8601 timestamp"
                  },
                  "result": {
                    "type": "string",
                    "enum": [
                      "accepted",
                      "duplicate",
                      "unknown",
                      "ambiguous",
                      "denied",
                      "reversal"
                    ]
                  },
                  "reasonCode": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "valid",
                          "stale_identifier",
                          "already_scanned",
                          "not_active",
                          "expired",
                          "revoked",
                          "wrong_scope",
                          "not_valid_context",
                          "out_of_window",
                          "quota_exhausted",
                          "cooldown",
                          "no_match",
                          "multiple_matches"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "reversesScanId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "deviceId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 128
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "mobile_app",
                      "api",
                      "manual_admin"
                    ]
                  },
                  "matchedBy": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "scanner_qr_payload",
                          "pass_id",
                          "identifier",
                          "apple_serial",
                          "google_object_id"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "context": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "externalRef": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "reason": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "matchedCount": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
                    "description": "ISO 8601 timestamp"
                  }
                },
                "required": [
                  "id",
                  "passId",
                  "projectId",
                  "templateVersionId",
                  "redemptionSnapshot",
                  "scanContextKey",
                  "scannedAt",
                  "recordedAt",
                  "result",
                  "reasonCode",
                  "reversesScanId",
                  "deviceId",
                  "source",
                  "matchedBy",
                  "context",
                  "externalRef",
                  "reason",
                  "matchedCount",
                  "createdAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "pass": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "Pass identifier"
                  },
                  "externalPassId": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "QUEUED",
                      "ISSUING",
                      "ISSUED",
                      "VOID",
                      "FAILED",
                      "EXPIRED"
                    ]
                  },
                  "projectId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "projectName": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "templateVersionId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "templateName": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "templateVersionNumber": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "expiresAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
                        "description": "ISO 8601 timestamp"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "acceptedScanCount": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "lastAcceptedScanAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
                        "description": "ISO 8601 timestamp"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "scanContextKey": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "contextAcceptedScanCount": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "contextLastAcceptedScanAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
                        "description": "ISO 8601 timestamp"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "photoUrl": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uri"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "variables": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {},
                    "description": "Stored pass input variables used for scanner/operator inspection"
                  }
                },
                "required": [
                  "id",
                  "externalPassId",
                  "label",
                  "status",
                  "projectId",
                  "projectName",
                  "templateVersionId",
                  "templateName",
                  "templateVersionNumber",
                  "expiresAt",
                  "acceptedScanCount",
                  "lastAcceptedScanAt",
                  "scanContextKey",
                  "contextAcceptedScanCount",
                  "contextLastAcceptedScanAt",
                  "photoUrl",
                  "variables"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "candidates": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                  "description": "Pass identifier"
                },
                "externalPassId": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "QUEUED",
                    "ISSUING",
                    "ISSUED",
                    "VOID",
                    "FAILED",
                    "EXPIRED"
                  ]
                },
                "projectId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "projectName": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "templateVersionId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "templateName": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "templateVersionNumber": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "expiresAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
                      "description": "ISO 8601 timestamp"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "acceptedScanCount": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "lastAcceptedScanAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
                      "description": "ISO 8601 timestamp"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "scanContextKey": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "contextAcceptedScanCount": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "contextLastAcceptedScanAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
                      "description": "ISO 8601 timestamp"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "photoUrl": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uri"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "variables": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {},
                  "description": "Stored pass input variables used for scanner/operator inspection"
                }
              },
              "required": [
                "id",
                "externalPassId",
                "label",
                "status",
                "projectId",
                "projectName",
                "templateVersionId",
                "templateName",
                "templateVersionNumber",
                "expiresAt",
                "acceptedScanCount",
                "lastAcceptedScanAt",
                "scanContextKey",
                "contextAcceptedScanCount",
                "contextLastAcceptedScanAt",
                "photoUrl",
                "variables"
              ],
              "additionalProperties": false
            }
          },
          "message": {
            "type": "string"
          },
          "priorScanCount": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "isFirstScan": {
            "default": false,
            "type": "boolean"
          },
          "idempotentReplay": {
            "default": false,
            "type": "boolean"
          }
        },
        "required": [
          "result",
          "reasonCode",
          "scan",
          "pass",
          "message",
          "priorScanCount",
          "isFirstScan",
          "idempotentReplay"
        ],
        "additionalProperties": false
      },
      "PublicRedeliverWebhookResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "deliveryId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "SUCCESS",
              "FAILED"
            ]
          },
          "runAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
            "description": "ISO 8601 timestamp"
          },
          "idempotentReplay": {
            "default": false,
            "type": "boolean"
          }
        },
        "required": [
          "deliveryId",
          "status",
          "runAt",
          "idempotentReplay"
        ],
        "additionalProperties": false
      },
      "PublicReverseScanResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "reversal": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "passId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "Pass identifier"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "projectId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "templateVersionId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "redemptionSnapshot": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "windows": {
                        "minItems": 1,
                        "maxItems": 366,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "start": {
                              "type": "string",
                              "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?(Z|[+-]([01]\\d|2[0-3]):[0-5]\\d)$"
                            },
                            "end": {
                              "type": "string",
                              "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?(Z|[+-]([01]\\d|2[0-3]):[0-5]\\d)$"
                            },
                            "maxUses": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100000
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "maxUses": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100000
                      },
                      "perPeriod": {
                        "type": "object",
                        "properties": {
                          "unit": {
                            "type": "string",
                            "enum": [
                              "day",
                              "week",
                              "month"
                            ]
                          },
                          "count": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100000
                          },
                          "timezone": {
                            "type": "string",
                            "pattern": "^(?:UTC|GMT|[A-Za-z_]+\\/[A-Za-z0-9_+-]+(?:\\/[A-Za-z0-9_+-]+)?)$",
                            "description": "IANA timezone identifier"
                          }
                        },
                        "required": [
                          "unit",
                          "count",
                          "timezone"
                        ],
                        "additionalProperties": false
                      },
                      "minIntervalMinutes": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 527040
                      },
                      "activation": {
                        "type": "object",
                        "properties": {
                          "basis": {
                            "type": "string",
                            "const": "firstScan"
                          },
                          "validForHours": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 87840
                          }
                        },
                        "required": [
                          "basis",
                          "validForHours"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "scanContextKey": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 128
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "scannedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
                "description": "ISO 8601 timestamp"
              },
              "recordedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
                "description": "ISO 8601 timestamp"
              },
              "result": {
                "type": "string",
                "enum": [
                  "accepted",
                  "duplicate",
                  "unknown",
                  "ambiguous",
                  "denied",
                  "reversal"
                ]
              },
              "reasonCode": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "valid",
                      "stale_identifier",
                      "already_scanned",
                      "not_active",
                      "expired",
                      "revoked",
                      "wrong_scope",
                      "not_valid_context",
                      "out_of_window",
                      "quota_exhausted",
                      "cooldown",
                      "no_match",
                      "multiple_matches"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "reversesScanId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "deviceId": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 128
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "source": {
                "type": "string",
                "enum": [
                  "mobile_app",
                  "api",
                  "manual_admin"
                ]
              },
              "matchedBy": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "scanner_qr_payload",
                      "pass_id",
                      "identifier",
                      "apple_serial",
                      "google_object_id"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "context": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              "externalRef": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 255
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "reason": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 500
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "matchedCount": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
                "description": "ISO 8601 timestamp"
              }
            },
            "required": [
              "id",
              "passId",
              "projectId",
              "templateVersionId",
              "redemptionSnapshot",
              "scanContextKey",
              "scannedAt",
              "recordedAt",
              "result",
              "reasonCode",
              "reversesScanId",
              "deviceId",
              "source",
              "matchedBy",
              "context",
              "externalRef",
              "reason",
              "matchedCount",
              "createdAt"
            ],
            "additionalProperties": false
          },
          "reversed": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "passId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "Pass identifier"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "projectId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "templateVersionId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "redemptionSnapshot": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "windows": {
                        "minItems": 1,
                        "maxItems": 366,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "start": {
                              "type": "string",
                              "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?(Z|[+-]([01]\\d|2[0-3]):[0-5]\\d)$"
                            },
                            "end": {
                              "type": "string",
                              "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?(Z|[+-]([01]\\d|2[0-3]):[0-5]\\d)$"
                            },
                            "maxUses": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100000
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "maxUses": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100000
                      },
                      "perPeriod": {
                        "type": "object",
                        "properties": {
                          "unit": {
                            "type": "string",
                            "enum": [
                              "day",
                              "week",
                              "month"
                            ]
                          },
                          "count": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100000
                          },
                          "timezone": {
                            "type": "string",
                            "pattern": "^(?:UTC|GMT|[A-Za-z_]+\\/[A-Za-z0-9_+-]+(?:\\/[A-Za-z0-9_+-]+)?)$",
                            "description": "IANA timezone identifier"
                          }
                        },
                        "required": [
                          "unit",
                          "count",
                          "timezone"
                        ],
                        "additionalProperties": false
                      },
                      "minIntervalMinutes": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 527040
                      },
                      "activation": {
                        "type": "object",
                        "properties": {
                          "basis": {
                            "type": "string",
                            "const": "firstScan"
                          },
                          "validForHours": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 87840
                          }
                        },
                        "required": [
                          "basis",
                          "validForHours"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "scanContextKey": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 128
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "scannedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
                "description": "ISO 8601 timestamp"
              },
              "recordedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
                "description": "ISO 8601 timestamp"
              },
              "result": {
                "type": "string",
                "enum": [
                  "accepted",
                  "duplicate",
                  "unknown",
                  "ambiguous",
                  "denied",
                  "reversal"
                ]
              },
              "reasonCode": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "valid",
                      "stale_identifier",
                      "already_scanned",
                      "not_active",
                      "expired",
                      "revoked",
                      "wrong_scope",
                      "not_valid_context",
                      "out_of_window",
                      "quota_exhausted",
                      "cooldown",
                      "no_match",
                      "multiple_matches"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "reversesScanId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "deviceId": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 128
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "source": {
                "type": "string",
                "enum": [
                  "mobile_app",
                  "api",
                  "manual_admin"
                ]
              },
              "matchedBy": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "scanner_qr_payload",
                      "pass_id",
                      "identifier",
                      "apple_serial",
                      "google_object_id"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "context": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              "externalRef": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 255
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "reason": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 500
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "matchedCount": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
                "description": "ISO 8601 timestamp"
              }
            },
            "required": [
              "id",
              "passId",
              "projectId",
              "templateVersionId",
              "redemptionSnapshot",
              "scanContextKey",
              "scannedAt",
              "recordedAt",
              "result",
              "reasonCode",
              "reversesScanId",
              "deviceId",
              "source",
              "matchedBy",
              "context",
              "externalRef",
              "reason",
              "matchedCount",
              "createdAt"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "reversal",
          "reversed"
        ],
        "additionalProperties": false
      },
      "PublicSendTestWebhookEventResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "deliveryId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "Identifier of the queued test delivery"
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "SUCCESS",
              "FAILED"
            ]
          },
          "runAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
            "description": "ISO 8601 timestamp"
          }
        },
        "required": [
          "deliveryId",
          "status",
          "runAt"
        ],
        "additionalProperties": false
      },
      "PublicVoidPassResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "Pass identifier"
          },
          "status": {
            "type": "string",
            "const": "VOID"
          }
        },
        "required": [
          "id",
          "status"
        ],
        "additionalProperties": false
      },
      "PublicWebhookEndpoint": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "Webhook endpoint identifier"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Webhook delivery URL"
          },
          "events": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "pass.issued",
                "pass.updated",
                "pass.voided",
                "pass.failed",
                "pass.scanned",
                "pass.scan.reversed"
              ]
            },
            "description": "Events to receive"
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether the endpoint is active"
          },
          "description": {
            "description": "Optional human-readable label for the endpoint",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
            "description": "ISO 8601 timestamp"
          }
        },
        "required": [
          "id",
          "url",
          "events",
          "enabled",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "RecordScanRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "qrPayload": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2048
          },
          "passId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "Pass identifier"
          },
          "projectId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "scanContextKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "validityDate": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "scannedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
            "description": "ISO 8601 timestamp"
          },
          "deviceId": {
            "type": "string",
            "maxLength": 128
          },
          "externalRef": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "context": {
            "type": "object",
            "properties": {
              "gate": {
                "type": "string",
                "maxLength": 64
              },
              "lane": {
                "type": "string",
                "maxLength": 64
              },
              "location": {
                "type": "string",
                "maxLength": 255
              },
              "sessionId": {
                "type": "string",
                "maxLength": 255
              },
              "note": {
                "type": "string",
                "maxLength": 500
              }
            },
            "additionalProperties": {}
          }
        }
      },
      "RedeliverWebhookRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "force": {
            "default": false,
            "type": "boolean"
          },
          "reason": {
            "type": "string",
            "minLength": 5,
            "maxLength": 500,
            "description": "Reason for manual webhook redelivery"
          },
          "idempotencyKey": {
            "description": "Optional idempotency key to deduplicate redelivery requests",
            "type": "string",
            "minLength": 8,
            "maxLength": 100
          }
        },
        "required": [
          "reason"
        ]
      },
      "ReverseScanRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "maxLength": 500
          }
        }
      },
      "RevokePassLinksResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "Pass identifier"
          },
          "revokedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
            "description": "ISO 8601 timestamp"
          },
          "revokedCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "id",
          "revokedAt",
          "revokedCount"
        ],
        "additionalProperties": false
      },
      "ScanStatsResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "projectId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "templateId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "Template identifier"
              },
              {
                "type": "null"
              }
            ]
          },
          "totalPasses": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "redeemed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "open": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "totalScans": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "totalDenied": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "scanContextKey": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "lastScanAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
                "description": "ISO 8601 timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "groups": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "projectId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "totalPasses": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "redeemed": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "open": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "totalScans": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "totalDenied": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "lastScanAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
                      "description": "ISO 8601 timestamp"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "projectId",
                "totalPasses",
                "redeemed",
                "open",
                "totalScans",
                "totalDenied",
                "lastScanAt"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "projectId",
          "templateId",
          "totalPasses",
          "redeemed",
          "open",
          "totalScans",
          "totalDenied",
          "scanContextKey",
          "lastScanAt"
        ],
        "additionalProperties": false
      },
      "TemplateVariablesSchemaResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schema": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "object"
              },
              "properties": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "anyOf": [
                        {
                          "type": "string",
                          "const": "string"
                        },
                        {
                          "type": "string",
                          "const": "integer"
                        },
                        {
                          "type": "string",
                          "const": "number"
                        },
                        {
                          "type": "string",
                          "const": "boolean"
                        },
                        {
                          "type": "string",
                          "const": "array"
                        }
                      ]
                    },
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "string"
                        },
                        "enum": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "type"
                      ],
                      "additionalProperties": false
                    },
                    "enum": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "format": {
                      "type": "string"
                    },
                    "minimum": {
                      "type": "number"
                    },
                    "maximum": {
                      "type": "number"
                    },
                    "formatMinimum": {
                      "type": "string"
                    },
                    "formatMaximum": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "x-ms-summary": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "x-ms-summary"
                  ],
                  "additionalProperties": false
                }
              },
              "required": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "type",
              "properties",
              "required"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "schema"
        ],
        "additionalProperties": false
      },
      "UpdateProjectRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ]
          },
          "color": {
            "type": "string",
            "enum": [
              "gray",
              "red",
              "orange",
              "yellow",
              "green",
              "blue",
              "indigo",
              "purple",
              "pink"
            ]
          }
        },
        "additionalProperties": false
      },
      "UpdateWebhookEndpointRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          },
          "events": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "pass.issued",
                "pass.updated",
                "pass.voided",
                "pass.failed",
                "pass.scanned",
                "pass.scan.reversed"
              ]
            }
          },
          "enabled": {
            "type": "boolean"
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "plt_<secret>",
        "description": "Passlet access token (`plt_*`) sent as `Authorization: Bearer <token>` or `X-API-Key`. Authorized scopes are listed per operation under `x-required-scopes`."
      }
    }
  }
}
