Koskamo

Factur-X MCP

An official MCP server by Orvel that allows AI assistants to generate Factur-X PDF/A-3, CII XML, and UBL 2.1 invoices, validate them against EN 16931 rules, and extract invoice data. It supports stateless workflows, full/partial credits, and integrates with major clients like Cursor, VS Code, and Claude Code via OAuth or API keys.

Endpoint and access

No sign-in to connect and list tools. Individual tools may still need a vendor account, credentials, or permissions; check the documented prerequisites.

Factur-X MCP logo, by OrvelVendor evidenceStreamable HTTPNo sign-inEndpoint checked 2026-11-23Operated by Orvel
You need:No signup, API key or card.This endpoint requests OAuth authentication on the first connectionThe endpoint accepts either Authorization: Bearer YOUR_API_KEY or X-API-Key: YOUR_API_KEYStart with a verified-account trial , or buy 100 operations for EUR 10
MCP endpoint (Streamable HTTP)
https://facturx.orvel.dev/mcp
Vendor documentation

What its tools do

10 tools, grouped by the hints the server advertises. Hints are self-declared, not verified behavior.

10 of 10 have a description · 10 of 10 declare behavior hints · 10 of 10 with parameters document them all

Checks and signals

Each line is separate evidence, not a trust score.

  • Passed Endpoint answered the live check ·
  • Passed Endpoint and vendor documentation share a domain
  • Uptime 100% over 90 days
  • Availability 2 of 2 checks passed in 30 days

What you can do with it

  • Generate Factur-X PDF/A-3, CII XML, and UBL 2.1 invoices
  • Validate invoices against EN 16931 compliance rules
  • Extract invoice data from AI assistant prompts
  • Process full and partial credits for existing invoices

Source and maintenance

Vendor evidenceRegistry 0.1.23

Protocol and capabilities

Server
facturx 0.1.23
MCP protocol negotiated in check
2025-11-25
Tools
10 advertised
Resources
3 advertised
Resource templates
0 advertised
Prompts
0 advertised
Server-advertised capabilities
{
  "tools": {
    "listChanged": false
  },
  "prompts": {
    "listChanged": false
  },
  "resources": {
    "subscribe": false,
    "listChanged": false
  },
  "experimental": {}
}

Server-provided instructions

Untrusted server output shown for inspection. It is not Koskamo guidance and is excluded from knowledge search.

Generate, validate and extract structured e-invoices: Factur-X PDF/A-3, CII XML and UBL 2.1. Use for EN 16931 invoice checks, fields to correct, structured invoice creation and credit-note drafts. No OCR of scans or ordinary PDFs without invoice XML, invoice delivery, payment collection or bookkeeping. Read facturx://getting-started for public examples, authentication and operation costs. Documents and evidence are returned to the caller for storage and delivery in their own system. Correct an input and regenerate to revise a document; use draft_credit_note for a full or selected-line credit. There are no stored invoice records to list, update or delete. Factur-X is one supported output. Ask for a Factur-X PDF/A-3 (a visual invoice with CII XML inside), CII XML alone, or UBL 2.1 XML. Profiles: en16931 (default), extended, extended-ctc-fr (French B2B mandate), basicwl. generate_invoice does not emit a file when EU Verify says the seller or buyer is not invoice-ready. The error names the field to fix. A ready file comes back with a dated evidence id. A register outage does not block the file. This server does not send the invoice and is not a Peppol access point. - generate_invoice: invoice data in, a compliant document out. Totals and VAT are computed. - embed_xml: your own PDF plus CII XML becomes a Factur-X PDF/A-3. - validate_invoice: XSD plus the EN 16931 schematron, and the French fr-ctc rules when asked. Findings carry rule ids and a json_pointer when the field can be named, so you can patch and retry. Free without a key for the user's own document (shared daily limit, 5 MB). - extract_invoice: parties, totals, VAT and lines as JSON. - get_invoice_example: a complete invoice body to copy. Replace the sample parties before generate_invoice. No key, and it does not count as a document. - draft_credit_note: the credit-note body for an invoice you already have. Amounts stay positive. No key, and it does not count as a document. Call generate_invoice to emit the file. - check_party: ask EU Verify if one seller or buyer is invoice-ready before you generate. Does not count as a document. - check_invoice_parties: check both seller and buyer together before generating; preserves each result and evidence. - explain_finding: turn a rule id into the field to fix and an example. No key required, and it does not count as a document. For a no-account evaluation, call view_invoice_demo with {"sample":"invalid"}, explain_finding with {"rule":"BR-07"}, then view_invoice_demo with {"sample":"valid"}. Only bundled synthetic samples are processed; reports may be cached for 24 hours. Never substitute a sample result for validation of the user's document. To check the user's own invoice, call validate_invoice directly: no key needed. To generate, embed or extract the user's own documents, connect https://facturx.orvel.dev/mcp/account using OAuth and let the user sign in and approve. The same account works in the browser at https://facturx.orvel.dev/app. New users start at https://facturx.orvel.dev/login?mode=signup: 10 operations over 14 days, verified account, no card, 30 processing attempts, one trial per account/email, first 100 eligible accounts, registry checks excluded. Do not ask for passwords or API keys in chat. Header-only clients may store a key in their credential settings. After the trial, EUR 10 buys 100 non-expiring operations without subscription; monthly plans start at EUR 29 for 1,000 operations. Details: https://facturx.orvel.dev/docs/pricing/. Authentication and credits are required to generate, embed or extract custom documents; discovery, samples and validation are public. Existing trial keys retain their original expiry. Amounts are decimal strings (e.g. "1200.00"), dates are ISO 8601 (YYYY-MM-DD). French sellers should provide siren, vat_id and a full address. Call validate_invoice on anything you did not generate here.

Tools

10 advertised

view_invoice_demo — Try fixed invoice samples (no document input)
Advertised by the server during the last successful anonymous check.
Advertised read-only

Demonstrate the engine on bundled synthetic samples only; never checks a user's invoice. Use for product evaluation without a key. To check a supplied document, choose validate_invoice. Choose sample=valid to inspect a passing CII invoice or sample=invalid to see the missing-buyer-name finding. Both use the production XSD and EN 16931 engine; results may be cached for 24 hours for the same engine version and input. Inspect validated_at and cached; a cache hit is not a fresh run. Call with {} to validate the passing sample, or sample=downloads for PDF/CII/UBL files and the published report. Accepts no document data, URLs or extra arguments. No PDF or business-register checks in live mode. Shared rate limits return a retryable tool error; unavailable checks never become a passing result. Use explain_finding for a returned rule id. Your own invoices require validate_invoice with a verified-account trial, prepaid or monthly-plan key. Nothing is stored except reports for these public fixtures.

view_invoice_demo input schema
{
  "type": "object",
  "title": "view_invoice_demoArguments",
  "properties": {
    "sample": {
      "enum": [
        "valid",
        "invalid",
        "downloads"
      ],
      "type": "string",
      "title": "Sample",
      "default": "valid",
      "description": "valid (default): passing CII invoice; invalid: missing buyer name; downloads: published files."
    }
  }
}
view_invoice_demo output schema
{
  "type": "object",
  "title": "view_invoice_demoDictOutput",
  "additionalProperties": true
}
view_invoice_demo annotations
{
  "title": "Try fixed invoice samples (no document input)",
  "readOnlyHint": true,
  "openWorldHint": false,
  "idempotentHint": true
}
generate_invoice — Generate an EN 16931 invoice
Advertised by the server during the last successful anonymous check.
Advertised read-onlyOpen-world

Create an EN 16931 e-invoice from structured data: Factur-X PDF/A-3, CII XML, or UBL 2.1 XML. Use when you have the parties, lines and dates and need the document. To revise one, correct the input and regenerate; save and deliver the returned file through your own system. Do not use when you already have a visual PDF and CII XML: call embed_xml. To check a document you did not create here, call validate_invoice; to read one, call extract_invoice. Start invoice from get_invoice_example, replacing sample parties and dates. Leave totals and line net_amount omitted to compute them from quantities, prices, allowances and charges. For ubl-xml, profile must be en16931 or extended-ctc-fr; extended and basicwl are CII/PDF-only. profile selects the XML model while check selects validation rules: use check=base for non-French invoices; changing check does not disable party_check. language and footer_text affect only the visual PDF. Omitted party_check enables registry checks only for extended-ctc-fr; true/false explicitly overrides that default. Enabled checks send party identifiers/address and seller IBAN to EU Verify. A not_ready verdict blocks output with field pointers. Successful checks add evidence ids; registry outages do not block generation and are reported as warnings, not proof of readiness. XSD/business-rule failures return a tool error with rule ids; fix the input and retry. Requires an authenticated trial, prepaid or subscription allowance (OAuth or API key). Each successful result uses one document operation, including repeated calls. Returns a JSON text summary (totals, warnings, evidence) and an embedded resource: base64 PDF or XML text. No invoice is stored or sent to a recipient.

