**API versions** · **V2 (Latest)** · [V1](/integrations/v1/docs?lang=en)

# Tickets

OpenAPI 3.0.3 · API 2.0.0

```json
[
  {
    "url": "https://api.unisoft.world/integrations/v2",
    "description": "API"
  }
]
```

## Operations

## GET /forms-submit/{submissionId}/ticket-documents/preview

Read the current ticket PDF preparation revision

`preview_submission_ticket_document`

Requires tickets:share AND forms:read AND forms_submit:read. Campaign-restricted keys are refused. Re-admits the current organisation, registration, form/session, products/categories/seats and globally unique native ticket identities; Mongo multikey matches do not grant ownership. Existing ticket state changes can request the native Wallet refresh push. The preview announces walletRefreshMayBeRequested and requiredAdditionalScopes; generation additionally requires messages:send in that case, checked before journal/fence. Pure missing-ticket issuance makes no Wallet request. walletRefresh=NOT_OBSERVED means no notification outcome was observed; never infer that no refresh is needed. The native PDF is anonymous and contains no financial amount: no payment-reading permission is required or inferred. The PDF itself contains sensitive native QR bearer URLs and short references. JSON never contains a native ticket UUID, QR, public ticket URL, order token or file bytes. Document UUIDs identify this private facade artifact, not entry tickets. Selections: VALID_ENTRY (default) means current VALID entry tickets; ALL_UNITS includes non-revoked unit tickets already USED; ORDER can be a summary with no entry authority; SINGLE uses one opaque tkt_ reference resolved only inside this registration, excluding revoked tickets. A PDF never proves payment, acceptance beyond the recorded submission state, current entry availability or successful scanning. The renderer reuses the existing four-per-A4 native layout, current seating and submission/organisation language fallback. Native Helvetica cannot print every script: unsupported custom titles/labels are omitted and fixed labels fall back to English/French; no logo or remote resource is fetched. Labels may use the native fixed-layout ellipsis. At most 500 printable tickets, 1000 history rows, 500 products, 200 categories, 8 MiB PDF. Strict canonical quantities and current snapshot references are required; ambiguous history is refused. Internal writers remain concurrent; source revisions are qualified observations, not transaction-wide reservations. Pure read: no ticket reconciliation, ticket creation/revocation/restoration, renderer, file write or provider call. Pass selection and only with SINGLE its reference. currentPrintableCount describes tickets before generation; reconciliationRequired means the explicit generation command will first apply the native plan, so the final count may differ. Return expectedRevision unchanged in the later generation request. A changed source requires a fresh read and a separately intended command, never guessed revisions.

### Authentication

```json
[
  {
    "bearerAuth": []
  },
  {
    "apiKeyHeader": []
  }
]
```

### Required permissions

```json
{
  "accepted": "tickets:share",
  "additional": [
    "forms:read",
    "forms_submit:read"
  ]
}
```

### Parameters

```json
{
  "name": "submissionId",
  "in": "path",
  "required": true,
  "schema": {
    "type": "string",
    "pattern": "^[0-9a-f-]{36}$",
    "format": "uuid"
  },
  "description": "Current registration UUID; never a native ticket UUID."
}
```

```json
{
  "name": "selection",
  "in": "query",
  "schema": {
    "type": "string",
    "enum": [
      "VALID_ENTRY",
      "ALL_UNITS",
      "ORDER",
      "SINGLE"
    ],
    "default": "VALID_ENTRY"
  },
  "description": "Explicit native PDF selection; defaults to VALID_ENTRY."
}
```

```json
{
  "name": "reference",
  "in": "query",
  "schema": {
    "type": "string",
    "pattern": "^tkt_[a-f0-9]{64}$"
  },
  "description": "Required only for SINGLE; opaque ticket reference from this registration's authorised ticket listing."
}
```

### Responses

#### HTTP 200

```json
{
  "description": "Qualified private ticket-document result.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TicketDocumentPreviewResponse"
      }
    }
  }
}
```

#### HTTP 400

