---
updatedAt: 2026-10-22T05:50:18.000Z
agentTools:
  projectIndex: https://developer.xentral.com/llms.txt
---

# 🔒 Create supplier invoice V3

This endpoint is currently in Beta and available for testing. It may contain bugs, and breaking changes can occur at any time without prior notice. We do not recommend using Beta endpoints in production environments. Should you choose to use it in production, you assume full responsibility for any resulting issues.

This endpoint requires the following scopes: `supplierInvoice:create`.

Create a supplier invoice (liability). The invoice is created as a draft without a document number; omitted fields are derived from the supplier and project defaults. Line items, account assignments and purchase order assignments can be sent along and are created in the same transaction as the invoice; files are managed through their sub-resource. The tax summary, the general ledger account and the cost center live on the line items, which carry taxRate, generalLedgerAccount and costCenter of their own and are what gets booked.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Xentral Business Documents API v3",
    "description": "The Xentral Business Documents API v3 for working with sales orders, offers, invoices, credit notes, delivery notes, return orders, purchase orders, proforma invoices and productions.\n\nIndividual endpoints marked as *Beta* may still change without prior notice — see the respective endpoint descriptions.\n\nRequest payloads may contain properties that an endpoint does not define; these are ignored rather than rejected. Nothing is stored for them and no error is returned, so check the response body to confirm which values were actually applied.",
    "contact": {
      "name": "API Support",
      "url": "https://xentral.com",
      "email": "api@xentral.com"
    },
    "version": "0.2.0"
  },
  "servers": [
    {
      "url": "https://{xentralId}.xentral.biz",
      "description": "Your xentral instance",
      "variables": {
        "xentralId": {
          "default": "my-company",
          "description": "Your Xentral instance ID"
        }
      }
    },
    {
      "url": "https://{domain}",
      "description": "Xentral with a custom domain",
      "variables": {
        "domain": {
          "default": "demo.xentral.com",
          "description": "Your Xentral custom domain"
        }
      }
    }
  ],
  "components": {
    "schemas": {
      "Address": {
        "required": [
          "id",
          "createdAt",
          "updatedAt"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/TimestampsResource"
          },
          {
            "properties": {
              "id": {
                "type": "string",
                "example": "42"
              },
              "isDeleted": {
                "description": "Flagged if the entry was deleted.",
                "type": "boolean",
                "example": false
              },
              "name": {
                "description": "Name of the customer or supplier.",
                "type": "string",
                "example": "Muster Holz GmbH"
              },
              "customerNumber": {
                "description": "Customer number of the address. `null` when the address is not a customer. A deleted address keeps its number with a `DEL-` prefix.",
                "type": [
                  "string",
                  "null"
                ],
                "example": "10001"
              },
              "supplierNumber": {
                "description": "Supplier number of the address. `null` when the address is not a supplier. A deleted address keeps its number with a `DEL-` prefix.",
                "type": [
                  "string",
                  "null"
                ],
                "example": "70012"
              }
            },
            "type": "object"
          }
        ]
      },
      "BusinessDocumentFile": {
        "description": "A file attached to a business document.",
        "required": [
          "id",
          "sort"
        ],
        "properties": {
          "id": {
            "description": "ID of the file — the id the document's file endpoints take as {fileId}, and the one its upload endpoint returns.",
            "type": "string",
            "pattern": "[0-9]+",
            "example": "4711"
          },
          "title": {
            "description": "Title of the underlying file.",
            "type": [
              "string",
              "null"
            ],
            "example": "Signed delivery note"
          },
          "description": {
            "description": "Description of the underlying file.",
            "type": [
              "string",
              "null"
            ],
            "example": "Customer copy"
          },
          "keyword": {
            "description": "What the file is filed as on the document. Null when it is filed under a keyword outside the standard set, for example one this Xentral instance defined itself.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "otherFile",
              "coverPage",
              "attachment",
              "eInvoice",
              "receipt",
              "paymentReceipt"
            ],
            "example": "attachment"
          },
          "sort": {
            "description": "Position of the file in the document's attachment list, in ascending order.",
            "type": "integer",
            "example": 0
          },
          "url": {
            "description": "Temporary, signed URL to download the file. Null when the file has not been migrated to cloud storage yet.",
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "example": "https://files.example.com/rechnung/4711.pdf?signature=abc123"
          }
        },
        "type": "object",
        "additionalProperties": false
      },
      "CreateSupplierInvoiceAccountAssignmentRequest": {
        "required": [
          "amount",
          "counterAccount"
        ],
        "properties": {
          "amount": {
            "$ref": "#/components/schemas/Money",
            "description": "The share of the invoice booked onto the contra account. Split an invoice by creating one assignment per share; the assignments never change the invoice total. The currency must match the invoice currency, because every share is part of the same total."
          },
          "counterAccount": {
            "description": "The contra account this share is booked onto. Not validated against the chart of accounts: an account number is commonly prefixed with a tax key, so `906815` books 19% input tax onto account `6815`, and the prefixed form is not itself a chart entry.",
            "type": "string",
            "maxLength": 255,
            "example": "4400"
          },
          "taxRate": {
            "description": "Tax rate of this booking line in percent, for the record only - what is actually booked follows from the contra account. Defaults to 0 when omitted: the rate a client did not state is not a rate, and the rate that applies is not necessarily the domestic standard one.",
            "type": "number",
            "format": "float",
            "maximum": 100,
            "minimum": 0,
            "example": 19
          },
          "costCenter": {
            "description": "Number of the cost center this share is booked to. Defaults to the cost center of the invoice, which is what the account assignment dialog prefills.",
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20,
            "example": "1000"
          },
          "bookingText": {
            "description": "Booking text of this line. Defaults to the payment reference of the invoice, which is what the account assignment dialog prefills.",
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255,
            "example": "Wareneingang Lieferant X"
          },
          "documentField": {
            "description": "Document field, the filing reference of the booking record. Defaults to the supplier invoice number of the invoice, which is what the account assignment dialog prefills.",
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255,
            "example": "RE-2026-0815"
          }
        },
        "type": "object"
      },
      "CreateSupplierInvoiceLineItemRequest": {
        "required": [
          "product",
          "quantity",
          "price"
        ],
        "properties": {
          "product": {
            "description": "The product this line item invoices.",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "description": "The product ID.",
                "type": "string",
                "example": "13"
              }
            },
            "type": "object"
          },
          "quantity": {
            "description": "Invoiced quantity.",
            "type": "number",
            "format": "float",
            "maximum": 99999999.99,
            "exclusiveMinimum": 0,
            "example": 10.5
          },
          "price": {
            "description": "Price information of the line item.",
            "required": [
              "net"
            ],
            "properties": {
              "net": {
                "$ref": "#/components/schemas/Money",
                "description": "Net unit price. The currency must match the currency of the invoice."
              }
            },
            "type": "object"
          },
          "taxRate": {
            "description": "The tax rate applied to this line item. Either one of the predefined tax categories - `standard` and `reduced` use the corresponding tax rate of the invoice (see `taxes.normalTax.rate` and `taxes.reducedTax.rate`), `exempt` uses 0% - or an explicit percentage that replaces the category. Stored with two decimals. When omitted, the tax category of the product applies.",
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "standard",
                  "reduced",
                  "exempt"
                ],
                "example": "reduced"
              },
              {
                "type": "number",
                "format": "float",
                "maximum": 999.99,
                "minimum": 0,
                "example": 12.5
              }
            ]
          },
          "taxLegalNotice": {
            "description": "Legal notice regarding the taxation of this line item.",
            "type": [
              "string",
              "null"
            ],
            "maxLength": 1024,
            "example": "Reverse charge according to §13b UStG"
          },
          "name": {
            "description": "Line item name. Defaults to the name of the product.",
            "type": "string",
            "maxLength": 255,
            "example": "Cable drum 50m"
          },
          "description": {
            "description": "Line item description. Defaults to the description of the product.",
            "type": "string",
            "example": "Halogen-free, 3 x 1.5 mm²"
          },
          "unit": {
            "description": "Unit of the line item (e.g. \"kg\", \"pcs\"). Defaults to the unit of the product.",
            "type": "string",
            "maxLength": 255,
            "example": "pcs"
          },
          "packagingUnit": {
            "description": "Packaging unit of the line item - how many units one package contains. Stored for information only; quantity and price are never derived from it.",
            "type": "string",
            "maxLength": 255,
            "example": "12"
          },
          "supplierProductNumber": {
            "description": "The number this product carries in the supplier's catalogue.",
            "type": "string",
            "maxLength": 255,
            "example": "SUP-10077"
          },
          "deliveryDate": {
            "description": "Date the invoiced goods or services were delivered.",
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "example": "2026-09-01"
          },
          "purchaseOrder": {
            "description": "The purchase order this line item was ordered with.",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "description": "The purchase order ID.",
                "type": "string",
                "example": "5"
              }
            },
            "type": "object"
          },
          "costCenter": {
            "description": "Cost center number the line item is booked to. Defaults to the cost center of the invoice.",
            "type": [
              "string",
              "null"
            ],
            "maxLength": 10,
            "example": "1000"
          },
          "generalLedgerAccount": {
            "description": "G/L account number the line item is booked to. Creates the account assignment of the line item.",
            "type": [
              "string",
              "null"
            ],
            "example": "3400"
          }
        },
        "type": "object"
      },
      "CreateSupplierInvoicePurchaseOrderAssignmentRequest": {
        "required": [
          "purchaseOrder"
        ],
        "properties": {
          "purchaseOrder": {
            "description": "The purchase order to assign to the invoice.",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "description": "The purchase order ID.",
                "type": "string",
                "example": "5"
              }
            },
            "type": "object"
          },
          "project": {
            "description": "The project this assignment is booked to. Reporting sums the assigned amounts per project, so an assignment without a project is not counted towards one. Not derived from the purchase order.",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "description": "The project ID.",
                "type": "string",
                "example": "1"
              }
            },
            "type": "object"
          },
          "salesOrder": {
            "description": "The sales order the assigned purchase order was ordered for.",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "description": "The sales order ID.",
                "type": "string",
                "example": "42"
              }
            },
            "type": "object"
          },
          "amountGross": {
            "description": "Gross share of the invoice attributed to this purchase order. Use it to split an invoice across several purchase orders; it is never derived from either document and never changes the invoice total.",
            "required": [
              "amount",
              "currency"
            ],
            "properties": {
              "amount": {
                "description": "The monetary amount. Must be between -99999999.99 and 99999999.99.",
                "type": "string",
                "example": "119.00"
              },
              "currency": {
                "description": "ISO 4217 currency code; must match the invoice currency.",
                "type": "string",
                "example": "EUR"
              }
            },
            "type": "object"
          },
          "amountNet": {
            "description": "Net share of the invoice attributed to this purchase order. Independent of `amountGross`: neither is calculated from the other or from a tax rate.",
            "required": [
              "amount",
              "currency"
            ],
            "properties": {
              "amount": {
                "description": "The monetary amount. Must be between -99999999.99 and 99999999.99.",
                "type": "string",
                "example": "100.00"
              },
              "currency": {
                "description": "ISO 4217 currency code; must match the invoice currency.",
                "type": "string",
                "example": "EUR"
              }
            },
            "type": "object"
          },
          "costCenter": {
            "description": "Number of the cost center this assignment is booked to. Independent of the cost center of the invoice, which is not inherited here.",
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20,
            "example": "1000"
          },
          "comment": {
            "description": "Free-text comment on the assignment, shown with it on the invoice.",
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255,
            "example": "Partial delivery, remainder invoiced separately"
          }
        },
        "type": "object"
      },
      "CreateSupplierInvoiceRequest": {
        "required": [
          "supplier"
        ],
        "properties": {
          "supplier": {
            "description": "The supplier this invoice was received from.",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "description": "The supplier ID.",
                "type": "string",
                "example": "42"
              }
            },
            "type": "object"
          },
          "supplierInvoiceNumber": {
            "description": "The invoice number as printed on the supplier's invoice document.",
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255,
            "example": "RE-2026-0815"
          },
          "date": {
            "description": "Invoice date as printed on the supplier's invoice. Defaults to today.",
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "example": "2026-08-01"
          },
          "receiptDate": {
            "description": "Date the invoice was received. Defaults to today.",
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "example": "2026-08-03"
          },
          "serviceDate": {
            "description": "Date of supply or service.",
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "example": "2026-07-28"
          },
          "project": {
            "description": "Project this invoice belongs to. Defaults to the supplier's default project.",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "description": "The project ID.",
                "type": "string",
                "example": "3"
              }
            },
            "type": [
              "object",
              "null"
            ]
          },
          "salesOrder": {
            "description": "Sales order this invoice relates to.",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "description": "The sales order ID.",
                "type": "string",
                "example": "77"
              }
            },
            "type": [
              "object",
              "null"
            ]
          },
          "purchaseOrder": {
            "description": "The purchase order this invoice belongs to as a whole, the same field the supplier invoice form in the application writes. It states the simple case, that the whole invoice pays for one purchase order, and it is kept independently of the purchase order assignments. Use `purchaseOrders` to assign several purchase orders or a share of one, either inline here or afterwards through the purchase order assignment sub-resource, which is where the created ones are addressable.",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "description": "The purchase order ID.",
                "type": "string",
                "example": "55"
              }
            },
            "type": [
              "object",
              "null"
            ]
          },
          "paymentReference": {
            "description": "Payment reference used when paying this invoice.",
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255,
            "example": "RE-2026-0815 / Kd-Nr 1001"
          },
          "internalComment": {
            "description": "Internal comment, not visible to the supplier.",
            "type": [
              "string",
              "null"
            ],
            "example": "Prices verified against the purchase order."
          },
          "description": {
            "description": "Free-text description of the invoice.",
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255,
            "example": "Office supplies July"
          },
          "vatId": {
            "description": "VAT identification number printed on the supplier's invoice. Defaults to the VAT ID stored on the supplier.",
            "type": [
              "string",
              "null"
            ],
            "maxLength": 64,
            "example": "DE123456789"
          },
          "financials": {
            "description": "Financial settings of the invoice.",
            "properties": {
              "currency": {
                "description": "ISO 4217 currency code of the invoice. Defaults to the project or company default currency.",
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 3,
                "example": "EUR"
              },
              "paymentMethod": {
                "description": "Payment method used to pay this invoice. Defaults to the supplier's payment method or the company default.",
                "required": [
                  "id"
                ],
                "properties": {
                  "id": {
                    "description": "The payment method ID.",
                    "type": "string",
                    "example": "2"
                  }
                },
                "type": [
                  "object",
                  "null"
                ]
              }
            },
            "type": "object"
          },
          "amountGross": {
            "description": "Gross total of the invoice. The currency must match the invoice currency. Defaults to 0.",
            "required": [
              "amount",
              "currency"
            ],
            "properties": {
              "amount": {
                "description": "The monetary amount. Must be between -99999999.99 and 99999999.99.",
                "type": "string",
                "example": "119.00"
              },
              "currency": {
                "description": "ISO 4217 currency code; must match the invoice currency.",
                "type": "string",
                "example": "EUR"
              }
            },
            "type": [
              "object",
              "null"
            ]
          },
          "freightCharge": {
            "description": "Freight charge portion of the invoice. The currency must match the invoice currency. Defaults to 0.",
            "required": [
              "amount",
              "currency"
            ],
            "properties": {
              "amount": {
                "description": "The monetary amount. Must be between -99999999.99 and 99999999.99.",
                "type": "string",
                "example": "4.90"
              },
              "currency": {
                "description": "ISO 4217 currency code; must match the invoice currency.",
                "type": "string",
                "example": "EUR"
              }
            },
            "type": [
              "object",
              "null"
            ]
          },
          "taxationType": {
            "description": "Taxation scheme of the invoice. Defaults to the taxation scheme stored on the supplier.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "domestic",
              "eu",
              "export",
              "import"
            ],
            "example": "domestic"
          },
          "taxes": {
            "description": "Tax rates and amounts contained in the invoice total. Rates default to the standard and reduced rates of the project.",
            "properties": {
              "normalTax": {
                "properties": {
                  "rate": {
                    "description": "Standard tax rate in percent.",
                    "type": [
                      "number",
                      "null"
                    ],
                    "format": "float",
                    "maximum": 100,
                    "minimum": 0,
                    "example": 19
                  },
                  "amount": {
                    "description": "Tax amount at the standard rate.",
                    "type": [
                      "number",
                      "null"
                    ],
                    "format": "float",
                    "maximum": 999999.9999,
                    "minimum": -999999.9999,
                    "example": 19
                  }
                },
                "type": "object"
              },
              "reducedTax": {
                "properties": {
                  "rate": {
                    "description": "Reduced tax rate in percent.",
                    "type": [
                      "number",
                      "null"
                    ],
                    "format": "float",
                    "maximum": 100,
                    "minimum": 0,
                    "example": 7
                  },
                  "amount": {
                    "description": "Tax amount at the reduced rate.",
                    "type": [
                      "number",
                      "null"
                    ],
                    "format": "float",
                    "maximum": 999999.9999,
                    "minimum": -999999.9999,
                    "example": 0
                  }
                },
                "type": "object"
              },
              "customTax1": {
                "properties": {
                  "rate": {
                    "description": "First custom tax rate in percent.",
                    "type": [
                      "number",
                      "null"
                    ],
                    "format": "float",
                    "maximum": 100,
                    "minimum": 0,
                    "example": 5.5
                  },
                  "amount": {
                    "description": "Tax amount at the first custom rate.",
                    "type": [
                      "number",
                      "null"
                    ],
                    "format": "float",
                    "maximum": 999999.9999,
                    "minimum": -999999.9999,
                    "example": 0
                  },
                  "name": {
                    "description": "Label of the first custom tax rate.",
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 64,
                    "example": "FR TVA"
                  }
                },
                "type": "object"
              },
              "customTax2": {
                "properties": {
                  "rate": {
                    "description": "Second custom tax rate in percent.",
                    "type": [
                      "number",
                      "null"
                    ],
                    "format": "float",
                    "maximum": 100,
                    "minimum": 0,
                    "example": 0
                  },
                  "amount": {
                    "description": "Tax amount at the second custom rate.",
                    "type": [
                      "number",
                      "null"
                    ],
                    "format": "float",
                    "maximum": 999999.9999,
                    "minimum": -999999.9999,
                    "example": 0
                  },
                  "name": {
                    "description": "Label of the second custom tax rate.",
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 64,
                    "example": ""
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          },
          "paymentTerms": {
            "description": "Payment terms of the invoice.",
            "properties": {
              "dueDate": {
                "description": "Date the invoice is payable by. Defaults to the invoice date plus the supplier's payment target days.",
                "type": [
                  "string",
                  "null"
                ],
                "format": "date",
                "example": "2026-08-31"
              },
              "paymentTargetDiscountDate": {
                "description": "Last date the early payment discount may be taken. Omit or send null when no discount period applies. Note: when the record is later opened in the Xentral UI and this date is empty, the UI backfills it from the invoice date plus the supplier's discount days — an empty date only persists for suppliers without configured discount days.",
                "type": [
                  "string",
                  "null"
                ],
                "format": "date",
                "example": "2026-08-15"
              },
              "paymentTargetDiscount": {
                "description": "Early payment discount in percent. Defaults to the discount rate stored on the supplier.",
                "type": [
                  "number",
                  "null"
                ],
                "format": "float",
                "example": 2
              },
              "paymentTargetDiscountFixed": {
                "description": "Fixes the early payment discount so it is not recalculated from the supplier's terms when the invoice is edited. Defaults to true when paymentTargetDiscount is provided, otherwise false.",
                "type": "boolean",
                "example": false
              }
            },
            "type": "object"
          },
          "payment": {
            "description": "Payment details of the invoice.",
            "properties": {
              "paidAmount": {
                "description": "Amount already paid. The currency must match the invoice currency. Defaults to 0.",
                "required": [
                  "amount",
                  "currency"
                ],
                "properties": {
                  "amount": {
                    "description": "The monetary amount. Must be between -99999999.99 and 99999999.99.",
                    "type": "string",
                    "example": "0.00"
                  },
                  "currency": {
                    "description": "ISO 4217 currency code; must match the invoice currency.",
                    "type": "string",
                    "example": "EUR"
                  }
                },
                "type": [
                  "object",
                  "null"
                ]
              },
              "paidAt": {
                "description": "Date the invoice was paid.",
                "type": [
                  "string",
                  "null"
                ],
                "format": "date",
                "example": "2026-08-20"
              },
              "discountReceived": {
                "description": "Early payment discount amount actually received. The currency must match the invoice currency. Defaults to 0.",
                "required": [
                  "amount",
                  "currency"
                ],
                "properties": {
                  "amount": {
                    "description": "The monetary amount. Must be between -99999999.99 and 99999999.99.",
                    "type": "string",
                    "example": "0.00"
                  },
                  "currency": {
                    "description": "ISO 4217 currency code; must match the invoice currency.",
                    "type": "string",
                    "example": "EUR"
                  }
                },
                "type": [
                  "object",
                  "null"
                ]
              }
            },
            "type": "object"
          },
          "generalLedgerAccount": {
            "description": "General ledger account number from the chart of accounts. Accepted when the positions table feature is disabled; ignored otherwise.",
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255,
            "example": "4400"
          },
          "costCenter": {
            "description": "Cost center number. Accepted when the positions table feature is disabled; ignored otherwise.",
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255,
            "example": "1000"
          },
          "isInNeedOfClarification": {
            "description": "Marks the invoice as a clarification case. Defaults to false.",
            "type": "boolean",
            "example": false
          },
          "clarificationReason": {
            "description": "Reason why the invoice needs clarification.",
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255,
            "example": "Amount differs from purchase order"
          },
          "goodsCheckAccepted": {
            "description": "Whether the goods check (sachliche Prüfung) has been accepted. Defaults to false.",
            "type": "boolean",
            "example": false
          },
          "invoiceCheckAccepted": {
            "description": "Whether the invoice check has been accepted. Defaults to false.",
            "type": "boolean",
            "example": false
          },
          "paymentStatus": {
            "description": "Payment state of the invoice. Only `pending` and `paid` can be set on creation. Defaults to `pending`. A payment method that is configured to auto-pay liabilities overrides this and creates the invoice as `paid`.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "pending",
              "paid"
            ],
            "example": "pending"
          },
          "lineItems": {
            "description": "Line items to create together with the invoice. They document what was invoiced and never change the totals of the invoice. Line items can also be added afterwards through the line item sub-resource.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateSupplierInvoiceLineItemRequest"
            },
            "maxItems": 100
          },
          "accountAssignments": {
            "description": "Account assignments to book together with the invoice - the shares of the invoice booked onto contra accounts. Splitting an invoice across accounts or tax rates is the normal case, so the whole split lands in one transaction. Assignments can also be added afterwards through their sub-resource, which is where the created ones are addressable.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateSupplierInvoiceAccountAssignmentRequest"
            },
            "maxItems": 100
          },
          "purchaseOrders": {
            "description": "Purchase orders to assign to the invoice, each stating its own share of it. Assignments can also be added afterwards through their sub-resource, which is where the created ones are addressable.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateSupplierInvoicePurchaseOrderAssignmentRequest"
            },
            "maxItems": 100
          }
        },
        "type": "object"
      },
      "Money": {
        "description": "Money",
        "properties": {
          "amount": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ]
          },
          "currency": {
            "description": "Currency",
            "type": "string",
            "example": "EUR"
          }
        },
        "type": "object",
        "example": {
          "amount": "13.37",
          "currency": "EUR"
        },
        "additionalProperties": false
      },
      "Project": {
        "required": [
          "id",
          "name",
          "abbreviation"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "54"
          },
          "name": {
            "type": "string",
            "example": "Standard Project"
          },
          "abbreviation": {
            "type": "string",
            "example": "STANDARD"
          }
        },
        "type": "object",
        "additionalProperties": false
      },
      "SupplierInvoice": {
        "description": "A supplier invoice (liability / accounts payable document).",
        "required": [
          "id",
          "documentNumber",
          "documentStatus",
          "supplier",
          "supplierInvoiceNumber",
          "date",
          "receiptDate",
          "serviceDate",
          "project",
          "salesOrder",
          "purchaseOrder",
          "paymentReference",
          "internalComment",
          "description",
          "vatId",
          "financials",
          "amountGross",
          "freightCharge",
          "taxationType",
          "paymentTerms",
          "payment",
          "isInNeedOfClarification",
          "clarificationReason",
          "goodsCheckAccepted",
          "goodsCheckAcceptedBy",
          "invoiceCheckAccepted",
          "paymentStatus",
          "lineItems"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/TimestampsResource"
          },
          {
            "properties": {
              "id": {
                "description": "The supplier invoice ID.",
                "type": "string",
                "example": "1"
              },
              "documentNumber": {
                "description": "Document number assigned when the invoice is released. Null while the invoice is a draft.",
                "type": [
                  "string",
                  "null"
                ],
                "example": "700123"
              },
              "documentStatus": {
                "description": "Document lifecycle state. A cancelled invoice keeps its payment state, so this is the field that reports a cancellation.",
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "draft",
                  "released",
                  "cancelled"
                ],
                "example": "draft"
              },
              "supplier": {
                "description": "The supplier this invoice was received from. By default only the ID is returned; request its name and supplier number with `include=supplier`.",
                "example": {
                  "id": "42"
                },
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Address"
                  },
                  {
                    "required": [
                      "id"
                    ],
                    "properties": {
                      "id": {
                        "description": "The supplier ID.",
                        "type": "string",
                        "example": "42"
                      }
                    },
                    "type": "object"
                  }
                ]
              },
              "supplierInvoiceNumber": {
                "description": "The invoice number as printed on the supplier's invoice document.",
                "type": [
                  "string",
                  "null"
                ],
                "example": "RE-2026-0815"
              },
              "date": {
                "description": "Invoice date.",
                "type": [
                  "string",
                  "null"
                ],
                "format": "date",
                "example": "2026-08-01"
              },
              "receiptDate": {
                "description": "Date the invoice was received.",
                "type": [
                  "string",
                  "null"
                ],
                "format": "date",
                "example": "2026-08-03"
              },
              "serviceDate": {
                "description": "Date of supply or service.",
                "type": [
                  "string",
                  "null"
                ],
                "format": "date",
                "example": "2026-07-28"
              },
              "project": {
                "description": "Project this invoice belongs to. Null when it belongs to none. By default only the ID is returned; request name and abbreviation with `include=project`.",
                "example": {
                  "id": "3"
                },
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Project"
                  },
                  {
                    "required": [
                      "id"
                    ],
                    "properties": {
                      "id": {
                        "description": "The project ID.",
                        "type": "string",
                        "example": "3"
                      }
                    },
                    "type": "object"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "salesOrder": {
                "description": "Sales order this invoice relates to.",
                "required": [
                  "id"
                ],
                "properties": {
                  "id": {
                    "description": "The sales order ID.",
                    "type": "string",
                    "example": "77"
                  }
                },
                "type": [
                  "object",
                  "null"
                ],
                "example": {
                  "id": "77"
                }
              },
              "purchaseOrder": {
                "description": "The purchase order this invoice belongs to as a whole, the field the supplier invoice form in the application writes. It states the simple case, that the whole invoice pays for one purchase order, and it is kept independently of the purchase order assignments, so an invoice can carry assignments while this field is empty and can carry this field while it has no assignment. Read `purchaseOrders` for an invoice split across several purchase orders or across part of one, and the `purchaseOrder` of a line item for the purchase order behind a single position.",
                "required": [
                  "id"
                ],
                "properties": {
                  "id": {
                    "description": "The purchase order ID.",
                    "type": "string",
                    "example": "55"
                  }
                },
                "type": [
                  "object",
                  "null"
                ],
                "example": {
                  "id": "55"
                }
              },
              "paymentReference": {
                "description": "Payment reference.",
                "type": [
                  "string",
                  "null"
                ],
                "example": "RE-2026-0815 / Kd-Nr 1001"
              },
              "internalComment": {
                "description": "Internal comment, not visible to the supplier.",
                "type": [
                  "string",
                  "null"
                ],
                "example": "Prices verified."
              },
              "description": {
                "description": "Free-text description of the invoice.",
                "type": [
                  "string",
                  "null"
                ],
                "example": "Office supplies July"
              },
              "vatId": {
                "description": "VAT identification number printed on the supplier's invoice.",
                "type": [
                  "string",
                  "null"
                ],
                "example": "DE123456789"
              },
              "financials": {
                "description": "Financial settings of the invoice.",
                "required": [
                  "currency",
                  "paymentMethod"
                ],
                "properties": {
                  "currency": {
                    "description": "ISO 4217 currency code of the invoice.",
                    "type": "string",
                    "example": "EUR"
                  },
                  "paymentMethod": {
                    "description": "Payment method used to pay this invoice. Null when the stored payment method is not linked to a configured one.",
                    "required": [
                      "id"
                    ],
                    "properties": {
                      "id": {
                        "description": "The payment method ID.",
                        "type": "string",
                        "example": "2"
                      }
                    },
                    "type": [
                      "object",
                      "null"
                    ]
                  }
                },
                "type": "object",
                "example": {
                  "currency": "EUR",
                  "paymentMethod": {
                    "id": "2"
                  }
                }
              },
              "amountGross": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/Money",
                    "description": "Gross total of the invoice. Null when the record carries no currency."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Gross total of the invoice. Null when the record carries no currency."
              },
              "freightCharge": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/Money",
                    "description": "Freight charge portion of the invoice. Null when the record carries no currency."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Freight charge portion of the invoice. Null when the record carries no currency."
              },
              "taxationType": {
                "description": "Taxation scheme of the invoice. Null when the stored value is not part of the documented set.",
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "domestic",
                  "eu",
                  "export",
                  "import"
                ],
                "example": "domestic"
              },
              "taxes": {
                "description": "Tax rates and amounts contained in the invoice total.",
                "required": [
                  "normalTax",
                  "reducedTax",
                  "customTax1",
                  "customTax2"
                ],
                "properties": {
                  "normalTax": {
                    "required": [
                      "rate",
                      "amount"
                    ],
                    "properties": {
                      "rate": {
                        "description": "Standard tax rate in percent.",
                        "type": [
                          "number",
                          "null"
                        ],
                        "format": "float",
                        "example": 19
                      },
                      "amount": {
                        "description": "Tax amount at the standard rate.",
                        "type": [
                          "number",
                          "null"
                        ],
                        "format": "float",
                        "example": 19
                      }
                    },
                    "type": "object"
                  },
                  "reducedTax": {
                    "required": [
                      "rate",
                      "amount"
                    ],
                    "properties": {
                      "rate": {
                        "description": "Reduced tax rate in percent.",
                        "type": [
                          "number",
                          "null"
                        ],
                        "format": "float",
                        "example": 7
                      },
                      "amount": {
                        "description": "Tax amount at the reduced rate.",
                        "type": [
                          "number",
                          "null"
                        ],
                        "format": "float",
                        "example": 0
                      }
                    },
                    "type": "object"
                  },
                  "customTax1": {
                    "required": [
                      "rate",
                      "amount",
                      "name"
                    ],
                    "properties": {
                      "rate": {
                        "description": "First custom tax rate in percent.",
                        "type": [
                          "number",
                          "null"
                        ],
                        "format": "float",
                        "example": 5.5
                      },
                      "amount": {
                        "description": "Tax amount at the first custom rate.",
                        "type": [
                          "number",
                          "null"
                        ],
                        "format": "float",
                        "example": 0
                      },
                      "name": {
                        "description": "Label of the first custom tax rate.",
                        "type": [
                          "string",
                          "null"
                        ],
                        "example": "FR TVA"
                      }
                    },
                    "type": "object"
                  },
                  "customTax2": {
                    "required": [
                      "rate",
                      "amount",
                      "name"
                    ],
                    "properties": {
                      "rate": {
                        "description": "Second custom tax rate in percent.",
                        "type": [
                          "number",
                          "null"
                        ],
                        "format": "float",
                        "example": 0
                      },
                      "amount": {
                        "description": "Tax amount at the second custom rate.",
                        "type": [
                          "number",
                          "null"
                        ],
                        "format": "float",
                        "example": 0
                      },
                      "name": {
                        "description": "Label of the second custom tax rate.",
                        "type": [
                          "string",
                          "null"
                        ],
                        "example": ""
                      }
                    },
                    "type": "object"
                  }
                },
                "type": "object",
                "example": {
                  "normalTax": {
                    "rate": 19,
                    "amount": 19
                  },
                  "reducedTax": {
                    "rate": 7,
                    "amount": 0
                  },
                  "customTax1": {
                    "rate": null,
                    "amount": 0,
                    "name": null
                  },
                  "customTax2": {
                    "rate": null,
                    "amount": 0,
                    "name": null
                  }
                }
              },
              "paymentTerms": {
                "description": "Payment terms of the invoice.",
                "required": [
                  "dueDate",
                  "paymentTargetDiscountDate",
                  "paymentTargetDiscount",
                  "paymentTargetDiscountFixed"
                ],
                "properties": {
                  "dueDate": {
                    "description": "Date the invoice is payable by.",
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date",
                    "example": "2026-08-31"
                  },
                  "paymentTargetDiscountDate": {
                    "description": "Last date the early payment discount may be taken. Null when no discount period applies.",
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date",
                    "example": "2026-08-15"
                  },
                  "paymentTargetDiscount": {
                    "description": "Early payment discount in percent.",
                    "type": "number",
                    "format": "float",
                    "example": 2
                  },
                  "paymentTargetDiscountFixed": {
                    "description": "Whether the early payment discount is fixed and not recalculated from the supplier's terms.",
                    "type": "boolean",
                    "example": false
                  }
                },
                "type": "object",
                "example": {
                  "dueDate": "2026-08-31",
                  "paymentTargetDiscountDate": null,
                  "paymentTargetDiscount": 2,
                  "paymentTargetDiscountFixed": false
                }
              },
              "payment": {
                "description": "Payment details of the invoice.",
                "required": [
                  "paidAmount",
                  "paidAt",
                  "discountReceived"
                ],
                "properties": {
                  "paidAmount": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/Money",
                        "description": "Amount already paid. Null when the record carries no currency."
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Amount already paid. Null when the record carries no currency."
                  },
                  "paidAt": {
                    "description": "Date the invoice was paid.",
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date",
                    "example": "2026-08-20"
                  },
                  "discountReceived": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/Money",
                        "description": "Early payment discount amount actually received. Null when the record carries no currency."
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Early payment discount amount actually received. Null when the record carries no currency."
                  }
                },
                "type": "object",
                "example": {
                  "paidAmount": {
                    "amount": "0.00",
                    "currency": "EUR"
                  },
                  "paidAt": null,
                  "discountReceived": {
                    "amount": "0.00",
                    "currency": "EUR"
                  }
                }
              },
              "isInNeedOfClarification": {
                "description": "Whether the invoice is marked as a clarification case.",
                "type": "boolean",
                "example": false
              },
              "clarificationReason": {
                "description": "Reason why the invoice needs clarification.",
                "type": [
                  "string",
                  "null"
                ],
                "example": ""
              },
              "goodsCheckAccepted": {
                "description": "Whether the goods check has been accepted.",
                "type": "boolean",
                "example": false
              },
              "goodsCheckAcceptedBy": {
                "description": "Name of the person who accepted the goods check. Null while nobody accepted it.",
                "type": [
                  "string",
                  "null"
                ],
                "example": "Erika Musterfrau"
              },
              "invoiceCheckAccepted": {
                "description": "Whether the invoice check has been accepted.",
                "type": "boolean",
                "example": false
              },
              "paymentStatus": {
                "description": "Payment state of the invoice, read from the invoice and its payments rather than stored: whether the invoice is approved (it charges what the purchase order agreed and everything it charges for has been delivered), whether a payment has been handed to the payment module, came back as failed, or has been reconciled in part or in full, and whether the invoice was marked as paid by hand or by a payment method that pays as it saves. Cancellation is reported by `documentStatus`, not here: cancelling a supplier invoice leaves the payment state untouched, so `cancelled` only occurs on invoices that were cancelled before the two states were kept apart.",
                "type": "string",
                "enum": [
                  "pending",
                  "paid",
                  "partiallyPaid",
                  "cancelled",
                  "approved",
                  "paymentTriggered",
                  "paymentFailed",
                  "manuallyPaid",
                  "automaticallyPaid"
                ],
                "example": "pending"
              },
              "lineItems": {
                "description": "The line items of the invoice, in the order they were added.",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SupplierInvoiceLineItem"
                }
              },
              "purchaseOrders": {
                "description": "The purchase orders assigned to this invoice. An invoice can be split across several purchase orders, and the same purchase order can be assigned more than once, each assignment stating its own share, project, sales order and cost center. These assignments answer the split case, while the `purchaseOrder` of the invoice states the one purchase order a whole invoice belongs to. Only returned with `include=purchaseOrders`.",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SupplierInvoicePurchaseOrderAssignment"
                }
              },
              "accountAssignments": {
                "description": "The shares of the invoice booked onto contra accounts. Only returned with `include=accountAssignments`.",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SupplierInvoiceAccountAssignment"
                }
              },
              "files": {
                "description": "Files attached to the supplier invoice, in ascending sort order. Files scoped to a single line item are not returned here. Only returned with `include=files`. Requesting this include requires the permission to manage the files of supplier invoices; a token whose user lacks it receives a 403 with an empty body, while a request that does not ask for the include is served normally.",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BusinessDocumentFile"
                }
              }
            },
            "type": "object"
          }
        ]
      },
      "SupplierInvoiceAccountAssignment": {
        "description": "One account assignment line of a supplier invoice: the share of the invoice booked onto one contra account.",
        "required": [
          "id",
          "supplierInvoice",
          "amount",
          "counterAccount",
          "taxRate",
          "costCenter",
          "bookingText",
          "documentField"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/TimestampsResource"
          },
          {
            "properties": {
              "id": {
                "description": "The account assignment ID.",
                "type": "string",
                "example": "1"
              },
              "supplierInvoice": {
                "description": "The supplier invoice this share is booked from.",
                "required": [
                  "id",
                  "unassignedAmount"
                ],
                "properties": {
                  "id": {
                    "description": "The supplier invoice ID.",
                    "type": "string",
                    "example": "42"
                  },
                  "unassignedAmount": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/Money",
                        "description": "The part of the invoice total that no account assignment covers yet, after this one. A mismatch is legitimate mid-booking, so it is reported rather than rejected. Summed over every assignment of the invoice regardless of the currency each one states, the way the ERP itself sums it. Null when the invoice states no currency."
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "The part of the invoice total that no account assignment covers yet, after this one. A mismatch is legitimate mid-booking, so it is reported rather than rejected. Summed over every assignment of the invoice regardless of the currency each one states, the way the ERP itself sums it. Null when the invoice states no currency."
                  }
                },
                "type": "object"
              },
              "amount": {
                "$ref": "#/components/schemas/Money",
                "description": "The share of the invoice booked onto the contra account, in the currency of the invoice."
              },
              "counterAccount": {
                "description": "The contra account this share is booked onto. Commonly carries a leading tax key, so `906815` books 19% input tax onto account `6815`.",
                "type": "string",
                "example": "4400"
              },
              "taxRate": {
                "description": "Tax rate of this booking line in percent, for the record only - what is actually booked follows from the contra account. Zero when the line states no rate.",
                "type": "number",
                "format": "float",
                "example": 19
              },
              "costCenter": {
                "description": "Number of the cost center this share is booked to. Null when it is booked to none.",
                "type": [
                  "string",
                  "null"
                ],
                "example": "1000"
              },
              "bookingText": {
                "description": "Booking text of this line. Null when it carries none.",
                "type": [
                  "string",
                  "null"
                ],
                "example": "Wareneingang Lieferant X"
              },
              "documentField": {
                "description": "Document field, the filing reference of the booking record. Null when it carries none.",
                "type": [
                  "string",
                  "null"
                ],
                "example": "RE-2026-0815"
              }
            },
            "type": "object"
          }
        ]
      },
      "SupplierInvoiceLineItem": {
        "description": "A line item of a supplier invoice.",
        "required": [
          "id",
          "supplierInvoice",
          "product",
          "number",
          "name",
          "description",
          "quantity",
          "price",
          "taxRate",
          "taxLegalNotice",
          "unit",
          "packagingUnit",
          "supplierProductNumber",
          "deliveryDate",
          "purchaseOrder",
          "costCenter",
          "generalLedgerAccount"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/TimestampsResource"
          },
          {
            "properties": {
              "id": {
                "description": "The line item ID.",
                "type": "string",
                "example": "1"
              },
              "supplierInvoice": {
                "description": "The supplier invoice this line item belongs to.",
                "properties": {
                  "id": {
                    "description": "The supplier invoice ID.",
                    "type": "string",
                    "example": "1"
                  }
                },
                "type": "object"
              },
              "product": {
                "description": "The invoiced product.",
                "properties": {
                  "id": {
                    "description": "The product ID.",
                    "type": "string",
                    "example": "13"
                  }
                },
                "type": "object"
              },
              "number": {
                "description": "Product number taken from the product when the line item was created.",
                "type": [
                  "string",
                  "null"
                ],
                "example": "ART-10077"
              },
              "name": {
                "description": "Line item name.",
                "type": [
                  "string",
                  "null"
                ],
                "example": "Cable drum 50m"
              },
              "description": {
                "description": "Line item description.",
                "type": [
                  "string",
                  "null"
                ],
                "example": "Halogen-free, 3 x 1.5 mm²"
              },
              "quantity": {
                "description": "Invoiced quantity.",
                "type": "number",
                "format": "float",
                "example": 10.5
              },
              "price": {
                "description": "Price information of the line item.",
                "properties": {
                  "net": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/Money",
                        "description": "Net unit price. Null when the line item carries no currency."
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Net unit price. Null when the line item carries no currency."
                  }
                },
                "type": "object"
              },
              "taxRate": {
                "description": "The tax rate applied to this line item: either a predefined tax category, whose rate the invoice defines, or the explicit percentage stored on the line item.",
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "standard",
                      "reduced",
                      "exempt"
                    ],
                    "example": "reduced"
                  },
                  {
                    "type": "number",
                    "format": "float",
                    "example": 12.5
                  }
                ]
              },
              "taxLegalNotice": {
                "description": "Legal notice regarding the taxation of this line item.",
                "type": [
                  "string",
                  "null"
                ],
                "example": "Reverse charge according to §13b UStG"
              },
              "unit": {
                "description": "Unit of the line item.",
                "type": [
                  "string",
                  "null"
                ],
                "example": "pcs"
              },
              "packagingUnit": {
                "description": "Packaging unit of the line item - how many units one package contains.",
                "type": [
                  "string",
                  "null"
                ],
                "example": "12"
              },
              "supplierProductNumber": {
                "description": "The number this product carries in the supplier's catalogue.",
                "type": [
                  "string",
                  "null"
                ],
                "example": "SUP-10077"
              },
              "deliveryDate": {
                "description": "Date the invoiced goods or services were delivered.",
                "type": [
                  "string",
                  "null"
                ],
                "format": "date",
                "example": "2026-09-01"
              },
              "purchaseOrder": {
                "description": "The purchase order this line item was ordered with. This is the most precise of the three places a purchase order is stated, because it belongs to this position alone, while `purchaseOrders` on the invoice states an assigned share and `purchaseOrder` on the invoice states the one purchase order a whole invoice belongs to. Null when the line item is not assigned to one.",
                "required": [
                  "id",
                  "documentNumber"
                ],
                "properties": {
                  "id": {
                    "description": "The purchase order ID.",
                    "type": "string",
                    "example": "5"
                  },
                  "documentNumber": {
                    "description": "Document number of the purchase order. Null while the purchase order is still a draft and has not been assigned one.",
                    "type": [
                      "string",
                      "null"
                    ],
                    "example": "B-2026-0042"
                  }
                },
                "type": [
                  "object",
                  "null"
                ]
              },
              "costCenter": {
                "description": "Cost center number the line item is booked to.",
                "type": [
                  "string",
                  "null"
                ],
                "example": "1000"
              },
              "generalLedgerAccount": {
                "description": "G/L account number the line item is booked to.",
                "type": [
                  "string",
                  "null"
                ],
                "example": "3400"
              },
              "order": {
                "description": "The ordering sequence of the line item within the invoice. This value is calculated across all line items of the invoice, so it is only returned when line items are embedded in the invoice payload - the line item endpoint does not return it.",
                "type": "integer",
                "example": 1
              }
            },
            "type": "object"
          }
        ]
      },
      "SupplierInvoicePurchaseOrderAssignment": {
        "description": "A purchase order assigned to a supplier invoice.",
        "required": [
          "id",
          "supplierInvoice",
          "purchaseOrder",
          "project",
          "salesOrder",
          "amountGross",
          "amountNet",
          "costCenter",
          "comment"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/TimestampsResource"
          },
          {
            "properties": {
              "id": {
                "description": "The assignment ID. A purchase order can be assigned to the same invoice more than once, so this identifies the assignment, not the purchase order.",
                "type": "string",
                "example": "1"
              },
              "supplierInvoice": {
                "description": "The supplier invoice the purchase order is assigned to.",
                "properties": {
                  "id": {
                    "description": "The supplier invoice ID.",
                    "type": "string",
                    "example": "1"
                  }
                },
                "type": "object"
              },
              "purchaseOrder": {
                "description": "The assigned purchase order.",
                "required": [
                  "id",
                  "documentNumber"
                ],
                "properties": {
                  "id": {
                    "description": "The purchase order ID.",
                    "type": "string",
                    "example": "5"
                  },
                  "documentNumber": {
                    "description": "Document number of the purchase order. Null while the purchase order is still a draft and has not been assigned one.",
                    "type": [
                      "string",
                      "null"
                    ],
                    "example": "B-2026-0042"
                  }
                },
                "type": [
                  "object",
                  "null"
                ]
              },
              "project": {
                "description": "The project this assignment is booked to. Null when it is booked to none.",
                "properties": {
                  "id": {
                    "description": "The project ID.",
                    "type": "string",
                    "example": "1"
                  }
                },
                "type": [
                  "object",
                  "null"
                ]
              },
              "salesOrder": {
                "description": "The sales order the assigned purchase order was ordered for. Null when it was ordered for none.",
                "properties": {
                  "id": {
                    "description": "The sales order ID.",
                    "type": "string",
                    "example": "42"
                  }
                },
                "type": [
                  "object",
                  "null"
                ]
              },
              "amountGross": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/Money",
                    "description": "Gross share of the invoice attributed to this purchase order, in the currency of the invoice. Null when no share was stated."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Gross share of the invoice attributed to this purchase order, in the currency of the invoice. Null when no share was stated."
              },
              "amountNet": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/Money",
                    "description": "Net share of the invoice attributed to this purchase order, in the currency of the invoice. Null when no share was stated."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Net share of the invoice attributed to this purchase order, in the currency of the invoice. Null when no share was stated."
              },
              "costCenter": {
                "description": "Number of the cost center this assignment is booked to. Null when it is booked to none.",
                "type": [
                  "string",
                  "null"
                ],
                "example": "1000"
              },
              "comment": {
                "description": "Free-text comment on the assignment.",
                "type": [
                  "string",
                  "null"
                ],
                "example": "Partial delivery, remainder invoiced separately"
              }
            },
            "type": "object"
          }
        ]
      },
      "TimestampsResource": {
        "properties": {
          "createdAt": {
            "description": "The date and time when the resource was created.",
            "type": "string",
            "format": "date-time",
            "example": "2023-10-01T12:00:00Z"
          },
          "updatedAt": {
            "description": "The date and time when the resource was last updated.",
            "type": "string",
            "format": "date-time",
            "example": "2023-10-01T12:00:00Z"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "SupplierInvoice",
      "description": "SupplierInvoice"
    }
  ],
  "paths": {
    "/api/v3/supplierInvoices": {
      "post": {
        "tags": [
          "SupplierInvoice"
        ],
        "summary": "🔒 Create supplier invoice V3",
        "description": "This endpoint is currently in Beta and available for testing. It may contain bugs, and breaking changes can occur at any time without prior notice. We do not recommend using Beta endpoints in production environments. Should you choose to use it in production, you assume full responsibility for any resulting issues.\n\nThis endpoint requires the following scopes: `supplierInvoice:create`.\n\nCreate a supplier invoice (liability). The invoice is created as a draft without a document number; omitted fields are derived from the supplier and project defaults. Line items, account assignments and purchase order assignments can be sent along and are created in the same transaction as the invoice; files are managed through their sub-resource. The tax summary, the general ledger account and the cost center live on the line items, which carry taxRate, generalLedgerAccount and costCenter of their own and are what gets booked.",
        "operationId": "POST::api-v3-supplierinvoices",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSupplierInvoiceRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Create a supplier invoice (liability). The invoice is created as a draft without a document number; omitted fields are derived from the supplier and project defaults. Line items, account assignments and purchase order assignments can be sent along and are created in the same transaction as the invoice; files are managed through their sub-resource. The tax summary, the general ledger account and the cost center live on the line items, which carry taxRate, generalLedgerAccount and costCenter of their own and are what gets booked.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SupplierInvoice"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Failed validation",
            "content": {
              "application/problem+json": {
                "schema": {
                  "properties": {
                    "type": {
                      "description": "Error messages",
                      "type": "string",
                      "example": "https://api.xentral.biz/problems/request-validation"
                    },
                    "title": {
                      "description": "Error messages",
                      "type": "string",
                      "example": "Request payload validation failed."
                    },
                    "violations": {
                      "description": "Error messages",
                      "type": "object",
                      "example": {
                        "supplier": [
                          "The supplier field is required."
                        ],
                        "supplierInvoiceNumber": [
                          "The supplier invoice number field must be a string."
                        ],
                        "date": [
                          "The date field must match the format Y-m-d."
                        ]
                      }
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "message": {
                      "description": "Too Many Requests",
                      "type": "string",
                      "example": "Too Many Requests"
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "x-beta": true,
        "x-scopes": [
          "supplierInvoice:create"
        ]
      }
    }
  }
}
```