generate_invoice input schema
{
  "type": "object",
  "$defs": {
    "Line": {
      "type": "object",
      "title": "Line",
      "required": [
        "item_name",
        "quantity",
        "unit_price"
      ],
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Id",
          "default": null,
          "description": "BT-126, auto-numbered when omitted"
        },
        "note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Note",
          "default": null,
          "description": "BT-127"
        },
        "charges": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LineAllowanceCharge"
          },
          "title": "Charges",
          "description": "BG-28"
        },
        "quantity": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,13}|(?=[\\d.]{1,20}0*$)\\d{0,13}\\.\\d{0,6}0*$)"
            }
          ],
          "title": "Quantity",
          "description": "BT-129"
        },
        "vat_rate": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 100,
              "minimum": 0
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,3}|(?=[\\d.]{1,8}0*$)\\d{0,3}\\.\\d{0,4}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Vat Rate",
          "default": null,
          "description": "BT-152, required for category S"
        },
        "item_name": {
          "type": "string",
          "title": "Item Name",
          "description": "BT-153"
        },
        "unit_code": {
          "type": "string",
          "title": "Unit Code",
          "default": "C62",
          "description": "UN/ECE Rec 20, BT-130 (C62 unit, HUR hour, DAY, KGM, MTR, LTR...)"
        },
        "allowances": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LineAllowanceCharge"
          },
          "title": "Allowances",
          "description": "BG-27"
        },
        "attributes": {
          "type": "object",
          "title": "Attributes",
          "description": "BG-32 item attributes",
          "additionalProperties": {
            "type": "string"
          }
        },
        "net_amount": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Net Amount",
          "default": null,
          "description": "BT-131. Computed as quantity x unit_price / base_qty - allowances + charges when omitted"
        },
        "period_end": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Period End",
          "default": null,
          "description": "BT-135"
        },
        "unit_price": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            }
          ],
          "title": "Unit Price",
          "description": "Net unit price, BT-146"
        },
        "period_start": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Period Start",
          "default": null,
          "description": "BT-134"
        },
        "vat_category": {
          "$ref": "#/$defs/VatCategory",
          "default": "S",
          "description": "BT-151"
        },
        "buyer_item_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Buyer Item Id",
          "default": null,
          "description": "BT-156"
        },
        "origin_country": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Origin Country",
          "default": null,
          "description": "BT-159"
        },
        "price_discount": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Price Discount",
          "default": null,
          "description": "BT-147"
        },
        "seller_item_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Seller Item Id",
          "default": null,
          "description": "BT-155"
        },
        "gross_unit_price": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Gross Unit Price",
          "default": null,
          "description": "BT-148"
        },
        "item_description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Item Description",
          "default": null,
          "description": "BT-154"
        },
        "standard_item_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Standard Item Id",
          "default": null,
          "description": "BT-157, e.g. EAN/GTIN"
        },
        "price_base_quantity": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,13}|(?=[\\d.]{1,20}0*$)\\d{0,13}\\.\\d{0,6}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Price Base Quantity",
          "default": null,
          "description": "BT-149"
        },
        "order_line_reference": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Order Line Reference",
          "default": null,
          "description": "BT-132"
        },
        "price_base_unit_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Price Base Unit Code",
          "default": null,
          "description": "BT-150"
        },
        "standard_item_id_scheme": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Standard Item Id Scheme",
          "default": null,
          "description": "BT-157-1, e.g. 0160 = GTIN"
        },
        "buyer_accounting_reference": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Buyer Accounting Reference",
          "default": null,
          "description": "BT-133"
        }
      },
      "additionalProperties": false
    },
    "Note": {
      "type": "object",
      "title": "Note",
      "required": [
        "text"
      ],
      "properties": {
        "text": {
          "type": "string",
          "title": "Text",
          "description": "BT-22"
        },
        "subject_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Subject Code",
          "default": null,
          "description": "UNTDID 4451 code, BT-21 (e.g. AAI general, PMT payment, PMD penalties)"
        }
      },
      "additionalProperties": false
    },
    "Party": {
      "type": "object",
      "title": "Party",
      "required": [
        "name",
        "address"
      ],
      "properties": {
        "name": {
          "type": "string",
          "title": "Name",
          "description": "Legal name, BT-27 / BT-44"
        },
        "siren": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Siren",
          "default": null,
          "description": "French SIREN (9 digits). Written as legal registration id BT-30 / BT-47 with scheme 0002."
        },
        "siret": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Siret",
          "default": null,
          "description": "French SIRET (14 digits). Shortcut for electronic_address with scheme 0225."
        },
        "vat_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Vat Id",
          "default": null,
          "description": "BT-31 / BT-48, e.g. FR12345678901"
        },
        "address": {
          "$ref": "#/$defs/Address"
        },
        "contact": {
          "anyOf": [
            {
              "$ref": "#/$defs/Contact"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "global_ids": {
          "type": "object",
          "title": "Global Ids",
          "description": "BT-29 / BT-46: {schemeID: identifier}, e.g. {'0009': SIRET}",
          "additionalProperties": {
            "type": "string"
          }
        },
        "legal_info": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Legal Info",
          "default": null,
          "description": "Seller only, BT-33: legal form, share capital, RCS city..."
        },
        "trading_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Trading Name",
          "default": null,
          "description": "BT-28 / BT-45"
        },
        "electronic_address": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Electronic Address",
          "default": null,
          "description": "BT-34 / BT-49"
        },
        "tax_registration_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tax Registration Id",
          "default": null,
          "description": "Seller only, BT-32"
        },
        "legal_registration_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Legal Registration Id",
          "default": null,
          "description": "BT-30 / BT-47 when not a SIREN. Ignored if siren is set."
        },
        "electronic_address_scheme": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Electronic Address Scheme",
          "default": null,
          "description": "EAS code for electronic_address (BT-34-1 / BT-49-1), e.g. 0225 = SIRET (FR)"
        },
        "legal_registration_scheme": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Legal Registration Scheme",
          "default": null,
          "description": "ISO 6523 ICD for legal_registration_id (BT-30-1 / BT-47-1), e.g. 0002 = SIREN"
        }
      },
      "additionalProperties": false
    },
    "Totals": {
      "type": "object",
      "title": "Totals",
      "required": [
        "line_total",
        "tax_exclusive",
        "tax_total",
        "tax_inclusive",
        "amount_due"
      ],
      "properties": {
        "prepaid": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Prepaid",
          "default": null,
          "description": "BT-113"
        },
        "rounding": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Rounding",
          "default": null,
          "description": "BT-114"
        },
        "tax_total": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            }
          ],
          "title": "Tax Total",
          "description": "BT-110"
        },
        "amount_due": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            }
          ],
          "title": "Amount Due",
          "description": "BT-115"
        },
        "line_total": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            }
          ],
          "title": "Line Total",
          "description": "BT-106"
        },
        "charge_total": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Charge Total",
          "default": null,
          "description": "BT-108"
        },
        "tax_exclusive": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            }
          ],
          "title": "Tax Exclusive",
          "description": "BT-109"
        },
        "tax_inclusive": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            }
          ],
          "title": "Tax Inclusive",
          "description": "BT-112"
        },
        "vat_breakdown": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/VatBreakdown"
          },
          "title": "Vat Breakdown",
          "description": "BG-23"
        },
        "allowance_total": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Allowance Total",
          "default": null,
          "description": "BT-107"
        }
      },
      "description": "Document totals (BG-22). All computed by the engine when omitted.",
      "additionalProperties": false
    },
    "Address": {
      "type": "object",
      "title": "Address",
      "required": [
        "country"
      ],
      "properties": {
        "city": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "City",
          "default": null,
          "description": "BT-37 / BT-52"
        },
        "line1": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Line1",
          "default": null,
          "description": "BT-35 / BT-50"
        },
        "line2": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Line2",
          "default": null,
          "description": "BT-36 / BT-51"
        },
        "line3": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Line3",
          "default": null,
          "description": "BT-162 / BT-163"
        },
        "country": {
          "type": "string",
          "title": "Country",
          "maxLength": 2,
          "minLength": 2,
          "description": "ISO 3166-1 alpha-2, BT-40 / BT-55"
        },
        "postal_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Postal Code",
          "default": null,
          "description": "BT-38 / BT-53"
        },
        "country_subdivision": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Country Subdivision",
          "default": null,
          "description": "BT-39 / BT-54"
        }
      },
      "additionalProperties": false
    },
    "Contact": {
      "type": "object",
      "title": "Contact",
      "properties": {
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Name",
          "default": null,
          "description": "BT-41 / BT-56"
        },
        "email": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Email",
          "default": null,
          "description": "BT-43 / BT-58"
        },
        "phone": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Phone",
          "default": null,
          "description": "BT-42 / BT-57"
        },
        "department": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Department",
          "default": null,
          "description": "BT-41-0 / BT-56-0 (used when name is empty)"
        }
      },
      "additionalProperties": false
    },
    "Invoice": {
      "type": "object",
      "title": "Invoice",
      "required": [
        "number",
        "issue_date",
        "seller",
        "buyer",
        "lines"
      ],
      "properties": {
        "buyer": {
          "$ref": "#/$defs/Party",
          "description": "BG-7"
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Line"
          },
          "title": "Lines",
          "minItems": 1,
          "description": "BG-25"
        },
        "notes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Note"
          },
          "title": "Notes",
          "description": "BG-1"
        },
        "number": {
          "type": "string",
          "title": "Number",
          "pattern": "^[A-Za-z0-9._/\\-]+$",
          "maxLength": 35,
          "description": "BT-1 (BR-FR-01/02: max 35 chars, letters, digits, . _ / -)"
        },
        "seller": {
          "$ref": "#/$defs/Party",
          "description": "BG-4"
        },
        "totals": {
          "anyOf": [
            {
              "$ref": "#/$defs/Totals"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "BG-22, computed when omitted"
        },
        "charges": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AllowanceCharge"
          },
          "title": "Charges",
          "description": "BG-21"
        },
        "payment": {
          "anyOf": [
            {
              "$ref": "#/$defs/Payment"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "BG-16"
        },
        "currency": {
          "type": "string",
          "title": "Currency",
          "default": "EUR",
          "maxLength": 3,
          "minLength": 3,
          "description": "BT-5"
        },
        "delivery": {
          "anyOf": [
            {
              "$ref": "#/$defs/Delivery"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "BG-13"
        },
        "due_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Due Date",
          "default": null,
          "description": "BT-9"
        },
        "type_code": {
          "enum": [
            "380",
            "381",
            "384",
            "386",
            "389",
            "261",
            "751"
          ],
          "type": "string",
          "title": "Type Code",
          "default": "380",
          "description": "UNTDID 1001, BT-3: 380 invoice, 381 credit note, 384 corrected, 386 prepayment, 389 self-billed"
        },
        "allowances": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AllowanceCharge"
          },
          "title": "Allowances",
          "description": "BG-20"
        },
        "issue_date": {
          "type": "string",
          "title": "Issue Date",
          "format": "date",
          "description": "BT-2"
        },
        "already_paid": {
          "type": "boolean",
          "title": "Already Paid",
          "default": false,
          "description": "Invoice already paid at issuance (French BT-23 variants B2/S2/M2)"
        },
        "payment_terms": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Payment Terms",
          "default": null,
          "description": "BT-20"
        },
        "operation_type": {
          "enum": [
            "goods",
            "services",
            "mixed"
          ],
          "type": "string",
          "title": "Operation Type",
          "default": "services",
          "description": "Nature of the operation, used to derive the French business process code BT-23 (B1/S1/M1)"
        },
        "prepaid_amount": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Prepaid Amount",
          "default": null,
          "description": "BT-113 shortcut when totals are computed"
        },
        "tax_point_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tax Point Date",
          "default": null,
          "description": "BT-7"
        },
        "buyer_reference": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Buyer Reference",
          "default": null,
          "description": "BT-10"
        },
        "french_mentions": {
          "$ref": "#/$defs/FrenchMentions",
          "description": "Mandatory French legal mentions (BR-FR-05)"
        },
        "rounding_amount": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Rounding Amount",
          "default": null,
          "description": "BT-114 shortcut when totals are computed"
        },
        "business_process": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Business Process",
          "default": null,
          "description": "Explicit BT-23 business process code (e.g. S1). Overrides operation_type/already_paid."
        },
        "tender_reference": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tender Reference",
          "default": null,
          "description": "BT-17"
        },
        "project_reference": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Project Reference",
          "default": null,
          "description": "BT-11"
        },
        "contract_reference": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Contract Reference",
          "default": null,
          "description": "BT-12"
        },
        "preceding_invoices": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PrecedingInvoice"
          },
          "title": "Preceding Invoices",
          "description": "BG-3"
        },
        "additional_documents": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AdditionalDocument"
          },
          "title": "Additional Documents",
          "description": "BG-24"
        },
        "tax_exemption_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tax Exemption Reason",
          "default": null,
          "description": "Default BT-120 text for E/AE/K/G/O categories, e.g. 'TVA non applicable, art. 293 B du CGI'"
        },
        "sales_order_reference": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sales Order Reference",
          "default": null,
          "description": "BT-14"
        },
        "vat_accounting_currency": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Vat Accounting Currency",
          "default": null,
          "description": "BT-6"
        },
        "purchase_order_reference": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Purchase Order Reference",
          "default": null,
          "description": "BT-13"
        },
        "despatch_advice_reference": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Despatch Advice Reference",
          "default": null,
          "description": "BT-16"
        },
        "tax_exemption_reason_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tax Exemption Reason Code",
          "default": null,
          "description": "Default BT-121 VATEX code"
        },
        "buyer_accounting_reference": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Buyer Accounting Reference",
          "default": null,
          "description": "BT-19"
        },
        "receiving_advice_reference": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Receiving Advice Reference",
          "default": null,
          "description": "BT-15"
        }
      },
      "additionalProperties": false
    },
    "Payment": {
      "type": "object",
      "title": "Payment",
      "properties": {
        "bic": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Bic",
          "default": null,
          "description": "BT-86"
        },
        "iban": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Iban",
          "default": null,
          "description": "Payee account, BT-84"
        },
        "terms": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Terms",
          "default": null,
          "description": "BT-20"
        },
        "means_code": {
          "type": "string",
          "title": "Means Code",
          "default": "30",
          "description": "UNTDID 4461, BT-81. 30 credit transfer, 58 SEPA transfer, 59 SEPA direct debit, 48 card"
        },
        "means_text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Means Text",
          "default": null,
          "description": "BT-82"
        },
        "account_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Account Name",
          "default": null,
          "description": "BT-85"
        },
        "debited_iban": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Debited Iban",
          "default": null,
          "description": "Direct debit, BT-91"
        },
        "mandate_reference": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Mandate Reference",
          "default": null,
          "description": "Direct debit, BT-89"
        },
        "creditor_reference_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Creditor Reference Id",
          "default": null,
          "description": "Direct debit, BT-90"
        },
        "remittance_information": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Remittance Information",
          "default": null,
          "description": "BT-83"
        }
      },
      "additionalProperties": false
    },
    "Profile": {
      "enum": [
        "basicwl",
        "en16931",
        "extended",
        "extended-ctc-fr"
      ],
      "type": "string",
      "title": "Profile",
      "description": "Factur-X / CII profile for generation."
    },
    "Delivery": {
      "type": "object",
      "title": "Delivery",
      "properties": {
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Name",
          "default": null,
          "description": "Deliver-to party name, BT-70"
        },
        "address": {
          "anyOf": [
            {
              "$ref": "#/$defs/Address"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "period_end": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Period End",
          "default": null,
          "description": "BT-74"
        },
        "actual_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Actual Date",
          "default": null,
          "description": "BT-72"
        },
        "location_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Location Id",
          "default": null,
          "description": "BT-71"
        },
        "period_start": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Period Start",
          "default": null,
          "description": "BT-73"
        },
        "location_id_scheme": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Location Id Scheme",
          "default": null,
          "description": "BT-71-1"
        }
      },
      "additionalProperties": false
    },
    "Language": {
      "enum": [
        "fr",
        "en"
      ],
      "type": "string",
      "title": "Language"
    },
    "VatCategory": {
      "enum": [
        "S",
        "Z",
        "E",
        "AE",
        "K",
        "G",
        "O",
        "L",
        "M"
      ],
      "type": "string",
      "title": "VatCategory",
      "description": "UNTDID 5305 subset used by EN 16931 (BT-151 / BT-118)."
    },
    "OutputFormat": {
      "enum": [
        "facturx-pdf",
        "cii-xml",
        "ubl-xml"
      ],
      "type": "string",
      "title": "OutputFormat"
    },
    "VatBreakdown": {
      "type": "object",
      "title": "VatBreakdown",
      "required": [
        "category",
        "taxable_amount",
        "tax_amount"
      ],
      "properties": {
        "rate": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 100,
              "minimum": 0
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,3}|(?=[\\d.]{1,8}0*$)\\d{0,3}\\.\\d{0,4}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Rate",
          "default": null,
          "description": "BT-119"
        },
        "category": {
          "$ref": "#/$defs/VatCategory",
          "description": "BT-118"
        },
        "tax_amount": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            }
          ],
          "title": "Tax Amount",
          "description": "BT-117"
        },
        "taxable_amount": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            }
          ],
          "title": "Taxable Amount",
          "description": "BT-116"
        },
        "exemption_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Exemption Reason",
          "default": null,
          "description": "BT-120"
        },
        "exemption_reason_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Exemption Reason Code",
          "default": null,
          "description": "VATEX code, BT-121"
        }
      },
      "additionalProperties": false
    },
    "FrenchMentions": {
      "type": "object",
      "title": "FrenchMentions",
      "properties": {
        "enabled": {
          "type": "boolean",
          "title": "Enabled",
          "default": true,
          "description": "Add the three mandatory French mentions when missing"
        },
        "recovery_fee": {
          "type": "string",
          "title": "Recovery Fee",
          "default": "Indemnité forfaitaire pour frais de recouvrement en cas de retard de paiement : 40 €.",
          "description": "Note code PMT"
        },
        "early_payment_discount": {
          "type": "string",
          "title": "Early Payment Discount",
          "default": "Pas d'escompte pour paiement anticipé.",
          "description": "Note code AAB"
        },
        "late_payment_penalties": {
          "type": "string",
          "title": "Late Payment Penalties",
          "default": "Tout retard de paiement entraîne une pénalité exigible à compter de la date d'échéance, calculée sur la base de trois fois le taux d'intérêt légal.",
          "description": "Note code PMD"
        }
      },
      "description": "Legal mentions required on French B2B invoices (BR-FR-05). Added as BG-1 notes with codes PMD, PMT, AAB.",
      "additionalProperties": false
    },
    "AllowanceCharge": {
      "type": "object",
      "title": "AllowanceCharge",
      "required": [
        "amount"
      ],
      "properties": {
        "amount": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            }
          ],
          "title": "Amount",
          "description": "BT-92 / BT-99, tax excluded"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Reason",
          "default": null,
          "description": "BT-97 / BT-104"
        },
        "vat_rate": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 100,
              "minimum": 0
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,3}|(?=[\\d.]{1,8}0*$)\\d{0,3}\\.\\d{0,4}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Vat Rate",
          "default": null,
          "description": "BT-96 / BT-103"
        },
        "percentage": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 100,
              "minimum": 0
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,3}|(?=[\\d.]{1,8}0*$)\\d{0,3}\\.\\d{0,4}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Percentage",
          "default": null,
          "description": "BT-94 / BT-101"
        },
        "base_amount": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Base Amount",
          "default": null,
          "description": "BT-93 / BT-100"
        },
        "reason_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Reason Code",
          "default": null,
          "description": "UNTDID 5189 / 7161, BT-98 / BT-105"
        },
        "vat_category": {
          "$ref": "#/$defs/VatCategory",
          "default": "S",
          "description": "BT-95 / BT-102"
        }
      },
      "description": "Document-level allowance (BG-20) or charge (BG-21).",
      "additionalProperties": false
    },
    "PrecedingInvoice": {
      "type": "object",
      "title": "PrecedingInvoice",
      "required": [
        "number"
      ],
      "properties": {
        "number": {
          "type": "string",
          "title": "Number",
          "description": "BT-25"
        },
        "issue_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Issue Date",
          "default": null,
          "description": "BT-26"
        }
      },
      "additionalProperties": false
    },
    "AdditionalDocument": {
      "type": "object",
      "title": "AdditionalDocument",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "type": "string",
          "title": "Id",
          "description": "BT-122"
        },
        "url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Url",
          "default": null,
          "description": "BT-124"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Description",
          "default": null,
          "description": "BT-123"
        }
      },
      "additionalProperties": false
    },
    "LineAllowanceCharge": {
      "type": "object",
      "title": "LineAllowanceCharge",
      "required": [
        "amount"
      ],
      "properties": {
        "amount": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            }
          ],
          "title": "Amount",
          "description": "BT-136 / BT-141"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Reason",
          "default": null,
          "description": "BT-139 / BT-144"
        },
        "percentage": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 100,
              "minimum": 0
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,3}|(?=[\\d.]{1,8}0*$)\\d{0,3}\\.\\d{0,4}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Percentage",
          "default": null,
          "description": "BT-138 / BT-143"
        },
        "base_amount": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Base Amount",
          "default": null,
          "description": "BT-137 / BT-142"
        },
        "reason_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Reason Code",
          "default": null,
          "description": "BT-140 / BT-145"
        }
      },
      "additionalProperties": false
    }
  },
  "title": "generate_invoiceArguments",
  "required": [
    "invoice"
  ],
  "properties": {
    "check": {
      "enum": [
        "base",
        "fr-ctc"
      ],
      "type": "string",
      "title": "Check",
      "default": "fr-ctc",
      "description": "Rule set the output must pass before it is returned: fr-ctc (default) = EN 16931 + French CTC rules (BR-FR-*), base = EN 16931 only (non-French sellers)."
    },
    "output": {
      "$ref": "#/$defs/OutputFormat",
      "type": "string",
      "default": "facturx-pdf",
      "description": "facturx-pdf (default): PDF/A-3 with the visual invoice and CII XML inside, the hybrid file French platforms accept. cii-xml: UN/CEFACT CII XML alone. ubl-xml: UBL 2.1 XML alone."
    },
    "invoice": {
      "$ref": "#/$defs/Invoice",
      "type": "object",
      "description": "Invoice data: seller, buyer, lines, dates, payment terms. Amounts are decimal strings (\"1200.00\"), dates ISO 8601. Totals and the VAT breakdown are computed. Full JSON Schema in the resource facturx://schema/invoice."
    },
    "profile": {
      "$ref": "#/$defs/Profile",
      "type": "string",
      "default": "en16931",
      "description": "EN 16931 conformance level written in the XML: en16931 (default, full semantic model), extended (optional business terms), extended-ctc-fr (French B2B mandate; parties are checked before the file is emitted), basicwl (no lines)"
    },
    "language": {
      "$ref": "#/$defs/Language",
      "type": "string",
      "default": "fr",
      "description": "Language of the visual PDF: fr (default) or en. Ignored when output is cii-xml or ubl-xml."
    },
    "footer_text": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Footer Text",
      "default": null,
      "description": "Optional text printed in the PDF footer. Omit it for no footer. Ignored for XML-only output."
    },
    "party_check": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Party Check",
      "default": null,
      "description": "Ask EU Verify whether the seller and buyer are invoice-ready before emitting. true checks. false skips. Omit it and extended-ctc-fr checks, other profiles do not. not_ready is a tool error and no file is returned."
    }
  }
}
generate_invoice annotations
{
  "title": "Generate an EN 16931 invoice",
  "readOnlyHint": true,
  "openWorldHint": true,
  "idempotentHint": true
}
embed_xml — Embed CII XML into a PDF
Advertised by the server during the last successful anonymous check.
Advertised read-only

