{
  "openapi": "3.1.0",
  "info": {
    "title": "Dibito REST API",
    "description": "The Dibito REST API provides services to submit, verify and deliver eBills.\nThe API is designed to be used by biller integrations.\n<br />\nPlease refer to the <a href=\"https://dibito.ch/entwickler-api/api-tutorial/\">API tutorial</a> for your first eBill submission.\n<h3>API Key</h3>\nThis API requires an API key to be passed in the `X-API-Key` header.\n<br />\nGenerate your API key in the Dibito application under \"Dibito -> API Keys\".\n<h3>Top level overview</h3>\n<ul>\n<li>Create bills by posting either a <a href=\"https://dibito.ch/dokumentation/dibito-handbuch/geschaeftsfaelle-in-dibito-erstellen/\">QR-Invoice as PDF</a> to the /v1/business-cases` endpoint or a fully populated JSON object to one of the business case type endpoints.</li>\n<li>If the request succeeds, it passed validation and can be delivered to the <a href=\"https://dibito.ch/dokumentation/anmeldungen-von-rechnungsempfaengern/\">eBill recipients</a>.</li>\n<li>Use the webhook endpoints to be notified about changes to your recipient subscriptions or business case statuses.</li>\n</ul>\n<h4>Referencing existing bills</h4>\nIf you pass one of the reference parameters or fill in the referenced bills section in your business case, the submitted eBill will:\n<ul>\n<li>In case of a reminder: Add a reminder to the eBill portal of the reciepient for the referenced bill.</li>\n<li>In case of a donation inquiry: Will do nothing. Donation inquiries cannot be referenced.</li>\n<li>In any other case: Replace the referenced bill with the new one in the eBill portal of the recipient. (Hint: Use advices to effectively cancel delivered eBills.)</li>\n</ul>\n<h3>Product Website</h3>\n<a href=\"https://www.dibito.ch\">https://www.dibito.ch</a>\n<h3>Further Informations</h3>\nConsult our <a href=\"https://www.dibito.ch/dokumentation/\">documentation</a> for further\ninformations about creating and handling eBills.\n",
    "contact": {
      "name": "Codeblock GmbH",
      "url": "https://www.codeblock.ch",
      "email": "contact@codeblock.ch"
    },
    "version": "1.1"
  },
  "servers": [
    {
      "url": "https://app.dibito.ch",
      "description": "Generated server url"
    }
  ],
  "security": [
    {
      "X-API-Key": []
    }
  ],
  "tags": [
    {
      "name": "00 Examples"
    },
    {
      "name": "10 Business Cases"
    },
    {
      "name": "20 Bill Recipients"
    },
    {
      "name": "21 Bill-Recipient Subscriptions"
    },
    {
      "name": "30 Events"
    },
    {
      "name": "31 SIX Events"
    },
    {
      "name": "40 Webhook Management"
    },
    {
      "name": "90 PDF"
    },
    {
      "name": "98 Health Check"
    },
    {
      "name": "99 Authentication"
    }
  ],
  "paths": {
    "/api/v1/bill-recipient-subscriptions/initiations/{subscriptionInitiationToken}": {
      "put": {
        "tags": [
          "21 Bill-Recipient Subscriptions"
        ],
        "summary": "Confirm bill recipient subscription initiation",
        "description": "This endpoint verifies the combination of subscription initiation token and activation code. If the combination is valid, it creates an active biller relation. Only the primary network partner of a biller is allowed to confirm the subscription at the biller initiation. ",
        "operationId": "confirmBillRecipientSubscriptionInitiation",
        "parameters": [
          {
            "name": "subscriptionInitiationToken",
            "in": "path",
            "description": "subscription initiation token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubscriptionInitiationActivationCode"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Bill recipient relation initiated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillRecipient"
                }
              }
            }
          },
          "400": {
            "description": "Bad request - please see response for further details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "406": {
            "description": "Not acceptable - please check content negotiation. Either 'Content-Type'- or 'Accept'-Header might not match this endpoint."
          },
          "422": {
            "description": "Unprocessable entity - invalid or unsupported data."
          }
        }
      }
    },
    "/connect/{endpoint}/{method}": {
      "post": {
        "tags": [
          "endpoint-controller"
        ],
        "operationId": "serveEndpoint",
        "parameters": [
          {
            "name": "endpoint",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "method",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json;charset=UTF-8": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "406": {
            "description": "Not acceptable - please check content negotiation. Either 'Content-Type'- or 'Accept'-Header might not match this endpoint."
          },
          "422": {
            "description": "Unprocessable entity - invalid or unsupported data."
          }
        }
      }
    },
    "/api/v1/webhook/events": {
      "post": {
        "tags": [
          "40 Webhook Management"
        ],
        "summary": "Create a webhook",
        "description": "Create a new webhook for a specified type of event. The webhook will instantaneously become active and receive events. See the webhook definitions in the `Webhooks` section",
        "operationId": "create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventWebhook"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/EventWebhook"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "406": {
            "description": "Not acceptable - please check content negotiation. Either 'Content-Type'- or 'Accept'-Header might not match this endpoint."
          },
          "422": {
            "description": "Unprocessable entity - invalid or unsupported data."
          }
        }
      }
    },
    "/api/v1/pdf/pdfa3b/convert": {
      "post": {
        "tags": [
          "90 PDF"
        ],
        "summary": "Converts a PDF to a PDF/A-3b document if possible",
        "operationId": "convertPdfToPdfA3b",
        "requestBody": {
          "content": {
            "application/pdf": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {
                    "type": "string",
                    "format": "binary",
                    "description": "PDF as binary data"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Business case found",
            "content": {
              "application/pdf": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "406": {
            "description": "Not acceptable - please check content negotiation. Either 'Content-Type'- or 'Accept'-Header might not match this endpoint."
          },
          "422": {
            "description": "Unprocessable entity - invalid or unsupported data."
          }
        }
      }
    },
    "/api/v1/pdf/pdfa3b/convert/file": {
      "post": {
        "tags": [
          "90 PDF"
        ],
        "summary": "Converts a PDF to a PDF/A-3b document if possible",
        "operationId": "convertPdfToPdfA3bFile",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "PDF file"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Business case found",
            "content": {
              "application/pdf": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "406": {
            "description": "Not acceptable - please check content negotiation. Either 'Content-Type'- or 'Accept'-Header might not match this endpoint."
          },
          "422": {
            "description": "Unprocessable entity - invalid or unsupported data."
          }
        }
      }
    },
    "/api/v1/business-cases": {
      "post": {
        "tags": [
          "10 Business Cases"
        ],
        "summary": "Submit business case",
        "description": "This operation accepts either a QR-Invoice PDF or a PDF in the eBill Format, containing the business case information as XML attachment included in the PDF. The specific business case type (bill, advice...) is specified in the XML attachment. Ideally the PDF conforms to the PDF/A-3b, if not, conversion is attempted. Please note that PDF format conversion may fail due to various technical reason.",
        "operationId": "submitBusinessCase",
        "parameters": [
          {
            "name": "processingMode",
            "in": "query",
            "description": "STAGE: BusinessCase gets validated and staged (proceed via web UI), DELIVER: BusinessCase gets validated, processed and delivered to the bill recipient",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "STAGE",
                "DELIVER"
              ]
            }
          },
          {
            "name": "x-filename",
            "in": "header",
            "description": "Filename for the business case PDF. This is only used for analytical purposes and support. The filename is not visible for the bill recipient. **Minimal length**: `1` **Maximal length**: `99` ",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 99,
              "minLength": 1
            }
          },
          {
            "name": "x-anomaly-detection",
            "in": "header",
            "description": "If the optional header is provided with the value 'SKIP', the anomaly detection does not prevent business case submission",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "refByEBillReferenceNumber",
            "in": "query",
            "description": "eBill Reference Number which this business case references to (For reminders and replacements)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "refByReferenceStructured",
            "in": "query",
            "description": "Structured payment reference number which this business case references to",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "refByDibitoID",
            "in": "query",
            "description": "Dibito business case ID which this business case references to",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/pdf": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {
                    "type": "string",
                    "format": "binary",
                    "description": "PDF as binary data"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Business case created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BusinessCase"
                }
              }
            }
          },
          "400": {
            "description": "Bad request - please see response for further details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Referenced business case not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "406": {
            "description": "Not acceptable - please check content negotiation. Either 'Content-Type'- or 'Accept'-Header might not match this endpoint."
          },
          "422": {
            "description": "Unprocessable entity - invalid or unsupported data."
          }
        }
      }
    },
    "/api/v1/business-cases/reminder": {
      "post": {
        "tags": [
          "10 Business Cases"
        ],
        "summary": "Submit Reminder",
        "description": "This operation accepts a PDF along with the business case information, which is to be included as XML attachment. The provided PDF must not contain an XML attachment. Ideally the PDF conforms to the PDF/A-3b, if not, conversion is attempted. Please note that PDF format conversion may fail due to various technical reason.",
        "operationId": "reminder",
        "parameters": [
          {
            "name": "processingMode",
            "in": "query",
            "description": "STAGE: BusinessCase gets validated and staged (proceed via web UI), DELIVER: BusinessCase gets validated, processed and delivered to the bill recipient",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "STAGE",
                "DELIVER"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentBusinessCaseEnvelopeEBillFormatReminder"
              }
            },
            "application/xml": {
              "schema": {
                "$ref": "#/components/schemas/DocumentBusinessCaseEnvelopeEBillFormatReminder"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Business case created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Reminder"
                }
              }
            }
          },
          "400": {
            "description": "Bad request - please see response for further details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "406": {
            "description": "Not acceptable - please check content negotiation. Either 'Content-Type'- or 'Accept'-Header might not match this endpoint."
          },
          "422": {
            "description": "Unprocessable entity - invalid or unsupported data."
          }
        }
      }
    },
    "/api/v1/business-cases/reminder/multipart": {
      "post": {
        "tags": [
          "10 Business Cases"
        ],
        "summary": "Submit Reminder",
        "description": "This operation accepts a PDF along with the business case information, which is to be included as XML attachment. The provided PDF must not contain an XML attachment. Ideally the PDF conforms to the PDF/A-3b, if not, conversion is attempted. Please note that PDF format conversion may fail due to various technical reason.",
        "operationId": "reminderMultipart",
        "parameters": [
          {
            "name": "processingMode",
            "in": "query",
            "description": "STAGE: BusinessCase gets validated and staged (proceed via web UI), DELIVER: BusinessCase gets validated, processed and delivered to the bill recipient",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "STAGE",
                "DELIVER"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "PDF file"
                  },
                  "reminder": {
                    "$ref": "#/components/schemas/EBillFormatReminder"
                  }
                },
                "required": [
                  "file",
                  "reminder"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Business case created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Reminder"
                }
              }
            }
          },
          "400": {
            "description": "Bad request - please see response for further details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "406": {
            "description": "Not acceptable - please check content negotiation. Either 'Content-Type'- or 'Accept'-Header might not match this endpoint."
          },
          "422": {
            "description": "Unprocessable entity - invalid or unsupported data."
          }
        }
      }
    },
    "/api/v1/business-cases/instalment-bill": {
      "post": {
        "tags": [
          "10 Business Cases"
        ],
        "summary": "Submit Instalment Bill",
        "description": "This operation accepts a PDF along with the business case information, which is to be included as XML attachment. The provided PDF must not contain an XML attachment. Ideally the PDF conforms to the PDF/A-3b, if not, conversion is attempted. Please note that PDF format conversion may fail due to various technical reason.",
        "operationId": "instalmentBill",
        "parameters": [
          {
            "name": "processingMode",
            "in": "query",
            "description": "STAGE: BusinessCase gets validated and staged (proceed via web UI), DELIVER: BusinessCase gets validated, processed and delivered to the bill recipient",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "STAGE",
                "DELIVER"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentBusinessCaseEnvelopeEBillFormatInstalmentBill"
              }
            },
            "application/xml": {
              "schema": {
                "$ref": "#/components/schemas/DocumentBusinessCaseEnvelopeEBillFormatInstalmentBill"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Business case created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstalmentBill"
                }
              }
            }
          },
          "400": {
            "description": "Bad request - please see response for further details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "406": {
            "description": "Not acceptable - please check content negotiation. Either 'Content-Type'- or 'Accept'-Header might not match this endpoint."
          },
          "422": {
            "description": "Unprocessable entity - invalid or unsupported data."
          }
        }
      }
    },
    "/api/v1/business-cases/instalment-bill/multipart": {
      "post": {
        "tags": [
          "10 Business Cases"
        ],
        "summary": "Submit Instalment Bill",
        "description": "This operation accepts a PDF along with the business case information, which is to be included as XML attachment. The provided PDF must not contain an XML attachment. Ideally the PDF conforms to the PDF/A-3b, if not, conversion is attempted. Please note that PDF format conversion may fail due to various technical reason.",
        "operationId": "instalmentBillMultipart",
        "parameters": [
          {
            "name": "processingMode",
            "in": "query",
            "description": "STAGE: BusinessCase gets validated and staged (proceed via web UI), DELIVER: BusinessCase gets validated, processed and delivered to the bill recipient",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "STAGE",
                "DELIVER"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "PDF file"
                  },
                  "instalmentBill": {
                    "$ref": "#/components/schemas/EBillFormatInstalmentBill"
                  }
                },
                "required": [
                  "file",
                  "instalmentBill"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Business case created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstalmentBill"
                }
              }
            }
          },
          "400": {
            "description": "Bad request - please see response for further details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "406": {
            "description": "Not acceptable - please check content negotiation. Either 'Content-Type'- or 'Accept'-Header might not match this endpoint."
          },
          "422": {
            "description": "Unprocessable entity - invalid or unsupported data."
          }
        }
      }
    },
    "/api/v1/business-cases/donation-inquiry": {
      "post": {
        "tags": [
          "10 Business Cases"
        ],
        "summary": "Submit Donation Inquiry",
        "description": "This operation accepts a PDF along with the business case information, which is to be included as XML attachment. The provided PDF must not contain an XML attachment. Ideally the PDF conforms to the PDF/A-3b, if not, conversion is attempted. Please note that PDF format conversion may fail due to various technical reason.",
        "operationId": "donationInquiry",
        "parameters": [
          {
            "name": "processingMode",
            "in": "query",
            "description": "STAGE: BusinessCase gets validated and staged (proceed via web UI), DELIVER: BusinessCase gets validated, processed and delivered to the bill recipient",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "STAGE",
                "DELIVER"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentBusinessCaseEnvelopeEBillFormatDonationInquiry"
              }
            },
            "application/xml": {
              "schema": {
                "$ref": "#/components/schemas/DocumentBusinessCaseEnvelopeEBillFormatDonationInquiry"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Business case created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DonationInquiry"
                }
              }
            }
          },
          "400": {
            "description": "Bad request - please see response for further details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "406": {
            "description": "Not acceptable - please check content negotiation. Either 'Content-Type'- or 'Accept'-Header might not match this endpoint."
          },
          "422": {
            "description": "Unprocessable entity - invalid or unsupported data."
          }
        }
      }
    },
    "/api/v1/business-cases/donation-inquiry/multipart": {
      "post": {
        "tags": [
          "10 Business Cases"
        ],
        "summary": "Submit Donation Inquiry",
        "description": "This operation accepts a PDF along with the business case information, which is to be included as XML attachment. The provided PDF must not contain an XML attachment. Ideally the PDF conforms to the PDF/A-3b, if not, conversion is attempted. Please note that PDF format conversion may fail due to various technical reason.",
        "operationId": "donationInquiryMultipart",
        "parameters": [
          {
            "name": "processingMode",
            "in": "query",
            "description": "STAGE: BusinessCase gets validated and staged (proceed via web UI), DELIVER: BusinessCase gets validated, processed and delivered to the bill recipient",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "STAGE",
                "DELIVER"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "PDF file"
                  },
                  "donationInquiry": {
                    "$ref": "#/components/schemas/EBillFormatDonationInquiry"
                  }
                },
                "required": [
                  "donationInquiry",
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Business case created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DonationInquiry"
                }
              }
            }
          },
          "400": {
            "description": "Bad request - please see response for further details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "406": {
            "description": "Not acceptable - please check content negotiation. Either 'Content-Type'- or 'Accept'-Header might not match this endpoint."
          },
          "422": {
            "description": "Unprocessable entity - invalid or unsupported data."
          }
        }
      }
    },
    "/api/v1/business-cases/credit-note": {
      "post": {
        "tags": [
          "10 Business Cases"
        ],
        "summary": "Submit Credit Note",
        "description": "This operation accepts a PDF along with the business case information, which is to be included as XML attachment. The provided PDF must not contain an XML attachment. Ideally the PDF conforms to the PDF/A-3b, if not, conversion is attempted. Please note that PDF format conversion may fail due to various technical reason.",
        "operationId": "creditNote",
        "parameters": [
          {
            "name": "processingMode",
            "in": "query",
            "description": "STAGE: BusinessCase gets validated and staged (proceed via web UI), DELIVER: BusinessCase gets validated, processed and delivered to the bill recipient",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "STAGE",
                "DELIVER"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentBusinessCaseEnvelopeEBillFormatCreditNote"
              }
            },
            "application/xml": {
              "schema": {
                "$ref": "#/components/schemas/DocumentBusinessCaseEnvelopeEBillFormatCreditNote"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Business case created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditNote"
                }
              }
            }
          },
          "400": {
            "description": "Bad request - please see response for further details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "406": {
            "description": "Not acceptable - please check content negotiation. Either 'Content-Type'- or 'Accept'-Header might not match this endpoint."
          },
          "422": {
            "description": "Unprocessable entity - invalid or unsupported data."
          }
        }
      }
    },
    "/api/v1/business-cases/credit-note/multipart": {
      "post": {
        "tags": [
          "10 Business Cases"
        ],
        "summary": "Submit Credit Note",
        "description": "This operation accepts a PDF along with the business case information, which is to be included as XML attachment. The provided PDF must not contain an XML attachment. Ideally the PDF conforms to the PDF/A-3b, if not, conversion is attempted. Please note that PDF format conversion may fail due to various technical reason.",
        "operationId": "creditNoteMultipart",
        "parameters": [
          {
            "name": "processingMode",
            "in": "query",
            "description": "STAGE: BusinessCase gets validated and staged (proceed via web UI), DELIVER: BusinessCase gets validated, processed and delivered to the bill recipient",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "STAGE",
                "DELIVER"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "PDF file"
                  },
                  "creditNote": {
                    "$ref": "#/components/schemas/EBillFormatCreditNote"
                  }
                },
                "required": [
                  "creditNote",
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Business case created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditNote"
                }
              }
            }
          },
          "400": {
            "description": "Bad request - please see response for further details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "406": {
            "description": "Not acceptable - please check content negotiation. Either 'Content-Type'- or 'Accept'-Header might not match this endpoint."
          },
          "422": {
            "description": "Unprocessable entity - invalid or unsupported data."
          }
        }
      }
    },
    "/api/v1/business-cases/bill": {
      "post": {
        "tags": [
          "10 Business Cases"
        ],
        "summary": "Submit bill",
        "description": "This operation accepts a PDF along with the business case information, which is to be included as XML attachment. The provided PDF must not contain an XML attachment. Ideally the PDF conforms to the PDF/A-3b, if not, conversion is attempted. Please note that PDF format conversion may fail due to various technical reason.",
        "operationId": "bill",
        "parameters": [
          {
            "name": "processingMode",
            "in": "query",
            "description": "STAGE: BusinessCase gets validated and staged (proceed via web UI), DELIVER: BusinessCase gets validated, processed and delivered to the bill recipient",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "STAGE",
                "DELIVER"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentBusinessCaseEnvelopeEBillFormatBill"
              }
            },
            "application/xml": {
              "schema": {
                "$ref": "#/components/schemas/DocumentBusinessCaseEnvelopeEBillFormatBill"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Business case created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bill"
                }
              }
            }
          },
          "400": {
            "description": "Bad request - please see response for further details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "406": {
            "description": "Not acceptable - please check content negotiation. Either 'Content-Type'- or 'Accept'-Header might not match this endpoint."
          },
          "422": {
            "description": "Unprocessable entity - invalid or unsupported data."
          }
        }
      }
    },
    "/api/v1/business-cases/bill/multipart": {
      "post": {
        "tags": [
          "10 Business Cases"
        ],
        "summary": "Submit bill",
        "description": "This operation accepts a PDF along with the business case information, which is to be included as XML attachment. The provided PDF must not contain an XML attachment. Ideally the PDF conforms to the PDF/A-3b, if not, conversion is attempted. Please note that PDF format conversion may fail due to various technical reason.",
        "operationId": "billMultipart",
        "parameters": [
          {
            "name": "processingMode",
            "in": "query",
            "description": "STAGE: BusinessCase gets validated and staged (proceed via web UI), DELIVER: BusinessCase gets validated, processed and delivered to the bill recipient",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "STAGE",
                "DELIVER"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "PDF file"
                  },
                  "bill": {
                    "$ref": "#/components/schemas/EBillFormatBill"
                  }
                },
                "required": [
                  "bill",
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Business case created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bill"
                }
              }
            }
          },
          "400": {
            "description": "Bad request - please see response for further details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "406": {
            "description": "Not acceptable - please check content negotiation. Either 'Content-Type'- or 'Accept'-Header might not match this endpoint."
          },
          "422": {
            "description": "Unprocessable entity - invalid or unsupported data."
          }
        }
      }
    },
    "/api/v1/business-cases/advice": {
      "post": {
        "tags": [
          "10 Business Cases"
        ],
        "summary": "Submit advice",
        "description": "This operation accepts a PDF along with the business case information, which is to be included as XML attachment. The provided PDF must not contain an XML attachment. Ideally the PDF conforms to the PDF/A-3b, if not, conversion is attempted. Please note that PDF format conversion may fail due to various technical reason.",
        "operationId": "advice",
        "parameters": [
          {
            "name": "processingMode",
            "in": "query",
            "description": "STAGE: BusinessCase gets validated and staged (proceed via web UI), DELIVER: BusinessCase gets validated, processed and delivered to the bill recipient",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "STAGE",
                "DELIVER"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentBusinessCaseEnvelopeEBillFormatAdvice"
              }
            },
            "application/xml": {
              "schema": {
                "$ref": "#/components/schemas/DocumentBusinessCaseEnvelopeEBillFormatAdvice"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Business case created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Advice"
                }
              }
            }
          },
          "400": {
            "description": "Bad request - please see response for further details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "406": {
            "description": "Not acceptable - please check content negotiation. Either 'Content-Type'- or 'Accept'-Header might not match this endpoint."
          },
          "422": {
            "description": "Unprocessable entity - invalid or unsupported data."
          }
        }
      }
    },
    "/api/v1/business-cases/advice/multipart": {
      "post": {
        "tags": [
          "10 Business Cases"
        ],
        "summary": "Submit advice",
        "description": "This operation accepts a PDF along with the business case information, which is to be included as XML attachment. The provided PDF must not contain an XML attachment. Ideally the PDF conforms to the PDF/A-3b, if not, conversion is attempted. Please note that PDF format conversion may fail due to various technical reason.",
        "operationId": "adviceMultipart",
        "parameters": [
          {
            "name": "processingMode",
            "in": "query",
            "description": "STAGE: BusinessCase gets validated and staged (proceed via web UI), DELIVER: BusinessCase gets validated, processed and delivered to the bill recipient",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "STAGE",
                "DELIVER"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "PDF file"
                  },
                  "advice": {
                    "$ref": "#/components/schemas/EBillFormatAdvice"
                  }
                },
                "required": [
                  "advice",
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Business case created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Advice"
                }
              }
            }
          },
          "400": {
            "description": "Bad request - please see response for further details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "406": {
            "description": "Not acceptable - please check content negotiation. Either 'Content-Type'- or 'Accept'-Header might not match this endpoint."
          },
          "422": {
            "description": "Unprocessable entity - invalid or unsupported data."
          }
        }
      }
    },
    "/api/v1/bill-recipients/search": {
      "post": {
        "tags": [
          "20 Bill Recipients"
        ],
        "summary": "Search for multiple bill recipients",
        "description": "For each item in the request body, the endpoint will respond if it is allowed to submit a business case for a bill recipient with the provided ID. In addition to the provided ID, the response will always contain the billRecipientId, if a business case submission is allowed.",
        "operationId": "searchBillRecipients",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillRecipientsSearchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Search successfully executed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillRecipientsSearchResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request - please see response for further details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "406": {
            "description": "Not acceptable - please check content negotiation. Either 'Content-Type'- or 'Accept'-Header might not match this endpoint."
          },
          "422": {
            "description": "Unprocessable entity - invalid or unsupported data."
          }
        }
      }
    },
    "/api/v1/bill-recipient-subscriptions/initiations": {
      "post": {
        "tags": [
          "21 Bill-Recipient Subscriptions"
        ],
        "summary": "Initiate bill recipient subscription",
        "description": "This endpoint initiates the \"Bill recipient driven subscription (Subscription at the biller)\" process, returns a subscription initiation token to the caller and sends a verification code to the eBill subscribers email address. Only the primary network partner of a biller is allowed to initiate the subscription at the biller. ",
        "operationId": "createBillRecipientSubscriptionInitiation",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubscriptionInitiationEmailAddress"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "subscription initiation token which was send to the user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionInitiationToken"
                }
              }
            }
          },
          "400": {
            "description": "Bad request - please see response for further details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "406": {
            "description": "Not acceptable - please check content negotiation. Either 'Content-Type'- or 'Accept'-Header might not match this endpoint."
          },
          "422": {
            "description": "Unprocessable entity - invalid or unsupported data."
          }
        }
      }
    },
    "/api/v1/apikey": {
      "head": {
        "tags": [
          "99 Authentication"
        ],
        "summary": "Check if API key is valid",
        "operationId": "checkApiKey",
        "responses": {
          "200": {
            "description": "The API key exists and is valid"
          },
          "401": {
            "description": "The API key does not exist or is invalid"
          }
        }
      }
    },
    "/api/v1/webhook": {
      "get": {
        "tags": [
          "40 Webhook Management"
        ],
        "summary": "Get all webhooks",
        "description": "Get all webhooks for this biller",
        "operationId": "getAll",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EventWebhook"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      },
      "delete": {
        "tags": [
          "40 Webhook Management"
        ],
        "summary": "Delete webhook",
        "description": "Delete an existing webhook",
        "operationId": "delete",
        "parameters": [
          {
            "name": "webhookId",
            "in": "query",
            "description": "Webhook ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/healthcheck/ebill": {
      "get": {
        "tags": [
          "98 Health Check"
        ],
        "summary": "eBill platform health check",
        "description": "Returns a status message of the eBill system managed by SIX",
        "operationId": "eBillHealthCheck",
        "responses": {
          "200": {
            "description": "Healthcheck successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthCheckResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request - please see response for further details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/api/v1/examples/reminder": {
      "get": {
        "tags": [
          "00 Examples"
        ],
        "operationId": "getExampleReminder",
        "parameters": [
          {
            "name": "recipientEmail",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "referencedBillReferenceNumber",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/EBillFormatReminder"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/api/v1/examples/reminder-with-workflow": {
      "get": {
        "tags": [
          "00 Examples"
        ],
        "operationId": "getExampleReminderWithWorkflow",
        "parameters": [
          {
            "name": "recipientEmail",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "referencedBillReferenceNumber",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/EBillFormatReminder"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/api/v1/examples/instalment-bill": {
      "get": {
        "tags": [
          "00 Examples"
        ],
        "operationId": "getExampleInstalmentBill",
        "parameters": [
          {
            "name": "recipientEmail",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/EBillFormatInstalmentBill"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/api/v1/examples/instalment-bill-with-workflow": {
      "get": {
        "tags": [
          "00 Examples"
        ],
        "operationId": "getExampleInstalmentBillWithWorkflow",
        "parameters": [
          {
            "name": "recipientEmail",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/EBillFormatInstalmentBill"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/api/v1/examples/donation-inquiry": {
      "get": {
        "tags": [
          "00 Examples"
        ],
        "operationId": "getExampleDonationInquiry",
        "parameters": [
          {
            "name": "recipientEmail",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/EBillFormatDonationInquiry"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/api/v1/examples/donation-inquiry-with-workflow": {
      "get": {
        "tags": [
          "00 Examples"
        ],
        "operationId": "getExampleDonationInquiryWithWorkflow",
        "parameters": [
          {
            "name": "recipientEmail",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/EBillFormatDonationInquiry"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/api/v1/examples/credit-note": {
      "get": {
        "tags": [
          "00 Examples"
        ],
        "operationId": "getExampleCreditNote",
        "parameters": [
          {
            "name": "recipientEmail",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/EBillFormatCreditNote"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/api/v1/examples/credit-note-with-workflow": {
      "get": {
        "tags": [
          "00 Examples"
        ],
        "operationId": "getExampleCreditNoteWithWorkflow",
        "parameters": [
          {
            "name": "recipientEmail",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/EBillFormatCreditNote"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/api/v1/examples/bill": {
      "get": {
        "tags": [
          "00 Examples"
        ],
        "operationId": "getExampleBill",
        "parameters": [
          {
            "name": "recipientEmail",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/EBillFormatBill"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/api/v1/examples/bill-with-workflow": {
      "get": {
        "tags": [
          "00 Examples"
        ],
        "operationId": "getExampleBillWithWorkflow",
        "parameters": [
          {
            "name": "recipientEmail",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/EBillFormatBill"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/api/v1/examples/advice": {
      "get": {
        "tags": [
          "00 Examples"
        ],
        "operationId": "getExampleAdvice",
        "parameters": [
          {
            "name": "recipientEmail",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/EBillFormatAdvice"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/api/v1/examples/advice-with-workflow": {
      "get": {
        "tags": [
          "00 Examples"
        ],
        "operationId": "getExampleAdviceWithWorkflow",
        "parameters": [
          {
            "name": "recipientEmail",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/EBillFormatAdvice"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/api/v1/events/six/instalment-status-changed": {
      "get": {
        "tags": [
          "31 SIX Events"
        ],
        "summary": "Find events for instalments which changed status",
        "description": "Events for status changes of instalment bills only.",
        "operationId": "findInstalmentStatusChangedEvents",
        "parameters": [
          {
            "name": "lastEventSixId",
            "in": "query",
            "description": "SIX ID of the last received event. If omitted, the result starts with the oldest available event. **Example**: `\"EVID967EFC95148C4533B803BE4897E9E490\"`",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of items to be returned (technical maximum is 1000, no more will be returned).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 100,
              "maximum": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Instalment status changed events found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InstalmentStatusChangedEvent"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - please see response for further details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/api/v1/events/six/business-case-status-changed": {
      "get": {
        "tags": [
          "31 SIX Events"
        ],
        "summary": "Find events for business cases which changed status",
        "description": "Events for status changes of bills, reminders and donation inquiries.",
        "operationId": "findBusinessCaseStatusChangedEvents",
        "parameters": [
          {
            "name": "lastEventSixId",
            "in": "query",
            "description": "SIX ID of the last received event. If omitted, the result starts with the oldest available event. **Example**: `\"EVID967EFC95148C4533B803BE4897E9E490\"`",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of items to be returned (technical maximum is 1000, no more will be returned).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 100,
              "maximum": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Business case status changed events found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BusinessCaseStatusChangedEvent"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - please see response for further details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/api/v1/events/six/bill-recipient-subscription-status-changed": {
      "get": {
        "tags": [
          "31 SIX Events"
        ],
        "summary": "Find events for bill recipient subscriptions which changed status",
        "operationId": "findBillRecipientSubscriptionStatusChangedEvents",
        "parameters": [
          {
            "name": "lastEventSixId",
            "in": "query",
            "description": "SIX ID of the last received event. If omitted, the result starts with the oldest available event. **Example**: `\"EVID967EFC95148C4533B803BE4897E9E490\"`",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of items to be returned (technical maximum is 1000, no more will be returned).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 100,
              "maximum": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Bill recipient subscription changed events found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BillRecipientSubscriptionStatusChangedEvent"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - please see response for further details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/api/v1/events/six/bill-recipient-email-address-changed": {
      "get": {
        "tags": [
          "31 SIX Events"
        ],
        "summary": "Find events for bill recipients email address changes",
        "description": "This event is triggered after a biller has submitted a business case with an outdated, so called historically available email address. It notifies about the changed email address of a bill recipient, which has been adjusted in eBill. An email address is considered to be historically available if it was present up to 15 months prior to the submission time. The billers are able to submit business cases with historically available email addresses of a bill recipient. However, latest 15 months after the email address changed, the billers are required to submit the business cases with the currently valid email address of the bill recipient. ",
        "operationId": "findBillRecipientEmailAddressChangedEvent",
        "parameters": [
          {
            "name": "lastEventSixId",
            "in": "query",
            "description": "SIX ID of the last received event. If omitted, the result starts with the oldest available event. **Example**: `\"EVID967EFC95148C4533B803BE4897E9E490\"`",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of items to be returned (technical maximum is 1000, no more will be returned).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 100,
              "maximum": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Bill recipient email address changed events found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BillRecipientEmailAddressChangedEvent"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - please see response for further details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/api/v1/events/processing-status-changed": {
      "get": {
        "tags": [
          "30 Events"
        ],
        "summary": "Find events for business cases that changed processing status",
        "description": "Events business cases that changed processing status",
        "operationId": "findProcessingStatusChangedEvents",
        "parameters": [
          {
            "name": "lastEventId",
            "in": "query",
            "description": "Id of the last received event. If omitted, the result starts with the oldest available event. **Example**: `\"12345\"`",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of items to be returned (technical maximum is 1000, no more will be returned).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 100,
              "maximum": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Processing status changed events found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProcessingStatusChangedEvent"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - please see response for further details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/api/v1/business-cases/{businessCaseId}": {
      "get": {
        "tags": [
          "10 Business Cases"
        ],
        "summary": "Get business case",
        "description": "Depending on the accept header, this operation either returns a JSON business case object or the PDF document (PDF/A-3b. The returned JSON object contains one of the business case subtypes:  Bill, InstalmentBill, Reminder, CreditNote, Advice or DonationInquiry. ",
        "operationId": "getBusinessCase",
        "parameters": [
          {
            "name": "businessCaseId",
            "in": "path",
            "description": "business case ID **Example**: `\"12345\"`",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Business case found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BusinessCase"
                }
              },
              "application/pdf": {
                "schema": {
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Bad request - please see response for further details",
            "content": {
              "application/pdf": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/api/v1/bill-recipients/{billRecipientSixId}": {
      "get": {
        "tags": [
          "20 Bill Recipients"
        ],
        "summary": "Get bill recipient by SIX ID",
        "description": "Verify if a bill recipient is part of the eBill infrastructure by its billRecipientSixId. The call will return the billRecipientSixId if the bill recipient has been found in the eBill infrastructure. Receiving a billRecipientSixId does not necessary mean that the corresponding bill recipient is an active eBill user, it only means that this billRecipientSixId exists in the eBill infrastructure. ",
        "operationId": "getBillRecipientBySixId",
        "parameters": [
          {
            "name": "billRecipientSixId",
            "in": "path",
            "description": "SIX ID of the bill recipient **Maximal length**: `17` **Example**: `\"41010560425610173\"` **Pattern**: `([0-9])*` ",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 17,
              "minLength": 1,
              "pattern": "([0-9])*"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Bill recipient found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillRecipientById"
                }
              }
            }
          },
          "400": {
            "description": "Bad request - please see response for further details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Bill recipient not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillRecipientById"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "WebhookBillRecipientEmailAddressChangedEvent": {
        "type": "object",
        "description": "An Event describing the change of the email address of a bill recipient.",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32",
            "description": "Event ID",
            "example": 12345
          },
          "externalId": {
            "type": "string",
            "description": "external event ID",
            "example": "EVID82A65938766547EBBBA39BA6F7B07F24",
            "maxLength": 36,
            "minLength": 0,
            "pattern": "EVID[0-9A-Z]{32}"
          },
          "businessCaseId": {
            "type": "integer",
            "format": "int32"
          },
          "businessCaseExternalId": {
            "type": "string",
            "description": "business case ID",
            "example": "BCID0FB909852BBC4D06AD8336AAE87D7FC9",
            "maxLength": 36,
            "minLength": 0,
            "pattern": "BCID[0-9A-Z]{32}"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "timestamp of the event",
            "example": "2015-01-01T10:00Z"
          },
          "oldEmailAddress": {
            "type": "string",
            "description": "the old email address of the bill recipient which has been used in the submission of a business case",
            "example": "peter@muster.ch",
            "maxLength": 256,
            "minLength": 1
          },
          "newEmailAddress": {
            "type": "string",
            "description": "the new email address of the bill recipient",
            "example": "peter_new@muster.ch",
            "maxLength": 256,
            "minLength": 1
          }
        },
        "required": [
          "businessCaseExternalId",
          "externalId",
          "id",
          "timestamp"
        ]
      },
      "WebhookBillRecipient": {
        "type": "object",
        "properties": {
          "emailAddress": {
            "type": "string",
            "description": "email address of the bill recipient",
            "example": "peter@muster.ch",
            "maxLength": 256,
            "minLength": 1
          },
          "billRecipientId": {
            "type": "string",
            "description": "ID of the bill recipient",
            "example": 41010560425610180,
            "maxLength": 17,
            "minLength": 1,
            "pattern": "([0-9])*"
          },
          "enterpriseIdentificationNumber": {
            "type": "string",
            "description": "Swiss enterprise identification number (UID) without dashes, dots or extension. Note that this has to contain the swiss enterprise identification number (UID) from the commercial register (Handelsregister) which may be different from the VAT UID (Mehrwertsteuer UID). ",
            "example": "CHE123456789",
            "maxLength": 12,
            "minLength": 0,
            "pattern": "CHE[0-9]{9}"
          },
          "type": {
            "type": "string",
            "description": "the type of the bill recipient",
            "enum": [
              "PRIVATE",
              "COMPANY"
            ]
          },
          "name": {
            "type": "string",
            "description": "last name, if private bill recipient company name, if company bill recipient ",
            "example": "for private bill recipient: Muster, for company name: Muster AG",
            "maxLength": 70,
            "minLength": 1
          },
          "firstName": {
            "type": "string",
            "description": "first name, if private bill recipient empty, if company bill recipient ",
            "example": "Peter",
            "maxLength": 35,
            "minLength": 0
          },
          "correspondenceLanguage": {
            "type": "string",
            "description": "language for correspondence with this bill recipient ISO-639-2/B",
            "example": "ger",
            "maxLength": 3,
            "minLength": 1
          },
          "address": {
            "$ref": "#/components/schemas/WebhookRecipientAddress"
          }
        },
        "required": [
          "address",
          "billRecipientId",
          "correspondenceLanguage",
          "name",
          "type"
        ]
      },
      "WebhookBillRecipientSubscriptionFormBillRecipientSubscriptionFormFields": {
        "type": "object",
        "description": "The fields of a subscription form. ",
        "properties": {
          "technicalId": {
            "type": "string",
            "description": "The identifying token of this subscription form field. Corresponds to the property technicalId of BillerSubscriptionFormField.",
            "example": "customerNumber",
            "maxLength": 35,
            "minLength": 1
          },
          "value": {
            "type": "string",
            "description": "The value of this subscription form field as entered by the user. If a pattern is defined, it has been checked against it.",
            "example": "123-abcd-456",
            "maxLength": 256,
            "minLength": 1
          }
        },
        "required": [
          "technicalId",
          "value"
        ]
      },
      "WebhookBillRecipientSubscriptionStatusChangedEvent": {
        "type": "object",
        "description": "An Event describing the status change of a bill recipient subscription.",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32",
            "description": "Event ID",
            "example": 12345
          },
          "externalId": {
            "type": "string",
            "description": "Event ID",
            "example": "EVID82A65938766547EBBBA39BA6F7B07F24",
            "maxLength": 36,
            "minLength": 0,
            "pattern": "EVID[0-9A-Z]{32}"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "timestamp of the event",
            "example": "2015-01-01T10:00Z"
          },
          "billRecipient": {
            "$ref": "#/components/schemas/WebhookBillRecipient"
          },
          "accountNumber": {
            "type": "string",
            "description": "Account number of the biller (e.g. iban), if provided from the financial institution",
            "maxLength": 21,
            "minLength": 0
          },
          "referenceStructured": {
            "type": "string",
            "description": "QR or creditor reference number, if provided from the financial institution. ",
            "example": 1.2345612345678902e+26,
            "maxLength": 27,
            "minLength": 0,
            "pattern": "([a-zA-Z0-9])*"
          },
          "billRecipientSubscriptionFormFields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookBillRecipientSubscriptionFormBillRecipientSubscriptionFormFields"
            }
          },
          "newStatus": {
            "type": "string",
            "description": "the new status of the bill recipient subscription, see \"Subscriptions and subscription cancellations\" for further information",
            "enum": [
              "INACTIVE",
              "REQUESTED",
              "ACTIVE"
            ]
          }
        },
        "required": [
          "billRecipient",
          "externalId",
          "id",
          "timestamp"
        ]
      },
      "WebhookRecipientAddress": {
        "type": "object",
        "description": "The address of a bill recipient.",
        "properties": {
          "streetName": {
            "type": "string",
            "description": "street name",
            "example": "Neustadtstrasse",
            "maxLength": 70,
            "minLength": 1
          },
          "postalCode": {
            "type": "string",
            "description": "postal code",
            "example": 6025,
            "maxLength": 9,
            "minLength": 1
          },
          "city": {
            "type": "string",
            "description": "city name",
            "example": "Neudorf",
            "maxLength": 35,
            "minLength": 1
          },
          "countryCode": {
            "type": "string",
            "description": "in format ISO 3166-1 alpha 2",
            "example": "CH",
            "maxLength": 2,
            "minLength": 0,
            "pattern": "[A-Z]{2}"
          }
        },
        "required": [
          "city",
          "countryCode",
          "postalCode",
          "streetName"
        ]
      },
      "WebhookApprovalAmountWithCurrency": {
        "type": "object",
        "description": "Amount provided by status changed events if the new status is APPROVED. The value is always greater than zero. ",
        "properties": {
          "value": {
            "type": "number",
            "description": "The amount value. Take care when using JavaScript libraries to parse this value - it should be treated as a financial amount and therefore not as a floating point number but rather using a precise decimal representation (like BigDecimal in Java).  **Maximum value**: `99'999'999.99`  **Maximal length**: `10` ",
            "example": 99.99
          },
          "currencyCode": {
            "type": "string",
            "description": "The amount currency code according to ISO-4217. ",
            "example": "CHF",
            "maxLength": 3,
            "minLength": 0,
            "pattern": "[A-Z]{3}"
          }
        },
        "required": [
          "currencyCode",
          "value"
        ]
      },
      "WebhookBusinessCaseStatusChangedEvent": {
        "type": "object",
        "description": "An Event describing the status change of a business case These events are sent for bills, reminders and donation inquries. The approved amount does always contain a value and a currency, but is only provided for the status APPROVED. ",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32",
            "description": "Event ID",
            "example": 12345
          },
          "externalId": {
            "type": "string",
            "description": "External ID",
            "example": "EVID82A65938766547EBBBA39BA6F7B07F24",
            "maxLength": 36,
            "minLength": 0,
            "pattern": "EVID[0-9A-Z]{32}"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "timestamp of the event",
            "example": "2015-01-01T10:00Z"
          },
          "businessCaseExternalId": {
            "type": "string",
            "description": "Business Case ID",
            "example": "BCID0FB909852BBC4D06AD8336AAE87D7FC9",
            "maxLength": 36,
            "minLength": 0,
            "pattern": "BCID[0-9A-Z]{32}"
          },
          "businessCaseId": {
            "type": "integer",
            "format": "int32",
            "description": "Business case ID",
            "example": 12345
          },
          "newStatus": {
            "type": "string",
            "description": "the new status of the business case",
            "enum": [
              "OPEN",
              "APPROVED",
              "REJECTED",
              "COMPLETED",
              "CHARGEBACK_INITIATED"
            ]
          },
          "approvedAmount": {
            "$ref": "#/components/schemas/WebhookApprovalAmountWithCurrency"
          },
          "externalDonationPurposeId": {
            "type": "string",
            "description": "optional field only to be used for donation inquiries to represent a potential selection of a donation purpose by the bill recipient, note the connection to the field externalDonationPurposeId from eBill business case specification"
          }
        },
        "required": [
          "externalId",
          "id",
          "timestamp"
        ]
      },
      "WebhookInstalmentStatusChangedEvent": {
        "type": "object",
        "description": "An Event describing the status change of an instalment. These events are only sent for instalment bills. The approved amount does always contain a value and a currency, but is only provided for the status APPROVED. ",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32",
            "description": "Event ID",
            "example": 12345
          },
          "externalId": {
            "type": "string",
            "description": "Event ID",
            "example": "EVID82A65938766547EBBBA39BA6F7B07F24",
            "maxLength": 36,
            "minLength": 0,
            "pattern": "EVID[0-9A-Z]{32}"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "timestamp of the event",
            "example": "2015-01-01T10:00Z"
          },
          "businessCaseId": {
            "type": "integer",
            "format": "int32",
            "description": "Business Case ID",
            "example": 12345
          },
          "businessCaseExternalId": {
            "type": "string"
          },
          "paymentByInstalmentsId": {
            "type": "integer",
            "format": "int32",
            "description": "Payment by instalments ID",
            "example": 12345
          },
          "paymentByInstalmentsExternalId": {
            "type": "string",
            "description": "external ID of the respective paymentByInstalment",
            "example": "298031-2999",
            "maxLength": 36,
            "minLength": 1
          },
          "instalmentId": {
            "type": "integer",
            "format": "int32",
            "description": "Instalment ID",
            "example": 12345
          },
          "instalmentExternalId": {
            "type": "string",
            "description": "external ID of the instalment",
            "example": "298031-2999-ACX01",
            "maxLength": 36,
            "minLength": 1
          },
          "newStatus": {
            "type": "string",
            "description": "the new status of the instalment",
            "enum": [
              "OPEN",
              "APPROVED",
              "REJECTED",
              "COMPLETED",
              "CHARGEBACK_INITIATED"
            ]
          },
          "approvedAmount": {
            "$ref": "#/components/schemas/WebhookApprovalAmountWithCurrency"
          }
        },
        "required": [
          "externalId",
          "id",
          "timestamp"
        ]
      },
      "WebhookProcessingStatusChangedEvent": {
        "type": "object",
        "description": "An Event describing the processing status change of a business case These events are sent for every type of business case",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32",
            "description": "Event ID",
            "example": 12345
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "timestamp of the event",
            "example": "2015-01-01T10:00Z"
          },
          "businessCaseId": {
            "type": "integer",
            "format": "int32",
            "description": "Business Case ID"
          },
          "newStatus": {
            "type": "string",
            "enum": [
              "OPEN",
              "INVALID",
              "PROCESSING",
              "FAILED",
              "DELIVERED",
              "DONE"
            ]
          }
        },
        "required": [
          "id",
          "timestamp"
        ]
      },
      "SubscriptionInitiationActivationCode": {
        "type": "object",
        "description": "activation code send to the user through ",
        "properties": {
          "activationCode": {
            "type": "string",
            "description": "activation code provided by the user",
            "example": 123456,
            "maxLength": 6,
            "minLength": 6
          }
        },
        "required": [
          "activationCode"
        ]
      },
      "Problem": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "format": "int32",
            "description": "The HTTP status code generated by the origin server for this occurrence of the problem. ",
            "example": 400,
            "maximum": 600,
            "minimum": 100
          },
          "message": {
            "type": "string",
            "description": "A human readable explanation specific to this occurrence of the problem. ",
            "example": "The submitted request contains invalid or missing data which can not be processed."
          },
          "fieldErrors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProblemFieldError"
            }
          }
        }
      },
      "ProblemFieldError": {
        "type": "object",
        "properties": {
          "fieldName": {
            "type": "string",
            "description": "the name of the field with the error",
            "example": "localizedData.ger.address.city"
          },
          "message": {
            "type": "string",
            "description": "the message describing the error",
            "example": "size must be between 1 and 35"
          },
          "rejectedValue": {
            "type": "string",
            "description": "the provided value which was rejected if available",
            "example": "Very Long Invalid City Name Which Is Rejected"
          }
        }
      },
      "BillRecipient": {
        "type": "object",
        "properties": {
          "emailAddress": {
            "type": "string",
            "description": "email address of the bill recipient",
            "example": "peter@muster.ch",
            "maxLength": 256,
            "minLength": 1
          },
          "billRecipientSixId": {
            "type": "string",
            "description": "SIX ID of the bill recipient",
            "example": 41010560425610180,
            "maxLength": 17,
            "minLength": 1,
            "pattern": "([0-9])*"
          },
          "enterpriseIdentificationNumber": {
            "type": "string",
            "description": "Swiss enterprise identification number (UID) without dashes, dots or extension. Note that this has to contain the swiss enterprise identification number (UID) from the commercial register (Handelsregister) which may be different from the VAT UID (Mehrwertsteuer UID). ",
            "example": "CHE123456789",
            "maxLength": 12,
            "minLength": 0,
            "pattern": "CHE[0-9]{9}"
          },
          "type": {
            "type": "string",
            "description": "the type of the bill recipient",
            "enum": [
              "PRIVATE",
              "COMPANY"
            ]
          },
          "name": {
            "type": "string",
            "description": "last name, if private bill recipient company name, if company bill recipient ",
            "example": "for private bill recipient: Muster, for company name: Muster AG",
            "maxLength": 70,
            "minLength": 1
          },
          "firstName": {
            "type": "string",
            "description": "first name, if private bill recipient empty, if company bill recipient ",
            "example": "Peter",
            "maxLength": 35,
            "minLength": 0
          },
          "correspondenceLanguage": {
            "type": "string",
            "description": "language for correspondence with this bill recipient ISO-639-2/B",
            "example": "ger",
            "maxLength": 3,
            "minLength": 1
          },
          "address": {
            "$ref": "#/components/schemas/RecipientAddress"
          }
        },
        "required": [
          "address",
          "billRecipientSixId",
          "correspondenceLanguage",
          "name",
          "type"
        ]
      },
      "RecipientAddress": {
        "type": "object",
        "properties": {
          "streetName": {
            "type": "string",
            "description": "street name",
            "example": "Neustadtstrasse",
            "maxLength": 70,
            "minLength": 1
          },
          "postalCode": {
            "type": "string",
            "description": "postal code",
            "example": 6025,
            "maxLength": 9,
            "minLength": 1
          },
          "city": {
            "type": "string",
            "description": "city name",
            "example": "Neudorf",
            "maxLength": 35,
            "minLength": 1
          },
          "countryCode": {
            "type": "string",
            "description": "in format ISO 3166-1 alpha 2",
            "example": "CH",
            "maxLength": 2,
            "minLength": 0,
            "pattern": "[A-Z]{2}"
          }
        },
        "required": [
          "city",
          "countryCode",
          "postalCode",
          "streetName"
        ]
      },
      "EventWebhook": {
        "type": "object",
        "description": "New Webhook",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "eventType": {
            "type": "string",
            "enum": [
              "SUBSCRIPTION_STATUS_CHANGED_EVENTS",
              "BILL_RECIPIENT_EMAIL_ADDRESS_CHANGED_EVENTS",
              "BUSINESS_CASE_STATUS_CHANGED_EVENTS",
              "INSTALMENT_STATUS_CHANGED_EVENTS",
              "PROCESSING_STATUS_CHANGED_EVENTS"
            ]
          },
          "hookUrl": {
            "type": "string"
          }
        }
      },
      "Advice": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BusinessCase"
          }
        ],
        "description": "A business case of type Advice",
        "required": [
          "billerSixId",
          "businessCaseDate",
          "id",
          "totalAmount",
          "type"
        ]
      },
      "Bill": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BusinessCase"
          }
        ],
        "description": "A business case of type Bill",
        "required": [
          "billerSixId",
          "businessCaseDate",
          "id",
          "totalAmount",
          "type"
        ]
      },
      "BusinessCase": {
        "type": "object",
        "description": "the abstract business case object containing the shared properties",
        "discriminator": {
          "propertyName": "type"
        },
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32",
            "description": "A unique SIX ID for this business case. Property must not be given when creating a new business case.",
            "example": "BCID0FB909852BBC4D06AD8336AAE87D7FC9"
          },
          "type": {
            "type": "string",
            "description": "the type of the business case ",
            "enum": [
              "Bill",
              "InstalmentBill",
              "Advice",
              "CreditNote",
              "Reminder",
              "DonationInquiry"
            ]
          },
          "billerSixId": {
            "type": "string",
            "description": "Biller SIX ID",
            "example": "BIID0000123456",
            "maxLength": 14,
            "minLength": 0,
            "pattern": "BIID[0-9]{10}"
          },
          "referenceNumber": {
            "type": "string",
            "description": "A business case reference given by the biller. Must be unique in combination with the billerId. ",
            "example": "2018-123456-22",
            "maxLength": 120,
            "minLength": 1
          },
          "referencedBill": {
            "$ref": "#/components/schemas/ReferencedBill"
          },
          "businessCaseDate": {
            "type": "string",
            "format": "date",
            "description": "The business case date (ISO-8601 format), can not be more than 90 days in the past on the date it was created. Cannot be in the future. ",
            "example": "Fri Dec 22 01:00:00 CET 2017"
          },
          "status": {
            "type": "string",
            "description": "the status of the business case",
            "enum": [
              "OPEN",
              "APPROVED",
              "REJECTED",
              "COMPLETED"
            ]
          },
          "processingStatus": {
            "type": "string",
            "description": "the processing status of the business case",
            "enum": [
              "STAGED",
              "INVALID",
              "PROCESSING",
              "FAILED",
              "DELIVERED"
            ]
          },
          "totalAmount": {
            "$ref": "#/components/schemas/OptionalAmountWithCurrency"
          }
        },
        "required": [
          "billerSixId",
          "businessCaseDate",
          "id",
          "totalAmount",
          "type"
        ]
      },
      "CreditNote": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BusinessCase"
          }
        ],
        "description": "A business case of type CreditNote",
        "required": [
          "billerSixId",
          "businessCaseDate",
          "id",
          "totalAmount",
          "type"
        ]
      },
      "DonationInquiry": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BusinessCase"
          }
        ],
        "description": "A business case of type donation inquiry. Please note for donation inquiries ReferencedBill is not supported and must not to be specified",
        "required": [
          "billerSixId",
          "businessCaseDate",
          "id",
          "totalAmount",
          "type"
        ]
      },
      "InstalmentBill": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BusinessCase"
          }
        ],
        "description": "A business case of type InstalmentBill",
        "required": [
          "billerSixId",
          "businessCaseDate",
          "id",
          "totalAmount",
          "type"
        ]
      },
      "OptionalAmountWithCurrency": {
        "type": "object",
        "description": "An amount whose value may be omitted. ",
        "properties": {
          "value": {
            "type": "number",
            "description": "The amount value. Take care when using JavaScript libraries to parse this value - it should be treated as a financial amount and therefore not as a floating point number but rather using a precise decimal representation (like BigDecimal in Java).  **Maximum value**: `99'999'999.99`  **Maximal length**: `10` ",
            "example": 99.99
          },
          "currencyCode": {
            "type": "string",
            "description": "The amount currency code according to ISO-4217. ",
            "example": "CHF",
            "maxLength": 3,
            "minLength": 0,
            "pattern": "[A-Z]{3}"
          }
        },
        "required": [
          "currencyCode"
        ]
      },
      "ReferencedBill": {
        "type": "object",
        "description": "The business case can only reference bills or instalment bills. ",
        "properties": {
          "businessCaseSixId": {
            "type": "string",
            "description": "Business Case SIX ID",
            "example": "BCID0FB909852BBC4D06AD8336AAE87D7FC9",
            "maxLength": 36,
            "minLength": 0,
            "pattern": "BCID[0-9A-Z]{32}"
          },
          "referenceNumber": {
            "type": "string",
            "description": "The reference number of the referenced bill. ",
            "example": "2018-123456-22",
            "maxLength": 120,
            "minLength": 1
          }
        },
        "required": [
          "referenceNumber"
        ]
      },
      "Reminder": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BusinessCase"
          }
        ],
        "description": "A business case of type Reminder",
        "required": [
          "billerSixId",
          "businessCaseDate",
          "id",
          "totalAmount",
          "type"
        ]
      },
      "DocumentBusinessCaseEnvelopeEBillFormatReminder": {
        "type": "object",
        "description": "Envelope containing PDF document and business case information",
        "properties": {
          "pdf": {
            "type": "string",
            "format": "byte"
          },
          "businessCase": {
            "$ref": "#/components/schemas/EBillFormatReminder"
          }
        }
      },
      "EBillFormatAccountAndReference": {
        "type": "object",
        "description": "Information about the account and reference of the invoice issuer.",
        "properties": {
          "accountHolder": {
            "$ref": "#/components/schemas/EBillFormatAccountHolderType"
          },
          "generic": {
            "$ref": "#/components/schemas/EBillFormatAccountIBANAndReference"
          }
        },
        "required": [
          "generic"
        ]
      },
      "EBillFormatAccountHolderType": {
        "type": "object",
        "description": "In case the account holder differs from the biller use this element to provide the account holder name and address.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the account holder."
          },
          "structuredAddress": {
            "$ref": "#/components/schemas/EBillFormatPostalAddress"
          }
        },
        "required": [
          "name",
          "structuredAddress"
        ]
      },
      "EBillFormatAccountIBANAndReference": {
        "type": "object",
        "properties": {
          "referenceType": {
            "type": "string",
            "enum": [
              "QRR",
              "SCOR",
              "NON"
            ]
          },
          "referenceStructured": {
            "type": "string",
            "description": "Reference number, structured payment reference.\nNote: the reference is either a QR reference or creditor reference (ISO 11649).\n\nQR Reference: 27 characters, numerical; check digit computation with Modulus 10 recursive (27th position of the reference).\n\nCreditor Reference (ISO 11649): up to 25 characters, alphanumeric.\n\nWhen using QR-IBAN, this element must be filled with the QR Reference.\nWhen using IBAN and referenceType SCOR, this element must be filled with the Creditor Reference.\nWhen using IBAN and referenceType NON, this element is not permitted to be filled.\n",
            "maxLength": 27,
            "minLength": 0
          },
          "referenceUnstructured": {
            "type": "string",
            "description": "Unstructured message",
            "maxLength": 140,
            "minLength": 0
          },
          "iban": {
            "type": "string",
            "description": "Credit account of the invoice issuer (IBAN or QR-IBAN). See also ISO 13616-1.\nThe usage of IBAN or QR-IBAN is only permitted with country codes CH or LI and 21 alphanumeric characters.\n\nExample:    CH9300762011623852957\nLI21088100002324013AA\n\nMust contain country code CH or LI, otherwise the business case will be denied.\nMust be matching with a credit account that is specified in the infrastructure in the master data of the invoice issuer, otherwise the business case will be denied.\n",
            "example": "CH9300762011623852957"
          }
        },
        "required": [
          "iban",
          "referenceType"
        ]
      },
      "EBillFormatAmountType": {
        "type": "object",
        "description": "The amount of the business case (amount incl. VAT + currency code, e.g. CHF 1183.46).\nMust be matching with the total amount (totalAmount), if business case is an invoice, reminder or donation inquiry.",
        "properties": {
          "value": {
            "type": "number",
            "description": "- max. 99'999'999.99 for invoices, payments by instalments, reminders, credit notes and donation inquiries\n- min. - 99'999'999.99, max 99'999'999.99 for advices\n- Amount must be greater than 0 for invoices, payments by instalments, reminders and donation inquiries.\n- Amount must be ≥ 0 for credit notes.\n- If an IBAN or QR-IBAN is used for invoices or payments by instalments, the amount does not have to be supplied (compatibility QR invoice)."
          },
          "currencyCode": {
            "type": "string",
            "description": "Currency code according to ISO 4217. When using QR-IBAN, only CHF and EUR are allowed."
          }
        },
        "required": [
          "currencyCode"
        ]
      },
      "EBillFormatBillRecipient": {
        "type": "object",
        "properties": {
          "emailAddress": {
            "type": "string"
          },
          "enterpriseIdentificationNumber": {
            "type": "string"
          },
          "billRecipientSixId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "address": {
            "$ref": "#/components/schemas/EBillFormatBillRecipientAddress"
          }
        },
        "required": [
          "address",
          "name"
        ]
      },
      "EBillFormatBillRecipientAddress": {
        "type": "object",
        "properties": {
          "structuredAddress": {
            "$ref": "#/components/schemas/EBillFormatPostalAddress"
          }
        }
      },
      "EBillFormatPaymentInformation": {
        "type": "object",
        "properties": {
          "accountAndReference": {
            "$ref": "#/components/schemas/EBillFormatAccountAndReference"
          },
          "amount": {
            "$ref": "#/components/schemas/EBillFormatAmountType"
          },
          "dueDate": {
            "type": "string",
            "format": "date",
            "description": "Due date. In the case of donation inquiries, the due date acts as a proposal for the payment date.\n\nAt time of submission, cannot be set to more than 3 years in the future (1095 days) for payment mode ebill.\nAt time of submission, cannot be set to more than 30 days in the future for payment mode ebill debit.\nAt time of submission, cannot be older than 90 days."
          },
          "payableAmountCanBeModified": {
            "type": "boolean",
            "description": "If true, then the provided invoice amount is permitted to be altered. If the invoice amount is not provided, the value must be set to true."
          }
        },
        "required": [
          "accountAndReference",
          "amount",
          "dueDate",
          "payableAmountCanBeModified"
        ]
      },
      "EBillFormatPostalAddress": {
        "type": "object",
        "properties": {
          "street": {
            "type": "string"
          },
          "buildingNumber": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "postalCode": {
            "type": "string"
          },
          "countryCode": {
            "type": "string",
            "description": "Two-letter ISO country code according to ISO 3166-1."
          }
        },
        "required": [
          "city",
          "countryCode",
          "postalCode"
        ]
      },
      "EBillFormatReferencedBill": {
        "type": "object",
        "properties": {
          "referenceNumber": {
            "type": "string"
          }
        },
        "required": [
          "referenceNumber"
        ]
      },
      "EBillFormatReminder": {
        "type": "object",
        "description": "Reminder",
        "properties": {
          "referenceNumber": {
            "type": "string"
          },
          "businessCaseDate": {
            "type": "string",
            "format": "date"
          },
          "totalAmount": {
            "$ref": "#/components/schemas/EBillFormatAmountType"
          },
          "referencedBill": {
            "$ref": "#/components/schemas/EBillFormatReferencedBill"
          },
          "billRecipient": {
            "$ref": "#/components/schemas/EBillFormatBillRecipient"
          },
          "singlePayment": {
            "$ref": "#/components/schemas/EBillFormatSinglePayment"
          },
          "workflow": {
            "$ref": "#/components/schemas/EBillFormatWorkflow"
          }
        },
        "required": [
          "billRecipient",
          "businessCaseDate",
          "referenceNumber",
          "singlePayment",
          "totalAmount"
        ]
      },
      "EBillFormatSinglePayment": {
        "type": "object",
        "properties": {
          "paymentMode": {
            "type": "string",
            "default": "EBILL",
            "enum": [
              "EBILL",
              "EBILL_DEBIT"
            ]
          },
          "paymentInformation": {
            "$ref": "#/components/schemas/EBillFormatPaymentInformation"
          }
        },
        "required": [
          "paymentInformation",
          "paymentMode"
        ]
      },
      "EBillFormatVatEnterpriseIdentificationNumbers": {
        "type": "object",
        "properties": {
          "vatEnterpriseIdentificationNumber": {
            "type": "array",
            "description": "VAT-UID of the invoice issuer. Presentation without punctuation (e.g. CHE123456789MWST).",
            "items": {
              "type": "string"
            },
            "maxItems": 5,
            "minItems": 0
          }
        }
      },
      "EBillFormatVatRate": {
        "type": "object",
        "properties": {
          "percentage": {
            "type": "number",
            "description": "VAT rate in percent (example: 8%)"
          },
          "taxBaseAmount": {
            "$ref": "#/components/schemas/EBillFormatAmountType",
            "description": "Tax base amount (example: CHF 1095.80)"
          },
          "taxAmount": {
            "$ref": "#/components/schemas/EBillFormatAmountType",
            "description": "Amount of a tax to be owed (example: CHF 87.66)"
          }
        }
      },
      "EBillFormatVatRates": {
        "type": "object",
        "properties": {
          "vatRate": {
            "type": "array",
            "description": "VAT information per VAT rate",
            "items": {
              "$ref": "#/components/schemas/EBillFormatVatRate"
            }
          }
        },
        "required": [
          "vatRate"
        ]
      },
      "EBillFormatWorkflow": {
        "type": "object",
        "description": "Information about the workflow. Auxiliary data that can be used for pre-registering a business case in bill recipients ERP/bookkeeping.",
        "properties": {
          "vatEnterpriseIdentificationNumbers": {
            "$ref": "#/components/schemas/EBillFormatVatEnterpriseIdentificationNumbers",
            "description": "Value Added Tax Enterprise Identification Numbers (VAT-UIDs) of the invoice issuer"
          },
          "deliveryDateStart": {
            "type": "string",
            "format": "date",
            "description": "Start date of the service provision, in case it is different than deliveryDateEnd"
          },
          "deliveryDateEnd": {
            "type": "string",
            "format": "date",
            "description": "Delivery date or end date of the service provision"
          },
          "netAmount": {
            "$ref": "#/components/schemas/EBillFormatAmountType",
            "description": "Total invoice amount without VAT (e.g. CHF 1095.80)"
          },
          "amountPaid": {
            "$ref": "#/components/schemas/EBillFormatAmountType",
            "description": "Sum of the amount that was paid by the invoice recipient in advance (without VAT-relevant advance invoice). The outstanding total invoice amount to be paid corresponds to the element \"totalAmount\"."
          },
          "vatRates": {
            "$ref": "#/components/schemas/EBillFormatVatRates",
            "description": "Grouping of VAT rates"
          },
          "caseReferenceForBillRecipient": {
            "type": "string",
            "description": "Association reference to be used by the invoice recipient to allocate the business case in his bookkeeping."
          }
        }
      },
      "DocumentBusinessCaseEnvelopeEBillFormatInstalmentBill": {
        "type": "object",
        "description": "Envelope containing PDF document and business case information",
        "properties": {
          "pdf": {
            "type": "string",
            "format": "byte"
          },
          "businessCase": {
            "$ref": "#/components/schemas/EBillFormatInstalmentBill"
          }
        }
      },
      "EBillFormatInstalment": {
        "type": "object",
        "properties": {
          "externalInstalmentId": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "paymentInformation": {
            "$ref": "#/components/schemas/EBillFormatPaymentInformation"
          }
        },
        "required": [
          "externalInstalmentId",
          "paymentInformation"
        ]
      },
      "EBillFormatInstalmentBill": {
        "type": "object",
        "description": "Instalment Bill",
        "properties": {
          "referenceNumber": {
            "type": "string"
          },
          "businessCaseDate": {
            "type": "string",
            "format": "date"
          },
          "totalAmount": {
            "$ref": "#/components/schemas/EBillFormatAmountType"
          },
          "referencedBill": {
            "$ref": "#/components/schemas/EBillFormatReferencedBill"
          },
          "billRecipient": {
            "$ref": "#/components/schemas/EBillFormatBillRecipient"
          },
          "paymentsByInstalments": {
            "$ref": "#/components/schemas/EBillFormatPaymentsByInstalments"
          },
          "workflow": {
            "$ref": "#/components/schemas/EBillFormatWorkflow"
          }
        },
        "required": [
          "billRecipient",
          "businessCaseDate",
          "paymentsByInstalments",
          "referenceNumber",
          "totalAmount"
        ]
      },
      "EBillFormatInstalments": {
        "type": "object",
        "properties": {
          "instalment": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EBillFormatInstalment"
            }
          }
        },
        "required": [
          "instalment"
        ]
      },
      "EBillFormatPaymentByInstalments": {
        "type": "object",
        "properties": {
          "externalPaymentByInstalmentsId": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "isTotalAmountHidden": {
            "type": "boolean"
          },
          "isTotalPaymentOption": {
            "type": "boolean"
          },
          "instalments": {
            "$ref": "#/components/schemas/EBillFormatInstalments"
          }
        },
        "required": [
          "externalPaymentByInstalmentsId",
          "instalments"
        ]
      },
      "EBillFormatPaymentsByInstalments": {
        "type": "object",
        "properties": {
          "paymentByInstalments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EBillFormatPaymentByInstalments"
            }
          }
        },
        "required": [
          "paymentByInstalments"
        ]
      },
      "DocumentBusinessCaseEnvelopeEBillFormatDonationInquiry": {
        "type": "object",
        "description": "Envelope containing PDF document and business case information",
        "properties": {
          "pdf": {
            "type": "string",
            "format": "byte"
          },
          "businessCase": {
            "$ref": "#/components/schemas/EBillFormatDonationInquiry"
          }
        }
      },
      "EBillFormatDonationInquiry": {
        "type": "object",
        "description": "Donation Inquiry",
        "properties": {
          "referenceNumber": {
            "type": "string"
          },
          "businessCaseDate": {
            "type": "string",
            "format": "date"
          },
          "totalAmount": {
            "$ref": "#/components/schemas/EBillFormatAmountType"
          },
          "referencedBill": {
            "$ref": "#/components/schemas/EBillFormatReferencedBill"
          },
          "billRecipient": {
            "$ref": "#/components/schemas/EBillFormatBillRecipient"
          },
          "singlePayment": {
            "$ref": "#/components/schemas/EBillFormatSinglePayment"
          },
          "proposedDonationAmounts": {
            "$ref": "#/components/schemas/EBillFormatProposedDonationAmountsType"
          },
          "donationPurposes": {
            "$ref": "#/components/schemas/EBillFormatDonationPurposesType"
          },
          "workflow": {
            "$ref": "#/components/schemas/EBillFormatWorkflow"
          }
        },
        "required": [
          "billRecipient",
          "businessCaseDate",
          "referenceNumber",
          "singlePayment",
          "totalAmount"
        ]
      },
      "EBillFormatDonationPurposeType": {
        "type": "object",
        "properties": {
          "externalDonationPurposeId": {
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        },
        "required": [
          "externalDonationPurposeId",
          "label"
        ]
      },
      "EBillFormatDonationPurposesType": {
        "type": "object",
        "properties": {
          "donationPurpose": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EBillFormatDonationPurposeType"
            }
          }
        },
        "required": [
          "donationPurpose"
        ]
      },
      "EBillFormatProposedDonationAmountsType": {
        "type": "object",
        "properties": {
          "proposedDonationAmount": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EBillFormatAmountType"
            }
          }
        },
        "required": [
          "proposedDonationAmount"
        ]
      },
      "DocumentBusinessCaseEnvelopeEBillFormatCreditNote": {
        "type": "object",
        "description": "Envelope containing PDF document and business case information",
        "properties": {
          "pdf": {
            "type": "string",
            "format": "byte"
          },
          "businessCase": {
            "$ref": "#/components/schemas/EBillFormatCreditNote"
          }
        }
      },
      "EBillFormatCreditNote": {
        "type": "object",
        "description": "Credit Note",
        "properties": {
          "referenceNumber": {
            "type": "string"
          },
          "businessCaseDate": {
            "type": "string",
            "format": "date"
          },
          "totalAmount": {
            "$ref": "#/components/schemas/EBillFormatAmountType"
          },
          "referencedBill": {
            "$ref": "#/components/schemas/EBillFormatReferencedBill"
          },
          "billRecipient": {
            "$ref": "#/components/schemas/EBillFormatBillRecipient"
          },
          "workflow": {
            "$ref": "#/components/schemas/EBillFormatWorkflow"
          }
        },
        "required": [
          "billRecipient",
          "businessCaseDate",
          "referenceNumber",
          "totalAmount"
        ]
      },
      "DocumentBusinessCaseEnvelopeEBillFormatBill": {
        "type": "object",
        "description": "Envelope containing PDF document and business case information",
        "properties": {
          "pdf": {
            "type": "string",
            "format": "byte"
          },
          "businessCase": {
            "$ref": "#/components/schemas/EBillFormatBill"
          }
        }
      },
      "EBillFormatBill": {
        "type": "object",
        "description": "Bill",
        "properties": {
          "referenceNumber": {
            "type": "string"
          },
          "businessCaseDate": {
            "type": "string",
            "format": "date"
          },
          "totalAmount": {
            "$ref": "#/components/schemas/EBillFormatAmountType"
          },
          "referencedBill": {
            "$ref": "#/components/schemas/EBillFormatReferencedBill"
          },
          "billRecipient": {
            "$ref": "#/components/schemas/EBillFormatBillRecipient"
          },
          "singlePayment": {
            "$ref": "#/components/schemas/EBillFormatSinglePayment"
          },
          "workflow": {
            "$ref": "#/components/schemas/EBillFormatWorkflow"
          }
        },
        "required": [
          "billRecipient",
          "businessCaseDate",
          "referenceNumber",
          "singlePayment",
          "totalAmount"
        ]
      },
      "DocumentBusinessCaseEnvelopeEBillFormatAdvice": {
        "type": "object",
        "description": "Envelope containing PDF document and business case information",
        "properties": {
          "pdf": {
            "type": "string",
            "format": "byte"
          },
          "businessCase": {
            "$ref": "#/components/schemas/EBillFormatAdvice"
          }
        }
      },
      "EBillFormatAdvice": {
        "type": "object",
        "description": "Advice",
        "properties": {
          "referenceNumber": {
            "type": "string"
          },
          "businessCaseDate": {
            "type": "string",
            "format": "date"
          },
          "totalAmount": {
            "$ref": "#/components/schemas/EBillFormatAmountType"
          },
          "referencedBill": {
            "$ref": "#/components/schemas/EBillFormatReferencedBill"
          },
          "billRecipient": {
            "$ref": "#/components/schemas/EBillFormatBillRecipient"
          },
          "workflow": {
            "$ref": "#/components/schemas/EBillFormatWorkflow"
          }
        },
        "required": [
          "billRecipient",
          "businessCaseDate",
          "referenceNumber",
          "totalAmount"
        ]
      },
      "BillRecipientsSearchRequest": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BillRecipientsSearchRequestItem"
            },
            "maxItems": 100,
            "minItems": 1
          }
        },
        "required": [
          "items"
        ]
      },
      "BillRecipientsSearchRequestItem": {
        "type": "object",
        "properties": {
          "emailAddress": {
            "type": "string",
            "description": "email address of the bill recipient",
            "example": "peter@muster.ch",
            "maxLength": 256,
            "minLength": 1
          },
          "billRecipientSixId": {
            "type": "string",
            "description": "SIX ID of the bill recipient",
            "example": 41010560425610180,
            "maxLength": 17,
            "minLength": 1,
            "pattern": "([0-9])*"
          },
          "enterpriseIdentificationNumber": {
            "type": "string",
            "description": "Swiss enterprise identification number (UID) without dashes, dots or extension. Note that this has to contain the swiss enterprise identification number (UID) from the commercial register (Handelsregister) which may be different from the VAT UID (Mehrwertsteuer UID). ",
            "example": "CHE123456789",
            "maxLength": 12,
            "minLength": 0,
            "pattern": "CHE[0-9]{9}"
          }
        }
      },
      "BillRecipientsForBillerSearchResponseItem": {
        "type": "object",
        "properties": {
          "emailAddress": {
            "type": "string",
            "description": "email address of the bill recipient",
            "example": "peter@muster.ch",
            "maxLength": 256,
            "minLength": 1
          },
          "billRecipientSixId": {
            "type": "string",
            "description": "SIX ID of the bill recipient",
            "example": 41010560425610180,
            "maxLength": 17,
            "minLength": 1,
            "pattern": "([0-9])*"
          },
          "activeSubscription": {
            "type": "boolean"
          },
          "enterpriseIdentificationNumber": {
            "type": "string",
            "description": "Swiss enterprise identification number (UID) without dashes, dots or extension. Note that this has to contain the swiss enterprise identification number (UID) from the commercial register (Handelsregister) which may be different from the VAT UID (Mehrwertsteuer UID). ",
            "example": "CHE123456789",
            "maxLength": 12,
            "minLength": 0,
            "pattern": "CHE[0-9]{9}"
          },
          "submissionStatus": {
            "type": "string",
            "description": "Defines if the biller can submit a business-case for the provided ID in the request (=ALLOWED) or if the ID is either not known to the eBill infrastructure or the submission is not allowed (=NOT_ALLOWED).",
            "enum": [
              "ALLOWED",
              "NOT_ALLOWED"
            ]
          }
        },
        "required": [
          "submissionStatus"
        ]
      },
      "BillRecipientsSearchResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BillRecipientsForBillerSearchResponseItem"
            },
            "maxItems": 100,
            "minItems": 1
          }
        },
        "required": [
          "items"
        ]
      },
      "SubscriptionInitiationEmailAddress": {
        "type": "object",
        "description": "email address for bill recipient subscription initiation",
        "properties": {
          "emailAddress": {
            "type": "string",
            "description": "Email address the user entered for subscription initiation",
            "example": "hansmuster@muster.info",
            "maxLength": 256,
            "minLength": 1
          }
        },
        "required": [
          "emailAddress"
        ]
      },
      "SubscriptionInitiationToken": {
        "type": "object",
        "properties": {
          "subscriptionInitiationToken": {
            "type": "string",
            "description": "subscription initiation token which will be used to confirm the subscription initiation",
            "example": "0dc2ff79-db4c-4635-a4aa-f93f36ab5dbf",
            "maxLength": 36,
            "minLength": 36
          }
        },
        "required": [
          "subscriptionInitiationToken"
        ]
      },
      "HealthCheckResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "response message from health check",
            "example": "The healthcheck GET request was successfully received and processed",
            "maxLength": 100,
            "minLength": 0
          },
          "requestDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "according to RFC3339, section 5.6 in ISO 8601 with timezone and milliseconds",
            "example": "2018-10-03T16:03:09.101+02:00"
          },
          "receivedHeaders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HealthCheckResponseReceivedHeaders"
            }
          },
          "environmentStage": {
            "type": "string",
            "description": "the instance which the request was sent to",
            "example": "XE"
          },
          "applicationVersion": {
            "type": "string",
            "description": "the version of the eBill infrastructure",
            "example": "1.4.3.0-desire-20180927091004161-71-5e3ca91"
          },
          "apiVersion": {
            "type": "string",
            "description": "the version of the network partner api",
            "example": "1.0.23"
          },
          "maintenanceWindows": {
            "type": "array",
            "description": "Information about the upcoming maintenance windows. If no maintenance is planned, an empty list is returned.",
            "items": {
              "$ref": "#/components/schemas/MaintenanceWindow"
            }
          }
        },
        "required": [
          "apiVersion",
          "applicationVersion",
          "environmentStage",
          "message",
          "receivedHeaders",
          "requestDateTime"
        ]
      },
      "HealthCheckResponseReceivedHeaders": {
        "type": "object",
        "properties": {
          "headerName": {
            "type": "string",
            "description": "the name of the provided header",
            "example": "x-correlation-id"
          },
          "headerValue": {
            "type": "string",
            "description": "As received",
            "example": "9bcd4351-4b7b-4017-9b63-9613414c6ff1"
          }
        }
      },
      "MaintenanceWindow": {
        "type": "object",
        "properties": {
          "start": {
            "type": "string",
            "format": "date-time",
            "description": "start time of the maintenance window",
            "example": "2021-01-01T10:00Z"
          },
          "end": {
            "type": "string",
            "format": "date-time",
            "description": "end time of the maintenance window",
            "example": "2021-01-01T14:00Z"
          }
        },
        "required": [
          "end",
          "start"
        ]
      },
      "ApprovalAmountWithCurrency": {
        "type": "object",
        "description": "Amount provided by status changed events if the new status is APPROVED. The value is always greater than zero. ",
        "properties": {
          "value": {
            "type": "number",
            "description": "The amount value. Take care when using JavaScript libraries to parse this value - it should be treated as a financial amount and therefore not as a floating point number but rather using a precise decimal representation (like BigDecimal in Java).  **Maximum value**: `99'999'999.99`  **Maximal length**: `10` ",
            "example": 99.99
          },
          "currencyCode": {
            "type": "string",
            "description": "The amount currency code according to ISO-4217. ",
            "example": "CHF",
            "maxLength": 3,
            "minLength": 0,
            "pattern": "[A-Z]{3}"
          }
        },
        "required": [
          "currencyCode",
          "value"
        ]
      },
      "InstalmentStatusChangedEvent": {
        "type": "object",
        "description": "An Event describing the status change of an instalment. These events are only sent for instalment bills. The approved amount does always contain a value and a currency, but is only provided for the status APPROVED. ",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32",
            "description": "Event ID",
            "example": 12345
          },
          "sixId": {
            "type": "string",
            "description": "SIX event ID",
            "example": "EVID82A65938766547EBBBA39BA6F7B07F24",
            "maxLength": 36,
            "minLength": 0,
            "pattern": "EVID[0-9A-Z]{32}"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "timestamp of the event",
            "example": "2015-01-01T10:00Z"
          },
          "businessCaseId": {
            "type": "integer",
            "format": "int32",
            "description": "Business Case ID",
            "example": 12345
          },
          "businessCaseSixId": {
            "type": "string",
            "description": "business case SIX ID",
            "example": "BCID0FB909852BBC4D06AD8336AAE87D7FC9",
            "maxLength": 36,
            "minLength": 0,
            "pattern": "BCID[0-9A-Z]{32}"
          },
          "paymentByInstalmentsId": {
            "type": "integer",
            "format": "int32",
            "description": "PaymentByInstalments ID",
            "example": 12345
          },
          "paymentByInstalmentsSixId": {
            "type": "string",
            "description": "external ID of the respective paymentByInstalment",
            "example": "298031-2999",
            "maxLength": 36,
            "minLength": 1
          },
          "instalmentId": {
            "type": "integer",
            "format": "int32",
            "description": "Instalment ID",
            "example": 12345
          },
          "instalmentSixId": {
            "type": "string",
            "description": "external ID of the instalment",
            "example": "298031-2999-ACX01",
            "maxLength": 36,
            "minLength": 1
          },
          "newStatus": {
            "type": "string",
            "description": "the new status of the instalment",
            "enum": [
              "OPEN",
              "APPROVED",
              "REJECTED",
              "COMPLETED",
              "CHARGEBACK_INITIATED"
            ]
          },
          "approvedAmount": {
            "$ref": "#/components/schemas/ApprovalAmountWithCurrency"
          }
        },
        "required": [
          "businessCaseSixId",
          "id",
          "instalmentId",
          "paymentByInstalmentsId",
          "sixId",
          "timestamp"
        ]
      },
      "BusinessCaseStatusChangedEvent": {
        "type": "object",
        "description": "An Event describing the status change of a business case These events are sent for bills, reminders and donation inquries. The approved amount does always contain a value and a currency, but is only provided for the status APPROVED. ",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32",
            "description": "Event ID",
            "example": 12345
          },
          "sixId": {
            "type": "string",
            "description": "SIX event ID",
            "example": "EVID82A65938766547EBBBA39BA6F7B07F24",
            "maxLength": 36,
            "minLength": 0,
            "pattern": "EVID[0-9A-Z]{32}"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "timestamp of the event",
            "example": "2015-01-01T10:00Z"
          },
          "businessCaseId": {
            "type": "integer",
            "format": "int32",
            "description": "Business case ID",
            "example": 12345
          },
          "businessCaseSixId": {
            "type": "string",
            "description": "Business Case SIX ID",
            "example": "BCID0FB909852BBC4D06AD8336AAE87D7FC9",
            "maxLength": 36,
            "minLength": 0,
            "pattern": "BCID[0-9A-Z]{32}"
          },
          "newStatus": {
            "type": "string",
            "description": "the new status of the business case",
            "enum": [
              "OPEN",
              "APPROVED",
              "REJECTED",
              "COMPLETED",
              "CHARGEBACK_INITIATED"
            ]
          },
          "approvedAmount": {
            "$ref": "#/components/schemas/ApprovalAmountWithCurrency"
          },
          "externalDonationPurposeId": {
            "type": "string",
            "description": "optional field only to be used for donation inquiries to represent a potential selection of a donation purpose by the bill recipient, note the connection to the field externalDonationPurposeId from eBill business case specification"
          }
        },
        "required": [
          "id",
          "sixId",
          "timestamp"
        ]
      },
      "BillRecipientSubscriptionFormBillRecipientSubscriptionFormFields": {
        "type": "object",
        "properties": {
          "technicalId": {
            "type": "string",
            "description": "The identifying token of this subscription form field. Corresponds to the property technicalId of BillerSubscriptionFormField.",
            "example": "customerNumber",
            "maxLength": 35,
            "minLength": 1
          },
          "value": {
            "type": "string",
            "description": "The value of this subscription form field as entered by the user. If a pattern is defined, it has been checked against it.",
            "example": "123-abcd-456",
            "maxLength": 256,
            "minLength": 1
          }
        },
        "required": [
          "technicalId",
          "value"
        ]
      },
      "BillRecipientSubscriptionStatusChangedEvent": {
        "type": "object",
        "description": "An Event describing the status change of a bill recipient subscription.",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32",
            "description": "Event ID",
            "example": 12345
          },
          "sixId": {
            "type": "string",
            "description": "SIX Event ID",
            "example": "EVID82A65938766547EBBBA39BA6F7B07F24",
            "maxLength": 36,
            "minLength": 0,
            "pattern": "EVID[0-9A-Z]{32}"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "timestamp of the event",
            "example": "2015-01-01T10:00Z"
          },
          "billRecipient": {
            "$ref": "#/components/schemas/BillRecipient"
          },
          "accountNumber": {
            "type": "string",
            "description": "Account number of the biller (e.g. iban), if provided from the financial institution",
            "maxLength": 21,
            "minLength": 0
          },
          "referenceStructured": {
            "type": "string",
            "description": "QR or creditor reference number, if provided from the financial institution. ",
            "example": 1.2345612345678902e+26,
            "maxLength": 27,
            "minLength": 0,
            "pattern": "([a-zA-Z0-9])*"
          },
          "billRecipientSubscriptionFormFields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BillRecipientSubscriptionFormBillRecipientSubscriptionFormFields"
            }
          },
          "newStatus": {
            "type": "string",
            "description": "the new status of the bill recipient subscription, see \"Subscriptions and subscription cancellations\" for further information",
            "enum": [
              "INACTIVE",
              "REQUESTED",
              "ACTIVE"
            ]
          }
        },
        "required": [
          "billRecipient",
          "id",
          "sixId",
          "timestamp"
        ]
      },
      "BillRecipientEmailAddressChangedEvent": {
        "type": "object",
        "description": "An Event describing the change of the email address of a bill recipient.",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32",
            "description": "Event ID",
            "example": 12345
          },
          "sixId": {
            "type": "string",
            "description": "SIX event ID",
            "example": "EVID82A65938766547EBBBA39BA6F7B07F24",
            "maxLength": 36,
            "minLength": 0,
            "pattern": "EVID[0-9A-Z]{32}"
          },
          "businessCaseId": {
            "type": "integer",
            "format": "int32"
          },
          "businessCaseSixId": {
            "type": "string",
            "description": "business case SIX ID",
            "example": "BCID0FB909852BBC4D06AD8336AAE87D7FC9",
            "maxLength": 36,
            "minLength": 0,
            "pattern": "BCID[0-9A-Z]{32}"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "timestamp of the event",
            "example": "2015-01-01T10:00Z"
          },
          "oldEmailAddress": {
            "type": "string",
            "description": "the old email address of the bill recipient which has been used in the submission of a business case",
            "example": "peter@muster.ch",
            "maxLength": 256,
            "minLength": 1
          },
          "newEmailAddress": {
            "type": "string",
            "description": "the new email address of the bill recipient",
            "example": "peter_new@muster.ch",
            "maxLength": 256,
            "minLength": 1
          }
        },
        "required": [
          "businessCaseSixId",
          "id",
          "sixId",
          "timestamp"
        ]
      },
      "ProcessingStatusChangedEvent": {
        "type": "object",
        "description": "An Event describing the processing status change of a business case These events are sent for every type of business case",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32",
            "description": "Event ID",
            "example": 12345
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "timestamp of the event",
            "example": "2015-01-01T10:00Z"
          },
          "businessCaseId": {
            "type": "integer",
            "format": "int32",
            "description": "Business Case ID"
          },
          "businessCaseSixId": {
            "type": "string",
            "description": "business case SIX ID",
            "example": "BCID0FB909852BBC4D06AD8336AAE87D7FC9",
            "maxLength": 36,
            "minLength": 0,
            "pattern": "BCID[0-9A-Z]{32}"
          },
          "newStatus": {
            "type": "string",
            "enum": [
              "OPEN",
              "INVALID",
              "PROCESSING",
              "FAILED",
              "DELIVERED",
              "DONE"
            ]
          }
        },
        "required": [
          "businessCaseSixId",
          "id",
          "timestamp"
        ]
      },
      "BillRecipientById": {
        "type": "object",
        "properties": {
          "billRecipientSixId": {
            "type": "string",
            "description": "SIX ID of the bill recipient",
            "example": 41010560425610180,
            "maxLength": 17,
            "minLength": 1,
            "pattern": "([0-9])*"
          }
        }
      }
    },
    "securitySchemes": {
      "X-API-Key": {
        "type": "apiKey",
        "description": "API key via Header",
        "name": "X-API-Key",
        "in": "header"
      }
    }
  },
  "webhooks": {
    "Bill Recipient Email Address Changed Event": {
      "post": {
        "requestBody": {
          "content": {
            "*/*": {
              "schema": {
                "$ref": "#/components/schemas/WebhookBillRecipientEmailAddressChangedEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Event received"
          }
        }
      }
    },
    "Bill Recipient Subscription Status Changed Event": {
      "post": {
        "requestBody": {
          "content": {
            "*/*": {
              "schema": {
                "$ref": "#/components/schemas/WebhookBillRecipientSubscriptionStatusChangedEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Event received"
          }
        }
      }
    },
    "Business Case Status Changed Event": {
      "post": {
        "requestBody": {
          "content": {
            "*/*": {
              "schema": {
                "$ref": "#/components/schemas/WebhookBusinessCaseStatusChangedEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Event received"
          }
        }
      }
    },
    "Instalment Status Changed Event": {
      "post": {
        "requestBody": {
          "content": {
            "*/*": {
              "schema": {
                "$ref": "#/components/schemas/WebhookInstalmentStatusChangedEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Event received"
          }
        }
      }
    },
    "Processing Status Changed Event": {
      "post": {
        "requestBody": {
          "content": {
            "*/*": {
              "schema": {
                "$ref": "#/components/schemas/WebhookProcessingStatusChangedEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Event received"
          }
        }
      }
    }
  }
}