{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/eucompliance-tools/json-schema/eucompliance-tools-invoice-to-pay-request-schema.json",
  "title": "InvoiceToPayRequest",
  "x-generated": "2026-11-07",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/eucompliance-tools-openapi.json#/components/schemas/InvoiceToPayRequest",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "buyer_country": {
      "type": "string",
      "pattern": "^[A-Za-z]{2}$"
    },
    "expected_amount": {
      "type": "string"
    },
    "expected_currency": {
      "type": "string",
      "pattern": "^[A-Za-z]{3}$"
    },
    "trusted_payee_iban": {
      "type": "string"
    },
    "invoice_xml": {
      "type": "string",
      "default": ""
    },
    "document_base64": {
      "type": "string",
      "default": ""
    },
    "filename": {
      "type": "string",
      "default": "invoice.xml"
    },
    "expected_supplier_vat": {
      "type": "string",
      "default": ""
    },
    "expected_supplier_name": {
      "type": "string",
      "default": ""
    },
    "expected_buyer_vat": {
      "type": "string",
      "default": ""
    },
    "purchase_order_reference": {
      "type": "string",
      "default": ""
    },
    "supply_type": {
      "type": "string",
      "default": "service"
    },
    "b2b": {
      "type": "boolean",
      "default": true
    }
  },
  "required": [
    "buyer_country",
    "expected_amount",
    "expected_currency",
    "trusted_payee_iban"
  ],
  "oneOf": [
    {
      "required": [
        "invoice_xml"
      ]
    },
    {
      "required": [
        "document_base64"
      ]
    }
  ]
}