Combine a visual PDF you already have with CII XML into one Factur-X PDF/A-3. Use for an existing visual invoice; use generate_invoice to render invoice data or produce UBL. Match the PDF's parties, lines and totals to xml yourself: check examines only XML and cannot detect disagreement with the visible PDF. The embedded profile comes from xml; neither check nor language changes it. language does not translate the PDF. Invalid input or failed rules return a tool error with no file; rule errors include ids. For a findings report use validate_invoice. Success returns a JSON summary (profile, size_bytes, warning count) and a base64 PDF/A-3 resource. Requires a trial, prepaid or subscription allowance via OAuth or key; success consumes one document, errors consume none. Nothing is stored or sent.

embed_xml input schema
{
  "type": "object",
  "$defs": {
    "Language": {
      "enum": [
        "fr",
        "en"
      ],
      "type": "string",
      "title": "Language"
    }
  },
  "title": "embed_xmlArguments",
  "required": [
    "pdf_base64",
    "xml"
  ],
  "properties": {
    "xml": {
      "type": "string",
      "title": "Xml",
      "description": "Unencoded CII XML text (Factur-X / EN 16931); UBL is not supported."
    },
    "check": {
      "enum": [
        "base",
        "fr-ctc"
      ],
      "type": "string",
      "title": "Check",
      "default": "fr-ctc",
      "description": "XML validation rules: fr-ctc adds French BR-FR-* to EN 16931; base uses EN 16931 only."
    },
    "language": {
      "$ref": "#/$defs/Language",
      "type": "string",
      "default": "fr",
      "description": "Language written in the PDF metadata: fr (default) or en."
    },
    "pdf_base64": {
      "type": "string",
      "title": "Pdf Base64",
      "description": "Standard base64 of PDF bytes starting with %PDF-. Not a URL or data-URI."
    }
  }
}
embed_xml annotations
{
  "title": "Embed CII XML into a PDF",
  "readOnlyHint": true,
  "openWorldHint": false,
  "idempotentHint": true
}
validate_invoice — Validate your invoice document
Advertised by the server during the last successful anonymous check.
Advertised read-only

