{
  "openapi": "3.1.1",
  "info": {
    "title": "Rebilix Developer API",
    "version": "1.0.0",
    "description": "Workspace API f\u00FCr E-Rechnungen. JSON max. 1 MiB, XML 2 MB (2.000.000 Bytes), PDF 10 MiB. Je Minute: 60 Anfragen / 5 Verarbeitungen pro Schl\u00FCssel und 300 / 20 pro Arbeitsbereich und Umgebung; h\u00F6chstens zwei gleichzeitige Verarbeitungen. Zus\u00E4tzlich 120 Anfragen pro Verbindungs-IP und Instanz. Sandbox und Live sind getrennt. Kein E-Mail-Versand und keine \u00C4nderung bestehender App-Rechnungen."
  },
  "servers": [
    {
      "url": "/"
    }
  ],
  "security": [
    {
      "ApiKey": []
    }
  ],
  "paths": {
    "/api/v1/{environment}/documents/generate": {
      "post": {
        "operationId": "generateDocument",
        "summary": "XRechnung (UBL) oder ZUGFeRD EN16931 erzeugen \u00B7 Recht Generate",
        "parameters": [
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sandbox",
                "live"
              ]
            },
            "description": "Muss zum API-Schl\u00FCssel passen."
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[!-~]\u002B$"
            },
            "description": "Pro Arbeitsbereich und Umgebung eindeutig; identische Wiederholungen liefern unver\u00E4nderte Ergebnisse. Andere Nutzdaten mit demselben Schl\u00FCssel: 409."
          }
        ],
        "responses": {
          "201": {
            "description": "Dokument und Ergebnis gespeichert. validationStatus muss vor Verwendung gepr\u00FCft werden; invalid ist ein abgeschlossenes Pr\u00FCfergebnis, keine Freigabe.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "schema": {
                  "type": "string"
                }
              },
              "Idempotent-Replayed": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "true",
                    "false"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Fehler; 400 Schema, 401 Schl\u00FCssel, 403 Rechte/Umgebung, 404 Ressource, 405 Methode, 408 Upload-Zeitlimit, 409 Idempotenz, 413 Gr\u00F6\u00DFe, 415 Medientyp, 422 Dokumentdaten, 429 Ratenlimit oder workspace_allowance_exceeded (Monatskontingent), 503 nicht verf\u00FCgbar.",
            "content": {
              "application/problem\u002Bjson": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Wartezeit in Sekunden bei 429, laufenden Anfragen und vor\u00FCbergehenden Fehlern.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateRequest"
              },
              "example": {
                "format": "xrechnung",
                "number": "RE-000001",
                "documentType": "invoice",
                "sourceNumber": null,
                "sourceDate": null,
                "invoiceDate": "2026-11-01",
                "dueDate": "2026-11-15",
                "serviceDate": "2026-10-31",
                "seller": {
                  "name": "Beispiel Studio Berlin",
                  "contactName": "Erika Beispiel",
                  "street": "Musterstra\u00DFe 12",
                  "postalCode": "10117",
                  "city": "Berlin",
                  "countryCode": "DE",
                  "email": "rechnung@example.invalid",
                  "phone": "\u002B49 30 123456",
                  "vatId": "DE123456789",
                  "taxNumber": "12/345/67890",
                  "iban": "DE89370400440532013000",
                  "bic": "COBADEFFXXX",
                  "bankName": "Beispielbank"
                },
                "buyer": {
                  "name": "Musterfirma GmbH",
                  "contactName": "",
                  "street": "Beispielweg 8",
                  "postalCode": "20095",
                  "city": "Hamburg",
                  "countryCode": "DE",
                  "email": "kunde@example.invalid",
                  "phone": "",
                  "vatId": "",
                  "taxNumber": "",
                  "iban": "",
                  "bic": "",
                  "bankName": ""
                },
                "title": "Beratung und Umsetzung",
                "reference": "",
                "notes": "",
                "paymentTerms": "Zahlbar innerhalb von 14 Tagen.",
                "sellerIdentifier": "LIEFERANT-123",
                "buyerReference": "DEMO-BESTELLUNG-1",
                "sellerEndpoint": "rechnung@example.invalid",
                "buyerEndpoint": "kunde@example.invalid",
                "sellerEndpointScheme": "EM",
                "buyerEndpointScheme": "EM",
                "zeroTaxCategory": "",
                "lines": [
                  {
                    "description": "Softwareentwicklung",
                    "quantity": 8,
                    "unit": "Std.",
                    "unitPrice": 97,
                    "taxRate": 19,
                    "taxReason": ""
                  }
                ]
              }
            }
          }
        },
        "description": "EUR; Steuers\u00E4tze 0/7/19; positive Positionen, credit_note f\u00FCr Stornorechnungen. Eigene Rechnungsnummer; keine Buchung oder Nummernvergabe im App-Rechnungsbuch. Sandbox erg\u00E4nzt TEST-Nummer und Testhinweis. Nur validationStatus=valid best\u00E4tigt die technische Pr\u00FCfung; keine steuerliche Rechtspr\u00FCfung."
      }
    },
    "/api/v1/{environment}/documents/parse": {
      "post": {
        "operationId": "parseDocument",
        "summary": "UBL/CII oder eingebettete XML aus PDF lesen \u00B7 Recht Process",
        "parameters": [
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sandbox",
                "live"
              ]
            },
            "description": "Muss zum API-Schl\u00FCssel passen."
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[!-~]\u002B$"
            },
            "description": "Pro Arbeitsbereich und Umgebung eindeutig; identische Wiederholungen liefern unver\u00E4nderte Ergebnisse. Andere Nutzdaten mit demselben Schl\u00FCssel: 409."
          }
        ],
        "responses": {
          "201": {
            "description": "Dokument und Ergebnis gespeichert. validationStatus muss vor Verwendung gepr\u00FCft werden; invalid ist ein abgeschlossenes Pr\u00FCfergebnis, keine Freigabe.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "schema": {
                  "type": "string"
                }
              },
              "Idempotent-Replayed": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "true",
                    "false"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Fehler; 400 Schema, 401 Schl\u00FCssel, 403 Rechte/Umgebung, 404 Ressource, 405 Methode, 408 Upload-Zeitlimit, 409 Idempotenz, 413 Gr\u00F6\u00DFe, 415 Medientyp, 422 Dokumentdaten, 429 Ratenlimit oder workspace_allowance_exceeded (Monatskontingent), 503 nicht verf\u00FCgbar.",
            "content": {
              "application/problem\u002Bjson": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Wartezeit in Sekunden bei 429, laufenden Anfragen und vor\u00FCbergehenden Fehlern.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/xml": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            },
            "application/pdf": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        },
        "description": "Reines Parsing, validationStatus=not_checked, kein Pr\u00FCfbericht. Originale unver\u00E4ndert; keine OCR f\u00FCr normale PDFs."
      }
    },
    "/api/v1/{environment}/documents/validate": {
      "post": {
        "operationId": "validateDocument",
        "summary": "XRechnung-XML oder ZUGFeRD-EN16931-PDF technisch pr\u00FCfen \u00B7 Recht Process",
        "parameters": [
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sandbox",
                "live"
              ]
            },
            "description": "Muss zum API-Schl\u00FCssel passen."
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[!-~]\u002B$"
            },
            "description": "Pro Arbeitsbereich und Umgebung eindeutig; identische Wiederholungen liefern unver\u00E4nderte Ergebnisse. Andere Nutzdaten mit demselben Schl\u00FCssel: 409."
          }
        ],
        "responses": {
          "201": {
            "description": "Dokument und Ergebnis gespeichert. validationStatus muss vor Verwendung gepr\u00FCft werden; invalid ist ein abgeschlossenes Pr\u00FCfergebnis, keine Freigabe.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "schema": {
                  "type": "string"
                }
              },
              "Idempotent-Replayed": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "true",
                    "false"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Fehler; 400 Schema, 401 Schl\u00FCssel, 403 Rechte/Umgebung, 404 Ressource, 405 Methode, 408 Upload-Zeitlimit, 409 Idempotenz, 413 Gr\u00F6\u00DFe, 415 Medientyp, 422 Dokumentdaten, 429 Ratenlimit oder workspace_allowance_exceeded (Monatskontingent), 503 nicht verf\u00FCgbar.",
            "content": {
              "application/problem\u002Bjson": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Wartezeit in Sekunden bei 429, laufenden Anfragen und vor\u00FCbergehenden Fehlern.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/xml": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            },
            "application/pdf": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        },
        "description": "XML: KoSIT XRechnung; PDF: Mustang ZUGFeRD EN16931 einschlie\u00DFlich PDF/A. Original und Originalbericht werden unver\u00E4ndert gespeichert. Allgemeines EN16931-CII ohne PDF wird nicht als ZUGFeRD validiert."
      }
    },
    "/api/v1/{environment}/documents/conversion-review": {
      "post": {
        "operationId": "reviewConversion",
        "summary": "Konvertierung pr\u00FCfen, unver\u00E4nderliche Vorschau und Berichte archivieren",
        "parameters": [
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sandbox",
                "live"
              ]
            },
            "description": "Muss zum API-Schl\u00FCssel passen."
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[!-~]\u002B$"
            },
            "description": "Pro Arbeitsbereich und Umgebung eindeutig; identische Wiederholungen liefern unver\u00E4nderte Ergebnisse. Andere Nutzdaten mit demselben Schl\u00FCssel: 409."
          }
        ],
        "responses": {
          "201": {
            "description": "Dokument und Ergebnis gespeichert. validationStatus muss vor Verwendung gepr\u00FCft werden; invalid ist ein abgeschlossenes Pr\u00FCfergebnis, keine Freigabe.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversionReview"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "schema": {
                  "type": "string"
                }
              },
              "Idempotent-Replayed": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "true",
                    "false"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Fehler; 400 Schema, 401 Schl\u00FCssel, 403 Rechte/Umgebung, 404 Ressource, 405 Methode, 408 Upload-Zeitlimit, 409 Idempotenz, 413 Gr\u00F6\u00DFe, 415 Medientyp, 422 Dokumentdaten, 429 Ratenlimit oder workspace_allowance_exceeded (Monatskontingent), 503 nicht verf\u00FCgbar.",
            "content": {
              "application/problem\u002Bjson": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Wartezeit in Sekunden bei 429, laufenden Anfragen und vor\u00FCbergehenden Fehlern.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "description": "Ben\u00F6tigt Read, Process und Generate. JSON bis 1 MiB. Original zuvor mit parse oder validate archivieren. sourceDocumentId ist auf Arbeitsbereich und Umgebung begrenzt. Review status=blocked sperrt die Best\u00E4tigung. confirm: true und unver\u00E4nderter reviewHash sind erforderlich. Pro Pr\u00FCfung nur eine Enddatei; Originale und Berichte bleiben erhalten. Sandbox \u00E4ndert vorhandene Rechnungsnummern nicht.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversionReviewRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/{environment}/documents/convert": {
      "post": {
        "operationId": "confirmConversion",
        "summary": "Explizit gepr\u00FCfte Konvertierung best\u00E4tigen; keine Ausstellung oder Versendung",
        "parameters": [
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sandbox",
                "live"
              ]
            },
            "description": "Muss zum API-Schl\u00FCssel passen."
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[!-~]\u002B$"
            },
            "description": "Pro Arbeitsbereich und Umgebung eindeutig; identische Wiederholungen liefern unver\u00E4nderte Ergebnisse. Andere Nutzdaten mit demselben Schl\u00FCssel: 409."
          }
        ],
        "responses": {
          "201": {
            "description": "Dokument und Ergebnis gespeichert. validationStatus muss vor Verwendung gepr\u00FCft werden; invalid ist ein abgeschlossenes Pr\u00FCfergebnis, keine Freigabe.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "schema": {
                  "type": "string"
                }
              },
              "Idempotent-Replayed": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "true",
                    "false"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Fehler; 400 Schema, 401 Schl\u00FCssel, 403 Rechte/Umgebung, 404 Ressource, 405 Methode, 408 Upload-Zeitlimit, 409 Idempotenz, 413 Gr\u00F6\u00DFe, 415 Medientyp, 422 Dokumentdaten, 429 Ratenlimit oder workspace_allowance_exceeded (Monatskontingent), 503 nicht verf\u00FCgbar.",
            "content": {
              "application/problem\u002Bjson": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Wartezeit in Sekunden bei 429, laufenden Anfragen und vor\u00FCbergehenden Fehlern.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "description": "Ben\u00F6tigt Read, Process und Generate. JSON bis 1 MiB. Original zuvor mit parse oder validate archivieren. sourceDocumentId ist auf Arbeitsbereich und Umgebung begrenzt. Review status=blocked sperrt die Best\u00E4tigung. confirm: true und unver\u00E4nderter reviewHash sind erforderlich. Pro Pr\u00FCfung nur eine Enddatei; Originale und Berichte bleiben erhalten. Sandbox \u00E4ndert vorhandene Rechnungsnummern nicht.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversionConfirmRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/{environment}/conversion-reviews/{id}": {
      "get": {
        "operationId": "getConversionReview",
        "summary": "Gespeicherte Konvertierungspr\u00FCfung lesen \u00B7 Recht Read",
        "parameters": [
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sandbox",
                "live"
              ]
            },
            "description": "Muss zum API-Schl\u00FCssel passen."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Pr\u00FCfungs-ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Ergebnis",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversionReview"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Fehler; 400 Schema, 401 Schl\u00FCssel, 403 Rechte/Umgebung, 404 Ressource, 405 Methode, 408 Upload-Zeitlimit, 409 Idempotenz, 413 Gr\u00F6\u00DFe, 415 Medientyp, 422 Dokumentdaten, 429 Ratenlimit oder workspace_allowance_exceeded (Monatskontingent), 503 nicht verf\u00FCgbar.",
            "content": {
              "application/problem\u002Bjson": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Wartezeit in Sekunden bei 429, laufenden Anfragen und vor\u00FCbergehenden Fehlern.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/{environment}/conversion-reviews/{id}/source-report": {
      "get": {
        "operationId": "getConversionReviewsourcereport",
        "summary": "Unver\u00E4nderliches Pr\u00FCfartefakt herunterladen \u00B7 Recht Read",
        "parameters": [
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sandbox",
                "live"
              ]
            },
            "description": "Muss zum API-Schl\u00FCssel passen."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Pr\u00FCfungs-ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Datei mit SHA-256; nicht vorhandenes Artefakt: 404.",
            "headers": {
              "X-Content-SHA256": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/xml": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "default": {
            "description": "Fehler; 400 Schema, 401 Schl\u00FCssel, 403 Rechte/Umgebung, 404 Ressource, 405 Methode, 408 Upload-Zeitlimit, 409 Idempotenz, 413 Gr\u00F6\u00DFe, 415 Medientyp, 422 Dokumentdaten, 429 Ratenlimit oder workspace_allowance_exceeded (Monatskontingent), 503 nicht verf\u00FCgbar.",
            "content": {
              "application/problem\u002Bjson": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Wartezeit in Sekunden bei 429, laufenden Anfragen und vor\u00FCbergehenden Fehlern.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/{environment}/conversion-reviews/{id}/target-report": {
      "get": {
        "operationId": "getConversionReviewtargetreport",
        "summary": "Unver\u00E4nderliches Pr\u00FCfartefakt herunterladen \u00B7 Recht Read",
        "parameters": [
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sandbox",
                "live"
              ]
            },
            "description": "Muss zum API-Schl\u00FCssel passen."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Pr\u00FCfungs-ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Datei mit SHA-256; nicht vorhandenes Artefakt: 404.",
            "headers": {
              "X-Content-SHA256": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/xml": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "default": {
            "description": "Fehler; 400 Schema, 401 Schl\u00FCssel, 403 Rechte/Umgebung, 404 Ressource, 405 Methode, 408 Upload-Zeitlimit, 409 Idempotenz, 413 Gr\u00F6\u00DFe, 415 Medientyp, 422 Dokumentdaten, 429 Ratenlimit oder workspace_allowance_exceeded (Monatskontingent), 503 nicht verf\u00FCgbar.",
            "content": {
              "application/problem\u002Bjson": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Wartezeit in Sekunden bei 429, laufenden Anfragen und vor\u00FCbergehenden Fehlern.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/{environment}/conversion-reviews/{id}/review-report": {
      "get": {
        "operationId": "getConversionReviewreviewreport",
        "summary": "Unver\u00E4nderliches Pr\u00FCfartefakt herunterladen \u00B7 Recht Read",
        "parameters": [
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sandbox",
                "live"
              ]
            },
            "description": "Muss zum API-Schl\u00FCssel passen."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Pr\u00FCfungs-ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Datei mit SHA-256; nicht vorhandenes Artefakt: 404.",
            "headers": {
              "X-Content-SHA256": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "default": {
            "description": "Fehler; 400 Schema, 401 Schl\u00FCssel, 403 Rechte/Umgebung, 404 Ressource, 405 Methode, 408 Upload-Zeitlimit, 409 Idempotenz, 413 Gr\u00F6\u00DFe, 415 Medientyp, 422 Dokumentdaten, 429 Ratenlimit oder workspace_allowance_exceeded (Monatskontingent), 503 nicht verf\u00FCgbar.",
            "content": {
              "application/problem\u002Bjson": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Wartezeit in Sekunden bei 429, laufenden Anfragen und vor\u00FCbergehenden Fehlern.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/{environment}/conversion-reviews/{id}/xml": {
      "get": {
        "operationId": "getConversionReviewxml",
        "summary": "Unver\u00E4nderliches Pr\u00FCfartefakt herunterladen \u00B7 Recht Read",
        "parameters": [
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sandbox",
                "live"
              ]
            },
            "description": "Muss zum API-Schl\u00FCssel passen."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Pr\u00FCfungs-ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Datei mit SHA-256; nicht vorhandenes Artefakt: 404.",
            "headers": {
              "X-Content-SHA256": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/xml": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "default": {
            "description": "Fehler; 400 Schema, 401 Schl\u00FCssel, 403 Rechte/Umgebung, 404 Ressource, 405 Methode, 408 Upload-Zeitlimit, 409 Idempotenz, 413 Gr\u00F6\u00DFe, 415 Medientyp, 422 Dokumentdaten, 429 Ratenlimit oder workspace_allowance_exceeded (Monatskontingent), 503 nicht verf\u00FCgbar.",
            "content": {
              "application/problem\u002Bjson": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Wartezeit in Sekunden bei 429, laufenden Anfragen und vor\u00FCbergehenden Fehlern.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/{environment}/conversion-reviews/{id}/pdf": {
      "get": {
        "operationId": "getConversionReviewpdf",
        "summary": "Unver\u00E4nderliches Pr\u00FCfartefakt herunterladen \u00B7 Recht Read",
        "parameters": [
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sandbox",
                "live"
              ]
            },
            "description": "Muss zum API-Schl\u00FCssel passen."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Pr\u00FCfungs-ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Datei mit SHA-256; nicht vorhandenes Artefakt: 404.",
            "headers": {
              "X-Content-SHA256": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "default": {
            "description": "Fehler; 400 Schema, 401 Schl\u00FCssel, 403 Rechte/Umgebung, 404 Ressource, 405 Methode, 408 Upload-Zeitlimit, 409 Idempotenz, 413 Gr\u00F6\u00DFe, 415 Medientyp, 422 Dokumentdaten, 429 Ratenlimit oder workspace_allowance_exceeded (Monatskontingent), 503 nicht verf\u00FCgbar.",
            "content": {
              "application/problem\u002Bjson": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Wartezeit in Sekunden bei 429, laufenden Anfragen und vor\u00FCbergehenden Fehlern.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/{environment}/jobs/generate": {
      "post": {
        "operationId": "queuegenerate",
        "summary": "Auftrag dauerhaft annehmen \u00B7 Read plus Aktionsrecht",
        "parameters": [
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sandbox",
                "live"
              ]
            },
            "description": "Muss zum API-Schl\u00FCssel passen."
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[!-~]\u002B$"
            },
            "description": "Pro Arbeitsbereich und Umgebung eindeutig; identische Wiederholungen liefern unver\u00E4nderte Ergebnisse. Andere Nutzdaten mit demselben Schl\u00FCssel: 409."
          }
        ],
        "responses": {
          "default": {
            "description": "Fehler; 400 Schema, 401 Schl\u00FCssel, 403 Rechte/Umgebung, 404 Ressource, 405 Methode, 408 Upload-Zeitlimit, 409 Idempotenz, 413 Gr\u00F6\u00DFe, 415 Medientyp, 422 Dokumentdaten, 429 Ratenlimit oder workspace_allowance_exceeded (Monatskontingent), 503 nicht verf\u00FCgbar.",
            "content": {
              "application/problem\u002Bjson": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Wartezeit in Sekunden bei 429, laufenden Anfragen und vor\u00FCbergehenden Fehlern.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "202": {
            "description": "Auftrag angenommen oder bestehender Auftrag wiedergegeben; Location verweist auf den Status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "schema": {
                  "type": "string"
                }
              },
              "Idempotent-Replayed": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "true",
                    "false"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateRequest"
              },
              "example": {
                "format": "xrechnung",
                "number": "RE-000001",
                "documentType": "invoice",
                "sourceNumber": null,
                "sourceDate": null,
                "invoiceDate": "2026-11-01",
                "dueDate": "2026-11-15",
                "serviceDate": "2026-10-31",
                "seller": {
                  "name": "Beispiel Studio Berlin",
                  "contactName": "Erika Beispiel",
                  "street": "Musterstra\u00DFe 12",
                  "postalCode": "10117",
                  "city": "Berlin",
                  "countryCode": "DE",
                  "email": "rechnung@example.invalid",
                  "phone": "\u002B49 30 123456",
                  "vatId": "DE123456789",
                  "taxNumber": "12/345/67890",
                  "iban": "DE89370400440532013000",
                  "bic": "COBADEFFXXX",
                  "bankName": "Beispielbank"
                },
                "buyer": {
                  "name": "Musterfirma GmbH",
                  "contactName": "",
                  "street": "Beispielweg 8",
                  "postalCode": "20095",
                  "city": "Hamburg",
                  "countryCode": "DE",
                  "email": "kunde@example.invalid",
                  "phone": "",
                  "vatId": "",
                  "taxNumber": "",
                  "iban": "",
                  "bic": "",
                  "bankName": ""
                },
                "title": "Beratung und Umsetzung",
                "reference": "",
                "notes": "",
                "paymentTerms": "Zahlbar innerhalb von 14 Tagen.",
                "sellerIdentifier": "LIEFERANT-123",
                "buyerReference": "DEMO-BESTELLUNG-1",
                "sellerEndpoint": "rechnung@example.invalid",
                "buyerEndpoint": "kunde@example.invalid",
                "sellerEndpointScheme": "EM",
                "buyerEndpointScheme": "EM",
                "zeroTaxCategory": "",
                "lines": [
                  {
                    "description": "Softwareentwicklung",
                    "quantity": 8,
                    "unit": "Std.",
                    "unitPrice": 97,
                    "taxRate": 19,
                    "taxReason": ""
                  }
                ]
              }
            }
          }
        },
        "description": "HTTP 202 bedeutet gespeichert, nicht fertig oder technisch g\u00FCltig. Gleicher Idempotency-Key und identische Bytes liefern denselben Auftrag. Status unter GET /jobs/{id}; Ergebnisse \u00FCber documentId oder conversionReviewId \u00F6ffnen. Konvertierungsbest\u00E4tigungen, Ausstellung und E-Mail-Versand werden nicht automatisch ausgef\u00FChrt. Maximal 50 offene Auftr\u00E4ge pro Arbeitsbereich/Umgebung; eine aktive Hintergrundverarbeitung pro Arbeitsbereich/Umgebung. Read plus Generate f\u00FCr generate, Read plus Process f\u00FCr parse/validate, alle drei Rechte f\u00FCr conversion-review."
      }
    },
    "/api/v1/{environment}/jobs/parse": {
      "post": {
        "operationId": "queueparse",
        "summary": "Auftrag dauerhaft annehmen \u00B7 Read plus Aktionsrecht",
        "parameters": [
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sandbox",
                "live"
              ]
            },
            "description": "Muss zum API-Schl\u00FCssel passen."
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[!-~]\u002B$"
            },
            "description": "Pro Arbeitsbereich und Umgebung eindeutig; identische Wiederholungen liefern unver\u00E4nderte Ergebnisse. Andere Nutzdaten mit demselben Schl\u00FCssel: 409."
          }
        ],
        "responses": {
          "default": {
            "description": "Fehler; 400 Schema, 401 Schl\u00FCssel, 403 Rechte/Umgebung, 404 Ressource, 405 Methode, 408 Upload-Zeitlimit, 409 Idempotenz, 413 Gr\u00F6\u00DFe, 415 Medientyp, 422 Dokumentdaten, 429 Ratenlimit oder workspace_allowance_exceeded (Monatskontingent), 503 nicht verf\u00FCgbar.",
            "content": {
              "application/problem\u002Bjson": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Wartezeit in Sekunden bei 429, laufenden Anfragen und vor\u00FCbergehenden Fehlern.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "202": {
            "description": "Auftrag angenommen oder bestehender Auftrag wiedergegeben; Location verweist auf den Status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "schema": {
                  "type": "string"
                }
              },
              "Idempotent-Replayed": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "true",
                    "false"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/xml": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            },
            "application/pdf": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        },
        "description": "HTTP 202 bedeutet gespeichert, nicht fertig oder technisch g\u00FCltig. Gleicher Idempotency-Key und identische Bytes liefern denselben Auftrag. Status unter GET /jobs/{id}; Ergebnisse \u00FCber documentId oder conversionReviewId \u00F6ffnen. Konvertierungsbest\u00E4tigungen, Ausstellung und E-Mail-Versand werden nicht automatisch ausgef\u00FChrt. Maximal 50 offene Auftr\u00E4ge pro Arbeitsbereich/Umgebung; eine aktive Hintergrundverarbeitung pro Arbeitsbereich/Umgebung. Read plus Generate f\u00FCr generate, Read plus Process f\u00FCr parse/validate, alle drei Rechte f\u00FCr conversion-review."
      }
    },
    "/api/v1/{environment}/jobs/validate": {
      "post": {
        "operationId": "queuevalidate",
        "summary": "Auftrag dauerhaft annehmen \u00B7 Read plus Aktionsrecht",
        "parameters": [
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sandbox",
                "live"
              ]
            },
            "description": "Muss zum API-Schl\u00FCssel passen."
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[!-~]\u002B$"
            },
            "description": "Pro Arbeitsbereich und Umgebung eindeutig; identische Wiederholungen liefern unver\u00E4nderte Ergebnisse. Andere Nutzdaten mit demselben Schl\u00FCssel: 409."
          }
        ],
        "responses": {
          "default": {
            "description": "Fehler; 400 Schema, 401 Schl\u00FCssel, 403 Rechte/Umgebung, 404 Ressource, 405 Methode, 408 Upload-Zeitlimit, 409 Idempotenz, 413 Gr\u00F6\u00DFe, 415 Medientyp, 422 Dokumentdaten, 429 Ratenlimit oder workspace_allowance_exceeded (Monatskontingent), 503 nicht verf\u00FCgbar.",
            "content": {
              "application/problem\u002Bjson": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Wartezeit in Sekunden bei 429, laufenden Anfragen und vor\u00FCbergehenden Fehlern.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "202": {
            "description": "Auftrag angenommen oder bestehender Auftrag wiedergegeben; Location verweist auf den Status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "schema": {
                  "type": "string"
                }
              },
              "Idempotent-Replayed": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "true",
                    "false"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/xml": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            },
            "application/pdf": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        },
        "description": "HTTP 202 bedeutet gespeichert, nicht fertig oder technisch g\u00FCltig. Gleicher Idempotency-Key und identische Bytes liefern denselben Auftrag. Status unter GET /jobs/{id}; Ergebnisse \u00FCber documentId oder conversionReviewId \u00F6ffnen. Konvertierungsbest\u00E4tigungen, Ausstellung und E-Mail-Versand werden nicht automatisch ausgef\u00FChrt. Maximal 50 offene Auftr\u00E4ge pro Arbeitsbereich/Umgebung; eine aktive Hintergrundverarbeitung pro Arbeitsbereich/Umgebung. Read plus Generate f\u00FCr generate, Read plus Process f\u00FCr parse/validate, alle drei Rechte f\u00FCr conversion-review."
      }
    },
    "/api/v1/{environment}/jobs/conversion-review": {
      "post": {
        "operationId": "queueconversionreview",
        "summary": "Auftrag dauerhaft annehmen \u00B7 Read plus Aktionsrecht",
        "parameters": [
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sandbox",
                "live"
              ]
            },
            "description": "Muss zum API-Schl\u00FCssel passen."
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[!-~]\u002B$"
            },
            "description": "Pro Arbeitsbereich und Umgebung eindeutig; identische Wiederholungen liefern unver\u00E4nderte Ergebnisse. Andere Nutzdaten mit demselben Schl\u00FCssel: 409."
          }
        ],
        "responses": {
          "default": {
            "description": "Fehler; 400 Schema, 401 Schl\u00FCssel, 403 Rechte/Umgebung, 404 Ressource, 405 Methode, 408 Upload-Zeitlimit, 409 Idempotenz, 413 Gr\u00F6\u00DFe, 415 Medientyp, 422 Dokumentdaten, 429 Ratenlimit oder workspace_allowance_exceeded (Monatskontingent), 503 nicht verf\u00FCgbar.",
            "content": {
              "application/problem\u002Bjson": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Wartezeit in Sekunden bei 429, laufenden Anfragen und vor\u00FCbergehenden Fehlern.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "202": {
            "description": "Auftrag angenommen oder bestehender Auftrag wiedergegeben; Location verweist auf den Status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "schema": {
                  "type": "string"
                }
              },
              "Idempotent-Replayed": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "true",
                    "false"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversionReviewRequest"
              }
            }
          }
        },
        "description": "HTTP 202 bedeutet gespeichert, nicht fertig oder technisch g\u00FCltig. Gleicher Idempotency-Key und identische Bytes liefern denselben Auftrag. Status unter GET /jobs/{id}; Ergebnisse \u00FCber documentId oder conversionReviewId \u00F6ffnen. Konvertierungsbest\u00E4tigungen, Ausstellung und E-Mail-Versand werden nicht automatisch ausgef\u00FChrt. Maximal 50 offene Auftr\u00E4ge pro Arbeitsbereich/Umgebung; eine aktive Hintergrundverarbeitung pro Arbeitsbereich/Umgebung. Read plus Generate f\u00FCr generate, Read plus Process f\u00FCr parse/validate, alle drei Rechte f\u00FCr conversion-review."
      }
    },
    "/api/v1/{environment}/jobs": {
      "get": {
        "operationId": "listjobs",
        "summary": "Verlauf lesen \u00B7 Read",
        "parameters": [
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sandbox",
                "live"
              ]
            },
            "description": "Muss zum API-Schl\u00FCssel passen."
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "nextCursor aus der vorherigen Seite"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "description": "Seitengr\u00F6\u00DFe"
          }
        ],
        "responses": {
          "200": {
            "description": "Ergebnis",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobPage"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Fehler; 400 Schema, 401 Schl\u00FCssel, 403 Rechte/Umgebung, 404 Ressource, 405 Methode, 408 Upload-Zeitlimit, 409 Idempotenz, 413 Gr\u00F6\u00DFe, 415 Medientyp, 422 Dokumentdaten, 429 Ratenlimit oder workspace_allowance_exceeded (Monatskontingent), 503 nicht verf\u00FCgbar.",
            "content": {
              "application/problem\u002Bjson": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Wartezeit in Sekunden bei 429, laufenden Anfragen und vor\u00FCbergehenden Fehlern.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/{environment}/jobs/{id}": {
      "get": {
        "operationId": "getjobs",
        "summary": "Gespeicherten Status lesen \u00B7 Read",
        "parameters": [
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sandbox",
                "live"
              ]
            },
            "description": "Muss zum API-Schl\u00FCssel passen."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Ressourcen-ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Ergebnis",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Fehler; 400 Schema, 401 Schl\u00FCssel, 403 Rechte/Umgebung, 404 Ressource, 405 Methode, 408 Upload-Zeitlimit, 409 Idempotenz, 413 Gr\u00F6\u00DFe, 415 Medientyp, 422 Dokumentdaten, 429 Ratenlimit oder workspace_allowance_exceeded (Monatskontingent), 503 nicht verf\u00FCgbar.",
            "content": {
              "application/problem\u002Bjson": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Wartezeit in Sekunden bei 429, laufenden Anfragen und vor\u00FCbergehenden Fehlern.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/{environment}/jobs/{id}/retry": {
      "post": {
        "operationId": "retryjobs",
        "summary": "Fehlgeschlagenen Vorgang ausdr\u00FCcklich erneut einplanen \u00B7 Read, Process, Generate",
        "parameters": [
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sandbox",
                "live"
              ]
            },
            "description": "Muss zum API-Schl\u00FCssel passen."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Ressourcen-ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Ergebnis",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Fehler; 400 Schema, 401 Schl\u00FCssel, 403 Rechte/Umgebung, 404 Ressource, 405 Methode, 408 Upload-Zeitlimit, 409 Idempotenz, 413 Gr\u00F6\u00DFe, 415 Medientyp, 422 Dokumentdaten, 429 Ratenlimit oder workspace_allowance_exceeded (Monatskontingent), 503 nicht verf\u00FCgbar.",
            "content": {
              "application/problem\u002Bjson": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Wartezeit in Sekunden bei 429, laufenden Anfragen und vor\u00FCbergehenden Fehlern.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RetryRequest"
              }
            }
          }
        },
        "description": "JSON bis 1 KiB. expectedAttempts muss dem zuletzt gelesenen Z\u00E4hler entsprechen. Wiederholung w\u00E4hrend queued/processing/pending/sending ver\u00E4ndert nichts; nach einem weiteren Versuch liefert derselbe Z\u00E4hler 409 retry_state_changed. Kein Idempotency-Key f\u00FCr diesen zustandsgebundenen Retry-Endpunkt. Urspr\u00FCngliche Eingabe, Ereignis-ID und Nutzdaten bleiben unver\u00E4ndert; erfolgreiche Ergebnisse werden nicht neu erzeugt."
      }
    },
    "/api/v1/{environment}/webhook-deliveries": {
      "get": {
        "operationId": "listwebhookdeliveries",
        "summary": "Verlauf lesen \u00B7 Read",
        "parameters": [
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sandbox",
                "live"
              ]
            },
            "description": "Muss zum API-Schl\u00FCssel passen."
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "nextCursor aus der vorherigen Seite"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "description": "Seitengr\u00F6\u00DFe"
          }
        ],
        "responses": {
          "200": {
            "description": "Ergebnis",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryPage"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Fehler; 400 Schema, 401 Schl\u00FCssel, 403 Rechte/Umgebung, 404 Ressource, 405 Methode, 408 Upload-Zeitlimit, 409 Idempotenz, 413 Gr\u00F6\u00DFe, 415 Medientyp, 422 Dokumentdaten, 429 Ratenlimit oder workspace_allowance_exceeded (Monatskontingent), 503 nicht verf\u00FCgbar.",
            "content": {
              "application/problem\u002Bjson": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Wartezeit in Sekunden bei 429, laufenden Anfragen und vor\u00FCbergehenden Fehlern.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/{environment}/webhook-deliveries/{id}": {
      "get": {
        "operationId": "getwebhookdeliveries",
        "summary": "Gespeicherten Status lesen \u00B7 Read",
        "parameters": [
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sandbox",
                "live"
              ]
            },
            "description": "Muss zum API-Schl\u00FCssel passen."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Ressourcen-ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Ergebnis",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryDetails"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Fehler; 400 Schema, 401 Schl\u00FCssel, 403 Rechte/Umgebung, 404 Ressource, 405 Methode, 408 Upload-Zeitlimit, 409 Idempotenz, 413 Gr\u00F6\u00DFe, 415 Medientyp, 422 Dokumentdaten, 429 Ratenlimit oder workspace_allowance_exceeded (Monatskontingent), 503 nicht verf\u00FCgbar.",
            "content": {
              "application/problem\u002Bjson": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Wartezeit in Sekunden bei 429, laufenden Anfragen und vor\u00FCbergehenden Fehlern.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/{environment}/webhook-deliveries/{id}/retry": {
      "post": {
        "operationId": "retrywebhookdeliveries",
        "summary": "Fehlgeschlagenen Vorgang ausdr\u00FCcklich erneut einplanen \u00B7 Read, Process, Generate",
        "parameters": [
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sandbox",
                "live"
              ]
            },
            "description": "Muss zum API-Schl\u00FCssel passen."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Ressourcen-ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Ergebnis",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Delivery"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Fehler; 400 Schema, 401 Schl\u00FCssel, 403 Rechte/Umgebung, 404 Ressource, 405 Methode, 408 Upload-Zeitlimit, 409 Idempotenz, 413 Gr\u00F6\u00DFe, 415 Medientyp, 422 Dokumentdaten, 429 Ratenlimit oder workspace_allowance_exceeded (Monatskontingent), 503 nicht verf\u00FCgbar.",
            "content": {
              "application/problem\u002Bjson": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Wartezeit in Sekunden bei 429, laufenden Anfragen und vor\u00FCbergehenden Fehlern.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RetryRequest"
              }
            }
          }
        },
        "description": "JSON bis 1 KiB. expectedAttempts muss dem zuletzt gelesenen Z\u00E4hler entsprechen. Wiederholung w\u00E4hrend queued/processing/pending/sending ver\u00E4ndert nichts; nach einem weiteren Versuch liefert derselbe Z\u00E4hler 409 retry_state_changed. Kein Idempotency-Key f\u00FCr diesen zustandsgebundenen Retry-Endpunkt. Urspr\u00FCngliche Eingabe, Ereignis-ID und Nutzdaten bleiben unver\u00E4ndert; erfolgreiche Ergebnisse werden nicht neu erzeugt."
      }
    },
    "/api/v1/{environment}/jobs/{id}/input": {
      "get": {
        "operationId": "downloadJobInput",
        "summary": "Unver\u00E4nderte Originaleingabe herunterladen \u00B7 Read",
        "parameters": [
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sandbox",
                "live"
              ]
            },
            "description": "Muss zum API-Schl\u00FCssel passen."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Auftrags-ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Originaleingabe mit X-Content-SHA256.",
            "headers": {
              "X-Content-SHA256": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/xml": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "default": {
            "description": "Fehler; 400 Schema, 401 Schl\u00FCssel, 403 Rechte/Umgebung, 404 Ressource, 405 Methode, 408 Upload-Zeitlimit, 409 Idempotenz, 413 Gr\u00F6\u00DFe, 415 Medientyp, 422 Dokumentdaten, 429 Ratenlimit oder workspace_allowance_exceeded (Monatskontingent), 503 nicht verf\u00FCgbar.",
            "content": {
              "application/problem\u002Bjson": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Wartezeit in Sekunden bei 429, laufenden Anfragen und vor\u00FCbergehenden Fehlern.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/{environment}/documents/{id}": {
      "get": {
        "operationId": "getDocument",
        "summary": "Dokumentdaten und Artefakte lesen \u00B7 Recht Read",
        "parameters": [
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sandbox",
                "live"
              ]
            },
            "description": "Muss zum API-Schl\u00FCssel passen."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Dokument-ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Ergebnis",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Fehler; 400 Schema, 401 Schl\u00FCssel, 403 Rechte/Umgebung, 404 Ressource, 405 Methode, 408 Upload-Zeitlimit, 409 Idempotenz, 413 Gr\u00F6\u00DFe, 415 Medientyp, 422 Dokumentdaten, 429 Ratenlimit oder workspace_allowance_exceeded (Monatskontingent), 503 nicht verf\u00FCgbar.",
            "content": {
              "application/problem\u002Bjson": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Wartezeit in Sekunden bei 429, laufenden Anfragen und vor\u00FCbergehenden Fehlern.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/{environment}/documents/{id}/original": {
      "get": {
        "operationId": "downloadOriginal",
        "summary": "Unver\u00E4nderte Datei herunterladen \u00B7 Recht Read",
        "parameters": [
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sandbox",
                "live"
              ]
            },
            "description": "Muss zum API-Schl\u00FCssel passen."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Dokument-ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Datei; nicht vorhandene Artefakte liefern 404.",
            "headers": {
              "X-Content-SHA256": {
                "schema": {
                  "type": "string"
                },
                "description": "SHA-256 der Originalbytes, hexadezimal."
              }
            },
            "content": {
              "application/xml": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "default": {
            "description": "Fehler; 400 Schema, 401 Schl\u00FCssel, 403 Rechte/Umgebung, 404 Ressource, 405 Methode, 408 Upload-Zeitlimit, 409 Idempotenz, 413 Gr\u00F6\u00DFe, 415 Medientyp, 422 Dokumentdaten, 429 Ratenlimit oder workspace_allowance_exceeded (Monatskontingent), 503 nicht verf\u00FCgbar.",
            "content": {
              "application/problem\u002Bjson": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Wartezeit in Sekunden bei 429, laufenden Anfragen und vor\u00FCbergehenden Fehlern.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/{environment}/documents/{id}/xml": {
      "get": {
        "operationId": "downloadXml",
        "summary": "Unver\u00E4nderte Datei herunterladen \u00B7 Recht Read",
        "parameters": [
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sandbox",
                "live"
              ]
            },
            "description": "Muss zum API-Schl\u00FCssel passen."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Dokument-ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Datei; nicht vorhandene Artefakte liefern 404.",
            "headers": {
              "X-Content-SHA256": {
                "schema": {
                  "type": "string"
                },
                "description": "SHA-256 der Originalbytes, hexadezimal."
              }
            },
            "content": {
              "application/xml": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "default": {
            "description": "Fehler; 400 Schema, 401 Schl\u00FCssel, 403 Rechte/Umgebung, 404 Ressource, 405 Methode, 408 Upload-Zeitlimit, 409 Idempotenz, 413 Gr\u00F6\u00DFe, 415 Medientyp, 422 Dokumentdaten, 429 Ratenlimit oder workspace_allowance_exceeded (Monatskontingent), 503 nicht verf\u00FCgbar.",
            "content": {
              "application/problem\u002Bjson": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Wartezeit in Sekunden bei 429, laufenden Anfragen und vor\u00FCbergehenden Fehlern.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/{environment}/documents/{id}/pdf": {
      "get": {
        "operationId": "downloadPdf",
        "summary": "Unver\u00E4nderte Datei herunterladen \u00B7 Recht Read",
        "parameters": [
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sandbox",
                "live"
              ]
            },
            "description": "Muss zum API-Schl\u00FCssel passen."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Dokument-ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Datei; nicht vorhandene Artefakte liefern 404.",
            "headers": {
              "X-Content-SHA256": {
                "schema": {
                  "type": "string"
                },
                "description": "SHA-256 der Originalbytes, hexadezimal."
              }
            },
            "content": {
              "application/xml": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "default": {
            "description": "Fehler; 400 Schema, 401 Schl\u00FCssel, 403 Rechte/Umgebung, 404 Ressource, 405 Methode, 408 Upload-Zeitlimit, 409 Idempotenz, 413 Gr\u00F6\u00DFe, 415 Medientyp, 422 Dokumentdaten, 429 Ratenlimit oder workspace_allowance_exceeded (Monatskontingent), 503 nicht verf\u00FCgbar.",
            "content": {
              "application/problem\u002Bjson": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Wartezeit in Sekunden bei 429, laufenden Anfragen und vor\u00FCbergehenden Fehlern.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/{environment}/documents/{id}/report": {
      "get": {
        "operationId": "downloadReport",
        "summary": "Unver\u00E4nderte Datei herunterladen \u00B7 Recht Read",
        "parameters": [
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sandbox",
                "live"
              ]
            },
            "description": "Muss zum API-Schl\u00FCssel passen."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Dokument-ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Datei; nicht vorhandene Artefakte liefern 404.",
            "headers": {
              "X-Content-SHA256": {
                "schema": {
                  "type": "string"
                },
                "description": "SHA-256 der Originalbytes, hexadezimal."
              }
            },
            "content": {
              "application/xml": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "default": {
            "description": "Fehler; 400 Schema, 401 Schl\u00FCssel, 403 Rechte/Umgebung, 404 Ressource, 405 Methode, 408 Upload-Zeitlimit, 409 Idempotenz, 413 Gr\u00F6\u00DFe, 415 Medientyp, 422 Dokumentdaten, 429 Ratenlimit oder workspace_allowance_exceeded (Monatskontingent), 503 nicht verf\u00FCgbar.",
            "content": {
              "application/problem\u002Bjson": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Wartezeit in Sekunden bei 429, laufenden Anfragen und vor\u00FCbergehenden Fehlern.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/{environment}/requests": {
      "get": {
        "operationId": "getRequests",
        "summary": "Anfrageverlauf des Arbeitsbereichs und der Umgebung \u00B7 Recht Read",
        "parameters": [
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sandbox",
                "live"
              ]
            },
            "description": "Muss zum API-Schl\u00FCssel passen."
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            },
            "description": "nextCursor aus der vorherigen Seite."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "description": "Seitengr\u00F6\u00DFe"
          }
        ],
        "responses": {
          "200": {
            "description": "Ergebnis",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequestPage"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Fehler; 400 Schema, 401 Schl\u00FCssel, 403 Rechte/Umgebung, 404 Ressource, 405 Methode, 408 Upload-Zeitlimit, 409 Idempotenz, 413 Gr\u00F6\u00DFe, 415 Medientyp, 422 Dokumentdaten, 429 Ratenlimit oder workspace_allowance_exceeded (Monatskontingent), 503 nicht verf\u00FCgbar.",
            "content": {
              "application/problem\u002Bjson": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Wartezeit in Sekunden bei 429, laufenden Anfragen und vor\u00FCbergehenden Fehlern.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {
    "jobCompleted": {
      "post": {
        "summary": "Signiertes job.succeeded oder job.failed Ereignis",
        "security": [],
        "description": "Empf\u00E4nger in Auftr\u00E4ge \u0026 Webhooks konfigurieren. HMAC-SHA256 \u00FCber UTF-8 timestamp \u002B \u0027.\u0027 \u002B eventId \u002B \u0027.\u0027 \u002B unver\u00E4nderte JSON-Bytes. Header X-Rebilix-Signature: v1=hex. F\u00FCnf Minuten Zeitfenster pr\u00FCfen; Ereignis-ID dauerhaft deduplizieren. Reihenfolge nicht garantiert; mindestens einmalige Zustellversuche, keine Exactly-once-Garantie. 2xx best\u00E4tigt Empfang.",
        "parameters": [
          {
            "name": "X-Rebilix-Event-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Stabil bei Wiederholungen"
          },
          {
            "name": "X-Rebilix-Delivery-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Zustellungs-ID"
          },
          {
            "name": "X-Rebilix-Timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Unix-Sekunden"
          },
          {
            "name": "X-Rebilix-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "v1=HMAC-SHA256"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JobWebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Empfangen / bereits verarbeitet"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "rbx_test_* / rbx_live_*"
      }
    },
    "schemas": {
      "GenerateRequest": {
        "type": "object",
        "properties": {
          "format": {
            "type": "string",
            "enum": [
              "xrechnung",
              "zugferd"
            ],
            "default": "xrechnung"
          },
          "number": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "documentType": {
            "type": "string",
            "enum": [
              "invoice",
              "credit_note"
            ],
            "default": "invoice"
          },
          "sourceNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "sourceDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "invoiceDate": {
            "type": "string",
            "format": "date"
          },
          "dueDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "serviceDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "seller": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "contactName": {
                "type": "string"
              },
              "street": {
                "type": "string"
              },
              "postalCode": {
                "type": "string"
              },
              "city": {
                "type": "string"
              },
              "countryCode": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "phone": {
                "type": "string"
              },
              "vatId": {
                "type": "string"
              },
              "taxNumber": {
                "type": "string"
              },
              "iban": {
                "type": "string"
              },
              "bic": {
                "type": "string"
              },
              "bankName": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "buyer": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "contactName": {
                "type": "string"
              },
              "street": {
                "type": "string"
              },
              "postalCode": {
                "type": "string"
              },
              "city": {
                "type": "string"
              },
              "countryCode": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "phone": {
                "type": "string"
              },
              "vatId": {
                "type": "string"
              },
              "taxNumber": {
                "type": "string"
              },
              "iban": {
                "type": "string"
              },
              "bic": {
                "type": "string"
              },
              "bankName": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "title": {
            "type": "string"
          },
          "reference": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "paymentTerms": {
            "type": "string"
          },
          "sellerIdentifier": {
            "type": "string"
          },
          "buyerReference": {
            "type": "string"
          },
          "sellerEndpoint": {
            "type": "string"
          },
          "buyerEndpoint": {
            "type": "string"
          },
          "sellerEndpointScheme": {
            "type": "string"
          },
          "buyerEndpointScheme": {
            "type": "string"
          },
          "zeroTaxCategory": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "description": {
                  "type": "string"
                },
                "quantity": {
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "maximum": 1000000,
                  "multipleOf": 0.0001
                },
                "unit": {
                  "type": "string"
                },
                "unitPrice": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1000000,
                  "multipleOf": 0.0001
                },
                "taxRate": {
                  "type": "number",
                  "enum": [
                    0,
                    7,
                    19
                  ]
                },
                "taxReason": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            },
            "minItems": 1,
            "maxItems": 100
          }
        },
        "additionalProperties": false,
        "required": [
          "number",
          "invoiceDate",
          "serviceDate",
          "seller",
          "buyer",
          "lines"
        ]
      },
      "Document": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "environment": {
            "type": "string"
          },
          "operation": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "validationStatus": {
            "type": "string"
          },
          "rules": {
            "type": [
              "string",
              "null"
            ]
          },
          "checkedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "invoice": {
            "type": "object",
            "properties": {
              "format": {
                "type": "string"
              },
              "profile": {
                "type": "string"
              },
              "type": {
                "type": "string"
              },
              "number": {
                "type": "string"
              },
              "currency": {
                "type": "string"
              },
              "reference": {
                "type": "string"
              },
              "date": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date"
              },
              "due": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date"
              },
              "seller": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "contactName": {
                    "type": "string"
                  },
                  "street": {
                    "type": "string"
                  },
                  "postalCode": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "countryCode": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "vatId": {
                    "type": "string"
                  },
                  "taxNumber": {
                    "type": "string"
                  },
                  "iban": {
                    "type": "string"
                  },
                  "bic": {
                    "type": "string"
                  },
                  "bankName": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              },
              "buyer": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "contactName": {
                    "type": "string"
                  },
                  "street": {
                    "type": "string"
                  },
                  "postalCode": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "countryCode": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "vatId": {
                    "type": "string"
                  },
                  "taxNumber": {
                    "type": "string"
                  },
                  "iban": {
                    "type": "string"
                  },
                  "bic": {
                    "type": "string"
                  },
                  "bankName": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              },
              "notes": {
                "type": "string"
              },
              "paymentTerms": {
                "type": "string"
              },
              "net": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "tax": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "gross": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "payable": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "prepaid": {
                "type": "number"
              },
              "rounding": {
                "type": "number"
              },
              "lines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "quantity": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "unit": {
                      "type": "string"
                    },
                    "price": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "priceBase": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "net": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "taxCategory": {
                      "type": "string"
                    },
                    "taxRate": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "description",
                    "quantity",
                    "unit",
                    "price",
                    "priceBase",
                    "net",
                    "taxCategory",
                    "taxRate"
                  ],
                  "additionalProperties": false
                }
              },
              "taxes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "category": {
                      "type": "string"
                    },
                    "rate": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "net": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "tax": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "reason": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "category",
                    "rate",
                    "net",
                    "tax",
                    "reason"
                  ],
                  "additionalProperties": false
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "additionalProperties": false
          },
          "findings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "level": {
                  "type": "string"
                },
                "location": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "code",
                "message",
                "level",
                "location"
              ],
              "additionalProperties": false
            }
          },
          "artifacts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string"
                },
                "contentType": {
                  "type": "string"
                },
                "size": {
                  "type": "integer"
                },
                "sha256": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                }
              },
              "required": [
                "kind",
                "contentType",
                "size",
                "sha256",
                "url"
              ],
              "additionalProperties": false
            }
          },
          "sourceDocumentId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "conversionReviewId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        },
        "required": [
          "id",
          "environment",
          "operation",
          "createdAt",
          "validationStatus",
          "rules",
          "checkedAt",
          "invoice",
          "findings",
          "artifacts"
        ],
        "additionalProperties": false
      },
      "ConversionReviewRequest": {
        "type": "object",
        "properties": {
          "sourceDocumentId": {
            "type": "string",
            "format": "uuid"
          },
          "targetFormat": {
            "type": "string",
            "enum": [
              "xrechnung",
              "zugferd"
            ]
          },
          "supplements": {
            "type": "object",
            "properties": {
              "buyerReference": {
                "type": "string"
              },
              "sellerEndpoint": {
                "type": "string"
              },
              "sellerEndpointScheme": {
                "type": "string"
              },
              "buyerEndpoint": {
                "type": "string"
              },
              "buyerEndpointScheme": {
                "type": "string"
              },
              "sellerContactName": {
                "type": "string"
              },
              "sellerContactPhone": {
                "type": "string"
              },
              "sellerContactEmail": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false,
        "required": [
          "sourceDocumentId",
          "targetFormat"
        ]
      },
      "ConversionConfirmRequest": {
        "type": "object",
        "properties": {
          "reviewId": {
            "type": "string",
            "format": "uuid"
          },
          "reviewHash": {
            "type": "string",
            "minLength": 64,
            "maxLength": 64
          },
          "confirm": {
            "type": "boolean",
            "const": true
          }
        },
        "additionalProperties": false,
        "required": [
          "reviewId",
          "reviewHash",
          "confirm"
        ]
      },
      "ConversionReview": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "environment": {
            "type": "string"
          },
          "sourceDocumentId": {
            "type": "string",
            "format": "uuid"
          },
          "sourceSha256": {
            "type": "string"
          },
          "targetFormat": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "reviewHash": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "engine": {
            "type": "string"
          },
          "sourceRules": {
            "type": [
              "string",
              "null"
            ]
          },
          "targetRules": {
            "type": [
              "string",
              "null"
            ]
          },
          "preview": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "format": {
                "type": "string"
              },
              "profile": {
                "type": "string"
              },
              "type": {
                "type": "string"
              },
              "number": {
                "type": "string"
              },
              "currency": {
                "type": "string"
              },
              "reference": {
                "type": "string"
              },
              "date": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date"
              },
              "due": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date"
              },
              "seller": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "contactName": {
                    "type": "string"
                  },
                  "street": {
                    "type": "string"
                  },
                  "postalCode": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "countryCode": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "vatId": {
                    "type": "string"
                  },
                  "taxNumber": {
                    "type": "string"
                  },
                  "iban": {
                    "type": "string"
                  },
                  "bic": {
                    "type": "string"
                  },
                  "bankName": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              },
              "buyer": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "contactName": {
                    "type": "string"
                  },
                  "street": {
                    "type": "string"
                  },
                  "postalCode": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "countryCode": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "vatId": {
                    "type": "string"
                  },
                  "taxNumber": {
                    "type": "string"
                  },
                  "iban": {
                    "type": "string"
                  },
                  "bic": {
                    "type": "string"
                  },
                  "bankName": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              },
              "notes": {
                "type": "string"
              },
              "paymentTerms": {
                "type": "string"
              },
              "net": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "tax": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "gross": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "payable": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "prepaid": {
                "type": "number"
              },
              "rounding": {
                "type": "number"
              },
              "lines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "quantity": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "unit": {
                      "type": "string"
                    },
                    "price": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "priceBase": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "net": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "taxCategory": {
                      "type": "string"
                    },
                    "taxRate": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "description",
                    "quantity",
                    "unit",
                    "price",
                    "priceBase",
                    "net",
                    "taxCategory",
                    "taxRate"
                  ],
                  "additionalProperties": false
                }
              },
              "taxes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "category": {
                      "type": "string"
                    },
                    "rate": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "net": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "tax": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "reason": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "category",
                    "rate",
                    "net",
                    "tax",
                    "reason"
                  ],
                  "additionalProperties": false
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "additionalProperties": false
          },
          "additions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                }
              },
              "required": [
                "field",
                "value"
              ],
              "additionalProperties": false
            }
          },
          "findings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "level": {
                  "type": "string"
                },
                "location": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "code",
                "message",
                "level",
                "location"
              ],
              "additionalProperties": false
            }
          },
          "artifacts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string"
                },
                "contentType": {
                  "type": "string"
                },
                "size": {
                  "type": "integer"
                },
                "sha256": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                }
              },
              "required": [
                "kind",
                "contentType",
                "size",
                "sha256",
                "url"
              ],
              "additionalProperties": false
            }
          },
          "convertedDocumentId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "default": null
          },
          "sourceCheckedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "targetCheckedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "environment",
          "sourceDocumentId",
          "sourceSha256",
          "targetFormat",
          "status",
          "reviewHash",
          "createdAt",
          "engine",
          "sourceRules",
          "targetRules",
          "preview",
          "additions",
          "findings",
          "artifacts"
        ],
        "additionalProperties": false
      },
      "RequestPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "requestId": {
                  "type": "string"
                },
                "method": {
                  "type": "string"
                },
                "route": {
                  "type": "string"
                },
                "statusCode": {
                  "type": "integer"
                },
                "code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "documentId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "replayed": {
                  "type": "boolean"
                },
                "startedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "durationMs": {
                  "type": "integer"
                },
                "jobId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "conversionReviewId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                }
              },
              "required": [
                "id",
                "requestId",
                "method",
                "route",
                "statusCode",
                "code",
                "documentId",
                "replayed",
                "startedAt",
                "durationMs"
              ],
              "additionalProperties": false
            }
          },
          "nextCursor": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "items",
          "nextCursor"
        ],
        "additionalProperties": false
      },
      "Job": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "sequence": {
            "type": "integer"
          },
          "environment": {
            "type": "string"
          },
          "operation": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "attempts": {
            "type": "integer"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "startedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "completedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "nextAttemptAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "errorCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "errorMessage": {
            "type": [
              "string",
              "null"
            ]
          },
          "canRetry": {
            "type": "boolean"
          },
          "documentId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "conversionReviewId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "resultStatus": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "sequence",
          "environment",
          "operation",
          "state",
          "attempts",
          "createdAt",
          "startedAt",
          "completedAt",
          "nextAttemptAt",
          "errorCode",
          "errorMessage",
          "canRetry",
          "documentId",
          "conversionReviewId",
          "resultStatus"
        ],
        "additionalProperties": false
      },
      "JobPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "sequence": {
                  "type": "integer"
                },
                "environment": {
                  "type": "string"
                },
                "operation": {
                  "type": "string"
                },
                "state": {
                  "type": "string"
                },
                "attempts": {
                  "type": "integer"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "startedAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "completedAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "nextAttemptAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "errorCode": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "errorMessage": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "canRetry": {
                  "type": "boolean"
                },
                "documentId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "conversionReviewId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "resultStatus": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "sequence",
                "environment",
                "operation",
                "state",
                "attempts",
                "createdAt",
                "startedAt",
                "completedAt",
                "nextAttemptAt",
                "errorCode",
                "errorMessage",
                "canRetry",
                "documentId",
                "conversionReviewId",
                "resultStatus"
              ],
              "additionalProperties": false
            }
          },
          "nextCursor": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "items",
          "nextCursor"
        ],
        "additionalProperties": false
      },
      "Delivery": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "sequence": {
            "type": "integer"
          },
          "environment": {
            "type": "string"
          },
          "endpointId": {
            "type": "string",
            "format": "uuid"
          },
          "eventId": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "type": "string"
          },
          "attempts": {
            "type": "integer"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "nextAttemptAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "completedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "errorCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "canRetry": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "sequence",
          "environment",
          "endpointId",
          "eventId",
          "state",
          "attempts",
          "createdAt",
          "nextAttemptAt",
          "completedAt",
          "errorCode",
          "canRetry"
        ],
        "additionalProperties": false
      },
      "DeliveryPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "sequence": {
                  "type": "integer"
                },
                "environment": {
                  "type": "string"
                },
                "endpointId": {
                  "type": "string",
                  "format": "uuid"
                },
                "eventId": {
                  "type": "string",
                  "format": "uuid"
                },
                "state": {
                  "type": "string"
                },
                "attempts": {
                  "type": "integer"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "nextAttemptAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "completedAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "errorCode": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "canRetry": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "sequence",
                "environment",
                "endpointId",
                "eventId",
                "state",
                "attempts",
                "createdAt",
                "nextAttemptAt",
                "completedAt",
                "errorCode",
                "canRetry"
              ],
              "additionalProperties": false
            }
          },
          "nextCursor": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "items",
          "nextCursor"
        ],
        "additionalProperties": false
      },
      "DeliveryDetails": {
        "type": "object",
        "properties": {
          "delivery": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "sequence": {
                "type": "integer"
              },
              "environment": {
                "type": "string"
              },
              "endpointId": {
                "type": "string",
                "format": "uuid"
              },
              "eventId": {
                "type": "string",
                "format": "uuid"
              },
              "state": {
                "type": "string"
              },
              "attempts": {
                "type": "integer"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "nextAttemptAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "completedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "errorCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "canRetry": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "sequence",
              "environment",
              "endpointId",
              "eventId",
              "state",
              "attempts",
              "createdAt",
              "nextAttemptAt",
              "completedAt",
              "errorCode",
              "canRetry"
            ],
            "additionalProperties": false
          },
          "payload": {
            "type": "string"
          },
          "attempts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "number": {
                  "type": "integer"
                },
                "startedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "finishedAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "state": {
                  "type": "string"
                },
                "statusCode": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "errorCode": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "captured": {
                  "type": "boolean"
                },
                "timestamp": {
                  "type": "string"
                },
                "signature": {
                  "type": "string"
                }
              },
              "required": [
                "number",
                "startedAt",
                "finishedAt",
                "state",
                "statusCode",
                "errorCode",
                "captured",
                "timestamp",
                "signature"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "delivery",
          "payload",
          "attempts"
        ],
        "additionalProperties": false
      },
      "RetryRequest": {
        "type": "object",
        "properties": {
          "expectedAttempts": {
            "type": "integer",
            "minimum": 1
          }
        },
        "additionalProperties": false,
        "required": [
          "expectedAttempts"
        ]
      },
      "JobWebhookEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string"
          },
          "environment": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "version": {
            "type": "integer"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "jobId": {
            "type": "string",
            "format": "uuid"
          },
          "operation": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "resultStatus": {
            "type": [
              "string",
              "null"
            ]
          },
          "documentId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "conversionReviewId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "errorCode": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "type",
          "environment",
          "createdAt",
          "version",
          "workspaceId",
          "jobId",
          "operation",
          "state",
          "resultStatus",
          "documentId",
          "conversionReviewId",
          "errorCode"
        ],
        "additionalProperties": false
      },
      "ApiProblem": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "detail": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "findings": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "level": {
                  "type": "string"
                },
                "location": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "code",
                "message",
                "level",
                "location"
              ],
              "additionalProperties": false
            },
            "default": null
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "detail",
          "code",
          "requestId"
        ],
        "additionalProperties": false
      }
    }
  }
}