{
  "openapi": "3.1.2",
  "jsonSchemaDialect": "https://spec.openapis.org/oas/3.1/dialect/base",
  "info": {
    "version": "0.0.0",
    "title": "Billogram - OpenAPI 3.1",
    "contact": {
      "email": "support@billogram.com"
    },
    "description": "The Billogram API is a RESTful JSON API for managing invoices, customers, and billing operations.\nAll requests must be made over HTTPS and authenticated with HTTP Basic Auth.\n\nFor a conceptual introduction and quickstart, see the [Getting Started](/guides/getting-started) guide.\nFor authentication details, see [Authentication](/guides/authentication).\nFor request and response conventions, see [Requests & Responses](/guides/requests-and-responses)."
  },
  "servers": [
    {
      "url": "https://sandbox.billogram.com/api/v2",
      "description": "Sandbox server (uses test data)"
    },
    {
      "url": "https://billogram.com/api/v2",
      "description": "Production server (uses live data)"
    }
  ],
  "tags": [
    {
      "name": "Billogram",
      "description": "A billogram is a collection of related invoices, and the base information used to create them. \nTo invoice a customer, you create a billogram with the items to be invoiced for, \nassign the customer to it, and attest it by performing the send command. \nThis generates an initial invoice to the customer. \nIf circumstances later change and you need to e.g. credit part of the invoice, \nthe credit invoice for this will be added to the same billogram, keeping related information together. \nThe billogram object also lets you change the items invoiced for after sending the invoice, \nin this case the Billogram service will intelligently create additional regular invoices \nand credit invoices as required to ensure the customer pays the correct amount.\n\nIn the Billogram system, invoices are represented as sub-objects of billogram objects, \nand invoices are immutable. Changes to the billogram object will rather generate new invoices.\n\nA billogram object also contains a complete history of all activity relating to it, \nsuch as it being created, invoices sent, payments received, reminders sent, and so on.\n"
    },
    {
      "name": "Customer",
      "description": "Customers are registered recipients of invoices, invoices can only be sent to an existing customer.\n\nThe *company_type* field of a customer determines the customer's legal status; \nwhether they are a private person or a business, \nand whether they reside in the Billogram business account's country or not. \nThis information controls the availability of some of the invoicing features, \nfor instance the ROT/RUT deduction options are only available when a Swedish business is invoicing a Swedish private customer, \nnot when they invoice a foreign customer or another business.\n"
    },
    {
      "name": "Item",
      "description": "An item is a product or service that can be invoiced for. \nOn an invoice, they appear as a row with a text, a unit price, \na (possibly fractional) number of units invoiced for, and the calculated total cost.\n"
    },
    {
      "name": "Stand-alone credit invoices",
      "description": "In Billogram, **default credits** are credit invoices created within an existing billogram\nthat already contains a debit invoice. These credits are automatically allocated to the\ndebit invoice within that billogram.\n\n**Stand-alone credits** are credit invoices created as isolated billograms.\nThey can be allocated to one or several debit invoices on other billograms\nfor the same customer, providing greater flexibility (for example in B2B scenarios).\n\n### Key characteristics\n- Always have a **negative sum**\n- Cannot be converted into debit invoices\n- Can be allocated across multiple billograms\n- Can be marked as paid out via the payment function\n- Must be enabled by Billogram upon request\n- Supports the `DoNotNotify` delivery method\n- `reference_invoice_no` must be the original invoice's real invoice number\n  (not an internal reference). **Required when sending** a stand-alone credit\n  on a French-market creditor. `reference_invoice_date` is optional.\n"
    },
    {
      "name": "Payment Sources",
      "description": "A payment source is something where funds can be requested / drawn from to for allocation towards a payable. \nIt is a deliberate abstraction of different concrete payment schemes like \nAutogiro, AvtaleGiro, SEPA Direct Debit, etc.\n\nPayment sources can be used to authorize withdrawal of funds from an underlying account, \nin these cases an underlying mandate will exist, \nthe structure of these will vary by the requirements of the underlying scheme.\n"
    },
    {
      "name": "Offer",
      "description": "Offers can be attached to invoices to expand branding opportunities or sell products/services.\nThere are two offer types:\n- `banner`: links to an external URL\n- `sale`: opens an overlay and can be accepted by the recipient\n"
    },
    {
      "name": "Billing Tab",
      "description": "The **Billing Tab** feature lets you add items to a customer's ongoing “tab”.\nAt a scheduled date, Billogram automatically creates an invoice containing all items currently on the tab.\n\n### How it works\n1. **Add items over time** – Add separate items as they are sold/provided.\n2. **Accumulate items** – Items accumulate on the tab until the scheduled billing date.\n3. **Automatic invoice creation** – A single invoice is created at the scheduled date.\n4. **Tab reset** – The tab is emptied for the next billing period.\n\n### Components\n- **Billing Tab** – The customer's accumulated items that will be invoiced together\n- **Billing Tab Items** – Individual items added over time\n- **Customer Settings** – Per-customer billing frequency and delivery method\n\n### Validation rules\n- `customer_no` must be numeric (digits only); invalid input returns **400**.\n- `billing_tab_id` and `billing_tab_item_id` must be valid UUIDs; invalid format returns **400**.\n- Creating a billing-tab item requires `billogram_item`.\n- Customer settings require at least one of `billing_frequency` or `delivery_method`.\n"
    },
    {
      "name": "Settings",
      "description": "The settings object lets a client application modify global values for a Billogram business account.\nThese settings are also available on the web interface;\nmost applications may never need to use the settings object.\n"
    },
    {
      "name": "Report",
      "description": "Your report files are available for fetching via the API. \nFor the reports resource, you should use the `filename` attribute as ID.\nNote that this is a read-only resource, you cannot modify any reports\n"
    },
    {
      "name": "Webhooks",
      "description": "Webhooks allow you to receive real-time HTTP POST notifications about events in your Billogram account.\nIn the API schema, these are referred to as `callbacks` for historical reasons.\n\nFor configuration, signature verification, event types, and best practices,\nsee the [Webhooks guide](/guides/webhooks).\n"
    }
  ],
  "security": [
    {
      "basicAuth": []
    }
  ],
  "paths": {
    "/billogram": {
      "post": {
        "operationId": "createBillogram",
        "summary": "Create a new billogram object",
        "description": "Create a new billogram object",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Billogram"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Billogram"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/AssetNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Billogram"
        ]
      },
      "get": {
        "operationId": "listBillograms",
        "summary": "Search for billograms",
        "description": "List/search billogram objects with optional filtering and pagination",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "The result page number to fetch. The first page has number 1 (one).",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "How many results to return per page. Settings this number too high may impact performance, we recommend values between 10 and 100.",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "filter_type",
            "in": "query",
            "description": "Type of filtering to perform",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "field",
                "field-prefix",
                "field-search"
              ]
            }
          },
          {
            "name": "filter_field",
            "in": "query",
            "description": "Field to filter on when using field-based filtering",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter_value",
            "in": "query",
            "description": "Value to filter by when using field-based filtering",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order_field",
            "in": "query",
            "description": "Field to order results by",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order_direction",
            "in": "query",
            "description": "Direction to order results",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/BillogramList"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "504": {
            "$ref": "#/components/responses/GatewayTimeout"
          }
        },
        "tags": [
          "Billogram"
        ]
      }
    },
    "/billogram/{id}": {
      "get": {
        "operationId": "getBillogram",
        "summary": "Fetch a single billogram object",
        "description": "Fetch a single billogram object",
        "parameters": [
          {
            "$ref": "#/components/parameters/BillogramId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Billogram"
          },
          "404": {
            "$ref": "#/components/responses/BillogramNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Billogram"
        ]
      },
      "put": {
        "operationId": "updateBillogram",
        "summary": "Update a billogram object",
        "description": "Update a billogram object",
        "parameters": [
          {
            "$ref": "#/components/parameters/BillogramId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Billogram"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Billogram"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/BillogramNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          }
        },
        "tags": [
          "Billogram"
        ]
      },
      "delete": {
        "operationId": "deleteBillogram",
        "summary": "Delete a billogram draft",
        "description": "Permanently deletes a billogram that is still a draft. Only allowed when the billogram is in state `Billogram_State_Unattested`. For any other state, the API returns `INVALID_OBJECT_STATE` with a message indicating that the Delete event is not supported in the current state.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/BillogramId"
          }
        ],
        "responses": {
          "200": {
            "description": "OK. The draft billogram was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "OK"
                      ]
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": false
                    }
                  }
                },
                "example": {
                  "status": "OK",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestDeleteBillogram"
          },
          "404": {
            "$ref": "#/components/responses/BillogramNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Billogram"
        ]
      }
    },
    "/billogram/{id}.pdf": {
      "get": {
        "operationId": "getBillogramPdf",
        "summary": "Fetch generated PDF for a Billogram object",
        "description": "Fetch generated PDF for a Billogram object",
        "parameters": [
          {
            "$ref": "#/components/parameters/BillogramId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Billogram"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/BillogramNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Billogram"
        ]
      }
    },
    "/billogram/{id}/attachment.pdf": {
      "get": {
        "operationId": "getBillogramAttachment",
        "tags": [
          "Billogram"
        ],
        "summary": "Get billogram PDF attachment metadata and content",
        "description": "Fetch the billogram attachment (if present).\n\nReturns a JSON response with:\n- `file_type` (e.g. `application/pdf`)\n- `filename`\n- `content` (base64-encoded file content)\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/BillogramId"
          }
        ],
        "responses": {
          "200": {
            "description": "Attachment was returned successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillogramAttachmentResponse"
                },
                "example": {
                  "status": "OK",
                  "data": {
                    "file_type": "application/pdf",
                    "content": "",
                    "filename": "attachment_filename.pdf"
                  }
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/BillogramNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/billogram/{id}/command/send": {
      "post": {
        "operationId": "sendBillogram",
        "summary": "Send a billogram",
        "description": "Send (attest) a billogram, generating an invoice that will be delivered to the recipient. The chosen delivery method must be valid for the billogram's market and creditor configuration.\n",
        "tags": [
          "Billogram"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/BillogramId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendBillogramRequest"
              },
              "example": {
                "method": "Letter"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Billogram"
          },
          "400": {
            "$ref": "#/components/responses/BadRequestSendBillogram"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenSendBillogram"
          },
          "404": {
            "$ref": "#/components/responses/BillogramNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "504": {
            "$ref": "#/components/responses/GatewayTimeout"
          }
        }
      }
    },
    "/billogram/{id}/command/resend": {
      "post": {
        "operationId": "resendBillogram",
        "summary": "Resend a billogram",
        "description": "Resend a previously sent billogram. Request body is optional. If omitted, the original delivery method will be used.\n",
        "tags": [
          "Billogram"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/BillogramId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResendBillogramRequest"
              },
              "example": {
                "method": "Email"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Billogram"
          },
          "400": {
            "$ref": "#/components/responses/BadRequestResendBillogram"
          },
          "404": {
            "$ref": "#/components/responses/BillogramNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/billogram/{id}/command/remind": {
      "post": {
        "operationId": "remindBillogram",
        "summary": "Send a reminder",
        "description": "Send a reminder for a billogram, only possible after the due date has passed.\n",
        "tags": [
          "Billogram"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/BillogramId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RemindBillogramRequest"
              },
              "example": {
                "method": "Email",
                "message": "This is a payment reminder.",
                "due_days": 0
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Billogram"
          },
          "400": {
            "$ref": "#/components/responses/BadRequestRemindBillogram"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenRemindBillogram"
          },
          "404": {
            "$ref": "#/components/responses/BillogramNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "504": {
            "$ref": "#/components/responses/GatewayTimeout"
          }
        }
      }
    },
    "/billogram/{id}/command/collect": {
      "post": {
        "operationId": "collectBillogram",
        "summary": "Send to collection",
        "description": "Send a billogram to debt collection.",
        "tags": [
          "Billogram"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/BillogramId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Billogram"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        }
      }
    },
    "/billogram/{id}/command/sell": {
      "post": {
        "operationId": "sellBillogram",
        "summary": "Sell a billogram",
        "description": "Sell a billogram to a third party.",
        "tags": [
          "Billogram"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/BillogramId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Billogram"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        }
      }
    },
    "/billogram/{id}/command/payment": {
      "post": {
        "operationId": "registerPayment",
        "summary": "Register a payment",
        "description": "Manually register a payment on a billogram. This is intended to be used if a payment is received outside the services offered by Billogram, e.g. if the customer pays by cash rather than via the Billogram client funds accounts.",
        "tags": [
          "Billogram"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/BillogramId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentCommand"
              },
              "example": {
                "amount": 100,
                "payment_date": "2026-01-01"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Billogram"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        }
      }
    },
    "/billogram/{id}/command/settle-underpayment": {
      "post": {
        "operationId": "settleUnderpayment",
        "summary": "Settle underpayment",
        "description": "Settle an underpayment on a billogram when the payer has paid less than the full amount due, reconciling the remaining balance accordingly.",
        "tags": [
          "Billogram"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/BillogramId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Billogram"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        }
      }
    },
    "/billogram/{id}/command/credit": {
      "post": {
        "operationId": "creditBillogram",
        "summary": "Credit a billogram",
        "description": "Credit a billogram, either fully or partially by specifying items to credit.",
        "tags": [
          "Billogram"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/BillogramId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillogramCreditCommand"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Billogram"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        }
      }
    },
    "/billogram/{id}/command/writeoff": {
      "post": {
        "operationId": "writeoffBillogram",
        "summary": "Write off overdue charges",
        "description": "Remove remaining overdue charges from a billogram, such as reminder fees and late payment interest. This is useful if you have a billogram which is fully paid and you want to remove remaining overdue charges.",
        "tags": [
          "Billogram"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/BillogramId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WriteoffCommand"
              },
              "example": {
                "allow_unpaid": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Billogram"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        }
      }
    },
    "/billogram/{id}/command/writedown": {
      "post": {
        "operationId": "writedownBillogram",
        "summary": "Write down a billogram",
        "description": "Write down a billogram, reducing its value and marking it as expected loss.",
        "tags": [
          "Billogram"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/BillogramId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Billogram"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        }
      }
    },
    "/billogram/{id}/command/revert-writedown": {
      "post": {
        "operationId": "revertWritedown",
        "summary": "Revert a write down",
        "description": "Revert a previous write down operation on a billogram.",
        "tags": [
          "Billogram"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/BillogramId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Billogram"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        }
      }
    },
    "/billogram/{id}/command/confirmed-loss": {
      "post": {
        "operationId": "markConfirmedLoss",
        "summary": "Mark as confirmed loss",
        "description": "Mark a billogram as a confirmed loss.",
        "tags": [
          "Billogram"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/BillogramId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Billogram"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        }
      }
    },
    "/billogram/{id}/command/respite": {
      "post": {
        "operationId": "setRespite",
        "summary": "Grant a respite",
        "description": "Grant a respite period for a billogram, allowing payment after the due date without triggering reminders. Any existing scheduled direct debit payment will be rescheduled to the respite date.",
        "tags": [
          "Billogram"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/BillogramId"
          }
        ],
        "requestBody": {
          "description": "The date until which the respite is granted.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "date"
                ],
                "properties": {
                  "date": {
                    "type": "string",
                    "format": "date",
                    "description": "The new respite date. Must be later than the current due date."
                  }
                }
              },
              "example": {
                "date": "2026-01-31"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Billogram"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        }
      }
    },
    "/billogram/{id}/command/remove-respite": {
      "post": {
        "operationId": "removeRespite",
        "summary": "Remove a respite",
        "description": "Remove an active respite period from a billogram.",
        "tags": [
          "Billogram"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/BillogramId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Billogram"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        }
      }
    },
    "/billogram/{id}/command/message": {
      "post": {
        "operationId": "addMessage",
        "summary": "Add a message",
        "description": "Add a message to the conversation on the billogram. The message will be delivered via email.",
        "tags": [
          "Billogram"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/BillogramId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageCommand"
              },
              "example": {
                "message": "Please contact us regarding your invoice."
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Billogram"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        }
      }
    },
    "/billogram/{id}/command/attach": {
      "post": {
        "operationId": "attachPdf",
        "summary": "Attach a PDF file",
        "description": "Attach a PDF attachment to a billogram.  The PDF attachment will be printed and sent along with the invoice if delivered by letter  and will be available to download when the recipient receives the billogram via email or link. The attachment can later be fetched from the target path billogram/{id}/attachment.pdf. To remove an attachment, update the attachment field of the billogram to null.",
        "tags": [
          "Billogram"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/BillogramId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AttachCommand"
              },
              "example": {
                "filename": "terms.pdf",
                "content": "JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PAovVHlwZSAvQ2F0YWxvZwo+PgplbmRvYmoKdHJhaWxlcgo8PAovUm9vdCAxIDAgUgo+PgolJUVPRgo="
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Billogram"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        }
      }
    },
    "/billogram/{id}/command/credit-allocate": {
      "post": {
        "operationId": "creditAllocate",
        "summary": "Allocate credit invoice",
        "description": "Allocate a stand-alone credit invoice to a debit invoice. Specify the billogram on which you want to allocate a stand-alone credit invoice in the path and the billogram from which you want to allocate in the payload as source_id.",
        "tags": [
          "Stand-alone credit invoices"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/BillogramId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreditAllocateCommand"
              },
              "example": {
                "amount": 500,
                "source_id": "CDAEyKE"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Billogram"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        }
      }
    },
    "/billogram/{id}/command/credit-payment": {
      "post": {
        "operationId": "creditPayment",
        "summary": "Register credit payment",
        "description": "Register a payment on a stand-alone credit invoice. Use mode 'remaining' to register the full remaining amount, or mode 'amount' to specify a custom payment amount.",
        "tags": [
          "Stand-alone credit invoices"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/BillogramId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreditPaymentCommand"
              },
              "example": {
                "mode": "amount",
                "amount": 250
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Billogram"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        }
      }
    },
    "/billogram_event": {
      "get": {
        "operationId": "getBillogramEvents",
        "summary": "Get billogram events",
        "description": "If you need more than the 100 latest history events for a billogram,\nyou may query the `/api/v2/billogram_event` resource.\n\nYou may only GET (list/search) from this resource by using field-based filtering where\n`filter_type` is set to `\"field\"`, `filter_field` is set to `\"billogram_id\"`, and\n`filter_value` is the id of the billogram you wish to get events from.\n\nThe list is sorted by creation time (`created_at`). By default, results are returned in\nascending order starting with the oldest event as the first object (typically the\n`BillogramCreated` event), but you can change the ordering by using the `order_direction`\nquery parameter together with `order_field`.\n\nThere is no way to perform a `GET` for a single event, since the events do not have any\nunique ids returned.\n",
        "tags": [
          "Billogram"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "The result page number to fetch. The first page has number 1 (one).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "How many results to return per page. Setting this number too high may impact performance, we recommend values between 10 and 100.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "filter_type",
            "in": "query",
            "description": "Type of filtering to perform",
            "schema": {
              "type": "string",
              "enum": [
                "field"
              ]
            }
          },
          {
            "name": "filter_field",
            "in": "query",
            "description": "Field to filter on when using field-based filtering. \nbillogram_id is the only supported field.\n",
            "schema": {
              "type": "string",
              "enum": [
                "billogram_id"
              ]
            }
          },
          {
            "name": "filter_value",
            "in": "query",
            "description": "Value to filter by when using field-based filtering.\nThe value must be the id of the billogram you wish to get events from.\n",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "order_field",
            "schema": {
              "type": "string",
              "enum": [
                "created_at"
              ]
            },
            "description": "Name of the field to order the results by. \ncreated_at is the only supported field.\n"
          },
          {
            "in": "query",
            "name": "order_direction",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "description": "Whether to use ascending or descending ordering for the field specified."
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/BillogramEventList"
          },
          "400": {
            "description": "Bad Request - The request was invalid or cannot be otherwise served.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "InvalidQueryParameter": {
                    "$ref": "#/components/examples/InvalidQueryParameter"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found - The requested resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "BillogramNotFound": {
                    "$ref": "#/components/examples/BillogramNotFound"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/customer": {
      "post": {
        "operationId": "createCustomer",
        "summary": "Create a customer",
        "description": "Create a new customer",
        "tags": [
          "Customer"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "default": {
                  "$ref": "#/components/examples/Customer"
                }
              },
              "schema": {
                "$ref": "#/components/schemas/Customer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK. The customer was created successfully. The data of the response contains the actual customer object created in the database, including any auto-generated customer_no value.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Customer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        }
      },
      "get": {
        "operationId": "listCustomers",
        "summary": "List customers",
        "description": "Search for customers",
        "tags": [
          "Customer"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": true,
            "description": "The result page number to fetch. The first page has number 1 (one)."
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "required": true,
            "description": "How many results to return per page. Settings this number too high may impact performance, we recommend values between 10 and 100."
          },
          {
            "in": "query",
            "name": "filter_type",
            "schema": {
              "type": "string",
              "enum": [
                "field",
                "field-prefix",
                "field-search",
                "special"
              ]
            },
            "description": "The kind of search to perform."
          },
          {
            "in": "query",
            "name": "filter_field",
            "schema": {
              "type": "string"
            },
            "description": "Name of the field to search in. The available fields depends on the className the request is made to."
          },
          {
            "in": "query",
            "name": "filter_value",
            "schema": {
              "type": "string"
            },
            "description": "The value to search for."
          },
          {
            "in": "query",
            "name": "order_field",
            "schema": {
              "type": "string"
            },
            "description": "Name of the field to order the results by. The available fields depends on the className the request is made to."
          },
          {
            "in": "query",
            "name": "order_direction",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "description": "Whether to use ascending or descending ordering for the field specified."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Customer"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        }
      }
    },
    "/customer/{customer_no}": {
      "get": {
        "operationId": "getCustomer",
        "summary": "Get a customer",
        "description": "Fetch a single customer object",
        "tags": [
          "Customer"
        ],
        "parameters": [
          {
            "name": "customer_no",
            "in": "path",
            "description": "Customer ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The customer was found. The data of the response contains the requested customer object's current state.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Customer"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/CustomerNotFound"
          }
        }
      },
      "put": {
        "operationId": "updateCustomer",
        "summary": "Update a customer",
        "description": "Update a customer object",
        "tags": [
          "Customer"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "default": {
                  "$ref": "#/components/examples/Customer"
                }
              },
              "schema": {
                "$ref": "#/components/schemas/Customer"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "customer_no",
            "in": "path",
            "description": "Customer ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Customer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/CustomerNotFound"
          }
        }
      }
    },
    "/customer/{customer_no}/balance": {
      "get": {
        "operationId": "getCustomerBalance",
        "summary": "Get customer balance",
        "description": "Fetch the customer's balance totals from the customer balance ledger header.\n\nReturns total outstanding, net balance excluding doubtful debt, and doubtful debt total.\nThese amounts match the totals shown in the creditor UI for the customer.\n\nRequires the `customer_balance:enabled` creditor feature flag and a\n`creditor-admin` or `creditor-support` API user.\n",
        "tags": [
          "Customer"
        ],
        "parameters": [
          {
            "name": "customer_no",
            "in": "path",
            "description": "Customer ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The customer balance was retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/CustomerBalance"
                    }
                  }
                },
                "examples": {
                  "default": {
                    "value": {
                      "status": "OK",
                      "data": {
                        "total_outstanding": {
                          "value": "4.50",
                          "currency": "EUR"
                        },
                        "net_balance": {
                          "value": "4.50",
                          "currency": "EUR"
                        },
                        "doubtful_debt": {
                          "value": "0.00",
                          "currency": "EUR"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/CustomerNotFound"
          }
        }
      }
    },
    "/customer/{customer_no}/einvoice": {
      "parameters": [
        {
          "name": "customer_no",
          "in": "path",
          "required": true,
          "description": "Customer ID.",
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "operationId": "getCustomerEinvoiceRegistration",
        "tags": [
          "Customer"
        ],
        "summary": "Get customer e-invoice registration",
        "description": "Fetch the customer's e-invoice registration (if any).\n\n**Availability**\n- Markets: Sweden, Norway, Finland, Italy\n\n**Notes**\n- Returns the current registration data structure.\n",
        "responses": {
          "200": {
            "description": "The customer registration was found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Operation status."
                    },
                    "data": {
                      "$ref": "#/components/schemas/CustomerEinvoiceRegistration"
                    }
                  }
                },
                "examples": {
                  "Sweden": {
                    "$ref": "#/components/examples/CustomerEinvoiceRegistrationSweden"
                  },
                  "Italy": {
                    "$ref": "#/components/examples/CustomerEinvoiceRegistrationItaly"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/CustomerNotFound"
          }
        }
      },
      "post": {
        "operationId": "createCustomerEinvoiceRegistration",
        "tags": [
          "Customer"
        ],
        "summary": "Create customer e-invoice registration",
        "description": "Create an e-invoice registration for a customer.\n\n**Availability**\n- Markets: Sweden, Italy\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerEinvoiceRegistrationRequest"
              },
              "examples": {
                "Sweden": {
                  "$ref": "#/components/examples/CustomerEinvoiceRegistrationRequestSweden"
                },
                "Italy": {
                  "$ref": "#/components/examples/CustomerEinvoiceRegistrationRequestItaly"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The customer registration was created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/CustomerEinvoiceRegistration"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/CustomerNotFound"
          }
        }
      },
      "put": {
        "operationId": "updateCustomerEinvoiceRegistration",
        "tags": [
          "Customer"
        ],
        "summary": "Update customer e-invoice registration",
        "description": "Update an existing e-invoice registration for a customer.\n\n**Availability**\n- Markets: Sweden, Italy\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerEinvoiceRegistrationRequest"
              },
              "examples": {
                "Sweden": {
                  "$ref": "#/components/examples/CustomerEinvoiceRegistrationRequestSweden"
                },
                "Italy": {
                  "$ref": "#/components/examples/CustomerEinvoiceRegistrationRequestItaly"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The customer registration was updated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/CustomerEinvoiceRegistration"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/CustomerNotFound"
          }
        }
      },
      "delete": {
        "operationId": "deleteCustomerEinvoiceRegistration",
        "tags": [
          "Customer"
        ],
        "summary": "Delete customer e-invoice registration",
        "description": "Delete the customer's e-invoice registration.\n\n**Availability**\n- Markets: Sweden, Italy\n",
        "responses": {
          "200": {
            "description": "The customer registration was successfully deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Operation status."
                    },
                    "data": {
                      "type": "null",
                      "description": "Empty for delete operations."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/CustomerNotFound"
          }
        }
      }
    },
    "/customer/{customer_no}/billing-tab": {
      "parameters": [
        {
          "$ref": "#/components/parameters/CustomerNo"
        }
      ],
      "get": {
        "tags": [
          "Billing Tab"
        ],
        "operationId": "getBillingTab",
        "summary": "Get billing tab",
        "description": "Retrieve the customer's **current billing tab** (the active tab that items are being added to).\n\nThe response includes:\n- `customer.customer_number`\n- `billing_tab.id` and `billing_tab.billing_date`\n- `items[]` with `billogram_item` data\n",
        "responses": {
          "200": {
            "$ref": "#/components/responses/BillingTabDetails"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/BillingTabNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/customer/{customer_no}/billing-tab/{billing_tab_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/CustomerNo"
        },
        {
          "$ref": "#/components/parameters/BillingTabId"
        }
      ],
      "get": {
        "tags": [
          "Billing Tab"
        ],
        "operationId": "getBillingTabById",
        "summary": "Get billing tab by ID",
        "description": "Retrieve a **specific billing tab** by its ID.\nThis is useful for accessing historical billing tabs that have been processed.\n",
        "responses": {
          "200": {
            "$ref": "#/components/responses/BillingTabDetails"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/BillingTabNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "delete": {
        "tags": [
          "Billing Tab"
        ],
        "operationId": "deleteBillingTab",
        "summary": "Delete billing tab",
        "description": "Delete a specific billing tab by its ID",
        "responses": {
          "204": {
            "description": "No Content. The billing tab was deleted successfully."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/BillingTabNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/customer/{customer_no}/billing-tab/{billing_tab_id}/run": {
      "parameters": [
        {
          "$ref": "#/components/parameters/CustomerNo"
        },
        {
          "$ref": "#/components/parameters/BillingTabId"
        }
      ],
      "post": {
        "tags": [
          "Billing Tab"
        ],
        "operationId": "runBillingTab",
        "summary": "Trigger billing tab run",
        "description": "Manually trigger billogram creation for a specific billing tab, instead of\nwaiting for its scheduled billing date.\n\nThe run is processed asynchronously; a **202** response confirms it was accepted.\n",
        "responses": {
          "202": {
            "description": "Accepted. The billing tab run has been queued for processing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "example": "accepted"
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "accepted": {
                    "summary": "Run accepted",
                    "value": {
                      "status": "OK",
                      "data": {
                        "status": "accepted"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/BillingTabNotFound"
          },
          "409": {
            "$ref": "#/components/responses/BillingTabRunConflict"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/customer/{customer_no}/billing-tab/items": {
      "parameters": [
        {
          "$ref": "#/components/parameters/CustomerNo"
        }
      ],
      "post": {
        "tags": [
          "Billing Tab"
        ],
        "operationId": "createBillingTabItem",
        "summary": "Create billing tab item",
        "description": "Add a new item to a customer's billing tab.\n\n### Idempotency (required)\nThis operation requires `X-API-Deduplication-ID` to prevent duplicate items if the request is retried.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/XApiDeduplicationId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillingTabItemCreateRequest"
              },
              "examples": {
                "subscriptionItem": {
                  "summary": "Add a subscription item",
                  "value": {
                    "billogram_item": {
                      "title": "Monthly subscription",
                      "description": "Premium plan subscription",
                      "price": 29.99,
                      "count": 1,
                      "unit": "month",
                      "vat": 25
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/BillingTabItemCreated"
          },
          "201": {
            "$ref": "#/components/responses/BillingTabItemCreated"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/BillingTabNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/customer/{customer_no}/billing-tab/item/{billing_tab_item_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/CustomerNo"
        },
        {
          "$ref": "#/components/parameters/BillingTabItemId"
        }
      ],
      "get": {
        "tags": [
          "Billing Tab"
        ],
        "operationId": "getBillingTabItem",
        "summary": "Get billing tab item",
        "description": "Retrieve a specific billing tab item by ID.\n\nThe API returns the item in its billing-tab context (customer + tab + items).\n",
        "responses": {
          "200": {
            "$ref": "#/components/responses/BillingTabDetails"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/BillingTabItemNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "delete": {
        "tags": [
          "Billing Tab"
        ],
        "operationId": "deleteBillingTabItem",
        "summary": "Delete billing tab item",
        "description": "Delete a specific billing tab item by ID.",
        "responses": {
          "204": {
            "description": "No Content. The billing tab item was deleted successfully."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/BillingTabItemNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/customer/{customer_no}/billing-tab/settings": {
      "parameters": [
        {
          "$ref": "#/components/parameters/CustomerNo"
        }
      ],
      "get": {
        "tags": [
          "Billing Tab"
        ],
        "operationId": "getBillingTabSettings",
        "summary": "Fetch billing tab settings",
        "description": "Retrieve customer-specific billing tab settings.",
        "responses": {
          "200": {
            "$ref": "#/components/responses/BillingTabSettings"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/BillingTabSettingsNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "tags": [
          "Billing Tab"
        ],
        "operationId": "addBillingTabSettings",
        "summary": "Add billing tab settings",
        "description": "Create or update customer-specific billing settings.\n\n### Rules\n- Provide at least one of `billing_frequency` or `delivery_method`.\n- Set fields to `null` to revert to creditor defaults.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillingTabSettingsRequest"
              },
              "examples": {
                "monthlyEmail": {
                  "summary": "Monthly (day 20) via Email",
                  "value": {
                    "billing_frequency": "monthly#20",
                    "delivery_method": "Email"
                  }
                },
                "revertToDefaults": {
                  "summary": "Revert to creditor defaults",
                  "value": {
                    "billing_frequency": null,
                    "delivery_method": null
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/BillingTabSettings"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/BillingTabSettingsNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "put": {
        "tags": [
          "Billing Tab"
        ],
        "operationId": "updateBillingTabSettings",
        "summary": "Update billing tab settings",
        "description": "Update customer-specific billing settings.\n\nSame rules as POST apply:\n- Provide at least one of `billing_frequency` or `delivery_method`.\n- Set fields to `null` to revert to creditor defaults.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillingTabSettingsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/BillingTabSettings"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/BillingTabSettingsNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "delete": {
        "tags": [
          "Billing Tab"
        ],
        "operationId": "deleteBillingTabSettings",
        "summary": "Delete customer settings",
        "description": "Delete customer-specific billing settings (so creditor defaults are used).",
        "responses": {
          "204": {
            "description": "No Content. Customer settings deleted successfully."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/BillingTabSettingsNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/item": {
      "post": {
        "operationId": "createItem",
        "summary": "Create a new item object",
        "description": "This call creates a new item object and returns the created object.\n\nThe item object to be created should be sent in the request body.\n",
        "tags": [
          "Item"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Item"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Item"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "get": {
        "operationId": "listItems",
        "summary": "List/search items",
        "description": "This fetches many item objects, filtered based on optional criteria.\n\nSearchable fields:\n- item_no\n- title\n- description\n- price\n- bookkeeping:income_account\n- bookkeeping:vat_account\n\nSpecial filters:\n- search: Perform a full text search across several fields at once\n\nOrderable fields:\n- item_no\n- title\n- price\n- created_at\n- updated_at\n",
        "tags": [
          "Item"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "The result page number to fetch. The first page has number 1 (one).",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "How many results to return per page. Setting this number too high may impact performance, we recommend values between 10 and 100.",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "filter_type",
            "in": "query",
            "description": "Type of filtering to perform",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "field",
                "field-prefix",
                "field-search",
                "special"
              ]
            }
          },
          {
            "name": "filter_field",
            "in": "query",
            "description": "Field to filter on when using field-based filtering. Searchable fields include item_no, title, description, price, bookkeeping:income_account, bookkeeping:vat_account.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter_value",
            "in": "query",
            "description": "Value to filter by when using field-based filtering",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order_field",
            "in": "query",
            "description": "Field to order results by. Orderable fields include item_no, title, price, created_at, updated_at.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order_direction",
            "in": "query",
            "description": "Direction to order results",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/ItemList"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/item/{item_no}": {
      "parameters": [
        {
          "name": "item_no",
          "in": "path",
          "description": "Item number identifier",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "operationId": "getItem",
        "summary": "Fetch a single item object",
        "description": "This fetches all data about a single item. The command is sent to the item object.\n",
        "tags": [
          "Item"
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Item"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/ItemNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "put": {
        "operationId": "updateItem",
        "summary": "Update an item object",
        "description": "This command changes an existing item. The command is sent to the item object to modify. This does not affect the item data on any billograms or invoices that reference the item, if the information needs to be updated on any existing billograms those must be updated individually afterwards.\n\nPartial item object, containing just the fields to update.\n\nIf the bookkeeping or regional_sweden fields are left out or set to null (instead of containing the structures) those sub-objects are left unchanged.\n\nOther fields that have default values will be set to their default value if they are specified as null in the passed structure.\n",
        "tags": [
          "Item"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Item"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Item"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/ItemNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "delete": {
        "operationId": "deleteItem",
        "summary": "Delete an item object",
        "description": "This removes an item from the database. The command is sent to the item object to delete. Any billograms or invoices that referenced the item object will have their references cut, but the item data in the billograms and invoices will be left as-is.\n",
        "tags": [
          "Item"
        ],
        "responses": {
          "200": {
            "description": "OK. The item was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "data": {
                      "type": "null",
                      "description": "Empty for delete operations."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/ItemNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/report": {
      "get": {
        "operationId": "listReports",
        "tags": [
          "Report"
        ],
        "summary": "Get multiple reports",
        "description": "Get multiple reports",
        "responses": {
          "200": {
            "description": "successful operation"
          }
        }
      }
    },
    "/report/{filename}": {
      "get": {
        "operationId": "getReport",
        "tags": [
          "Report"
        ],
        "summary": "Get specific report",
        "description": "Get specific reports",
        "responses": {
          "200": {
            "description": "successful operation"
          }
        },
        "parameters": [
          {
            "name": "filename",
            "in": "path",
            "description": "Report filename",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/settings": {
      "get": {
        "operationId": "getSettings",
        "summary": "Fetch settings",
        "description": "This fetches the current settings for the Billogram business account. \nIt can be used to fetch the current settings prior to creation of billograms.\n",
        "tags": [
          "Settings"
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Settings"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "put": {
        "operationId": "updateSettings",
        "summary": "Update settings",
        "description": "This changes the current settings for the Billogram business account.\n\nSub-structures that do not need modification can be left out of the object, or be set to `null`.\n",
        "tags": [
          "Settings"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Settings"
              },
              "examples": {
                "partialUpdate": {
                  "summary": "Partial update example",
                  "value": {
                    "contact": {
                      "email": "newemail@example.com"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Settings"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/payment_source": {
      "get": {
        "summary": "List payment sources for a customer",
        "description": "List payment sources for a customer",
        "tags": [
          "Payment Sources"
        ],
        "operationId": "listPaymentSources",
        "parameters": [
          {
            "name": "customer_no",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "The customer number."
          }
        ],
        "responses": {
          "200": {
            "description": "The listing was completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentSourceListResponse"
                }
              }
            }
          },
          "204": {
            "description": "Customer has no mandates"
          },
          "400": {
            "description": "Missing or invalid query parameters"
          },
          "404": {
            "$ref": "#/components/responses/CustomerNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/sepa_dd_mandate": {
      "post": {
        "summary": "Import SEPA Direct Debit mandate for a customer",
        "description": "Import SEPA Direct Debit mandate for a customer",
        "tags": [
          "Payment Sources"
        ],
        "operationId": "importSepaMandate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SepaMandateImport"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Mandate was imported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SepaMandateImportResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter or structure"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/sepa_dd_mandate/migrate": {
      "post": {
        "summary": "Migrate SEPA Direct Debit mandate for a customer",
        "description": "Registers a migrated SEPA Direct Debit mandate for a customer when moving\nfrom a previous creditor. The request carries the existing mandate details\nbeing amended under the `amendment` object; the response returns the\nidentifiers assigned by Billogram.\n\nThe migration is finalized when the first payment is initiated with this\nmigrated mandate.\n",
        "tags": [
          "Payment Sources"
        ],
        "operationId": "migrateSepaMandate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SepaMandateMigration"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Mandate was created with amendments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SepaMandateMigrationResponse"
                },
                "examples": {
                  "Success": {
                    "value": {
                      "status": "OK",
                      "data": {
                        "customer_no": 1,
                        "iban": "DE89370400440532013000",
                        "signed_date": "2023-02-01",
                        "sepa_creditor_identifier": "DE98ZZZ099999999",
                        "unique_mandate_reference": "87LBRXHD3XY6HM6CDD4L979FBW"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestSepaMandateMigrationResponse"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenSepaMandateMigration"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/payment_source/{id}/cancel": {
      "post": {
        "summary": "Cancel a payment source",
        "description": "Cancel a payment source",
        "tags": [
          "Payment Sources"
        ],
        "operationId": "cancelPaymentSource",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID of the payment source to cancel"
          }
        ],
        "responses": {
          "200": {
            "description": "The cancellation was completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentSourceCancellationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter or unsupported scheme"
          },
          "404": {
            "description": "Mandate does not exist"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/offer": {
      "post": {
        "operationId": "createOffer",
        "summary": "Create an offer",
        "description": "Creates a new offer and returns the created object.",
        "tags": [
          "Offer"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OfferCreateRequest"
              },
              "examples": {
                "banner": {
                  "summary": "Banner offer",
                  "value": {
                    "offer_id": "banner001",
                    "type": "banner",
                    "title": "Summer sale!",
                    "text": "30% on everything at Mike's Bike until September.",
                    "info_link": "http://example.com/",
                    "media": {
                      "picture": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==",
                      "picture_type": "image/png"
                    }
                  }
                },
                "sale": {
                  "summary": "Sale offer",
                  "value": {
                    "offer_id": "sale001",
                    "type": "sale",
                    "sale_type": "purchase",
                    "title": "Stay safe out there",
                    "text": "Get a helmet for free with your bike purchase.",
                    "detailed_title": "Stay safe while on the road",
                    "detailed_text": "We care about your safety. Whenever you purchase a new bike...",
                    "info_link": "http://example.com/",
                    "terms_link": "http://example.com/terms",
                    "invoice_within_days": 3,
                    "media": {
                      "picture": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==",
                      "picture_type": "image/png"
                    },
                    "item": {
                      "type": "physical",
                      "title": "Free bicycle helmet - black",
                      "price": 0,
                      "currency": "SEK",
                      "delivery_within_days": 4,
                      "recurring_cost_type": "none"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Offer"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "get": {
        "operationId": "listOffers",
        "summary": "List offers",
        "description": "Lists offers with pagination and optional filtering/ordering.\n\n**Note:** The `type` query parameter is required.\n",
        "tags": [
          "Offer"
        ],
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": true,
            "description": "Filter offers by type.",
            "schema": {
              "type": "string",
              "enum": [
                "banner",
                "sale"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "The result page number to fetch. The first page has number 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "description": "How many results to return per page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "filter_type",
            "in": "query",
            "required": false,
            "description": "Type of filtering to perform.",
            "schema": {
              "type": "string",
              "enum": [
                "field",
                "field-prefix",
                "field-search"
              ]
            }
          },
          {
            "name": "filter_field",
            "in": "query",
            "required": false,
            "description": "Field to filter on. Searchable fields include `offer_id` and `title`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter_value",
            "in": "query",
            "required": false,
            "description": "Value to filter by.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order_field",
            "in": "query",
            "required": false,
            "description": "Field to order results by. Orderable fields include `offer_id` and `title`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order_direction",
            "in": "query",
            "required": false,
            "description": "Direction to order results.",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/OfferList"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/offer/{offer_id}": {
      "get": {
        "operationId": "getOffer",
        "summary": "Fetch a single offer",
        "description": "Fetch a single offer by `offer_id`.",
        "tags": [
          "Offer"
        ],
        "parameters": [
          {
            "name": "offer_id",
            "in": "path",
            "required": true,
            "description": "Offer identifier.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Offer"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/OfferNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "put": {
        "operationId": "updateOffer",
        "summary": "Update an offer",
        "description": "Updates an offer. The request body is a **partial** offer object containing only fields to update.\n\n**Note:** If a `sale` offer has been accepted on one or more billograms, updating it is forbidden.\n",
        "tags": [
          "Offer"
        ],
        "parameters": [
          {
            "name": "offer_id",
            "in": "path",
            "required": true,
            "description": "Offer identifier.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OfferUpdateRequest"
              },
              "examples": {
                "updateTitle": {
                  "summary": "Update title",
                  "value": {
                    "title": "This is an updated title"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Offer"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/OfferNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "delete": {
        "operationId": "deleteOffer",
        "summary": "Delete an offer",
        "description": "Deletes an offer by `offer_id`.",
        "tags": [
          "Offer"
        ],
        "parameters": [
          {
            "name": "offer_id",
            "in": "path",
            "required": true,
            "description": "Offer identifier.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK. The offer was deleted successfully."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/OfferNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    }
  },
  "webhooks": {
    "BillogramEvent": {
      "post": {
        "operationId": "billogramEventCallback",
        "summary": "BillogramEvent Webhook",
        "description": "Webhook endpoint for receiving Billogram events.\n\nThis endpoint receives webhooks for various events related to Billogram operations. The request body contains event details including the event type and associated data.\n\nFor information about webhook response requirements, request headers, and signature verification, see the Webhooks tag description.\n\n## Event Types\n\nThis webhook can receive various event types. The event type is specified in the `event.type` field of the request body. Use the discriminator to determine which event schema applies.\n",
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillogramEventEnvelope"
              },
              "examples": {
                "AutogiroFailed": {
                  "$ref": "#/components/examples/AutogiroFailed"
                },
                "BillogramCreated": {
                  "$ref": "#/components/examples/BillogramCreated"
                },
                "BillogramEnded": {
                  "$ref": "#/components/examples/BillogramEnded"
                },
                "BillogramSent": {
                  "$ref": "#/components/examples/BillogramSent"
                },
                "Collection": {
                  "$ref": "#/components/examples/Collection"
                },
                "CollectionCancelled": {
                  "$ref": "#/components/examples/CollectionCancelled"
                },
                "CollectionEnded": {
                  "$ref": "#/components/examples/CollectionEnded"
                },
                "CollectionStatusUpdate": {
                  "$ref": "#/components/examples/CollectionStatusUpdate"
                },
                "ConfirmedLoss": {
                  "$ref": "#/components/examples/ConfirmedLoss"
                },
                "Credit": {
                  "$ref": "#/components/examples/Credit"
                },
                "CreditAllocated": {
                  "$ref": "#/components/examples/CreditAllocated"
                },
                "CreditCustomerLiability": {
                  "$ref": "#/components/examples/CreditCustomerLiability"
                },
                "CreditPayment": {
                  "$ref": "#/components/examples/CreditPayment"
                },
                "CreditorMessage": {
                  "$ref": "#/components/examples/CreditorMessage"
                },
                "CustomerLiabilityReduced": {
                  "$ref": "#/components/examples/CustomerLiabilityReduced"
                },
                "CustomerMessage": {
                  "$ref": "#/components/examples/CustomerMessage"
                },
                "DataChange": {
                  "$ref": "#/components/examples/DataChange"
                },
                "DeferredCommandFailed": {
                  "$ref": "#/components/examples/DeferredCommandFailed"
                },
                "Deleted": {
                  "$ref": "#/components/examples/Deleted"
                },
                "DeliveryAccepted": {
                  "$ref": "#/components/examples/DeliveryAccepted"
                },
                "DeliveryFailed": {
                  "$ref": "#/components/examples/DeliveryFailed"
                },
                "DeliverySmsFailed": {
                  "$ref": "#/components/examples/DeliverySmsFailed"
                },
                "EboxDeliveryDone": {
                  "$ref": "#/components/examples/EboxDeliveryDone"
                },
                "EDISent": {
                  "$ref": "#/components/examples/EDISent"
                },
                "EfakturaFailed": {
                  "$ref": "#/components/examples/EfakturaFailed"
                },
                "EfakturaSent": {
                  "$ref": "#/components/examples/EfakturaSent"
                },
                "EinvoiceDeliveryDone": {
                  "$ref": "#/components/examples/EinvoiceDeliveryDone"
                },
                "EinvoiceDeliveryFailed": {
                  "$ref": "#/components/examples/EinvoiceDeliveryFailed"
                },
                "EmailNotAccepted": {
                  "$ref": "#/components/examples/EmailNotAccepted"
                },
                "InvoiceCreationFailed": {
                  "$ref": "#/components/examples/InvoiceCreationFailed"
                },
                "InvoiceSent": {
                  "$ref": "#/components/examples/InvoiceSent"
                },
                "ItemProcessingFailed": {
                  "$ref": "#/components/examples/ItemProcessingFailed"
                },
                "ItemProcessingSuccessful": {
                  "$ref": "#/components/examples/ItemProcessingSuccessful"
                },
                "LetterSent": {
                  "$ref": "#/components/examples/LetterSent"
                },
                "NewInvoicePDF": {
                  "$ref": "#/components/examples/NewInvoicePDF"
                },
                "Overdue": {
                  "$ref": "#/components/examples/Overdue"
                },
                "OverpaymentAdjustment": {
                  "$ref": "#/components/examples/OverpaymentAdjustment"
                },
                "OverpaymentCustomerLiability": {
                  "$ref": "#/components/examples/OverpaymentCustomerLiability"
                },
                "Payment": {
                  "$ref": "#/components/examples/Payment"
                },
                "PaymentFailed": {
                  "$ref": "#/components/examples/PaymentFailed"
                },
                "PaymentScheduled": {
                  "$ref": "#/components/examples/PaymentScheduled"
                },
                "PaymentSystemCancelled": {
                  "$ref": "#/components/examples/PaymentSystemCancelled"
                },
                "PaymentSystemUpdated": {
                  "$ref": "#/components/examples/PaymentSystemUpdated"
                },
                "PaymentUserCancelled": {
                  "$ref": "#/components/examples/PaymentUserCancelled"
                },
                "PaymentUserUpdated": {
                  "$ref": "#/components/examples/PaymentUserUpdated"
                },
                "PurchaseAccepted": {
                  "$ref": "#/components/examples/PurchaseAccepted"
                },
                "PurchaseRejected": {
                  "$ref": "#/components/examples/PurchaseRejected"
                },
                "PurchaseFullySettled": {
                  "$ref": "#/components/examples/PurchaseFullySettled"
                },
                "RefundBankDetailsRequired": {
                  "$ref": "#/components/examples/RefundBankDetailsRequired"
                },
                "RefundConfirmed": {
                  "$ref": "#/components/examples/RefundConfirmed"
                },
                "SelfServiceRefundAvailable": {
                  "$ref": "#/components/examples/SelfServiceRefundAvailable"
                },
                "SelfServiceRefundCancelled": {
                  "$ref": "#/components/examples/SelfServiceRefundCancelled"
                },
                "SelfServiceRefundClaimed": {
                  "$ref": "#/components/examples/SelfServiceRefundClaimed"
                },
                "ReminderSent": {
                  "$ref": "#/components/examples/ReminderSent"
                },
                "Resent": {
                  "$ref": "#/components/examples/Resent"
                },
                "Respite": {
                  "$ref": "#/components/examples/Respite"
                },
                "RespiteRemoved": {
                  "$ref": "#/components/examples/RespiteRemoved"
                },
                "RevertWritedown": {
                  "$ref": "#/components/examples/RevertWritedown"
                },
                "SaleAccepted": {
                  "$ref": "#/components/examples/SaleAccepted"
                },
                "SmsNotAccepted": {
                  "$ref": "#/components/examples/SmsNotAccepted"
                },
                "SoftReminderSent": {
                  "$ref": "#/components/examples/SoftReminderSent"
                },
                "TaxReportingFailed": {
                  "$ref": "#/components/examples/TaxReportingFailed"
                },
                "UnderpaymentSettlement": {
                  "$ref": "#/components/examples/UnderpaymentSettlement"
                },
                "Writedown": {
                  "$ref": "#/components/examples/Writedown"
                },
                "Writeoff": {
                  "$ref": "#/components/examples/Writeoff"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/WebhookSuccess"
          }
        }
      }
    },
    "RecipientUpdated": {
      "post": {
        "operationId": "recipientUpdatedCallback",
        "summary": "RecipientUpdated Webhook",
        "description": "Webhook endpoint for receiving customer/recipient update events.\n\nThis endpoint receives webhooks when a customer verifies their email or changes their recurring payment method. \n\nIf you would like to start receiving this type of callback, please contact Billogram support.\n",
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecipientUpdatedEnvelope"
              },
              "examples": {
                "RecipientUpdated": {
                  "$ref": "#/components/examples/RecipientUpdated"
                },
                "RecipientUpdatedRecurringPaymentEnabled": {
                  "$ref": "#/components/examples/RecipientUpdatedRecurringPaymentEnabled"
                },
                "RecipientUpdatedRecurringPaymentDisabled": {
                  "$ref": "#/components/examples/RecipientUpdatedRecurringPaymentDisabled"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/WebhookSuccess"
          }
        }
      }
    },
    "PaymentRecalled": {
      "post": {
        "operationId": "paymentRecalledCallback",
        "summary": "PaymentRecalled Webhook",
        "description": "Webhook endpoint for receiving recalled payment events.\n\nThis endpoint receives webhooks for negative allocation based on funds recalled from payment. \nA POST request is sent to the specified callback URL.\n",
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentRecalledEnvelope"
              },
              "examples": {
                "PaymentRecalled": {
                  "$ref": "#/components/examples/PaymentRecalled"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/WebhookSuccess"
          }
        }
      }
    },
    "EinvoiceRegistrationCreated": {
      "post": {
        "operationId": "einvoiceRegistrationCreatedCallback",
        "summary": "EinvoiceRegistrationCreated Webhook",
        "description": "Webhook endpoint for receiving E-invoice registration created events.\n\nThis event is triggered when a recipient successfully registered for receiving E-invoices. After receiving this callback, it is advised that the `Einvoice` delivery method is used.\n",
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EinvoiceRegistrationCreatedEnvelope"
              },
              "examples": {
                "EinvoiceRegistrationCreated": {
                  "$ref": "#/components/examples/EinvoiceRegistrationCreated"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/WebhookSuccess"
          }
        }
      }
    },
    "EinvoiceRegistrationDeleted": {
      "post": {
        "operationId": "einvoiceRegistrationDeletedCallback",
        "summary": "EinvoiceRegistrationDeleted Webhook",
        "description": "Webhook endpoint for receiving E-invoice registration deleted events.\n\nThis event is triggered when a recipient successfully deregistered from receiving E-invoices. \nUnless followed by a new registration, new e-invoice delivery requests will be blocked.\n",
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EinvoiceRegistrationDeletedEnvelope"
              },
              "examples": {
                "EinvoiceRegistrationDeleted": {
                  "$ref": "#/components/examples/EinvoiceRegistrationDeleted"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/WebhookSuccess"
          }
        }
      }
    },
    "EinvoiceRegistrationIdentificationMismatch": {
      "post": {
        "operationId": "einvoiceRegistrationIdentificationMismatchCallback",
        "summary": "EinvoiceRegistrationIdentificationMismatch Webhook",
        "description": "Webhook endpoint for receiving E-invoice registration identification mismatch events.\n\n**Markets:** Finland\n\nThis event is triggered when a recipient tries to register for E-invoices, but the provided second identifier does not match the one stored with Billogram. When this event happens, the recipient themselves get no feedback from the banks. The action is also blocked, meaning no action is taken by the Billogram system other than sending the callback.\n\nFor the Finnish market, the second identifier is the personal identity code.\n\nThe two-factor verification exists to prevent incorrect registrations.\n",
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EinvoiceRegistrationIdentificationMismatchEnvelope"
              },
              "examples": {
                "EinvoiceRegistrationIdentificationMismatch": {
                  "$ref": "#/components/examples/EinvoiceRegistrationIdentificationMismatch"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/WebhookSuccess"
          }
        }
      }
    },
    "EinvoiceRegistrationRecipientNotFound": {
      "post": {
        "operationId": "einvoiceRegistrationRecipientNotFoundCallback",
        "summary": "EinvoiceRegistrationRecipientNotFound Webhook",
        "description": "Webhook endpoint for receiving E-invoice registration recipient not found events.\n\n**Markets:** Finland\n\nThis event is triggered when a registration event (add, change or delete) has occurred, \nbut our system could not understand which recipient to match it towards. \nThis probably means that the recipient entered an incorrect customer number in their bank. \nThe registration event is discarded.\n",
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EinvoiceRegistrationRecipientNotFoundEnvelope"
              },
              "examples": {
                "EinvoiceRegistrationRecipientNotFound": {
                  "$ref": "#/components/examples/EinvoiceRegistrationRecipientNotFound"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/WebhookSuccess"
          }
        }
      }
    },
    "BillingTab": {
      "post": {
        "operationId": "billingTabCallback",
        "summary": "BillingTab Webhook",
        "description": "Webhook endpoint for receiving billing tab events.\n\nThis endpoint receives webhooks sent by the billing tab service. \nThe webhook contains information about the failure, including error details and billing tab information.\n",
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillingTabEnvelope"
              },
              "examples": {
                "BillingTab": {
                  "$ref": "#/components/examples/BillingTab"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/WebhookSuccess"
          }
        }
      }
    },
    "InvoicePdfLayoutAdjusted": {
      "post": {
        "operationId": "invoicePdfLayoutAdjustedCallback",
        "summary": "InvoicePdfLayoutAdjusted Webhook",
        "description": "Webhook endpoint for receiving invoice PDF layout adjustment events.\n\nThis event is triggered when adjustments are made to a default layout of an invoice PDF while it is being created.\n",
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoicePdfLayoutAdjustedEnvelope"
              },
              "examples": {
                "InvoicePdfLayoutAdjusted": {
                  "$ref": "#/components/examples/InvoicePdfLayoutAdjusted"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/WebhookSuccess"
          }
        }
      }
    },
    "EfakturaRegistration": {
      "post": {
        "operationId": "efakturaRegistrationCallback",
        "summary": "EfakturaRegistration Webhook",
        "description": "Webhook endpoint for receiving E-faktura registration events.\n\n**Deprecated:** This section is about E-faktura in Sweden. For other markets but Sweden, see E-invoice registration callbacks.\n\nWhen a recipient has registered or deregistered for E-faktura a callback POST request is sent to the specified callback URL. \nThis request will occur instantly with the `registration_type` field set to `Registration` or `Deregistration`. \nDuring the night, another request will be sent with the field `registration_type` set to `ForwardedEfakturaRegistration` that will include an EFA file with all registrations that have happened during the day.\n",
        "deprecated": true,
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EfakturaRegistrationEnvelope"
              },
              "examples": {
                "Registration": {
                  "$ref": "#/components/examples/EfakturaRegistrationRegistration"
                },
                "Deregistration": {
                  "$ref": "#/components/examples/EfakturaRegistrationDeregistration"
                },
                "ForwardedEfakturaRegistration": {
                  "$ref": "#/components/examples/EfakturaRegistrationForwarded"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/WebhookSuccess"
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "BillogramId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "Billogram ID",
        "schema": {
          "type": "string"
        }
      },
      "CustomerNo": {
        "name": "customer_no",
        "in": "path",
        "required": true,
        "description": "Customer number.\n\n- Must be numeric (digits only)\n",
        "schema": {
          "type": "integer",
          "minimum": 1
        },
        "example": 1
      },
      "BillingTabId": {
        "name": "billing_tab_id",
        "in": "path",
        "required": true,
        "description": "Billing tab identifier (UUID).",
        "schema": {
          "type": "string",
          "format": "uuid"
        },
        "example": "550e8400-e29b-41d4-a716-446655440000"
      },
      "BillingTabItemId": {
        "name": "billing_tab_item_id",
        "in": "path",
        "required": true,
        "description": "Billing tab item identifier (UUID).",
        "schema": {
          "type": "string",
          "format": "uuid"
        },
        "example": "ab5f6c9a-3b86-43d5-8fb6-69a9eec2fb39"
      },
      "XApiDeduplicationId": {
        "name": "X-API-Deduplication-ID",
        "in": "header",
        "required": true,
        "description": "Deduplication (idempotency) key used to prevent duplicate processing when the request is retried.\n\n**Best practices**\n- Use a UUID (or stable request identifier, eg timestamp-based identifier)\n- Reuse the same value for retries of the same logical operation\n",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 36
        },
        "example": "550e8400-e29b-41d4-a716-446655440000"
      }
    },
    "schemas": {
      "CompactBillogram": {
        "type": "object",
        "x-scalar-ignore": true,
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique ID for the billogram object. This ID is automatically generated when the billogram is first created, and can not be controlled by the application. The ID is the canonical way to refer to the billogram object through the API. Currently the ID is a string of 7 alpha-numeric characters (case-sensitive), but the length of the field may be extended in the future.",
            "examples": [
              "2kAEEjE"
            ]
          },
          "invoice_no": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2100000000,
            "description": "When creating a billogram, this controls the invoice number used for the first invoice sent by the billogram. If the field is left out (or null) an automatic sequential number will be generated.           On already sent billogram objects this is the number of the latest valid invoice in the billogram. If changes are made to the billogram after sending it and this requires generating a new initial invoice, the invoice_no of the billogram will update to reflect this. The invoice_no parameter works a bit different when searching or querying for multiple billogram."
          },
          "ocr_number": {
            "type": "string",
            "maxLength": 25,
            "description": "The OCR number used to identify payable invoices on the billogram. This is printed on the giro slip attached to printed invoices allowing electronic payments to register correctly. This is a unique value."
          },
          "creditor_unique_value": {
            "type": "string",
            "maxLength": 40,
            "description": "When creating a billogram, this field can be set to ensure that the same unique value cannot be used when creating another billogram later on. Use this value to send in your order number, your own invoice number or any other unique reference to avoid creating the same invoice twice by mistake. The field needs to be a case insensitive string or numeric value, and will return null if left out. Available characters are a-z, A-Z, 0-9, space and/or any of the following: ,.;:/()[]&%!#^'\"*+=?_<>-"
          },
          "customer": {
            "$ref": "#/components/schemas/BillogramCustomer"
          },
          "invoice_date": {
            "type": "string",
            "format": "date",
            "description": "The original invoice date printed on the invoices. If specified, must be a string containing an ISO 8601 format date."
          },
          "due_date": {
            "type": "string",
            "format": "date",
            "description": "Due date of the invoice. If specified, must be a string containing an ISO 8601 format date, and must be later than invoice_date. The Billogram service may perform additional checks to ensure legal requirements are fulfilled. There is no need to set both due_date and due_days."
          },
          "currency": {
            "type": "string",
            "enum": [
              "SEK",
              "NOK",
              "DKK",
              "EUR",
              "USD",
              "CNY",
              "RUB",
              "TRY"
            ],
            "description": "Currency the invoice is billed in. Its value is enforced by the registration country of the creditor."
          },
          "state": {
            "type": "string",
            "description": "Current state of the billogram."
          },
          "flags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Array of flag strings describing various details of the current state of the billogram."
          },
          "remaining_sum": {
            "type": "number",
            "description": "Amount left to be paid by the customer, given in the invoicing currency, including the calculated VAT. This value is calculated automatically."
          },
          "total_sum": {
            "type": "number",
            "description": "The total amount the customer has been ordered to pay, given in the invoicing currency, including the calculated VAT. This value is calculated automatically."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp the billogram object was first created at, automatically generated. Given as a date-time string in UTC."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp the billogram object was last modified at, automatically generated. Given as a date-time string in UTC."
          }
        }
      },
      "Billogram": {
        "type": "object",
        "x-scalar-ignore": true,
        "properties": {
          "id": {
            "type": "string",
            "readOnly": true,
            "description": "The unique ID for the billogram object. This ID is automatically generated when the billogram is first created, and can not be controlled by the application. The ID is the canonical way to refer to the billogram object through the API. Currently the ID is a string of 7 alpha-numeric characters (case-sensitive), but the length of the field may be extended in the future.",
            "examples": [
              "2kAEEjE"
            ]
          },
          "invoice_no": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2100000000,
            "description": "When creating a billogram, this controls the invoice number used for the first invoice sent by the billogram. If the field is left out (or null) an automatic sequential number will be generated.           On already sent billogram objects this is the number of the latest valid invoice in the billogram. If changes are made to the billogram after sending it and this requires generating a new initial invoice, the invoice_no of the billogram will update to reflect this. The invoice_no parameter works a bit different when searching or querying for multiple billogram.\n\n**Peppol:** BT-1 Invoice number.\n"
          },
          "ocr_number": {
            "type": "string",
            "maxLength": 25,
            "description": "The OCR number used to identify payable invoices on the billogram. This is printed on the giro slip attached to printed invoices allowing electronic payments to register correctly. This is a unique value.\n\n**Note:** This field is normally auto-generated and read-only.\nIt can only be set manually if your account has the specific\n'manual OCR' setting enabled by Billogram support.\nOtherwise, providing this value will result in a READ_ONLY_PARAMETER error.\n"
          },
          "payment_references": {
            "readOnly": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentReferences"
              }
            ]
          },
          "creditor_unique_value": {
            "type": "string",
            "maxLength": 40,
            "description": "When creating a billogram, this field can be set to ensure that the same unique value cannot be used when creating another billogram later on. Use this value to send in your order number, your own invoice number or any other unique reference to avoid creating the same invoice twice by mistake. The field needs to be a case insensitive string or numeric value, and will return null if left out. Available characters are a-z, A-Z, 0-9, space and/or any of the following: ,.;:/()[]&%!#^'\"*+=?_<>-"
          },
          "customer": {
            "$ref": "#/components/schemas/BillogramCustomer"
          },
          "items": {
            "description": "Array of the items that are being invoiced for.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BillogramItem"
            }
          },
          "invoice_date": {
            "type": "string",
            "format": "date",
            "description": "The original invoice date printed on the invoices. If specified, must be a string containing an ISO 8601 format date.\n\n**Peppol:** BT-2 Invoice issue date.\n"
          },
          "due_date": {
            "type": "string",
            "format": "date",
            "description": "Due date of the invoice. If specified, must be a string containing an ISO 8601 format date, and must be later than invoice_date. The Billogram service may perform additional checks to ensure legal requirements are fulfilled. There is no need to set both due_date and due_days.\n\n**Peppol:** BT-9 Payment due date.\n"
          },
          "due_days": {
            "type": "integer",
            "description": "Due days of the invoice. If specified, must be a positive integer. The due_date will be set automatically depending on invoice_date and due_days so there is no need to set both due_date and due_days.",
            "minimum": 1,
            "default": 30
          },
          "reminder_due_days": {
            "type": "integer",
            "description": "Due days for the reminders. If specified, must be a positive integer.",
            "minimum": 1
          },
          "respite_date": {
            "type": "string",
            "format": "date",
            "description": "The date until which a respite has been set if the creditor has approved that the payer is allowed to pay after the due date without triggering reminders or debt collection until specified date. The respite_date may only be set by using the respite command."
          },
          "invoice_fee": {
            "type": "number",
            "description": "Extra service fee to be added to the invoice. Specified in the invoicing currency, VAT exclusive. Will be printed on the invoice as an additional item line.\n\n**Peppol:** Sent as an extra invoice line (BT-146 Item net price).\n"
          },
          "invoice_fee_vat": {
            "type": "number",
            "description": "VAT rate for the invoice fee. If left as null (recommended), a VAT percentage calculation will be applied instead, in accordance with Swedish law."
          },
          "reminder_fee": {
            "type": "number",
            "description": "Fee added to the invoiced amount whenever the next late payment reminder is sent. Specified in the invoicing currency. Reminder fee for the next reminder will only be applied if no reminders has yet been sent for the billogram or if the already applied reminder fee for a sent reminder is 0 (for example if the billogram has been recently changed since the latest reminder or if the reminder fees has been written-off)."
          },
          "interest_rate": {
            "type": "number",
            "description": "Yearly interest rate accrued if the invoice is not paid by the due date. Interest is calculated daily for each day over the due date (or at least 30 days after invoice_date). The interest rate must be specified in per cent, not the decimal rate. (E.g. you specify 8.5 for an 8.5 % interest rate, not 0.085.)",
            "examples": [
              8.5
            ]
          },
          "interest_fee": {
            "type": "number",
            "readOnly": true,
            "description": "The calculated interest added to the invoice to date, based on the interest_rate. Given in the invoicing currency."
          },
          "currency": {
            "type": "string",
            "enum": [
              "SEK",
              "NOK",
              "DKK",
              "EUR",
              "USD",
              "CNY",
              "RUB",
              "TRY"
            ],
            "description": "Currency the invoice is billed in. Its value is enforced by the registration country of the creditor."
          },
          "info": {
            "$ref": "#/components/schemas/BillogramInfo"
          },
          "regional_sweden": {
            "$ref": "#/components/schemas/BillogramSweden"
          },
          "delivery_method": {
            "type": "string",
            "readOnly": true,
            "enum": [
              "Email+Letter",
              "Email",
              "SMS+Letter",
              "SMS",
              "Letter",
              "Efaktura",
              "Einvoice",
              "EDI",
              "DoNotNotify"
            ],
            "description": "The last method used to deliver an invoice to the customer. The value of the field can be changed only after the billogram has been sent and can be set only to Email, SMS or Letter."
          },
          "state": {
            "type": "string",
            "readOnly": true,
            "description": "Current state of the billogram."
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "format": "url",
            "readOnly": true,
            "description": "**Deprecated:** Will be removed in future versions; fetch this link from the `BillogramSent` webhook event instead.\n\nURL to the web version of the billogram. This is almost the same URL that is sent to the customer_email (though, in this URL we're excluding the accept-pin that is being sent in the email) when sending the billogram as email. This value may be null. This value is null if the invoice has not yet been sent, or the invoice has been sold. Please note that if you're sending a billogram with email, give out this URL and the recipient who then uses this URL instead of the one in the email, the billogram will not be marked as read (since they need to click the link in the email for proper delivery accept). Because of this we recommend against using it if delivery method is set to Email+Letter or SMS+Letter.\n"
          },
          "recipient_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "url",
            "readOnly": true,
            "description": "**Deprecated:** Will be removed in future versions; fetch this link from the `BillogramSent` webhook event instead.\n\nURL to the web version of the billogram. This is the same URL that is sent to the customer_email when sending the billogram as email, SMS or electronic invoice. This value may be null. This value is null if the invoice has not yet been sent, or the invoice has been sold. Please note that this URL should be used if you are building something where the recipient will access their invoices (such as a list on My Pages or an alternative delivery method) so that the invoice gets the proper Opened state. Do NOT use this for anything where your organisation might access it as it will interfere with the state of the billogram. In that case, use the url property instead.\n"
          },
          "recipient_overview_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "url",
            "readOnly": true,
            "description": "**Deprecated:** Will be removed in future versions; fetch this link from the `BillogramSent` webhook event instead.\n\nURL of the overview of the web version, where a recipient can view all open invoices. This value may be null if the invoice has not yet been sent, or the invoice has been sold.\n"
          },
          "flags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "readOnly": true,
            "description": "Array of flag strings describing various details of the current state of the billogram."
          },
          "events": {
            "type": "array",
            "readOnly": true,
            "description": "Array with the event history of the billogram. Only the latest 100 events will be returned. If you have a billogram with lots of changes and history you can query the billogram_event resource for more events.",
            "items": {
              "$ref": "#/components/schemas/BillogramEvent"
            }
          },
          "remaining_sum": {
            "type": "number",
            "readOnly": true,
            "description": "Amount left to be paid by the customer, given in the invoicing currency, including the calculated VAT. This value is calculated automatically."
          },
          "total_sum": {
            "type": "number",
            "readOnly": true,
            "description": "The total amount the customer has been ordered to pay, given in the invoicing currency, including the calculated VAT. This value is calculated automatically."
          },
          "rounding_value": {
            "type": "number",
            "readOnly": true,
            "description": "Amount added or subtracted from the total invoice sum to round it to a whole number, given in the invoicing currency. This may be null if rounding was not performed on the billogram."
          },
          "automatic_reminders": {
            "type": "boolean",
            "description": "Whether to use automatic reminders or not for this billogram. Uses automatic_reminders_settings if specified, otherwise uses business account's settings. If set to false no automatic reminders at all will be sent for this billogram.",
            "default": true
          },
          "automatic_reminders_settings": {
            "description": "Set of late payment reminders to use for this billogram. If this parameter is submitted it will default automatic_reminders to a true value, unless automatic_reminders is sent in the same request. If set to empty array [] it forces automatic_reminders to be set as false regardless of what was specified in the request data. If set to null business account's default settings are used for this billogram.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AutomaticReminderData"
            }
          },
          "reminder_count": {
            "type": "integer",
            "readOnly": true,
            "description": "The number of reminders that has been sent for the billogram."
          },
          "created_at": {
            "type": "string",
            "readOnly": true,
            "format": "date-time",
            "description": "Timestamp the billogram object was first created at, automatically generated. Given as a date-time string in UTC."
          },
          "attested_at": {
            "type": "string",
            "readOnly": true,
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "description": "Time the billogram was originally attested (sent), this may be null if the billogram has been created but not attested yet. Given as a date-time string in UTC in the format \"YYYY-MM-DD HH:MM:SS\"."
          },
          "updated_at": {
            "type": "string",
            "readOnly": true,
            "format": "date-time",
            "description": "Timestamp the billogram object was last modified at, automatically generated. Given as a date-time string in UTC."
          },
          "callbacks": {
            "$ref": "#/components/schemas/Callbacks"
          },
          "detailed_sums": {
            "allOf": [
              {
                "type": "object",
                "readOnly": true
              },
              {
                "$ref": "#/components/schemas/DetailedSums"
              }
            ]
          },
          "attachment": {
            "type": "string",
            "description": "The name of the file attached to the billogram. This value is null if no attachment is found."
          },
          "attachment_content": {
            "type": "string",
            "format": "byte",
            "description": "Base64 encoded content of the attachment file. Used when uploading attachments via API."
          },
          "reference_invoice_no": {
            "type": "string",
            "description": "Invoice number of the original invoice being credited or referenced.\nUse the original invoice's real invoice number, not an internal\nreference.\n\nUsed for stand-alone credit invoices (not linked to another Billogram) and\nself-billing credit invoices.\n\n**Rules:**\n* Required when sending a stand-alone credit on a French-market creditor.\n  The send is rejected with \"Reference invoice number is required for\n  stand-alone credits\" if this field is missing.\n* Required when `self_billing_invoice.type` is `credit`.\n* For linked credits (created via the credit command on an existing billogram),\n  the reference is resolved automatically from the source invoice.\n\n**Peppol:** BT-25 Preceding invoice reference (credit invoices)."
          },
          "reference_invoice_date": {
            "type": "string",
            "format": "date",
            "description": "Date of the original invoice being credited or referenced, as an ISO 8601 date (`YYYY-MM-DD`).\n\nOptional. Not required when creating or sending a stand-alone credit.\nIncluded in electronic invoice distribution when a stand-alone credit is sent.\n\n**Peppol:** BT-26 Preceding invoice issue date (credit invoices)."
          },
          "reversed_vat": {
            "type": "boolean",
            "description": "Indicates whether VAT is reversed for this billogram. When true, the VAT liability is reversed to the customer.\n\n**Peppol:** VAT category code `AE` (BT-151) on every invoice line.\n"
          },
          "reversed_vat_reason": {
            "type": "string",
            "description": "Reason code or description for the reversed VAT."
          },
          "reversed_vat_reason_reference": {
            "type": "string",
            "description": "Reference number or identifier associated with the reversed VAT reason."
          },
          "automatic_collection": {
            "$ref": "#/components/schemas/AutomaticCollection"
          },
          "contract": {
            "$ref": "#/components/schemas/Contract"
          },
          "self_billing_invoice": {
            "$ref": "#/components/schemas/SelfBillingInvoice"
          },
          "offer_invoice_info": {
            "$ref": "#/components/schemas/OfferInvoiceInfo"
          },
          "dunning": {
            "$ref": "#/components/schemas/Dunning"
          },
          "show_item_gross_price": {
            "type": "boolean",
            "deprecated": true,
            "description": "Display item prices as gross values instead of net value. Cannot be changed after invoice has been attested."
          },
          "pdf": {
            "type": "object",
            "description": "Invoice PDF template settings.",
            "properties": {
              "template": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "unified",
                      "classic",
                      "modern"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "slip_style": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "normal",
                      "minimal"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Style setting for the payment slip attached to the invoice PDF. Can be omitted (null), \"normal\", or \"minimal\"."
              }
            }
          },
          "offers": {
            "type": "array",
            "description": "Offers attached to the billogram/invoice.\n\n**Rules:**\n- Maximum 2 offers.\n- Order matters (shown left-to-right in the UI).\n",
            "maxItems": 2,
            "items": {
              "$ref": "#/components/schemas/OfferReference"
            }
          },
          "on_success": {
            "$ref": "#/components/schemas/BillogramOnSuccess"
          },
          "registered_payments": {
            "$ref": "#/components/schemas/RegisteredPayments"
          },
          "return_data": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "compact"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Controls the response format. If set to \"compact\",  the response will return a CompactBillogram object instead of the full Billogram object.  If omitted or null, the full Billogram object is returned."
          }
        },
        "required": [
          "customer",
          "items"
        ]
      },
      "BillogramCustomer": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Specifies the customer that is being invoiced",
        "properties": {
          "customer_no": {
            "type": "integer",
            "description": "Customer number of the recipient of the billogram. This field is required when creating a billogram, and becomes read-only after the billogram object has been created. (It is not possible to change which customer a billogram was sent to.)"
          },
          "org_no": {
            "type": "string",
            "description": "Organisational or personal number of the customer, depending on the customer type.\n\n**Peppol:** BT-47 Buyer legal registration identifier. Not required for EDI delivery in Germany. If set, it is sent as BT-47; don't use a placeholder.\n"
          },
          "name": {
            "type": "string",
            "description": "Name of the customer, business name or person name, depending on the customer type.\n\n**Peppol:** BT-44 Buyer name.\n"
          },
          "email": {
            "type": "string",
            "maxLength": 200,
            "format": "email",
            "description": "E-mail address of the customer."
          },
          "vat_no": {
            "type": "string",
            "description": "European VAT-registration number of the customer.\n\n**Peppol:** BT-48 Buyer VAT identifier.\n"
          },
          "phone": {
            "type": "string",
            "maxLength": 30,
            "description": "Phone number of the customer. Used when delivering invoices via SMS.\n\nAccepted formats:\n- Local format with a leading zero (e.g. `0701740635`): the country code is derived automatically from the customer's country setting.\n- International E.164 format with a leading `+` (e.g. `+46701740635`): explicit and required.\n\n**Peppol:** BT-57 Buyer contact telephone number.\n",
            "example": "+46701740635"
          },
          "address": {
            "$ref": "#/components/schemas/CustomerAddress"
          },
          "delivery_address": {
            "$ref": "#/components/schemas/CustomerDeliveryAddress"
          },
          "permanent_establishment_address": {
            "$ref": "#/components/schemas/CustomerPermanentEstablishmentAddress"
          },
          "edi": {
            "$ref": "#/components/schemas/EDI"
          }
        },
        "required": [
          "customer_no"
        ]
      },
      "BillogramItem": {
        "type": "object",
        "x-scalar-ignore": true,
        "properties": {
          "item_no": {
            "type": "string",
            "description": "Number of the item.\n\n**Peppol:** BT-155 Item Seller's identifier.\n"
          },
          "count": {
            "type": "number",
            "description": "The number (amount) of the item that is being invoiced.\n\n**Peppol:** BT-129 Invoiced quantity.\n"
          },
          "title": {
            "type": "string",
            "maxLength": 100,
            "description": "Primary (short) name for the item being invoiced.\n\n**Peppol:** BT-153 Item name.\n"
          },
          "description": {
            "type": "string",
            "maxLength": 200,
            "description": "Free-form description text for the item being invoiced.\n\n**Peppol:** BT-154 Item description.\n"
          },
          "unit": {
            "type": "string",
            "description": "Unit of measure for the item.\n\n**Peppol:** BT-130 Invoiced quantity unit of measure.\n"
          },
          "price": {
            "type": "number",
            "description": "Cost per unit of the item.\n\n**Peppol:** BT-146 Item net price.\n"
          },
          "vat": {
            "type": "number",
            "description": "VAT rate for the item being invoiced.\n\n**Peppol:** BT-152 Invoiced item VAT rate.\n"
          },
          "zero_vat_reason": {
            "$ref": "#/components/schemas/ZeroVatReason"
          },
          "zero_vat_reason_reference": {
            "$ref": "#/components/schemas/ZeroVatReasonReference"
          },
          "discount": {
            "type": "number",
            "description": "Discount to be applied to the total (ex. VAT) sum for the item, given in the invoicing currency.\n\n**Peppol:** BT-136 Invoice line allowance amount.\n"
          },
          "start_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Start date for the item period (e.g., subscription start date). If specified, must be a string containing an ISO 8601 format date.\n\n**Peppol:** BT-134 Invoice line period start date.\n"
          },
          "end_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "End date for the item period (e.g., subscription end date). If specified, must be a string containing an ISO 8601 format date.\n\n**Peppol:** BT-135 Invoice line period end date.\n"
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "External identifier for the item, used for integration with external systems."
          },
          "bookkeeping": {
            "$ref": "#/components/schemas/BookkeepingInformation"
          },
          "regional_sweden": {
            "$ref": "#/components/schemas/ItemSweden"
          }
        }
      },
      "BookkeepingInformation": {
        "type": "object",
        "x-scalar-ignore": true,
        "properties": {
          "income_account": {
            "type": "string",
            "description": "Account number for payments received for this item."
          },
          "vat_account": {
            "type": "string",
            "description": "Account number for VAT payments received for this item."
          },
          "objects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BookkeepingObjects"
            }
          }
        }
      },
      "BookkeepingObjects": {
        "type": "object",
        "x-scalar-ignore": true,
        "properties": {
          "dimension_id": {
            "type": "number",
            "description": "Dimension for your object, the values 1-19 may be used, but are reserved for standardized dimensions."
          },
          "object_id": {
            "type": "string",
            "description": "An identifier for this object."
          },
          "dimension_name": {
            "type": "string",
            "description": "A description for the dimension_id."
          },
          "object_name": {
            "type": "string",
            "description": "A description for the object_id."
          }
        }
      },
      "ItemSweden": {
        "type": "object",
        "x-scalar-ignore": true,
        "properties": {
          "rotavdrag": {
            "type": "boolean"
          },
          "electricity_collection": {
            "$ref": "#/components/schemas/SwedenElectricityCollection"
          }
        }
      },
      "SwedenElectricityCollection": {
        "type": "object",
        "x-scalar-ignore": true,
        "properties": {
          "kommunkod": {
            "type": "integer",
            "description": "Municipality (Kommun) code."
          },
          "naringsidkare": {
            "type": "boolean",
            "description": "Customer is a business owner (Näringsidkare)."
          },
          "avflyttad": {
            "type": "boolean",
            "description": "Customer is moved out (Avflyttad)."
          },
          "avflyttad_datum": {
            "type": "string",
            "format": "date",
            "description": "Date of move out (Avflyttad, datum)."
          },
          "frankopplad": {
            "type": "boolean",
            "description": "Customer is disconnected (Frånkopplad)."
          },
          "frankopplad_datum": {
            "type": "string",
            "format": "date",
            "description": "Date of disconnect (Frånkopplad, datum)."
          },
          "anladr": {
            "type": "string",
            "description": "Facility address (Anläggningsadress)."
          },
          "natom": {
            "type": "string",
            "description": "Grid area (Nätområde)."
          },
          "arsforb": {
            "type": "integer",
            "description": "Yearly consumption (Årsförbrukning)."
          },
          "anlid": {
            "type": "string",
            "description": "Facility ID (Anläggnings-ID)."
          },
          "kravmall": {
            "type": "string",
            "description": "Claim template (Kravmall)."
          },
          "plombkod": {
            "type": "string",
            "description": "Seal code (Plombkod)."
          },
          "slutfaktura": {
            "type": "boolean",
            "description": "Ending invoice (Slutfaktura)."
          },
          "objtyp": {
            "type": "integer",
            "description": "Type of object (Objektstyp). Valid values are \"1\" (Lägenhet/Villa utan eluppvärmning), \"2\" (Villa med eluppvärmning) or \"3\" (Övrigt)."
          },
          "faktforb": {
            "type": "number",
            "description": "Consumption on invoice (Förbrukning på faktura) specified in kWh."
          },
          "faktfrek": {
            "type": "integer",
            "description": "Frequency of invoicing (Fakturafrekvens) in months. If you would send invoices every month the value would be 1. For bi-monthly the value would be 2. Quarterly is 3, etc."
          },
          "nyttighet": {
            "type": "string",
            "enum": [
              "EL",
              "EH",
              "EN",
              "FV",
              "GA",
              "VA",
              "RH",
              "YY"
            ],
            "description": "Commodity (Nyttighet)."
          }
        }
      },
      "BillogramInfo": {
        "description": "Contains additional information about the business errand invoiced for. Will be printed on the invoice. This data is purely informational to the customer and does not affect the invoicing logic.",
        "type": "object",
        "x-scalar-ignore": true,
        "properties": {
          "order_no": {
            "type": "string",
            "description": "Order number reference, for e.g. refrencing an order made in another system.\n\n**Peppol:** BT-13 Purchase order reference.\n"
          },
          "order_date": {
            "type": "string",
            "format": "date",
            "description": "Date the order for the invoiced items was placed."
          },
          "our_reference": {
            "type": "string"
          },
          "your_reference": {
            "description": "**Peppol:** BT-10 Buyer reference when `customer.edi.reference` is empty, and BT-56 Buyer contact point.\n",
            "type": "string"
          },
          "shipping_date": {
            "type": "string",
            "description": "Date the items invoiced were sent to the customer."
          },
          "delivery_date": {
            "type": "string",
            "description": "Date the items invoiced were delivered to the customer."
          },
          "reference_number": {
            "description": "**Peppol:** BT-19 Buyer accounting reference.\n",
            "type": "string"
          },
          "footer_text": {
            "description": "**Peppol:** BT-22 Invoice note (appended).\n",
            "type": "string"
          },
          "message": {
            "type": "string",
            "description": "Free-form long message that will be printed on the invoice.\n\n**Peppol:** BT-22 Invoice note, unless `customer.edi.note` is set.\n"
          }
        }
      },
      "BillogramCreditCommand": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Command to credit a billogram.",
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "full",
              "items"
            ],
            "description": "Credit mode. Use 'full' to credit the entire invoice, or 'items' to \ncredit specific line items.\n\n**Note:** Legacy modes (amount, remaining, etc.) are deprecated \nand excluded from this specification."
          },
          "items": {
            "type": "array",
            "description": "Required when mode is 'items'. A list of items to credit.  Can include existing items (matched by item_no) or new arbitrary items.",
            "items": {
              "$ref": "#/components/schemas/BillogramCreditItem"
            }
          },
          "method": {
            "type": "string",
            "enum": [
              "Email",
              "SMS",
              "Letter",
              "Email+Letter",
              "SMS+Letter",
              "Einvoice",
              "EDI",
              "DoNotNotify"
            ],
            "description": "Delivery method for the credit invoice. The available methods differ\nbetween markets. If left out, the same method as the original invoice\nwill be used.\n\n**Availability by market:**\n\n| Market | Methods |\n|---|---|\n| Austria | Email, SMS, Letter |\n| Belgium | Email, SMS, Letter |\n| Finland | Email, SMS, Letter, Einvoice, DoNotNotify, EDI |\n| France | Email, SMS, Letter |\n| Germany | Email, SMS, Letter |\n| Italy | Email, SMS, Letter, Einvoice |\n| The Netherlands | Email, SMS, Letter |\n| Norway | Email, SMS, Letter, Einvoice, DoNotNotify, EDI |\n| Spain | Email, SMS, Letter |\n| Sweden | Email, SMS, Letter, Einvoice, EDI, DoNotNotify |"
          }
        },
        "required": [
          "mode"
        ]
      },
      "BillogramCreditItem": {
        "description": "Represents an item to be credited with runtime conditional validation.  If 'item_no' links to an existing invoice line or registry item, fields:  'title', 'price', 'vat', and 'unit' are optional (inherited).  Otherwise (for arbitrary or new items), these fields are mandatory.  The 'count' field is strictly required and must be negative.",
        "x-scalar-ignore": true,
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramItem"
          },
          {
            "type": "object",
            "properties": {
              "count": {
                "type": "number",
                "maximum": 0,
                "exclusiveMaximum": 0,
                "description": "The quantity to credit. **Must be a negative value.** (e.g., -1)."
              }
            },
            "required": [
              "count"
            ]
          }
        ]
      },
      "PaymentCommand": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Command to register a manual payment on a billogram.",
        "properties": {
          "amount": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": 0,
            "description": "The size of the payment to register, given in the invoicing currency. Must be greater than zero."
          },
          "payment_date": {
            "type": "string",
            "format": "date",
            "description": "The date of the payment to register. Must not be a date in the future; this constraint is validated server-side at request processing time. If not specified, today's date will be used."
          }
        },
        "required": [
          "amount"
        ]
      },
      "WriteoffCommand": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Command to write off remaining overdue charges from a billogram.",
        "properties": {
          "allow_unpaid": {
            "type": "boolean",
            "description": "Set to true to allow this command to proceed even if there is a principal amount left to pay on the billogram."
          }
        }
      },
      "MessageCommand": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Command to add a message to the billogram conversation.",
        "properties": {
          "message": {
            "type": "string",
            "description": "Free-form string, the message to add to the billogram's conversation."
          }
        },
        "required": [
          "message"
        ]
      },
      "AttachCommand": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Command to attach a PDF file to a billogram.",
        "properties": {
          "filename": {
            "type": "string",
            "description": "The filename of the attached file, for example \"example.pdf\"."
          },
          "content": {
            "type": "string",
            "format": "byte",
            "description": "The content (base64 encoded) of the PDF file to attach."
          }
        },
        "required": [
          "filename",
          "content"
        ]
      },
      "CreditAllocateCommand": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Command to allocate a stand-alone credit invoice to a debit invoice.",
        "properties": {
          "amount": {
            "type": "number",
            "description": "The amount that should be allocated."
          },
          "source_id": {
            "type": "string",
            "description": "The ID of the billogram from which the amount should be allocated."
          }
        },
        "required": [
          "amount",
          "source_id"
        ]
      },
      "CreditPaymentCommand": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Command to register a payment on a stand-alone credit invoice.",
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "remaining",
              "amount"
            ],
            "description": "Payment mode. Use 'remaining' to register the full remaining amount, or 'amount' to specify a custom amount."
          },
          "amount": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": 0,
            "description": "Only required when mode is 'amount'. The size of the payment to register, given in the invoicing currency. Must be greater than zero."
          }
        },
        "required": [
          "mode"
        ]
      },
      "RegisteredPayments": {
        "type": "object",
        "x-scalar-ignore": true,
        "writeOnly": true,
        "description": "Allows you to automatically register any payments that are made for the billogram at the time of its creation.\nThis is not allowed on stand-alone credits. Requires that the feature is activated on the Billogram business account,\ncontact Billogram support for more information.\n\nOnly allowed on POST request and `on_success` command `send` is required to register the payment.\n",
        "properties": {
          "payments": {
            "type": "array",
            "description": "A list of payments that have been registered for the billogram.",
            "items": {
              "$ref": "#/components/schemas/RegisteredPaymentItem"
            }
          }
        },
        "required": [
          "payments"
        ]
      },
      "RegisteredPaymentItem": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/RegisteredPaymentManual"
          },
          {
            "$ref": "#/components/schemas/RegisteredPaymentCheckout"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "MANUAL_PAYMENT": "#/components/schemas/RegisteredPaymentManual",
            "CHECKOUT_PAYMENT": "#/components/schemas/RegisteredPaymentCheckout"
          }
        },
        "x-scalar-ignore": true
      },
      "RegisteredPaymentManual": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Manual payment, i.e. cash payment.",
        "required": [
          "type",
          "payment_amount"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "MANUAL_PAYMENT"
            ],
            "description": "Type of payment."
          },
          "payment_amount": {
            "type": "number",
            "description": "The amount of the payment."
          },
          "payment_date": {
            "type": "string",
            "format": "date",
            "description": "The date when the payment was made. Can't be a date in the future.\nDefaults to current date if omitted.\n\nThis functionality is only available for you if you have the possibility to request bookkeeping reports on-demand.\nFor you that have automatically created bookkeeping reports generated by Billogram once per month,\nthis functionality is not supported.\n"
          }
        }
      },
      "RegisteredPaymentCheckout": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Payment for a checkout order.",
        "required": [
          "type",
          "payment_reference"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "CHECKOUT_PAYMENT"
            ],
            "description": "Type of payment."
          },
          "payment_reference": {
            "type": "string",
            "format": "uuid",
            "description": "Identifier for the payment."
          }
        }
      },
      "BillogramOnSuccess": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Commands that will be executed on successful billogram creation. Only available on POST requests.",
        "properties": {
          "command": {
            "type": "string",
            "enum": [
              "send"
            ],
            "description": "Command to run after successful billogram creation."
          },
          "method": {
            "type": "string",
            "enum": [
              "Email+Letter",
              "Email",
              "SMS+Letter",
              "SMS",
              "Letter",
              "Efaktura",
              "Einvoice",
              "EDI",
              "DoNotNotify"
            ],
            "description": "Delivery method. Only available for the send command.\n\n**Deprecation Notice:** The value 'Efaktura' is deprecated. \nPlease use 'Einvoice' or other methods as appropriate."
          }
        }
      },
      "AutomaticCollection": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Automatic collection settings for this billogram. If set up, the billogram will be automatically sent to collection if still unpaid after a set amount of days since due date / last reminder. Requires a collection agreement.",
        "properties": {
          "delay_days": {
            "type": "integer",
            "description": "Must be an integer greater than one. Number of business days since due date / last reminder invoices are to be automatically sent to collection."
          },
          "amount": {
            "type": "number",
            "minimum": 50,
            "description": "The minimum unpaid amount an invoice should have in order to be automatically sent to collection."
          },
          "use_default_settings": {
            "type": "boolean",
            "description": "If set to true default company settings will be used for this billogram and value for delay_days and amount can be omitted."
          }
        }
      },
      "Contract": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Contract settings associated with the billogram.",
        "properties": {
          "start_date": {
            "type": "string",
            "format": "date",
            "description": "Start date of the contract period."
          },
          "end_date": {
            "type": "string",
            "format": "date",
            "description": "End date of the contract period."
          }
        }
      },
      "SelfBillingInvoice": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Self-billing invoice information. Used when the customer issues the invoice on behalf of the supplier.",
        "properties": {
          "type": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "credit",
                  "debit"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Type of self-billing invoice. \n\n**Rules:**\n* If omitted or `null`, this object is ignored.\n* If set to `debit` or `credit`, `serial_number` becomes **required**.\n* If set to `credit`, the root field `reference_invoice_no` becomes **required**.\n* When `type` is `credit`, you may also set `reference_invoice_date` on the billogram root."
          },
          "serial_number": {
            "type": "string",
            "description": "Serial number of the self-billing invoice.  **Required** if `type` is set to `credit` or `debit`."
          }
        }
      },
      "OfferInvoiceInfo": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Information related to offer or quotation invoices.",
        "properties": {
          "message": {
            "type": "string",
            "maxLength": 150,
            "description": "Message or notes related to the offer invoice."
          },
          "asset_id": {
            "type": "string",
            "description": "Identifier for the asset associated with this invoice."
          }
        }
      },
      "Dunning": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Dunning (debt collection) settings and information for the billogram.",
        "properties": {
          "requested_segment": {
            "type": "string",
            "maxLength": 64,
            "description": "The name of the custom dunning segment to use."
          }
        }
      },
      "BillogramSweden": {
        "description": "Contains special options available under Swedish law.",
        "type": "object",
        "x-scalar-ignore": true,
        "properties": {
          "rotavdrag": {
            "type": "number",
            "description": "Amount to deduct from the invoiced amount under ROT/RUT deduction rules, given in the invoicing currency. The exact rules for these deductions are outside the scope of this documentation."
          },
          "rotavdrag_personal_number": {
            "type": "string",
            "description": "Swedish personal number of the individual eligible for the tax deduction."
          },
          "rotavdrag_description": {
            "type": "string",
            "description": "Description of services invoiced for which the deduction is based on."
          },
          "rotavdrag_description_of_property": {
            "type": "string",
            "description": "Description of property for deduction."
          },
          "rotavdrag_apartment_designation": {
            "type": "string",
            "description": "Apartment designation for deduction."
          },
          "rotavdrag_housing_association_org_no": {
            "type": "string",
            "description": "Housing association org. no. for deduction."
          },
          "reversed_vat": {
            "type": "boolean",
            "deprecated": true,
            "description": "Whether to use Swedish reversed VAT payment rules for this invoice."
          },
          "autogiro_betalarnummer": {
            "type": "string",
            "description": "The ID number that identifies the payer in the Autogiro system. It follows BGC format (numeric, max 16 characters)."
          },
          "autogiro_payment_date": {
            "type": "string",
            "format": "date",
            "description": "Date on which the due amount is going to be withdrawn from payer's account."
          },
          "autogiro_status": {
            "type": "string",
            "description": "Current status of the Autogiro payment for the Billogram. Will be null if autogiro is disabled. If enabled, status can be any of the following statuses unattested, scheduled, processing, successful or failed"
          },
          "autogiro_full_status": {
            "type": "string",
            "description": "Extra information in case autogiro_status is failed"
          },
          "autogiro_total_sum": {
            "type": "number",
            "description": "Amount to be withdrawn from payer's account."
          },
          "efaktura_recipient_identifier": {
            "type": "string",
            "deprecated": true,
            "description": "E-faktura recipient identifier, sometimes referred to as the FMI (fakturamottagaridentitet). Should be in the format YYYYMMDDXXXX.BANK.SE for individuals or individual companies or 00XXXXXXXXXX.BANK.SE for companies with organization number (06XXXXXXXXXX.SBF.SE for companies using Swedbank) where 'BANK' would be replaced by the bank_code. You may either submit this value or a combination of efaktura_recipient_type, efaktura_recipient_bank_name, efaktura_recipient_bank_id, efaktura_recipient_bank_code, efaktura_recipient_id_number. The remaining values will be calculated automatically. We recommend users to either only submit the efaktura_recipient_identifier or both efaktura_recipient_id_number + efaktura_recipient_bank_code to avoid errors."
          },
          "efaktura_recipient_type": {
            "type": "string",
            "enum": [
              "individual",
              "company"
            ],
            "deprecated": true,
            "description": "E-faktura recipient type, whether the recipient is an individual or a company."
          },
          "efaktura_recipient_bank_name": {
            "type": "string",
            "enum": [
              "Danske Bank",
              "SEB",
              "Handelsbanken",
              "Skandiabanken",
              "Swedbank",
              "Nordea",
              "Länsförsäkringar bank",
              "ICA banken",
              "Sparbanken Syd",
              "Ålandsbanken",
              "Marginalen Bank",
              "Svea Bank"
            ],
            "deprecated": true,
            "description": "E-faktura recipient's fully qualified bank name."
          },
          "efaktura_recipient_bank_id": {
            "type": "integer",
            "deprecated": true,
            "description": "E-faktura recipient's bank's internal ID, may differ if the recipient is an individual or a company. The numeric bank ID is used in some E-faktura formats (for example BGCInvoice)."
          },
          "efaktura_recipient_bank_code": {
            "type": "string",
            "enum": [
              "OEB",
              "SEB",
              "SHB",
              "SKB",
              "FSPA",
              "NB",
              "LFB",
              "ICA",
              "SYD",
              "AAB",
              "MARG",
              "SVEA",
              "DBF",
              "SEBF",
              "SHBF",
              "NBF",
              "SBF",
              "SVEF",
              "LFBF"
            ],
            "deprecated": true,
            "description": "E-faktura recipient's bank's internal code, may differ if the recipient is an individual or a company."
          },
          "efaktura_recipient_id_number": {
            "type": "string",
            "deprecated": true,
            "description": "E-faktura recipient's ID number or organization number. (Recommended 12 digits for individuals or individual companies, 10 digits for companies)"
          },
          "efaktura_requested_amount": {
            "type": "number",
            "deprecated": true,
            "description": "The default amount to be paid when an E-faktura is viewed in the recipients internet bank (the amount can always be changed by the recipient though). If left as null (recommended) the invoice's amount to be paid will be the default specified amount. This value may not be changed after the E-faktura has been sent to the recipient."
          },
          "electricity_collection": {
            "deprecated": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SwedenElectricityCollection"
              }
            ]
          },
          "edi": {
            "deprecated": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/EDI"
              }
            ]
          }
        }
      },
      "EDIOperator": {
        "type": "string",
        "x-scalar-ignore": true,
        "description": "EDI operator or interchange partner code for the recipient. It must be one of the enumerated values below.\n\nThe available values vary by market:\n\n**Finland:** `maventa`, `apixmessagingoy`, `baswareoyj`, `oposuuskunta`, `opuscapitasolutionsoy`, `opentextoy`, `cgisuomioy`, `pagerooy`, `nordea`, `danskebankassuomensivuliike`, `handelsbanken`, `netboxfinlandoy`, `omasaastopankkioyj`, `poppankki`, `ropocapitaloy`, `postnordstralforsoy`, `teliafinlandoyj`, `aktiapankkioyj`, `tietoevryoyj`, `alandpostab`, `postimessagingoy`, `saastopankit`, `inexchangefactorumab`, `crediflowab`, `alandsbankenabp`, `comarch`, `spankki`, `expertsystems`\n\n**Sweden:** `peppol`, `addett`, `basware`, `cgi`, `crediflow`, `ebuilder`, `edisolutions`, `evenex`, `expertsystems`, `fakturaportalen`, `handelsbanken`, `highjump`, `husera`, `inexchange`, `itella`, `kmd`, `logica`, `logiq`, `ob10`, `opuscapita`, `pagero`, `palette`, `posten`, `postnord`, `prihandel`, `proceedo`, `readsoft`, `scancloud`, `seb`, `stralfors`, `swedbank`, `swedsess`, `tieto`, `tungsten`, `visma`\n\n**Norway:** `peppol`\n",
        "enum": [
          "addett",
          "aktiapankkioyj",
          "alandpostab",
          "alandsbankenabp",
          "apixmessagingoy",
          "basware",
          "baswareoyj",
          "cgi",
          "cgisuomioy",
          "comarch",
          "crediflow",
          "crediflowab",
          "danskebankassuomensivuliike",
          "ebuilder",
          "edisolutions",
          "evenex",
          "expertsystems",
          "fakturaportalen",
          "handelsbanken",
          "highjump",
          "husera",
          "inexchange",
          "inexchangefactorumab",
          "itella",
          "kmd",
          "logica",
          "logiq",
          "maventa",
          "netboxfinlandoy",
          "nordea",
          "ob10",
          "omasaastopankkioyj",
          "opentextoy",
          "oposuuskunta",
          "opuscapita",
          "opuscapitasolutionsoy",
          "pagero",
          "pagerooy",
          "palette",
          "peppol",
          "poppankki",
          "posten",
          "postimessagingoy",
          "postnord",
          "postnordstralforsoy",
          "prihandel",
          "proceedo",
          "readsoft",
          "ropocapitaloy",
          "saastopankit",
          "scancloud",
          "seb",
          "spankki",
          "stralfors",
          "swedbank",
          "swedsess",
          "teliafinlandoyj",
          "tieto",
          "tietoevryoyj",
          "tungsten",
          "visma"
        ]
      },
      "EDI": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "operator"
        ],
        "properties": {
          "electronic_id": {
            "type": "integer",
            "description": "The electronic ID of the customer. Often a GLN or organization number. Must be between 10 and 17 digits.\n\n**Peppol:** BT-49 Buyer electronic address.\n"
          },
          "operator": {
            "$ref": "#/components/schemas/EDIOperator"
          },
          "subtype": {
            "type": "string",
            "description": "Providing a subtype is no longer required.",
            "deprecated": true
          },
          "reference": {
            "type": "string",
            "maxLength": 100,
            "description": "The reference for the EDI invoice.\n\n**Peppol:** BT-10 Buyer reference.\n"
          },
          "note": {
            "type": "string",
            "maxLength": 5000,
            "description": "A free text field with unstructured information, used for the \"note\" field on EDI invoices. If not provided, the billogram \"message\" field will be used as note.\n\n**Peppol:** BT-22 Invoice note, replacing `info.message`.\n"
          }
        }
      },
      "BillogramEventEnvelope": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "event"
        ],
        "properties": {
          "billogram": {
            "$ref": "#/components/schemas/BillogramCallbackEvent",
            "description": "The billogram object associated with this event."
          },
          "event": {
            "$ref": "#/components/schemas/BillogramEvent",
            "description": "The event details, including the event type and event-specific data."
          },
          "callback_id": {
            "type": "string",
            "description": "Unique identifier for this callback/webhook delivery."
          },
          "callback_timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the callback was sent. Given as a date-time string in UTC."
          },
          "callback_type": {
            "type": "string",
            "const": "BillogramEvent",
            "description": "The type of callback. e.g., \"BillogramEvent\" for billogram event webhooks."
          },
          "custom": {
            "type": [
              "string",
              "null"
            ],
            "description": "Custom value that was included when setting up the callback."
          },
          "signature": {
            "type": [
              "string",
              "null"
            ],
            "deprecated": true,
            "description": "Deprecated and Replaced by header signature. Will be removed in future versions."
          }
        }
      },
      "PaymentReferences": {
        "type": [
          "object",
          "null"
        ],
        "description": "Payment references for the billogram.",
        "properties": {
          "OCR": {
            "type": "string",
            "description": "The OCR payment reference number. Swedish specific reference."
          },
          "SWEDISH_INTERNATIONAL": {
            "type": "string",
            "description": "The Swedish international payment reference number."
          },
          "FINNISH": {
            "type": "string",
            "description": "The Finnish payment reference number."
          },
          "KID": {
            "type": "string",
            "description": "The Norwegian payment reference number."
          },
          "SEPA_RF": {
            "type": "string",
            "description": "The SEPA payment reference number, used for SEPA Credit Transfers."
          }
        },
        "additionalProperties": false,
        "example": {
          "OCR": "354650015568458",
          "SWEDISH_INTERNATIONAL": "14354650015568458"
        }
      },
      "BillogramCallbackEvent": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Simplified billogram object sent in webhook callbacks. Contains a subset of billogram properties relevant for webhook events.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique ID for the billogram object."
          },
          "ocr_number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The OCR number used to identify payable invoices on the billogram. Swedish specific reference."
          },
          "payment_references": {
            "$ref": "#/components/schemas/PaymentReferences"
          },
          "state": {
            "type": "string",
            "description": "Current state of the billogram."
          },
          "remaining_sum": {
            "type": "number",
            "description": "Amount left to be paid by the customer"
          },
          "total_sum": {
            "type": "number",
            "description": "The total amount the customer has been ordered to pay"
          },
          "attested_at": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "description": "Time the billogram was originally attested, this may be null if the billogram has been created but not attested yet. Given as a date-time string in UTC in the format \"YYYY-MM-DD HH:MM:SS\"."
          },
          "detailed_sums": {
            "$ref": "#/components/schemas/DetailedSums"
          },
          "regional_sweden": {
            "type": "object",
            "description": "Regional Sweden-specific data.",
            "properties": {
              "rotavdrag_sum": {
                "type": "number",
                "description": "Amount deducted from the invoiced amount under ROT/RUT deduction rules."
              }
            },
            "additionalProperties": false
          },
          "creditor_unique_value": {
            "type": "string",
            "description": "Unique value that was set when creating the billogram to prevent duplicate creation."
          }
        },
        "additionalProperties": false
      },
      "RecipientUpdatedEnvelope": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "callback_id",
          "callback_timestamp",
          "callback_type",
          "customer"
        ],
        "properties": {
          "callback_id": {
            "type": "string",
            "description": "Unique identifier generated for each callback."
          },
          "callback_timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "An ISO 8601 compliant timestamp for the callback."
          },
          "callback_type": {
            "type": "string",
            "const": "RecipientUpdated",
            "description": "The type of callback. Value is \"RecipientUpdated\" for customer callback events."
          },
          "customer": {
            "$ref": "#/components/schemas/RecipientUpdatedCustomer"
          }
        }
      },
      "RecipientUpdatedCustomer": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "customer_number"
        ],
        "properties": {
          "customer_number": {
            "type": "integer",
            "description": "Customer number of the recipient of the billogram. Always included in the customer data."
          },
          "updated_email": {
            "type": "string",
            "description": "Email address submitted and verified by the recipient. Included when recipient has verified their email address."
          },
          "recurring_payment_enabled": {
            "type": "boolean",
            "description": "Recurring payments have been enabled or disabled. \nIncluded when recipient's recurring payment settings have changed.\n"
          },
          "recurring_payment_type": {
            "type": "string",
            "description": "The type of the recurring payment that has been updated. \nIncluded when recipient's recurring payment settings have changed. \n",
            "enum": [
              "se_autogiro",
              "no_avtalegiro",
              "bnp_sepa",
              "card"
            ]
          }
        }
      },
      "PaymentRecalledEnvelope": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "callback_id",
          "callback_timestamp",
          "callback_type",
          "payment_recall"
        ],
        "properties": {
          "callback_id": {
            "type": "string",
            "description": "Unique identifier generated for each callback."
          },
          "callback_timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "An ISO 8601 compliant timestamp for the callback."
          },
          "callback_type": {
            "type": "string",
            "const": "PaymentRecalled",
            "description": "The type of callback. Value is \"PaymentRecalled\" for payment recall events."
          },
          "payment_recall": {
            "$ref": "#/components/schemas/PaymentRecall"
          }
        }
      },
      "PaymentRecall": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "incoming_payment_id",
          "executed_on",
          "message",
          "payables",
          "total_amount",
          "fee",
          "payment_schema"
        ],
        "properties": {
          "incoming_payment_id": {
            "type": "string",
            "description": "Unique id for incoming payment"
          },
          "executed_on": {
            "type": "string",
            "format": "date",
            "description": "Containing an ISO 8601 format date. Example value: \"2013-11-14\""
          },
          "message": {
            "type": "string",
            "description": "Message why payment was recalled. Example: \"Refund Request By End Customer\""
          },
          "payables": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentRecallPayable"
            }
          },
          "total_amount": {
            "type": "number",
            "description": "The total amount recalled"
          },
          "fee": {
            "type": "number",
            "description": "Fee added by bank to the recalled payment"
          },
          "raw_details": {
            "type": "object",
            "description": "Raw details from the payment system",
            "properties": {
              "payment_schema": {
                "type": "object",
                "properties": {
                  "sepa": {
                    "type": "object",
                    "properties": {
                      "r_transaction": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "description": "R_transactions code. Example: MD06"
                          },
                          "message": {
                            "type": "string",
                            "description": "Message associated with r_transaction. Example: \"Refund Request By End Customer\""
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "payment_schema": {
            "type": "object",
            "required": [
              "code"
            ],
            "properties": {
              "code": {
                "type": "string",
                "description": "Payment schema used. Example: SEPA_DIRECT_DEBIT",
                "enum": [
                  "SEPA_DIRECT_DEBIT"
                ]
              }
            }
          }
        }
      },
      "PaymentRecallPayable": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "Billogram",
            "description": "Type of payable"
          },
          "billogram": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Billogram Id"
              },
              "remaining_amount": {
                "type": "number",
                "description": "Remaining sum of the billogram"
              },
              "state": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "State billogram is in. Example: \"Unpaid\""
              },
              "invoice_no": {
                "type": "integer",
                "description": "Invoice number"
              },
              "event": {
                "type": "object",
                "description": "A JSON object with event data",
                "properties": {
                  "type": {
                    "type": "string"
                  },
                  "event_uuid": {
                    "type": "string",
                    "description": "Unique identifier for the event",
                    "format": "uuid"
                  },
                  "created_at": {
                    "type": "string",
                    "description": "Timestamp the event was created at. \nGiven as a date-time string in UTC in the format \"YYYY-MM-DD HH:MM:SS\".\n"
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "recalled_amount": {
                        "type": "number",
                        "description": "The amount recalled"
                      },
                      "related_payment_event_uuids": {
                        "type": "array",
                        "description": "Unique identifiers for related payment events",
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "EinvoiceRegistrationCreatedEnvelope": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "callback_id",
          "callback_timestamp",
          "callback_type",
          "recipient_information"
        ],
        "properties": {
          "callback_id": {
            "type": "string",
            "description": "Unique identifier generated for each callback."
          },
          "callback_timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "An ISO 8601 compliant timestamp for the callback."
          },
          "callback_type": {
            "type": "string",
            "const": "EinvoiceRegistrationCreated",
            "description": "The type of callback. Value is \"EinvoiceRegistrationCreated\" for a successful e-invoice registration callback."
          },
          "recipient_information": {
            "$ref": "#/components/schemas/EinvoiceRecipientInformation"
          }
        }
      },
      "EinvoiceRegistrationDeletedEnvelope": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "callback_id",
          "callback_timestamp",
          "callback_type",
          "recipient_information"
        ],
        "properties": {
          "callback_id": {
            "type": "string",
            "description": "Unique identifier generated for each callback."
          },
          "callback_timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "An ISO 8601 compliant timestamp for the callback."
          },
          "callback_type": {
            "type": "string",
            "const": "EinvoiceRegistrationDeleted",
            "description": "The type of callback. Value is \"EinvoiceRegistrationDeleted\" for a successful e-invoice registration deletion callback."
          },
          "recipient_information": {
            "$ref": "#/components/schemas/EinvoiceRecipientInformation"
          }
        }
      },
      "EinvoiceRegistrationIdentificationMismatchEnvelope": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "callback_id",
          "callback_timestamp",
          "callback_type",
          "recipient_information"
        ],
        "properties": {
          "callback_id": {
            "type": "string",
            "description": "Unique identifier generated for each callback."
          },
          "callback_timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "An ISO 8601 compliant timestamp for the callback."
          },
          "callback_type": {
            "type": "string",
            "const": "EinvoiceRegistrationIdentificationMismatch",
            "description": "The type of callback. Value is \"EinvoiceRegistrationIdentificationMismatch\" for an e-invoice registration identification mismatch callback."
          },
          "recipient_information": {
            "$ref": "#/components/schemas/EinvoiceRecipientInformationIdentificationMismatch"
          }
        }
      },
      "EinvoiceRegistrationRecipientNotFoundEnvelope": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "callback_id",
          "callback_timestamp",
          "callback_type",
          "recipient_information"
        ],
        "properties": {
          "callback_id": {
            "type": "string",
            "description": "Unique identifier generated for each callback."
          },
          "callback_timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "An ISO 8601 compliant timestamp for the callback."
          },
          "callback_type": {
            "type": "string",
            "const": "EinvoiceRegistrationRecipientNotFound",
            "description": "The type of callback. Value is \"EinvoiceRegistrationRecipientNotFound\" for an e-invoice registration recipient not found callback."
          },
          "recipient_information": {
            "$ref": "#/components/schemas/EinvoiceRecipientInformationRecipientNotFound"
          }
        }
      },
      "EinvoiceRecipientInformation": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "customer_number"
        ],
        "properties": {
          "customer_number": {
            "type": "string",
            "description": "The customer number as entered by the customer."
          }
        }
      },
      "EinvoiceRecipientInformationIdentificationMismatch": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "customer_number",
          "operation",
          "existing_personal_identification_number",
          "new_personal_identification_number"
        ],
        "properties": {
          "customer_number": {
            "type": "string",
            "description": "The customer number as entered by the customer."
          },
          "operation": {
            "type": "string",
            "enum": [
              "ADD",
              "CHANGE"
            ],
            "description": "Either \"ADD\" or \"CHANGE\". Describes during which registration action the mismatch occurred."
          },
          "existing_personal_identification_number": {
            "type": "string",
            "description": "The personal identity code stored on the Billogram customer card."
          },
          "new_personal_identification_number": {
            "type": "string",
            "description": "The personal identity code as provided by the recipient in their bank."
          }
        }
      },
      "EinvoiceRecipientInformationRecipientNotFound": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "customer_number",
          "operation",
          "personal_identification_number",
          "electronic_invoicing_address"
        ],
        "properties": {
          "customer_number": {
            "type": "string",
            "description": "The customer number as entered by the customer."
          },
          "operation": {
            "type": "string",
            "enum": [
              "ADD",
              "CHANGE",
              "DELETE"
            ],
            "description": "Either \"ADD\", \"CHANGE\" or \"DELETE\". Describes during which registration action the mismatch occurred."
          },
          "personal_identification_number": {
            "type": "string",
            "description": "The personal identity code as provided by the recipient in their bank."
          },
          "electronic_invoicing_address": {
            "type": "string",
            "description": "The electronic invoicing address."
          }
        }
      },
      "BillingTabEnvelope": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "callback_id",
          "callback_timestamp",
          "callback_type",
          "billing_tab",
          "event"
        ],
        "properties": {
          "callback_id": {
            "type": "string",
            "description": "Unique identifier generated for each callback."
          },
          "callback_timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "An ISO 8601 compliant timestamp for the callback."
          },
          "callback_type": {
            "type": "string",
            "const": "BillingTab",
            "description": "The type of callback. Value is \"BillingTab\" for billing tab callbacks."
          },
          "billing_tab": {
            "$ref": "#/components/schemas/BillingTabData"
          },
          "event": {
            "$ref": "#/components/schemas/BillingTabEvent"
          }
        }
      },
      "BillingTabData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "id",
          "customer_number"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the billing tab."
          },
          "customer_number": {
            "type": "string",
            "description": "The customer number of the customer who the billing tab belongs to."
          }
        }
      },
      "BillingTabEvent": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "type",
          "response"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "BillogramCreationError",
            "description": "The type of the event."
          },
          "response": {
            "$ref": "#/components/schemas/BillingTabEventResponse"
          }
        }
      },
      "BillingTabEventResponse": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "status",
          "data"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "UNKNOWN_PARAMETER",
              "READ_ONLY_PARAMETER",
              "INVALID_PARAMETER_COMBINATION",
              "INVALID_PARAMETER"
            ],
            "description": "The status of the event response indicating the type of error."
          },
          "data": {
            "type": "object",
            "required": [
              "message"
            ],
            "properties": {
              "message": {
                "type": "string",
                "description": "A descriptive message for the event."
              }
            }
          }
        }
      },
      "InvoicePdfLayoutAdjustedEnvelope": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "callback_id",
          "callback_timestamp",
          "callback_type",
          "code",
          "billogram_id"
        ],
        "properties": {
          "callback_id": {
            "type": "string",
            "description": "Unique identifier generated for each callback."
          },
          "callback_timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "An ISO 8601 compliant timestamp for the callback."
          },
          "callback_type": {
            "type": "string",
            "const": "InvoicePdfLayoutAdjusted",
            "description": "The type of callback. Value is \"InvoicePdfLayoutAdjusted\" for an invoice PDF layout adjusted callback."
          },
          "code": {
            "type": "string",
            "enum": [
              "LOGO_RESIZED"
            ],
            "description": "The adjustment that was made to the invoice PDF:\n- `LOGO_RESIZED`: Issued only for Norwegian creditors with Parajett letter printing.\n  The length of the resolved return address (the return address if set, otherwise\n  the creditor address) required it to be printed on more than one line, so the\n  logo above it was resized to comply with Norwegian letter printing requirements.\n  Resizing is applied regardless of distribution method. Issued the first time the\n  logo is resized for the current logo and resolved return address combination."
          },
          "billogram_id": {
            "type": "string",
            "description": "The ID of the billogram that triggered the callback."
          }
        }
      },
      "EfakturaRegistrationEnvelope": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "callback_id",
          "callback_timestamp",
          "callback_type",
          "efaktura_registration"
        ],
        "properties": {
          "callback_id": {
            "type": "string",
            "description": "Unique identifier generated for each callback."
          },
          "callback_timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "An ISO 8601 compliant timestamp for the callback."
          },
          "callback_type": {
            "type": "string",
            "const": "EfakturaRegistration",
            "description": "The type of callback. Value is \"EfakturaRegistration\" for E-faktura registration and deregistration callbacks."
          },
          "efaktura_registration": {
            "$ref": "#/components/schemas/EfakturaRegistration"
          }
        }
      },
      "EfakturaRegistration": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "registration_type",
          "file_contents",
          "file_name"
        ],
        "properties": {
          "registration_type": {
            "type": "string",
            "enum": [
              "Registration",
              "Deregistration",
              "ForwardedEfakturaRegistration"
            ],
            "description": "Registration type values are Registration, Deregistration, or ForwardedEfakturaRegistration"
          },
          "fmi": {
            "type": [
              "string",
              "null"
            ],
            "description": "E-faktura recipient identifier, sometimes referred to as the FMI (fakturamottagaridentitet). Should be in the format YYYYMMDDXXXX.BANK.SE for individuals or individual companies or 00XXXXXXXXXX.BANK.SE for companies with organization number (06XXXXXXXXXX.SBF.SE for companies using Swedbank) where 'BANK' would be replaced by the bank_code."
          },
          "bank_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "E-faktura recipient's fully qualified bank name. Available banks are `Danske Bank`, `SEB`, `Handelsbanken`, `Skandiabanken`, `Swedbank`, `Nordea`, `Länsförsäkringar bank`, `ICA banken`, `Sparbanken Syd`, `Ålandsbanken`, `Marginalen Bank`, `Svea Bank`"
          },
          "bank_code": {
            "type": [
              "string",
              "null"
            ],
            "description": "E-faktura recipient's bank's internal code, may differ if the recipient is an individual or a company. Available values are `OEB`, `SEB`, `SHB`, `SKB`, `FSPA`, `NB`, `LFB`, `ICA`, `SYD`, `AAB`, `MARG`, `SVEA`, `DBF`, `SEBF`, `SHBF`, `NBF`, `SBF`, `SVEF`, `LFBF`"
          },
          "id_number": {
            "type": [
              "string",
              "null"
            ],
            "description": "E-faktura recipient's ID number or organization number. (Recommended 12 digits for individuals or individual companies, 10 digits for companies)"
          },
          "recipient_type": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "individual",
              "company"
            ],
            "description": "E-faktura recipient type"
          },
          "ocr": {
            "type": [
              "string",
              "null"
            ],
            "description": "OCR number of the last invoice of this recipient. Can be null."
          },
          "billogram_customer_number": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Customer number of the recipient of the billogram. Can be null."
          },
          "customer_supplied_billogram_customer_no": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Customer number of the recipient of the billogram, as it was inserted by the recipient. Can be null."
          },
          "full_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Full name of the recipient. Can be null."
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "Email address of the recipient. Can be null."
          },
          "file_name": {
            "type": "string",
            "description": "File name of the EFA file containing information about the registration."
          },
          "file_contents": {
            "type": "string",
            "description": "The contents of the EFA file containing information about the recipient that is registering or deregistering for E-faktura, base64 encoded."
          }
        }
      },
      "BillogramEventBase": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "type",
          "created_at",
          "event_uuid"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of event that occurred."
          },
          "created_at": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "description": "Timestamp the event was created at. Given as a date-time string in UTC in the format \"YYYY-MM-DD HH:MM:SS\"."
          },
          "event_uuid": {
            "type": "string",
            "format": "uuid",
            "description": "A unique identifier (in UUID format) that identifies this specific event. Can be used to correlate the callback event to the specific event in the timeline."
          },
          "billogram_id": {
            "type": "string",
            "description": "The ID of the billogram this event belongs to."
          }
        }
      },
      "BillogramEvent": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/AutogiroFailedEvent"
          },
          {
            "$ref": "#/components/schemas/BillogramCreatedEvent"
          },
          {
            "$ref": "#/components/schemas/BillogramEndedEvent"
          },
          {
            "$ref": "#/components/schemas/BillogramSentEvent"
          },
          {
            "$ref": "#/components/schemas/CollectionEvent"
          },
          {
            "$ref": "#/components/schemas/CollectionCancelledEvent"
          },
          {
            "$ref": "#/components/schemas/CollectionEndedEvent"
          },
          {
            "$ref": "#/components/schemas/CollectionStatusUpdateEvent"
          },
          {
            "$ref": "#/components/schemas/ConfirmedLossEvent"
          },
          {
            "$ref": "#/components/schemas/CreditEvent"
          },
          {
            "$ref": "#/components/schemas/CreditAllocatedEvent"
          },
          {
            "$ref": "#/components/schemas/CreditCustomerLiabilityEvent"
          },
          {
            "$ref": "#/components/schemas/CreditPaymentEvent"
          },
          {
            "$ref": "#/components/schemas/CreditorMessageEvent"
          },
          {
            "$ref": "#/components/schemas/CustomerLiabilityReducedEvent"
          },
          {
            "$ref": "#/components/schemas/CustomerMessageEvent"
          },
          {
            "$ref": "#/components/schemas/DataChangeEvent"
          },
          {
            "$ref": "#/components/schemas/DeferredCommandFailedEvent"
          },
          {
            "$ref": "#/components/schemas/DeletedEvent"
          },
          {
            "$ref": "#/components/schemas/DeliveryAcceptedEvent"
          },
          {
            "$ref": "#/components/schemas/DeliveryFailedEvent"
          },
          {
            "$ref": "#/components/schemas/DeliverySmsFailedEvent"
          },
          {
            "$ref": "#/components/schemas/EDISentEvent"
          },
          {
            "$ref": "#/components/schemas/EboxDeliveryDoneEvent"
          },
          {
            "$ref": "#/components/schemas/EfakturaFailedEvent"
          },
          {
            "$ref": "#/components/schemas/EfakturaSentEvent"
          },
          {
            "$ref": "#/components/schemas/EinvoiceDeliveryDoneEvent"
          },
          {
            "$ref": "#/components/schemas/EinvoiceDeliveryFailedEvent"
          },
          {
            "$ref": "#/components/schemas/EmailNotAcceptedEvent"
          },
          {
            "$ref": "#/components/schemas/InvoiceCreationFailedEvent"
          },
          {
            "$ref": "#/components/schemas/InvoiceSentEvent"
          },
          {
            "$ref": "#/components/schemas/ItemProcessingFailedEvent"
          },
          {
            "$ref": "#/components/schemas/ItemProcessingSuccessfulEvent"
          },
          {
            "$ref": "#/components/schemas/LetterSentEvent"
          },
          {
            "$ref": "#/components/schemas/NewInvoicePDFEvent"
          },
          {
            "$ref": "#/components/schemas/OverdueEvent"
          },
          {
            "$ref": "#/components/schemas/OverpaymentAdjustmentEvent"
          },
          {
            "$ref": "#/components/schemas/OverpaymentCustomerLiabilityEvent"
          },
          {
            "$ref": "#/components/schemas/PaymentEvent"
          },
          {
            "$ref": "#/components/schemas/PaymentFailedEvent"
          },
          {
            "$ref": "#/components/schemas/PaymentScheduledEvent"
          },
          {
            "$ref": "#/components/schemas/PaymentSystemCancelledEvent"
          },
          {
            "$ref": "#/components/schemas/PaymentSystemUpdatedEvent"
          },
          {
            "$ref": "#/components/schemas/PaymentUserCancelledEvent"
          },
          {
            "$ref": "#/components/schemas/PaymentUserUpdatedEvent"
          },
          {
            "$ref": "#/components/schemas/PurchaseAcceptedEvent"
          },
          {
            "$ref": "#/components/schemas/PurchaseRejectedEvent"
          },
          {
            "$ref": "#/components/schemas/PurchaseFullySettledEvent"
          },
          {
            "$ref": "#/components/schemas/RefundBankDetailsRequiredEvent"
          },
          {
            "$ref": "#/components/schemas/RefundConfirmedEvent"
          },
          {
            "$ref": "#/components/schemas/SelfServiceRefundAvailableEvent"
          },
          {
            "$ref": "#/components/schemas/SelfServiceRefundCancelledEvent"
          },
          {
            "$ref": "#/components/schemas/SelfServiceRefundClaimedEvent"
          },
          {
            "$ref": "#/components/schemas/ReminderSentEvent"
          },
          {
            "$ref": "#/components/schemas/ResentEvent"
          },
          {
            "$ref": "#/components/schemas/RespiteEvent"
          },
          {
            "$ref": "#/components/schemas/RespiteRemovedEvent"
          },
          {
            "$ref": "#/components/schemas/RevertWritedownEvent"
          },
          {
            "$ref": "#/components/schemas/SaleAcceptedEvent"
          },
          {
            "$ref": "#/components/schemas/SmsNotAcceptedEvent"
          },
          {
            "$ref": "#/components/schemas/SoftReminderSentEvent"
          },
          {
            "$ref": "#/components/schemas/TaxReportingFailedEvent"
          },
          {
            "$ref": "#/components/schemas/UnderpaymentSettlementEvent"
          },
          {
            "$ref": "#/components/schemas/WritedownEvent"
          },
          {
            "$ref": "#/components/schemas/WriteoffEvent"
          }
        ],
        "x-scalar-ignore": true,
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "AutogiroFailed": "#/components/schemas/AutogiroFailedEvent",
            "BillogramCreated": "#/components/schemas/BillogramCreatedEvent",
            "BillogramEnded": "#/components/schemas/BillogramEndedEvent",
            "BillogramSent": "#/components/schemas/BillogramSentEvent",
            "Collection": "#/components/schemas/CollectionEvent",
            "CollectionCancelled": "#/components/schemas/CollectionCancelledEvent",
            "CollectionEnded": "#/components/schemas/CollectionEndedEvent",
            "CollectionStatusUpdate": "#/components/schemas/CollectionStatusUpdateEvent",
            "ConfirmedLoss": "#/components/schemas/ConfirmedLossEvent",
            "Credit": "#/components/schemas/CreditEvent",
            "CreditAllocated": "#/components/schemas/CreditAllocatedEvent",
            "CreditCustomerLiability": "#/components/schemas/CreditCustomerLiabilityEvent",
            "CreditPayment": "#/components/schemas/CreditPaymentEvent",
            "CreditorMessage": "#/components/schemas/CreditorMessageEvent",
            "CustomerLiabilityReduced": "#/components/schemas/CustomerLiabilityReducedEvent",
            "CustomerMessage": "#/components/schemas/CustomerMessageEvent",
            "DataChange": "#/components/schemas/DataChangeEvent",
            "DeferredCommandFailed": "#/components/schemas/DeferredCommandFailedEvent",
            "Deleted": "#/components/schemas/DeletedEvent",
            "DeliveryAccepted": "#/components/schemas/DeliveryAcceptedEvent",
            "DeliveryFailed": "#/components/schemas/DeliveryFailedEvent",
            "DeliverySmsFailed": "#/components/schemas/DeliverySmsFailedEvent",
            "EDISent": "#/components/schemas/EDISentEvent",
            "EboxDeliveryDone": "#/components/schemas/EboxDeliveryDoneEvent",
            "EfakturaFailed": "#/components/schemas/EfakturaFailedEvent",
            "EfakturaSent": "#/components/schemas/EfakturaSentEvent",
            "EinvoiceDeliveryDone": "#/components/schemas/EinvoiceDeliveryDoneEvent",
            "EinvoiceDeliveryFailed": "#/components/schemas/EinvoiceDeliveryFailedEvent",
            "EmailNotAccepted": "#/components/schemas/EmailNotAcceptedEvent",
            "InvoiceCreationFailed": "#/components/schemas/InvoiceCreationFailedEvent",
            "InvoiceSent": "#/components/schemas/InvoiceSentEvent",
            "ItemProcessingFailed": "#/components/schemas/ItemProcessingFailedEvent",
            "ItemProcessingSuccessful": "#/components/schemas/ItemProcessingSuccessfulEvent",
            "LetterSent": "#/components/schemas/LetterSentEvent",
            "NewInvoicePDF": "#/components/schemas/NewInvoicePDFEvent",
            "Overdue": "#/components/schemas/OverdueEvent",
            "OverpaymentAdjustment": "#/components/schemas/OverpaymentAdjustmentEvent",
            "OverpaymentCustomerLiability": "#/components/schemas/OverpaymentCustomerLiabilityEvent",
            "Payment": "#/components/schemas/PaymentEvent",
            "PaymentFailed": "#/components/schemas/PaymentFailedEvent",
            "PaymentScheduled": "#/components/schemas/PaymentScheduledEvent",
            "PaymentSystemCancelled": "#/components/schemas/PaymentSystemCancelledEvent",
            "PaymentSystemUpdated": "#/components/schemas/PaymentSystemUpdatedEvent",
            "PaymentUserCancelled": "#/components/schemas/PaymentUserCancelledEvent",
            "PaymentUserUpdated": "#/components/schemas/PaymentUserUpdatedEvent",
            "PurchaseAccepted": "#/components/schemas/PurchaseAcceptedEvent",
            "PurchaseRejected": "#/components/schemas/PurchaseRejectedEvent",
            "PurchaseFullySettled": "#/components/schemas/PurchaseFullySettledEvent",
            "RefundBankDetailsRequired": "#/components/schemas/RefundBankDetailsRequiredEvent",
            "RefundConfirmed": "#/components/schemas/RefundConfirmedEvent",
            "SelfServiceRefundAvailable": "#/components/schemas/SelfServiceRefundAvailableEvent",
            "SelfServiceRefundCancelled": "#/components/schemas/SelfServiceRefundCancelledEvent",
            "SelfServiceRefundClaimed": "#/components/schemas/SelfServiceRefundClaimedEvent",
            "ReminderSent": "#/components/schemas/ReminderSentEvent",
            "Resent": "#/components/schemas/ResentEvent",
            "Respite": "#/components/schemas/RespiteEvent",
            "RespiteRemoved": "#/components/schemas/RespiteRemovedEvent",
            "RevertWritedown": "#/components/schemas/RevertWritedownEvent",
            "SaleAccepted": "#/components/schemas/SaleAcceptedEvent",
            "SmsNotAccepted": "#/components/schemas/SmsNotAcceptedEvent",
            "SoftReminderSent": "#/components/schemas/SoftReminderSentEvent",
            "TaxReportingFailed": "#/components/schemas/TaxReportingFailedEvent",
            "UnderpaymentSettlement": "#/components/schemas/UnderpaymentSettlementEvent",
            "Writedown": "#/components/schemas/WritedownEvent",
            "Writeoff": "#/components/schemas/WriteoffEvent"
          }
        }
      },
      "AutogiroFailedData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "amount",
          "full_status"
        ],
        "properties": {
          "amount": {
            "type": "number",
            "description": "The amount sum for the event."
          },
          "full_status": {
            "type": "string",
            "description": "The full status of why the autogiro payment order failed, if available. May be an empty string if the full status is unavailable."
          }
        }
      },
      "BillogramCreatedData": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "No additional data is included for this event type.",
        "additionalProperties": false,
        "maxProperties": 0
      },
      "BillogramEndedData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "remaining_sum",
          "total_sum",
          "ended_reason"
        ],
        "properties": {
          "remaining_sum": {
            "type": "number",
            "description": "The remaining to be paid, including fees, of the billogram."
          },
          "total_sum": {
            "type": "number",
            "description": "The total sum, including fees, of the billogram."
          },
          "ended_reason": {
            "$ref": "#/components/schemas/EndedReason"
          }
        }
      },
      "BillogramSentData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "delivery_method",
          "delivery_redirected",
          "invoice_no",
          "letter_id",
          "original_delivery_method",
          "remaining_sum",
          "scanning_central",
          "total_sum",
          "url",
          "recipient_url",
          "recipient_overview_url"
        ],
        "properties": {
          "delivery_method": {
            "$ref": "#/components/schemas/DeliveryMethod"
          },
          "delivery_redirected": {
            "type": "boolean",
            "description": "If the delivery is redirected according to recipient's choice instead of the sender's for the action."
          },
          "invoice_no": {
            "type": "integer",
            "description": "The invoice number of the billogram."
          },
          "letter_id": {
            "type": "string",
            "description": "ID string which may be used to get a specific invoice PDF file."
          },
          "original_delivery_method": {
            "$ref": "#/components/schemas/DeliveryMethod"
          },
          "remaining_sum": {
            "type": "number",
            "description": "The remaining to be paid, including fees, of the billogram."
          },
          "scanning_central": {
            "type": "boolean",
            "description": "If the billogram was sent to a scanning central."
          },
          "total_sum": {
            "type": "number",
            "description": "The total sum, including fees, of the billogram."
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "format": "url",
            "description": "URL to the web version of the billogram. This is almost the same URL that is sent to the customer_email (though, in this URL we're excluding the accept-pin that is being sent in the email) when sending the billogram as email. This value is null if the invoice has not yet been sent, or the invoice has been sold. Please note that if you're sending a billogram with email, give out this URL and the recipient who then uses this URL instead of the one in the email, the billogram will not be marked as read (since they need to click the link in the email for proper delivery accept). Because of this we recommend against using it if delivery method is set to Email+Letter or SMS+Letter.\n"
          },
          "recipient_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "url",
            "description": "URL to the web version of the billogram. This is the same URL that is sent to the customer_email when sending the billogram as email, SMS or electronic invoice. This value is null if the invoice has not yet been sent, or the invoice has been sold. Please note that this URL should be used if you are building something where the recipient will access their invoices (such as a list on My Pages or an alternative delivery method) so that the invoice gets the proper Opened state. Do NOT use this for anything where your organisation might access it as it will interfere with the state of the billogram. In that case, use the url property instead.\n"
          },
          "recipient_overview_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "url",
            "description": "URL of the overview of the web version, where a recipient can view all open invoices. This value may be null if the invoice has not yet been sent, or the invoice has been sold."
          }
        }
      },
      "CollectionData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "collector_method",
          "collector_reference",
          "remaining_sum",
          "total_sum"
        ],
        "properties": {
          "collector_method": {
            "type": "string",
            "description": "Holds which collection partner the billogram has been sent for collection at."
          },
          "collector_reference": {
            "type": [
              "string",
              "null"
            ],
            "description": "Reference number at the collection partner. May be null or empty and may be updated later with a new event with the same type."
          },
          "remaining_sum": {
            "type": "number",
            "description": "The remaining to be paid, including fees, of the billogram."
          },
          "total_sum": {
            "type": "number",
            "description": "The total sum, including fees, of the billogram."
          }
        }
      },
      "CollectionCancelledData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "collector_reference"
        ],
        "properties": {
          "collector_reference": {
            "type": [
              "string",
              "null"
            ],
            "description": "Reference number at the collection partner. May be null or empty and may be updated later with a new event with the same type."
          }
        }
      },
      "CollectionEndedData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "collector_reference"
        ],
        "properties": {
          "collector_reference": {
            "type": [
              "string",
              "null"
            ],
            "description": "Reference number at the collection partner. May be null or empty and may be updated later with a new event with the same type."
          }
        }
      },
      "CollectionStatusUpdateData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "collection_status",
          "collector_reference"
        ],
        "properties": {
          "collection_status": {
            "type": "string",
            "description": "Specifies the state that the collection has moved into. May be null or empty."
          },
          "collector_reference": {
            "type": [
              "string",
              "null"
            ],
            "description": "Reference number at the collection partner. May be null or empty and may be updated later with a new event with the same type."
          }
        }
      },
      "ConfirmedLossData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "remaining_sum",
          "total_sum"
        ],
        "properties": {
          "remaining_sum": {
            "type": "number",
            "description": "The remaining to be paid, including fees, of the billogram."
          },
          "total_sum": {
            "type": "number",
            "description": "The total sum, including fees, of the billogram."
          }
        }
      },
      "CreditData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "amount",
          "delivery_method",
          "delivery_redirected",
          "invoice_no",
          "original_delivery_method",
          "remaining_sum",
          "scanning_central",
          "total_sum"
        ],
        "properties": {
          "amount": {
            "type": "number",
            "description": "The amount sum for the event."
          },
          "delivery_method": {
            "$ref": "#/components/schemas/DeliveryMethod"
          },
          "delivery_redirected": {
            "type": "boolean",
            "description": "If the delivery is redirected according to recipient's choice instead of the sender's for the action."
          },
          "invoice_no": {
            "type": "integer",
            "description": "The invoice's invoice number."
          },
          "original_delivery_method": {
            "$ref": "#/components/schemas/DeliveryMethod"
          },
          "remaining_sum": {
            "type": "number",
            "description": "The remaining to be paid, including fees, of the billogram."
          },
          "scanning_central": {
            "type": "boolean",
            "description": "If the billogram was sent to a scanning central."
          },
          "total_sum": {
            "type": "number",
            "description": "The total sum, including fees, of the billogram."
          }
        }
      },
      "CreditAllocatedData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "amount",
          "remaining_sum",
          "source_id",
          "total_sum"
        ],
        "properties": {
          "amount": {
            "type": "number",
            "description": "The amount that should be allocated."
          },
          "remaining_sum": {
            "type": "number",
            "description": "The remaining to be paid, including fees, of the billogram."
          },
          "source_id": {
            "type": "string",
            "description": "The ID of the billogram from which the amount should be allocated."
          },
          "total_sum": {
            "type": "number",
            "description": "The total sum, including fees, of the billogram."
          }
        }
      },
      "CreditCustomerLiabilityData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "new_amount",
          "previous_amount",
          "total_amount"
        ],
        "properties": {
          "new_amount": {
            "type": "number",
            "description": "The new sum for the event."
          },
          "previous_amount": {
            "type": "number",
            "description": "The previous sum for the event."
          },
          "total_amount": {
            "type": "number",
            "description": "The total sum for the event."
          }
        }
      },
      "CreditPaymentData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "amount",
          "remaining_sum",
          "total_sum"
        ],
        "properties": {
          "amount": {
            "type": "number",
            "description": "The amount sum for the event."
          },
          "remaining_sum": {
            "type": "number",
            "description": "The remaining to be paid, including fees, of the billogram."
          },
          "total_sum": {
            "type": "number",
            "description": "The total sum, including fees, of the billogram."
          }
        }
      },
      "CreditorMessageData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string",
            "description": "Message/comment posted on the billogram."
          }
        }
      },
      "CustomerLiabilityReducedData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "amount",
          "reason"
        ],
        "properties": {
          "amount": {
            "type": "number",
            "description": "The amount sum for the event."
          },
          "reason": {
            "type": "string",
            "description": "Reason for the liability reduction."
          }
        }
      },
      "CustomerMessageData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string",
            "description": "Message/comment posted on the billogram."
          }
        }
      },
      "DataChangeData": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "No additional data is included for this event type.",
        "additionalProperties": false,
        "maxProperties": 0
      },
      "DeferredCommandFailedData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "command",
          "error_message"
        ],
        "properties": {
          "command": {
            "type": "string",
            "description": "The deferred command that failed."
          },
          "error_message": {
            "type": "string",
            "description": "A detailed error message explaining why the command failed."
          },
          "delivery_method": {
            "$ref": "#/components/schemas/DeliveryMethod",
            "description": "The delivery method that was attempted, if the failed command involved delivery."
          }
        }
      },
      "DeletedData": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "No additional data is included for this event type.",
        "additionalProperties": false,
        "maxProperties": 0
      },
      "DeliveryAcceptedData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "customer_email",
          "customer_phone",
          "ip",
          "remaining_sum"
        ],
        "properties": {
          "customer_email": {
            "type": "string",
            "format": "email",
            "description": "The email address for the recipient."
          },
          "customer_phone": {
            "type": [
              "string",
              "null"
            ],
            "description": "The phone number for the recipient."
          },
          "ip": {
            "type": "string",
            "description": "The IP address of the recipient that clicked the link in the email."
          },
          "remaining_sum": {
            "type": "number",
            "description": "The remaining to be paid, including fees, of the billogram."
          }
        }
      },
      "DeliveryFailedData": {
        "description": "Data for delivery failed events. The structure varies based on the failure type:\n- **EmailBounced**: Email delivery failed (e.g. invalid address, bounce)\n- **letter**: The letter could not be delivered, and `code` gives the reason. Sent as a webhook and shown in the event history\n- **LetterFailed**: The letter could not be delivered, and no reason is given. Only in the event history, never sent as a webhook\n- **EDIFailed**: EDI delivery failed\n",
        "oneOf": [
          {
            "$ref": "#/components/schemas/DeliveryFailedEmailBouncedData"
          },
          {
            "$ref": "#/components/schemas/DeliveryFailedLetterData"
          },
          {
            "$ref": "#/components/schemas/DeliveryFailedLetterFailedData"
          },
          {
            "$ref": "#/components/schemas/DeliveryFailedEDIFailedData"
          }
        ],
        "x-scalar-ignore": true,
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "EmailBounced": "#/components/schemas/DeliveryFailedEmailBouncedData",
            "letter": "#/components/schemas/DeliveryFailedLetterData",
            "LetterFailed": "#/components/schemas/DeliveryFailedLetterFailedData",
            "EDIFailed": "#/components/schemas/DeliveryFailedEDIFailedData"
          }
        }
      },
      "DeliveryFailedEmailBouncedData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "customer_email",
          "message",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "EmailBounced"
            ],
            "description": "Failure type indicating email delivery failed."
          },
          "message": {
            "type": "string",
            "description": "Failure message."
          },
          "customer_email": {
            "type": "string",
            "format": "email",
            "description": "The email address for the recipient."
          }
        },
        "examples": [
          {
            "type": "EmailBounced",
            "message": "Unable to deliver email to customer@example.com: smtp; 550 unrouteable address",
            "customer_email": "customer@example.com"
          }
        ]
      },
      "DeliveryFailedLetterData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "code",
          "message",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "letter"
            ],
            "description": "The letter could not be delivered, and `code` gives the reason."
          },
          "message": {
            "type": "string",
            "description": "Failure message."
          },
          "code": {
            "type": "string",
            "enum": [
              "POST_RETURNED",
              "ADDRESS_TOO_LONG"
            ],
            "description": "Failure reason:\n- **POST_RETURNED**: The letter was returned from the postal service\n- **ADDRESS_TOO_LONG**: The letter was not sent because the address does not fit in the envelope window. Letter resends and reminders are refused until the address is updated\n"
          },
          "invoice_no": {
            "type": "string",
            "description": "The invoice number."
          },
          "letter_id": {
            "type": "string",
            "description": "ID of the letter that failed, if known."
          },
          "customer_email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "description": "The email address for the recipient, or null if not applicable."
          }
        },
        "examples": [
          {
            "type": "letter",
            "message": "The letter was returned from the postal service.",
            "code": "POST_RETURNED",
            "invoice_no": "1234",
            "letter_id": "jc4Naa1Zjg4NGNlZTcyNwMTQ2ODA2NDM78d13e968d52f77401b04ac7f7aaa0bb",
            "customer_email": null
          },
          {
            "type": "letter",
            "message": "The billing address is too long to fit within the envelope window.",
            "code": "ADDRESS_TOO_LONG",
            "invoice_no": "1234",
            "letter_id": "jc4Naa1Zjg4NGNlZTcyNwMTQ2ODA2NDM78d13e968d52f77401b04ac7f7aaa0bb",
            "customer_email": null
          }
        ]
      },
      "DeliveryFailedLetterFailedData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "LetterFailed"
            ],
            "description": "The letter could not be delivered, and no reason is given."
          },
          "message": {
            "type": "null",
            "description": "Always null."
          },
          "customer_email": {
            "type": "null",
            "description": "Always null."
          },
          "letter_id": {
            "type": "string",
            "description": "ID of the letter that failed. Omitted if unknown."
          }
        },
        "examples": [
          {
            "type": "LetterFailed",
            "message": null,
            "customer_email": null,
            "letter_id": "jc4Naa1Zjg4NGNlZTcyNwMTQ2ODA2NDM78d13e968d52f77401b04ac7f7aaa0bb"
          }
        ]
      },
      "DeliveryFailedEDIFailedData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "electronic_id",
          "message",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "EDIFailed"
            ],
            "description": "Failure type indicating EDI delivery failed."
          },
          "message": {
            "type": [
              "string",
              "null"
            ],
            "description": "Failure message or error code (e.g. RECEIVER_NOT_AT_OPERATOR). `null` for Peppol deliveries; see `errors`."
          },
          "electronic_id": {
            "type": "string",
            "description": "The electronic identifier for the EDI recipient."
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Reasons the Peppol delivery failed. Only present for Peppol deliveries."
          }
        },
        "examples": [
          {
            "type": "EDIFailed",
            "message": "RECEIVER_NOT_AT_OPERATOR",
            "electronic_id": "000123456789"
          }
        ]
      },
      "DeliverySmsFailedData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "customer_phone",
          "message",
          "type"
        ],
        "properties": {
          "customer_phone": {
            "type": "string",
            "description": "The phone number for the recipient."
          },
          "message": {
            "type": "string",
            "description": "Failure message."
          },
          "type": {
            "type": "string",
            "description": "Failure type."
          }
        }
      },
      "EDISentData": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "No additional data is included for this event type.",
        "additionalProperties": false,
        "maxProperties": 0
      },
      "EboxDeliveryDoneData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "letter_id"
        ],
        "properties": {
          "letter_id": {
            "type": "string",
            "description": "ID string which may be used to get a specific invoice PDF file."
          }
        }
      },
      "EfakturaFailedData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "amount",
          "error_status"
        ],
        "properties": {
          "amount": {
            "type": "number",
            "description": "The amount sum for the event."
          },
          "error_status": {
            "type": "string",
            "enum": [
              "recipient_not_available",
              "recipient_blocked",
              "invalid_identifier",
              "amount_too_high",
              "invalid_ocr"
            ],
            "description": "The internal error code received from the banks for a failed E-faktura delivery."
          }
        }
      },
      "EfakturaSentData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "amount",
          "bankgiro",
          "recipient_identifier"
        ],
        "properties": {
          "amount": {
            "type": "number",
            "description": "The amount sum for the event."
          },
          "bankgiro": {
            "type": "string",
            "deprecated": true,
            "description": "Bankgiro number used for payment."
          },
          "recipient_identifier": {
            "type": "string",
            "deprecated": true,
            "description": "The identifier for the recipient of an E-faktura, this identifier may in some cases be referred to the FMI (fakturamottagaridentitet)."
          }
        }
      },
      "EinvoiceDeliveryDoneData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "einvoice_identifier"
        ],
        "properties": {
          "einvoice_identifier": {
            "type": "string",
            "description": "The e-invoice identifier for the recipient. Also known as efakturaIdentifier. This will only be included for invoices sent in the Norwegian market."
          }
        }
      },
      "EinvoiceDeliveryFailedData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "string",
            "description": "Error code specifying the kind of delivery error that has occurred."
          },
          "message": {
            "type": "string",
            "description": "A human readable error message explaining in more details why the delivery was not successful."
          }
        }
      },
      "EmailNotAcceptedData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "customer_email",
          "remaining_sum"
        ],
        "properties": {
          "customer_email": {
            "type": "string",
            "format": "email",
            "description": "The email address for the recipient."
          },
          "remaining_sum": {
            "type": "number",
            "description": "The remaining to be paid, including fees, of the billogram."
          }
        }
      },
      "InvoiceCreationFailedData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "delivery_method",
          "message",
          "remaining_sum",
          "total_sum"
        ],
        "properties": {
          "delivery_method": {
            "$ref": "#/components/schemas/DeliveryMethod"
          },
          "message": {
            "type": [
              "string",
              "null"
            ],
            "description": "A human readable error message explaining in more detail why the invoice creation was not successful."
          },
          "remaining_sum": {
            "type": "number",
            "description": "The remaining to be paid, including fees, of the billogram."
          },
          "total_sum": {
            "type": "number",
            "description": "The total sum, including fees, of the billogram."
          }
        }
      },
      "InvoiceSentData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "delivery_method",
          "delivery_redirected",
          "invoice_no",
          "original_delivery_method",
          "remaining_sum",
          "scanning_central",
          "total_sum"
        ],
        "properties": {
          "delivery_method": {
            "$ref": "#/components/schemas/DeliveryMethod"
          },
          "delivery_redirected": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "If the delivery is redirected according to recipient's choice instead of the sender's for the action."
          },
          "invoice_no": {
            "type": "integer",
            "description": "The invoice's invoice number."
          },
          "original_delivery_method": {
            "$ref": "#/components/schemas/DeliveryMethod"
          },
          "remaining_sum": {
            "type": "number",
            "description": "The remaining to be paid, including fees, of the billogram."
          },
          "scanning_central": {
            "type": "boolean",
            "description": "If the billogram was sent to a scanning central."
          },
          "total_sum": {
            "type": "number",
            "description": "The total sum, including fees, of the billogram."
          }
        }
      },
      "ItemProcessingFailedData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "items_uuid",
          "error_message",
          "errors"
        ],
        "properties": {
          "items_uuid": {
            "type": "string",
            "description": "The identifier of the deferred items upload that failed."
          },
          "error_message": {
            "type": "string",
            "description": "All error messages joined into one human-readable text."
          },
          "errors": {
            "type": "array",
            "description": "The errors that stopped the items from being added to the billogram.",
            "items": {
              "type": "object",
              "required": [
                "code",
                "message"
              ],
              "properties": {
                "code": {
                  "type": "string",
                  "enum": [
                    "UNSPECIFIED",
                    "INVALID_FORMAT",
                    "MISSING_MANDATORY_FIELD",
                    "CONFIGURATION_MISMATCH",
                    "DATA_TYPE_VIOLATION"
                  ],
                  "description": "The category of the error. New codes may be added; treat unknown codes as `UNSPECIFIED`."
                },
                "message": {
                  "type": "string",
                  "description": "A human-readable error message."
                },
                "location": {
                  "type": "string",
                  "description": "Dotted path to the field that caused the error, e.g. `custom_attributes.market`."
                },
                "line_index": {
                  "type": "integer",
                  "description": "The 0-based index of the line in the uploaded items file."
                },
                "external_id": {
                  "type": "string",
                  "description": "The `external_id` of the item that caused the error."
                }
              }
            }
          }
        }
      },
      "ItemProcessingSuccessfulData": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "No additional data is included for this event type.",
        "additionalProperties": false,
        "maxProperties": 0
      },
      "LetterSentData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "delivery_method",
          "delivery_redirected",
          "original_delivery_method",
          "remaining_sum",
          "scanning_central"
        ],
        "properties": {
          "delivery_method": {
            "$ref": "#/components/schemas/DeliveryMethod"
          },
          "delivery_redirected": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "If the delivery is redirected according to recipient's choice instead of the sender's for the action."
          },
          "original_delivery_method": {
            "$ref": "#/components/schemas/DeliveryMethod"
          },
          "remaining_sum": {
            "type": "number",
            "description": "The remaining to be paid, including fees, of the billogram."
          },
          "scanning_central": {
            "type": "boolean",
            "description": "If the billogram was sent to a scanning central."
          }
        }
      },
      "NewInvoicePDFData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "remaining_sum",
          "total_sum"
        ],
        "properties": {
          "remaining_sum": {
            "type": "number",
            "description": "The remaining to be paid, including fees, of the billogram."
          },
          "total_sum": {
            "type": "number",
            "description": "The total sum, including fees, of the billogram."
          }
        }
      },
      "OverdueData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "remaining_sum"
        ],
        "properties": {
          "remaining_sum": {
            "type": "number",
            "description": "The remaining to be paid, including fees, of the billogram."
          }
        }
      },
      "OverpaymentAdjustmentData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "amount",
          "remaining_sum",
          "total_sum"
        ],
        "properties": {
          "amount": {
            "type": "number",
            "description": "The amount sum for the event."
          },
          "remaining_sum": {
            "type": "number",
            "description": "The remaining to be paid, including fees, of the billogram."
          },
          "total_sum": {
            "type": "number",
            "description": "The total sum, including fees, of the billogram."
          }
        }
      },
      "OverpaymentCustomerLiabilityData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "amount",
          "base_transaction",
          "overpayment_forward_to_creditor"
        ],
        "properties": {
          "amount": {
            "type": "number",
            "description": "The amount sum for the event."
          },
          "base_transaction": {
            "type": "string",
            "description": "Reference to the base transaction."
          },
          "overpayment_forward_to_creditor": {
            "type": "boolean",
            "description": "Whether the overpayment is forwarded to the creditor."
          }
        }
      },
      "PaymentData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "amount",
          "banking_amount",
          "manual",
          "payer_name",
          "payment_flags",
          "remaining_sum",
          "total_sum"
        ],
        "properties": {
          "amount": {
            "type": "number",
            "description": "The size of the payment to register, given in the invoicing currency."
          },
          "banking_amount": {
            "type": [
              "number",
              "null"
            ],
            "description": "The sum that has been paid to your bank account (if payment is sent via Billogram client funds accounts)."
          },
          "manual": {
            "type": "boolean",
            "description": "Boolean for whether the payment command was made manually by you (true) or if money were received via the Billogram client funds accounts (false)."
          },
          "payer_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "If the payment is sent via Billogram client funds accounts this parameter will hold the name of the payee."
          },
          "payment_flags": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "collector payment",
                "swish payment",
                "billogram onetime payment",
                "card payment",
                "checkout payment",
                "autogiro payment"
              ]
            },
            "description": "Extra values that describe specific characteristics of the payment. Returned as an array of zero or many string values."
          },
          "checkout_order_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The identifier of the checkout order."
          },
          "remaining_sum": {
            "type": "number",
            "description": "The remaining to be paid, including fees, of the billogram."
          },
          "total_sum": {
            "type": "number",
            "description": "The total sum, including fees, of the billogram."
          }
        }
      },
      "PaymentDetails": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Payment details object. Present when payment_type is CHECKOUT_PAYMENT.",
        "properties": {
          "checkout_order_id": {
            "type": "string",
            "description": "The identifier of the checkout order."
          },
          "payment_method": {
            "type": "string",
            "enum": [
              "CARD"
            ],
            "description": "The payment method used to pay for the checkout order. CARD indicates card payment."
          }
        }
      },
      "PaymentFailedData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "payment_amount",
          "payment_failure_reason",
          "payment_type"
        ],
        "properties": {
          "payment_amount": {
            "type": "number",
            "description": "The scheduled payment amount."
          },
          "payment_failure_reason": {
            "type": "string",
            "enum": [
              "INSUFFICIENT_FUNDS",
              "ACCOUNT_TYPE_NOT_APPROVED",
              "PAYER_CANCEL",
              "SCHEDULING_DATE_UNAVAILABLE",
              "MANDATE_UNAVAILABLE",
              "RECIPIENT_BANK_ACCOUNT_ISSUE",
              "CANCELLED_BY_PAYER",
              "CANCELLED_BY_CREDITOR",
              "FAILED_TO_CAPTURE",
              "AUTHORIZATION_EXPIRED",
              "TRY_AGAIN"
            ],
            "description": "The reason of the payment failure."
          },
          "payment_type": {
            "type": "string",
            "enum": [
              "CHECKOUT_PAYMENT",
              "DIRECT_DEBIT"
            ],
            "description": "The type of the payment that failed."
          },
          "payment_details": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PaymentDetails"
              },
              {
                "type": "null"
              }
            ],
            "description": "Describes the details of the payment that failed."
          }
        }
      },
      "PaymentScheduledData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "payment_amount",
          "payment_date",
          "payment_type"
        ],
        "properties": {
          "payment_amount": {
            "type": "number",
            "description": "The scheduled payment amount."
          },
          "payment_date": {
            "type": "string",
            "format": "date",
            "description": "The scheduled payment date."
          },
          "payment_type": {
            "type": "string",
            "enum": [
              "billopay",
              "autogiro"
            ],
            "description": "The scheduled payment type."
          }
        }
      },
      "PaymentSystemCancelledData": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "No additional data is included for this event type.",
        "additionalProperties": false,
        "maxProperties": 0
      },
      "PaymentSystemUpdatedData": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "No additional data is included for this event type.",
        "additionalProperties": false,
        "maxProperties": 0
      },
      "PaymentUserCancelledData": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "No additional data is included for this event type.",
        "additionalProperties": false,
        "maxProperties": 0
      },
      "PaymentUserUpdatedData": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "No additional data is included for this event type.",
        "additionalProperties": false,
        "maxProperties": 0
      },
      "PurchaseAcceptedData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "case_reference",
          "public_external_url"
        ],
        "properties": {
          "case_reference": {
            "type": "string",
            "description": "Reference number for the debt collection case at the partner."
          },
          "public_external_url": {
            "type": "string",
            "description": "Public URL where the case can be viewed externally. May be an empty string if not available."
          }
        }
      },
      "PurchaseRejectedData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "case_reference",
          "public_external_url",
          "rejected_reason"
        ],
        "properties": {
          "case_reference": {
            "type": "string",
            "description": "Reference number for the debt collection case at the partner."
          },
          "public_external_url": {
            "type": "string",
            "description": "Public URL where the case can be viewed externally. May be an empty string if not available."
          },
          "rejected_reason": {
            "type": "string",
            "description": "The reason code for the purchase rejection."
          }
        }
      },
      "PurchaseFullySettledData": {
        "type": "null",
        "x-scalar-ignore": true,
        "description": "No additional data is included for this event type."
      },
      "RefundBankDetailsRequiredData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "currency",
          "refund_amount"
        ],
        "properties": {
          "currency": {
            "type": "string",
            "description": "Currency code for the refund."
          },
          "refund_amount": {
            "type": "number",
            "description": "The amount to be refunded."
          }
        }
      },
      "RefundConfirmedData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "amount",
          "booking_date",
          "masked_iban"
        ],
        "properties": {
          "amount": {
            "type": "number",
            "description": "The refund amount."
          },
          "booking_date": {
            "type": "string",
            "format": "date",
            "description": "The booking date for the refund."
          },
          "masked_iban": {
            "type": "string",
            "description": "The masked IBAN where the refund was sent."
          }
        }
      },
      "SelfServiceRefundAvailableData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "refund_amount",
          "currency",
          "public_id",
          "recipient_url"
        ],
        "properties": {
          "refund_amount": {
            "type": "number",
            "description": "The overpaid amount available for self-service refund."
          },
          "currency": {
            "type": "string",
            "description": "Currency code for the refund."
          },
          "public_id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for the refund request. Correlates across SelfServiceRefundAvailable, SelfServiceRefundCancelled, and SelfServiceRefundClaimed events."
          },
          "recipient_url": {
            "type": "string",
            "format": "url",
            "description": "URL for the recipient to complete bank account verification. Same semantics as the `recipient_url` in the `BillogramSent` event.\n"
          }
        }
      },
      "SelfServiceRefundCancelledData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "public_id"
        ],
        "properties": {
          "public_id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the cancelled self-service refund request."
          }
        }
      },
      "SelfServiceRefundClaimedData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "refund_amount",
          "currency",
          "public_id"
        ],
        "properties": {
          "refund_amount": {
            "type": "number",
            "description": "The overpaid amount claimed for self-service refund."
          },
          "currency": {
            "type": "string",
            "description": "Currency code for the refund."
          },
          "public_id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for the refund request."
          }
        }
      },
      "ReminderSentData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "delivery_method",
          "delivery_redirected",
          "original_delivery_method",
          "remaining_sum",
          "reminder_count",
          "reminder_fee",
          "scanning_central",
          "total_sum"
        ],
        "properties": {
          "delivery_method": {
            "$ref": "#/components/schemas/ReminderDeliveryMethod"
          },
          "delivery_redirected": {
            "type": "boolean",
            "description": "If the delivery is redirected according to recipient's choice instead of the sender's for the action."
          },
          "original_delivery_method": {
            "$ref": "#/components/schemas/ReminderDeliveryMethod"
          },
          "remaining_sum": {
            "type": "number",
            "description": "The remaining to be paid, including fees, of the billogram."
          },
          "reminder_count": {
            "type": "number",
            "description": "Describes which reminder this is, starting with 1 and increasing."
          },
          "reminder_fee": {
            "type": [
              "number",
              "null"
            ],
            "description": "The reminder fee added to the billogram with this reminder."
          },
          "scanning_central": {
            "type": "boolean",
            "description": "If the billogram was sent to a scanning central."
          },
          "total_sum": {
            "type": "number",
            "description": "The total sum, including fees, of the billogram."
          }
        }
      },
      "ResentData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "delivery_method",
          "delivery_redirected",
          "letter_id",
          "original_delivery_method",
          "remaining_sum",
          "scanning_central",
          "total_sum"
        ],
        "properties": {
          "delivery_method": {
            "$ref": "#/components/schemas/DeliveryMethod"
          },
          "delivery_redirected": {
            "type": "boolean",
            "description": "If the delivery is redirected according to recipient's choice instead of the sender's for the action."
          },
          "letter_id": {
            "type": "string",
            "description": "ID string which may be used to get a specific invoice PDF file."
          },
          "original_delivery_method": {
            "$ref": "#/components/schemas/DeliveryMethod"
          },
          "remaining_sum": {
            "type": "number",
            "description": "The remaining to be paid, including fees, of the billogram."
          },
          "scanning_central": {
            "type": "boolean",
            "description": "If the billogram was sent to a scanning central."
          },
          "total_sum": {
            "type": "number",
            "description": "The total sum, including fees, of the billogram."
          }
        }
      },
      "RespiteData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "date",
          "remaining_sum",
          "total_sum"
        ],
        "properties": {
          "date": {
            "type": "string",
            "format": "date",
            "description": "The date until which a respite has been given."
          },
          "remaining_sum": {
            "type": "number",
            "description": "The remaining to be paid, including fees, of the billogram."
          },
          "total_sum": {
            "type": "number",
            "description": "The total sum, including fees, of the billogram."
          }
        }
      },
      "RespiteRemovedData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "remaining_sum",
          "total_sum"
        ],
        "properties": {
          "remaining_sum": {
            "type": "number",
            "description": "The remaining to be paid, including fees, of the billogram."
          },
          "total_sum": {
            "type": "number",
            "description": "The total sum, including fees, of the billogram."
          }
        }
      },
      "RevertWritedownData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "remaining_sum",
          "total_sum"
        ],
        "properties": {
          "remaining_sum": {
            "type": "number",
            "description": "The remaining to be paid, including fees, of the billogram."
          },
          "total_sum": {
            "type": "number",
            "description": "The total sum, including fees, of the billogram."
          }
        }
      },
      "SaleAcceptedData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "accepted_at",
          "customer_no",
          "item_price",
          "item_title",
          "item_type",
          "offer_id",
          "sale_type"
        ],
        "properties": {
          "accepted_at": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp when the offer is accepted."
          },
          "customer_no": {
            "type": "integer",
            "description": "The unique identification of the customer who accepted the offer."
          },
          "item_price": {
            "type": "number",
            "description": "The price of the item sold in the offer."
          },
          "item_title": {
            "type": "string",
            "description": "The title (i.e. name) of the item sold in the offer."
          },
          "item_type": {
            "type": "string",
            "enum": [
              "physical",
              "digital"
            ],
            "description": "The type of the item sold in the offer."
          },
          "offer_id": {
            "type": "string",
            "description": "The ID of the accepted sale offer."
          },
          "sale_type": {
            "type": "string",
            "description": "The type of the accepted sale offer. Possible values are update, purchase."
          }
        }
      },
      "SmsNotAcceptedData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "remaining_sum"
        ],
        "properties": {
          "remaining_sum": {
            "type": "number",
            "description": "The remaining to be paid, including fees, of the billogram."
          }
        }
      },
      "SoftReminderSentData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "delivery_method"
        ],
        "properties": {
          "delivery_method": {
            "$ref": "#/components/schemas/ReminderDeliveryMethod"
          }
        }
      },
      "TaxReportingFailedData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "tax_reporting_id",
          "errors"
        ],
        "properties": {
          "tax_reporting_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The tax report's ID. `null` if the report was rejected before it was sent to the tax authority."
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Error codes from the tax authority, e.g. `INVALID_VAT_RATE_FR`. Empty if the report was rejected before it was sent to the tax authority."
          }
        }
      },
      "UnderpaymentSettlementData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "remaining_sum",
          "amount",
          "total_sum"
        ],
        "properties": {
          "remaining_sum": {
            "type": "number",
            "description": "The remaining to be paid, including fees, of the billogram."
          },
          "amount": {
            "type": "number",
            "description": "The amount settled toward the underpayment."
          },
          "total_sum": {
            "type": "number",
            "description": "The total sum, including fees, of the billogram."
          }
        }
      },
      "WritedownData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "remaining_sum",
          "total_sum"
        ],
        "properties": {
          "remaining_sum": {
            "type": "number",
            "description": "The remaining to be paid, including fees, of the billogram."
          },
          "total_sum": {
            "type": "number",
            "description": "The total sum, including fees, of the billogram."
          }
        }
      },
      "WriteoffData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "amount",
          "remaining_sum",
          "total_sum"
        ],
        "properties": {
          "amount": {
            "type": "number",
            "description": "The amount sum for the event."
          },
          "remaining_sum": {
            "type": "number",
            "description": "The remaining to be paid, including fees, of the billogram."
          },
          "total_sum": {
            "type": "number",
            "description": "The total sum, including fees, of the billogram."
          }
        }
      },
      "AutogiroFailedEvent": {
        "title": "AutogiroFailed",
        "description": "⚠️ **IMPORTANT - legacy Autogiro event:** This event is for an older legacy solution for Autogiro payments. If you haven't been instructed to use it, please instead look at the event `PaymentFailed`.<br /><br />\nIf an order to pay via autogiro has failed for some reason. The most common reason is that the payer was missing money on their bank account.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "AutogiroFailed"
              },
              "data": {
                "$ref": "#/components/schemas/AutogiroFailedData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "BillogramCreatedEvent": {
        "title": "BillogramCreated",
        "description": "The billogram has been created.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "BillogramCreated"
              },
              "data": {
                "$ref": "#/components/schemas/BillogramCreatedData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "BillogramEndedEvent": {
        "title": "BillogramEnded",
        "description": "The billogram has ended (usually when paid or credited).",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "BillogramEnded"
              },
              "data": {
                "$ref": "#/components/schemas/BillogramEndedData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "BillogramSentEvent": {
        "title": "BillogramSent",
        "description": "The billogram has been sent.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "BillogramSent"
              },
              "data": {
                "$ref": "#/components/schemas/BillogramSentData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "CollectionEvent": {
        "title": "Collection",
        "description": "The billogram has been sent for collection.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "Collection"
              },
              "data": {
                "$ref": "#/components/schemas/CollectionData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "CollectionCancelledEvent": {
        "title": "CollectionCancelled",
        "description": "The debt collection case has been cancelled.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "CollectionCancelled"
              },
              "data": {
                "$ref": "#/components/schemas/CollectionCancelledData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "CollectionEndedEvent": {
        "title": "CollectionEnded",
        "description": "The debt collection case has ended (usually when paid or credited).",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "CollectionEnded"
              },
              "data": {
                "$ref": "#/components/schemas/CollectionEndedData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "CollectionStatusUpdateEvent": {
        "title": "CollectionStatusUpdate",
        "description": "The debt collection case status has been updated.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "CollectionStatusUpdate"
              },
              "data": {
                "$ref": "#/components/schemas/CollectionStatusUpdateData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "ConfirmedLossEvent": {
        "title": "ConfirmedLoss",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "ConfirmedLoss"
              },
              "data": {
                "$ref": "#/components/schemas/ConfirmedLossData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "CreditEvent": {
        "title": "Credit",
        "description": "A credit invoice has been created. Look at the data for the credited *amount*.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "Credit"
              },
              "data": {
                "$ref": "#/components/schemas/CreditData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "CreditAllocatedEvent": {
        "title": "CreditAllocated",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "CreditAllocated"
              },
              "data": {
                "$ref": "#/components/schemas/CreditAllocatedData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "CreditCustomerLiabilityEvent": {
        "title": "CreditCustomerLiability",
        "description": "If a recipient has paid too much to the creditor,\nfor example when a paid invoice is credited,\nthis event records a customer liability (a debt from the creditor to the customer) that must be handled.\n",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "CreditCustomerLiability"
              },
              "data": {
                "$ref": "#/components/schemas/CreditCustomerLiabilityData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "CreditPaymentEvent": {
        "title": "CreditPayment",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "CreditPayment"
              },
              "data": {
                "$ref": "#/components/schemas/CreditPaymentData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "CreditorMessageEvent": {
        "title": "CreditorMessage",
        "description": "A new message/comment from you/your company. Look at the data for actual *message*.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "CreditorMessage"
              },
              "data": {
                "$ref": "#/components/schemas/CreditorMessageData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "CustomerLiabilityReducedEvent": {
        "title": "CustomerLiabilityReduced",
        "description": "The liability to the customer has changed.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "CustomerLiabilityReduced"
              },
              "data": {
                "$ref": "#/components/schemas/CustomerLiabilityReducedData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "CustomerMessageEvent": {
        "title": "CustomerMessage",
        "description": "The billogram recipient has written/sent a message/comment. Look at the data for actual *message*.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "CustomerMessage"
              },
              "data": {
                "$ref": "#/components/schemas/CustomerMessageData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "DataChangeEvent": {
        "title": "DataChange",
        "description": "Values have changed on the billogram.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "DataChange"
              },
              "data": {
                "$ref": "#/components/schemas/DataChangeData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "DeferredCommandFailedEvent": {
        "title": "DeferredCommandFailed",
        "description": "A deferred command (such as an automated send operation after item processing) failed.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "DeferredCommandFailed"
              },
              "data": {
                "$ref": "#/components/schemas/DeferredCommandFailedData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "DeletedEvent": {
        "title": "Deleted",
        "description": "The billogram has been deleted. This event will only be available through a webhook.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "Deleted"
              },
              "data": {
                "$ref": "#/components/schemas/DeletedData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "DeliveryAcceptedEvent": {
        "title": "DeliveryAccepted",
        "description": "If you're using the delivery method `Email+Letter`, `Email`, `SMS+Letter` or `SMS` (in some cases also `Efaktura` and `Einvoice`, if the *customer_email* parameter was supplied) and the recipient has clicked the link in the email or SMS.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "DeliveryAccepted"
              },
              "data": {
                "$ref": "#/components/schemas/DeliveryAcceptedData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "DeliveryFailedEvent": {
        "title": "DeliveryFailed",
        "description": "If you're using the delivery method `EDI`, `Email+Letter`, `Letter` or `Email` and the invoice could not be delivered. This usually happens when the email has bounced due to wrong email address, when the letter was returned, or when the address is too long for the envelope window.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "DeliveryFailed"
              },
              "data": {
                "$ref": "#/components/schemas/DeliveryFailedData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "DeliverySmsFailedEvent": {
        "title": "DeliverySmsFailed",
        "description": "If you're using the delivery method `SMS+Letter` or `SMS` and the invoice via SMS could not be delivered (usually when the SMS has bounced due to invalid phone number).",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "DeliverySmsFailed"
              },
              "data": {
                "$ref": "#/components/schemas/DeliverySmsFailedData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "EDISentEvent": {
        "title": "EDISent",
        "description": "The invoice was successfully delivered via EDI to our EDI partner for processing.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "EDISent"
              },
              "data": {
                "$ref": "#/components/schemas/EDISentData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "EboxDeliveryDoneEvent": {
        "title": "EboxDeliveryDone",
        "description": "The Billogram has been forwarded to the recipient's digital mailbox.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "EboxDeliveryDone"
              },
              "data": {
                "$ref": "#/components/schemas/EboxDeliveryDoneData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "EfakturaFailedEvent": {
        "title": "EfakturaFailed",
        "description": "Deprecated. The E-faktura (electronic invoice to a Swedish internet bank) could not be delivered and needs to be resent via either email or letter.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "EfakturaFailed"
              },
              "data": {
                "$ref": "#/components/schemas/EfakturaFailedData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "EfakturaSentEvent": {
        "title": "EfakturaSent",
        "description": "Deprecated. An E-faktura (electronic invoice to a Swedish internet bank) has been sent to Bankgirot and in turn to the recipient's internet bank. The invoice will then be available in the internet bank within 12-24 hours on a normal banking day.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "EfakturaSent"
              },
              "data": {
                "$ref": "#/components/schemas/EfakturaSentData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "EinvoiceDeliveryDoneEvent": {
        "title": "EinvoiceDeliveryDone",
        "description": "The e-invoice has been forwarded to the provider for processing. EinvoiceDeliveryFailed events can be sent after this.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "EinvoiceDeliveryDone"
              },
              "data": {
                "$ref": "#/components/schemas/EinvoiceDeliveryDoneData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "EinvoiceDeliveryFailedEvent": {
        "title": "EinvoiceDeliveryFailed",
        "description": "The e-invoice could not be delivered to the recipient.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "EinvoiceDeliveryFailed"
              },
              "data": {
                "$ref": "#/components/schemas/EinvoiceDeliveryFailedData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "EmailNotAcceptedEvent": {
        "title": "EmailNotAccepted",
        "description": "If you're using the delivery method `Email+Letter` and the email has not been read within 48 hours.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "EmailNotAccepted"
              },
              "data": {
                "$ref": "#/components/schemas/EmailNotAcceptedData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "InvoiceCreationFailedEvent": {
        "title": "InvoiceCreationFailed",
        "description": "An invoice could not be created for the billogram for some reason. Please inspect and correct the billogram.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "InvoiceCreationFailed"
              },
              "data": {
                "$ref": "#/components/schemas/InvoiceCreationFailedData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "InvoiceSentEvent": {
        "title": "InvoiceSent",
        "description": "Emitted when changes to a billogram result in a full credit and a new invoice is created and sent.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "InvoiceSent"
              },
              "data": {
                "$ref": "#/components/schemas/InvoiceSentData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "ItemProcessingFailedEvent": {
        "title": "ItemProcessingFailed",
        "description": "Deferred items could not be added to the billogram. No items were added. A pending deferred command, such as Send, fails with a DeferredCommandFailed event.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "ItemProcessingFailed"
              },
              "data": {
                "$ref": "#/components/schemas/ItemProcessingFailedData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "ItemProcessingSuccessfulEvent": {
        "title": "ItemProcessingSuccessful",
        "description": "Deferred items were added to the billogram. A pending deferred command, such as Send, runs next.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "ItemProcessingSuccessful"
              },
              "data": {
                "$ref": "#/components/schemas/ItemProcessingSuccessfulData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "LetterSentEvent": {
        "title": "LetterSent",
        "description": "Directly after EmailNotAccepted or SmsNotAccepted a letter may be sent if you're using the delivery method Email+Letter or SMS+Letter.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "LetterSent"
              },
              "data": {
                "$ref": "#/components/schemas/LetterSentData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "NewInvoicePDFEvent": {
        "title": "NewInvoicePDF",
        "description": "There is a new PDF available for the billogram. This usually occurs after the billogram has been updated with new information or the billogram has been credited.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "NewInvoicePDF"
              },
              "data": {
                "$ref": "#/components/schemas/NewInvoicePDFData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "OverdueEvent": {
        "title": "Overdue",
        "description": "Invoice has passed its due date.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "Overdue"
              },
              "data": {
                "$ref": "#/components/schemas/OverdueData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "OverpaymentAdjustmentEvent": {
        "title": "OverpaymentAdjustment",
        "description": "If too much has been paid on a billogram we will, once an hour, create overpayment adjustments to send back money to the payee.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "OverpaymentAdjustment"
              },
              "data": {
                "$ref": "#/components/schemas/OverpaymentAdjustmentData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "OverpaymentCustomerLiabilityEvent": {
        "title": "OverpaymentCustomerLiability",
        "description": "If a recipient has paid twice and too much has been paid out to the creditor, for example, if funds have gone via debt collection partners or external payment service providers, an event is created to highlight the overpaid amount that should be returned.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "OverpaymentCustomerLiability"
              },
              "data": {
                "$ref": "#/components/schemas/OverpaymentCustomerLiabilityData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "PaymentEvent": {
        "title": "Payment",
        "description": "A payment has been made. Look at the data for the paid *amount*.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "Payment"
              },
              "data": {
                "$ref": "#/components/schemas/PaymentData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "PaymentFailedEvent": {
        "title": "PaymentFailed",
        "description": "A payment failed to transfer. The most common reason is an invalid mandate or insufficient funds on the account.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "PaymentFailed"
              },
              "data": {
                "$ref": "#/components/schemas/PaymentFailedData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "PaymentScheduledEvent": {
        "title": "PaymentScheduled",
        "description": "A payment has been scheduled for the invoice.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "PaymentScheduled"
              },
              "data": {
                "$ref": "#/components/schemas/PaymentScheduledData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "PaymentSystemCancelledEvent": {
        "title": "PaymentSystemCancelled",
        "description": "A payment has been cancelled by the system automatically due to invoice sum changed to 0.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "PaymentSystemCancelled"
              },
              "data": {
                "$ref": "#/components/schemas/PaymentSystemCancelledData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "PaymentSystemUpdatedEvent": {
        "title": "PaymentSystemUpdated",
        "description": "A payment has been updated by the system automatically due to invoice amount decrease or due date change.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "PaymentSystemUpdated"
              },
              "data": {
                "$ref": "#/components/schemas/PaymentSystemUpdatedData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "PaymentUserCancelledEvent": {
        "title": "PaymentUserCancelled",
        "description": "A payment has been cancelled by the recipient.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "PaymentUserCancelled"
              },
              "data": {
                "$ref": "#/components/schemas/PaymentUserCancelledData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "PaymentUserUpdatedEvent": {
        "title": "PaymentUserUpdated",
        "description": "A payment has been updated by the recipient.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "PaymentUserUpdated"
              },
              "data": {
                "$ref": "#/components/schemas/PaymentUserUpdatedData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "PurchaseAcceptedEvent": {
        "title": "PurchaseAccepted",
        "description": "Purchase request has been accepted by the partner.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "PurchaseAccepted"
              },
              "data": {
                "$ref": "#/components/schemas/PurchaseAcceptedData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "PurchaseRejectedEvent": {
        "title": "PurchaseRejected",
        "description": "Purchase request has been rejected by the partner. Look at the data for the *rejected_reason* of the rejection.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "PurchaseRejected"
              },
              "data": {
                "$ref": "#/components/schemas/PurchaseRejectedData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "PurchaseFullySettledEvent": {
        "title": "PurchaseFullySettled",
        "description": "The purchased debt has been fully settled.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "PurchaseFullySettled"
              },
              "data": {
                "$ref": "#/components/schemas/PurchaseFullySettledData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "RefundBankDetailsRequiredEvent": {
        "title": "RefundBankDetailsRequired",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "RefundBankDetailsRequired"
              },
              "data": {
                "$ref": "#/components/schemas/RefundBankDetailsRequiredData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "RefundConfirmedEvent": {
        "title": "RefundConfirmed",
        "description": "When a refund to the recipient has been confirmed by the bank.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "RefundConfirmed"
              },
              "data": {
                "$ref": "#/components/schemas/RefundConfirmedData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "SelfServiceRefundAvailableEvent": {
        "title": "SelfServiceRefundAvailable",
        "description": "A self-service refund is available after an overpayment. The recipient can use the `recipient_url` to verify their bank account.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "SelfServiceRefundAvailable"
              },
              "data": {
                "$ref": "#/components/schemas/SelfServiceRefundAvailableData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "SelfServiceRefundCancelledEvent": {
        "title": "SelfServiceRefundCancelled",
        "description": "A pending self-service refund request was cancelled, for example when superseded by another refund request.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "SelfServiceRefundCancelled"
              },
              "data": {
                "$ref": "#/components/schemas/SelfServiceRefundCancelledData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "SelfServiceRefundClaimedEvent": {
        "title": "SelfServiceRefundClaimed",
        "description": "The recipient has verified their bank account and claimed the self-service refund for payout.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "SelfServiceRefundClaimed"
              },
              "data": {
                "$ref": "#/components/schemas/SelfServiceRefundClaimedData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "ReminderSentEvent": {
        "title": "ReminderSent",
        "description": "A reminder has been sent.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "ReminderSent"
              },
              "data": {
                "$ref": "#/components/schemas/ReminderSentData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "ResentEvent": {
        "title": "Resent",
        "description": "The billogram has been re-sent.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "Resent"
              },
              "data": {
                "$ref": "#/components/schemas/ResentData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "RespiteEvent": {
        "title": "Respite",
        "description": "A respite has been given until the specified date. This may be used if the recipient informs the creditor that they cannot pay until a later date. Automatic reminders are delayed with as many days as the respite.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "Respite"
              },
              "data": {
                "$ref": "#/components/schemas/RespiteData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "RespiteRemovedEvent": {
        "title": "RespiteRemoved",
        "description": "A respite that has earlier been given is now removed.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "RespiteRemoved"
              },
              "data": {
                "$ref": "#/components/schemas/RespiteRemovedData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "RevertWritedownEvent": {
        "title": "RevertWritedown",
        "description": "An earlier writedown has been reverted.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "RevertWritedown"
              },
              "data": {
                "$ref": "#/components/schemas/RevertWritedownData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "SaleAcceptedEvent": {
        "title": "SaleAccepted",
        "description": "A `sale` offer has been accepted by a recipient.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "SaleAccepted"
              },
              "data": {
                "$ref": "#/components/schemas/SaleAcceptedData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "SmsNotAcceptedEvent": {
        "title": "SmsNotAccepted",
        "description": "If you're using the delivery method `SMS+Letter` and the invoice sent via SMS has not been read within 48 hours.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "SmsNotAccepted"
              },
              "data": {
                "$ref": "#/components/schemas/SmsNotAcceptedData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "SoftReminderSentEvent": {
        "title": "SoftReminderSent",
        "description": "A soft reminder has been sent.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "SoftReminderSent"
              },
              "data": {
                "$ref": "#/components/schemas/SoftReminderSentData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "TaxReportingFailedEvent": {
        "title": "TaxReportingFailed",
        "description": "The invoice's tax report was rejected, but the invoice was still sent. Only in markets where a rejected tax report does not stop the invoice, currently France.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "TaxReportingFailed"
              },
              "data": {
                "$ref": "#/components/schemas/TaxReportingFailedData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "UnderpaymentSettlementEvent": {
        "title": "UnderpaymentSettlement",
        "description": "An underpayment on the billogram has been settled, reconciling the remaining balance.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "UnderpaymentSettlement"
              },
              "data": {
                "$ref": "#/components/schemas/UnderpaymentSettlementData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "WritedownEvent": {
        "title": "Writedown",
        "description": "The remaining sum of the billogram has been booked as a potential loss of receivables. This is used for bookkeeping purposes.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "Writedown"
              },
              "data": {
                "$ref": "#/components/schemas/WritedownData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "WriteoffEvent": {
        "title": "Writeoff",
        "description": "An amount, such as remaining late payment interest and/or reminder fees, have been removed from the billogram.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BillogramEventBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "Writeoff"
              },
              "data": {
                "$ref": "#/components/schemas/WriteoffData"
              }
            }
          }
        ],
        "x-scalar-ignore": true
      },
      "Callbacks": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Requests for the Billogram service to actively call back when an event occurs on the billogram.",
        "properties": {
          "url": {
            "type": "string",
            "format": "url",
            "description": "The full URL to where we will do the callback HTTP POST requests. HTTPS is required."
          },
          "custom": {
            "type": "string",
            "description": "A custom value that will be included as the parameter custom on all callbacks."
          },
          "sign_key": {
            "type": "string",
            "description": "A string that we will use to create a hashed signature which is included in all callback HTTP headers. We advice you to use the sign_key value to verify the callback's authenticity when received using the Billogram-Signature header. If a sign_key is not supplied, the callback's Billogram-Signature header will be missing."
          }
        }
      },
      "EndedReason": {
        "type": "string",
        "x-scalar-ignore": true,
        "description": "The reason why the billogram was ended.\n\n- `paid` — The billogram was fully paid.\n- `credited` — The billogram was fully credited.\n- `allocated` — The billogram's remaining amount was allocated against other billograms.\n- `purchased` — The billogram was purchased by/sold to a debt collection partner.\n- `zero_sum` — The billogram ended because its total sum was zero.\n- `unknown` — The billogram ended for a reason that could not be determined.\n",
        "enum": [
          "paid",
          "credited",
          "allocated",
          "purchased",
          "zero_sum",
          "unknown"
        ]
      },
      "DeliveryMethod": {
        "type": [
          "string",
          "null"
        ],
        "x-scalar-ignore": true,
        "description": "Delivery method to use when sending a billogram.\n\n**Important:** Allowed values depend on the billogram's market and configuration (creditor settings, recipient contact details, enabled features).\nIf invalid, the API returns `400 INVALID_PARAMETER`.\n\n**Availability by market (summary)**\n\n| Market | Methods |\n|---|---|\n| Austria/Belgium/France/Germany/Netherlands/Spain | Email, SMS, Letter, Email+Letter, SMS+Letter, DoNotNotify |\n| Finland/Norway | Email, SMS, Letter, Email+Letter, SMS+Letter, Einvoice, EDI, DoNotNotify |\n| Italy | Email, SMS, Letter, Email+Letter, SMS+Letter, Einvoice, DoNotNotify |\n| Sweden | Email, SMS, Letter, Email+Letter, SMS+Letter, Einvoice, EDI, DoNotNotify |\n",
        "enum": [
          "Email",
          "SMS",
          "Letter",
          "Email+Letter",
          "SMS+Letter",
          "Einvoice",
          "EDI",
          "PDF",
          "DynamicDistribution",
          null
        ]
      },
      "ReminderDeliveryMethod": {
        "type": "string",
        "x-scalar-ignore": true,
        "enum": [
          "Email",
          "Letter",
          "SMS"
        ],
        "description": "Delivery method for reminders."
      },
      "AutomaticReminderData": {
        "type": "object",
        "x-scalar-ignore": true,
        "properties": {
          "delay_days": {
            "type": "integer",
            "minimum": 1,
            "description": "Number of business days since previous reminder (or the invoice due date for first reminder) this reminder is to go out."
          },
          "message": {
            "type": "string",
            "description": "Free-form string, a message to be included with this reminder. (maximum 1000 characters)",
            "maxLength": 1000
          },
          "type": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "STANDARD",
                  "DEBT_COLLECTION_NOTICE"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Type of automatic reminder. STANDARD is a regular reminder sent after the due date or previous reminder. DEBT_COLLECTION_NOTICE is a debt collection notice reminder (only supported in the Norwegian market). Can be null if not specified."
          }
        }
      },
      "DetailedSums": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "These are the same summary values that we show in the Billogram web frontend when you're viewing an invoice",
        "properties": {
          "credited_sum": {
            "type": "number"
          },
          "net_sum": {
            "type": "number"
          },
          "gross_sum": {
            "type": "number"
          },
          "invoice_fee_vat": {
            "type": "number"
          },
          "paid_sum": {
            "type": "number"
          },
          "interest_fee": {
            "type": "number"
          },
          "vat_sum": {
            "type": "number"
          },
          "reminder_fee": {
            "type": "number"
          },
          "invoice_fee": {
            "type": "number"
          },
          "rounding": {
            "type": "number"
          },
          "regional_sweden": {
            "type": "object",
            "properties": {
              "rotavdrag_sum": {
                "type": "number"
              }
            }
          },
          "collector_paid_sum": {
            "type": "number"
          },
          "remaining_sum": {
            "type": "number"
          }
        }
      },
      "SendBillogramRequest": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "method"
        ],
        "properties": {
          "method": {
            "$ref": "#/components/schemas/DeliveryMethod"
          }
        }
      },
      "ResendBillogramRequest": {
        "type": "object",
        "x-scalar-ignore": true,
        "additionalProperties": false,
        "properties": {
          "method": {
            "$ref": "#/components/schemas/DeliveryMethod"
          }
        },
        "description": "Optional. If omitted, the original delivery method from the billogram will be used.\n"
      },
      "RemindBillogramRequest": {
        "type": "object",
        "x-scalar-ignore": true,
        "additionalProperties": false,
        "properties": {
          "method": {
            "$ref": "#/components/schemas/ReminderDeliveryMethod"
          },
          "message": {
            "type": "string",
            "maxLength": 1000,
            "description": "Free-form long message that will be printed on the invoice."
          },
          "due_days": {
            "type": "integer",
            "minimum": 0,
            "default": 0,
            "description": "Number of calendar days until due date. Defaults to 0."
          }
        }
      },
      "Customer": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "name"
        ],
        "properties": {
          "customer_no": {
            "type": "integer",
            "description": "Unique identification for the customer. Only positive integers are allowed as customer numbers, and all customers must have a unique number. If the customer_no is modified for an existing customer, any further accesses to the customer object must be done using the new value. If no value is given when creating a customer, an automatic sequential value is generated. If you want automatic customer-numbering, please do not set this parameter at all, not even to a null value.",
            "examples": [
              12345
            ]
          },
          "name": {
            "type": "string",
            "maxLength": 100,
            "description": "Name used to identify the customer. In the case of a private person, the person's name. In case of a business, the business' name. Used for printing postal addresses on letters.",
            "examples": [
              "Terkel Testsson"
            ]
          },
          "notes": {
            "type": "string",
            "description": "Free-form text for internal notes. The contents of this field is never visible to the customer."
          },
          "org_no": {
            "type": "string",
            "description": "The personal identification number (for individuals) or organizational registration number (for businesses) of the customer. The provided value must be given as a string as an identification number is not a number in the mathematical sense. The provided value is validated according to the country-specific standard format for ID numbers and is based on the recipients country of residence. Validation is only performed for Swedish, Norwegian and Finnish markets.\n\nNot required for EDI delivery in Germany. If set, it is sent as BT-47; don't use a placeholder.\n"
          },
          "vat_no": {
            "type": "string",
            "description": "European Union VAT number of the customer. The Billogram service does not directly use this number. Should be in the format of a two-letter country code followed by the country-specific format.",
            "examples": [
              "SE556677889901"
            ]
          },
          "language": {
            "type": "string",
            "description": "Two-letter ISO 639-1 invoice language code.\n\nUse `null` or an empty string (`\"\"`) to use the market default language.\n\n**Supported languages by market:**\n\n| Market | Available languages | Default language |\n|---|---|---|\n| Sweden | `sv`, `en`, `de` | `sv` |\n| Germany | `sv`, `en`, `de` | `de` |\n| Norway | `nb` | `nb` |\n| Finland | `fi` | `fi` |\n| Austria | `de` | `de` |\n| Belgium | `de`, `fr`, `nl` | `fr` |\n| France | `fr` | `fr` |\n| The Netherlands | `nl` | `nl` |\n| Spain | `es`, `ca` | `es` |\n| Italy | `it` | `it` |\n",
            "example": "sv"
          },
          "contact": {
            "$ref": "#/components/schemas/CustomerContact"
          },
          "address": {
            "$ref": "#/components/schemas/CustomerAddress"
          },
          "letter_forwarding_enabled": {
            "type": "boolean",
            "description": "Indicate whether the letter invoices should be forwarded to a forwarding service provider or not."
          },
          "delivery_address": {
            "$ref": "#/components/schemas/CustomerDeliveryAddress"
          },
          "permanent_establishment_address": {
            "$ref": "#/components/schemas/CustomerPermanentEstablishmentAddress"
          },
          "payment_settings": {
            "$ref": "#/components/schemas/CustomerPaymentSettings"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp the customer object was first created at. May not be specified when creating or updating items, generated automatically when the customer is first created. Returned when fetching customer objects. String contains a date-time in UTC."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp the customer object was last modified at. May not be specified when creating or updating items, generated automatically every time the customer is modified. Returned when fetching customer objects. String contains a date-time in UTC."
          },
          "company_type": {
            "type": "string",
            "enum": [
              "individual",
              "business",
              "foreign individual",
              "foreign business"
            ],
            "description": "The legal status of the customer."
          },
          "edi": {
            "$ref": "#/components/schemas/CustomerEDI"
          },
          "links": {
            "$ref": "#/components/schemas/CustomerLinks"
          }
        }
      },
      "CustomerContact": {
        "type": "object",
        "x-scalar-ignore": true,
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100,
            "description": "Name of the (primary) contact person for the customer.\n\n**Peppol:** BT-56 Buyer contact point, when the billogram has no `info.your_reference`.\n"
          },
          "email": {
            "type": "string",
            "maxLength": 200,
            "format": "email",
            "description": "Email address the customer can be reached at. Used to send invoices via Email.\n\n**Peppol:** BT-58 Buyer contact email address.\n"
          },
          "phone": {
            "type": "string",
            "maxLength": 30,
            "description": "Phone number the customer can be reached at. Used to send invoices via SMS.\n\nAccepted formats:\n- Local format with a leading zero (e.g. `0701740635`): the country code is derived automatically from the customer's country setting.\n- International E.164 format with a leading `+` (e.g. `+46701740635`): explicit and required.\n\n**Peppol:** BT-57 Buyer contact telephone number, when the billogram has no `customer.phone`.\n",
            "example": "+46701740635"
          }
        }
      },
      "CustomerAddress": {
        "type": "object",
        "x-scalar-ignore": true,
        "properties": {
          "careof": {
            "type": "string",
            "maxLength": 100,
            "description": "Care-of (C/O) line to include in the address. Also see the use_careof_as_attention field."
          },
          "use_careof_as_attention": {
            "type": "boolean",
            "description": "If this flag is set to true then the careof field will instead be printed as an \"Att:\" line in the address. (It is currently not possible to have both an C/O and an Att: line in an address.)"
          },
          "attention": {
            "type": "string",
            "maxLength": 100,
            "description": "Attention line to include in the address."
          },
          "address_line_1": {
            "type": "string",
            "maxLength": 100,
            "description": "Street address part of the address (i.e. typically street name, house number, floor, apartment/room). Line breaks are not recommended.\n\n**Peppol:** BT-50 Buyer address line 1.\n"
          },
          "street_address": {
            "type": "string",
            "maxLength": 100,
            "deprecated": true,
            "description": "Street address part of the address. **Deprecated:** Use `address_line_1` instead. This field is kept for backward compatibility but will be removed in a future version.\n\n**Peppol:** BT-50 Buyer address line 1.\n"
          },
          "address_line_2": {
            "type": "string",
            "maxLength": 100,
            "description": "Additional address line to include in the address. Line breaks are not recommended.\n\n**Peppol:** BT-50 Buyer address line 1 (appended to `address_line_1`).\n"
          },
          "address_line_3": {
            "type": "string",
            "maxLength": 100,
            "description": "Additional address line to include in the address. Line breaks are not recommended."
          },
          "administrative_area": {
            "type": "string",
            "maxLength": 100,
            "description": "Administrative area (e.g. county) for the address. Not used in all countries.\n\n**Peppol:** BT-54 Buyer country subdivision.\n"
          },
          "dependent_locality": {
            "type": "string",
            "maxLength": 100,
            "description": "Dependent locality (e.g. neighborhood) for the address. Not used in all countries."
          },
          "organization": {
            "type": "string",
            "maxLength": 100,
            "description": "Organization name to print on the address."
          },
          "sorting_code": {
            "type": "string",
            "maxLength": 10,
            "description": "Sorting code for the address. Not used in all countries."
          },
          "zipcode": {
            "type": "string",
            "description": "Postal code for the address\n\n**Peppol:** BT-53 Buyer post code.\n"
          },
          "city": {
            "type": "string",
            "maxLength": 30,
            "description": "City name for the address.\n\n**Peppol:** BT-52 Buyer city.\n"
          },
          "country": {
            "type": "string",
            "description": "Country for the address and the customer. Must be a two-letter ISO 3166-1 alpha-2 format code. Converted to uppercase in the Billogram system.\n\n**Peppol:** BT-55 Buyer country code.\n",
            "examples": [
              "SE"
            ]
          }
        }
      },
      "CustomerDeliveryAddress": {
        "type": "object",
        "x-scalar-ignore": true,
        "properties": {
          "name": {
            "type": "string",
            "description": "Name to print on the address.\n\n**Peppol:** BT-70 Deliver to party name.\n"
          },
          "address_line_1": {
            "type": "string",
            "maxLength": 100,
            "description": "Street address part of the address (i.e. typically street name, house number, floor, apartment/room). Line breaks may not work.\n\n**Peppol:** BT-75 Deliver to address line 1.\n"
          },
          "street_address": {
            "type": "string",
            "maxLength": 100,
            "deprecated": true,
            "description": "Street address part of the address. **Deprecated:** Use `address_line_1` instead. This field is kept for backward compatibility but will be removed in a future version.\n\n**Peppol:** BT-75 Deliver to address line 1.\n"
          },
          "address_line_2": {
            "type": "string",
            "maxLength": 100,
            "description": "Additional address line to include in the address. Line breaks are not recommended.\n\n**Peppol:** BT-76 Deliver to address line 2.\n"
          },
          "address_line_3": {
            "type": "string",
            "maxLength": 100,
            "description": "Additional address line to include in the address. Line breaks are not recommended."
          },
          "administrative_area": {
            "type": "string",
            "maxLength": 100,
            "description": "Administrative area (e.g. county) for the address. Not used in all countries.\n\n**Peppol:** BT-79 Deliver to country subdivision.\n"
          },
          "dependent_locality": {
            "type": "string",
            "maxLength": 100,
            "description": "Dependent locality (e.g. neighborhood) for the address. Not used in all countries."
          },
          "organization": {
            "type": "string",
            "maxLength": 100,
            "description": "Organization name to print on the address."
          },
          "sorting_code": {
            "type": "string",
            "maxLength": 10,
            "description": "Sorting code for the address. Not used in all countries."
          },
          "careof": {
            "type": "string",
            "maxLength": 100,
            "description": "Care-of (c/o) line to include in the address."
          },
          "attention": {
            "type": "string",
            "maxLength": 100,
            "description": "Attention line to include in the address."
          },
          "zipcode": {
            "type": "string",
            "description": "Postal code for the address.\n\n**Peppol:** BT-78 Deliver to post code.\n"
          },
          "city": {
            "type": "string",
            "maxLength": 30,
            "description": "City name for the address.\n\n**Peppol:** BT-77 Deliver to city.\n"
          },
          "country": {
            "type": "string",
            "description": "Country for the address. Must be a two-letter ISO 3166-1 alpha-2 format code if specified. Converted to lowercase in the Billogram system.\n\n**Peppol:** BT-80 Deliver to country code.\n"
          }
        }
      },
      "CustomerPermanentEstablishmentAddress": {
        "type": "object",
        "x-scalar-ignore": true,
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100,
            "description": "Given or full name to print on the address."
          },
          "additional_name": {
            "type": "string",
            "maxLength": 100,
            "description": "Additional name to print on the address."
          },
          "family_name": {
            "type": "string",
            "maxLength": 100,
            "description": "Family name to print on the address."
          },
          "address_line_1": {
            "type": "string",
            "maxLength": 100,
            "description": "Street address part of the address (i.e. typically street name, house number, floor, apartment/room). Line breaks may not work."
          },
          "address_line_2": {
            "type": "string",
            "maxLength": 100,
            "description": "Additional address line to include in the address. Line breaks are not recommended."
          },
          "address_line_3": {
            "type": "string",
            "maxLength": 100,
            "description": "Additional address line to include in the address. Line breaks are not recommended."
          },
          "administrative_area": {
            "type": "string",
            "maxLength": 100,
            "description": "Administrative area (e.g. county) for the address. Not used in all countries."
          },
          "dependent_locality": {
            "type": "string",
            "maxLength": 100,
            "description": "Dependent locality (e.g. neighborhood) for the address. Not used in all countries."
          },
          "organization": {
            "type": "string",
            "maxLength": 100,
            "description": "Organization name to print on the address."
          },
          "sorting_code": {
            "type": "string",
            "maxLength": 10,
            "description": "Sorting code for the address. Not used in all countries."
          },
          "zipcode": {
            "type": "string",
            "description": "Postal code for the address."
          },
          "city": {
            "type": "string",
            "maxLength": 30,
            "description": "City name for the address."
          },
          "country": {
            "type": "string",
            "description": "Country for the address. Must be a two-letter ISO 3166-1 alpha-2 format code if specified. Converted to lowercase in the Billogram system."
          }
        }
      },
      "CustomerPaymentSettings": {
        "type": "object",
        "x-scalar-ignore": true,
        "properties": {
          "recurring_payment_type": {
            "type": "string",
            "enum": [
              "autogiro",
              "null"
            ],
            "description": "The type of the recurring payment for the customer."
          }
        }
      },
      "CustomerEDI": {
        "type": "object",
        "x-scalar-ignore": true,
        "properties": {
          "electronic_id": {
            "type": "string",
            "description": "The electronic ID of the customer. Often a GLN or organization number. Must be between 10 and 19 characters.\n\n**Peppol:** BT-49 Buyer electronic address, when the billogram has no `customer.edi.electronic_id`.\n"
          },
          "operator": {
            "$ref": "#/components/schemas/EDIOperator"
          },
          "subtype": {
            "type": "string",
            "deprecated": true
          },
          "reference": {
            "type": "string",
            "maxLength": 100,
            "description": "The reference for the EDI invoice."
          }
        }
      },
      "CustomerLinks": {
        "type": "object",
        "x-scalar-ignore": true,
        "properties": {
          "automatic_payments_setup_link": {
            "type": "string",
            "description": "URL to the entry point for automatic payments setup. Can be used by the customer to activate automatic payments prior to receiving their first Billogram. Requires that the automatic payments setup links feature is activated on the Billogram business account, contact Billogram support for more information."
          }
        }
      },
      "CustomerBalance": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "total_outstanding",
          "net_balance",
          "doubtful_debt"
        ],
        "properties": {
          "total_outstanding": {
            "type": "object",
            "description": "Total outstanding receivables for the customer, including doubtful debt.",
            "required": [
              "value",
              "currency"
            ],
            "properties": {
              "value": {
                "type": "string",
                "description": "Amount as a decimal string.",
                "examples": [
                  "4.50"
                ]
              },
              "currency": {
                "type": "string",
                "nullable": true,
                "description": "ISO 4217 currency code. Null when the customer has no bookkeeping amounts.",
                "examples": [
                  "EUR"
                ]
              }
            }
          },
          "net_balance": {
            "type": "object",
            "description": "Total outstanding receivables for the customer, excluding doubtful debt.",
            "required": [
              "value",
              "currency"
            ],
            "properties": {
              "value": {
                "type": "string",
                "description": "Amount as a decimal string.",
                "examples": [
                  "4.50"
                ]
              },
              "currency": {
                "type": "string",
                "nullable": true,
                "description": "ISO 4217 currency code. Null when the customer has no bookkeeping amounts.",
                "examples": [
                  "EUR"
                ]
              }
            }
          },
          "doubtful_debt": {
            "type": "object",
            "description": "Doubtful debt for the customer, included in total outstanding but excluded from net balance.",
            "required": [
              "value",
              "currency"
            ],
            "properties": {
              "value": {
                "type": "string",
                "description": "Amount as a decimal string.",
                "examples": [
                  "4.50"
                ]
              },
              "currency": {
                "type": "string",
                "nullable": true,
                "description": "ISO 4217 currency code. Null when the customer has no bookkeeping amounts.",
                "examples": [
                  "EUR"
                ]
              }
            }
          }
        }
      },
      "CustomerEinvoiceRegistration": {
        "type": "object",
        "x-scalar-ignore": true,
        "additionalProperties": false,
        "description": "Customer e-invoice registration.\n\nThe response contains **one** market-specific registration object.\n",
        "required": [
          "status",
          "registered_at"
        ],
        "properties": {
          "status": {
            "type": "string",
            "description": "Registration status.",
            "examples": [
              "registered"
            ]
          },
          "registered_at": {
            "type": "string",
            "format": "date-time",
            "description": "Registration date/time (ISO 8601).",
            "examples": [
              "2026-01-14T09:31:45.958263+00:00"
            ]
          },
          "regional_sweden": {
            "$ref": "#/components/schemas/CustomerEinvoiceRegistrationRegionalSweden"
          },
          "regional_italy": {
            "$ref": "#/components/schemas/CustomerEinvoiceRegistrationRegionalItaly"
          }
        },
        "oneOf": [
          {
            "type": "object",
            "required": [
              "regional_sweden"
            ]
          },
          {
            "type": "object",
            "required": [
              "regional_italy"
            ]
          }
        ]
      },
      "CustomerEinvoiceRegistrationRequest": {
        "description": "Request payload for creating or updating a customer's e-invoice registration.\n\n**Available markets**\n- Sweden: `identifier`\n- Italy: `pec`, `codice_destinatario`\n",
        "oneOf": [
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/CustomerEinvoiceRegistrationRegionalSweden"
              },
              {
                "type": "object",
                "required": [
                  "identifier"
                ],
                "properties": {
                  "identifier": {
                    "type": "string"
                  }
                }
              }
            ]
          },
          {
            "$ref": "#/components/schemas/CustomerEinvoiceRegistrationRegionalItaly"
          }
        ],
        "x-scalar-ignore": true
      },
      "CustomerEinvoiceRegistrationRegionalSweden": {
        "type": "object",
        "x-scalar-ignore": true,
        "additionalProperties": false,
        "description": "Market-specific details for Swedish e-invoice registrations.\n\n**Identifier format**\n- 12 digits\n- a dot `.`\n- 2–4 letters (bank code)\n- optional suffix `.se`\n\nExamples:\n- `198802276322.SBF.SE`\n- `198802276322.sbf.se`\n",
        "properties": {
          "identifier": {
            "type": "string",
            "description": "The e-invoice identifier of the customer.",
            "pattern": "^([0-9]{12})\\.([A-Za-z]{2,4})(\\.[sS][eE])?$",
            "examples": [
              "198802276322.SBF.SE"
            ]
          },
          "fmi": {
            "type": "string",
            "deprecated": true,
            "readOnly": true,
            "description": "Legacy field name observed in API responses for Sweden.\n\nUse `identifier` in write operations where supported.\n",
            "pattern": "^([0-9]{12})\\.([A-Za-z]{2,4})(\\.[sS][eE])?$",
            "examples": [
              "198802276322.SBF.SE"
            ]
          }
        },
        "anyOf": [
          {
            "type": "object",
            "required": [
              "identifier"
            ]
          },
          {
            "type": "object",
            "required": [
              "fmi"
            ]
          }
        ]
      },
      "CustomerEinvoiceRegistrationRegionalItaly": {
        "type": "object",
        "x-scalar-ignore": true,
        "additionalProperties": false,
        "description": "Market-specific details for Italian e-invoice registrations.",
        "properties": {
          "pec": {
            "type": "string",
            "description": "Certified email address (PEC) for the customer.",
            "examples": [
              "test@email.com"
            ]
          },
          "codice_destinatario": {
            "type": "string",
            "description": "Recipient code (Codice Destinatario) for the customer.",
            "examples": [
              "12345AB"
            ]
          }
        },
        "anyOf": [
          {
            "type": "object",
            "required": [
              "pec"
            ]
          },
          {
            "type": "object",
            "required": [
              "codice_destinatario"
            ]
          }
        ]
      },
      "Item": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "title",
          "price",
          "vat",
          "unit"
        ],
        "properties": {
          "item_no": {
            "type": "string",
            "description": "Identification for the item. Always present on existing items. If no item_no is given when creating an item object, a new number is generated and assigned automatically. The item number is a string and may contain other characters than just numerals. Must be unique. If the item_no is changed on an item object, the new value must be used to refer to it from that point. If you want automatic item-numbering, please do not set this parameter at all, not even to a null value. The max length for item_no is 30 characters IF the value is non-numeric, otherwise (if the value is numeric) the max value is 999999999.",
            "examples": [
              "207",
              "42-B081"
            ]
          },
          "title": {
            "type": "string",
            "maxLength": 100,
            "description": "The short text given for the item. Should generally be a human-readable description of the product or service sold. Must not be empty.",
            "examples": [
              "Apartment cleaning"
            ]
          },
          "description": {
            "type": "string",
            "maxLength": 200,
            "description": "A longer description for the item. Appears below the main item row on an invoice. Can be used to e.g detail the work performed in the case of services.",
            "examples": [
              "Vacuum cleaning floor, dusting shelves and taking out trash"
            ]
          },
          "price": {
            "type": "number",
            "description": "The cost per unit of the item. May be positive, zero or negative.",
            "examples": [
              130
            ]
          },
          "vat": {
            "type": "number",
            "description": "VAT rate applied to this item, in percent. No more than two decimals allowed, for example 10.25 is valid, but 10.255 is not. All values between 0 and 100 are valid, but if you wish to use Swedish VAT rates, you should use: 0, 6, 12 or 25",
            "examples": [
              25
            ]
          },
          "zero_vat_reason": {
            "$ref": "#/components/schemas/ZeroVatReason"
          },
          "zero_vat_reason_reference": {
            "$ref": "#/components/schemas/ZeroVatReasonReference"
          },
          "unit": {
            "type": "string",
            "enum": [
              "unit",
              "hour",
              "day",
              "month",
              "year",
              "quarter",
              "kg",
              "gram",
              "kWh",
              "ton",
              "meter",
              "mm",
              "km",
              "m2",
              "m3",
              "litre",
              "minute",
              "second",
              "GB",
              "MB",
              "-"
            ],
            "description": "Unit of measure for the item.",
            "examples": [
              "hour"
            ]
          },
          "bookkeeping": {
            "$ref": "#/components/schemas/ItemBookkeeping"
          },
          "created_at": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "readOnly": true,
            "description": "Timestamp the item object was first created at. May not be specified when creating or updating items, generated automatically when the item is first created. Returned when fetching item objects. String contains a date-time in UTC in format YYYY-MM-DD HH:MM:SS.",
            "example": "2026-01-26 07:02:23"
          },
          "updated_at": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "readOnly": true,
            "description": "Timestamp the item object was last modified at. May not be specified when creating or updating items, generated automatically every time the item is modified. Returned when fetching item objects. String contains a date-time in UTC in format YYYY-MM-DD HH:MM:SS.",
            "example": "2026-01-30 14:00:10"
          }
        }
      },
      "ItemBookkeeping": {
        "type": "object",
        "x-scalar-ignore": true,
        "properties": {
          "income_account": {
            "type": "string",
            "description": "Account number for payments received for this item. If left out or blank, the item uses the default account set up.",
            "examples": [
              "302"
            ]
          },
          "vat_account": {
            "type": "string",
            "description": "Account number for VAT payments received for this item. If left out or blank, the item uses the default account set up.",
            "examples": [
              "303"
            ]
          }
        }
      },
      "ZeroVatReason": {
        "type": "string",
        "x-scalar-ignore": true,
        "enum": [
          "VAT_EXEMPT",
          "ZERO_RATE_VAT",
          "EXPORT_VAT",
          "INTRA_COMMUNITY",
          "CONSTRUCTION_SERVICES",
          "OUTSIDE_SCOPE",
          "FR_FRANCHISE",
          "FR_CNWVAT",
          "FR_CGI261_3"
        ],
        "description": "The reason for 0% VAT rate on the item. Only allowed when vat is 0. Required only in Italian market if vat is set to 0.\n\n- VAT_EXEMPT: no VAT is charged for this item. Businesses cannot reclaim VAT on their inputs related to these supplies\n- ZERO_RATE_VAT: taxable service or good, but VAT rate is 0%. Businesses can reclaim VAT on their inputs related to these supplies\n- EXPORT_VAT: goods or services sold to customers outside the country. Businesses can reclaim VAT on their inputs related to these exports\n- INTRA_COMMUNITY: supply to a business in another EU country; the customer accounts for VAT\n- CONSTRUCTION_SERVICES: domestic reverse charge on construction services; the customer accounts for VAT\n- OUTSIDE_SCOPE: amount outside the scope of VAT, e.g. costs paid on the customer's behalf (débours). Billogram sets VATEX-EU-O\n- FR_FRANCHISE: French small business VAT exemption (franchise en base). Billogram sets VATEX-FR-FRANCHISE\n- FR_CNWVAT: French domestic credit note without VAT, the supplier forfeits the VAT on the discount. Billogram sets VATEX-FR-CNWVAT\n- FR_CGI261_3: exempt under article 261 (3) of the French tax code (CGI). Billogram sets VATEX-FR-CGI261-3\n"
      },
      "ZeroVatReasonReference": {
        "type": "string",
        "maxLength": 200,
        "x-scalar-ignore": true,
        "description": "Legal reference for the 0% VAT reason. Required whenever zero_vat_reason is set, except OUTSIDE_SCOPE, FR_FRANCHISE, FR_CNWVAT and FR_CGI261_3, where Billogram sets the VATEX code and ignores this field."
      },
      "ErrorResponse": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "status",
          "data"
        ],
        "properties": {
          "status": {
            "type": "string",
            "description": "Machine-readable error identifier for programmatic handling.",
            "enum": [
              "INVALID_PARAMETER",
              "READ_ONLY_PARAMETER",
              "UNKNOWN_PARAMETER",
              "INVALID_PARAMETER_COMBINATION",
              "INVALID_OBJECT_STATE",
              "MISSING_AUTH",
              "PERMISSION_DENIED",
              "INVALID_AUTH",
              "MISSING_QUERY_PARAMETER",
              "INVALID_QUERY_PARAMETER",
              "NOT_FOUND",
              "NOT_AVAILABLE_YET",
              "INTERNAL_ERROR",
              "BAD_GATEWAY",
              "SERVICE_UNAVAILABLE",
              "TOO_MANY_CONCURRENT_API_CONNECTIONS",
              "GATEWAY_TIMEOUT"
            ]
          },
          "data": {
            "type": "object",
            "description": "Contains structured details regarding the specific error.",
            "properties": {
              "message": {
                "type": "string",
                "description": "Human-readable explanation intended for developer debugging or end-user display."
              }
            }
          }
        }
      },
      "PaymentSource": {
        "type": "object",
        "x-scalar-ignore": true,
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "ACTIVE",
              "DISABLED",
              "CANCELLED"
            ]
          },
          "scheme": {
            "type": "string",
            "enum": [
              "SEPA_DIRECT_DEBIT",
              "AVTALEGIRO"
            ]
          },
          "details": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SepaMandate"
              },
              {
                "type": "object",
                "description": "Placeholder for AVTALEGIRO details (currently empty, may be extended later)"
              }
            ]
          }
        },
        "required": [
          "id",
          "status",
          "scheme"
        ]
      },
      "PaymentSourceListResponse": {
        "type": "object",
        "x-scalar-ignore": true,
        "properties": {
          "status": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentSource"
            }
          }
        }
      },
      "SepaMandate": {
        "type": "object",
        "x-scalar-ignore": true,
        "properties": {
          "reference": {
            "type": "string"
          },
          "iban": {
            "type": "string"
          },
          "signed_at": {
            "type": "string",
            "format": "date-time",
            "description": "Date and time when the mandate was signed. Returned in ISO 8601 format (e.g., \"2023-02-01T00:00:00\").",
            "examples": [
              "2023-02-01T00:00:00"
            ]
          }
        },
        "required": [
          "reference",
          "iban",
          "signed_at"
        ]
      },
      "SepaMandateImport": {
        "type": "object",
        "x-scalar-ignore": true,
        "properties": {
          "customer_no": {
            "type": "integer",
            "minimum": 1
          },
          "iban": {
            "type": "string"
          },
          "signed_at": {
            "type": "string",
            "format": "date-time",
            "description": "Date and time when the mandate was signed.  Must be provided in format \"YYYY-MM-DD HH:MM:SS\" (e.g., \"2023-02-01 00:00:00\").  Note: This format differs from the response format which uses ISO 8601.\n",
            "examples": [
              "2023-02-01 00:00:00"
            ]
          }
        },
        "required": [
          "customer_no",
          "iban",
          "signed_at"
        ]
      },
      "SepaMandateImportResponse": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Response schema for importing a SEPA Direct Debit mandate",
        "properties": {
          "status": {
            "type": "string",
            "description": "Response status indicator",
            "examples": [
              "OK"
            ]
          },
          "data": {
            "type": "object",
            "description": "The imported mandate data",
            "properties": {
              "iban": {
                "type": "string",
                "description": "The IBAN of the mandate",
                "examples": [
                  "DE89370400440532013000"
                ]
              },
              "signed_at": {
                "type": "string",
                "format": "date-time",
                "description": "Date and time when the mandate was signed.  Returned in ISO 8601 format with microseconds (e.g., \"2023-02-01T00:00:00.000000Z\").\n",
                "examples": [
                  "2023-02-01T00:00:00.000000Z"
                ]
              },
              "customer_no": {
                "type": "integer",
                "description": "The customer number of the mandate",
                "examples": [
                  1
                ]
              }
            },
            "required": [
              "iban",
              "signed_at",
              "customer_no"
            ]
          }
        },
        "required": [
          "status",
          "data"
        ]
      },
      "SepaMandateMigration": {
        "type": "object",
        "x-scalar-ignore": true,
        "properties": {
          "customer_no": {
            "type": "integer",
            "minimum": 1
          },
          "iban": {
            "type": "string",
            "description": "The IBAN of the mandate",
            "examples": [
              "DE89370400440532013000"
            ]
          },
          "signed_date": {
            "type": "string",
            "format": "date",
            "description": "Date when the mandate was signed. Must be provided in ISO 8601 date format (e.g., \"2023-02-01\").\n",
            "examples": [
              "2023-02-01"
            ]
          },
          "amendment": {
            "type": "object",
            "description": "The existing mandate details being amended as part of the migration.\n",
            "properties": {
              "sepa_creditor_identifier": {
                "type": "string",
                "description": "The SEPA creditor identifier for the existing mandate. This is commonly called \"Creditor ID\", \"SEPA Creditor ID\", or \"CID\" by other PSPs and banks. Provide the same creditor identifier that the mandate currently has in your previous provider.\n",
                "examples": [
                  "DE02ZZZ123456789"
                ]
              },
              "unique_mandate_reference": {
                "type": "string",
                "description": "The current unique mandate reference that will be amended\n",
                "examples": [
                  "4G4JQUA2LUQQBDEV7L9EQM7HAT"
                ]
              }
            },
            "required": [
              "sepa_creditor_identifier",
              "unique_mandate_reference"
            ]
          }
        },
        "required": [
          "customer_no",
          "iban",
          "signed_date",
          "amendment"
        ]
      },
      "SepaMandateMigrationResponse": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Response schema for migrating a SEPA Direct Debit mandate",
        "properties": {
          "status": {
            "type": "string",
            "description": "Response status indicator",
            "examples": [
              "OK"
            ]
          },
          "data": {
            "type": "object",
            "description": "The migrated mandate data",
            "properties": {
              "customer_no": {
                "type": "integer",
                "description": "The customer number of the mandate",
                "examples": [
                  1
                ]
              },
              "iban": {
                "type": "string",
                "description": "The IBAN of the mandate",
                "examples": [
                  "DE89370400440532013000"
                ]
              },
              "signed_date": {
                "type": "string",
                "format": "date",
                "description": "Date when the mandate was signed. Returned in ISO 8601 date format (e.g., \"2023-02-01\").\n",
                "examples": [
                  "2023-02-01"
                ]
              },
              "sepa_creditor_identifier": {
                "type": "string",
                "description": "The SEPA creditor identifier assigned to the migrated mandate",
                "examples": [
                  "DE98ZZZ099999999"
                ]
              },
              "unique_mandate_reference": {
                "type": "string",
                "description": "The unique mandate reference assigned to the migrated mandate",
                "examples": [
                  "87LBRXHD3XY6HM6CDD4L979FBW"
                ]
              }
            },
            "required": [
              "customer_no",
              "iban",
              "signed_date",
              "sepa_creditor_identifier",
              "unique_mandate_reference"
            ]
          }
        },
        "required": [
          "status",
          "data"
        ]
      },
      "PaymentSourceCancellationResponse": {
        "type": "object",
        "x-scalar-ignore": true,
        "properties": {
          "status": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/PaymentSource"
          }
        }
      },
      "Offer": {
        "description": "An offer that can be attached to invoices.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/BannerOffer"
          },
          {
            "$ref": "#/components/schemas/SaleOffer"
          }
        ],
        "x-scalar-ignore": true,
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "banner": "#/components/schemas/BannerOffer",
            "sale": "#/components/schemas/SaleOffer"
          }
        }
      },
      "OfferBase": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "offer_id",
          "type",
          "title",
          "text",
          "media"
        ],
        "properties": {
          "offer_id": {
            "type": "string",
            "maxLength": 30,
            "pattern": "^[A-Za-z0-9]+$",
            "description": "Identifier for the offer. Case-insensitive, must be unique and non-blank.\nAllowed characters: alphanumeric.\n",
            "examples": [
              "banner001"
            ]
          },
          "type": {
            "type": "string",
            "description": "The offer type.",
            "enum": [
              "banner",
              "sale"
            ]
          },
          "title": {
            "type": "string",
            "maxLength": 200,
            "description": "Short title shown in both banner and sale offers."
          },
          "text": {
            "type": "string",
            "maxLength": 1000,
            "description": "Body text shown in both banner and sale offers."
          },
          "media": {
            "$ref": "#/components/schemas/OfferMedia"
          },
          "link_text": {
            "type": "string",
            "description": "Link label shown together with the offer, if provided.\n\nNote: This field may be returned if provided, but is currently not used by the product/UI.\n"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Timestamp when the offer was created (UTC)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Timestamp when the offer was last modified (UTC)."
          }
        }
      },
      "OfferMedia": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "picture",
          "picture_type"
        ],
        "properties": {
          "picture": {
            "type": "string",
            "format": "byte",
            "description": "Base64-encoded PNG image content.",
            "contentEncoding": "base64",
            "contentMediaType": "image/png"
          },
          "picture_type": {
            "type": "string",
            "enum": [
              "image/png"
            ],
            "description": "The file type of the picture."
          }
        }
      },
      "BannerOffer": {
        "x-scalar-ignore": true,
        "allOf": [
          {
            "$ref": "#/components/schemas/OfferBase"
          },
          {
            "type": "object",
            "required": [
              "info_link"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "banner"
                ]
              },
              "info_link": {
                "type": "string",
                "maxLength": 1000,
                "pattern": "^https?://",
                "description": "URL the recipient is redirected to when clicking the offer."
              }
            }
          }
        ]
      },
      "SaleOffer": {
        "x-scalar-ignore": true,
        "allOf": [
          {
            "$ref": "#/components/schemas/OfferBase"
          },
          {
            "type": "object",
            "required": [
              "sale_type",
              "detailed_title",
              "detailed_text",
              "terms_link",
              "item"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "sale"
                ]
              },
              "sale_type": {
                "type": "string",
                "enum": [
                  "purchase",
                  "upgrade"
                ],
                "description": "Whether the offer is a one-time purchase or an upgrade."
              },
              "detailed_title": {
                "type": "string",
                "maxLength": 200,
                "description": "Title shown in the expanded overlay."
              },
              "detailed_text": {
                "type": "string",
                "maxLength": 1000,
                "description": "Body text shown in the expanded overlay."
              },
              "info_link": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 1000,
                    "pattern": "^https?://"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Optional URL providing additional information to the recipient."
              },
              "terms_link": {
                "type": "string",
                "maxLength": 1000,
                "pattern": "^https?://",
                "description": "URL to the creditor's terms and conditions shown before accepting."
              },
              "invoice_within_days": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 0,
                "maximum": 9999,
                "description": "Number of days until the recipient can expect to be invoiced for an accepted item.\n\n**Rule:** Required when `sale_type=purchase`. Must be omitted or null when `sale_type=upgrade`.\n"
              },
              "item": {
                "$ref": "#/components/schemas/SaleOfferItem"
              }
            },
            "if": {
              "properties": {
                "sale_type": {
                  "const": "purchase"
                }
              }
            },
            "then": {
              "type": "object",
              "required": [
                "invoice_within_days"
              ]
            },
            "else": {
              "properties": {
                "invoice_within_days": {
                  "type": "null"
                }
              }
            }
          }
        ]
      },
      "SaleOfferItem": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "type",
          "title",
          "recurring_cost_type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "digital",
              "physical"
            ],
            "description": "Indicates whether the item is digital or physical."
          },
          "title": {
            "type": "string",
            "maxLength": 200,
            "description": "Item title (name)."
          },
          "price": {
            "type": [
              "number",
              "null"
            ],
            "format": "float",
            "description": "Item price including VAT.\nIf omitted, it is treated as 0.00 in the UI.\n"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency of the price (e.g. `SEK`).",
            "examples": [
              "SEK"
            ]
          },
          "activation_within_days": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 9999,
            "description": "**Rule:** Required if `type=digital`. Must be omitted otherwise.\n"
          },
          "delivery_within_days": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 9999,
            "description": "**Rule:** Required if `type=physical`. Must be omitted otherwise.\n"
          },
          "recurring_cost_type": {
            "type": "string",
            "enum": [
              "none",
              "month",
              "year"
            ],
            "description": "Whether the item is a one-time purchase or recurring."
          }
        }
      },
      "OfferReference": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "offer_id"
        ],
        "properties": {
          "offer_id": {
            "type": "string",
            "description": "Offer identifier."
          }
        }
      },
      "OfferCreateRequest": {
        "description": "Offer payload when creating an offer.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/BannerOffer"
          },
          {
            "$ref": "#/components/schemas/SaleOffer"
          }
        ],
        "x-scalar-ignore": true,
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "banner": "#/components/schemas/BannerOffer",
            "sale": "#/components/schemas/SaleOffer"
          }
        }
      },
      "OfferUpdateRequest": {
        "description": "Partial offer payload. Include only fields you want to update.\n\nNote: Changing an offer's `type` is not supported.\n",
        "anyOf": [
          {
            "$ref": "#/components/schemas/BannerOfferUpdate"
          },
          {
            "$ref": "#/components/schemas/SaleOfferUpdate"
          }
        ],
        "x-scalar-ignore": true
      },
      "BannerOfferUpdate": {
        "type": "object",
        "x-scalar-ignore": true,
        "additionalProperties": false,
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 200
          },
          "text": {
            "type": "string",
            "maxLength": 1000
          },
          "info_link": {
            "type": "string",
            "maxLength": 1000,
            "pattern": "^https?://"
          },
          "media": {
            "$ref": "#/components/schemas/OfferMedia"
          }
        }
      },
      "SaleOfferUpdate": {
        "type": "object",
        "x-scalar-ignore": true,
        "additionalProperties": false,
        "properties": {
          "sale_type": {
            "type": "string",
            "enum": [
              "purchase",
              "upgrade"
            ]
          },
          "title": {
            "type": "string",
            "maxLength": 200
          },
          "text": {
            "type": "string",
            "maxLength": 1000
          },
          "detailed_title": {
            "type": "string",
            "maxLength": 200
          },
          "detailed_text": {
            "type": "string",
            "maxLength": 1000
          },
          "info_link": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1000,
                "pattern": "^https?://"
              },
              {
                "type": "null"
              }
            ]
          },
          "terms_link": {
            "type": "string",
            "maxLength": 1000,
            "pattern": "^https?://"
          },
          "invoice_within_days": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 9999
          },
          "media": {
            "$ref": "#/components/schemas/OfferMedia"
          },
          "item": {
            "$ref": "#/components/schemas/SaleOfferItem"
          }
        }
      },
      "OfferListMeta": {
        "type": "object",
        "x-scalar-ignore": true,
        "additionalProperties": false,
        "properties": {
          "total_count": {
            "type": "integer",
            "description": "Total number of offers matching the query (ignores page size)."
          }
        }
      },
      "BillogramEventListMeta": {
        "type": "object",
        "x-scalar-ignore": true,
        "additionalProperties": false,
        "properties": {
          "total_count": {
            "type": "integer",
            "description": "Total number of billogram events matching the query (ignores page size)."
          }
        }
      },
      "BillogramAttachmentResponse": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "status",
          "data"
        ],
        "properties": {
          "status": {
            "type": "string",
            "description": "Operation status.",
            "examples": [
              "OK"
            ]
          },
          "data": {
            "$ref": "#/components/schemas/BillogramAttachment"
          }
        }
      },
      "BillogramAttachment": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "file_type",
          "content",
          "filename"
        ],
        "description": "Billogram attachment payload.",
        "properties": {
          "file_type": {
            "type": "string",
            "description": "MIME type of the attachment.",
            "examples": [
              "application/pdf"
            ]
          },
          "filename": {
            "type": "string",
            "description": "Original filename of the attachment.",
            "examples": [
              "attachement_filename.pdf"
            ]
          },
          "content": {
            "type": "string",
            "format": "byte",
            "description": "Base64-encoded file content.",
            "contentEncoding": "base64",
            "contentMediaType": "application/pdf",
            "examples": [
              "JVBERi0xLjQKJeLjz9MK"
            ]
          }
        }
      },
      "BillingTabDetailsResponse": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "status",
          "data"
        ],
        "properties": {
          "status": {
            "type": "string",
            "examples": [
              "OK"
            ]
          },
          "data": {
            "$ref": "#/components/schemas/BillingTabDetailsData"
          }
        }
      },
      "BillingTabDetailsData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "customer",
          "billing_tab",
          "items"
        ],
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/BillingTabCustomer"
          },
          "billing_tab": {
            "$ref": "#/components/schemas/BillingTabInfo"
          },
          "items": {
            "type": "array",
            "description": "Items currently on the billing tab.",
            "items": {
              "$ref": "#/components/schemas/BillingTabItem"
            }
          }
        }
      },
      "BillingTabCustomer": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "customer_number"
        ],
        "properties": {
          "customer_number": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Customer number (digits only).",
            "examples": [
              "12345"
            ]
          }
        }
      },
      "BillingTabInfo": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "id",
          "billing_date"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Billing tab ID."
          },
          "billing_date": {
            "type": "string",
            "format": "date",
            "description": "Scheduled billing date.",
            "examples": [
              "2025-10-01"
            ]
          }
        }
      },
      "BillingTabItem": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "item_id",
          "created_at",
          "billogram_item"
        ],
        "properties": {
          "item_id": {
            "type": "string",
            "format": "uuid",
            "description": "Billing tab item ID."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the item was added (UTC)."
          },
          "billogram_item": {
            "$ref": "#/components/schemas/BillogramItem"
          }
        }
      },
      "BillingTabItemCreatedData": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "billing_tab_id",
          "item_id",
          "created_at",
          "billogram_item"
        ],
        "properties": {
          "billing_tab_id": {
            "type": "string",
            "format": "uuid",
            "description": "Billing tab ID the item was added to."
          },
          "item_id": {
            "type": "string",
            "format": "uuid",
            "description": "Created billing tab item ID."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (UTC)."
          },
          "billogram_item": {
            "$ref": "#/components/schemas/BillogramItem"
          }
        }
      },
      "BillingTabItemCreatedResponse": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "status",
          "data"
        ],
        "properties": {
          "status": {
            "type": "string",
            "examples": [
              "OK"
            ]
          },
          "data": {
            "$ref": "#/components/schemas/BillingTabItemCreatedData"
          }
        }
      },
      "BillingTabSettings": {
        "type": "object",
        "x-scalar-ignore": true,
        "additionalProperties": false,
        "description": "Customer-specific billing tab settings.\n\nThese settings can override creditor defaults.\nSet values to `null` to revert back to creditor defaults.\n",
        "properties": {
          "billing_frequency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Billing frequency for the customer.\n\nSupported formats:\n- `daily`\n- `weekly#[day_name_or_number]` (e.g. `weekly#monday` or `weekly#1`)\n- `monthly#[day]` (e.g. `monthly#15`)\n\nNotes:\n- Weekly numbers use `1=Monday ... 7=Sunday`\n- For monthly, if the day doesn’t exist, the system uses the last day of the month.\n",
            "pattern": "^(daily|weekly#[A-Za-z]+|weekly#[1-7]|monthly#([1-9]|[12][0-9]|3[01]))$",
            "examples": [
              "monthly#20"
            ]
          },
          "delivery_method": {
            "type": [
              "string",
              "null"
            ],
            "description": "Delivery method used for invoices created from the billing tab.\n\nMust be one of the creditor’s available delivery methods.\nSet to `null` to revert to creditor defaults.\n",
            "enum": [
              "Email+Letter",
              "Email",
              "SMS+Letter",
              "SMS",
              "Letter",
              "Einvoice",
              "EDI",
              "DoNotNotify",
              null
            ],
            "examples": [
              "Email"
            ]
          }
        }
      },
      "BillingTabSettingsRequest": {
        "x-scalar-ignore": true,
        "allOf": [
          {
            "$ref": "#/components/schemas/BillingTabSettings"
          },
          {
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "billing_frequency"
                ]
              },
              {
                "type": "object",
                "required": [
                  "delivery_method"
                ]
              }
            ]
          }
        ],
        "description": "Provide at least one of `billing_frequency` or `delivery_method`.\nUse `null` to revert to creditor defaults.\n"
      },
      "BillingTabSettingsResponse": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "status",
          "data"
        ],
        "properties": {
          "status": {
            "type": "string",
            "examples": [
              "OK"
            ]
          },
          "data": {
            "$ref": "#/components/schemas/BillingTabSettings"
          }
        }
      },
      "BillingTabItemCreateRequest": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "billogram_item"
        ],
        "properties": {
          "billogram_item": {
            "$ref": "#/components/schemas/BillogramItem"
          }
        }
      },
      "SettingsAddress": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Business address data sub-structure. Postal address to reach your company.",
        "properties": {
          "street_address": {
            "type": "string",
            "description": "Street address part of the address (i.e. typically street name, house number, floor, apartment/room). Line breaks may not work."
          },
          "careof": {
            "type": "string",
            "description": "Care-of (C/O) line to include in the address. Note that there is no (direct) way of specifying an \"attention\" line in the address."
          },
          "zipcode": {
            "type": "string",
            "description": "Postal code for the address"
          },
          "city": {
            "type": "string",
            "description": "City name for the address"
          },
          "province": {
            "type": "string",
            "description": "Province or administrative area for the address"
          },
          "country": {
            "type": "string",
            "description": "Country for the address. Must be a two-letter ISO 3166-1 alpha-2 format code if specified. Converted to uppercase in the Billogram system.",
            "pattern": "^([A-Z]{2})?$",
            "examples": [
              "SE"
            ]
          }
        },
        "required": [
          "country"
        ]
      },
      "SettingsInvoiceAddress": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Invoice address data sub-structure. Used when the creditor wish to receive invoices from Billogram (by using the service) to an address other than the default creditor address (email or physical).",
        "properties": {
          "street_address": {
            "type": "string",
            "description": "Street address part of the address (i.e. typically street name, house number, floor, apartment/room). Line breaks may not work."
          },
          "careof": {
            "type": "string",
            "description": "Care of, or c/o, is an addendum to the address, specifying whom the mail should be forwarded to."
          },
          "zipcode": {
            "type": "string",
            "description": "Postal code for the address"
          },
          "city": {
            "type": "string",
            "description": "City name for the address"
          },
          "province": {
            "type": "string",
            "description": "Province or administrative area for the address"
          },
          "country": {
            "type": "string",
            "description": "Country for the address and the creditor. Must be a two-letter ISO 3166-1 alpha-2 format code. Converted to uppercase in the Billogram system.",
            "pattern": "^([A-Z]{2})?$",
            "examples": [
              ""
            ]
          },
          "email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "string",
                "enum": [
                  ""
                ]
              }
            ],
            "description": "Email address where the creditor will receive invoices from Billogram."
          }
        }
      },
      "SettingsRegisteredOfficeAddress": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Registered office address (Säte) data sub-structure. Used when the creditor has multiple addresses and want to specify a dedicated registered office address (säte). The registered office address will show at the bottom of the PDF document instead of the default creditor address, but it will not affect the default address otherwise.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Contact person's name on the address. Line breaks may not work."
          },
          "street_address": {
            "type": "string",
            "description": "Street address part of the address (i.e. typically street name, house number, floor, apartment/room). Line breaks may not work."
          },
          "careof": {
            "type": "string",
            "description": "Care of, or c/o, is an addendum to the address, specifying whom the mail should be forwarded to."
          },
          "zipcode": {
            "type": "string",
            "description": "Postal code for the address"
          },
          "city": {
            "type": "string",
            "description": "City name for the address"
          },
          "province": {
            "type": "string",
            "description": "Province or administrative area for the address"
          },
          "country": {
            "type": [
              "string",
              "null"
            ],
            "description": "Country for the address and the creditor. Must be a two-letter ISO 3166-1 alpha-2 format code. Converted to uppercase in the Billogram system.",
            "pattern": "^([A-Z]{2})?$",
            "examples": [
              "SE"
            ]
          }
        },
        "required": [
          "name",
          "zipcode"
        ]
      },
      "SettingsReturnAddress": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Return address data sub-structure. Used when the creditor has multiple addresses and want to specify a dedicated return address. The return address will show at the top of the PDF document instead of the default creditor address, but it will not affect the default address otherwise.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Contact person's name on the address. Line breaks may not work."
          },
          "street_address": {
            "type": "string",
            "description": "Street address part of the address (i.e. typically street name, house number, floor, apartment/room). Line breaks may not work."
          },
          "careof": {
            "type": "string",
            "description": "Care of, or c/o, is an addendum to the address, specifying whom the mail should be forwarded to."
          },
          "zipcode": {
            "type": "string",
            "description": "Postal code for the address"
          },
          "city": {
            "type": "string",
            "description": "City name for the address"
          },
          "province": {
            "type": "string",
            "description": "Province or administrative area for the address"
          },
          "country": {
            "type": "string",
            "description": "Country for the address. Must be a two-letter ISO 3166-1 alpha-2 format code if specified. Converted to uppercase in the Billogram system.",
            "pattern": "^([A-Z]{2})?$",
            "examples": [
              "SE"
            ]
          }
        },
        "required": [
          "name",
          "zipcode"
        ]
      },
      "SettingsVisitingAddress": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Visiting address data sub-structure. Used when the creditor has multiple addresses and want to specify a dedicated visiting address. The visiting address will show at the bottom of the web invoice and be visible to recipients instead of the default creditor address, but will not affect the default address otherwise.",
        "properties": {
          "street_address": {
            "type": "string",
            "description": "Street address part of the address (i.e. typically street name, house number, floor, apartment/room). Line breaks may not work."
          },
          "careof": {
            "type": "string",
            "description": "Care of, or c/o, is an addendum to the address, specifying whom the mail should be forwarded to."
          },
          "zipcode": {
            "type": "string",
            "description": "Postal code for the address"
          },
          "city": {
            "type": "string",
            "description": "City name for the address"
          },
          "province": {
            "type": "string",
            "description": "Province or administrative area for the address"
          },
          "country": {
            "type": "string",
            "description": "Country for the address and the creditor. Must be a two-letter ISO 3166-1 alpha-2 format code. Converted to uppercase in the Billogram system.",
            "pattern": "^([A-Z]{2})?$",
            "examples": [
              "SE"
            ]
          }
        }
      },
      "SettingsContact": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Business contact data sub-structure. Contact information from Billogram to the business. Not used on invoices.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the person reached by these contact data. Should be the person primarily responsible for managing the Billogram account at the business."
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "E-mail address printed on the invoices."
          },
          "phone": {
            "type": "string",
            "description": "Phone number the contact person can be reached on. This will also be printed on the invoices."
          },
          "www": {
            "type": "string",
            "description": "Website address to be presented for receivers of digital invoices."
          }
        }
      },
      "SettingsDomesticBankAccount": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "A domestic Swedish bank account number for transferring funds received from customers to the invoicing business.",
        "properties": {
          "account_no": {
            "type": "string",
            "description": "Account number part. Numeric string (hyphens allowed)."
          },
          "clearing_no": {
            "type": "string",
            "description": "Clearing number part. Numeric string (hyphens allowed). Required if the account number part is specified."
          }
        },
        "required": [
          "clearing_no"
        ]
      },
      "SettingsInternationalBankAccount": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "An international bank account number (IBAN) for transferring funds received from customers to the invoicing business.",
        "properties": {
          "bank": {
            "type": "string",
            "description": "Name of the bank. Required if the IBAN is specified."
          },
          "iban": {
            "type": "string",
            "description": "International bank account number"
          },
          "bic": {
            "type": "string",
            "description": "Bank identification code (BIC) for the bank the account is located at. Required if the IBAN is specified, and SWIFT is not."
          },
          "swift": {
            "type": "string",
            "description": "SWIFT code for the bank the account is located at. Required if the IBAN is specified, and BIC is not."
          }
        }
      },
      "SettingsPayment": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Payment data sub-structure. Holds the information required for Billogram to transfer received funds from paid invoices to the invoicing business.\n\nOnly one of the three methods (`bankgiro`, `plusgiro`, `domestic_bank_account`) need to be specified.\nThe `international_bank_account` must be specified to allow for international invoicing.\n\nChanges need to be verified via email that will be sent out to the main user (most likely the same as `registration_email`) or the user requesting the change, if the change request is being done via a \"partner-API integration\".\n",
        "properties": {
          "bankgiro": {
            "type": "string",
            "description": "Swedish *bankgiro* account number for transferring funds received from customers to the invoicing business. Numeric string (hyphens allowed)."
          },
          "plusgiro": {
            "type": "string",
            "description": "Swedish *plusgiro* account number for transferring funds received from customers to the invoicing business. Numeric string (hyphens allowed)."
          },
          "domestic_bank_account": {
            "$ref": "#/components/schemas/SettingsDomesticBankAccount"
          },
          "international_bank_account": {
            "$ref": "#/components/schemas/SettingsInternationalBankAccount"
          }
        }
      },
      "SettingsTax": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Tax data sub-structure. Information required for taxation purposes.",
        "properties": {
          "is_vat_registered": {
            "type": "boolean",
            "description": "Whether the business is registered for VAT in Sweden."
          },
          "has_fskatt": {
            "type": "boolean",
            "description": "Whether the business pays Swedish *F-skatt* tax."
          },
          "vat_no": {
            "type": "string",
            "description": "European VAT registration number for the business."
          }
        }
      },
      "SettingsBookkeepingRegionalSweden": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Sub-structure for bookkeeping account numbers unique to Swedish taxation laws.",
        "properties": {
          "rotavdrag_account": {
            "type": "string",
            "description": "Bookkeeping account number for receivables due to ROT/RUT deductions."
          }
        }
      },
      "SettingsBookkeeping": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Bookkeeping configuration sub-structure. Configuration data used in generation of the bookkeeping files available from Billogram.",
        "properties": {
          "income_account_for_vat_25": {
            "type": "string",
            "description": "Default bookkeeping account number for income from items with 25% VAT applied."
          },
          "income_account_for_vat_12": {
            "type": "string",
            "description": "Default bookkeeping account number for income from items with 12% VAT applied."
          },
          "income_account_for_vat_6": {
            "type": "string",
            "description": "Default bookkeeping account number for income from items with 6% VAT applied."
          },
          "income_account_for_vat_0": {
            "type": "string",
            "description": "Default bookkeeping account number for income from VAT-free items."
          },
          "reversed_vat_account": {
            "type": "string",
            "description": "Bookkeeping account number for income from invoices with reverse VAT rules applied."
          },
          "vat_account_for_vat_25": {
            "type": "string",
            "description": "Default bookkeeping account number for 25% VAT."
          },
          "vat_account_for_vat_12": {
            "type": "string",
            "description": "Default bookkeeping account number for 12% VAT."
          },
          "vat_account_for_vat_6": {
            "type": "string",
            "description": "Default bookkeeping account number for 6% VAT."
          },
          "sie_serie": {
            "type": "string",
            "description": "Series for SIE4 import files."
          },
          "sie_continuous_numbering": {
            "type": "string",
            "enum": [
              "monthly",
              "yearly"
            ],
            "description": "Continuous supporting of document numbering for SIE4. Could be either \"monthly\" - verification number starts from 1 every month, or \"yearly\" - continuous numbering throughout the year."
          },
          "financial_year_start": {
            "type": "string",
            "description": "Starting year and month (e.g. \"2017-08\") of fiscal year. The year will always be stored as current year.",
            "pattern": "^\\d{4}-\\d{2}$",
            "examples": [
              "2017-08"
            ]
          },
          "financial_year_months": {
            "type": "integer",
            "description": "Number of months in fiscal year."
          },
          "account_receivable_account": {
            "type": "string",
            "description": "Bookkeeping account for account receivables."
          },
          "client_funds_account": {
            "type": "string",
            "description": "Standard bookkeeping account for client funds."
          },
          "banking_account": {
            "type": "string",
            "description": "Standard bookkeeping account for the business' bank."
          },
          "interest_fee_account": {
            "type": "string",
            "description": "Bookkeeping account number for interest fees added to late paid invoices."
          },
          "reminder_fee_account": {
            "type": "string",
            "description": "Bookkeeping account number for reminder fees added to late paid invoices."
          },
          "rounding_account": {
            "type": "string",
            "description": "Bookkeeping account number for rounding adjustments of invoice amounts."
          },
          "factoring_receivable_account": {
            "type": "string",
            "description": "Bookkeeping account number for receivables for sold invoices."
          },
          "written_down_receivables_account": {
            "type": "string",
            "description": "Bookkeeping account number for written down account receivables. Will be used when writing down a billogram or on payments/credits of a written down billogram."
          },
          "expected_loss_account": {
            "type": "string",
            "description": "Bookkeeping account number for expected loss on a written down billogram. Will be used when writing down a billogram or on payments/credits of a written down billogram."
          },
          "confirmed_loss_account": {
            "type": "string",
            "description": "Bookkeeping account number for confirmed customer loss on billograms marked as such. Will be used when marking a billogram as confirmed customer loss."
          },
          "debt_collection_funds_account": {
            "type": "string",
            "description": "Bookkeeping account number for payments to the debt collection partner on invoices in debt collection."
          },
          "liabilities_customers_account": {
            "type": "string",
            "description": "Bookkeeping account number for when the creditor owes money to the customer due to overpayments. Will be used for example when a payment is made both to Billogram and to a debt collection partner for the same invoice on the same day, which in case the creditor would receive money twice for the same invoice and thus has liabilities to the customer."
          },
          "regional_sweden": {
            "$ref": "#/components/schemas/SettingsBookkeepingRegionalSweden"
          }
        }
      },
      "SettingsAutomaticWriteoff": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Automatic removal of overdue charges sub-structure. If enabled, remaining overdue charges such as reminder fees and/or late payment interest will be removed automatically when a payment is received and the principal amount of the billogram is fully paid.",
        "properties": {
          "settings": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "all_fees",
              "interest_only",
              "fee_amount",
              null
            ],
            "description": "We support different types of automatic removals of overdue charges.\n\n- `all_fees`: All unpaid overdue charges (reminder fees and late payment interest) will be removed.\n- `interest_only`: Unpaid late payment interest will be removed once the principal amount and reminder fees have been paid.\n- `fee_amount`: Unpaid overdue charges (reminder fees and late payment interest) up to and including the amount of the `amount` parameter will be removed.\n- `null`: If the value is set to `null`, no automatic removal of overdue charges will occur.\n"
          },
          "amount": {
            "anyOf": [
              {
                "type": [
                  "number",
                  "null"
                ]
              }
            ],
            "description": "The maximum amount of overdue charges that will be removed if the `settings` are set to `fee_amount`. May only be set to a numeric value but will return a `null` unless the `settings` parameter is set to `fee_amount`."
          }
        }
      },
      "SettingsPdf": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Invoice PDF default settings for your account.",
        "properties": {
          "template": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "unified",
              "classic",
              "modern",
              null
            ],
            "description": "PDF templates differ according to the market you are in as a creditor.\n\n`B2C` and `B2B` templates are removed and should not be used. `unified` is used instead by default.\n\n`classic` and `modern` templates are being phased out, therefore eventually no values will have any effect and default to `unified`.\n"
          }
        }
      },
      "SettingsReminderWithoutFee": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Reminder without fee structure. Defines reminders that do not add fees, with localized messages per market.",
        "properties": {
          "message": {
            "type": "object",
            "description": "Localized messages for the reminder. Keys are ISO 639-1 language codes (ca, de, en, es, fi, fr, it, nb, nl, sv).",
            "additionalProperties": {
              "anyOf": [
                {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              ]
            },
            "properties": {
              "ca": {
                "anyOf": [
                  {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                ]
              },
              "de": {
                "anyOf": [
                  {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                ]
              },
              "en": {
                "anyOf": [
                  {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                ]
              },
              "es": {
                "anyOf": [
                  {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                ]
              },
              "fi": {
                "anyOf": [
                  {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                ]
              },
              "fr": {
                "anyOf": [
                  {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                ]
              },
              "it": {
                "anyOf": [
                  {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                ]
              },
              "nb": {
                "anyOf": [
                  {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                ]
              },
              "nl": {
                "anyOf": [
                  {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                ]
              },
              "sv": {
                "anyOf": [
                  {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                ]
              }
            }
          },
          "days_from_due": {
            "type": "string",
            "description": "Number of days from due date when this reminder should be sent."
          }
        }
      },
      "SettingsInvoiceDefaults": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "Invoice defaults sub-structure. Default values for invoice creation, these can be overridden on individual invoices when required.",
        "properties": {
          "default_message": {
            "type": "string",
            "maxLength": 1000,
            "description": "Free-form long message that will be printed on the invoice."
          },
          "default_interest_rate": {
            "type": "number",
            "description": "Default interest rate added to late invoices. The rate must be given in per-cent (i.e. specify `8.5` and not `0.085` for an 8.5 % rate) and is a yearly rate. The interest is calculated daily.",
            "examples": [
              8.5
            ]
          },
          "default_reminder_fee": {
            "type": "number",
            "description": "Default reminder fee added to invoices when a late payment reminder is sent. Specified in the invoicing currency."
          },
          "default_invoice_fee": {
            "type": "number",
            "description": "Default invoice fee added to all new invoices, unless a different value is given for a specific invoice. Specified in the invoicing currency, VAT exclusive."
          },
          "default_reminder_due_days": {
            "type": "integer",
            "description": "Default number of calendar days until the due date for reminders. Defaults to 0.",
            "default": 0
          },
          "automatic_reminders": {
            "type": "array",
            "description": "Default set of late payment reminders to use for new invoices, where different reminders are not specified.\n\nWhen automatic reminder data are sent, the entire array must always be sent, it is not possible to do partial updates. In other words, the entire array is always replaced with the given new array, if one is present.\n",
            "items": {
              "$ref": "#/components/schemas/AutomaticReminderData"
            }
          },
          "automatic_reminders_minimum_principal_sum": {
            "type": "number",
            "description": "The minimum principal sum of the billogram for which automatic reminders should be sent."
          },
          "automatic_writeoff": {
            "$ref": "#/components/schemas/SettingsAutomaticWriteoff"
          },
          "automatic_collection": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AutomaticCollection"
              },
              {
                "type": "null"
              }
            ],
            "description": "Automatic collection settings for your account. If set up, unpaid invoices will be automatically sent to collection after a set amount of days since due date / last reminder. Requires a collection agreement.\n\nIf set to `null` no automatic collection will occur.\n"
          },
          "pdf": {
            "$ref": "#/components/schemas/SettingsPdf"
          },
          "show_item_gross_prices": {
            "type": "boolean",
            "deprecated": true,
            "description": "Display item prices as gross value instead of net value by default on invoices. **Deprecated**"
          },
          "show_customer_no": {
            "type": "boolean",
            "description": "This value specifies if the customer number should be displayed on an invoice."
          },
          "show_new_account_notice": {
            "type": "boolean",
            "description": "Toggles an option to show information about new payment information on the invoices. Usable for new creditors that has recently switched to sending invoices through Billogram."
          },
          "use_automatic_reminders_partly_paid": {
            "type": "boolean",
            "description": "Boolean value that specifies if automatic reminders should still be sent if an invoice has been partly paid."
          },
          "reminders_without_fee": {
            "type": "array",
            "description": "Array of reminders that do not add fees, with localized messages per market.",
            "items": {
              "$ref": "#/components/schemas/SettingsReminderWithoutFee"
            }
          }
        }
      },
      "Settings": {
        "type": "object",
        "x-scalar-ignore": true,
        "description": "The settings object lets a client application modify global values for a Billogram business account.\nThese settings are also available on the web interface; most applications may never need to use the settings object.\n",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the business managing the business account (company name). Displayed on all invoices sent from the account.\n\nChanges need to be verified via email that will be sent out to the main user (most likely the same as `registration_email`)\n"
          },
          "org_no": {
            "type": "string",
            "readOnly": true,
            "description": "Organization number of the business managing the business account. Currently only accepting Swedish creditors and Swedish organization numbers. Displayed on all invoices sent from the account.\n\nCan only be set if already blank. Can only be set once. If a creditor wishes to change their org_no, they will need to contact the Billogram support.\n"
          },
          "company_id": {
            "type": "string",
            "description": "Company identifier for the business account."
          },
          "registration_email": {
            "type": "string",
            "format": "email",
            "description": "Email address of main contact at the creditor."
          },
          "contact": {
            "$ref": "#/components/schemas/SettingsContact"
          },
          "address": {
            "$ref": "#/components/schemas/SettingsAddress"
          },
          "invoice_address": {
            "$ref": "#/components/schemas/SettingsInvoiceAddress"
          },
          "registered_office_address": {
            "$ref": "#/components/schemas/SettingsRegisteredOfficeAddress"
          },
          "return_address": {
            "$ref": "#/components/schemas/SettingsReturnAddress"
          },
          "visiting_address": {
            "$ref": "#/components/schemas/SettingsVisitingAddress"
          },
          "payment": {
            "$ref": "#/components/schemas/SettingsPayment"
          },
          "tax": {
            "$ref": "#/components/schemas/SettingsTax"
          },
          "bookkeeping": {
            "$ref": "#/components/schemas/SettingsBookkeeping"
          },
          "invoices": {
            "$ref": "#/components/schemas/SettingsInvoiceDefaults"
          }
        }
      },
      "SettingsResponse": {
        "type": "object",
        "x-scalar-ignore": true,
        "required": [
          "status",
          "data"
        ],
        "properties": {
          "status": {
            "type": "string",
            "examples": [
              "OK"
            ]
          },
          "data": {
            "$ref": "#/components/schemas/Settings"
          }
        }
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    },
    "examples": {
      "Customer": {
        "value": {
          "customer_no": 10032,
          "name": "Peter",
          "company_type": "individual",
          "language": "sv",
          "contact": {
            "name": "Peter Jonsson",
            "email": "peter.jonsson@billogram.com"
          },
          "address": {
            "street_address": "Lavendelväg 27",
            "address_line_2": "Apartment 5",
            "address_line_3": "Attention: Peter Jonsson",
            "administrative_area": "Province X",
            "dependent_locality": "City Y",
            "organization": "Billogram AB",
            "sorting_code": "12345",
            "zipcode": "12345",
            "city": "Stadby",
            "country": "SE"
          }
        }
      },
      "CustomerEinvoiceRegistrationSweden": {
        "summary": "Registered customer (Sweden) example response",
        "value": {
          "status": "OK",
          "data": {
            "registered_at": "2025-09-12T09:20:54.272739+00:00",
            "regional_sweden": {
              "fmi": "198802276322.SBF.SE"
            },
            "status": "registered"
          }
        }
      },
      "CustomerEinvoiceRegistrationItaly": {
        "summary": "Registered customer (Italy) example response",
        "value": {
          "status": "OK",
          "data": {
            "registered_at": "2026-01-14T09:32:36.808931+00:00",
            "regional_italy": {
              "pec": "test@email.com",
              "codice_destinatario": "12345AB"
            },
            "status": "registered"
          }
        }
      },
      "CustomerEinvoiceRegistrationRequestSweden": {
        "summary": "Create/update payload (Sweden) example request",
        "value": {
          "identifier": "198802276322.SBF.SE"
        }
      },
      "CustomerEinvoiceRegistrationRequestItaly": {
        "summary": "Create/update payload (Italy) example request",
        "value": {
          "pec": "test@email.com",
          "codice_destinatario": "12345AB"
        }
      },
      "InvalidParameter": {
        "summary": "Invalid parameter",
        "value": {
          "status": "INVALID_PARAMETER",
          "data": {
            "message": "Invalid parameter"
          }
        }
      },
      "DuplicateCreditorUniqueValue": {
        "summary": "Duplicate Creditor Unique Value",
        "value": {
          "status": "INVALID_PARAMETER",
          "data": {
            "message": "Billogram with same creditor_unique_value already exists"
          }
        }
      },
      "InvalidAutomaticCollectionDate": {
        "summary": "Attempted to update a parameter that is invalid",
        "value": {
          "status": "INVALID_PARAMETER",
          "data": {
            "message": "automatic collection date invalid"
          }
        }
      },
      "ReadOnlyParameter": {
        "summary": "Attempted to modify read-only field",
        "value": {
          "status": "READ_ONLY_PARAMETER",
          "data": {
            "message": "field is read-only"
          }
        }
      },
      "UnknownParameter": {
        "summary": "Attempted to update fields that are not allowed to be updated",
        "value": {
          "status": "UNKNOWN_PARAMETER",
          "data": {
            "message": "unexpected key: {field_name}",
            "field": "{field_name}",
            "field_path": "[{field_path}]"
          }
        }
      },
      "InvalidParameterCombination": {
        "summary": "Invalid parameter combination",
        "value": {
          "status": "INVALID_PARAMETER_COMBINATION",
          "data": {
            "message": "Invalid parameter combination"
          }
        }
      },
      "InvalidObjectState": {
        "summary": "Attempted to update a billogram in invalid state",
        "value": {
          "status": "INVALID_OBJECT_STATE",
          "data": {
            "message": "State transition prevented by invalid preconditions: Updates are currently\nnot allowed as an invoice is in the process of being generated. Please try\nagain once the invoice generation is complete"
          }
        }
      },
      "MissingQueryParameter": {
        "summary": "Missing query parameter",
        "value": {
          "status": "MISSING_QUERY_PARAMETER",
          "data": {
            "message": "order_field and order_direction must always be given together"
          }
        }
      },
      "InvalidQueryParameter": {
        "summary": "Invalid query parameter",
        "value": {
          "status": "INVALID_QUERY_PARAMETER",
          "data": {
            "message": "invalid filter_type"
          }
        }
      },
      "MethodMissingSend": {
        "summary": "method missing",
        "value": {
          "status": "INVALID_PARAMETER",
          "data": {
            "message": "method missing"
          }
        }
      },
      "InvalidMethodSend": {
        "summary": "invalid method",
        "value": {
          "status": "INVALID_PARAMETER",
          "data": {
            "message": "invalid method"
          }
        }
      },
      "InvalidObjectStateSend": {
        "summary": "Send not allowed for current billogram state",
        "value": {
          "status": "INVALID_OBJECT_STATE",
          "data": {
            "message": "Action not allowed in current billogram state:  Event 'Send' is not supported by state 'Billogram_State_Unpaid'.\n"
          }
        }
      },
      "InvalidObjectStateResend": {
        "summary": "Resend not allowed for current billogram state",
        "value": {
          "status": "INVALID_OBJECT_STATE",
          "data": {
            "message": "Action not allowed in current billogram state:  Event 'Resend' is not supported by state 'Billogram_State_Attested'.\n"
          }
        }
      },
      "InvalidObjectStateDeleteBillogram": {
        "summary": "Delete not allowed for current billogram state",
        "value": {
          "status": "INVALID_OBJECT_STATE",
          "data": {
            "message": "Action not allowed in current billogram state: Event 'Delete' is not supported by state 'Billogram_State_Attested'.\n"
          }
        }
      },
      "InvalidObjectStateRemind": {
        "summary": "Remind not allowed for current billogram state",
        "value": {
          "status": "INVALID_OBJECT_STATE",
          "data": {
            "message": "State transition prevented by invalid preconditions: {reason}"
          }
        }
      },
      "InvalidParameterRemind": {
        "summary": "Invalid parameter when reminding a billogram",
        "value": {
          "status": "INVALID_PARAMETER",
          "data": {
            "message": "invalid delivery method, {value} missing"
          }
        }
      },
      "SepaMandateMigrationInvalidIban": {
        "summary": "Validation error",
        "value": {
          "status": "INVALID_PARAMETER",
          "data": {
            "message": "Value error, invalid iban length",
            "field": "iban",
            "field_path": []
          }
        }
      },
      "SepaMandateMigrationMandateAlreadyExists": {
        "summary": "Mandate already exists",
        "value": {
          "status": "INVALID_PARAMETER",
          "data": {
            "message": "Mandate already exists"
          }
        }
      },
      "SepaMandateMigrationCreditorAccountInfoMissing": {
        "summary": "Creditor account information does not exist",
        "value": {
          "status": "INVALID_PARAMETER",
          "data": {
            "message": "Creditor account information does not exist"
          }
        }
      },
      "InvalidAuth": {
        "summary": "Invalid authentication credentials",
        "value": {
          "status": "INVALID_AUTH",
          "data": {
            "message": "Invalid username or password"
          }
        }
      },
      "RespiteDateMissing": {
        "summary": "Date missing",
        "value": {
          "status": "INVALID_PARAMETER",
          "data": {
            "message": "date missing"
          }
        }
      },
      "RespiteDateInvalid": {
        "summary": "Date before due date",
        "value": {
          "status": "INVALID_PARAMETER",
          "data": {
            "message": "date must be after due date"
          }
        }
      },
      "RespiteDateFormatInvalid": {
        "summary": "Invalid date format",
        "value": {
          "status": "INVALID_PARAMETER",
          "data": {
            "message": "invalid date format"
          }
        }
      },
      "MissingAuth": {
        "summary": "Missing authentication",
        "value": {
          "status": "MISSING_AUTH",
          "data": {
            "message": "Authentication credentials missing"
          }
        }
      },
      "PermissionDeniedCollector": {
        "summary": "No collector agreement",
        "value": {
          "status": "PERMISSION_DENIED",
          "data": {
            "message": "no collector agreement"
          }
        }
      },
      "PermissionDeniedOperation": {
        "summary": "No permission to perform operation",
        "value": {
          "status": "PERMISSION_DENIED",
          "data": {
            "message": "No permission to perform operation"
          }
        }
      },
      "PermissionDeniedReminder": {
        "summary": "No permission to perform operation",
        "value": {
          "status": "PERMISSION_DENIED",
          "data": {
            "message": "cannot send more than one reminder on the same day"
          }
        }
      },
      "AssetNotFound": {
        "summary": "Referenced asset not found",
        "value": {
          "status": "INVALID_PARAMETER",
          "data": {
            "message": "Asset ID not found on this Creditor account."
          }
        }
      },
      "BillogramNotFound": {
        "summary": "Billogram not found",
        "value": {
          "status": "NOT_FOUND",
          "data": {
            "message": "no billogram with id={billogram_id} was found"
          }
        }
      },
      "BillogramNotFoundUpdate": {
        "summary": "Billogram not found (operations)",
        "value": {
          "status": "NOT_FOUND",
          "data": {
            "message": "object not found with id={billogram_id}"
          }
        }
      },
      "CustomerNotFound": {
        "summary": "Customer not found",
        "value": {
          "status": "NOT_FOUND",
          "data": {
            "message": "No customer exists with the given customer_no."
          }
        }
      },
      "ItemNotFound": {
        "summary": "Item not found",
        "value": {
          "status": "NOT_FOUND",
          "data": {
            "message": "object not found with id={item_no}"
          }
        }
      },
      "InternalError": {
        "summary": "Internal server error",
        "value": {
          "status": "INTERNAL_ERROR",
          "data": {
            "message": "Internal error"
          }
        }
      },
      "BadGateway": {
        "summary": "Bad gateway error",
        "value": {
          "status": "BAD_GATEWAY",
          "data": {
            "message": "Bad gateway"
          }
        }
      },
      "ServiceUnavailable": {
        "summary": "Service unavailable",
        "value": {
          "status": "SERVICE_UNAVAILABLE",
          "data": {
            "message": "Service unavailable"
          }
        }
      },
      "GatewayTimeout": {
        "summary": "Gateway timeout",
        "value": {
          "status": "GATEWAY_TIMEOUT",
          "data": {
            "message": "Gateway timeout"
          }
        }
      },
      "Payment": {
        "summary": "Payment event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "12345",
            "payment_references": {
              "OCR": "12345"
            },
            "state": "Unpaid",
            "remaining_sum": 0,
            "total_sum": 399,
            "attested_at": "2025-12-15 12:12:26",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 319.2,
              "vat_sum": 79.8,
              "gross_sum": 399,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": -399,
              "collector_paid_sum": 0,
              "remaining_sum": 0,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "98765"
          },
          "event": {
            "created_at": "2025-12-20 09:31:42",
            "event_uuid": "b58b3776-9876-426f-b555-c6d4e3e6ee99",
            "type": "Payment",
            "data": {
              "payer_name": "",
              "amount": 399,
              "banking_amount": 0,
              "payment_flags": [
                "checkout payment",
                "card payment"
              ],
              "checkout_order_id": "co_abc123xyz",
              "manual": true,
              "total_sum": 399,
              "remaining_sum": 0
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "12345",
          "signature": null
        }
      },
      "BillogramSent": {
        "summary": "Billogram sent event example",
        "value": {
          "billogram": {
            "id": "TWcsrabC",
            "ocr_number": "98765",
            "payment_references": {
              "OCR": "98765"
            },
            "state": "Sending",
            "remaining_sum": 59,
            "total_sum": 59,
            "attested_at": "2026-01-12 18:49:19",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 59,
              "vat_sum": 0,
              "gross_sum": 59,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 59,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "3b222aaa-7890-1234-faf8-c7a0f86fd111"
          },
          "event": {
            "created_at": "2026-01-12 18:49:20",
            "event_uuid": "123456c0-a96c-4830-b444-150625e4ce00",
            "type": "BillogramSent",
            "data": {
              "invoice_no": 10000,
              "delivery_redirected": false,
              "delivery_method": "PDF",
              "original_delivery_method": "PDF",
              "scanning_central": false,
              "total_sum": 59,
              "remaining_sum": 59,
              "letter_id": "jA2OTY1NDIxYjgxOGMzMTQ3NTIxOTE545",
              "url": "https://billogram.com/view/example-org-url-token",
              "recipient_url": "https://billogram.com/view/example-recipient-token",
              "recipient_overview_url": "https://billogram.com/overview/example-overview-token"
            }
          },
          "callback_id": "1424d109-8f8f-1234-b1eb-24bd12345678",
          "callback_timestamp": "2026-01-12T18:49:20.543529Z",
          "callback_type": "BillogramEvent",
          "custom": null,
          "signature": null
        }
      },
      "AutogiroFailed": {
        "summary": "Autogiro failed event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Paid",
            "remaining_sum": 0,
            "total_sum": 3649,
            "attested_at": "2026-01-09 11:08:20",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 3258.03,
              "vat_sum": 390.97,
              "gross_sum": 3649,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": -3649,
              "collector_paid_sum": 0,
              "remaining_sum": 0,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-19 11:02:41",
            "event_uuid": "46c3c255-c768-4e77-8508-642f933aaa2b",
            "type": "AutogiroFailed",
            "data": {
              "amount": 3649,
              "full_status": "Autogiro connection missing - bank account may be closed"
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "BillogramCreated": {
        "summary": "Billogram created event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": null,
            "payment_references": null,
            "state": "Unattested",
            "remaining_sum": 19.1,
            "total_sum": 19.1,
            "attested_at": null,
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 16.05,
              "vat_sum": 3.05,
              "gross_sum": 19.1,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 19.1,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-20 05:09:56",
            "event_uuid": "ed87b7dc-dc65-420e-a3da-bbc32786e64e",
            "type": "BillogramCreated",
            "data": {}
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "BillogramEnded": {
        "summary": "Billogram ended event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Ended",
            "remaining_sum": 0,
            "total_sum": 231.9,
            "attested_at": "2025-11-20 11:19:38",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 195.67,
              "vat_sum": 36.23,
              "gross_sum": 231.9,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": -226.9,
              "collector_paid_sum": 0,
              "remaining_sum": 0,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-20 05:09:25",
            "event_uuid": "be803097-a510-484b-a084-5262a899b298",
            "type": "BillogramEnded",
            "data": {
              "total_sum": 231.9,
              "remaining_sum": 0,
              "ended_reason": "paid"
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "Collection": {
        "summary": "Collection event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Collection",
            "remaining_sum": 160.88,
            "total_sum": 160.88,
            "attested_at": "2025-11-11 09:18:33",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 100,
              "vat_sum": 0,
              "gross_sum": 100,
              "rounding": 0,
              "reminder_fee": 60,
              "late_payment_fee": 0,
              "interest_fee": 0.88,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 160.88,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-20 03:02:59",
            "event_uuid": "6ed463d2-2ad6-4c10-9810-67156f676888",
            "type": "Collection",
            "data": {
              "collector_method": "Arvato",
              "collector_reference": null,
              "total_sum": 160.88,
              "remaining_sum": 160.88
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "CollectionCancelled": {
        "summary": "Collection cancelled event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Collection",
            "remaining_sum": 10.53,
            "total_sum": 10.53,
            "attested_at": "2024-09-16 16:36:01",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 6.98,
              "vat_sum": 0.56,
              "gross_sum": 7.54,
              "rounding": 0,
              "reminder_fee": 2.99,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 10.53,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2025-01-13 08:27:31",
            "event_uuid": "80ff8f05-93c0-4d21-b56a-7e8233aca2bd",
            "type": "CollectionCancelled",
            "data": {
              "collector_reference": "S.24.6667667.01.8"
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "CollectionEnded": {
        "summary": "Collection ended event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Paid",
            "remaining_sum": 0,
            "total_sum": 26.19,
            "attested_at": "2025-11-17 20:45:45",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 23.07,
              "vat_sum": 0.13,
              "gross_sum": 23.2,
              "rounding": 0,
              "reminder_fee": 2.99,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": -26.19,
              "collector_paid_sum": 0,
              "remaining_sum": 0,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-19 23:58:45",
            "event_uuid": "e6401f5d-8e4a-4b5a-9990-1dfbc02e9726",
            "type": "CollectionEnded",
            "data": {
              "collector_reference": "S.25.8733894.01.8"
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "CollectionStatusUpdate": {
        "summary": "Collection status update event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Collection",
            "remaining_sum": 352,
            "total_sum": 352,
            "attested_at": "2025-11-06 09:44:23",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 281.54,
              "vat_sum": 70.38,
              "gross_sum": 351.92,
              "rounding": 0.08,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 352,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-20 02:36:29",
            "event_uuid": "81e32e5e-84cc-4622-807d-201e3885b1e5",
            "type": "CollectionStatusUpdate",
            "data": {
              "collector_reference": "8941583",
              "collection_status": "INJUNCTION_LETTER_SENT"
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "ConfirmedLoss": {
        "summary": "Confirmed loss event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Unpaid",
            "remaining_sum": 699,
            "total_sum": 699,
            "attested_at": "2026-01-06 18:15:35",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 699,
              "vat_sum": 0,
              "gross_sum": 699,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 699,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-19 22:50:08",
            "event_uuid": "bda9e4b5-f915-4a4c-a0f7-9103599d181c",
            "type": "ConfirmedLoss",
            "data": {
              "total_sum": 699,
              "remaining_sum": 699
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "Credit": {
        "summary": "Credit event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Unpaid",
            "remaining_sum": 0,
            "total_sum": 0,
            "attested_at": "2026-01-19 18:05:53",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 1637.5,
              "vat_sum": 196.5,
              "gross_sum": 1834,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": -1834,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 0,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-20 04:34:30",
            "event_uuid": "1de7dac4-144d-452b-b5ee-1ccafd8015a0",
            "type": "Credit",
            "data": {
              "invoice_no": 233107,
              "amount": 1834,
              "delivery_redirected": false,
              "delivery_method": "Email",
              "original_delivery_method": "Email",
              "scanning_central": false,
              "total_sum": 0,
              "remaining_sum": 0
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "CreditAllocated": {
        "summary": "Credit allocated event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Reminder_2",
            "remaining_sum": 0,
            "total_sum": 231.9,
            "attested_at": "2025-11-20 11:19:38",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 195.67,
              "vat_sum": 36.23,
              "gross_sum": 231.9,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": -226.9,
              "collector_paid_sum": 0,
              "remaining_sum": 0,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-20 05:09:25",
            "event_uuid": "5ae15d7c-3499-4568-8b6c-cd7ab1d1181b",
            "type": "CreditAllocated",
            "data": {
              "amount": 5,
              "source_id": "qFJs32hr",
              "total_sum": 231.9,
              "remaining_sum": 0
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "CreditCustomerLiability": {
        "summary": "Credit customer liability event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Paid",
            "remaining_sum": 0,
            "total_sum": 99,
            "attested_at": "2025-11-28 12:00:22",
            "detailed_sums": {
              "invoice_fee": 39,
              "invoice_fee_vat": 0,
              "net_sum": 138,
              "vat_sum": 0,
              "gross_sum": 138,
              "rounding": 0,
              "reminder_fee": 60,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": -99,
              "paid_sum": -198,
              "collector_paid_sum": 0,
              "remaining_sum": 0,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-19 19:23:15",
            "event_uuid": "fd66ddc0-e526-4530-b7d4-da6b38817f8b",
            "type": "CreditCustomerLiability",
            "data": {
              "total_amount": 99,
              "previous_amount": 0,
              "new_amount": 99
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "CreditPayment": {
        "summary": "Credit payment event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "CreditUnpaid",
            "remaining_sum": 0,
            "total_sum": -228.05,
            "attested_at": "2025-10-28 19:08:27",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": -191.64,
              "vat_sum": -36.41,
              "gross_sum": -228.05,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 74.45,
              "collector_paid_sum": 0,
              "remaining_sum": 0,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-19 14:32:01",
            "event_uuid": "adf6e4c9-4229-4546-a956-ab00fec4fa50",
            "type": "CreditPayment",
            "data": {
              "amount": 74.45,
              "total_sum": -228.05,
              "remaining_sum": 0
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "CreditorMessage": {
        "summary": "Creditor message event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Unpaid",
            "remaining_sum": 1834,
            "total_sum": 1834,
            "attested_at": "2026-01-18 20:11:26",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 1637.5,
              "vat_sum": 196.5,
              "gross_sum": 1834,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 1834,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-20 04:05:30",
            "event_uuid": "4cd9fa12-8bcb-484d-9107-368a98585169",
            "type": "CreditorMessage",
            "data": {
              "message": "Thank you for your inquiry. Your order has been processed."
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "CustomerLiabilityReduced": {
        "summary": "Customer liability reduced event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Credited",
            "remaining_sum": 0,
            "total_sum": 0,
            "attested_at": "2025-12-16 03:07:52",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 64.5,
              "vat_sum": 12.26,
              "gross_sum": 76.76,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": -76.76,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 0,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-15 12:40:41",
            "event_uuid": "a71ac70f-c893-4d7a-9ebd-b65f0d8dc930",
            "type": "CustomerLiabilityReduced",
            "data": {
              "amount": 76.76,
              "reason": "PAYMENT_RECALLED"
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "CustomerMessage": {
        "summary": "Customer message event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Unpaid",
            "remaining_sum": 459,
            "total_sum": 459,
            "attested_at": "2026-01-16 09:40:46",
            "detailed_sums": {
              "invoice_fee": 15.2,
              "invoice_fee_vat": 25,
              "net_sum": 367.2,
              "vat_sum": 91.8,
              "gross_sum": 459,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 459,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-20 05:07:20",
            "event_uuid": "dd1f1ae5-ffda-4712-9efb-5137919fddfb",
            "type": "CustomerMessage",
            "data": {
              "message": "Hello, I have a question about my invoice."
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "DataChange": {
        "summary": "Data change event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Overdue",
            "remaining_sum": 57.92,
            "total_sum": 57.92,
            "attested_at": "2025-12-16 04:34:26",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 49.47,
              "vat_sum": 8.45,
              "gross_sum": 57.92,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 57.92,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-20 02:23:58",
            "event_uuid": "b7665809-4aef-4989-9130-9a6ccd650d67",
            "type": "DataChange",
            "data": {}
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "DeferredCommandFailed": {
        "summary": "Deferred command failed event example",
        "value": {
          "billogram": {
            "id": "AzergDy",
            "ocr_number": null,
            "payment_references": null,
            "state": "Unattested",
            "remaining_sum": 639,
            "total_sum": 639,
            "attested_at": null,
            "detailed_sums": {
              "collector_paid_sum": 0,
              "credited_sum": 0,
              "gross_sum": 639.22,
              "interest_fee": 0,
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "late_payment_fee": 0,
              "net_sum": 638.12,
              "paid_sum": 0,
              "regional_sweden": {
                "rotavdrag_sum": 0
              },
              "remaining_sum": 639,
              "reminder_fee": 0,
              "rounding": -0.2153,
              "vat_sum": 1.1
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-04-13 09:30:53",
            "event_uuid": "fc6ef090-0355-45fa-acdc-bf8d538ff46c",
            "type": "DeferredCommandFailed",
            "data": {
              "command": "Send",
              "delivery_method": "SMS",
              "error_message": "invalid delivery method, phone number missing"
            }
          },
          "callback_id": "7a9a919b-44d3-44d5-8dbf-15ecb1312bfa",
          "callback_timestamp": "2026-04-13T09:30:53.328425Z",
          "callback_type": "BillogramEvent",
          "custom": null,
          "signature": null
        }
      },
      "Deleted": {
        "summary": "Deleted event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": null,
            "payment_references": null,
            "state": "Deleted",
            "remaining_sum": 100,
            "total_sum": 100,
            "attested_at": null,
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 100,
              "vat_sum": 0,
              "gross_sum": 100,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 100,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-20 04:11:18",
            "event_uuid": "020d4d6e-1a73-45f7-97b5-e5c843548f29",
            "type": "Deleted",
            "data": {}
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "DeliveryAccepted": {
        "summary": "Delivery accepted event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Unpaid",
            "remaining_sum": 3.2,
            "total_sum": 3.2,
            "attested_at": "2026-01-16 13:50:52",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 3.2,
              "vat_sum": 0,
              "gross_sum": 3.2,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 3.2,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-20 05:09:55",
            "event_uuid": "eb527533-2303-4896-bc5a-9a859c5b93b2",
            "type": "DeliveryAccepted",
            "data": {
              "ip": "172.25.118.148",
              "customer_email": "customer@example.com",
              "customer_phone": null,
              "remaining_sum": 3.2
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "DeliveryFailed": {
        "summary": "Delivery failed event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Unpaid",
            "remaining_sum": 88.49,
            "total_sum": 88.49,
            "attested_at": "2026-01-20 05:09:00",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 74.36,
              "vat_sum": 14.13,
              "gross_sum": 88.49,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 88.49,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-20 05:09:02",
            "event_uuid": "2ba42046-79e6-4b75-b49e-ec2ed4daa023",
            "type": "DeliveryFailed",
            "data": {
              "type": "EmailBounced",
              "message": "Unable to deliver email to customer@example.com: smtp; 550 unrouteable address",
              "customer_email": "customer@example.com"
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "DeliverySmsFailed": {
        "summary": "Delivery SMS failed event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Reminder_Many",
            "remaining_sum": 369,
            "total_sum": 369,
            "attested_at": "2025-12-07 09:35:21",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 329.25,
              "vat_sum": 19.76,
              "gross_sum": 349.01,
              "rounding": 0,
              "reminder_fee": 20,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 369,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-19 22:22:15",
            "event_uuid": "35e1cf4e-3735-4285-9647-dfd72ae01670",
            "type": "DeliverySmsFailed",
            "data": {
              "type": "SmsBounced",
              "message": "Deliver SMS to 08-123456 failed.",
              "customer_phone": "08-123456"
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "EboxDeliveryDone": {
        "summary": "Ebox delivery done event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Credited",
            "remaining_sum": 0,
            "total_sum": 0,
            "attested_at": "2026-01-08 10:27:54",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 284.95,
              "vat_sum": 71.24,
              "gross_sum": 356.19,
              "rounding": -0.19,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": -356,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 0,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-20 03:42:24",
            "event_uuid": "3cd410a8-d450-4af9-b884-34d4f72f247d",
            "type": "EboxDeliveryDone",
            "data": {
              "letter_id": "zA4Njk2ZTJhZTAyNDY4OQMTQ4Mjc3Mjg545"
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "EDISent": {
        "summary": "EDI sent event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Unpaid",
            "remaining_sum": 498.75,
            "total_sum": 498.75,
            "attested_at": "2026-01-20 04:59:19",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 399,
              "vat_sum": 99.75,
              "gross_sum": 498.75,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 498.75,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-20 04:59:21",
            "event_uuid": "17383b65-f475-4dd1-9414-f1f6c2c0eef7",
            "type": "EDISent",
            "data": {}
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "EfakturaFailed": {
        "summary": "E-faktura failed event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Unpaid",
            "remaining_sum": 1879,
            "total_sum": 1879,
            "attested_at": "2026-01-09 06:02:14",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 1516.88,
              "vat_sum": 362.6,
              "gross_sum": 1879.48,
              "rounding": -0.48,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 1879,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-09 21:04:12",
            "event_uuid": "3f249816-bd20-4302-a7d7-dba26dd4f1ea",
            "type": "EfakturaFailed",
            "data": {
              "amount": 1879,
              "error_status": "recipient_not_available"
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "EfakturaSent": {
        "summary": "E-faktura sent event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Unpaid",
            "remaining_sum": 288,
            "total_sum": 288,
            "attested_at": "2026-01-19 13:30:14",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 230.35,
              "vat_sum": 57.59,
              "gross_sum": 287.94,
              "rounding": 0.06,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 288,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-19 15:01:28",
            "event_uuid": "806806a8-2c17-40ac-9c20-1a98e0aced5b",
            "type": "EfakturaSent",
            "data": {
              "amount": 288,
              "recipient_identifier": "199001011234.NB.SE",
              "bankgiro": "1234567"
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "EinvoiceDeliveryDone": {
        "summary": "E-invoice delivery done event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Unpaid",
            "remaining_sum": 589,
            "total_sum": 589,
            "attested_at": "2026-01-20 05:00:13",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 471.2,
              "vat_sum": 117.8,
              "gross_sum": 589,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 589,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-20 05:05:15",
            "event_uuid": "901cf7ca-cb33-474e-978e-2d8945442d93",
            "type": "EinvoiceDeliveryDone",
            "data": {
              "einvoice_identifier": "374349553"
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "EinvoiceDeliveryFailed": {
        "summary": "E-invoice delivery failed event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Unpaid",
            "remaining_sum": 801,
            "total_sum": 801,
            "attested_at": "2026-01-20 01:58:01",
            "detailed_sums": {
              "invoice_fee": 30,
              "invoice_fee_vat": 0,
              "net_sum": 801,
              "vat_sum": 0,
              "gross_sum": 801,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 801,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-20 01:58:03",
            "event_uuid": "067d59bf-3d6b-4b26-b030-a78956337519",
            "type": "EinvoiceDeliveryFailed",
            "data": {
              "code": "RECIPIENT_NOT_FOUND",
              "message": "E-invoice identifier could not be found"
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "EmailNotAccepted": {
        "summary": "Email not accepted event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Unpaid",
            "remaining_sum": 1534,
            "total_sum": 1534,
            "attested_at": "2026-01-15 14:36:51",
            "detailed_sums": {
              "invoice_fee": 31.2,
              "invoice_fee_vat": 25,
              "net_sum": 1227.2,
              "vat_sum": 306.8,
              "gross_sum": 1534,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 1534,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-19 23:11:22",
            "event_uuid": "3fddbf8c-f8f7-4b6b-9d7c-d441f3e84605",
            "type": "EmailNotAccepted",
            "data": {
              "customer_email": "customer@example.com",
              "remaining_sum": 1534
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "InvoiceCreationFailed": {
        "summary": "Invoice creation failed event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Attested",
            "remaining_sum": 0,
            "total_sum": 100,
            "attested_at": "2026-01-19 13:41:20",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 80,
              "vat_sum": 20,
              "gross_sum": 100,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": -100,
              "collector_paid_sum": 0,
              "remaining_sum": 0,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-19 14:12:06",
            "event_uuid": "bfa1dbd3-7d36-403c-82bc-98b5f06f4a7c",
            "type": "InvoiceCreationFailed",
            "data": {
              "delivery_method": "Email",
              "message": null,
              "total_sum": 100,
              "remaining_sum": 0
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "InvoiceSent": {
        "summary": "Invoice sent event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Overdue",
            "remaining_sum": 57.92,
            "total_sum": 57.92,
            "attested_at": "2025-12-16 04:34:26",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 49.47,
              "vat_sum": 8.45,
              "gross_sum": 57.92,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 57.92,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-20 02:24:23",
            "event_uuid": "5485cda2-bc22-4cfe-a445-50b69e5f22b0",
            "type": "InvoiceSent",
            "data": {
              "invoice_no": 4281046,
              "delivery_redirected": null,
              "delivery_method": "Email",
              "original_delivery_method": null,
              "scanning_central": false,
              "total_sum": 57.92,
              "remaining_sum": 57.92
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "ItemProcessingFailed": {
        "summary": "Item processing failed event example",
        "value": {
          "billogram": {
            "id": "F93a2xA",
            "ocr_number": null,
            "payment_references": null,
            "state": "Unattested",
            "remaining_sum": 0,
            "total_sum": 0,
            "attested_at": null,
            "detailed_sums": {
              "collector_paid_sum": 0,
              "credited_sum": 0,
              "gross_sum": 0,
              "interest_fee": 0,
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "late_payment_fee": 0,
              "net_sum": 0,
              "paid_sum": 0,
              "regional_sweden": {
                "rotavdrag_sum": 0
              },
              "remaining_sum": 0,
              "reminder_fee": 0,
              "rounding": 0,
              "vat_sum": 0
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-11-10_000123"
          },
          "event": {
            "created_at": "2026-11-10 13:12:07",
            "event_uuid": "3d1f6c2a-8b4e-4f0a-9c7d-2e5b8a1f4c90",
            "type": "ItemProcessingFailed",
            "data": {
              "items_uuid": "b6e2a4c1-7d3f-4e8a-9b0c-5f1d2e3a4b6c",
              "error_message": "Invoice line failed validation: Parking: zero_vat_reason_reference is required for VAT_EXEMPT",
              "errors": [
                {
                  "code": "CONFIGURATION_MISMATCH",
                  "message": "Invoice line failed validation: Parking: zero_vat_reason_reference is required for VAT_EXEMPT"
                }
              ]
            }
          },
          "callback_id": "0c8e5b7a-2f4d-4a1e-8c3b-9d6f1e2a7b45",
          "callback_timestamp": "2026-11-10T13:12:07.512340Z",
          "callback_type": "BillogramEvent"
        }
      },
      "ItemProcessingSuccessful": {
        "summary": "Item processing successful event example",
        "value": {
          "billogram": {
            "id": "sT3afwA",
            "ocr_number": null,
            "payment_references": null,
            "state": "Unattested",
            "remaining_sum": 125,
            "total_sum": 125,
            "attested_at": null,
            "detailed_sums": {
              "collector_paid_sum": 0,
              "credited_sum": 0,
              "gross_sum": 125,
              "interest_fee": 0,
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "late_payment_fee": 0,
              "net_sum": 100,
              "paid_sum": 0,
              "regional_sweden": {
                "rotavdrag_sum": 0
              },
              "remaining_sum": 125,
              "reminder_fee": 0,
              "rounding": 0,
              "vat_sum": 25
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-11-10_000124"
          },
          "event": {
            "created_at": "2026-11-10 13:15:32",
            "event_uuid": "10ac7873-6d95-45d1-8b09-b1e55e9a2e3b",
            "type": "ItemProcessingSuccessful",
            "data": {}
          },
          "callback_id": "5a2d9e81-4c7b-4f36-b0e2-8d1c3f6a9e27",
          "callback_timestamp": "2026-11-10T13:15:32.204118Z",
          "callback_type": "BillogramEvent"
        }
      },
      "LetterSent": {
        "summary": "Letter sent event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Unpaid",
            "remaining_sum": 1534,
            "total_sum": 1534,
            "attested_at": "2026-01-15 14:36:51",
            "detailed_sums": {
              "invoice_fee": 31.2,
              "invoice_fee_vat": 25,
              "net_sum": 1227.2,
              "vat_sum": 306.8,
              "gross_sum": 1534,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 1534,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-19 23:11:22",
            "event_uuid": "b5c39f3c-7fd6-455a-ac83-666fb4121a60",
            "type": "LetterSent",
            "data": {
              "delivery_redirected": null,
              "delivery_method": "Letter",
              "original_delivery_method": null,
              "scanning_central": false,
              "remaining_sum": 1534
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "NewInvoicePDF": {
        "summary": "New invoice PDF event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Unpaid",
            "remaining_sum": 99,
            "total_sum": 99,
            "attested_at": "2026-01-12 18:44:06",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 99,
              "vat_sum": 0,
              "gross_sum": 99,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 99,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-19 19:59:38",
            "event_uuid": "fe13078e-24f3-4124-80fb-c11b7d000743",
            "type": "NewInvoicePDF",
            "data": {
              "total_sum": 99,
              "remaining_sum": 99
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "Overdue": {
        "summary": "Overdue event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Unpaid",
            "remaining_sum": 382,
            "total_sum": 382,
            "attested_at": "2026-01-17 19:00:30",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 382,
              "vat_sum": 0,
              "gross_sum": 382,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 382,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-18 23:00:00",
            "event_uuid": "4c7ad46b-717e-466f-83b7-fe1939c929a0",
            "type": "Overdue",
            "data": {
              "remaining_sum": 382
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "OverpaymentAdjustment": {
        "summary": "Overpayment adjustment event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Paid",
            "remaining_sum": 0,
            "total_sum": 0,
            "attested_at": "2026-01-01 20:02:50",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 410,
              "vat_sum": 0,
              "gross_sum": 410,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": -410,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 0,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-19 14:09:25",
            "event_uuid": "2b90c6d8-e567-457f-92ef-bd14049f5570",
            "type": "OverpaymentAdjustment",
            "data": {
              "amount": 410,
              "total_sum": 0,
              "remaining_sum": 0
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "OverpaymentCustomerLiability": {
        "summary": "Overpayment customer liability event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Paid",
            "remaining_sum": 0,
            "total_sum": 53.8,
            "attested_at": "2025-08-20 01:45:56",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 45.21,
              "vat_sum": 8.59,
              "gross_sum": 53.8,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": -53.8,
              "collector_paid_sum": 0,
              "remaining_sum": 0,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-20 02:21:24",
            "event_uuid": "d748b188-0c76-4108-9643-4490ac375a6f",
            "type": "OverpaymentCustomerLiability",
            "data": {
              "amount": 53.8,
              "base_transaction": "payment_ref_12345",
              "overpayment_forward_to_creditor": true
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "PaymentFailed": {
        "summary": "Payment failed event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Unpaid",
            "remaining_sum": 1,
            "total_sum": 1,
            "attested_at": "2026-01-16 09:57:35",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 1.07,
              "vat_sum": 0.27,
              "gross_sum": 1.34,
              "rounding": -0.34,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 1,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-19 22:26:36",
            "event_uuid": "2d9f095c-14d4-4604-b67a-528a4526f426",
            "type": "PaymentFailed",
            "data": {
              "payment_amount": 1,
              "payment_failure_reason": "PAYER_CANCEL",
              "payment_type": "CHECKOUT_PAYMENT",
              "payment_details": {
                "checkout_order_id": "co_abc123xyz",
                "payment_method": "CARD"
              }
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "PaymentScheduled": {
        "summary": "Payment scheduled event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Unpaid",
            "remaining_sum": 77.96,
            "total_sum": 77.96,
            "attested_at": "2026-01-20 05:09:54",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 65.52,
              "vat_sum": 12.44,
              "gross_sum": 77.96,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 77.96,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-20 05:09:56",
            "event_uuid": "ed91b3e7-ac6c-438e-8292-c4c87c43c363",
            "type": "PaymentScheduled",
            "data": {
              "payment_amount": 77.96,
              "payment_date": "2026-02-03",
              "payment_type": "autogiro"
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "PaymentSystemCancelled": {
        "summary": "Payment system cancelled event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Unpaid",
            "remaining_sum": 109,
            "total_sum": 0,
            "attested_at": "2026-01-12 18:44:46",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 109,
              "vat_sum": 0,
              "gross_sum": 109,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": -109,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 109,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-19 19:40:12",
            "event_uuid": "80718de5-6461-4003-8d04-b11b4348ac3b",
            "type": "PaymentSystemCancelled",
            "data": {}
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "PaymentSystemUpdated": {
        "summary": "Payment system updated event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Unpaid",
            "remaining_sum": 158,
            "total_sum": 119,
            "attested_at": "2026-01-12 18:03:14",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 228,
              "vat_sum": 0,
              "gross_sum": 228,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": -109,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 158,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-19 18:24:21",
            "event_uuid": "0a871a0a-ef4b-41f0-9e75-5eef1c99716e",
            "type": "PaymentSystemUpdated",
            "data": {}
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "PaymentUserCancelled": {
        "summary": "Payment user cancelled event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Overdue",
            "remaining_sum": 400,
            "total_sum": 400,
            "attested_at": "2026-01-07 08:01:17",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 400,
              "vat_sum": 0,
              "gross_sum": 400,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 400,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-20 02:41:02",
            "event_uuid": "11aa4b8e-65cb-449b-bc98-ef0374483008",
            "type": "PaymentUserCancelled",
            "data": {}
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "PaymentUserUpdated": {
        "summary": "Payment user updated event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Unpaid",
            "remaining_sum": 2080,
            "total_sum": 2080,
            "attested_at": "2026-01-09 10:32:06",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 1664.29,
              "vat_sum": 416.07,
              "gross_sum": 2080.36,
              "rounding": -0.36,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 2080,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-20 04:25:34",
            "event_uuid": "bcf88b67-6a21-4b49-9b12-d09acfc79d86",
            "type": "PaymentUserUpdated",
            "data": {}
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "PurchaseAccepted": {
        "summary": "Purchase accepted event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Ended",
            "remaining_sum": 0,
            "total_sum": 2080,
            "attested_at": "2026-01-09 10:32:06",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 1664.29,
              "vat_sum": 416.07,
              "gross_sum": 2080.36,
              "rounding": -0.36,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 0,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-20 04:34:52",
            "event_uuid": "bd5540c4-c470-45d7-831d-9cba0ae3f53a",
            "type": "PurchaseAccepted",
            "data": {
              "case_reference": "TEST_CASE_REFERENCE",
              "public_external_url": ""
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "PurchaseRejected": {
        "summary": "Purchase rejected event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Unpaid",
            "remaining_sum": 2080,
            "total_sum": 2080,
            "attested_at": "2026-01-09 10:32:06",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 1664.29,
              "vat_sum": 416.07,
              "gross_sum": 2080.36,
              "rounding": -0.36,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 2080,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-20 04:39:07",
            "event_uuid": "e12080ec-e67a-44e3-b757-cfa4597ca8bb",
            "type": "PurchaseRejected",
            "data": {
              "case_reference": "TEST_CASE_REFERENCE",
              "public_external_url": "",
              "rejected_reason": "OTHER"
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "PurchaseFullySettled": {
        "summary": "Purchase fully settled event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Ended",
            "remaining_sum": 0,
            "total_sum": 2080,
            "attested_at": "2026-01-09 10:32:06",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 1664.29,
              "vat_sum": 416.07,
              "gross_sum": 2080.36,
              "rounding": -0.36,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 0,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-06-12 15:50:10",
            "event_uuid": "c02a512f-e957-47f8-ad1d-9dccd836ed09",
            "type": "PurchaseFullySettled",
            "data": null
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "RefundBankDetailsRequired": {
        "summary": "Refund bank details required event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Paid",
            "remaining_sum": 0,
            "total_sum": 19.8,
            "attested_at": "2025-11-03 15:26:15",
            "detailed_sums": {
              "invoice_fee": 2.9,
              "invoice_fee_vat": 0,
              "net_sum": 19.32,
              "vat_sum": 0.48,
              "gross_sum": 19.8,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": -19.8,
              "collector_paid_sum": 0,
              "remaining_sum": 0,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-19 19:21:39",
            "event_uuid": "8acae454-5b70-4a02-98fa-d369f1144a2d",
            "type": "RefundBankDetailsRequired",
            "data": {
              "refund_amount": 19.8,
              "currency": "EUR"
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "RefundConfirmed": {
        "summary": "Refund confirmed event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Paid",
            "remaining_sum": 0,
            "total_sum": 668,
            "attested_at": "2026-01-05 18:27:39",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 534.4,
              "vat_sum": 133.6,
              "gross_sum": 668,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": -668,
              "collector_paid_sum": 0,
              "remaining_sum": 0,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-19 13:05:15",
            "event_uuid": "f72c841b-6b1d-4e98-bed2-9672f6be0338",
            "type": "RefundConfirmed",
            "data": {
              "booking_date": "2026-01-19",
              "amount": 50,
              "masked_iban": "NO8*********432"
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "SelfServiceRefundAvailable": {
        "summary": "Self-service refund available event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Paid",
            "remaining_sum": 0,
            "total_sum": 1250,
            "attested_at": "2026-01-05 18:27:39",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 1000,
              "vat_sum": 250,
              "gross_sum": 1250,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": -1500,
              "collector_paid_sum": 0,
              "remaining_sum": 0,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-19 13:05:15",
            "event_uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
            "type": "SelfServiceRefundAvailable",
            "data": {
              "refund_amount": 250,
              "currency": "SEK",
              "public_id": "0192a3b4-c5d6-7890-abcd-ef1234567890",
              "recipient_url": "https://billogram.com/view/example-recipient-token"
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "SelfServiceRefundCancelled": {
        "summary": "Self-service refund cancelled event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Paid",
            "remaining_sum": 0,
            "total_sum": 1250,
            "attested_at": "2026-01-05 18:27:39",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 1000,
              "vat_sum": 250,
              "gross_sum": 1250,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": -1500,
              "collector_paid_sum": 0,
              "remaining_sum": 0,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-19 14:10:22",
            "event_uuid": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
            "type": "SelfServiceRefundCancelled",
            "data": {
              "public_id": "0192a3b4-c5d6-7890-abcd-ef1234567890"
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj10",
          "callback_timestamp": "2025-12-20T09:32:15.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "SelfServiceRefundClaimed": {
        "summary": "Self-service refund claimed event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Paid",
            "remaining_sum": 0,
            "total_sum": 1250,
            "attested_at": "2026-01-05 18:27:39",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 1000,
              "vat_sum": 250,
              "gross_sum": 1250,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": -1500,
              "collector_paid_sum": 0,
              "remaining_sum": 0,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-19 15:22:08",
            "event_uuid": "c3d4e5f6-a7b8-9012-cdef-123456789012",
            "type": "SelfServiceRefundClaimed",
            "data": {
              "refund_amount": 250,
              "currency": "SEK",
              "public_id": "0192a3b4-c5d6-7890-abcd-ef1234567890"
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj11",
          "callback_timestamp": "2025-12-20T09:33:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "ReminderSent": {
        "summary": "Reminder sent event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Reminder_3",
            "remaining_sum": 160,
            "total_sum": 160,
            "attested_at": "2025-11-21 19:21:15",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 100,
              "vat_sum": 0,
              "gross_sum": 100,
              "rounding": 0,
              "reminder_fee": 60,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 160,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-20 05:00:26",
            "event_uuid": "82a113ce-73c6-4631-978c-e9d674436164",
            "type": "ReminderSent",
            "data": {
              "reminder_fee": null,
              "reminder_count": 3,
              "delivery_redirected": false,
              "delivery_method": "Letter",
              "original_delivery_method": "Letter",
              "scanning_central": false,
              "total_sum": 160,
              "remaining_sum": 160
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "Resent": {
        "summary": "Resent event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Unpaid",
            "remaining_sum": 100,
            "total_sum": 100,
            "attested_at": "2026-01-19 09:18:21",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 100,
              "vat_sum": 0,
              "gross_sum": 100,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 100,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-19 23:18:24",
            "event_uuid": "e9d263da-ffac-4854-b05f-ee4441cab642",
            "type": "Resent",
            "data": {
              "delivery_redirected": false,
              "delivery_method": "SMS",
              "original_delivery_method": "DynamicDistribution",
              "scanning_central": false,
              "total_sum": 100,
              "remaining_sum": 100,
              "letter_id": "jczNjk2ZGY2ZGQ1NGM4OQMTQ4MjY0NjE545"
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "Respite": {
        "summary": "Respite event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Unpaid",
            "remaining_sum": 1834,
            "total_sum": 1834,
            "attested_at": "2026-01-18 20:11:26",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 1637.5,
              "vat_sum": 196.5,
              "gross_sum": 1834,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 1834,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-20 04:05:43",
            "event_uuid": "ded933ac-dd34-42f3-8e47-ebd47f098407",
            "type": "Respite",
            "data": {
              "date": "2026-02-08",
              "total_sum": 1834,
              "remaining_sum": 1834
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "RespiteRemoved": {
        "summary": "Respite removed event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Unpaid",
            "remaining_sum": 1393,
            "total_sum": 1393,
            "attested_at": "2026-01-08 11:27:37",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 1114.34,
              "vat_sum": 278.59,
              "gross_sum": 1392.93,
              "rounding": 0.07,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 1393,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-16 14:39:25",
            "event_uuid": "37c2421e-fee9-4bc9-9c7b-66e6247ef0e7",
            "type": "RespiteRemoved",
            "data": {
              "total_sum": 1393,
              "remaining_sum": 1393
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "RevertWritedown": {
        "summary": "Revert writedown event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Collection",
            "remaining_sum": 262,
            "total_sum": 262,
            "attested_at": "2023-10-06 10:59:54",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 161.47,
              "vat_sum": 40.37,
              "gross_sum": 201.84,
              "rounding": 0.16,
              "reminder_fee": 60,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 262,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2025-08-15 07:06:28",
            "event_uuid": "4b4a9b01-7ebf-4c8a-9e71-7e3b868f7e73",
            "type": "RevertWritedown",
            "data": {
              "total_sum": 262,
              "remaining_sum": 262
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "SaleAccepted": {
        "summary": "Sale accepted event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Unpaid",
            "remaining_sum": 1,
            "total_sum": 1,
            "attested_at": "2023-03-02 16:29:29",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 0.8,
              "vat_sum": 0.2,
              "gross_sum": 1,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 1,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2023-03-02 16:29:47",
            "event_uuid": "999ad962-8396-4fe0-b6ba-258a5902a191",
            "type": "SaleAccepted",
            "data": {
              "offer_id": "sale002",
              "sale_type": "upgrade",
              "accepted_at": "2023-03-02 17:29:47",
              "customer_no": 23,
              "item_title": "Fixed price 1 year",
              "item_price": 53,
              "item_type": "digital"
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "SmsNotAccepted": {
        "summary": "SMS not accepted event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Unpaid",
            "remaining_sum": 595,
            "total_sum": 595,
            "attested_at": "2025-12-25 09:40:55",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 595,
              "vat_sum": 0,
              "gross_sum": 595,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 595,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-02 23:08:08",
            "event_uuid": "96f2b6d6-37ea-4b7d-9143-38a7673797f6",
            "type": "SmsNotAccepted",
            "data": {
              "remaining_sum": 595
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "SoftReminderSent": {
        "summary": "Soft reminder sent event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Overdue",
            "remaining_sum": 344,
            "total_sum": 344,
            "attested_at": "2025-12-17 11:50:02",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 324.53,
              "vat_sum": 19.47,
              "gross_sum": 344,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 344,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-19 15:00:29",
            "event_uuid": "f74887db-b1bd-4f99-b36a-f0734d33be00",
            "type": "SoftReminderSent",
            "data": {
              "delivery_method": "Email"
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "TaxReportingFailed": {
        "summary": "Tax reporting failed event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": null,
            "payment_references": null,
            "state": "Attested",
            "remaining_sum": 120,
            "total_sum": 120,
            "attested_at": "2026-01-19 13:41:20",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 100,
              "vat_sum": 20,
              "gross_sum": 120,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 120,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-19 14:12:06",
            "event_uuid": "c3e1a9f2-5b7d-4e8a-9c21-6d4f0b8e7a13",
            "type": "TaxReportingFailed",
            "data": {
              "tax_reporting_id": "01a12f5f-1bab-7998-9d71-36bbd5067e3b",
              "errors": [
                "INVALID_VAT_RATE_FR"
              ]
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "UnderpaymentSettlement": {
        "summary": "Underpayment settlement event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Overdue",
            "remaining_sum": 0,
            "total_sum": 678.43,
            "attested_at": "2025-12-25 06:18:48",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 542.74,
              "vat_sum": 135.69,
              "gross_sum": 678.43,
              "rounding": 0,
              "reminder_fee": 0,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": -678.43,
              "collector_paid_sum": 0,
              "remaining_sum": 0,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-19 12:03:08",
            "event_uuid": "3120e8ff-9222-46d2-be6a-46e6989ffb17",
            "type": "UnderpaymentSettlement",
            "data": {
              "amount": 0.12,
              "total_sum": 678.43,
              "remaining_sum": 0
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "Writedown": {
        "summary": "Writedown event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Reminder_2",
            "remaining_sum": 326.43,
            "total_sum": 326.43,
            "attested_at": "2025-11-04 06:27:36",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 249.05,
              "vat_sum": 14.94,
              "gross_sum": 263.99,
              "rounding": 0.01,
              "reminder_fee": 60,
              "late_payment_fee": 0,
              "interest_fee": 2.43,
              "credited_sum": 0,
              "paid_sum": 0,
              "collector_paid_sum": 0,
              "remaining_sum": 326.43,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-15 21:03:57",
            "event_uuid": "bf836a2d-61c2-42a8-b49b-3b1fabe3ab7d",
            "type": "Writedown",
            "data": {
              "total_sum": 326.43,
              "remaining_sum": 326.43
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "Writeoff": {
        "summary": "Writeoff event example",
        "value": {
          "billogram": {
            "id": "7Wy4g4tQ",
            "ocr_number": "123456789",
            "payment_references": {
              "OCR": "123456789"
            },
            "state": "Reminder_2",
            "remaining_sum": 0,
            "total_sum": 20.18,
            "attested_at": "2025-12-16 16:34:56",
            "detailed_sums": {
              "invoice_fee": 0,
              "invoice_fee_vat": 0,
              "net_sum": 17.81,
              "vat_sum": 0,
              "gross_sum": 17.81,
              "rounding": 0,
              "reminder_fee": 2.37,
              "late_payment_fee": 0,
              "interest_fee": 0,
              "credited_sum": 0,
              "paid_sum": -20.18,
              "collector_paid_sum": 0,
              "remaining_sum": 0,
              "regional_sweden": {
                "rotavdrag_sum": 0
              }
            },
            "regional_sweden": {
              "rotavdrag_sum": 0
            },
            "creditor_unique_value": "order_2026-01-20_000742"
          },
          "event": {
            "created_at": "2026-01-20 02:19:05",
            "event_uuid": "95711950-e5d4-46dc-9b44-1148660ff125",
            "type": "Writeoff",
            "data": {
              "amount": 0.62,
              "total_sum": 20.18,
              "remaining_sum": 0
            }
          },
          "callback_id": "bk987733-6475-4510-a10a-3fcd67a80kj09",
          "callback_timestamp": "2025-12-20T09:31:42.890080Z",
          "callback_type": "BillogramEvent",
          "custom": "correlation_id=9b2c1a77-3f2d-4b6a-9f7d-1f0c6f4d2a11",
          "signature": null
        }
      },
      "RecipientUpdated": {
        "summary": "Recipient updated callback example",
        "value": {
          "customer": {
            "customer_number": 12345,
            "updated_email": "john.doe@example.com"
          },
          "callback_id": "9ec1c43a-0272-46f0-b4c2-9fe53acdb861",
          "callback_timestamp": "2015-12-04T13:28:51.706784Z",
          "callback_type": "RecipientUpdated"
        }
      },
      "RecipientUpdatedRecurringPaymentEnabled": {
        "summary": "Recipient updated callback example - enabling recurring payments (SEPA)",
        "value": {
          "customer": {
            "customer_number": 12345,
            "recurring_payment_enabled": true,
            "recurring_payment_type": "bnp_sepa"
          },
          "callback_id": "2d4e9fe3-6b5c-4a3e-b685-d62faa0f48e4",
          "callback_timestamp": "2026-01-17T08:10:44.892465Z",
          "callback_type": "RecipientUpdated"
        }
      },
      "RecipientUpdatedRecurringPaymentDisabled": {
        "summary": "Recipient updated callback example - disabling recurring payments (SEPA)",
        "value": {
          "customer": {
            "customer_number": 12345,
            "recurring_payment_enabled": false,
            "recurring_payment_type": "bnp_sepa"
          },
          "callback_id": "9e8f7c16-1a2b-4b0b-9987-a12bcd3e45f6",
          "callback_timestamp": "2026-02-01T08:10:44.892465Z",
          "callback_type": "RecipientUpdated"
        }
      },
      "PaymentRecalled": {
        "summary": "Payment recalled callback example",
        "value": {
          "callback_id": "9ec1c43a-0272-46f0-b4c2-9fe53acdb861",
          "callback_timestamp": "2015-12-04T13:28:51.706784Z",
          "callback_type": "PaymentRecalled",
          "payment_recall": {
            "incoming_payment_id": "9d950c80-6457-4e89-ae6b-2be2df876789",
            "executed_on": "2024-02-02",
            "message": "Refund Request By End Customer",
            "payment_schema": {
              "code": "SEPA_DIRECT_DEBIT"
            },
            "total_amount": 25.78,
            "fee": 3.2,
            "payables": [
              {
                "type": "Billogram",
                "billogram": {
                  "id": "ttEktsQT",
                  "remaining_amount": 12,
                  "state": "Overdue",
                  "invoice_no": 1001,
                  "event": {
                    "type": "PaymentRecalled",
                    "created_at": "2025-01-28 16:33:59",
                    "event_uuid": "0bfec254-d7cc-4775-8fea-ae5c4c2a843b",
                    "data": {
                      "recalled_amount": 12,
                      "related_payment_event_uuids": [
                        "a5d17b76-eeb5-483f-9e65-9e245bdff532",
                        "18bc4eb0-4d17-4493-aa03-5eb2fe2c7040"
                      ]
                    }
                  }
                }
              },
              {
                "type": "Billogram",
                "billogram": {
                  "id": "LrEkgQqa",
                  "remaining_amount": 0,
                  "state": "Unpaid",
                  "invoice_no": 1002,
                  "event": {
                    "type": "PaymentRecalled",
                    "created_at": "2025-01-28 16:33:59",
                    "event_uuid": "f691392a-db63-47c7-b5fd-5535e00a3a50",
                    "data": {
                      "recalled_amount": 13.78,
                      "related_payment_event_uuids": [
                        "7361432b-887f-467d-9f2e-4f62cab992cb",
                        "94276d6a-9aa2-45f6-ab7e-651e70c642af"
                      ]
                    }
                  }
                }
              }
            ],
            "raw_details": {
              "payment_schema": {
                "sepa": {
                  "r_transaction": {
                    "code": "MD06",
                    "message": "Refund Request By End Customer"
                  }
                }
              }
            }
          }
        }
      },
      "EinvoiceRegistrationCreated": {
        "summary": "E-invoice registration created callback example",
        "value": {
          "callback_id": "9ec1c43a-0272-46f0-b4c2-9fe53acdb861",
          "callback_timestamp": "2021-11-03T13:28:51.706784Z",
          "callback_type": "EinvoiceRegistrationCreated",
          "recipient_information": {
            "customer_number": "1234"
          }
        }
      },
      "EinvoiceRegistrationDeleted": {
        "summary": "E-invoice registration deleted callback example",
        "value": {
          "callback_id": "9ec1c43a-0272-46f0-b4c2-9fe53acdb861",
          "callback_timestamp": "2021-11-03T13:28:51.706784Z",
          "callback_type": "EinvoiceRegistrationDeleted",
          "recipient_information": {
            "customer_number": "1234"
          }
        }
      },
      "EinvoiceRegistrationIdentificationMismatch": {
        "summary": "E-invoice registration identification mismatch callback example",
        "value": {
          "callback_id": "9ec1c43a-0272-46f0-b4c2-9fe53acdb861",
          "callback_timestamp": "2021-11-03T13:28:51.706784Z",
          "callback_type": "EinvoiceRegistrationIdentificationMismatch",
          "recipient_information": {
            "customer_number": "1234",
            "operation": "ADD",
            "existing_personal_identification_number": "DDMMYYCZZZQ",
            "new_personal_identification_number": "123"
          }
        }
      },
      "EinvoiceRegistrationRecipientNotFound": {
        "summary": "E-invoice registration recipient not found callback example",
        "value": {
          "callback_id": "9ec1c43a-0272-46f0-b4c2-9fe53acdb861",
          "callback_timestamp": "2021-11-03T13:28:51.706784Z",
          "callback_type": "EinvoiceRegistrationRecipientNotFound",
          "recipient_information": {
            "customer_number": "1234",
            "operation": "ADD",
            "personal_identification_number": "DDMMYYCZZZQ",
            "electronic_invoicing_address": "123"
          }
        }
      },
      "BillingTab": {
        "summary": "BillingTab callback example",
        "value": {
          "callback_id": "89c41740-5eb6-40bb-8ec3-02be196de6da",
          "callback_timestamp": "2025-12-19T07:52:35.620151Z",
          "callback_type": "BillingTab",
          "billing_tab": {
            "customer_number": "5",
            "id": "3b668ece-3941-6555-faf8-c7a082adb4c9"
          },
          "event": {
            "type": "BillogramCreationError",
            "response": {
              "data": {
                "message": "invalid delivery method, address missing"
              },
              "status": "INVALID_PARAMETER"
            }
          }
        }
      },
      "InvoicePdfLayoutAdjusted": {
        "summary": "Invoice PDF layout adjusted callback example",
        "value": {
          "callback_id": "4d8e2b6a-1f3c-4a7e-b5d9-8c0f2e6a1b47",
          "callback_timestamp": "2026-01-19T14:12:06.481530Z",
          "callback_type": "InvoicePdfLayoutAdjusted",
          "code": "LOGO_RESIZED",
          "billogram_id": "7Wy4g4tQ"
        }
      },
      "EfakturaRegistrationRegistration": {
        "summary": "E-faktura registration callback example",
        "value": {
          "callback_id": "9ec1c43a-0272-46f0-b4c2-9fe53acdb861",
          "callback_timestamp": "2021-11-03T13:28:51.706784Z",
          "callback_type": "EfakturaRegistration",
          "efaktura_registration": {
            "registration_type": "Registration",
            "fmi": "199001013030.SHB.SE",
            "bank_name": "Handelsbanken",
            "bank_code": "SHB",
            "id_number": "199001013030",
            "recipient_type": "individual",
            "ocr": "12345678",
            "billogram_customer_number": 1234,
            "customer_supplied_billogram_customer_no": 1234,
            "full_name": "Jane Doe",
            "email": "example@billogram.com",
            "file_contents": "QUFBQUJCQkJDQ0NDRERERA==",
            "file_name": "ANMALAN_20211111112121_14926164417564.TXT"
          }
        }
      },
      "EfakturaRegistrationDeregistration": {
        "summary": "E-faktura deregistration callback example",
        "value": {
          "callback_id": "9ec1c43a-0272-46f0-b4c2-9fe53acdb861",
          "callback_timestamp": "2021-11-03T13:28:51.706784Z",
          "callback_type": "EfakturaRegistration",
          "efaktura_registration": {
            "registration_type": "Deregistration",
            "fmi": "199001013030.SHB.SE",
            "bank_name": "Handelsbanken",
            "bank_code": "SHB",
            "id_number": "199001013030",
            "recipient_type": "individual",
            "full_name": "Jane Doe",
            "email": "example@billogram.com",
            "file_contents": "QUFBQUJCQkJDQ0NDRERERA==",
            "file_name": "ANMALAN_20211111112121_14926164417564.TXT"
          }
        }
      },
      "EfakturaRegistrationForwarded": {
        "summary": "E-faktura forwarded registration callback example",
        "value": {
          "callback_id": "9ec1c43a-0272-46f0-b4c2-9fe53acdb861",
          "callback_timestamp": "2021-11-03T13:28:51.706784Z",
          "callback_type": "EfakturaRegistration",
          "efaktura_registration": {
            "registration_type": "ForwardedEfakturaRegistration",
            "file_contents": "QUFBQUJCQkJDQ0NDRERERA==",
            "file_name": "ANMALAN_20211111112121_14926164417564.TXT"
          }
        }
      }
    },
    "responses": {
      "WebhookSuccess": {
        "description": "Webhook received successfully.\n\n**Required:** Your endpoint must return HTTP 200 OK for the webhook to be considered successfully delivered. Any other status code will cause the webhook to be marked as failed and retried.\n",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "enum": [
                    "OK"
                  ],
                  "description": "Status indicator confirming successful receipt"
                }
              },
              "required": [
                "status"
              ]
            },
            "examples": {
              "success": {
                "summary": "Successful webhook response",
                "value": {
                  "status": "OK"
                }
              }
            }
          }
        }
      },
      "Billogram": {
        "description": "Billogram response",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "examples": [
                    "OK"
                  ]
                },
                "data": {
                  "$ref": "#/components/schemas/Billogram"
                }
              }
            }
          }
        }
      },
      "BillogramList": {
        "description": "Billogram list response",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string"
                },
                "data": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CompactBillogram"
                  }
                }
              }
            }
          }
        }
      },
      "Offer": {
        "description": "Offer response",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "status": {
                  "type": "string",
                  "examples": [
                    "OK"
                  ]
                },
                "data": {
                  "$ref": "#/components/schemas/Offer"
                }
              }
            }
          }
        }
      },
      "OfferList": {
        "description": "Offer list response",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "status": {
                  "type": "string",
                  "examples": [
                    "OK"
                  ]
                },
                "data": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Offer"
                  }
                },
                "meta": {
                  "$ref": "#/components/schemas/OfferListMeta"
                }
              }
            }
          }
        }
      },
      "Settings": {
        "description": "Settings response. The settings were retrieved or updated.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SettingsResponse"
            },
            "examples": {
              "completeSettings": {
                "summary": "Complete settings structure",
                "value": {
                  "status": "OK",
                  "data": {
                    "name": "Testbolaget AB",
                    "org_no": "848484-2326",
                    "company_id": "",
                    "registration_email": "contact@example.com",
                    "contact": {
                      "name": "Sonja",
                      "email": "billing@example.com",
                      "phone": "",
                      "www": ""
                    },
                    "address": {
                      "street_address": "Långgatan 10",
                      "careof": "",
                      "zipcode": "23456",
                      "city": "Exempelköping",
                      "province": "",
                      "country": "SE"
                    },
                    "invoice_address": {
                      "street_address": "",
                      "careof": "",
                      "zipcode": "",
                      "city": "",
                      "province": "",
                      "country": "",
                      "email": ""
                    },
                    "registered_office_address": {
                      "name": "",
                      "street_address": "",
                      "careof": "",
                      "zipcode": "",
                      "city": "",
                      "province": "",
                      "country": ""
                    },
                    "return_address": {
                      "name": "",
                      "street_address": "",
                      "careof": "",
                      "zipcode": "",
                      "city": "",
                      "province": "",
                      "country": ""
                    },
                    "visiting_address": {
                      "street_address": "",
                      "careof": "",
                      "zipcode": "",
                      "city": "",
                      "province": "",
                      "country": ""
                    },
                    "payment": {
                      "bankgiro": "1234-5678",
                      "plusgiro": "",
                      "domestic_bank_account": {
                        "account_no": "",
                        "clearing_no": ""
                      },
                      "international_bank_account": {
                        "bank": "",
                        "iban": "",
                        "bic": "",
                        "swift": ""
                      }
                    },
                    "tax": {
                      "is_vat_registered": true,
                      "has_fskatt": true,
                      "vat_no": ""
                    },
                    "bookkeeping": {
                      "income_account_for_vat_25": "3001",
                      "income_account_for_vat_12": "3002",
                      "income_account_for_vat_6": "3003",
                      "income_account_for_vat_0": "3004",
                      "reversed_vat_account": "3231",
                      "vat_account_for_vat_25": "2610",
                      "vat_account_for_vat_12": "2620",
                      "vat_account_for_vat_6": "2630",
                      "sie_serie": "AA",
                      "sie_continuous_numbering": "monthly",
                      "financial_year_start": "2017-05",
                      "financial_year_months": 3,
                      "account_receivable_account": "1500",
                      "client_funds_account": "1940",
                      "banking_account": "1920",
                      "interest_fee_account": "8313",
                      "reminder_fee_account": "8313",
                      "rounding_account": "3740",
                      "factoring_receivable_account": "1512",
                      "written_down_receivables_account": "1519",
                      "expected_loss_account": "6352",
                      "confirmed_loss_account": "6351",
                      "debt_collection_funds_account": "1941",
                      "liabilities_customers_account": "2420",
                      "regional_sweden": {
                        "rotavdrag_account": "1513"
                      }
                    },
                    "invoices": {
                      "default_message": "",
                      "default_interest_rate": 8.5,
                      "default_reminder_fee": 50,
                      "default_invoice_fee": 0,
                      "default_reminder_due_days": 0,
                      "automatic_reminders": [],
                      "automatic_reminders_minimum_principal_sum": 0,
                      "automatic_writeoff": {
                        "settings": null,
                        "amount": null
                      },
                      "automatic_collection": null,
                      "pdf": {
                        "template": "unified"
                      },
                      "show_item_gross_prices": false,
                      "show_customer_no": false,
                      "show_new_account_notice": false,
                      "use_automatic_reminders_partly_paid": true,
                      "reminders_without_fee": []
                    }
                  }
                }
              }
            }
          }
        }
      },
      "BillogramEventList": {
        "description": "Billogram event list response",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "status": {
                  "type": "string",
                  "examples": [
                    "OK"
                  ]
                },
                "data": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BillogramEvent"
                  }
                },
                "meta": {
                  "$ref": "#/components/schemas/BillogramEventListMeta"
                }
              }
            },
            "examples": {
              "multipleEvents": {
                "summary": "Billogram event list with multiple events",
                "value": {
                  "status": "OK",
                  "data": [
                    {
                      "type": "BillogramCreated",
                      "created_at": "2025-11-16 10:33:50",
                      "event_uuid": "d271d194-4a6a-4fad-8c77-2771f4b3d99a",
                      "data": {},
                      "billogram_id": "HyU42a2"
                    },
                    {
                      "type": "BillogramSent",
                      "created_at": "2025-11-16 10:44:05",
                      "event_uuid": "3d8727e0-acc6-441c-ae7a-1f0af9d9d1bc",
                      "data": {
                        "invoice_no": 29,
                        "delivery_method": "Email",
                        "scanning_central": false,
                        "total_sum": 533,
                        "remaining_sum": 533,
                        "letter_id": "zI3NWZiMjU3ZjViNWU4ZgMjMyMTEwMQ98804ebc2170ddf4d085c01475ea489a",
                        "delivery_redirected": false,
                        "original_delivery_method": "Email",
                        "url": "https://billogram.com/view/example-org-url-token",
                        "recipient_url": "https://billogram.com/view/example-recipient-token",
                        "recipient_overview_url": "https://billogram.com/overview/example-overview-token"
                      },
                      "billogram_id": "HyU42a2"
                    },
                    {
                      "type": "Payment",
                      "created_at": "2025-11-16 13:16:34",
                      "event_uuid": "500c4eee-5245-4b65-a51d-02e89308ba5f",
                      "data": {
                        "payer_name": null,
                        "amount": 533,
                        "banking_amount": null,
                        "payment_flags": [],
                        "manual": true,
                        "total_sum": 533,
                        "remaining_sum": 0
                      },
                      "billogram_id": "HyU42a2"
                    },
                    {
                      "type": "BillogramEnded",
                      "created_at": "2025-11-17 07:29:39",
                      "event_uuid": "e1a6b3ea-4898-4b87-94c5-f67bd6bc624e",
                      "data": {
                        "total_sum": 533,
                        "remaining_sum": 0,
                        "ended_reason": "paid"
                      },
                      "billogram_id": "HyU42a2"
                    }
                  ],
                  "meta": {
                    "total_count": 4
                  }
                }
              }
            }
          }
        }
      },
      "BillingTabItemCreated": {
        "description": "Billing tab item created.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/BillingTabItemCreatedResponse"
            },
            "examples": {
              "created": {
                "summary": "Item created",
                "value": {
                  "status": "OK",
                  "data": {
                    "billing_tab_id": "3b668ece-3941-6555-faf8-c7a0f9b3aace",
                    "item_id": "24913ec8-e8de-497d-af3a-f893f1418e38",
                    "created_at": "2025-09-12T12:42:56.071577Z",
                    "billogram_item": {
                      "count": 1,
                      "title": "Monthly subscription",
                      "description": "Premium plan subscription",
                      "unit": "month",
                      "price": 29.99,
                      "vat": 25
                    }
                  }
                }
              }
            }
          }
        }
      },
      "BillingTabDetails": {
        "description": "Billing tab details.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/BillingTabDetailsResponse"
            },
            "examples": {
              "billingTab": {
                "summary": "Billing tab (example)",
                "value": {
                  "status": "OK",
                  "data": {
                    "customer": {
                      "customer_number": "1"
                    },
                    "billing_tab": {
                      "id": "3b668ece-3941-6555-faf8-c7a0f9b3aace",
                      "billing_date": "2026-01-16"
                    },
                    "items": [
                      {
                        "item_id": "24913ec8-e8de-497d-af3a-f893f1418e38",
                        "created_at": "2025-09-12T12:42:56.071577Z",
                        "billogram_item": {
                          "count": 1,
                          "title": "Monthly subscription",
                          "description": "Premium plan subscription",
                          "unit": "month",
                          "price": 29.99,
                          "vat": 25,
                          "external_id": "billogram_item.external_id"
                        }
                      },
                      {
                        "item_id": "5e3e18d2-9ddc-4275-8282-63165fd2ba03",
                        "created_at": "2026-01-15T09:45:54.602866Z",
                        "billogram_item": {
                          "count": 1,
                          "title": "One time purchase",
                          "description": "Premium Product",
                          "unit": "-",
                          "vat": 0,
                          "external_id": "billogram_item.external_id 2"
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      },
      "BillingTabSettings": {
        "description": "Billing tab settings.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/BillingTabSettingsResponse"
            },
            "examples": {
              "settings": {
                "summary": "Settings response",
                "value": {
                  "status": "OK",
                  "data": {
                    "delivery_method": "Email",
                    "billing_frequency": "monthly#20"
                  }
                }
              }
            }
          }
        }
      },
      "BadRequestSendBillogram": {
        "description": "Bad Request - invalid input or invalid state when sending a billogram.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "MethodMissing": {
                "$ref": "#/components/examples/MethodMissingSend"
              },
              "InvalidMethod": {
                "$ref": "#/components/examples/InvalidMethodSend"
              },
              "InvalidObjectStateSend": {
                "$ref": "#/components/examples/InvalidObjectStateSend"
              }
            }
          }
        }
      },
      "BadRequestResendBillogram": {
        "description": "Bad Request - invalid input or invalid state when resending a billogram.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "InvalidMethod": {
                "$ref": "#/components/examples/InvalidMethodSend"
              },
              "InvalidObjectStateResend": {
                "$ref": "#/components/examples/InvalidObjectStateResend"
              }
            }
          }
        }
      },
      "BadRequestDeleteBillogram": {
        "description": "Bad Request - delete is not allowed for the billogram's current state.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "InvalidObjectStateDelete": {
                "$ref": "#/components/examples/InvalidObjectStateDeleteBillogram"
              }
            }
          }
        }
      },
      "BadRequestRemindBillogram": {
        "description": "Bad Request - invalid input or invalid state when reminding a billogram.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "InvalidParameter": {
                "$ref": "#/components/examples/InvalidParameterRemind"
              },
              "InvalidObjectState": {
                "$ref": "#/components/examples/InvalidObjectStateRemind"
              }
            }
          }
        }
      },
      "BadRequestSepaMandateMigrationResponse": {
        "description": "Bad Request - invalid input when migrating a SEPA Direct Debit mandate.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "ValidationError": {
                "$ref": "#/components/examples/SepaMandateMigrationInvalidIban"
              },
              "MandateAlreadyExists": {
                "$ref": "#/components/examples/SepaMandateMigrationMandateAlreadyExists"
              },
              "CreditorAccountInformationMissing": {
                "$ref": "#/components/examples/SepaMandateMigrationCreditorAccountInfoMissing"
              }
            }
          }
        }
      },
      "BillingTabNotFound": {
        "description": "Not Found. No billing tab exists for the customer (or the requested tab does not exist).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "BillingTabItemNotFound": {
        "description": "Not Found. No billing tab item exists with the given ID.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "BillingTabSettingsNotFound": {
        "description": "Not Found. No billing tab settings exist for the customer.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "BillingTabRunConflict": {
        "description": "Conflict. The billing tab cannot be run in its current state (for example, it has already been processed).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "BadRequest": {
        "description": "Bad Request - The request was invalid or cannot be otherwise served.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "InvalidParameter": {
                "$ref": "#/components/examples/InvalidParameter"
              },
              "DuplicateCreditorUniqueValue": {
                "$ref": "#/components/examples/DuplicateCreditorUniqueValue"
              },
              "InvalidAutomaticCollectionDate": {
                "$ref": "#/components/examples/InvalidAutomaticCollectionDate"
              },
              "ReadOnlyParameter": {
                "$ref": "#/components/examples/ReadOnlyParameter"
              },
              "UnknownParameter": {
                "$ref": "#/components/examples/UnknownParameter"
              },
              "InvalidParameterCombination": {
                "$ref": "#/components/examples/InvalidParameterCombination"
              },
              "InvalidObjectState": {
                "$ref": "#/components/examples/InvalidObjectState"
              },
              "MissingQueryParameter": {
                "$ref": "#/components/examples/MissingQueryParameter"
              },
              "InvalidQueryParameter": {
                "$ref": "#/components/examples/InvalidQueryParameter"
              },
              "RespiteDateMissing": {
                "$ref": "#/components/examples/RespiteDateMissing"
              },
              "RespiteDateInvalid": {
                "$ref": "#/components/examples/RespiteDateInvalid"
              },
              "RespiteDateFormatInvalid": {
                "$ref": "#/components/examples/RespiteDateFormatInvalid"
              }
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Unauthorized - Authentication is required and has failed or has not yet been provided.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "MissingAuth": {
                "$ref": "#/components/examples/MissingAuth"
              }
            }
          }
        }
      },
      "Forbidden": {
        "description": "Forbidden - The server understood the request but refuses to authorize it.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "PermissionDeniedCollector": {
                "$ref": "#/components/examples/PermissionDeniedCollector"
              },
              "PermissionDeniedOperation": {
                "$ref": "#/components/examples/PermissionDeniedOperation"
              }
            }
          }
        }
      },
      "ForbiddenSendBillogram": {
        "description": "Forbidden - not permitted to send billogram.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "PermissionDeniedOperation": {
                "$ref": "#/components/examples/PermissionDeniedOperation"
              }
            }
          }
        }
      },
      "ForbiddenRemindBillogram": {
        "description": "Forbidden - not permitted to remind billogram.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "PermissionDeniedReminder": {
                "$ref": "#/components/examples/PermissionDeniedReminder"
              }
            }
          }
        }
      },
      "ForbiddenSepaMandateMigration": {
        "description": "Forbidden - either the credentials were rejected or the authenticated user lacks permission to migrate SEPA mandates.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "PermissionDeniedOperation": {
                "$ref": "#/components/examples/PermissionDeniedOperation"
              },
              "InvalidAuth": {
                "$ref": "#/components/examples/InvalidAuth"
              }
            }
          }
        }
      },
      "BillogramNotFound": {
        "description": "Not Found - The requested resource could not be found or is not yet available.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "NotFound": {
                "$ref": "#/components/examples/BillogramNotFound"
              },
              "NotFoundUpdate": {
                "$ref": "#/components/examples/BillogramNotFoundUpdate"
              }
            }
          }
        }
      },
      "CustomerNotFound": {
        "description": "Not Found - The requested resource could not be found.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "NotFound": {
                "$ref": "#/components/examples/CustomerNotFound"
              }
            }
          }
        }
      },
      "AssetNotFound": {
        "description": "Not Found - The requested resource could not be found.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "NotFound": {
                "$ref": "#/components/examples/AssetNotFound"
              }
            }
          }
        }
      },
      "OfferNotFound": {
        "description": "Not Found - No offer exists with the given offer_id.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "NotFound": {
                "value": {
                  "status": "NOT_FOUND",
                  "data": {
                    "message": "No offer exists with the given offer_id."
                  }
                }
              }
            }
          }
        }
      },
      "Item": {
        "description": "Item response",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string"
                },
                "data": {
                  "$ref": "#/components/schemas/Item"
                }
              }
            }
          }
        }
      },
      "ItemList": {
        "description": "Item list response",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string"
                },
                "data": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Item"
                  }
                },
                "meta": {
                  "type": "object",
                  "properties": {
                    "total_count": {
                      "type": "integer",
                      "description": "Total number of items that were matched in the database, disregarding page size."
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ItemNotFound": {
        "description": "Not Found - No item exists with the given item_no.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "NotFound": {
                "$ref": "#/components/examples/ItemNotFound"
              }
            }
          }
        }
      },
      "InternalServerError": {
        "description": "Internal Server Error.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "InternalError": {
                "$ref": "#/components/examples/InternalError"
              }
            }
          }
        }
      },
      "BadGateway": {
        "description": "Bad Gateway.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "BadGateway": {
                "$ref": "#/components/examples/BadGateway"
              }
            }
          }
        }
      },
      "ServiceUnavailable": {
        "description": "Service Unavailable - The server is currently unable to handle the request.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "ServiceUnavailable": {
                "$ref": "#/components/examples/ServiceUnavailable"
              }
            }
          }
        }
      },
      "GatewayTimeout": {
        "description": "Gateway Timeout.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "GatewayTimeout": {
                "$ref": "#/components/examples/GatewayTimeout"
              }
            }
          }
        }
      }
    }
  },
  "x-ext-urls": {}
}