Check a Factur-X PDF, CII XML or UBL XML against EN 16931, and report the fields to fix. Use when the caller supplies a document, including after corrections; use extract_invoice for business data. With no document and only a request to try the product, choose view_invoice_demo instead. Supply one source: nonblank xml overrides document_base64 without inspecting it. To check a PDF's attachment, omit xml. check adds rules to the detected profile; it cannot change that profile. Use base for non-French invoices to avoid French-field findings. Returns validity and findings with rule ids and field pointers for explain_finding. XSD failures skip schematron; inspect checks_skipped before treating validation as complete. Warnings alone do not invalidate an invoice. Rule failures or a PDF without XML return valid=false; missing input, invalid base64, malformed or unrecognized XML return a tool error. Free without a key (shared daily limit, files up to 5 MB). With an OAuth connection or API key, completed reports consume one operation even when invalid; tool errors do not. No invoice is changed, stored or sent.

validate_invoice input schema
{
  "type": "object",
  "title": "validate_invoiceArguments",
  "properties": {
    "xml": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Xml",
      "default": null,
      "description": "CII or UBL XML as unencoded text."
    },
    "check": {
      "enum": [
        "base",
        "fr-ctc"
      ],
      "type": "string",
      "title": "Check",
      "default": "fr-ctc",
      "description": "fr-ctc: EN 16931 plus French CTC rules (BR-FR-*). base: EN 16931 only."
    },
    "document_base64": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Document Base64",
      "default": null,
      "description": "Standard base64 of a Factur-X PDF, CII XML or UBL XML file; no data-URI prefix."
    }
  }
}
validate_invoice output schema
{
  "type": "object",
  "title": "validate_invoiceDictOutput",
  "additionalProperties": true
}
validate_invoice annotations
{
  "title": "Validate your invoice document",
  "readOnlyHint": true,
  "openWorldHint": false,
  "idempotentHint": true
}
extract_invoice — Extract e-invoice data
Advertised by the server during the last successful anonymous check.
Advertised read-only

Extract invoice parties, dates, lines, totals and VAT as JSON for bookkeeping or matching. Use validate_invoice for compliance; this performs no OCR or recalculation. Supply one source: nonblank xml overrides document_base64 without inspecting it, so omit xml to extract a PDF's attachment. include_xml returns that selected source for archiving or validation, not XML reconstructed from fields. Extracted fields need mapping before use as generate_invoice input. Returns fields and format/profile metadata, plus PDF metadata for PDF input. Missing business values remain null; numeric values are strings. Missing input, invalid base64, malformed/unrecognized XML or a PDF without embedded XML returns a tool error, not an empty extraction. Requires a trial, prepaid or subscription allowance via OAuth or API key; success consumes one operation, errors consume none. Nothing is stored or sent.

extract_invoice input schema
{
  "type": "object",
  "title": "extract_invoiceArguments",
  "properties": {
    "xml": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Xml",
      "default": null,
      "description": "CII or UBL XML as unencoded text."
    },
    "include_xml": {
      "type": "boolean",
      "title": "Include Xml",
      "default": false,
      "description": "Include source XML text in the result; this can substantially increase response size."
    },
    "document_base64": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Document Base64",
      "default": null,
      "description": "Standard base64 of a Factur-X PDF, CII XML or UBL XML file; no data-URI prefix."
    }
  }
}
extract_invoice output schema
{
  "type": "object",
  "title": "extract_invoiceDictOutput",
  "additionalProperties": true
}
extract_invoice annotations
{
  "title": "Extract e-invoice data",
  "readOnlyHint": true,
  "openWorldHint": false,
  "idempotentHint": true
}
check_party — Check one invoice party
Advertised by the server during the last successful anonymous check.
Advertised read-onlyOpen-world

Check exactly one seller or buyer's registry identifiers and readiness through EU Verify. Use to correct one party's identifiers; use check_invoice_parties to check seller and buyer together, or validate_invoice for document rules. Supply siren, siret or vat; siret wins over siren. A SIREN/SIRET, country_code=FR or FR VAT triggers French checks requiring a SIREN/SIRET. Omitted vat can be derived from a successful French lookup; foreign parties normally need explicit VAT. Send address fields with a coherent country_code; requester_vat cannot substitute for the checked party's vat. Sends supplied fields to EU Verify and applicable registers. A Pro/Scale key enables checks; other plans return plan_excluded. No Factur-X document quota is consumed. Returns status, reasons with field pointers and available evidence: invoice_ready is positive, not_ready needs correction, upstream_unavailable is inconclusive and retryable, invalid_input indicates rejected input. Register results and evidence ids may change between calls. No invoice is created or stored.