```json
{
  "description": "Fixed error code; no private source, bearer, file content or diagnostic.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TicketDocumentError"
      }
    }
  }
}
```

#### HTTP 401

```json
{
  "description": "Fixed error code; no private source, bearer, file content or diagnostic.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TicketDocumentError"
      }
    }
  }
}
```

#### HTTP 403

```json
{
  "description": "Fixed error code; no private source, bearer, file content or diagnostic.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TicketDocumentError"
      }
    }
  }
}
```

#### HTTP 404

```json
{
  "description": "Fixed error code; no private source, bearer, file content or diagnostic.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TicketDocumentError"
      }
    }
  }
}
```

#### HTTP 409

```json
{
  "description": "Fixed error code; no private source, bearer, file content or diagnostic.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TicketDocumentError"
      }
    }
  }
}
```

#### HTTP 503

```json
{
  "description": "Fixed error code; no private source, bearer, file content or diagnostic.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TicketDocumentError"
      }
    }
  }
}
```

### OpenAPI

```json
{
  "x-unisoft-scope": "tickets:share",
  "x-unisoft-additional-scopes": [
    "forms:read",
    "forms_submit:read"
  ],
  "x-unisoft-mcp-output-schema": true,
  "x-unisoft-mcp": {
    "category": "read",
    "readOnly": true,
    "destructive": false,
    "idempotent": true,
    "warn": false
  }
}
```

## POST /forms-submit/{submissionId}/ticket-documents

Prepare native tickets for on-demand PDF download

`generate_submission_ticket_document`

Requires tickets:share AND forms:read AND forms_submit:read. Campaign-restricted keys are refused. Re-admits the current organisation, registration, form/session, products/categories/seats and globally unique native ticket identities; Mongo multikey matches do not grant ownership. Existing ticket state changes can request the native Wallet refresh push. The preview announces walletRefreshMayBeRequested and requiredAdditionalScopes; generation additionally requires messages:send in that case, checked before journal/fence. Pure missing-ticket issuance makes no Wallet request. walletRefresh=NOT_OBSERVED means no notification outcome was observed; never infer that no refresh is needed. The native PDF is anonymous and contains no financial amount: no payment-reading permission is required or inferred. The PDF itself contains sensitive native QR bearer URLs and short references. JSON never contains a native ticket UUID, QR, public ticket URL, order token or file bytes. Document UUIDs identify this private facade artifact, not entry tickets. Selections: VALID_ENTRY (default) means current VALID entry tickets; ALL_UNITS includes non-revoked unit tickets already USED; ORDER can be a summary with no entry authority; SINGLE uses one opaque tkt_ reference resolved only inside this registration, excluding revoked tickets. A PDF never proves payment, acceptance beyond the recorded submission state, current entry availability or successful scanning. The renderer reuses the existing four-per-A4 native layout, current seating and submission/organisation language fallback. Native Helvetica cannot print every script: unsupported custom titles/labels are omitted and fixed labels fall back to English/French; no logo or remote resource is fetched. Labels may use the native fixed-layout ellipsis. At most 500 printable tickets, 1000 history rows, 500 products, 200 categories, 8 MiB PDF. Strict canonical quantities and current snapshot references are required; ambiguous history is refused. Internal writers remain concurrent; source revisions are qualified observations, not transaction-wide reservations. Additionally requires the independent explicit opt-in tickets:generate. Explicit write: journal and global source/ticket guards must be durably acknowledged before the native reconciliation plan creates/restores/revokes tickets or renders a PDF. Quantity reductions preserve already USED tickets; the native inactive-registration branch can revoke even USED tickets while retaining usedAt/history. This does not rearm, scan, validate a registration, charge or send an email. Existing changed tickets can request the native Wallet refresh; REQUESTED is not proof of push delivery and UNAVAILABLE does not replay ticket work. First call preview_submission_ticket_document. Supply its exact expectedRevision, selection and a new UUID idempotencyKey; reuse that key with the identical request to inspect the saved outcome, never execute again. This command prepares the selected current tickets and saves command metadata only; it does not render or store a PDF and needs no PDF encryption key. SUCCEEDED means preparation/reconciliation succeeded, not that a PDF was rendered or delivered. bytes, digest and generatedAt are always null because there is no stored binary artifact. Use the authenticated REST downloadPath to render a PDF on demand; repeated downloads need not have identical bytes. RUNNING, UNKNOWN or journalRecorded=false never authorizes automatic regeneration, a new-key retry, direct guard removal or an internal bypass. NO_TICKETS means reconciliation completed but no selected non-revoked/valid ticket was printable. REFUSED is a known pre-effect conflict; obtain a new user-requested change before a new key. A failed accessory cleanup leaves the known outcome intact with lockCleanup=UNAVAILABLE and can still require owner review.