check_party input schema
{
  "type": "object",
  "title": "check_partyArguments",
  "properties": {
    "vat": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Vat",
      "default": null,
      "description": "Party's EU VAT number, for example FR40732829320."
    },
    "city": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "City",
      "default": null,
      "description": "City, checked with the address."
    },
    "eori": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Eori",
      "default": null,
      "description": "EORI. Checked only when you send it."
    },
    "iban": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Iban",
      "default": null,
      "description": "Party IBAN. Checked only when you send it."
    },
    "role": {
      "enum": [
        "seller",
        "buyer"
      ],
      "type": "string",
      "title": "Role",
      "default": "buyer",
      "description": "Party role recorded in the evidence; defaults to buyer."
    },
    "siren": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Siren",
      "default": null,
      "description": "9-digit French SIREN, including leading zeros."
    },
    "siret": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Siret",
      "default": null,
      "description": "14-digit French SIRET, including leading zeros."
    },
    "address": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Address",
      "default": null,
      "description": "Street line; any address, postal_code or city activates address checking."
    },
    "postal_code": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Postal Code",
      "default": null,
      "description": "Postal code, checked with the address."
    },
    "country_code": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Country Code",
      "default": null,
      "description": "ISO 3166-1 alpha-2 country code, for example FR or DE."
    },
    "requester_vat": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Requester Vat",
      "default": null,
      "description": "Your VAT number, so the evidence pack can include a VIES request identifier."
    }
  }
}
check_party output schema
{
  "type": "object",
  "title": "check_partyDictOutput",
  "additionalProperties": true
}
check_party annotations
{
  "title": "Check one invoice party",
  "readOnlyHint": true,
  "openWorldHint": true,
  "idempotentHint": true
}
check_invoice_parties — Check seller and buyer together
Advertised by the server during the last successful anonymous check.
Advertised read-onlyOpen-world

Check a supplied seller AND buyer together, returning combined readiness and separate evidence. Use before generate_invoice; use check_party for one party and validate_invoice for document rules. Each party needs siren, siret or vat; siret wins over siren. French identifiers or country_code=FR require SIREN/SIRET; a French lookup can derive omitted vat. Address fields activate address checks. requester_vat applies to both lookups but cannot replace either party's vat. Roles follow seller/buyer argument names; no invoice lines or full invoice body is needed. Makes at most two EU Verify requests with the caller's plan key; Pro/Scale enable register access. Returns status and parties.seller/buyer, each with status, reasons and available evidence. Only two positive results yield invoice_ready; any not_ready yields not_ready, otherwise inconclusive. Inspect both results: denied plans, invalid input, quotas and outages never establish readiness. No document quota is consumed; upstream limits still apply per lookup. Results may change on retry. No invoice is generated, stored or sent.

check_invoice_parties input schema
{
  "type": "object",
  "$defs": {
    "PartyCheckInput": {
      "type": "object",
      "title": "PartyCheckInput",
      "properties": {
        "vat": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 256,
              "minLength": 1
            },
            {
              "type": "null"
            }
          ],
          "title": "Vat",
          "default": null,
          "description": "Party's EU VAT number, including country prefix."
        },
        "city": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 256,
              "minLength": 1
            },
            {
              "type": "null"
            }
          ],
          "title": "City",
          "default": null,
          "description": "City for address verification."
        },
        "eori": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 256,
              "minLength": 1
            },
            {
              "type": "null"
            }
          ],
          "title": "Eori",
          "default": null,
          "description": "Optional EORI to verify."
        },
        "iban": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 256,
              "minLength": 1
            },
            {
              "type": "null"
            }
          ],
          "title": "Iban",
          "default": null,
          "description": "Optional party IBAN to verify."
        },
        "siren": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 256,
              "minLength": 1
            },
            {
              "type": "null"
            }
          ],
          "title": "Siren",
          "default": null,
          "description": "9-digit French SIREN, including leading zeros."
        },
        "siret": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 256,
              "minLength": 1
            },
            {
              "type": "null"
            }
          ],
          "title": "Siret",
          "default": null,
          "description": "14-digit French SIRET, including leading zeros."
        },
        "address": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 256,
              "minLength": 1
            },
            {
              "type": "null"
            }
          ],
          "title": "Address",
          "default": null,
          "description": "Street address to verify."
        },
        "postal_code": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 256,
              "minLength": 1
            },
            {
              "type": "null"
            }
          ],
          "title": "Postal Code",
          "default": null,
          "description": "Postal code for address verification."
        },
        "country_code": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 256,
              "minLength": 1
            },
            {
              "type": "null"
            }
          ],
          "title": "Country Code",
          "default": null,
          "description": "ISO 3166-1 alpha-2 country code, e.g. FR or DE."
        }
      },
      "additionalProperties": false
    }
  },
  "title": "check_invoice_partiesArguments",
  "required": [
    "seller",
    "buyer"
  ],
  "properties": {
    "buyer": {
      "$ref": "#/$defs/PartyCheckInput",
      "type": "object",
      "description": "Buyer's registry identifiers and optional checks."
    },
    "seller": {
      "$ref": "#/$defs/PartyCheckInput",
      "type": "object",
      "description": "Seller's registry identifiers and optional checks."
    },
    "requester_vat": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 256
        },
        {
          "type": "null"
        }
      ],
      "title": "Requester Vat",
      "default": null,
      "description": "Your VAT number for VIES request evidence."
    }
  }
}
check_invoice_parties output schema
{
  "type": "object",
  "title": "check_invoice_partiesDictOutput",
  "additionalProperties": true
}
check_invoice_parties annotations
{
  "title": "Check seller and buyer together",
  "readOnlyHint": true,
  "openWorldHint": true,
  "idempotentHint": true
}
explain_finding — Explain a validation finding
Advertised by the server during the last successful anonymous check.
Advertised read-only

Turn a validation rule id into the invoice field to change and an example value. Use after validate_invoice or a generate_invoice rule error, not to validate an invoice itself. rule is trimmed and uppercased to select a guide entry. message/json_pointer must come from that same finding: nonempty values override its generic context, but never change the selected fix or example. Omit them to use guide defaults for known rules. Returns rule, known, message, json_pointer, fix and example; known rules also include problem. Selected BR-FR rules and BR-CO-17/BR-CO-26 have guidance. Unknown ids return known=false and example=null with the supplied context, not an error; consult the original finding. No key or document quota is needed; nothing is stored.

explain_finding input schema
{
  "type": "object",
  "title": "explain_findingArguments",
  "required": [
    "rule"
  ],
  "properties": {
    "rule": {
      "type": "string",
      "title": "Rule",
      "description": "Validation rule identifier, for example BR-FR-01 or BR-CO-26."
    },
    "message": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Message",
      "default": null,
      "description": "Original finding's message text."
    },
    "json_pointer": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Json Pointer",
      "default": null,
      "description": "Original finding's json_pointer field path."
    }
  }
}
explain_finding output schema
{
  "type": "object",
  "title": "explain_findingDictOutput",
  "additionalProperties": true
}
explain_finding annotations
{
  "title": "Explain a validation finding",
  "readOnlyHint": true,
  "openWorldHint": false,
  "idempotentHint": true
}
get_invoice_example — Get an invoice or credit-note example
Advertised by the server during the last successful anonymous check.
Advertised read-only

Return a complete invoice or credit-note example to edit and pass to generate_invoice. Use this first, instead of inventing fields. No API key is required, and the call does not count as a document. The seller and buyer are sample data: replace them, the number, the dates and the lines before you generate. For credit_note, also replace preceding_invoices with the original invoice reference. To credit a real invoice already in hand, use draft_credit_note instead of this synthetic example. Amounts are positive decimal strings. Nothing is stored, and no file is created. Returns the invoice plus the profile and check to pass to generate_invoice.

get_invoice_example input schema
{
  "type": "object",
  "title": "get_invoice_exampleArguments",
  "properties": {
    "profile": {
      "enum": [
        "en16931",
        "extended-ctc-fr"
      ],
      "type": "string",
      "title": "Profile",
      "default": "en16931",
      "description": "en16931 (default) or extended-ctc-fr. The body is the same. extended-ctc-fr sets party_check so generate_invoice asks EU Verify before emitting a file."
    },
    "document_type": {
      "enum": [
        "invoice",
        "credit_note"
      ],
      "type": "string",
      "title": "Document Type",
      "default": "invoice",
      "description": "invoice (default): type 380; credit_note: type 381 with a sample original-invoice reference."
    }
  }
}
get_invoice_example output schema
{
  "type": "object",
  "title": "get_invoice_exampleDictOutput",
  "additionalProperties": true
}
get_invoice_example annotations
{
  "title": "Get an invoice or credit-note example",
  "readOnlyHint": true,
  "openWorldHint": false,
  "idempotentHint": true
}
draft_credit_note — Draft a full or partial credit note
Advertised by the server during the last successful anonymous check.
Advertised read-only

Draft a type-381 credit note from an existing invoice, for all lines or selected quantities. Use to reverse an existing invoice's charges; use get_invoice_example for a synthetic credit-note example. invoice must be the original generate_invoice input object, not extract_invoice output. number and issue_date belong to the new credit note; the original number/date are copied into preceding_invoices. Give number a distinct value and use YYYY-MM-DD dates. due_date replaces the original deadline; omitting it removes that deadline rather than inheriting it. Omit credit_lines to retain all original lines and amounts. Otherwise select distinct 1-based array positions, not line ids: [{"line_index":1,"quantity":"2"}] credits two units of the first line. Omitted lines are excluded; quantities cannot exceed the original. Prices and VAT rates are retained. Selected-line mode clears original totals, prepayments, rounding and paid status for recalculation. Document allowances/charges, or reduced quantities on adjusted lines or overridden net amounts, need explicit allocation: these cases return an error; prepare a credit body for generate_invoice. No prior-credit history is stored: the caller must prevent cumulative credits beyond the original. Keep amounts positive: type 381 expresses the credit. Existing credit notes, a reused invoice number or negative line amounts produce a tool error. Default payment remittance references follow the new number; a custom reference is preserved. Returns invoice, type_code, preceding_invoice and next. Pass the returned invoice to generate_invoice with the original profile to create the document. No key or document quota is needed for drafting; nothing is stored, sent or refunded.

draft_credit_note input schema
{
  "type": "object",
  "$defs": {
    "Line": {
      "type": "object",
      "title": "Line",
      "required": [
        "item_name",
        "quantity",
        "unit_price"
      ],
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Id",
          "default": null,
          "description": "BT-126, auto-numbered when omitted"
        },
        "note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Note",
          "default": null,
          "description": "BT-127"
        },
        "charges": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LineAllowanceCharge"
          },
          "title": "Charges",
          "description": "BG-28"
        },
        "quantity": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,13}|(?=[\\d.]{1,20}0*$)\\d{0,13}\\.\\d{0,6}0*$)"
            }
          ],
          "title": "Quantity",
          "description": "BT-129"
        },
        "vat_rate": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 100,
              "minimum": 0
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,3}|(?=[\\d.]{1,8}0*$)\\d{0,3}\\.\\d{0,4}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Vat Rate",
          "default": null,
          "description": "BT-152, required for category S"
        },
        "item_name": {
          "type": "string",
          "title": "Item Name",
          "description": "BT-153"
        },
        "unit_code": {
          "type": "string",
          "title": "Unit Code",
          "default": "C62",
          "description": "UN/ECE Rec 20, BT-130 (C62 unit, HUR hour, DAY, KGM, MTR, LTR...)"
        },
        "allowances": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LineAllowanceCharge"
          },
          "title": "Allowances",
          "description": "BG-27"
        },
        "attributes": {
          "type": "object",
          "title": "Attributes",
          "description": "BG-32 item attributes",
          "additionalProperties": {
            "type": "string"
          }
        },
        "net_amount": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Net Amount",
          "default": null,
          "description": "BT-131. Computed as quantity x unit_price / base_qty - allowances + charges when omitted"
        },
        "period_end": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Period End",
          "default": null,
          "description": "BT-135"
        },
        "unit_price": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            }
          ],
          "title": "Unit Price",
          "description": "Net unit price, BT-146"
        },
        "period_start": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Period Start",
          "default": null,
          "description": "BT-134"
        },
        "vat_category": {
          "$ref": "#/$defs/VatCategory",
          "default": "S",
          "description": "BT-151"
        },
        "buyer_item_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Buyer Item Id",
          "default": null,
          "description": "BT-156"
        },
        "origin_country": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Origin Country",
          "default": null,
          "description": "BT-159"
        },
        "price_discount": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Price Discount",
          "default": null,
          "description": "BT-147"
        },
        "seller_item_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Seller Item Id",
          "default": null,
          "description": "BT-155"
        },
        "gross_unit_price": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Gross Unit Price",
          "default": null,
          "description": "BT-148"
        },
        "item_description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Item Description",
          "default": null,
          "description": "BT-154"
        },
        "standard_item_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Standard Item Id",
          "default": null,
          "description": "BT-157, e.g. EAN/GTIN"
        },
        "price_base_quantity": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,13}|(?=[\\d.]{1,20}0*$)\\d{0,13}\\.\\d{0,6}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Price Base Quantity",
          "default": null,
          "description": "BT-149"
        },
        "order_line_reference": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Order Line Reference",
          "default": null,
          "description": "BT-132"
        },
        "price_base_unit_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Price Base Unit Code",
          "default": null,
          "description": "BT-150"
        },
        "standard_item_id_scheme": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Standard Item Id Scheme",
          "default": null,
          "description": "BT-157-1, e.g. 0160 = GTIN"
        },
        "buyer_accounting_reference": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Buyer Accounting Reference",
          "default": null,
          "description": "BT-133"
        }
      },
      "additionalProperties": false
    },
    "Note": {
      "type": "object",
      "title": "Note",
      "required": [
        "text"
      ],
      "properties": {
        "text": {
          "type": "string",
          "title": "Text",
          "description": "BT-22"
        },
        "subject_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Subject Code",
          "default": null,
          "description": "UNTDID 4451 code, BT-21 (e.g. AAI general, PMT payment, PMD penalties)"
        }
      },
      "additionalProperties": false
    },
    "Party": {
      "type": "object",
      "title": "Party",
      "required": [
        "name",
        "address"
      ],
      "properties": {
        "name": {
          "type": "string",
          "title": "Name",
          "description": "Legal name, BT-27 / BT-44"
        },
        "siren": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Siren",
          "default": null,
          "description": "French SIREN (9 digits). Written as legal registration id BT-30 / BT-47 with scheme 0002."
        },
        "siret": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Siret",
          "default": null,
          "description": "French SIRET (14 digits). Shortcut for electronic_address with scheme 0225."
        },
        "vat_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Vat Id",
          "default": null,
          "description": "BT-31 / BT-48, e.g. FR12345678901"
        },
        "address": {
          "$ref": "#/$defs/Address"
        },
        "contact": {
          "anyOf": [
            {
              "$ref": "#/$defs/Contact"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "global_ids": {
          "type": "object",
          "title": "Global Ids",
          "description": "BT-29 / BT-46: {schemeID: identifier}, e.g. {'0009': SIRET}",
          "additionalProperties": {
            "type": "string"
          }
        },
        "legal_info": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Legal Info",
          "default": null,
          "description": "Seller only, BT-33: legal form, share capital, RCS city..."
        },
        "trading_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Trading Name",
          "default": null,
          "description": "BT-28 / BT-45"
        },
        "electronic_address": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Electronic Address",
          "default": null,
          "description": "BT-34 / BT-49"
        },
        "tax_registration_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tax Registration Id",
          "default": null,
          "description": "Seller only, BT-32"
        },
        "legal_registration_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Legal Registration Id",
          "default": null,
          "description": "BT-30 / BT-47 when not a SIREN. Ignored if siren is set."
        },
        "electronic_address_scheme": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Electronic Address Scheme",
          "default": null,
          "description": "EAS code for electronic_address (BT-34-1 / BT-49-1), e.g. 0225 = SIRET (FR)"
        },
        "legal_registration_scheme": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Legal Registration Scheme",
          "default": null,
          "description": "ISO 6523 ICD for legal_registration_id (BT-30-1 / BT-47-1), e.g. 0002 = SIREN"
        }
      },
      "additionalProperties": false
    },
    "Totals": {
      "type": "object",
      "title": "Totals",
      "required": [
        "line_total",
        "tax_exclusive",
        "tax_total",
        "tax_inclusive",
        "amount_due"
      ],
      "properties": {
        "prepaid": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Prepaid",
          "default": null,
          "description": "BT-113"
        },
        "rounding": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Rounding",
          "default": null,
          "description": "BT-114"
        },
        "tax_total": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            }
          ],
          "title": "Tax Total",
          "description": "BT-110"
        },
        "amount_due": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            }
          ],
          "title": "Amount Due",
          "description": "BT-115"
        },
        "line_total": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            }
          ],
          "title": "Line Total",
          "description": "BT-106"
        },
        "charge_total": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Charge Total",
          "default": null,
          "description": "BT-108"
        },
        "tax_exclusive": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            }
          ],
          "title": "Tax Exclusive",
          "description": "BT-109"
        },
        "tax_inclusive": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            }
          ],
          "title": "Tax Inclusive",
          "description": "BT-112"
        },
        "vat_breakdown": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/VatBreakdown"
          },
          "title": "Vat Breakdown",
          "description": "BG-23"
        },
        "allowance_total": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Allowance Total",
          "default": null,
          "description": "BT-107"
        }
      },
      "description": "Document totals (BG-22). All computed by the engine when omitted.",
      "additionalProperties": false
    },
    "Address": {
      "type": "object",
      "title": "Address",
      "required": [
        "country"
      ],
      "properties": {
        "city": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "City",
          "default": null,
          "description": "BT-37 / BT-52"
        },
        "line1": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Line1",
          "default": null,
          "description": "BT-35 / BT-50"
        },
        "line2": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Line2",
          "default": null,
          "description": "BT-36 / BT-51"
        },
        "line3": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Line3",
          "default": null,
          "description": "BT-162 / BT-163"
        },
        "country": {
          "type": "string",
          "title": "Country",
          "maxLength": 2,
          "minLength": 2,
          "description": "ISO 3166-1 alpha-2, BT-40 / BT-55"
        },
        "postal_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Postal Code",
          "default": null,
          "description": "BT-38 / BT-53"
        },
        "country_subdivision": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Country Subdivision",
          "default": null,
          "description": "BT-39 / BT-54"
        }
      },
      "additionalProperties": false
    },
    "Contact": {
      "type": "object",
      "title": "Contact",
      "properties": {
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Name",
          "default": null,
          "description": "BT-41 / BT-56"
        },
        "email": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Email",
          "default": null,
          "description": "BT-43 / BT-58"
        },
        "phone": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Phone",
          "default": null,
          "description": "BT-42 / BT-57"
        },
        "department": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Department",
          "default": null,
          "description": "BT-41-0 / BT-56-0 (used when name is empty)"
        }
      },
      "additionalProperties": false
    },
    "Invoice": {
      "type": "object",
      "title": "Invoice",
      "required": [
        "number",
        "issue_date",
        "seller",
        "buyer",
        "lines"
      ],
      "properties": {
        "buyer": {
          "$ref": "#/$defs/Party",
          "description": "BG-7"
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Line"
          },
          "title": "Lines",
          "minItems": 1,
          "description": "BG-25"
        },
        "notes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Note"
          },
          "title": "Notes",
          "description": "BG-1"
        },
        "number": {
          "type": "string",
          "title": "Number",
          "pattern": "^[A-Za-z0-9._/\\-]+$",
          "maxLength": 35,
          "description": "BT-1 (BR-FR-01/02: max 35 chars, letters, digits, . _ / -)"
        },
        "seller": {
          "$ref": "#/$defs/Party",
          "description": "BG-4"
        },
        "totals": {
          "anyOf": [
            {
              "$ref": "#/$defs/Totals"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "BG-22, computed when omitted"
        },
        "charges": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AllowanceCharge"
          },
          "title": "Charges",
          "description": "BG-21"
        },
        "payment": {
          "anyOf": [
            {
              "$ref": "#/$defs/Payment"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "BG-16"
        },
        "currency": {
          "type": "string",
          "title": "Currency",
          "default": "EUR",
          "maxLength": 3,
          "minLength": 3,
          "description": "BT-5"
        },
        "delivery": {
          "anyOf": [
            {
              "$ref": "#/$defs/Delivery"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "BG-13"
        },
        "due_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Due Date",
          "default": null,
          "description": "BT-9"
        },
        "type_code": {
          "enum": [
            "380",
            "381",
            "384",
            "386",
            "389",
            "261",
            "751"
          ],
          "type": "string",
          "title": "Type Code",
          "default": "380",
          "description": "UNTDID 1001, BT-3: 380 invoice, 381 credit note, 384 corrected, 386 prepayment, 389 self-billed"
        },
        "allowances": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AllowanceCharge"
          },
          "title": "Allowances",
          "description": "BG-20"
        },
        "issue_date": {
          "type": "string",
          "title": "Issue Date",
          "format": "date",
          "description": "BT-2"
        },
        "already_paid": {
          "type": "boolean",
          "title": "Already Paid",
          "default": false,
          "description": "Invoice already paid at issuance (French BT-23 variants B2/S2/M2)"
        },
        "payment_terms": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Payment Terms",
          "default": null,
          "description": "BT-20"
        },
        "operation_type": {
          "enum": [
            "goods",
            "services",
            "mixed"
          ],
          "type": "string",
          "title": "Operation Type",
          "default": "services",
          "description": "Nature of the operation, used to derive the French business process code BT-23 (B1/S1/M1)"
        },
        "prepaid_amount": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Prepaid Amount",
          "default": null,
          "description": "BT-113 shortcut when totals are computed"
        },
        "tax_point_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tax Point Date",
          "default": null,
          "description": "BT-7"
        },
        "buyer_reference": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Buyer Reference",
          "default": null,
          "description": "BT-10"
        },
        "french_mentions": {
          "$ref": "#/$defs/FrenchMentions",
          "description": "Mandatory French legal mentions (BR-FR-05)"
        },
        "rounding_amount": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Rounding Amount",
          "default": null,
          "description": "BT-114 shortcut when totals are computed"
        },
        "business_process": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Business Process",
          "default": null,
          "description": "Explicit BT-23 business process code (e.g. S1). Overrides operation_type/already_paid."
        },
        "tender_reference": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tender Reference",
          "default": null,
          "description": "BT-17"
        },
        "project_reference": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Project Reference",
          "default": null,
          "description": "BT-11"
        },
        "contract_reference": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Contract Reference",
          "default": null,
          "description": "BT-12"
        },
        "preceding_invoices": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PrecedingInvoice"
          },
          "title": "Preceding Invoices",
          "description": "BG-3"
        },
        "additional_documents": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AdditionalDocument"
          },
          "title": "Additional Documents",
          "description": "BG-24"
        },
        "tax_exemption_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tax Exemption Reason",
          "default": null,
          "description": "Default BT-120 text for E/AE/K/G/O categories, e.g. 'TVA non applicable, art. 293 B du CGI'"
        },
        "sales_order_reference": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sales Order Reference",
          "default": null,
          "description": "BT-14"
        },
        "vat_accounting_currency": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Vat Accounting Currency",
          "default": null,
          "description": "BT-6"
        },
        "purchase_order_reference": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Purchase Order Reference",
          "default": null,
          "description": "BT-13"
        },
        "despatch_advice_reference": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Despatch Advice Reference",
          "default": null,
          "description": "BT-16"
        },
        "tax_exemption_reason_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tax Exemption Reason Code",
          "default": null,
          "description": "Default BT-121 VATEX code"
        },
        "buyer_accounting_reference": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Buyer Accounting Reference",
          "default": null,
          "description": "BT-19"
        },
        "receiving_advice_reference": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Receiving Advice Reference",
          "default": null,
          "description": "BT-15"
        }
      },
      "additionalProperties": false
    },
    "Payment": {
      "type": "object",
      "title": "Payment",
      "properties": {
        "bic": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Bic",
          "default": null,
          "description": "BT-86"
        },
        "iban": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Iban",
          "default": null,
          "description": "Payee account, BT-84"
        },
        "terms": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Terms",
          "default": null,
          "description": "BT-20"
        },
        "means_code": {
          "type": "string",
          "title": "Means Code",
          "default": "30",
          "description": "UNTDID 4461, BT-81. 30 credit transfer, 58 SEPA transfer, 59 SEPA direct debit, 48 card"
        },
        "means_text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Means Text",
          "default": null,
          "description": "BT-82"
        },
        "account_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Account Name",
          "default": null,
          "description": "BT-85"
        },
        "debited_iban": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Debited Iban",
          "default": null,
          "description": "Direct debit, BT-91"
        },
        "mandate_reference": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Mandate Reference",
          "default": null,
          "description": "Direct debit, BT-89"
        },
        "creditor_reference_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Creditor Reference Id",
          "default": null,
          "description": "Direct debit, BT-90"
        },
        "remittance_information": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Remittance Information",
          "default": null,
          "description": "BT-83"
        }
      },
      "additionalProperties": false
    },
    "Delivery": {
      "type": "object",
      "title": "Delivery",
      "properties": {
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Name",
          "default": null,
          "description": "Deliver-to party name, BT-70"
        },
        "address": {
          "anyOf": [
            {
              "$ref": "#/$defs/Address"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "period_end": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Period End",
          "default": null,
          "description": "BT-74"
        },
        "actual_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Actual Date",
          "default": null,
          "description": "BT-72"
        },
        "location_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Location Id",
          "default": null,
          "description": "BT-71"
        },
        "period_start": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Period Start",
          "default": null,
          "description": "BT-73"
        },
        "location_id_scheme": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Location Id Scheme",
          "default": null,
          "description": "BT-71-1"
        }
      },
      "additionalProperties": false
    },
    "CreditLine": {
      "type": "object",
      "title": "CreditLine",
      "required": [
        "line_index",
        "quantity"
      ],
      "properties": {
        "quantity": {
          "anyOf": [
            {
              "type": "number",
              "exclusiveMinimum": 0
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,13}|(?=[\\d.]{1,20}0*$)\\d{0,13}\\.\\d{0,6}0*$)"
            }
          ],
          "title": "Quantity",
          "description": "Positive quantity to credit, at most the original line quantity; decimal string."
        },
        "line_index": {
          "type": "integer",
          "title": "Line Index",
          "minimum": 1,
          "description": "1-based position in the original invoice.lines array, not its id."
        }
      },
      "additionalProperties": false
    },
    "VatCategory": {
      "enum": [
        "S",
        "Z",
        "E",
        "AE",
        "K",
        "G",
        "O",
        "L",
        "M"
      ],
      "type": "string",
      "title": "VatCategory",
      "description": "UNTDID 5305 subset used by EN 16931 (BT-151 / BT-118)."
    },
    "VatBreakdown": {
      "type": "object",
      "title": "VatBreakdown",
      "required": [
        "category",
        "taxable_amount",
        "tax_amount"
      ],
      "properties": {
        "rate": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 100,
              "minimum": 0
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,3}|(?=[\\d.]{1,8}0*$)\\d{0,3}\\.\\d{0,4}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Rate",
          "default": null,
          "description": "BT-119"
        },
        "category": {
          "$ref": "#/$defs/VatCategory",
          "description": "BT-118"
        },
        "tax_amount": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            }
          ],
          "title": "Tax Amount",
          "description": "BT-117"
        },
        "taxable_amount": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            }
          ],
          "title": "Taxable Amount",
          "description": "BT-116"
        },
        "exemption_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Exemption Reason",
          "default": null,
          "description": "BT-120"
        },
        "exemption_reason_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Exemption Reason Code",
          "default": null,
          "description": "VATEX code, BT-121"
        }
      },
      "additionalProperties": false
    },
    "FrenchMentions": {
      "type": "object",
      "title": "FrenchMentions",
      "properties": {
        "enabled": {
          "type": "boolean",
          "title": "Enabled",
          "default": true,
          "description": "Add the three mandatory French mentions when missing"
        },
        "recovery_fee": {
          "type": "string",
          "title": "Recovery Fee",
          "default": "Indemnité forfaitaire pour frais de recouvrement en cas de retard de paiement : 40 €.",
          "description": "Note code PMT"
        },
        "early_payment_discount": {
          "type": "string",
          "title": "Early Payment Discount",
          "default": "Pas d'escompte pour paiement anticipé.",
          "description": "Note code AAB"
        },
        "late_payment_penalties": {
          "type": "string",
          "title": "Late Payment Penalties",
          "default": "Tout retard de paiement entraîne une pénalité exigible à compter de la date d'échéance, calculée sur la base de trois fois le taux d'intérêt légal.",
          "description": "Note code PMD"
        }
      },
      "description": "Legal mentions required on French B2B invoices (BR-FR-05). Added as BG-1 notes with codes PMD, PMT, AAB.",
      "additionalProperties": false
    },
    "AllowanceCharge": {
      "type": "object",
      "title": "AllowanceCharge",
      "required": [
        "amount"
      ],
      "properties": {
        "amount": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            }
          ],
          "title": "Amount",
          "description": "BT-92 / BT-99, tax excluded"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Reason",
          "default": null,
          "description": "BT-97 / BT-104"
        },
        "vat_rate": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 100,
              "minimum": 0
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,3}|(?=[\\d.]{1,8}0*$)\\d{0,3}\\.\\d{0,4}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Vat Rate",
          "default": null,
          "description": "BT-96 / BT-103"
        },
        "percentage": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 100,
              "minimum": 0
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,3}|(?=[\\d.]{1,8}0*$)\\d{0,3}\\.\\d{0,4}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Percentage",
          "default": null,
          "description": "BT-94 / BT-101"
        },
        "base_amount": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Base Amount",
          "default": null,
          "description": "BT-93 / BT-100"
        },
        "reason_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Reason Code",
          "default": null,
          "description": "UNTDID 5189 / 7161, BT-98 / BT-105"
        },
        "vat_category": {
          "$ref": "#/$defs/VatCategory",
          "default": "S",
          "description": "BT-95 / BT-102"
        }
      },
      "description": "Document-level allowance (BG-20) or charge (BG-21).",
      "additionalProperties": false
    },
    "PrecedingInvoice": {
      "type": "object",
      "title": "PrecedingInvoice",
      "required": [
        "number"
      ],
      "properties": {
        "number": {
          "type": "string",
          "title": "Number",
          "description": "BT-25"
        },
        "issue_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Issue Date",
          "default": null,
          "description": "BT-26"
        }
      },
      "additionalProperties": false
    },
    "AdditionalDocument": {
      "type": "object",
      "title": "AdditionalDocument",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "type": "string",
          "title": "Id",
          "description": "BT-122"
        },
        "url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Url",
          "default": null,
          "description": "BT-124"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Description",
          "default": null,
          "description": "BT-123"
        }
      },
      "additionalProperties": false
    },
    "LineAllowanceCharge": {
      "type": "object",
      "title": "LineAllowanceCharge",
      "required": [
        "amount"
      ],
      "properties": {
        "amount": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            }
          ],
          "title": "Amount",
          "description": "BT-136 / BT-141"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Reason",
          "default": null,
          "description": "BT-139 / BT-144"
        },
        "percentage": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 100,
              "minimum": 0
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,3}|(?=[\\d.]{1,8}0*$)\\d{0,3}\\.\\d{0,4}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Percentage",
          "default": null,
          "description": "BT-138 / BT-143"
        },
        "base_amount": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,15}|(?=[\\d.]{1,20}0*$)\\d{0,15}\\.\\d{0,4}0*$)"
            },
            {
              "type": "null"
            }
          ],
          "title": "Base Amount",
          "default": null,
          "description": "BT-137 / BT-142"
        },
        "reason_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Reason Code",
          "default": null,
          "description": "BT-140 / BT-145"
        }
      },
      "additionalProperties": false
    }
  },
  "title": "draft_credit_noteArguments",
  "required": [
    "invoice",
    "number",
    "issue_date"
  ],
  "properties": {
    "number": {
      "type": "string",
      "title": "Number",
      "description": "Credit note number, different from the invoice number. Max 35 characters: letters, digits, and . _ / -."
    },
    "invoice": {
      "$ref": "#/$defs/Invoice",
      "type": "object",
      "description": "The original invoice object you passed to generate_invoice. Not an extract_invoice result."
    },
    "due_date": {
      "anyOf": [
        {
          "type": "string",
          "format": "date"
        },
        {
          "type": "null"
        }
      ],
      "title": "Due Date",
      "default": null,
      "description": "Optional due date. Omit it to drop the original invoice due date."
    },
    "issue_date": {
      "type": "string",
      "title": "Issue Date",
      "format": "date",
      "description": "Credit note issue date, ISO 8601 (YYYY-MM-DD)."
    },
    "credit_lines": {
      "anyOf": [
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CreditLine"
          },
          "minItems": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Credit Lines",
      "default": null,
      "description": "Selected original line positions and quantities. Omit for a full credit; an empty list is invalid."
    }
  }
}
draft_credit_note output schema
{
  "type": "object",
  "title": "draft_credit_noteDictOutput",
  "additionalProperties": true
}
draft_credit_note annotations
{
  "title": "Draft a full or partial credit note",
  "readOnlyHint": true,
  "openWorldHint": false,
  "idempotentHint": true
}