### Authentication

```json
[
  {
    "bearerAuth": []
  },
  {
    "apiKeyHeader": []
  }
]
```

### Required permissions

```json
{
  "accepted": "tickets:generate",
  "additional": [
    "tickets:share",
    "forms:read",
    "forms_submit:read"
  ]
}
```

### Parameters

```json
{
  "name": "submissionId",
  "in": "path",
  "required": true,
  "schema": {
    "type": "string",
    "pattern": "^[0-9a-f-]{36}$",
    "format": "uuid"
  },
  "description": "Current registration UUID in this organisation."
}
```

### Request body

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/UnisoftRequest_547fb9088a38af49927c"
      }
    }
  }
}
```

### Responses

#### HTTP 200

```json
{
  "description": "Qualified private ticket-document result.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TicketDocumentResponse"
      }
    }
  }
}
```

#### HTTP 400

```json
{
  "description": "Fixed error code; no private source, bearer, file content or diagnostic.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TicketDocumentError"
      }
    }
  }
}
```

#### HTTP 401

```json
{
  "description": "Fixed error code; no private source, bearer, file content or diagnostic.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TicketDocumentError"
      }
    }
  }
}
```

#### HTTP 403

```json
{
  "description": "Fixed error code; no private source, bearer, file content or diagnostic.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TicketDocumentError"
      }
    }
  }
}
```

#### HTTP 404

```json
{
  "description": "Fixed error code; no private source, bearer, file content or diagnostic.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TicketDocumentError"
      }
    }
  }
}
```

#### HTTP 409

```json
{
  "description": "Fixed error code; no private source, bearer, file content or diagnostic.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TicketDocumentError"
      }
    }
  }
}
```

#### HTTP 503

```json
{
  "description": "Fixed error code; no private source, bearer, file content or diagnostic.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TicketDocumentError"
      }
    }
  }
}
```

### OpenAPI

```json
{
  "x-unisoft-scope": "tickets:generate",
  "x-unisoft-additional-scopes": [
    "tickets:share",
    "forms:read",
    "forms_submit:read"
  ],
  "x-unisoft-conditional-scopes": [
    {
      "condition": "preview.walletRefreshMayBeRequested is true",
      "scopes": [
        "messages:send"
      ],
      "allRequired": true
    }
  ],
  "x-unisoft-mcp-output-schema": true,
  "x-unisoft-mcp": {
    "category": "create",
    "readOnly": false,
    "destructive": true,
    "idempotent": true,
    "warn": true
  }
}
```

## GET /ticket-documents/{documentId}

Read a saved ticket-document command and current availability

`get_ticket_document`

Requires tickets:share AND forms:read AND forms_submit:read. Campaign-restricted keys are refused. Re-admits the current organisation, registration, form/session, products/categories/seats and globally unique native ticket identities; Mongo multikey matches do not grant ownership. Existing ticket state changes can request the native Wallet refresh push. The preview announces walletRefreshMayBeRequested and requiredAdditionalScopes; generation additionally requires messages:send in that case, checked before journal/fence. Pure missing-ticket issuance makes no Wallet request. walletRefresh=NOT_OBSERVED means no notification outcome was observed; never infer that no refresh is needed. The native PDF is anonymous and contains no financial amount: no payment-reading permission is required or inferred. The PDF itself contains sensitive native QR bearer URLs and short references. JSON never contains a native ticket UUID, QR, public ticket URL, order token or file bytes. Document UUIDs identify this private facade artifact, not entry tickets. Selections: VALID_ENTRY (default) means current VALID entry tickets; ALL_UNITS includes non-revoked unit tickets already USED; ORDER can be a summary with no entry authority; SINGLE uses one opaque tkt_ reference resolved only inside this registration, excluding revoked tickets. A PDF never proves payment, acceptance beyond the recorded submission state, current entry availability or successful scanning. The renderer reuses the existing four-per-A4 native layout, current seating and submission/organisation language fallback. Native Helvetica cannot print every script: unsupported custom titles/labels are omitted and fixed labels fall back to English/French; no logo or remote resource is fetched. Labels may use the native fixed-layout ellipsis. At most 500 printable tickets, 1000 history rows, 500 products, 200 categories, 8 MiB PDF. Strict canonical quantities and current snapshot references are required; ambiguous history is refused. Internal writers remain concurrent; source revisions are qualified observations, not transaction-wide reservations. Read only this principal-and-organisation-bound command/document. No regeneration, reconciliation or provider call. Inspect state, journalRecorded and availability separately. AVAILABLE means the prepared selection source revision still matches the admitted current sources and can be rendered on download; it does not prove renderer availability. SOURCE_CHANGED means download is refused until a new separately intended preparation. No PDF is stored. bytes, digest and generatedAt stay null. A read of metadata never renders a PDF. A later read can observe a persisted outcome after a response was lost, without rerunning any owner. The authenticated path is not a bearer sharing link and is not a promise of delivery. RUNNING/UNKNOWN requires review through the owning application; keep the original key.

### Authentication

```json
[
  {
    "bearerAuth": []
  },
  {
    "apiKeyHeader": []
  }
]
```

### Required permissions

```json
{
  "accepted": "tickets:share",
  "additional": [
    "forms:read",
    "forms_submit:read"
  ]
}
```

### Parameters

```json
{
  "name": "documentId",
  "in": "path",
  "required": true,
  "schema": {
    "type": "string",
    "pattern": "^[0-9a-f-]{36}$",
    "format": "uuid"
  },
  "description": "Facade document UUID returned by generation; not an entry bearer."
}
```

### Responses

#### HTTP 200

```json
{
  "description": "Qualified private ticket-document result.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TicketDocumentResponse"
      }
    }
  }
}
```

#### HTTP 400

```json
{
  "description": "Fixed error code; no private source, bearer, file content or diagnostic.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TicketDocumentError"
      }
    }
  }
}
```

#### HTTP 401

```json
{
  "description": "Fixed error code; no private source, bearer, file content or diagnostic.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TicketDocumentError"
      }
    }
  }
}
```

#### HTTP 403

```json
{
  "description": "Fixed error code; no private source, bearer, file content or diagnostic.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TicketDocumentError"
      }
    }
  }
}
```

#### HTTP 404

```json
{
  "description": "Fixed error code; no private source, bearer, file content or diagnostic.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TicketDocumentError"
      }
    }
  }
}
```

#### HTTP 409

```json
{
  "description": "Fixed error code; no private source, bearer, file content or diagnostic.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TicketDocumentError"
      }
    }
  }
}
```

#### HTTP 503

```json
{
  "description": "Fixed error code; no private source, bearer, file content or diagnostic.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TicketDocumentError"
      }
    }
  }
}
```

### OpenAPI

```json
{
  "x-unisoft-scope": "tickets:share",
  "x-unisoft-additional-scopes": [
    "forms:read",
    "forms_submit:read"
  ],
  "x-unisoft-mcp-output-schema": true,
  "x-unisoft-mcp": {
    "category": "read",
    "readOnly": true,
    "destructive": false,
    "idempotent": true,
    "warn": false
  }
}
```

## GET /ticket-documents/{documentId}/pdf

Render and download a private ticket PDF on demand

`download_ticket_document_pdf`

Requires tickets:share AND forms:read AND forms_submit:read. Campaign-restricted keys are refused. Re-admits the current organisation, registration, form/session, products/categories/seats and globally unique native ticket identities; Mongo multikey matches do not grant ownership. Existing ticket state changes can request the native Wallet refresh push. The preview announces walletRefreshMayBeRequested and requiredAdditionalScopes; generation additionally requires messages:send in that case, checked before journal/fence. Pure missing-ticket issuance makes no Wallet request. walletRefresh=NOT_OBSERVED means no notification outcome was observed; never infer that no refresh is needed. The native PDF is anonymous and contains no financial amount: no payment-reading permission is required or inferred. The PDF itself contains sensitive native QR bearer URLs and short references. JSON never contains a native ticket UUID, QR, public ticket URL, order token or file bytes. Document UUIDs identify this private facade artifact, not entry tickets. Selections: VALID_ENTRY (default) means current VALID entry tickets; ALL_UNITS includes non-revoked unit tickets already USED; ORDER can be a summary with no entry authority; SINGLE uses one opaque tkt_ reference resolved only inside this registration, excluding revoked tickets. A PDF never proves payment, acceptance beyond the recorded submission state, current entry availability or successful scanning. The renderer reuses the existing four-per-A4 native layout, current seating and submission/organisation language fallback. Native Helvetica cannot print every script: unsupported custom titles/labels are omitted and fixed labels fall back to English/French; no logo or remote resource is fetched. Labels may use the native fixed-layout ellipsis. At most 500 printable tickets, 1000 history rows, 500 products, 200 categories, 8 MiB PDF. Strict canonical quantities and current snapshot references are required; ambiguous history is refused. Internal writers remain concurrent; source revisions are qualified observations, not transaction-wide reservations. Renders the prepared selection in memory after current-source and principal admission. Performs no ticket reconciliation, journal write, notification or file storage. Requires an existing SUCCEEDED preparation with unchanged sources; otherwise 409. Rechecks source revision and authority after rendering and refuses changed sources before sending bytes. No signed/public URL is emitted. Cache-Control:no-store, attachment and nosniff apply. No PDF encryption key is required. Rendering failure or invalid, oversized or incomplete PDF returns 503 without raw diagnostics and without changing the successful preparation; another authenticated download can retry rendering without ticket effects. PDF bytes may differ between downloads; metadata never claims a saved binary digest or generation time.

MCP returns the actual private file as an embedded resource with MIME type and base64 blob, plus filename, byteLength and the SHA-256 of the decoded bytes. Use the host file capability to save or attach those bytes under the returned filename and verify size and SHA-256. The unisoft URI identifies this response only; it is not a public URL or a reusable download handle. Do not paste the blob into chat text, publicly upload a financial document or invent a sharing URL. The current authenticated REST owner rechecks organisation, permissions and every required source or export proof on each call. REST keeps its binary response. A file proves only that these bytes were retrieved, not payment settlement, document legal validity or delivery to a recipient.

### Authentication

```json
[
  {
    "bearerAuth": []
  },
  {
    "apiKeyHeader": []
  }
]
```

### Required permissions

```json
{
  "accepted": "tickets:share",
  "additional": [
    "forms:read",
    "forms_submit:read"
  ]
}
```

### Parameters

```json
{
  "name": "documentId",
  "in": "path",
  "required": true,
  "schema": {
    "type": "string",
    "pattern": "^[0-9a-f-]{36}$",
    "format": "uuid"
  },
  "description": "Facade document UUID, private to the current principal and organisation."
}
```

### Responses

#### HTTP 200

```json
{
  "description": "Fresh admitted PDF bytes rendered by this GET; never stored.",
  "content": {
    "application/pdf": {
      "schema": {
        "type": "string",
        "format": "binary"
      }
    }
  }
}
```

#### HTTP 400

```json
{
  "description": "Fixed error code; no private source, bearer, file content or diagnostic.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TicketDocumentError"
      }
    }
  }
}
```

#### HTTP 401

```json
{
  "description": "Fixed error code; no private source, bearer, file content or diagnostic.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TicketDocumentError"
      }
    }
  }
}
```

#### HTTP 403

```json
{
  "description": "Fixed error code; no private source, bearer, file content or diagnostic.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TicketDocumentError"
      }
    }
  }
}
```

#### HTTP 404

```json
{
  "description": "Fixed error code; no private source, bearer, file content or diagnostic.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TicketDocumentError"
      }
    }
  }
}
```

#### HTTP 409

```json
{
  "description": "Fixed error code; no private source, bearer, file content or diagnostic.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TicketDocumentError"
      }
    }
  }
}
```

#### HTTP 503

```json
{
  "description": "Fixed error code; no private source, bearer, file content or diagnostic.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TicketDocumentError"
      }
    }
  }
}
```

### OpenAPI

```json
{
  "x-unisoft-scope": "tickets:share",
  "x-unisoft-additional-scopes": [
    "forms:read",
    "forms_submit:read"
  ],
  "x-unisoft-mcp": {
    "category": "read",
    "readOnly": true,
    "destructive": false,
    "idempotent": true,
    "warn": false
  },
  "x-unisoft-mcp-file": {
    "mimeType": "application/pdf",
    "maxBytes": 8388608
  }
}
```

## Schemas

```json
{
  "components": {
    "schemas": {
      "TicketDocumentPreviewResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "$ref": "#/components/schemas/TicketDocumentPreview"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "TicketDocumentPreview": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "submissionId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^[0-9a-f-]{36}$"
          },
          "formId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^[0-9a-f-]{36}$"
          },
          "expectedRevision": {
            "type": "string",
            "pattern": "^tdocrev_[a-f0-9]{64}$"
          },
          "selection": {
            "type": "string",
            "enum": [
              "VALID_ENTRY",
              "ALL_UNITS",
              "ORDER",
              "SINGLE"
            ],
            "default": "VALID_ENTRY"
          },
          "currentPrintableCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 500
          },
          "reconciliationRequired": {
            "type": "boolean"
          },
          "reconcilesOnGenerate": {
            "enum": [
              true
            ],
            "type": "boolean"
          },
          "walletRefreshMayBeRequested": {
            "type": "boolean"
          },
          "requiredAdditionalScopes": {
            "type": "array",
            "maxItems": 1,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "enum": [
                "messages:send"
              ]
            }
          },
          "anonymous": {
            "enum": [
              true
            ],
            "type": "boolean"
          },
          "containsFinancialAmounts": {
            "enum": [
              false
            ],
            "type": "boolean"
          },
          "sourceReadAt": {
            "type": "string",
            "format": "date-time"
          },
          "consistentSnapshot": {
            "enum": [
              false
            ],
            "type": "boolean"
          }
        },
        "required": [
          "submissionId",
          "formId",
          "expectedRevision",
          "selection",
          "currentPrintableCount",
          "reconciliationRequired",
          "reconcilesOnGenerate",
          "walletRefreshMayBeRequested",
          "requiredAdditionalScopes",
          "anonymous",
          "containsFinancialAmounts",
          "sourceReadAt",
          "consistentSnapshot"
        ]
      },
      "TicketDocumentError": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "success",
          "error"
        ]
      },
      "TicketDocumentResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "$ref": "#/components/schemas/TicketDocumentResult"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "TicketDocumentResult": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "documentId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^[0-9a-f-]{36}$"
          },
          "submissionId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^[0-9a-f-]{36}$"
          },
          "formId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^[0-9a-f-]{36}$"
          },
          "selection": {
            "type": "string",
            "enum": [
              "VALID_ENTRY",
              "ALL_UNITS",
              "ORDER",
              "SINGLE"
            ],
            "default": "VALID_ENTRY"
          },
          "state": {
            "type": "string",
            "enum": [
              "RUNNING",
              "SUCCEEDED",
              "NO_TICKETS",
              "REFUSED",
              "UNKNOWN"
            ]
          },
          "replayed": {
            "type": "boolean"
          },
          "journalRecorded": {
            "type": "boolean"
          },
          "availability": {
            "type": "string",
            "enum": [
              "NOT_GENERATED",
              "AVAILABLE",
              "SOURCE_CHANGED"
            ]
          },
          "lockCleanup": {
            "type": "string",
            "enum": [
              "RETAINED",
              "RELEASED",
              "UNAVAILABLE",
              "NOT_OBSERVED"
            ]
          },
          "canRetry": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "anonymous": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "containsFinancialAmounts": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "ticketCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 500,
            "nullable": true
          },
          "bytes": {
            "type": "integer",
            "minimum": 8,
            "maximum": 8388608,
            "nullable": true
          },
          "digest": {
            "type": "string",
            "pattern": "^sha256:[a-f0-9]{64}$",
            "nullable": true
          },
          "generatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "downloadPath": {
            "type": "string",
            "pattern": "^/integrations/v2/ticket-documents/[0-9a-f-]{36}/pdf$",
            "nullable": true
          },
          "error": {
            "type": "string",
            "enum": [
              "TICKET_DOCUMENT_REVISION_CHANGED",
              "TICKET_DOCUMENT_OPERATION_IN_PROGRESS",
              "TICKET_DOCUMENT_UNCERTAIN",
              null
            ],
            "nullable": true
          },
          "walletRefresh": {
            "type": "string",
            "enum": [
              "NOT_NEEDED",
              "REQUESTED",
              "UNAVAILABLE",
              "NOT_OBSERVED"
            ]
          }
        },
        "required": [
          "documentId",
          "submissionId",
          "formId",
          "selection",
          "state",
          "replayed",
          "journalRecorded",
          "availability",
          "lockCleanup",
          "canRetry",
          "anonymous",
          "containsFinancialAmounts",
          "ticketCount",
          "bytes",
          "digest",
          "generatedAt",
          "downloadPath",
          "error",
          "walletRefresh"
        ]
      },
      "UnisoftRequest_547fb9088a38af49927c": {
        "type": "object",
        "properties": {
          "idempotencyKey": {
            "type": "string",
            "pattern": "^[0-9a-f-]{36}$",
            "format": "uuid"
          },
          "expectedRevision": {
            "type": "string",
            "pattern": "^tdocrev_[a-f0-9]{64}$"
          },
          "selection": {
            "type": "string",
            "enum": [
              "VALID_ENTRY",
              "ALL_UNITS",
              "ORDER",
              "SINGLE"
            ],
            "default": "VALID_ENTRY"
          },
          "reference": {
            "type": "string",
            "pattern": "^tkt_[a-f0-9]{64}$"
          }
        },
        "required": [
          "idempotencyKey",
          "expectedRevision"
        ],
        "additionalProperties": false,
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "idempotencyKey": {
                "type": "string",
                "pattern": "^[0-9a-f-]{36}$",
                "format": "uuid"
              },
              "expectedRevision": {
                "type": "string",
                "pattern": "^tdocrev_[a-f0-9]{64}$"
              },
              "selection": {
                "type": "string",
                "enum": [
                  "SINGLE"
                ]
              },
              "reference": {
                "type": "string",
                "pattern": "^tkt_[a-f0-9]{64}$"
              }
            },
            "required": [
              "idempotencyKey",
              "expectedRevision",
              "selection",
              "reference"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "idempotencyKey": {
                "type": "string",
                "pattern": "^[0-9a-f-]{36}$",
                "format": "uuid"
              },
              "expectedRevision": {
                "type": "string",
                "pattern": "^tdocrev_[a-f0-9]{64}$"
              },
              "selection": {
                "type": "string",
                "enum": [
                  "VALID_ENTRY",
                  "ALL_UNITS",
                  "ORDER"
                ]
              }
            },
            "required": [
              "idempotencyKey",
              "expectedRevision"
            ],
            "additionalProperties": false
          }
        ]
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API Key",
        "description": "Format: `ke_live_xxx`"
      },
      "apiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      }
    }
  }
}
```