Prompts

0 advertised

No prompt definitions available.

Resources

3 advertised

getting_started

Advertised by the server during the last successful anonymous check.

Supported invoice tasks, public sample workflow, OAuth onboarding and operation costs.

getting_started URI
facturx://getting-started

MIME type: text/plain

invoice_schema — Invoice JSON Schema

Advertised by the server during the last successful anonymous check.

JSON Schema of the invoice input accepted by generate_invoice.

invoice_schema URI
facturx://schema/invoice

MIME type: application/json

french_reform_guide — French e-invoicing reform cheat sheet

Advertised by the server during the last successful anonymous check.

Key dates, mandatory fields and formats of the French e-invoicing reform.

french_reform_guide URI
facturx://guide/french-reform

MIME type: text/markdown

90-day uptime

A lightweight connection check about every six hours, sampled on hosts with many listings. It shows the server answered, not that its tools work.

100% (73 of 73 checks answered)

  1. 2026-11-02: 3 of 3 checks answered
  2. 2026-11-03: 4 of 4 checks answered
  3. 2026-11-04: 4 of 4 checks answered
  4. 2026-11-05: 4 of 4 checks answered
  5. 2026-11-06: 4 of 4 checks answered
  6. 2026-11-07: 2 of 2 checks answered
  7. 2026-11-09: 1 of 1 checks answered
  8. 2026-11-10: 2 of 2 checks answered
  9. 2026-11-11: 1 of 1 checks answered
  10. 2026-11-12: 1 of 1 checks answered
  11. 2026-11-14: 1 of 1 checks answered
  12. 2026-11-15: 2 of 2 checks answered
  13. 2026-11-16: 4 of 4 checks answered
  14. 2026-11-17: 5 of 5 checks answered
  15. 2026-11-18: 5 of 5 checks answered
  16. 2026-11-19: 4 of 4 checks answered
  17. 2026-11-20: 3 of 3 checks answered
  18. 2026-11-21: 4 of 4 checks answered
  19. 2026-11-22: 4 of 4 checks answered
  20. 2026-11-23: 3 of 3 checks answered
  21. 2026-11-24: 4 of 4 checks answered
  22. 2026-11-25: 4 of 4 checks answered
  23. 2026-11-26: 4 of 4 checks answered

30-day availability

Aggregated from read-only remote checks; this is not a tool-execution or security guarantee.

Successful checks
2 of 2 (100%)
Average latency
2092 ms
95th percentile latency
2276 ms

Maintenance history

Public check and source-refresh events. Editorial and ownership records remain private.

  • · probe · passed · 2297 ms · 10 tool(s), 3 resource(s), 0 resource template(s), 0 prompt(s)
  • · probe · passed · 1886 ms · metadata changed · 10 tool(s), 3 resource(s), 0 resource template(s), 0 prompt(s)
  • · registry · passed · metadata changed · Source metadata updated
  • · backfill · recorded · Pre-expansion baseline; unobserved rich metadata remains unknown

Connect from your client

Each snippet registers the same endpoint; pick the client you use.

This server is operated by the named third party. Listing and endpoint checks are not an endorsement or a security audit. Review the operator's permissions, terms, and data handling before connecting. How listings are checked and corrected.

Claude Code

Run this once in a terminal. It registers the remote server. Use --scope project to write .mcp.json for the repo.
Claude Code configuration
claude mcp add --transport http factur-x-mcp https://facturx.orvel.dev/mcp

Codex

Run this once. Codex stores MCP servers in ~/.codex/config.toml (or .codex/config.toml in a trusted project).
Codex configuration
codex mcp add factur-x-mcp --url https://facturx.orvel.dev/mcp

Cursor

Merge this server into .cursor/mcp.json in your project, then enable factur-x-mcp in your MCP settings.
Cursor configuration
{
  "mcpServers": {
    "factur-x-mcp": {
      "url": "https://facturx.orvel.dev/mcp"
    }
  }
}

Cline

Merge this into cline_mcp_settings.json (Cline → MCP Servers → Configure).
Cline configuration
{
  "mcpServers": {
    "factur-x-mcp": {
      "type": "streamableHttp",
      "url": "https://facturx.orvel.dev/mcp",
      "disabled": false
    }
  }
}

VS Code

Merge this server into .vscode/mcp.json. Use MCP: List Servers to start factur-x-mcp and inspect its tools.
VS Code configuration
{
  "servers": {
    "factur-x-mcp": {
      "type": "http",
      "url": "https://facturx.orvel.dev/mcp"
    }
  }
}

Gemini CLI

Run this once. It writes .gemini/settings.json in the current project; pass --scope user for ~/.gemini/settings.json.
Gemini CLI configuration
gemini mcp add --transport http factur-x-mcp https://facturx.orvel.dev/mcp

Claude Desktop

Open Claude Settings > Connectors > Add custom connector, enter this server URL and enable it for the conversation. This is a manual remote-connector handoff, not a desktop JSON configuration.
Claude Desktop configuration
https://facturx.orvel.dev/mcp

Windsurf

Merge this into ~/.codeium/windsurf/mcp_config.json, then refresh MCP in Cascade. Windsurf remote servers use serverUrl, not url.
Windsurf configuration
{
  "mcpServers": {
    "factur-x-mcp": {
      "serverUrl": "https://facturx.orvel.dev/mcp"
    }
  }
}

Let your agent find its tools

Find servers like Factur-X MCP from your agent. Add Koskamo once to search the index for endpoints, access requirements, and client setup. Public discovery needs no key.

Do you run Factur-X MCP?

Prove ownership with a DNS record, a well-known file, or your Official MCP Registry entry, and your edits publish immediately. Proofs are re-checked weekly; admins can still hide or remove a listing.

Claim this listing