{"openapi":"3.1.0","info":{"title":"e-invoice conversion API","version":"1.0.0","description":"Convert CSV, Excel, UBL, CII, ZUGFeRD/Factur-X PDF, EDIFACT and several national\nformats into Peppol BIS 3.0, XRechnung, Factur-X, plain UBL and country profiles —\nand send the result over the Peppol network.\n\nValidation results are never softened: a document that fails XSD or Schematron comes\nback as 422 with every rule that fired, and is not returned as if it were valid.\n\n## Authentication\n\nOne API key per account, created in the account area, shaped `ek_live_<32 hex>`.\nSend it as `X-API-Key: ek_live_…`; `Authorization: Bearer ek_live_…` is accepted\nfor clients that only speak Bearer. Do not put the key in a URL — it lands in\nproxy logs, browser history and `Referer` headers, and a rotation cannot reach it\nthere.\n\nThe three endpoints under **Service** need no key, so you can read this reference,\ncheck `/v1/formats` and health-check the API before signing up.\n\n## Your first call\n\n```bash\ncurl -X POST https://api.fiscalspan.com/v1/convert \\\n  -H \"X-API-Key: ek_live_…\" \\\n  -F \"file=@invoice.csv\" \\\n  -F \"format=csv\" \\\n  -o invoice.xml\n```\n\n`format` is mandatory. **The country you have active decides the format; the buyer is\nnot checked.** Send `country=` (one of your active countries) to get that country's\nformat, or `profile=` for a specific format of an active country. Without either, the\nbuyer's country is used when it is active, else the seller's, else your only active\ncountry. `GET /v1/formats` lists the ids this deployment accepts; `GET /v1/countries`\nlists the countries and the format behind each.\n\nA CSV (and an Excel sheet saved as text) is read as UTF-8, or as UTF-16 when it starts\nwith a byte order mark. Any other file is refused with a 422 `fail_parse` that names the\nline and column of the first byte that is not UTF-8. Nothing is guessed from a code\npage. In Excel, save as \"CSV UTF-8 (Comma delimited)\".\n\n## What comes back\n\nDocument endpoints answer with **the document itself as the response body**, not a\nJSON envelope around it: `application/xml` (or `application/pdf` for a Factur-X\ncontainer). The metadata rides in response headers — `X-Request-Id`, `X-Profile`,\n`X-Invoice-Number`, `X-Document-Id`, `X-Elapsed-Ms`, `X-Validation-Warnings` — so\nthe body can be streamed straight to a file. `/v1/batch` and `/v1/convert-multi`\nanswer with a ZIP holding one document per invoice plus `_manifest.json`.\n\n`X-Invoice-Number` and `X-Document-Id` carry your document's own text, and a header\ncarries bytes. A value made of printable ASCII arrives as it is. Any other value (Č, °,\nan emoji, a line break, a space at either end) arrives as an RFC 8187 ext-value:\n`UTF-8''` followed by the UTF-8 bytes, percent-encoded, so `RAČUN-1` arrives as\n`UTF-8''RA%C4%8CUN-1`. Decode a value that starts with `UTF-8''` and take any other\nas it is. `Content-Disposition` follows RFC 6266: an ASCII `filename` first, then the\nexact name in `filename*` whenever the two differ.\n\nEndpoints that return data rather than a document (`/v1/formats`, `/v1/send`,\nthe Peppol status and lookup calls, everything under France) answer JSON.\n\n## When it fails\n\nEvery failure is the same JSON envelope, whatever produced it:\n\n```json\n{\n  \"error\": \"VALIDATION_FAILED\",\n  \"code\": \"fail_schematron\",\n  \"message\": \"The document failed Peppol BIS 3.0 validation.\",\n  \"request_id\": \"3f0c…\",\n  \"errors\": [\"[BR-CO-10] Sum of Invoice line net amount must equal …\"],\n  \"error_codes\": [\"BR-CO-10\"]\n}\n```\n\nBranch on `code`, never on `message` — codes are stable, messages are wording.\nThe ones an integration has to handle:\n\n| HTTP | `code` | Meaning |\n|------|--------|---------|\n| 400 | `fail_format_invalid`, `fail_profile_invalid`, `fail_file_required` | The request is wrong. Fix and retry. |\n| 400 | `fail_body_invalid_json`, `fail_body_unreadable` | The JSON body could not be read. The message names the line and column, never your data. |\n| 401 | `fail_api_key_missing` | No key on the request. |\n| 403 | `fail_api_key_invalid` | Key unknown, revoked — or the key service was unreachable. Auth fails closed. |\n| 403 | `fail_country_disabled` | The `country` you sent is not active for this account (`details.country`), or no country is active at all. Envelope `error: FORBIDDEN`. |\n| 403 | `fail_profile_disabled` | An explicit `profile` belongs to no country active on this account (or, with `country`, not to that country). |\n| 422 | `fail_country_unknown` | Several countries are active, no `country` / `profile` was sent, and neither the buyer's nor the seller's country is one of them: send `country=`. Never guessed. |\n| 422 | `fail_country_unsupported` | The `country` you sent is not in the catalog (`GET /v1/countries`). Both country 422s carry the envelope `error: COUNTRY_INVALID`. |\n| 403 | `fail_erp_connector_disabled` | That ERP connector is not enabled for this account. |\n| 403 | `fail_feature_disabled` | A billable module (`fr-lifecycle`, `fr-ereporting`) is not enabled. |\n| 403 | `fail_key_send_only`, `fail_group_key_route_unsupported` | A store key or a group key on an endpoint it may not call (see \"Group and store keys\"). |\n| 400 | `fail_firm_required` | A group key could not tell which firm: send `firm`. |\n| 422 | `fail_firm_unknown`, `fail_store_unknown` | No firm of the group (or no store of that firm) matches. |\n| 409 | `fail_firm_seller_mismatch`, `fail_seller_vat_mismatch` | The seller's VAT number (BT-31) is another firm's than `firm`, or than the store key's. Nothing was sent. |\n| 422 | `fail_seller_vat_missing` | A store key's document carries no seller VAT number (BT-31). |\n| 403 | `fail_firm_inactive` | The group's firm is deactivated. |\n| 503 | `fail_firm_route_unavailable` | The firm of a group-key request cannot be determined right now. Nothing was done; retry. |\n| 409 | `fail_duplicate_document`, `fail_duplicate_in_progress` | `POST /v1/send` with a key of a group firm: the firm already sent this invoice / credit note number in this issue year (`details.first_document_id`), or is sending it right now. Nothing was sent. |\n| 503 | `fail_duplicate_check_unavailable` | Whether the document number was already sent cannot be checked right now. Nothing was sent; retry. |\n| 413 | `fail_file_too_large` | Over the upload ceiling (50 MB per file by default). |\n| 413 | `fail_body_too_large` | A JSON body over 1 MB. Send large documents as a multipart upload. |\n| 415 | `fail_body_unsupported_encoding` | JSON must be UTF-8, uncompressed or gzip / deflate / br. |\n| 422 | `fail_xsd`, `fail_schematron`, `fail_validation` | The document was built but is not valid. `errors` / `error_codes` list every rule that fired. Nothing was sent. |\n| 422 | `fail_body_too_deep` | A JSON body nested deeper than 100 levels. |\n| 422 | `fail_payment_means_unsupported` | The output format has no equivalent for the payment means code (BT-81), e.g. FatturaPA for 69, 98 or Z01–Z08. Use another code or another profile. |\n| 422 | `fail_tax_category_unsupported` | The output format has no equivalent for a VAT category code (BT-151 / BT-118), e.g. FatturaPA for O, L or M (no Natura). Use another category or another profile. |\n| 429 | `fail_rate_limited` | Burst limit. Retry after `Retry-After` seconds. |\n| 429 | `fail_quota_exceeded` | The account's usage tier is spent. No document was produced; nothing is billed. |\n| 500 | `fail_internal` | Ours. Quote `request_id`. |\n\nA 422 is a finding about your data, not an outage: retrying the same bytes returns\nthe same 422. Fix the invoice, or the mapping that produced it.\n\n### Why it failed — `diagnostics`\n\nValidation and parse failures also carry `diagnostics` (and `kb_version`): the\nrules that fired, grouped by CAUSE, with where the value comes from in your input\n(an IDoc field such as `E1EDKA1[PARVW=RS].STCEG`, a CSV column, an XPath in your own\nfile), the likely root cause, the fix, and `fix_location` — `master_data` (fix once,\nevery later invoice passes), `document`, `mapping`, `routing` (use another profile)\nor `platform` (not fixable on your side). Text in `lang=en|de|hr` (or\nAccept-Language); `diagnostics=false` switches them off. They are additive:\n`errors` and `error_codes` keep their exact form. On `/v1/erp/*` each failed\ndocument carries its own; in batch ZIPs they are in the manifest.\n\n## Entitlements\n\nYou buy **countries**, not formats. Each country (`GET /v1/countries`) has one format\nbehind it, e.g. Germany — Peppol, Croatia — eRačun (HR CIUS). The countries your\naccount has active are the products you may use: **the country you have active decides\nthe format; the buyer is not checked.** A Croatia-only account may invoice a German,\na Serbian or any other buyer, over Peppol or not; the document is counted under\nCroatia. Which active country a document is produced for:\n- `country=XX` — that country (403 `fail_country_disabled` if it is not active, 422\n  `fail_country_unsupported` if it is not in the catalog), in its own format\n  (`/v1/send`: its sending format, EHF for Norway); nothing is switched cross-border.\n- `profile=` alone — the profile must belong to the family of one of your active\n  countries (403 `fail_profile_disabled`), so existing integrations that send\n  `profile=` keep their output byte for byte. It is counted under the buyer's\n  country when that is active and has the profile, else your first such country.\n- neither — the buyer's country (address BT-55, else VAT prefix, else on `/v1/send`\n  the receiver's Peppol scheme) if it is active, else the seller's country if active,\n  else your only active country; its domestic format when the seller is in it, Peppol\n  BIS otherwise. With several countries active and none of them named: 422\n  `fail_country_unknown` — send `country=`.\nIn a batch, a multi-upload or an ERP push each document is decided on its own; a\n`country` or `profile` no document could get refuses the whole request.\nPeppol BIS (`peppol-bis-3`) and plain UBL belong to the family of every country: Peppol\nBIS is the cross-border format. ERP pushes and e-mails with neither `profile` nor\n`country` keep Peppol BIS, as before (any active country entitles them).\nOrders, responses, catalogues and logistics documents need any active country.\nERP connectors and the France modules are enabled per account and default to off.\nAn endpoint you are not entitled to answers 403 with the code above rather than\nproducing a document — treat those 403s as \"ask us to enable it\", not as a bug.\n\n## Group and store keys\n\nA group (one customer with several firms) has two more kinds of key besides each\nfirm's own `ek_live_` key:\n- a **store key** (`ek_live_…`, one per store of a firm) sends and validates that\n  firm's own invoices and credit notes and reads their status: `POST /v1/send`,\n  `POST /v1/validate`, `GET /v1/peppol/status/{documentId}`, `GET /v1/peppol/lookup`.\n  Anything else is 403 `fail_key_send_only`. Its document must carry the seller's\n  VAT number (BT-31; else 422 `fail_seller_vat_missing`) and it must be the firm's\n  (else 409 `fail_seller_vat_mismatch`). A document that cannot be read at all names\n  no seller: `POST /v1/validate` answers it with its validation report, exactly as\n  for the firm's own key.\n- the **group key** (`gk_live_…`, for the central ERP) acts for any firm of the group:\n  `POST /v1/send`, `POST /v1/convert`, `POST /v1/validate`, the status and the lookup\n  (anything else is 403 `fail_group_key_route_unsupported`). Each request is for ONE\n  firm: `firm` (its id or code), or — for an invoice — the seller's VAT number\n  (BT-31) finds it (a document that cannot be read names none: `POST /v1/validate`\n  then needs `firm`); `store` counts the document under one of the firm's stores. A\n  status call needs neither: the document names its firm. From there on everything\n  is that firm's — its countries and format, its Peppol registration, usage and\n  billing, idempotency keys.\nWith a store or group key, the seller's electronic address in an invoice (BT-34) must\nbe the firm's own registered Peppol identity; another one is 409\n`fail_peppol_sender_mismatch` and nothing is sent.\nEvery key of a group firm — its own, its stores', the group key acting for it — sends an\ninvoice or credit note number once per issue year: a second send of the same number is\n409 `fail_duplicate_document` (see \"Duplicate protection\" on `POST /v1/send`).\n\n## Limits\n\n50 MB per file and 20 files per multi-upload by default; 120 requests per minute\nper key and 300 per minute per IP, reported on every response as `RateLimit-Limit`,\n`RateLimit-Remaining` and `RateLimit-Reset`. The burst limit is separate from the\nbilling quota: the first is per process and resets each minute, the second is your\nusage tier and is counted per processed document across all your keys.\n\n## Support\n\nEvery response carries `X-Request-Id`, and every error envelope repeats it as\n`request_id`. Quote it — it is the correlation handle for our side of the call.","contact":{"name":"Support","url":"https://fiscalspan.com"}},"servers":[{"url":"https://api.fiscalspan.com","description":"Production"},{"url":"http://localhost:3000","description":"Local development"}],"tags":[{"name":"Service","description":"Health, capability discovery and this reference — no API key needed."},{"name":"Convert","description":"Invoice conversion. Start here."},{"name":"Procurement","description":"Orders, catalogues and response documents."},{"name":"Logistics","description":"Peppol Logistics 1.3.1 transport documents."},{"name":"Peppol","description":"Sending and tracking over the Peppol network."},{"name":"ERP","description":"Push endpoints for ERP-native payloads."},{"name":"France","description":"Facturation électronique 2026: lifecycle statuses (cycle de vie) and e-reporting. Billable modules, enabled per account — 403 `fail_feature_disabled` until then."},{"name":"Callbacks","description":"Called BY a provider or an operator, never by an integrating client. Listed for completeness — no integration needs to implement these."}],"components":{"securitySchemes":{"ApiKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"},"ServiceToken":{"type":"apiKey","in":"header","name":"X-Service-Token"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","description":"Error class, e.g. BAD_REQUEST, VALIDATION_FAILED, FORBIDDEN (403: an entitlement — `fail_country_disabled`, `fail_profile_disabled`, …) or COUNTRY_INVALID (422: which of your countries applies could not be settled — `fail_country_unknown`, `fail_country_unsupported`)."},"code":{"type":"string","description":"Stable machine-readable failure code, e.g. `fail_format_invalid`."},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true,"description":"Country refusals: `country` (the requested country that is not active, or not in the catalog); `profile` (403 `fail_profile_disabled`)."},"request_id":{"type":"string","description":"Echo this when contacting support."},"errors":{"type":"array","items":{"type":"string"},"description":"Validation only: every rule that fired."},"error_codes":{"type":"array","items":{"type":"string"},"description":"Validation only: the rule ids (BR-…, PEPPOL-EN16931-…)."},"warnings":{"type":"array","items":{"type":"string"},"description":"Validation only: non-fatal findings."},"diagnostics":{"type":"array","items":{"$ref":"#/components/schemas/Diagnostic"},"description":"Validation and parse failures: WHY it failed, grouped by cause — see the Diagnostic schema. Off with `diagnostics=false`; language via `lang` (en | de | hr) or Accept-Language."},"kb_version":{"type":"string","description":"Version of the knowledge base that produced `diagnostics` (same document + same version = same answer)."}},"required":["error","message"]},"ValidationReport":{"type":"object","properties":{"valid":{"type":"boolean","description":"True only when both XSD and Schematron passed."},"profile":{"type":"string","description":"The rule set the document was checked against."},"detected_format":{"type":["string","null"],"description":"Input format recognised from the root element (ubl, cii, fatturapa, facturae, ksef-fa3, mydata, eslog); null when unrecognised."},"national_rules_applied":{"type":"boolean","description":"False when the document could not be parsed — the structural check still ran, the country rules did not."},"xsd_ok":{"type":"boolean"},"schematron_ok":{"type":"boolean"},"rule_set_version":{"type":"string","description":"Present only for profiles whose rule set is code rather than a Schematron artefact — mk-ujp reports the UJP pilot-phase structure it targets (e.g. pilot-phase-3-2026-06), since UJP has changed the JSON between phases."},"errors":{"type":"array","items":{"type":"string"},"description":"Every fatal finding, as reported by the rule set."},"error_codes":{"type":"array","items":{"type":"string"},"description":"The rule ids extracted from errors (e.g. BR-CO-15, PEPPOL-EN16931-R046)."},"warnings":{"type":"array","items":{"type":"string"}},"diagnostics":{"type":"array","items":{"$ref":"#/components/schemas/Diagnostic"},"description":"Why, grouped by cause, with the location in YOUR document. Also present on a valid document when a warning has a known cause."},"kb_version":{"type":"string"},"request_id":{"type":"string"},"elapsed_ms":{"type":"integer"}},"required":["valid","profile","xsd_ok","schematron_ok","errors","warnings"]},"Diagnostic":{"type":"object","description":"One cause. Several rule findings that share a cause (e.g. BR-S-02, BR-S-03 and BR-Z-02 all saying \"the seller has no VAT id\") form ONE diagnostic; every fatal rule id in `error_codes` appears in exactly one diagnostic. `diagnosis` is null when no knowledge-base entry covers the rule yet — the explanation then quotes the rule's official text.","properties":{"diagnosis":{"type":["string","null"],"description":"Knowledge-base entry id, e.g. `seller-vat-id-missing.sap`."},"symptom":{"type":["string","null"],"description":"What is wrong, independent of ruleset, e.g. `buyer-reference-missing` (= PEPPOL-EN16931-R003 ∪ DE-R-015 ∪ BR-DE-15)."},"severity":{"type":"string","enum":["fatal","warning"]},"terms":{"type":"array","items":{"type":"string"},"description":"EN 16931 business terms involved (BT-10, BT-31 …)."},"findings":{"type":"array","items":{"type":"object","properties":{"rule":{"type":"string"},"ruleset":{"type":"string","description":"`ruleset@version` of the artefact that fired it, e.g. `peppol-bis-billing@3.0.21` — the ruleset alone (`en16931-ubl`) when the bundled artefact records no version."},"location":{"type":"string","description":"The rule's CONTEXT node (normalized XPath). For \"X is missing\" rules this is the parent or the document root, not the missing element."},"message":{"type":"string"}},"required":["rule","message"]}},"source":{"type":"object","description":"Where the involved term is read from in YOUR input: an IDoc segment/field (`E1EDKA1[PARVW=RS].STCEG`), a CSV column (`seller_vat_id`) or an XPath in your own document. Absent when the finding does not tie to one field for certain (for example a country code whose party the rule does not name) — it is never a guess.","properties":{"connector":{"type":"string"},"path":{"type":"string"},"alternatives":{"type":"array","items":{"type":"string"}},"present":{"type":"boolean"},"value":{"type":"string"},"instance":{"type":"string"},"seen":{"type":"string"}},"required":["connector","path"]},"subject":{"type":"object","properties":{"kind":{"type":"string","enum":["seller","buyer","line","document","setup"]},"label":{"type":"string"}},"required":["kind"]},"line":{"type":"object","properties":{"index":{"type":"integer"},"id":{"type":"string"}}},"explanation":{"type":"string"},"root_cause":{"type":"string"},"fix":{"type":"string"},"fix_location":{"type":"string","enum":["master_data","document","mapping","routing","platform"],"description":"`platform` = not fixable on your side (a format limit or a gap of this service)."},"lang":{"type":"string","enum":["en","de","hr"]},"kb":{"type":"object","properties":{"version":{"type":"string"},"review":{"type":"string","enum":["verified","reviewed","none"]}},"required":["version","review"]},"recurrence":{"type":"object","description":"Other documents of yours with the same diagnosis for the same subject in the last 30 days (absent when unknown).","properties":{"documents_30d":{"type":"integer"},"first_seen":{"type":"string"},"last_seen":{"type":"string"}},"required":["documents_30d"]}},"required":["diagnosis","symptom","severity","terms","findings","explanation","lang","kb"]}}},"paths":{"/health":{"get":{"operationId":"getHealth","summary":"Liveness and version","tags":["Service"],"security":[],"responses":{"200":{"description":"The service is up.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","examples":["ok"]},"version":{"type":"string"},"uptime":{"type":"integer","description":"Seconds since start."}}}}}}}}},"/openapi.json":{"get":{"operationId":"getOpenApiDocument","summary":"This document","description":"The machine-readable source of this reference — feed it to openapi-generator, Postman or your editor's HTTP client. `operationId` is stable across releases, so generated method names do not churn.","tags":["Service"],"security":[],"responses":{"200":{"description":"The OpenAPI description of this API.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/docs":{"get":{"operationId":"getApiReference","summary":"This reference, rendered","description":"Swagger UI over `/openapi.json`. The page you are most likely reading right now.","tags":["Service"],"security":[],"responses":{"200":{"description":"The API reference page.","content":{"text/html":{"schema":{"type":"string"}}}},"404":{"description":"The reference is switched off on this deployment (DOCS_DISABLED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/docs/{asset}":{"get":{"operationId":"getApiReferenceAsset","summary":"Static assets of the reference page","description":"Serves the allow-listed Swagger UI assets. Documented because it is a registered route, not because an integration should call it.","tags":["Service"],"security":[],"parameters":[{"name":"asset","in":"path","required":true,"schema":{"type":"string","enum":["swagger-ui.css","swagger-ui-bundle.js","theme.css","init.js","favicon-32x32.png","favicon-16x16.png"]}}],"responses":{"200":{"description":"The asset."},"404":{"description":"Not an allow-listed asset name.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/formats":{"get":{"operationId":"listFormatsAndProfiles","summary":"Supported input formats and output profiles","description":"The authoritative list — every id accepted by `format` and `profile`, the registered ERP connectors, and `countries` (the same catalog as GET /v1/countries).","tags":["Service"],"security":[],"responses":{"200":{"description":"Capability list.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/countries":{"get":{"operationId":"listCountries","summary":"Country catalog — what an account buys","description":"Every country that can be activated, with the format behind it: `profile` (domestic), `variants` (other formats of the same country you may request with `profile=`), `sendProfile` (what /v1/send transmits), `label` and `status` (`live`, `progress`, `planned`, `convert` = conversion only). Only a listed country can be activated or sent as `country` (else `fail_country_unsupported`); a BUYER in a country not listed here is fine — the buyer is not checked.","tags":["Service"],"security":[],"responses":{"200":{"description":"The catalog.","content":{"application/json":{"schema":{"type":"object","properties":{"countries":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","examples":["DE"]},"name":{"type":"string","examples":["Germany"]},"profile":{"type":"string","examples":["peppol-bis-3"]},"label":{"type":"string","examples":["Peppol"]},"variants":{"type":"array","items":{"type":"string"}},"sendProfile":{"type":"string","examples":["peppol-bis-3"]},"status":{"type":"string","enum":["live","progress","planned","convert"]}},"required":["code","name","profile","label","variants","sendProfile","status"]}}},"required":["countries"]}}}}}}},"/v1/convert":{"post":{"operationId":"convertInvoice","summary":"Convert one invoice","description":"Upload a source document and get the document back in the format of your active country (`country`, or the one the document settles) or the requested profile.\n\nA ZUGFeRD / Factur-X PDF goes in the `pdf_file` field with `format=cii`;\n`attachments` carries up to 10 BG-24 supporting documents (PDF, PNG, JPEG,\nCSV, XLSX, ODS). Attachments on a profile that cannot carry them are a 400,\nnever a silent drop.\n\nWith `profile=facturx-en16931`, `output=pdf` (or uploading a `base_pdf`)\nreturns the complete Factur-X container: PDF/A-3 with the validated CII\nembedded. Upload your own visual layer as `base_pdf`, or omit it to get a\nneutral server-rendered invoice layout. Note: the server-rendered base\ntargets Factur-X validators; a caller who must pass a strict veraPDF\nPDF/A-3 gate should supply their own conformant `base_pdf`.","tags":["Convert"],"security":[{"ApiKeyHeader":[]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"Source document."},"pdf_file":{"type":"string","format":"binary","description":"ZUGFeRD / Factur-X PDF (with format=cii)."},"base_pdf":{"type":"string","format":"binary","description":"Factur-X visual layer — implies output=pdf (facturx-en16931 only)."},"output":{"type":"string","description":"\"pdf\" returns the Factur-X PDF/A-3 container instead of bare XML (facturx-en16931 only)."},"attachments":{"type":"array","items":{"type":"string","format":"binary"},"description":"BG-24 supporting documents (max 10)."},"format":{"type":"string","description":"Input format id from /v1/formats.","examples":["csv"]},"profile":{"type":"string","description":"Optional output profile id from /v1/formats. Without it your active country decides per document (`country`, else the buyer's country if active, else the seller's, else your only active country: its domestic format, or Peppol BIS cross-border — GET /v1/countries). An explicit profile must belong to an active country's family (403 `fail_profile_disabled`); the buyer is not checked.","examples":["peppol-bis-3"]},"country":{"type":"string","description":"Optional ISO 3166-1 alpha-2 code of one of YOUR active countries (`EL` = GR, `XI` = GB): the document is produced in that country's format (`profile` in GET /v1/countries; on /v1/send its `sendProfile`) and counted under it — nothing else is switched, whatever the parties are (country=IT gives FatturaPA). The country you have active decides the format; the buyer on the document is not checked, so a buyer in any country — inside the catalog or not — is fine. Not active → 403 `fail_country_disabled`; not in the catalog → 422 `fail_country_unsupported`. With `profile` too, the profile must belong to that country's family (403 `fail_profile_disabled`). Without `country` and `profile`: the buyer's country if it is active, else the seller's if active, else your only active country; with several active and none of them named → 422 `fail_country_unknown` (send `country`).","examples":["DE"]},"locale":{"type":"string","description":"Number/decimal locale of the source data.","default":"en-US"},"date_format":{"type":"string","description":"Date format of the source data.","default":"YYYY-MM-DD"},"validate":{"type":"string","description":"Set to \"false\" to skip XSD/Schematron validation.","default":"true"},"mapping":{"type":"string","description":"JSON field mapping — required for format=legacy-xml."},"firm":{"type":"string","description":"Group keys only (`gk_live_…`; ignored for every other key): the firm of your group this request is for — the firm's id or its code (the ERP company code, case-insensitive). An invoice may leave it out when it carries the seller's VAT number (BT-31): the group's firm with that VAT number is used; with both, they must name the same firm (409 `fail_firm_seller_mismatch`). Other document types and the lookup need it. Neither → 400 `fail_firm_required`; no such firm → 422 `fail_firm_unknown`; a deactivated firm → 403 `fail_firm_inactive`. From there on the request is that firm's: its countries and format, its Peppol registration, its usage and billing.","examples":["1000"]},"store":{"type":"string","description":"Group keys only: one of the firm's stores — the store key's id or the store's name (case-insensitive) — that the document is counted under. Not an active store of that firm → 422 `fail_store_unknown`."}},"required":["file","format"]}}}},"responses":{"200":{"description":"The generated document: XML by default; the Factur-X PDF/A-3 container with output=pdf; for profile=mk-ujp the UJP JSON document (North Macedonia's clearance format is JSON, not XML). Metadata travels in X-Invoice-Number / X-Profile / X-Country / X-Request-Id headers.","headers":{"X-Country":{"schema":{"type":"string"},"description":"The active country the document was produced and counted under (ISO 3166-1 alpha-2) — never a check of the buyer."},"X-Invoice-Number":{"schema":{"type":"string"},"description":"BT-1: as it is when it is printable ASCII, otherwise an RFC 8187 ext-value (`UTF-8''RA%C4%8CUN-1` for `RAČUN-1`)."},"Content-Disposition":{"schema":{"type":"string"},"description":"`attachment; filename=\"invoice-…\"` with an ASCII name, then `filename*=UTF-8''…` with the exact name whenever the two differ (RFC 6266)."}},"content":{"application/xml":{"schema":{"type":"string"}},"application/pdf":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"type":"object","description":"UJP e-Faktura document (profile=mk-ujp only) — unsigned; JWS and submission are the transmission stage."}}}},"400":{"description":"Invalid input — missing file, unknown format/profile, or unparseable source data. With a group key: neither `firm` nor a seller VAT number (BT-31) tells which firm (`fail_firm_required`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing API key (code `fail_api_key_missing`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Invalid or revoked API key (also returned when the key service is unreachable — auth fails closed), OR the `country` you asked for is not active for this account, or none is (code `fail_country_disabled`, envelope `error: FORBIDDEN`, `details.country` — countries are the billable entitlement, activated per account; see Entitlements), OR an explicit `profile` belongs to no active country (code `fail_profile_disabled`), OR a store key on an endpoint other than /v1/send, /v1/validate, /v1/peppol/status and /v1/peppol/lookup (code `fail_key_send_only`), a group key on an endpoint it does not support — it may call those four and /v1/convert (code `fail_group_key_route_unsupported`) — or a group key's firm is deactivated (code `fail_firm_inactive`). See \"Group and store keys\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"With a group key: the seller's VAT number (BT-31) is not the VAT number of the firm named by `firm` (`fail_firm_seller_mismatch`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The document was built but failed XSD or Schematron validation (the response lists every rule that fired), OR which of your countries applies could not be settled (envelope `error: COUNTRY_INVALID`): `fail_country_unknown` (several countries active, no `country` / `profile` sent, and neither the buyer's nor the seller's country is one of them), `fail_country_unsupported` (`country` is not a catalog country). With a group key: no firm of the group matches `firm` or the seller's VAT number (`fail_firm_unknown`), or `store` is not an active store of that firm (`fail_store_unknown`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage-tier limit reached (code `fail_quota_exceeded`) or the per-minute burst limit (code `fail_rate_limited`, with Retry-After). No document is produced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"With a group key: the firm the request belongs to cannot be determined right now (`fail_firm_route_unavailable`). Nothing was done; retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/validate":{"post":{"operationId":"validateDocument","summary":"Validate a document you already have","description":"Upload a FINISHED e-invoice — Peppol BIS UBL, Factur-X / ZUGFeRD CII (XML or\nPDF), XRechnung, a national CIUS — and get the rule findings back. Nothing is\nconverted and no document is produced: this answers for YOUR file, where\n`/v1/convert` answers for the one we generated from your source data.\n\n`profile` names the RULE SET to check against, not an output format. The input\nformat is recognised from the document itself, so no `format` parameter is needed.\nWithout `profile` your active country chooses the rule set (`country`, else the\nbuyer's country if active, else the seller's, else your only one), in the\ndocument's own syntax (France as UBL → peppol-bis-3, Germany as CII →\nfacturx-en16931). The buyer is not checked.\n\n`mk-ujp` (North Macedonia UJP e-Faktura, BETA — pending the official UJP\nspecification; aliases `mk`, `mk-efaktura`) has no XSD and no Schematron: the\nMK-R-* rules run over the EN 16931 model, so upload the UBL representation of\nthe invoice. Only CONFIRMED rules and the arithmetic identities are errors;\nevery ASSUMED rule is a warning, and `rule_set_version` names the UJP pilot\nstructure the check targets. `MK-I-001` is emitted only when the document passes.\n\nA valid document is 200 with the report; a failing one is 422 with the same\nreport plus an error envelope. Note `national_rules_applied`: country rules run\nagainst the parsed model, so a document we cannot parse is still checked\nstructurally but reports false there — never read that case as a full pass.\n\nPassing is not a promise of delivery: it says the file conforms, not that the\nreceiver is registered for that document type. Check the receiver separately.","tags":["Convert"],"security":[{"ApiKeyHeader":[]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"The finished e-invoice (XML, or a ZUGFeRD / Factur-X PDF)."},"pdf_file":{"type":"string","format":"binary","description":"Alias for file, for a ZUGFeRD / Factur-X PDF."},"profile":{"type":"string","description":"Optional rule set to validate against — a profile id from /v1/formats (without it your active country chooses). It must belong to an active country's family, or to the family of `country` when that is sent (403 `fail_profile_disabled`). The buyer is not checked.","examples":["peppol-bis-3"]},"country":{"type":"string","description":"Optional ISO 3166-1 alpha-2 code of one of YOUR active countries (`EL` = GR, `XI` = GB): the document is produced in that country's format (`profile` in GET /v1/countries; on /v1/send its `sendProfile`) and counted under it — nothing else is switched, whatever the parties are (country=IT gives FatturaPA). The country you have active decides the format; the buyer on the document is not checked, so a buyer in any country — inside the catalog or not — is fine. Not active → 403 `fail_country_disabled`; not in the catalog → 422 `fail_country_unsupported`. With `profile` too, the profile must belong to that country's family (403 `fail_profile_disabled`). Without `country` and `profile`: the buyer's country if it is active, else the seller's if active, else your only active country; with several active and none of them named → 422 `fail_country_unknown` (send `country`).","examples":["DE"]},"locale":{"type":"string","description":"Number/decimal locale, used only for the parse that unlocks the national rules.","default":"en-US"},"date_format":{"type":"string","description":"Date format, used only for the parse that unlocks the national rules.","default":"YYYY-MM-DD"},"firm":{"type":"string","description":"Group keys only (`gk_live_…`; ignored for every other key): the firm of your group this request is for — the firm's id or its code (the ERP company code, case-insensitive). An invoice may leave it out when it carries the seller's VAT number (BT-31): the group's firm with that VAT number is used; with both, they must name the same firm (409 `fail_firm_seller_mismatch`). Other document types and the lookup need it. Neither → 400 `fail_firm_required`; no such firm → 422 `fail_firm_unknown`; a deactivated firm → 403 `fail_firm_inactive`. From there on the request is that firm's: its countries and format, its Peppol registration, its usage and billing.","examples":["1000"]},"store":{"type":"string","description":"Group keys only: one of the firm's stores — the store key's id or the store's name (case-insensitive) — that the document is counted under. Not an active store of that firm → 422 `fail_store_unknown`."}},"required":["file"]}}}},"responses":{"200":{"description":"The document passed every rule for the requested profile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationReport"}}}},"400":{"description":"Invalid input — missing file, unknown format/profile, or unparseable source data. With a group key: neither `firm` nor a seller VAT number (BT-31) tells which firm (`fail_firm_required`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing API key (code `fail_api_key_missing`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Invalid or revoked API key (also returned when the key service is unreachable — auth fails closed), OR the `country` you asked for is not active for this account, or none is (code `fail_country_disabled`, envelope `error: FORBIDDEN`, `details.country` — countries are the billable entitlement, activated per account; see Entitlements), OR an explicit `profile` belongs to no active country (code `fail_profile_disabled`), OR a store key on an endpoint other than /v1/send, /v1/validate, /v1/peppol/status and /v1/peppol/lookup (code `fail_key_send_only`), a group key on an endpoint it does not support — it may call those four and /v1/convert (code `fail_group_key_route_unsupported`) — or a group key's firm is deactivated (code `fail_firm_inactive`). See \"Group and store keys\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"With a group key: the seller's VAT number (BT-31) is not the VAT number of the firm named by `firm` (`fail_firm_seller_mismatch`). With a store key: the seller's VAT number is not the store's firm (`fail_seller_vat_mismatch`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The document was built but failed XSD or Schematron validation (the response lists every rule that fired), OR which of your countries applies could not be settled (envelope `error: COUNTRY_INVALID`): `fail_country_unknown` (several countries active, no `country` / `profile` sent, and neither the buyer's nor the seller's country is one of them), `fail_country_unsupported` (`country` is not a catalog country). With a group key: no firm of the group matches `firm` or the seller's VAT number (`fail_firm_unknown`), or `store` is not an active store of that firm (`fail_store_unknown`). With a store key: the document carries no seller VAT number, BT-31 (`fail_seller_vat_missing`) — a store key handles only its own firm's invoices and credit notes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage-tier limit reached (code `fail_quota_exceeded`) or the per-minute burst limit (code `fail_rate_limited`, with Retry-After). No document is produced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"With a group key: the firm the request belongs to cannot be determined right now (`fail_firm_route_unavailable`). Nothing was done; retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/batch":{"post":{"operationId":"convertBatch","summary":"Convert every invoice in one file","description":"A CSV or Excel file holding several invoices (a new invoice starts wherever\n`invoice_number` is non-empty). A failure in one invoice does not stop the others.\n\nThe response is a ZIP: one XML per invoice plus `_manifest.json` describing what\nsucceeded and what failed.","tags":["Convert"],"security":[{"ApiKeyHeader":[]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"profile":{"type":"string","description":"Optional output profile id from /v1/formats. Without it your active country decides per document (`country`, else the buyer's country if active, else the seller's, else your only active country: its domestic format, or Peppol BIS cross-border — GET /v1/countries). An explicit profile must belong to an active country's family (403 `fail_profile_disabled`); the buyer is not checked. Decided per document (a document whose country cannot be settled fails alone, `code: fail_country_unknown`); a `country` / `profile` no document could get refuses the request (403)."},"country":{"type":"string","description":"Optional ISO 3166-1 alpha-2 code of one of YOUR active countries (`EL` = GR, `XI` = GB): the document is produced in that country's format (`profile` in GET /v1/countries; on /v1/send its `sendProfile`) and counted under it — nothing else is switched, whatever the parties are (country=IT gives FatturaPA). The country you have active decides the format; the buyer on the document is not checked, so a buyer in any country — inside the catalog or not — is fine. Not active → 403 `fail_country_disabled`; not in the catalog → 422 `fail_country_unsupported`. With `profile` too, the profile must belong to that country's family (403 `fail_profile_disabled`). Without `country` and `profile`: the buyer's country if it is active, else the seller's if active, else your only active country; with several active and none of them named → 422 `fail_country_unknown` (send `country`).","examples":["DE"]},"locale":{"type":"string","default":"en-US"},"date_format":{"type":"string","default":"YYYY-MM-DD"},"validate":{"type":"string","default":"true"}},"required":["file"]}}}},"responses":{"200":{"description":"ZIP archive: one XML per invoice plus `_manifest.json`.","content":{"application/zip":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid input — missing file, unknown format/profile, or unparseable source data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing API key (code `fail_api_key_missing`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Invalid or revoked API key (also returned when the key service is unreachable — auth fails closed), OR the `country` you asked for is not active for this account, or none is (code `fail_country_disabled`, envelope `error: FORBIDDEN`, `details.country` — countries are the billable entitlement, activated per account; see Entitlements), OR an explicit `profile` belongs to no active country (code `fail_profile_disabled`), OR a store key on an endpoint other than /v1/send, /v1/validate, /v1/peppol/status and /v1/peppol/lookup (code `fail_key_send_only`), a group key on an endpoint it does not support — it may call those four and /v1/convert (code `fail_group_key_route_unsupported`) — or a group key's firm is deactivated (code `fail_firm_inactive`). See \"Group and store keys\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The file held no invoices (code `fail_no_invoices`), or the source data could not be parsed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage-tier limit reached (code `fail_quota_exceeded`) or the per-minute burst limit (code `fail_rate_limited`, with Retry-After). No document is produced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/convert-multi":{"post":{"operationId":"convertMultipleFiles","summary":"Convert several uploaded files at once","description":"Multiple CSV files in one request (`files`). Returns a ZIP of the generated XML plus a `summary.json`.","tags":["Convert"],"security":[{"ApiKeyHeader":[]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"string","format":"binary"}},"profile":{"type":"string","description":"Optional output profile id from /v1/formats. Without it your active country decides per document (`country`, else the buyer's country if active, else the seller's, else your only active country: its domestic format, or Peppol BIS cross-border — GET /v1/countries). An explicit profile must belong to an active country's family (403 `fail_profile_disabled`); the buyer is not checked. Decided per document (a document whose country cannot be settled fails alone, `code: fail_country_unknown`); a `country` / `profile` no document could get refuses the request (403)."},"country":{"type":"string","description":"Optional ISO 3166-1 alpha-2 code of one of YOUR active countries (`EL` = GR, `XI` = GB): the document is produced in that country's format (`profile` in GET /v1/countries; on /v1/send its `sendProfile`) and counted under it — nothing else is switched, whatever the parties are (country=IT gives FatturaPA). The country you have active decides the format; the buyer on the document is not checked, so a buyer in any country — inside the catalog or not — is fine. Not active → 403 `fail_country_disabled`; not in the catalog → 422 `fail_country_unsupported`. With `profile` too, the profile must belong to that country's family (403 `fail_profile_disabled`). Without `country` and `profile`: the buyer's country if it is active, else the seller's if active, else your only active country; with several active and none of them named → 422 `fail_country_unknown` (send `country`).","examples":["DE"]}},"required":["files"]}}}},"responses":{"200":{"description":"ZIP archive: the generated XML plus `summary.json`.","content":{"application/zip":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid input, or more files than the per-request maximum (code `fail_too_many_files`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing API key (code `fail_api_key_missing`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Invalid or revoked API key (also returned when the key service is unreachable — auth fails closed), OR the `country` you asked for is not active for this account, or none is (code `fail_country_disabled`, envelope `error: FORBIDDEN`, `details.country` — countries are the billable entitlement, activated per account; see Entitlements), OR an explicit `profile` belongs to no active country (code `fail_profile_disabled`), OR a store key on an endpoint other than /v1/send, /v1/validate, /v1/peppol/status and /v1/peppol/lookup (code `fail_key_send_only`), a group key on an endpoint it does not support — it may call those four and /v1/convert (code `fail_group_key_route_unsupported`) — or a group key's firm is deactivated (code `fail_firm_inactive`). See \"Group and store keys\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"A single file exceeded the upload size limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage-tier limit reached (code `fail_quota_exceeded`) or the per-minute burst limit (code `fail_rate_limited`, with Retry-After). No document is produced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/order":{"post":{"operationId":"createOrder","summary":"Peppol Order","description":"Multipart CSV upload. Peppol transaction T01. The response body is the UBL document itself.","tags":["Procurement"],"security":[{"ApiKeyHeader":[]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}},"responses":{"200":{"description":"The generated document, as XML. Metadata is in the response headers.","headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Echo this when contacting support."},"X-Profile":{"schema":{"type":"string"},"description":"The output profile that was produced."},"X-Elapsed-Ms":{"schema":{"type":"string"}},"X-Validation-Warnings":{"schema":{"type":"string"},"description":"Number of non-fatal findings, when there were any."},"X-Document-Id":{"schema":{"type":"string"},"description":"The document's id: as it is when it is printable ASCII, otherwise an RFC 8187 ext-value (`UTF-8''` + percent-encoded UTF-8) — see \"What comes back\"."},"Content-Disposition":{"schema":{"type":"string"},"description":"`attachment; filename=\"…\"` with an ASCII name, then `filename*=UTF-8''…` with the exact name whenever the two differ (RFC 6266)."}},"content":{"application/xml":{"schema":{"type":"string","description":"The document."}}}},"400":{"description":"Invalid input — missing file, unknown format/profile, or unparseable source data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing API key (code `fail_api_key_missing`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Invalid or revoked API key (also returned when the key service is unreachable — auth fails closed), OR the `country` you asked for is not active for this account, or none is (code `fail_country_disabled`, envelope `error: FORBIDDEN`, `details.country` — countries are the billable entitlement, activated per account; see Entitlements), OR an explicit `profile` belongs to no active country (code `fail_profile_disabled`), OR a store key on an endpoint other than /v1/send, /v1/validate, /v1/peppol/status and /v1/peppol/lookup (code `fail_key_send_only`), a group key on an endpoint it does not support — it may call those four and /v1/convert (code `fail_group_key_route_unsupported`) — or a group key's firm is deactivated (code `fail_firm_inactive`). See \"Group and store keys\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The document was built but failed XSD or Schematron validation (the response lists every rule that fired), OR which of your countries applies could not be settled (envelope `error: COUNTRY_INVALID`): `fail_country_unknown` (several countries active, no `country` / `profile` sent, and neither the buyer's nor the seller's country is one of them), `fail_country_unsupported` (`country` is not a catalog country).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage-tier limit reached (code `fail_quota_exceeded`) or the per-minute burst limit (code `fail_rate_limited`, with Retry-After). No document is produced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/order-response":{"post":{"operationId":"createOrderResponse","summary":"Peppol Order Response","description":"Multipart CSV upload. Peppol transaction T76. The response body is the UBL document itself.","tags":["Procurement"],"security":[{"ApiKeyHeader":[]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}},"responses":{"200":{"description":"The generated document, as XML. Metadata is in the response headers.","headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Echo this when contacting support."},"X-Profile":{"schema":{"type":"string"},"description":"The output profile that was produced."},"X-Elapsed-Ms":{"schema":{"type":"string"}},"X-Validation-Warnings":{"schema":{"type":"string"},"description":"Number of non-fatal findings, when there were any."},"X-Document-Id":{"schema":{"type":"string"},"description":"The document's id: as it is when it is printable ASCII, otherwise an RFC 8187 ext-value (`UTF-8''` + percent-encoded UTF-8) — see \"What comes back\"."},"Content-Disposition":{"schema":{"type":"string"},"description":"`attachment; filename=\"…\"` with an ASCII name, then `filename*=UTF-8''…` with the exact name whenever the two differ (RFC 6266)."}},"content":{"application/xml":{"schema":{"type":"string","description":"The document."}}}},"400":{"description":"Invalid input — missing file, unknown format/profile, or unparseable source data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing API key (code `fail_api_key_missing`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Invalid or revoked API key (also returned when the key service is unreachable — auth fails closed), OR the `country` you asked for is not active for this account, or none is (code `fail_country_disabled`, envelope `error: FORBIDDEN`, `details.country` — countries are the billable entitlement, activated per account; see Entitlements), OR an explicit `profile` belongs to no active country (code `fail_profile_disabled`), OR a store key on an endpoint other than /v1/send, /v1/validate, /v1/peppol/status and /v1/peppol/lookup (code `fail_key_send_only`), a group key on an endpoint it does not support — it may call those four and /v1/convert (code `fail_group_key_route_unsupported`) — or a group key's firm is deactivated (code `fail_firm_inactive`). See \"Group and store keys\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The document was built but failed XSD or Schematron validation (the response lists every rule that fired), OR which of your countries applies could not be settled (envelope `error: COUNTRY_INVALID`): `fail_country_unknown` (several countries active, no `country` / `profile` sent, and neither the buyer's nor the seller's country is one of them), `fail_country_unsupported` (`country` is not a catalog country).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage-tier limit reached (code `fail_quota_exceeded`) or the per-minute burst limit (code `fail_rate_limited`, with Retry-After). No document is produced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/despatch-advice":{"post":{"operationId":"createDespatchAdvice","summary":"Peppol Despatch Advice","description":"Multipart CSV upload. Peppol transaction T16. The response body is the UBL document itself.","tags":["Procurement"],"security":[{"ApiKeyHeader":[]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}},"responses":{"200":{"description":"The generated document, as XML. Metadata is in the response headers.","headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Echo this when contacting support."},"X-Profile":{"schema":{"type":"string"},"description":"The output profile that was produced."},"X-Elapsed-Ms":{"schema":{"type":"string"}},"X-Validation-Warnings":{"schema":{"type":"string"},"description":"Number of non-fatal findings, when there were any."},"X-Document-Id":{"schema":{"type":"string"},"description":"The document's id: as it is when it is printable ASCII, otherwise an RFC 8187 ext-value (`UTF-8''` + percent-encoded UTF-8) — see \"What comes back\"."},"Content-Disposition":{"schema":{"type":"string"},"description":"`attachment; filename=\"…\"` with an ASCII name, then `filename*=UTF-8''…` with the exact name whenever the two differ (RFC 6266)."}},"content":{"application/xml":{"schema":{"type":"string","description":"The document."}}}},"400":{"description":"Invalid input — missing file, unknown format/profile, or unparseable source data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing API key (code `fail_api_key_missing`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Invalid or revoked API key (also returned when the key service is unreachable — auth fails closed), OR the `country` you asked for is not active for this account, or none is (code `fail_country_disabled`, envelope `error: FORBIDDEN`, `details.country` — countries are the billable entitlement, activated per account; see Entitlements), OR an explicit `profile` belongs to no active country (code `fail_profile_disabled`), OR a store key on an endpoint other than /v1/send, /v1/validate, /v1/peppol/status and /v1/peppol/lookup (code `fail_key_send_only`), a group key on an endpoint it does not support — it may call those four and /v1/convert (code `fail_group_key_route_unsupported`) — or a group key's firm is deactivated (code `fail_firm_inactive`). See \"Group and store keys\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The document was built but failed XSD or Schematron validation (the response lists every rule that fired), OR which of your countries applies could not be settled (envelope `error: COUNTRY_INVALID`): `fail_country_unknown` (several countries active, no `country` / `profile` sent, and neither the buyer's nor the seller's country is one of them), `fail_country_unsupported` (`country` is not a catalog country).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage-tier limit reached (code `fail_quota_exceeded`) or the per-minute burst limit (code `fail_rate_limited`, with Retry-After). No document is produced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/invoice-response":{"post":{"operationId":"createInvoiceResponse","summary":"Peppol Invoice Response","description":"The buyer's accept/reject statement about a received invoice (UBL ApplicationResponse).\n\nPeppol transaction T111. The response body is the UBL document itself.","tags":["Procurement"],"security":[{"ApiKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"Canonical document — see the docs site for the field list."}}}},"responses":{"200":{"description":"The generated document, as XML. Metadata is in the response headers.","headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Echo this when contacting support."},"X-Profile":{"schema":{"type":"string"},"description":"The output profile that was produced."},"X-Elapsed-Ms":{"schema":{"type":"string"}},"X-Validation-Warnings":{"schema":{"type":"string"},"description":"Number of non-fatal findings, when there were any."},"X-Document-Id":{"schema":{"type":"string"},"description":"The document's id: as it is when it is printable ASCII, otherwise an RFC 8187 ext-value (`UTF-8''` + percent-encoded UTF-8) — see \"What comes back\"."},"Content-Disposition":{"schema":{"type":"string"},"description":"`attachment; filename=\"…\"` with an ASCII name, then `filename*=UTF-8''…` with the exact name whenever the two differ (RFC 6266)."}},"content":{"application/xml":{"schema":{"type":"string","description":"The document."}}}},"400":{"description":"Invalid input — missing file, unknown format/profile, or unparseable source data. A body that is not valid JSON answers `fail_body_invalid_json` (the message names the line and column); a corrupt gzip / deflate / br body `fail_body_unreadable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing API key (code `fail_api_key_missing`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Invalid or revoked API key (also returned when the key service is unreachable — auth fails closed), OR the `country` you asked for is not active for this account, or none is (code `fail_country_disabled`, envelope `error: FORBIDDEN`, `details.country` — countries are the billable entitlement, activated per account; see Entitlements), OR an explicit `profile` belongs to no active country (code `fail_profile_disabled`), OR a store key on an endpoint other than /v1/send, /v1/validate, /v1/peppol/status and /v1/peppol/lookup (code `fail_key_send_only`), a group key on an endpoint it does not support — it may call those four and /v1/convert (code `fail_group_key_route_unsupported`) — or a group key's firm is deactivated (code `fail_firm_inactive`). See \"Group and store keys\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The JSON body is over the 1 MB limit (`fail_body_too_large`). Send larger documents as a multipart file upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The body's charset is not UTF-8, or its Content-Encoding is not gzip, deflate or br (`fail_body_unsupported_encoding`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The document was built but failed XSD or Schematron validation (the response lists every rule that fired), OR which of your countries applies could not be settled (envelope `error: COUNTRY_INVALID`): `fail_country_unknown` (several countries active, no `country` / `profile` sent, and neither the buyer's nor the seller's country is one of them), `fail_country_unsupported` (`country` is not a catalog country). A JSON body nested deeper than 100 levels answers `fail_body_too_deep`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage-tier limit reached (code `fail_quota_exceeded`) or the per-minute burst limit (code `fail_rate_limited`, with Retry-After). No document is produced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/mlr":{"post":{"operationId":"createMessageLevelResponse","summary":"Message Level Response","description":"Technical acknowledgement of a received message (UBL ApplicationResponse).\n\nPeppol transaction T71. The response body is the UBL document itself.","tags":["Procurement"],"security":[{"ApiKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"Canonical document — see the docs site for the field list."}}}},"responses":{"200":{"description":"The generated document, as XML. Metadata is in the response headers.","headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Echo this when contacting support."},"X-Profile":{"schema":{"type":"string"},"description":"The output profile that was produced."},"X-Elapsed-Ms":{"schema":{"type":"string"}},"X-Validation-Warnings":{"schema":{"type":"string"},"description":"Number of non-fatal findings, when there were any."},"X-Document-Id":{"schema":{"type":"string"},"description":"The document's id: as it is when it is printable ASCII, otherwise an RFC 8187 ext-value (`UTF-8''` + percent-encoded UTF-8) — see \"What comes back\"."},"Content-Disposition":{"schema":{"type":"string"},"description":"`attachment; filename=\"…\"` with an ASCII name, then `filename*=UTF-8''…` with the exact name whenever the two differ (RFC 6266)."}},"content":{"application/xml":{"schema":{"type":"string","description":"The document."}}}},"400":{"description":"Invalid input — missing file, unknown format/profile, or unparseable source data. A body that is not valid JSON answers `fail_body_invalid_json` (the message names the line and column); a corrupt gzip / deflate / br body `fail_body_unreadable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing API key (code `fail_api_key_missing`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Invalid or revoked API key (also returned when the key service is unreachable — auth fails closed), OR the `country` you asked for is not active for this account, or none is (code `fail_country_disabled`, envelope `error: FORBIDDEN`, `details.country` — countries are the billable entitlement, activated per account; see Entitlements), OR an explicit `profile` belongs to no active country (code `fail_profile_disabled`), OR a store key on an endpoint other than /v1/send, /v1/validate, /v1/peppol/status and /v1/peppol/lookup (code `fail_key_send_only`), a group key on an endpoint it does not support — it may call those four and /v1/convert (code `fail_group_key_route_unsupported`) — or a group key's firm is deactivated (code `fail_firm_inactive`). See \"Group and store keys\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The JSON body is over the 1 MB limit (`fail_body_too_large`). Send larger documents as a multipart file upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The body's charset is not UTF-8, or its Content-Encoding is not gzip, deflate or br (`fail_body_unsupported_encoding`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The document was built but failed XSD or Schematron validation (the response lists every rule that fired), OR which of your countries applies could not be settled (envelope `error: COUNTRY_INVALID`): `fail_country_unknown` (several countries active, no `country` / `profile` sent, and neither the buyer's nor the seller's country is one of them), `fail_country_unsupported` (`country` is not a catalog country). A JSON body nested deeper than 100 levels answers `fail_body_too_deep`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage-tier limit reached (code `fail_quota_exceeded`) or the per-minute burst limit (code `fail_rate_limited`, with Retry-After). No document is produced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/catalogue-response":{"post":{"operationId":"createCatalogueResponse","summary":"Catalogue Response","description":"Response to a received catalogue (UBL ApplicationResponse).\n\nPeppol transaction T58. The response body is the UBL document itself.","tags":["Procurement"],"security":[{"ApiKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"Canonical document — see the docs site for the field list."}}}},"responses":{"200":{"description":"The generated document, as XML. Metadata is in the response headers.","headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Echo this when contacting support."},"X-Profile":{"schema":{"type":"string"},"description":"The output profile that was produced."},"X-Elapsed-Ms":{"schema":{"type":"string"}},"X-Validation-Warnings":{"schema":{"type":"string"},"description":"Number of non-fatal findings, when there were any."},"X-Document-Id":{"schema":{"type":"string"},"description":"The document's id: as it is when it is printable ASCII, otherwise an RFC 8187 ext-value (`UTF-8''` + percent-encoded UTF-8) — see \"What comes back\"."},"Content-Disposition":{"schema":{"type":"string"},"description":"`attachment; filename=\"…\"` with an ASCII name, then `filename*=UTF-8''…` with the exact name whenever the two differ (RFC 6266)."}},"content":{"application/xml":{"schema":{"type":"string","description":"The document."}}}},"400":{"description":"Invalid input — missing file, unknown format/profile, or unparseable source data. A body that is not valid JSON answers `fail_body_invalid_json` (the message names the line and column); a corrupt gzip / deflate / br body `fail_body_unreadable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing API key (code `fail_api_key_missing`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Invalid or revoked API key (also returned when the key service is unreachable — auth fails closed), OR the `country` you asked for is not active for this account, or none is (code `fail_country_disabled`, envelope `error: FORBIDDEN`, `details.country` — countries are the billable entitlement, activated per account; see Entitlements), OR an explicit `profile` belongs to no active country (code `fail_profile_disabled`), OR a store key on an endpoint other than /v1/send, /v1/validate, /v1/peppol/status and /v1/peppol/lookup (code `fail_key_send_only`), a group key on an endpoint it does not support — it may call those four and /v1/convert (code `fail_group_key_route_unsupported`) — or a group key's firm is deactivated (code `fail_firm_inactive`). See \"Group and store keys\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The JSON body is over the 1 MB limit (`fail_body_too_large`). Send larger documents as a multipart file upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The body's charset is not UTF-8, or its Content-Encoding is not gzip, deflate or br (`fail_body_unsupported_encoding`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The document was built but failed XSD or Schematron validation (the response lists every rule that fired), OR which of your countries applies could not be settled (envelope `error: COUNTRY_INVALID`): `fail_country_unknown` (several countries active, no `country` / `profile` sent, and neither the buyer's nor the seller's country is one of them), `fail_country_unsupported` (`country` is not a catalog country). A JSON body nested deeper than 100 levels answers `fail_body_too_deep`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage-tier limit reached (code `fail_quota_exceeded`) or the per-minute burst limit (code `fail_rate_limited`, with Retry-After). No document is produced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/catalogue":{"post":{"operationId":"createCatalogue","summary":"Peppol Catalogue","description":"A product catalogue (UBL Catalogue).\n\nPeppol transaction T19. The response body is the UBL document itself.","tags":["Procurement"],"security":[{"ApiKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"Canonical document — see the docs site for the field list."}}}},"responses":{"200":{"description":"The generated document, as XML. Metadata is in the response headers.","headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Echo this when contacting support."},"X-Profile":{"schema":{"type":"string"},"description":"The output profile that was produced."},"X-Elapsed-Ms":{"schema":{"type":"string"}},"X-Validation-Warnings":{"schema":{"type":"string"},"description":"Number of non-fatal findings, when there were any."},"X-Document-Id":{"schema":{"type":"string"},"description":"The document's id: as it is when it is printable ASCII, otherwise an RFC 8187 ext-value (`UTF-8''` + percent-encoded UTF-8) — see \"What comes back\"."},"Content-Disposition":{"schema":{"type":"string"},"description":"`attachment; filename=\"…\"` with an ASCII name, then `filename*=UTF-8''…` with the exact name whenever the two differ (RFC 6266)."}},"content":{"application/xml":{"schema":{"type":"string","description":"The document."}}}},"400":{"description":"Invalid input — missing file, unknown format/profile, or unparseable source data. A body that is not valid JSON answers `fail_body_invalid_json` (the message names the line and column); a corrupt gzip / deflate / br body `fail_body_unreadable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing API key (code `fail_api_key_missing`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Invalid or revoked API key (also returned when the key service is unreachable — auth fails closed), OR the `country` you asked for is not active for this account, or none is (code `fail_country_disabled`, envelope `error: FORBIDDEN`, `details.country` — countries are the billable entitlement, activated per account; see Entitlements), OR an explicit `profile` belongs to no active country (code `fail_profile_disabled`), OR a store key on an endpoint other than /v1/send, /v1/validate, /v1/peppol/status and /v1/peppol/lookup (code `fail_key_send_only`), a group key on an endpoint it does not support — it may call those four and /v1/convert (code `fail_group_key_route_unsupported`) — or a group key's firm is deactivated (code `fail_firm_inactive`). See \"Group and store keys\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The JSON body is over the 1 MB limit (`fail_body_too_large`). Send larger documents as a multipart file upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The body's charset is not UTF-8, or its Content-Encoding is not gzip, deflate or br (`fail_body_unsupported_encoding`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The document was built but failed XSD or Schematron validation (the response lists every rule that fired), OR which of your countries applies could not be settled (envelope `error: COUNTRY_INVALID`): `fail_country_unknown` (several countries active, no `country` / `profile` sent, and neither the buyer's nor the seller's country is one of them), `fail_country_unsupported` (`country` is not a catalog country). A JSON body nested deeper than 100 levels answers `fail_body_too_deep`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage-tier limit reached (code `fail_quota_exceeded`) or the per-minute burst limit (code `fail_rate_limited`, with Retry-After). No document is produced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/punch-out":{"post":{"operationId":"createPunchOutCart","summary":"PunchOut shopping cart","description":"A punch-out cart handed back to the buyer's procurement system (UBL Catalogue).\n\nPeppol transaction T77. The response body is the UBL document itself.","tags":["Procurement"],"security":[{"ApiKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"Canonical document — see the docs site for the field list."}}}},"responses":{"200":{"description":"The generated document, as XML. Metadata is in the response headers.","headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Echo this when contacting support."},"X-Profile":{"schema":{"type":"string"},"description":"The output profile that was produced."},"X-Elapsed-Ms":{"schema":{"type":"string"}},"X-Validation-Warnings":{"schema":{"type":"string"},"description":"Number of non-fatal findings, when there were any."},"X-Document-Id":{"schema":{"type":"string"},"description":"The document's id: as it is when it is printable ASCII, otherwise an RFC 8187 ext-value (`UTF-8''` + percent-encoded UTF-8) — see \"What comes back\"."},"Content-Disposition":{"schema":{"type":"string"},"description":"`attachment; filename=\"…\"` with an ASCII name, then `filename*=UTF-8''…` with the exact name whenever the two differ (RFC 6266)."}},"content":{"application/xml":{"schema":{"type":"string","description":"The document."}}}},"400":{"description":"Invalid input — missing file, unknown format/profile, or unparseable source data. A body that is not valid JSON answers `fail_body_invalid_json` (the message names the line and column); a corrupt gzip / deflate / br body `fail_body_unreadable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing API key (code `fail_api_key_missing`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Invalid or revoked API key (also returned when the key service is unreachable — auth fails closed), OR the `country` you asked for is not active for this account, or none is (code `fail_country_disabled`, envelope `error: FORBIDDEN`, `details.country` — countries are the billable entitlement, activated per account; see Entitlements), OR an explicit `profile` belongs to no active country (code `fail_profile_disabled`), OR a store key on an endpoint other than /v1/send, /v1/validate, /v1/peppol/status and /v1/peppol/lookup (code `fail_key_send_only`), a group key on an endpoint it does not support — it may call those four and /v1/convert (code `fail_group_key_route_unsupported`) — or a group key's firm is deactivated (code `fail_firm_inactive`). See \"Group and store keys\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The JSON body is over the 1 MB limit (`fail_body_too_large`). Send larger documents as a multipart file upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The body's charset is not UTF-8, or its Content-Encoding is not gzip, deflate or br (`fail_body_unsupported_encoding`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The document was built but failed XSD or Schematron validation (the response lists every rule that fired), OR which of your countries applies could not be settled (envelope `error: COUNTRY_INVALID`): `fail_country_unknown` (several countries active, no `country` / `profile` sent, and neither the buyer's nor the seller's country is one of them), `fail_country_unsupported` (`country` is not a catalog country). A JSON body nested deeper than 100 levels answers `fail_body_too_deep`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage-tier limit reached (code `fail_quota_exceeded`) or the per-minute burst limit (code `fail_rate_limited`, with Retry-After). No document is produced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/logistics/advanced-despatch-advice":{"post":{"operationId":"createAdvancedDespatchAdvice","summary":"Advanced Despatch Advice","description":"Peppol Logistics 1.3.1, transaction T120. JSON body; the response body is the UBL document, validated against the UBL XSD and the logistics Schematron.","tags":["Logistics"],"security":[{"ApiKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"The generated document, as XML. Metadata is in the response headers.","headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Echo this when contacting support."},"X-Profile":{"schema":{"type":"string"},"description":"The output profile that was produced."},"X-Elapsed-Ms":{"schema":{"type":"string"}},"X-Validation-Warnings":{"schema":{"type":"string"},"description":"Number of non-fatal findings, when there were any."},"X-Document-Id":{"schema":{"type":"string"},"description":"The document's id: as it is when it is printable ASCII, otherwise an RFC 8187 ext-value (`UTF-8''` + percent-encoded UTF-8) — see \"What comes back\"."},"Content-Disposition":{"schema":{"type":"string"},"description":"`attachment; filename=\"…\"` with an ASCII name, then `filename*=UTF-8''…` with the exact name whenever the two differ (RFC 6266)."}},"content":{"application/xml":{"schema":{"type":"string","description":"The document."}}}},"400":{"description":"Invalid input — missing file, unknown format/profile, or unparseable source data. A body that is not valid JSON answers `fail_body_invalid_json` (the message names the line and column); a corrupt gzip / deflate / br body `fail_body_unreadable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing API key (code `fail_api_key_missing`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Invalid or revoked API key (also returned when the key service is unreachable — auth fails closed), OR the `country` you asked for is not active for this account, or none is (code `fail_country_disabled`, envelope `error: FORBIDDEN`, `details.country` — countries are the billable entitlement, activated per account; see Entitlements), OR an explicit `profile` belongs to no active country (code `fail_profile_disabled`), OR a store key on an endpoint other than /v1/send, /v1/validate, /v1/peppol/status and /v1/peppol/lookup (code `fail_key_send_only`), a group key on an endpoint it does not support — it may call those four and /v1/convert (code `fail_group_key_route_unsupported`) — or a group key's firm is deactivated (code `fail_firm_inactive`). See \"Group and store keys\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The JSON body is over the 1 MB limit (`fail_body_too_large`). Send larger documents as a multipart file upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The body's charset is not UTF-8, or its Content-Encoding is not gzip, deflate or br (`fail_body_unsupported_encoding`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The document was built but failed XSD or Schematron validation (the response lists every rule that fired), OR which of your countries applies could not be settled (envelope `error: COUNTRY_INVALID`): `fail_country_unknown` (several countries active, no `country` / `profile` sent, and neither the buyer's nor the seller's country is one of them), `fail_country_unsupported` (`country` is not a catalog country). A JSON body nested deeper than 100 levels answers `fail_body_too_deep`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage-tier limit reached (code `fail_quota_exceeded`) or the per-minute burst limit (code `fail_rate_limited`, with Retry-After). No document is produced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Serialisation or validation crashed. Report the request id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/logistics/receipt-advice":{"post":{"operationId":"createReceiptAdvice","summary":"Receipt Advice","description":"Peppol Logistics 1.3.1, transaction T128. JSON body; the response body is the UBL document, validated against the UBL XSD and the logistics Schematron.","tags":["Logistics"],"security":[{"ApiKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"The generated document, as XML. Metadata is in the response headers.","headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Echo this when contacting support."},"X-Profile":{"schema":{"type":"string"},"description":"The output profile that was produced."},"X-Elapsed-Ms":{"schema":{"type":"string"}},"X-Validation-Warnings":{"schema":{"type":"string"},"description":"Number of non-fatal findings, when there were any."},"X-Document-Id":{"schema":{"type":"string"},"description":"The document's id: as it is when it is printable ASCII, otherwise an RFC 8187 ext-value (`UTF-8''` + percent-encoded UTF-8) — see \"What comes back\"."},"Content-Disposition":{"schema":{"type":"string"},"description":"`attachment; filename=\"…\"` with an ASCII name, then `filename*=UTF-8''…` with the exact name whenever the two differ (RFC 6266)."}},"content":{"application/xml":{"schema":{"type":"string","description":"The document."}}}},"400":{"description":"Invalid input — missing file, unknown format/profile, or unparseable source data. A body that is not valid JSON answers `fail_body_invalid_json` (the message names the line and column); a corrupt gzip / deflate / br body `fail_body_unreadable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing API key (code `fail_api_key_missing`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Invalid or revoked API key (also returned when the key service is unreachable — auth fails closed), OR the `country` you asked for is not active for this account, or none is (code `fail_country_disabled`, envelope `error: FORBIDDEN`, `details.country` — countries are the billable entitlement, activated per account; see Entitlements), OR an explicit `profile` belongs to no active country (code `fail_profile_disabled`), OR a store key on an endpoint other than /v1/send, /v1/validate, /v1/peppol/status and /v1/peppol/lookup (code `fail_key_send_only`), a group key on an endpoint it does not support — it may call those four and /v1/convert (code `fail_group_key_route_unsupported`) — or a group key's firm is deactivated (code `fail_firm_inactive`). See \"Group and store keys\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The JSON body is over the 1 MB limit (`fail_body_too_large`). Send larger documents as a multipart file upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The body's charset is not UTF-8, or its Content-Encoding is not gzip, deflate or br (`fail_body_unsupported_encoding`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The document was built but failed XSD or Schematron validation (the response lists every rule that fired), OR which of your countries applies could not be settled (envelope `error: COUNTRY_INVALID`): `fail_country_unknown` (several countries active, no `country` / `profile` sent, and neither the buyer's nor the seller's country is one of them), `fail_country_unsupported` (`country` is not a catalog country). A JSON body nested deeper than 100 levels answers `fail_body_too_deep`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage-tier limit reached (code `fail_quota_exceeded`) or the per-minute burst limit (code `fail_rate_limited`, with Retry-After). No document is produced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Serialisation or validation crashed. Report the request id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/logistics/application-response":{"post":{"operationId":"createLogisticsApplicationResponse","summary":"Logistics Application Response","description":"Peppol Logistics 1.3.1, transaction T129. JSON body; the response body is the UBL document, validated against the UBL XSD and the logistics Schematron.","tags":["Logistics"],"security":[{"ApiKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"The generated document, as XML. Metadata is in the response headers.","headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Echo this when contacting support."},"X-Profile":{"schema":{"type":"string"},"description":"The output profile that was produced."},"X-Elapsed-Ms":{"schema":{"type":"string"}},"X-Validation-Warnings":{"schema":{"type":"string"},"description":"Number of non-fatal findings, when there were any."},"X-Document-Id":{"schema":{"type":"string"},"description":"The document's id: as it is when it is printable ASCII, otherwise an RFC 8187 ext-value (`UTF-8''` + percent-encoded UTF-8) — see \"What comes back\"."},"Content-Disposition":{"schema":{"type":"string"},"description":"`attachment; filename=\"…\"` with an ASCII name, then `filename*=UTF-8''…` with the exact name whenever the two differ (RFC 6266)."}},"content":{"application/xml":{"schema":{"type":"string","description":"The document."}}}},"400":{"description":"Invalid input — missing file, unknown format/profile, or unparseable source data. A body that is not valid JSON answers `fail_body_invalid_json` (the message names the line and column); a corrupt gzip / deflate / br body `fail_body_unreadable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing API key (code `fail_api_key_missing`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Invalid or revoked API key (also returned when the key service is unreachable — auth fails closed), OR the `country` you asked for is not active for this account, or none is (code `fail_country_disabled`, envelope `error: FORBIDDEN`, `details.country` — countries are the billable entitlement, activated per account; see Entitlements), OR an explicit `profile` belongs to no active country (code `fail_profile_disabled`), OR a store key on an endpoint other than /v1/send, /v1/validate, /v1/peppol/status and /v1/peppol/lookup (code `fail_key_send_only`), a group key on an endpoint it does not support — it may call those four and /v1/convert (code `fail_group_key_route_unsupported`) — or a group key's firm is deactivated (code `fail_firm_inactive`). See \"Group and store keys\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The JSON body is over the 1 MB limit (`fail_body_too_large`). Send larger documents as a multipart file upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The body's charset is not UTF-8, or its Content-Encoding is not gzip, deflate or br (`fail_body_unsupported_encoding`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The document was built but failed XSD or Schematron validation (the response lists every rule that fired), OR which of your countries applies could not be settled (envelope `error: COUNTRY_INVALID`): `fail_country_unknown` (several countries active, no `country` / `profile` sent, and neither the buyer's nor the seller's country is one of them), `fail_country_unsupported` (`country` is not a catalog country). A JSON body nested deeper than 100 levels answers `fail_body_too_deep`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage-tier limit reached (code `fail_quota_exceeded`) or the per-minute burst limit (code `fail_rate_limited`, with Retry-After). No document is produced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Serialisation or validation crashed. Report the request id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/logistics/weight-statement":{"post":{"operationId":"createWeightStatement","summary":"Weight Statement","description":"Peppol Logistics 1.3.1, transaction T122. JSON body; the response body is the UBL document, validated against the UBL XSD and the logistics Schematron.","tags":["Logistics"],"security":[{"ApiKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"The generated document, as XML. Metadata is in the response headers.","headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Echo this when contacting support."},"X-Profile":{"schema":{"type":"string"},"description":"The output profile that was produced."},"X-Elapsed-Ms":{"schema":{"type":"string"}},"X-Validation-Warnings":{"schema":{"type":"string"},"description":"Number of non-fatal findings, when there were any."},"X-Document-Id":{"schema":{"type":"string"},"description":"The document's id: as it is when it is printable ASCII, otherwise an RFC 8187 ext-value (`UTF-8''` + percent-encoded UTF-8) — see \"What comes back\"."},"Content-Disposition":{"schema":{"type":"string"},"description":"`attachment; filename=\"…\"` with an ASCII name, then `filename*=UTF-8''…` with the exact name whenever the two differ (RFC 6266)."}},"content":{"application/xml":{"schema":{"type":"string","description":"The document."}}}},"400":{"description":"Invalid input — missing file, unknown format/profile, or unparseable source data. A body that is not valid JSON answers `fail_body_invalid_json` (the message names the line and column); a corrupt gzip / deflate / br body `fail_body_unreadable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing API key (code `fail_api_key_missing`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Invalid or revoked API key (also returned when the key service is unreachable — auth fails closed), OR the `country` you asked for is not active for this account, or none is (code `fail_country_disabled`, envelope `error: FORBIDDEN`, `details.country` — countries are the billable entitlement, activated per account; see Entitlements), OR an explicit `profile` belongs to no active country (code `fail_profile_disabled`), OR a store key on an endpoint other than /v1/send, /v1/validate, /v1/peppol/status and /v1/peppol/lookup (code `fail_key_send_only`), a group key on an endpoint it does not support — it may call those four and /v1/convert (code `fail_group_key_route_unsupported`) — or a group key's firm is deactivated (code `fail_firm_inactive`). See \"Group and store keys\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The JSON body is over the 1 MB limit (`fail_body_too_large`). Send larger documents as a multipart file upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The body's charset is not UTF-8, or its Content-Encoding is not gzip, deflate or br (`fail_body_unsupported_encoding`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The document was built but failed XSD or Schematron validation (the response lists every rule that fired), OR which of your countries applies could not be settled (envelope `error: COUNTRY_INVALID`): `fail_country_unknown` (several countries active, no `country` / `profile` sent, and neither the buyer's nor the seller's country is one of them), `fail_country_unsupported` (`country` is not a catalog country). A JSON body nested deeper than 100 levels answers `fail_body_too_deep`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage-tier limit reached (code `fail_quota_exceeded`) or the per-minute burst limit (code `fail_rate_limited`, with Retry-After). No document is produced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Serialisation or validation crashed. Report the request id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/logistics/transport-execution-plan-request":{"post":{"operationId":"createTransportExecutionPlanRequest","summary":"Transport Execution Plan Request","description":"Peppol Logistics 1.3.1, transaction T123. JSON body; the response body is the UBL document, validated against the UBL XSD and the logistics Schematron.","tags":["Logistics"],"security":[{"ApiKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"The generated document, as XML. Metadata is in the response headers.","headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Echo this when contacting support."},"X-Profile":{"schema":{"type":"string"},"description":"The output profile that was produced."},"X-Elapsed-Ms":{"schema":{"type":"string"}},"X-Validation-Warnings":{"schema":{"type":"string"},"description":"Number of non-fatal findings, when there were any."},"X-Document-Id":{"schema":{"type":"string"},"description":"The document's id: as it is when it is printable ASCII, otherwise an RFC 8187 ext-value (`UTF-8''` + percent-encoded UTF-8) — see \"What comes back\"."},"Content-Disposition":{"schema":{"type":"string"},"description":"`attachment; filename=\"…\"` with an ASCII name, then `filename*=UTF-8''…` with the exact name whenever the two differ (RFC 6266)."}},"content":{"application/xml":{"schema":{"type":"string","description":"The document."}}}},"400":{"description":"Invalid input — missing file, unknown format/profile, or unparseable source data. A body that is not valid JSON answers `fail_body_invalid_json` (the message names the line and column); a corrupt gzip / deflate / br body `fail_body_unreadable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing API key (code `fail_api_key_missing`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Invalid or revoked API key (also returned when the key service is unreachable — auth fails closed), OR the `country` you asked for is not active for this account, or none is (code `fail_country_disabled`, envelope `error: FORBIDDEN`, `details.country` — countries are the billable entitlement, activated per account; see Entitlements), OR an explicit `profile` belongs to no active country (code `fail_profile_disabled`), OR a store key on an endpoint other than /v1/send, /v1/validate, /v1/peppol/status and /v1/peppol/lookup (code `fail_key_send_only`), a group key on an endpoint it does not support — it may call those four and /v1/convert (code `fail_group_key_route_unsupported`) — or a group key's firm is deactivated (code `fail_firm_inactive`). See \"Group and store keys\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The JSON body is over the 1 MB limit (`fail_body_too_large`). Send larger documents as a multipart file upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The body's charset is not UTF-8, or its Content-Encoding is not gzip, deflate or br (`fail_body_unsupported_encoding`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The document was built but failed XSD or Schematron validation (the response lists every rule that fired), OR which of your countries applies could not be settled (envelope `error: COUNTRY_INVALID`): `fail_country_unknown` (several countries active, no `country` / `profile` sent, and neither the buyer's nor the seller's country is one of them), `fail_country_unsupported` (`country` is not a catalog country). A JSON body nested deeper than 100 levels answers `fail_body_too_deep`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage-tier limit reached (code `fail_quota_exceeded`) or the per-minute burst limit (code `fail_rate_limited`, with Retry-After). No document is produced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Serialisation or validation crashed. Report the request id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/logistics/transport-execution-plan":{"post":{"operationId":"createTransportExecutionPlan","summary":"Transport Execution Plan","description":"Peppol Logistics 1.3.1, transaction T124. JSON body; the response body is the UBL document, validated against the UBL XSD and the logistics Schematron.","tags":["Logistics"],"security":[{"ApiKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"The generated document, as XML. Metadata is in the response headers.","headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Echo this when contacting support."},"X-Profile":{"schema":{"type":"string"},"description":"The output profile that was produced."},"X-Elapsed-Ms":{"schema":{"type":"string"}},"X-Validation-Warnings":{"schema":{"type":"string"},"description":"Number of non-fatal findings, when there were any."},"X-Document-Id":{"schema":{"type":"string"},"description":"The document's id: as it is when it is printable ASCII, otherwise an RFC 8187 ext-value (`UTF-8''` + percent-encoded UTF-8) — see \"What comes back\"."},"Content-Disposition":{"schema":{"type":"string"},"description":"`attachment; filename=\"…\"` with an ASCII name, then `filename*=UTF-8''…` with the exact name whenever the two differ (RFC 6266)."}},"content":{"application/xml":{"schema":{"type":"string","description":"The document."}}}},"400":{"description":"Invalid input — missing file, unknown format/profile, or unparseable source data. A body that is not valid JSON answers `fail_body_invalid_json` (the message names the line and column); a corrupt gzip / deflate / br body `fail_body_unreadable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing API key (code `fail_api_key_missing`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Invalid or revoked API key (also returned when the key service is unreachable — auth fails closed), OR the `country` you asked for is not active for this account, or none is (code `fail_country_disabled`, envelope `error: FORBIDDEN`, `details.country` — countries are the billable entitlement, activated per account; see Entitlements), OR an explicit `profile` belongs to no active country (code `fail_profile_disabled`), OR a store key on an endpoint other than /v1/send, /v1/validate, /v1/peppol/status and /v1/peppol/lookup (code `fail_key_send_only`), a group key on an endpoint it does not support — it may call those four and /v1/convert (code `fail_group_key_route_unsupported`) — or a group key's firm is deactivated (code `fail_firm_inactive`). See \"Group and store keys\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The JSON body is over the 1 MB limit (`fail_body_too_large`). Send larger documents as a multipart file upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The body's charset is not UTF-8, or its Content-Encoding is not gzip, deflate or br (`fail_body_unsupported_encoding`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The document was built but failed XSD or Schematron validation (the response lists every rule that fired), OR which of your countries applies could not be settled (envelope `error: COUNTRY_INVALID`): `fail_country_unknown` (several countries active, no `country` / `profile` sent, and neither the buyer's nor the seller's country is one of them), `fail_country_unsupported` (`country` is not a catalog country). A JSON body nested deeper than 100 levels answers `fail_body_too_deep`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage-tier limit reached (code `fail_quota_exceeded`) or the per-minute burst limit (code `fail_rate_limited`, with Retry-After). No document is produced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Serialisation or validation crashed. Report the request id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/logistics/waybill":{"post":{"operationId":"createWaybill","summary":"Waybill","description":"Peppol Logistics 1.3.1, transaction T125. JSON body; the response body is the UBL document, validated against the UBL XSD and the logistics Schematron.","tags":["Logistics"],"security":[{"ApiKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"The generated document, as XML. Metadata is in the response headers.","headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Echo this when contacting support."},"X-Profile":{"schema":{"type":"string"},"description":"The output profile that was produced."},"X-Elapsed-Ms":{"schema":{"type":"string"}},"X-Validation-Warnings":{"schema":{"type":"string"},"description":"Number of non-fatal findings, when there were any."},"X-Document-Id":{"schema":{"type":"string"},"description":"The document's id: as it is when it is printable ASCII, otherwise an RFC 8187 ext-value (`UTF-8''` + percent-encoded UTF-8) — see \"What comes back\"."},"Content-Disposition":{"schema":{"type":"string"},"description":"`attachment; filename=\"…\"` with an ASCII name, then `filename*=UTF-8''…` with the exact name whenever the two differ (RFC 6266)."}},"content":{"application/xml":{"schema":{"type":"string","description":"The document."}}}},"400":{"description":"Invalid input — missing file, unknown format/profile, or unparseable source data. A body that is not valid JSON answers `fail_body_invalid_json` (the message names the line and column); a corrupt gzip / deflate / br body `fail_body_unreadable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing API key (code `fail_api_key_missing`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Invalid or revoked API key (also returned when the key service is unreachable — auth fails closed), OR the `country` you asked for is not active for this account, or none is (code `fail_country_disabled`, envelope `error: FORBIDDEN`, `details.country` — countries are the billable entitlement, activated per account; see Entitlements), OR an explicit `profile` belongs to no active country (code `fail_profile_disabled`), OR a store key on an endpoint other than /v1/send, /v1/validate, /v1/peppol/status and /v1/peppol/lookup (code `fail_key_send_only`), a group key on an endpoint it does not support — it may call those four and /v1/convert (code `fail_group_key_route_unsupported`) — or a group key's firm is deactivated (code `fail_firm_inactive`). See \"Group and store keys\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The JSON body is over the 1 MB limit (`fail_body_too_large`). Send larger documents as a multipart file upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The body's charset is not UTF-8, or its Content-Encoding is not gzip, deflate or br (`fail_body_unsupported_encoding`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The document was built but failed XSD or Schematron validation (the response lists every rule that fired), OR which of your countries applies could not be settled (envelope `error: COUNTRY_INVALID`): `fail_country_unknown` (several countries active, no `country` / `profile` sent, and neither the buyer's nor the seller's country is one of them), `fail_country_unsupported` (`country` is not a catalog country). A JSON body nested deeper than 100 levels answers `fail_body_too_deep`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage-tier limit reached (code `fail_quota_exceeded`) or the per-minute burst limit (code `fail_rate_limited`, with Retry-After). No document is produced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Serialisation or validation crashed. Report the request id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/logistics/transportation-status-request":{"post":{"operationId":"createTransportationStatusRequest","summary":"Transportation Status Request","description":"Peppol Logistics 1.3.1, transaction T126. JSON body; the response body is the UBL document, validated against the UBL XSD and the logistics Schematron.","tags":["Logistics"],"security":[{"ApiKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"The generated document, as XML. Metadata is in the response headers.","headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Echo this when contacting support."},"X-Profile":{"schema":{"type":"string"},"description":"The output profile that was produced."},"X-Elapsed-Ms":{"schema":{"type":"string"}},"X-Validation-Warnings":{"schema":{"type":"string"},"description":"Number of non-fatal findings, when there were any."},"X-Document-Id":{"schema":{"type":"string"},"description":"The document's id: as it is when it is printable ASCII, otherwise an RFC 8187 ext-value (`UTF-8''` + percent-encoded UTF-8) — see \"What comes back\"."},"Content-Disposition":{"schema":{"type":"string"},"description":"`attachment; filename=\"…\"` with an ASCII name, then `filename*=UTF-8''…` with the exact name whenever the two differ (RFC 6266)."}},"content":{"application/xml":{"schema":{"type":"string","description":"The document."}}}},"400":{"description":"Invalid input — missing file, unknown format/profile, or unparseable source data. A body that is not valid JSON answers `fail_body_invalid_json` (the message names the line and column); a corrupt gzip / deflate / br body `fail_body_unreadable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing API key (code `fail_api_key_missing`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Invalid or revoked API key (also returned when the key service is unreachable — auth fails closed), OR the `country` you asked for is not active for this account, or none is (code `fail_country_disabled`, envelope `error: FORBIDDEN`, `details.country` — countries are the billable entitlement, activated per account; see Entitlements), OR an explicit `profile` belongs to no active country (code `fail_profile_disabled`), OR a store key on an endpoint other than /v1/send, /v1/validate, /v1/peppol/status and /v1/peppol/lookup (code `fail_key_send_only`), a group key on an endpoint it does not support — it may call those four and /v1/convert (code `fail_group_key_route_unsupported`) — or a group key's firm is deactivated (code `fail_firm_inactive`). See \"Group and store keys\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The JSON body is over the 1 MB limit (`fail_body_too_large`). Send larger documents as a multipart file upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The body's charset is not UTF-8, or its Content-Encoding is not gzip, deflate or br (`fail_body_unsupported_encoding`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The document was built but failed XSD or Schematron validation (the response lists every rule that fired), OR which of your countries applies could not be settled (envelope `error: COUNTRY_INVALID`): `fail_country_unknown` (several countries active, no `country` / `profile` sent, and neither the buyer's nor the seller's country is one of them), `fail_country_unsupported` (`country` is not a catalog country). A JSON body nested deeper than 100 levels answers `fail_body_too_deep`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage-tier limit reached (code `fail_quota_exceeded`) or the per-minute burst limit (code `fail_rate_limited`, with Retry-After). No document is produced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Serialisation or validation crashed. Report the request id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/logistics/transportation-status":{"post":{"operationId":"createTransportationStatus","summary":"Transportation Status","description":"Peppol Logistics 1.3.1, transaction T127. JSON body; the response body is the UBL document, validated against the UBL XSD and the logistics Schematron.","tags":["Logistics"],"security":[{"ApiKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"The generated document, as XML. Metadata is in the response headers.","headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Echo this when contacting support."},"X-Profile":{"schema":{"type":"string"},"description":"The output profile that was produced."},"X-Elapsed-Ms":{"schema":{"type":"string"}},"X-Validation-Warnings":{"schema":{"type":"string"},"description":"Number of non-fatal findings, when there were any."},"X-Document-Id":{"schema":{"type":"string"},"description":"The document's id: as it is when it is printable ASCII, otherwise an RFC 8187 ext-value (`UTF-8''` + percent-encoded UTF-8) — see \"What comes back\"."},"Content-Disposition":{"schema":{"type":"string"},"description":"`attachment; filename=\"…\"` with an ASCII name, then `filename*=UTF-8''…` with the exact name whenever the two differ (RFC 6266)."}},"content":{"application/xml":{"schema":{"type":"string","description":"The document."}}}},"400":{"description":"Invalid input — missing file, unknown format/profile, or unparseable source data. A body that is not valid JSON answers `fail_body_invalid_json` (the message names the line and column); a corrupt gzip / deflate / br body `fail_body_unreadable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing API key (code `fail_api_key_missing`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Invalid or revoked API key (also returned when the key service is unreachable — auth fails closed), OR the `country` you asked for is not active for this account, or none is (code `fail_country_disabled`, envelope `error: FORBIDDEN`, `details.country` — countries are the billable entitlement, activated per account; see Entitlements), OR an explicit `profile` belongs to no active country (code `fail_profile_disabled`), OR a store key on an endpoint other than /v1/send, /v1/validate, /v1/peppol/status and /v1/peppol/lookup (code `fail_key_send_only`), a group key on an endpoint it does not support — it may call those four and /v1/convert (code `fail_group_key_route_unsupported`) — or a group key's firm is deactivated (code `fail_firm_inactive`). See \"Group and store keys\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The JSON body is over the 1 MB limit (`fail_body_too_large`). Send larger documents as a multipart file upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The body's charset is not UTF-8, or its Content-Encoding is not gzip, deflate or br (`fail_body_unsupported_encoding`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The document was built but failed XSD or Schematron validation (the response lists every rule that fired), OR which of your countries applies could not be settled (envelope `error: COUNTRY_INVALID`): `fail_country_unknown` (several countries active, no `country` / `profile` sent, and neither the buyer's nor the seller's country is one of them), `fail_country_unsupported` (`country` is not a catalog country). A JSON body nested deeper than 100 levels answers `fail_body_too_deep`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage-tier limit reached (code `fail_quota_exceeded`) or the per-minute burst limit (code `fail_rate_limited`, with Retry-After). No document is produced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Serialisation or validation crashed. Report the request id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/send":{"post":{"operationId":"sendDocument","summary":"Send a document over the Peppol network","description":"Builds the document (same code as the endpoints above), validates it, and hands\nit to the access point. Invoices and the CSV-driven types come as multipart;\nthe JSON types put the document IN the body, so routing flags travel as query\nparameters.\n\nThe document is only transmitted once local validation passes — a 422 means\nnothing left the building.\n\n**Retries without double sends.** Send `Idempotency-Key: <your own id>` (1–128\ncharacters from A-Z a-z 0-9 . _ : -; your invoice id is a good key). A retry of a\nsend that answered 200 answers that same 200 again — same `document_id`, header\n`Idempotent-Replayed: true` — and nothing is transmitted or billed twice. Keys belong\nto your account (all its API keys share them) and live 24 hours. Only a 200 is\nkept: a refused send (400/409/422/5xx) frees its key, so the corrected document can\ngo under the same key. The same key with a different document is 422\n`fail_idempotency_key_reused`; a send still in flight is 409\n`fail_idempotency_in_progress` (retry shortly); when the key cannot be checked the\nanswer is 503 `fail_idempotency_unavailable` and nothing is sent.\nOne limit: when the access point does not answer (a timeout or 502), whether it took\nthe document is unknown and the key is freed, so a retry can send it a second time.\nBefore retrying such a send, look the document up (`GET /v1/peppol/status`, or your\npartner documents list by `external_id`).\n\n**Peppol Logistics.** The nine logistics documents are sent with `document=`\n`advanced-despatch-advice`, `weight-statement`, `transport-execution-plan-request`,\n`transport-execution-plan`, `waybill`, `transportation-status-request`,\n`transportation-status`, `receipt-advice` or `logistics-application-response` and the\nsame JSON body as the matching `POST /v1/logistics/…` endpoint. `receiver` is the party\nthe document goes TO: the delivery customer of a despatch advice, the despatch\nsupplier of a receipt advice, the carrier of a waybill, the transport service provider\nof a plan request, the receiver party of the others. The document must carry a\n`profileId` the network can deliver it under (the default of each document is one);\nanother is 400 `fail_peppol_profile_unsupported` and nothing is sent. The receiver\nmust be registered on Peppol for that logistics document.\n\n**Your own reference.** `external_id` (≤128 characters) is echoed in the response,\nstored with the sent document and returned by `GET /v1/peppol/status/{documentId}`.\n\n**Answering a received invoice.** `document=invoice-response` with\n`inbound_document_id=<id of the received document>` sends the answer to that\ndocument's sender (`receiver` may be left out) about its number. AP (accepted) and RE\n(rejected) are a decision: one per document — a second is 409\n`fail_inbound_already_responded`, one still being sent 409\n`fail_inbound_response_in_progress` (it expires after 10 minutes). The other codes\n(AB, IP, UQ, CA, PD) are status messages and can follow. `response.responseCode` is\nread trimmed and in upper case; anything outside those seven is 400. A receiver or\nreferenced number that contradicts the received document is 422\n`fail_inbound_response_mismatch`; nothing is sent in any of these cases.\n\n**Registration first.** An account that is not yet registered on the Peppol network\ngets 409 `fail_peppol_not_registered` and nothing is sent under anyone else's identity.\n\n**Duplicate protection (group firms).** Every key of a firm in a group account — its\nown key, its store keys, the group key acting for it — sends an invoice or credit note\nnumber once: a real send (`send` not false) claims the number (the document kind —\ncredit note for type code 381 / 261, invoice otherwise —, BT-1 and the year of the issue\ndate) before anything is transmitted. A number this firm already sent is 409\n`fail_duplicate_document` (`details.first_document_id`, `details.first_sent_at`); one\nbeing sent right now is 409 `fail_duplicate_in_progress` (`details.since`; retry in a\nfew minutes); when the check cannot be made the answer is 503\n`fail_duplicate_check_unavailable`. Nothing is sent in any of these cases. Numbers are\ncompared trimmed, case-insensitive and without spaces. A send that is refused or fails\nfrees its number again — except when the access point refuses it (409\n`fail_peppol_provider`) as a duplicate of a document it already holds: that proves the\nnumber left, so it is recorded as sent under that document and a later send of it is\n`fail_duplicate_document` naming it. A retry with the same Idempotency-Key of a send that\nanswered 200 still gets that 200 (the replay comes first). One limit: when the access\npoint does not answer, whether it took the document is unknown and the number is freed,\nas the Idempotency-Key is — look the document up before sending it again.\n\nNo response on this path identifies the access point that carries your traffic:\ndelivery is our service, and which network operator performs it is an\nimplementation detail that can change without notice. Quote `request_id` when\nreporting a problem — it is the correlation handle for our side of the call.","tags":["Peppol"],"security":[{"ApiKeyHeader":[]}],"parameters":[{"name":"document","in":"query","schema":{"type":"string","default":"invoice"},"description":"invoice | order | order-response | despatch-advice | catalogue | punch-out | catalogue-response | mlr | invoice-response | advanced-despatch-advice | weight-statement | transport-execution-plan-request | transport-execution-plan | waybill | transportation-status-request | transportation-status | receipt-advice | logistics-application-response. For a multipart request this may also be a form field."},{"name":"delivery_method","in":"query","schema":{"type":"string","default":"peppol"},"description":"How the document reaches the buyer. `peppol` (the default) is the Peppol network. Another method — `email`, `postal`, `internetbank`, `kivra`, `billo`, `minameddelanden`, `edi`, `finvoice`, `dynamic_routing` — exists only for an invoice or credit note sent as Peppol BIS Billing 3.0 (profile peppol-bis-3), only where it is offered, and only when it is enabled for your account: anything else is 400 or 403 `fail_peppol_delivery_method` and nothing is sent. The answer then carries `delivery_method`. May also be a multipart form field."},{"name":"profile","in":"query","schema":{"type":"string"},"description":"Invoices only: peppol-bis-3, ehf-3, xrechnung-3 (UBL), xrechnung-3-cii (XRechnung in CII), or a Peppol International (PINT) profile — pint-ae, pint-ae-sb, pint-sg, pint-my, pint-my-sb, pint-jp, pint-jp-ntr, pint-jp-sb, pint-aunz, pint-aunz-sb, pint-om, pint-om-sb. Anything else is 400 `fail_peppol_profile_unsupported`. Like every produce route, the profile must belong to one of your active countries (403 `fail_profile_disabled`): pint-ae needs the UAE, xrechnung-3 Germany. Optional: without it the invoice goes in the chosen country's sending format (`sendProfile` in GET /v1/countries: EHF for Norway, Peppol BIS otherwise). The document is validated against that profile's own rules before anything is sent. The receiver must be registered on Peppol for that document type (check with GET /v1/peppol/lookup): one that is not gets the document refused by the network after the 200, and `GET /v1/peppol/status` then reports `failed`. May also be a multipart form field."},{"name":"country","in":"query","schema":{"type":"string"},"description":"Invoices only: one of your active countries (see `country` on /v1/convert). The buyer and the receiver are not checked; without `country` the receiver's Peppol scheme is only the last way to recognise the buyer's country among your active ones. May also be a multipart form field."},{"name":"send","in":"query","schema":{"type":"string","default":"true"},"description":"The literal string \"false\" stops at a provider draft, where the provider has one. Any other value sends."},{"name":"receiver","in":"query","schema":{"type":"string"},"description":"The receiver as \"scheme:id\" with a 4-digit scheme, e.g. \"0208:0123456789\". Required for a real send — except an answer to a received document (`inbound_document_id`), which goes to that document's sender."},{"name":"receiver_peppol_scheme","in":"query","schema":{"type":"string"},"description":"Split alternative to `receiver` — 4-digit scheme."},{"name":"receiver_peppol_id","in":"query","schema":{"type":"string"},"description":"Split alternative to `receiver` — the participant id."},{"name":"sender","in":"query","schema":{"type":"string"},"description":"Sender as \"scheme:id\". Defaults to the account's registered Peppol id."},{"name":"sender_peppol_scheme","in":"query","schema":{"type":"string"}},{"name":"sender_peppol_id","in":"query","schema":{"type":"string"}},{"name":"format","in":"query","schema":{"type":"string"},"description":"Input format, for the multipart document types."},{"name":"locale","in":"query","schema":{"type":"string","default":"en-US"}},{"name":"date_format","in":"query","schema":{"type":"string","default":"YYYY-MM-DD"}},{"name":"validate","in":"query","schema":{"type":"string","default":"true"}},{"name":"external_id","in":"query","schema":{"type":"string","maxLength":128},"description":"Your own reference for this document (e.g. the ERP invoice id), at most 128 characters, no control characters. Echoed in the response and on status. May also be a multipart form field."},{"name":"inbound_document_id","in":"query","schema":{"type":"string","format":"uuid"},"description":"document=invoice-response only: the id of the received document this answers (from your account, the partner documents API or the client.document.received webhook). See \"Answering a received invoice\" above."},{"name":"firm","in":"query","schema":{"type":"string"},"description":"Group keys only (`gk_live_…`; ignored for every other key): the firm of your group this request is for — the firm's id or its code (the ERP company code, case-insensitive). An invoice may leave it out when it carries the seller's VAT number (BT-31): the group's firm with that VAT number is used; with both, they must name the same firm (409 `fail_firm_seller_mismatch`). Other document types and the lookup need it. Neither → 400 `fail_firm_required`; no such firm → 422 `fail_firm_unknown`; a deactivated firm → 403 `fail_firm_inactive`. From there on the request is that firm's: its countries and format, its Peppol registration, its usage and billing. For a multipart request this may also be a form field; for the JSON document types it travels as a query parameter."},{"name":"store","in":"query","schema":{"type":"string"},"description":"Group keys only: one of the firm's stores — the store key's id or the store's name (case-insensitive) — that the document is counted under. Not an active store of that firm → 422 `fail_store_unknown`. May also be a multipart form field."},{"name":"Idempotency-Key","in":"header","schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$"},"description":"Optional. A retry with the same key and the same request answers the original 200 again and sends nothing. See the description above."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"attachments":{"type":"array","items":{"type":"string","format":"binary"}},"format":{"type":"string"},"external_id":{"type":"string","maxLength":128},"firm":{"type":"string","description":"Group keys only (`gk_live_…`; ignored for every other key): the firm of your group this request is for — the firm's id or its code (the ERP company code, case-insensitive). An invoice may leave it out when it carries the seller's VAT number (BT-31): the group's firm with that VAT number is used; with both, they must name the same firm (409 `fail_firm_seller_mismatch`). Other document types and the lookup need it. Neither → 400 `fail_firm_required`; no such firm → 422 `fail_firm_unknown`; a deactivated firm → 403 `fail_firm_inactive`. From there on the request is that firm's: its countries and format, its Peppol registration, its usage and billing.","examples":["1000"]},"store":{"type":"string","description":"Group keys only: one of the firm's stores — the store key's id or the store's name (case-insensitive) — that the document is counted under. Not an active store of that firm → 422 `fail_store_unknown`."}}}},"application/json":{"schema":{"type":"object","description":"The document itself, for the JSON document types."}}}},"responses":{"200":{"description":"Accepted by the access point. A replay of an earlier send under the same Idempotency-Key carries the header `Idempotent-Replayed: true` and the original body.","headers":{"Idempotent-Replayed":{"schema":{"type":"string","enum":["true"]},"description":"Present only on a replay: nothing was sent this time."}},"content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"document_id":{"type":"string","description":"Correlation id — persist it; status polling and webhooks use it."},"external_id":{"type":"string","description":"Your `external_id`, when you sent one."},"state":{"type":"string","description":"draft | pending | sent | failed | received"},"sent":{"type":"boolean","description":"False when `send=false` stopped at a draft."},"document":{"type":"string","description":"The document type that was sent, echoing the `document` parameter."},"document_ref":{"type":"string","description":"The document's own identifier (invoice number, order id, …)."},"invoice_number":{"type":"string","description":"Present for invoices only — the earlier invoice-only contract, kept for compatibility."},"profile":{"type":"string"},"routing":{"type":"object","description":"The sender/receiver participants actually used, after defaults were applied."},"multi_tenant":{"type":"boolean","description":"Whether the send used a Peppol account attached to yours rather than this deployment's."},"validation":{"type":"object","nullable":true,"description":"Local validation outcome — `{ valid, warnings }`, or null when `validate=false`."},"request_id":{"type":"string"},"elapsed_ms":{"type":"integer"}}}}}},"400":{"description":"Invalid input, a malformed/missing `receiver` (code `fail_peppol_receiver_invalid`), a malformed Idempotency-Key (`fail_idempotency_key_invalid`) or `external_id` (`fail_external_id_invalid`), an `inbound_document_id` outside document=invoice-response or not a UUID, or an answer whose `response.responseCode` is not one of AP, RE, AB, IP, UQ, CA, PD (`fail_bad_request`). With a group key: no `firm` for a document that is not an invoice, or neither `firm` nor a seller VAT number (BT-31) for an invoice (`fail_firm_required`). A body that is not valid JSON answers `fail_body_invalid_json` (the message names the line and column); a corrupt gzip / deflate / br body `fail_body_unreadable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing API key (code `fail_api_key_missing`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Invalid or revoked API key (also returned when the key service is unreachable — auth fails closed), OR the `country` you asked for is not active for this account, or none is (code `fail_country_disabled`, envelope `error: FORBIDDEN`, `details.country` — countries are the billable entitlement, activated per account; see Entitlements), OR an explicit `profile` belongs to no active country (code `fail_profile_disabled`), OR a store key on an endpoint other than /v1/send, /v1/validate, /v1/peppol/status and /v1/peppol/lookup (code `fail_key_send_only`), a group key on an endpoint it does not support — it may call those four and /v1/convert (code `fail_group_key_route_unsupported`) — or a group key's firm is deactivated (code `fail_firm_inactive`). See \"Group and store keys\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The received document named by `inbound_document_id` does not exist or is not yours (`fail_not_found`). Nothing was sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The account is not registered on the Peppol network yet (`fail_peppol_not_registered`); a send with this Idempotency-Key is still in flight (`fail_idempotency_in_progress`); the received document already carries an accept / reject decision (`fail_inbound_already_responded`, `details.response`) or another answer to it is still being sent (`fail_inbound_response_in_progress`, `details.since`); or the access point already has this document for this receiver. With a group key: the seller's VAT number (BT-31) is another firm's than `firm` (`fail_firm_seller_mismatch`); with a store key: it is not the store's firm (`fail_seller_vat_mismatch`); with either, the invoice's seller electronic address (BT-34) is not the firm's registered Peppol identity (`fail_peppol_sender_mismatch`, `details.document_endpoint` / `details.registered`). With any key of a group firm: the firm already sent an invoice / credit note with this number in this issue year (`fail_duplicate_document`, `details.first_document_id` / `details.first_sent_at`), or one is being sent right now (`fail_duplicate_in_progress`, `details.since`). Nothing was sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The JSON body is over the 1 MB limit (`fail_body_too_large`). Send larger documents as a multipart file upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The body's charset is not UTF-8, or its Content-Encoding is not gzip, deflate or br (`fail_body_unsupported_encoding`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The document was built but failed XSD or Schematron validation (the response lists every rule that fired), OR which of your countries applies could not be settled (envelope `error: COUNTRY_INVALID`): `fail_country_unknown` (several countries active, no `country` / `profile` sent, and neither the buyer's nor the seller's country is one of them), `fail_country_unsupported` (`country` is not a catalog country). With a group key: no firm of the group matches `firm` or the seller's VAT number (`fail_firm_unknown`), or `store` is not an active store of that firm (`fail_store_unknown`). With a store key: the document carries no seller VAT number, BT-31 (`fail_seller_vat_missing`) — a store key handles only its own firm's invoices and credit notes. A JSON body nested deeper than 100 levels answers `fail_body_too_deep`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage-tier limit reached (code `fail_quota_exceeded`) or the per-minute burst limit (code `fail_rate_limited`, with Retry-After). No document is produced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected failure while building or dispatching. Report the request id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The account's network credentials could not be resolved. Nothing was sent (this fails closed rather than sending under the wrong identity).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"No access-point credentials are configured for this deployment, the account is attached to a different one than this deployment serves, the Idempotency-Key cannot be checked right now (`fail_idempotency_unavailable`), the received document cannot be checked right now (`fail_inbound_lookup_unavailable`), the access-point request budget is spent (`PEPPOL_PROVIDER_BUSY`, `fail_peppol_provider`, with `Retry-After` and `retry_after_sec`), with a group key the firm cannot be determined right now (`fail_firm_route_unavailable`), or — with any key of a group firm — whether the document number was already sent cannot be checked right now (`fail_duplicate_check_unavailable`). Nothing was sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/peppol/status/{documentId}":{"get":{"operationId":"getPeppolDeliveryStatus","summary":"Delivery state of a sent document","tags":["Peppol"],"security":[{"ApiKeyHeader":[]}],"parameters":[{"name":"documentId","in":"path","required":true,"schema":{"type":"string"},"description":"The id returned by /v1/send."}],"responses":{"200":{"description":"Normalised state plus the delivery timeline.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"document_id":{"type":"string"},"external_id":{"type":"string","description":"Your `external_id` from /v1/send, when you sent one."},"state":{"type":"string","description":"draft | pending | sent | failed | received. `sent` = delivered to the receiver's access point."},"timeline":{"type":"array","items":{"type":"object"},"description":"Delivery events, oldest first."},"document":{"type":"object","nullable":true,"description":"The access point's own record of the document, verbatim and unnormalised — a forensic aid only. Its shape is NOT contractual and changes without notice; program against `state` and `timeline`."},"request_id":{"type":"string"},"elapsed_ms":{"type":"integer"}}}}}},"401":{"description":"Missing API key (code `fail_api_key_missing`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Invalid or revoked API key (also returned when the key service is unreachable — auth fails closed), OR the `country` you asked for is not active for this account, or none is (code `fail_country_disabled`, envelope `error: FORBIDDEN`, `details.country` — countries are the billable entitlement, activated per account; see Entitlements), OR an explicit `profile` belongs to no active country (code `fail_profile_disabled`), OR a store key on an endpoint other than /v1/send, /v1/validate, /v1/peppol/status and /v1/peppol/lookup (code `fail_key_send_only`), a group key on an endpoint it does not support — it may call those four and /v1/convert (code `fail_group_key_route_unsupported`) — or a group key's firm is deactivated (code `fail_firm_inactive`). See \"Group and store keys\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown document id — or one that is not yours (a store key reads only the documents it sent; a group key those of its group's firms).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage-tier limit reached (code `fail_quota_exceeded`) or the per-minute burst limit (code `fail_rate_limited`, with Retry-After). No document is produced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The access point could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"No access-point credentials are configured for this deployment, the access-point request budget is spent (`PEPPOL_PROVIDER_BUSY`, with `Retry-After`), or — with a group key — the document's firm cannot be determined right now (`fail_firm_route_unavailable`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/peppol/lookup":{"get":{"operationId":"lookupPeppolParticipant","summary":"Is this receiver on the Peppol network?","description":"SMP participant lookup. Use it before sending to a new customer.","tags":["Peppol"],"security":[{"ApiKeyHeader":[]}],"parameters":[{"name":"peppol_id","in":"query","required":true,"schema":{"type":"string"},"description":"scheme:id, e.g. 9934:HR12345678901"},{"name":"firm","in":"query","schema":{"type":"string"},"description":"Group keys only, and REQUIRED for them (400 `fail_firm_required`): the firm of your group whose Peppol account looks the receiver up — its id or its code. No such firm → 422 `fail_firm_unknown`; deactivated → 403 `fail_firm_inactive`."},{"name":"store","in":"query","schema":{"type":"string"},"description":"Group keys only: one of the firm's stores — the store key's id or the store's name (case-insensitive) — that the document is counted under. Not an active store of that firm → 422 `fail_store_unknown`."}],"responses":{"200":{"description":"Lookup result.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"peppol_id":{"type":"string"},"registered":{"type":"boolean","description":"Whether the participant is on the network."},"supported_document_types":{"type":"array","items":{"type":"string"}},"business_card":{"type":"object","nullable":true,"description":"Registry details, when the participant publishes them."},"request_id":{"type":"string"},"elapsed_ms":{"type":"integer"}}}}}},"400":{"description":"Invalid input — missing file, unknown format/profile, or unparseable source data. With a group key: no `firm` (`fail_firm_required`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing API key (code `fail_api_key_missing`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Invalid or revoked API key (also returned when the key service is unreachable — auth fails closed), OR the `country` you asked for is not active for this account, or none is (code `fail_country_disabled`, envelope `error: FORBIDDEN`, `details.country` — countries are the billable entitlement, activated per account; see Entitlements), OR an explicit `profile` belongs to no active country (code `fail_profile_disabled`), OR a store key on an endpoint other than /v1/send, /v1/validate, /v1/peppol/status and /v1/peppol/lookup (code `fail_key_send_only`), a group key on an endpoint it does not support — it may call those four and /v1/convert (code `fail_group_key_route_unsupported`) — or a group key's firm is deactivated (code `fail_firm_inactive`). See \"Group and store keys\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"With a group key: no firm of the group matches `firm` (`fail_firm_unknown`), or `store` is not an active store of that firm (`fail_store_unknown`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage-tier limit reached (code `fail_quota_exceeded`) or the per-minute burst limit (code `fail_rate_limited`, with Retry-After). No document is produced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The registry could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"No access-point credentials are configured for this deployment, the access-point request budget is spent (`PEPPOL_PROVIDER_BUSY`, with `Retry-After`), or — with a group key — the firm cannot be determined right now (`fail_firm_route_unavailable`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/peppol/events":{"get":{"operationId":"listPeppolWebhookEvents","summary":"Recent webhook events (operators only)","description":"An in-memory ring buffer for debugging a deployment. Requires the service token, NOT an API key — the buffer is instance-global and must never show one customer another's traffic.","tags":["Callbacks"],"security":[{"ServiceToken":[]}],"responses":{"200":{"description":"Buffered events.","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Missing or wrong service token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/peppol/webhook":{"post":{"operationId":"receivePeppolWebhookEvent","summary":"Access-point event receiver","description":"Called BY the access point, not by you. Signature-verified; the event is only acknowledged once it has been durably stored, so a transient failure gets redelivered instead of being swallowed.","tags":["Callbacks"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Event stored."},"400":{"description":"The payload could not be read as an event. A body that is not valid JSON answers `fail_body_invalid_json` (the message names the line and column); a corrupt gzip / deflate / br body `fail_body_unreadable`."},"401":{"description":"Signature verification failed."},"413":{"description":"The JSON body is over the 1 MB limit (`fail_body_too_large`). Send larger documents as a multipart file upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The body's charset is not UTF-8, or its Content-Encoding is not gzip, deflate or br (`fail_body_unsupported_encoding`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A JSON body nested deeper than 100 levels answers `fail_body_too_deep`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The event could not be stored — the provider should retry."}}}},"/v1/erp/{connector}":{"post":{"operationId":"convertErpPayload","summary":"Convert an ERP-native payload","description":"Push your ERP's own invoice export and get a compliant document back. Connector ids come from `/v1/formats` (`erp_connectors`). Each connector must be enabled per account.","tags":["ERP"],"security":[{"ApiKeyHeader":[]}],"parameters":[{"name":"connector","in":"path","required":true,"schema":{"type":"string"},"examples":["business-central"]},{"name":"profile","in":"query","schema":{"type":"string","default":"peppol-bis-3"},"description":"Output profile. Defaults to peppol-bis-3 when neither `profile` nor `country` is given (the documented legacy call keeps its output); with `country` and no `profile` that country's format is used."},{"name":"country","in":"query","schema":{"type":"string"},"description":"Optional: one of your active countries (see /v1/convert) — every document is produced in its format. Not active → the request is refused 403 `fail_country_disabled`."},{"name":"validate","in":"query","schema":{"type":"string","default":"true"},"description":"Set to \"false\" to skip XSD/Schematron validation."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The ERP's native payload. For `sap`: `{ \"idocXml\": \"<INVOIC02>…</INVOIC02>\" }`, optionally with `\"sapConvention\": \"sap-standard\" | \"xl-corpus\"` (alias `\"e1edk02Convention\"`) — how the IDoc's qualifiers are read: the E1EDK02 references, the E1EDS01 totals and the terms of payment. By default each IDoc is read as SAP defines them (E1EDK02 001 = your customer's purchase order, 002 = your sales order, 009 = the invoice number; E1EDS01 001 = number of items, 002 = net value; payment terms from E1EDK18), unless the IDoc itself shows the legacy layout (`xl-corpus`: E1EDK02 001 = the invoice number, 002 = the purchase order; E1EDS01 001 = the sum of the line net amounts, 002 = the number of lines; payment terms from the E1EDK01 ZTERM key). Any other value, or two fields that disagree, is refused (422)."}}}},"responses":{"200":{"description":"One result per invoice found in the payload.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"connector":{"type":"string"},"profile":{"type":"string"},"count":{"type":"integer"},"documents":{"type":"array","items":{"type":"object"}}}}}}},"400":{"description":"Invalid input — missing file, unknown format/profile, or unparseable source data. A body that is not valid JSON answers `fail_body_invalid_json` (the message names the line and column); a corrupt gzip / deflate / br body `fail_body_unreadable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing API key (code `fail_api_key_missing`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Invalid or revoked API key (also returned when the key service is unreachable — auth fails closed), OR the `country` you asked for is not active for this account, or none is (code `fail_country_disabled`, envelope `error: FORBIDDEN`, `details.country` — countries are the billable entitlement, activated per account; see Entitlements), OR an explicit `profile` belongs to no active country (code `fail_profile_disabled`), OR a store key on an endpoint other than /v1/send, /v1/validate, /v1/peppol/status and /v1/peppol/lookup (code `fail_key_send_only`), a group key on an endpoint it does not support — it may call those four and /v1/convert (code `fail_group_key_route_unsupported`) — or a group key's firm is deactivated (code `fail_firm_inactive`). See \"Group and store keys\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown connector id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The JSON body is over the 1 MB limit (`fail_body_too_large`). Send larger documents as a multipart file upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The body's charset is not UTF-8, or its Content-Encoding is not gzip, deflate or br (`fail_body_unsupported_encoding`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The document was built but failed XSD or Schematron validation (the response lists every rule that fired), OR which of your countries applies could not be settled (envelope `error: COUNTRY_INVALID`): `fail_country_unknown` (several countries active, no `country` / `profile` sent, and neither the buyer's nor the seller's country is one of them), `fail_country_unsupported` (`country` is not a catalog country). A JSON body nested deeper than 100 levels answers `fail_body_too_deep`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage-tier limit reached (code `fail_quota_exceeded`) or the per-minute burst limit (code `fail_rate_limited`, with Retry-After). No document is produced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/email/inbound":{"post":{"operationId":"receiveInboundEmail","summary":"Convert by e-mail (provider webhook)","description":"Called by the inbound e-mail provider, not by you. The API key travels in the e-mail subject; a reply is only ever sent when that key is valid, so the endpoint cannot be used to mail a spoofed sender.","tags":["Callbacks"],"security":[],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Processed. In dry-run mode the composed reply is returned instead of sent."},"401":{"description":"The webhook secret did not match (only when one is configured).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/fr/documents":{"post":{"operationId":"frRegisterDocuments","summary":"Register issued/received invoices for French lifecycle tracking","description":"Idempotent upsert keyed on SIREN + invoice number + issue year + direction (the PPF uniqueness key). Registering the VAT breakdown lets `/v1/fr/payments` derive the per-rate split of a collected amount pro-rata (REJ_ENCAISSEMENT guard). Send one object or `{ \"documents\": [...] }` (≤500).","tags":["France"],"security":[{"ApiKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"siren":{"type":"string","description":"9-digit SIREN of your French entity."},"invoice_number":{"type":"string"},"issue_date":{"type":"string","description":"YYYY-MM-DD."},"direction":{"type":"string","enum":["outbound","inbound"],"default":"outbound"},"type_code":{"type":"string"},"currency":{"type":"string"},"payable_amount":{"type":"string"},"vat_breakdown":{"type":"array","items":{"type":"object","properties":{"percent":{"type":"string"},"taxable":{"type":"string"},"tax":{"type":"string"}}}}}}}}}}}},"responses":{"200":{"description":"Per-document upsert results.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input — missing file, unknown format/profile, or unparseable source data. A body that is not valid JSON answers `fail_body_invalid_json` (the message names the line and column); a corrupt gzip / deflate / br body `fail_body_unreadable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing API key (code `fail_api_key_missing`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Invalid or revoked API key (also returned when the key service is unreachable — auth fails closed), OR the `country` you asked for is not active for this account, or none is (code `fail_country_disabled`, envelope `error: FORBIDDEN`, `details.country` — countries are the billable entitlement, activated per account; see Entitlements), OR an explicit `profile` belongs to no active country (code `fail_profile_disabled`), OR a store key on an endpoint other than /v1/send, /v1/validate, /v1/peppol/status and /v1/peppol/lookup (code `fail_key_send_only`), a group key on an endpoint it does not support — it may call those four and /v1/convert (code `fail_group_key_route_unsupported`) — or a group key's firm is deactivated (code `fail_firm_inactive`). See \"Group and store keys\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The JSON body is over the 1 MB limit (`fail_body_too_large`). Send larger documents as a multipart file upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The body's charset is not UTF-8, or its Content-Encoding is not gzip, deflate or br (`fail_body_unsupported_encoding`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A JSON body nested deeper than 100 levels answers `fail_body_too_deep`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage-tier limit reached (code `fail_quota_exceeded`) or the per-minute burst limit (code `fail_rate_limited`, with Retry-After). No document is produced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The compliance store is unreachable — nothing was recorded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/fr/status":{"post":{"operationId":"frPushLifecycleStatus","summary":"Push a lifecycle status (cycle de vie)","description":"One item = one CDV event. Use a workflow `action` (acknowledge/approve/`approve_partial`/dispute/suspend/complete/refuse/`payment_sent`) or a numeric `status` (200..213). The store enforces the chronology (REJ_INC): nothing after 210/213, no duplicates except 212, 213 only at the platform gate. Refusals (210) and disputes (207) require a `reason`. The four PPF-mandatory statuses (200/210/212/213) are queued for transmission once a Plateforme Agréée is connected.","tags":["France"],"security":[{"ApiKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"siren":{"type":"string"},"invoice_number":{"type":"string"},"issue_date":{"type":"string","description":"YYYY-MM-DD. Required unless `issue_year` is given — the issue year is part of the PPF uniqueness key and is never guessed."},"issue_year":{"type":"integer","description":"Alternative to `issue_date` when only the year is known."},"action":{"type":"string"},"status":{"type":"integer","description":"Official code 200..213 (alternative to action)."},"reason":{"type":"string"},"at":{"type":"string","description":"Status timestamp (ISO); defaults to now. The 24-hour PPF rule counts from this."}}}}}}}}},"responses":{"200":{"description":"Per-event results (accepted events include the stored status history).","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input — missing file, unknown format/profile, or unparseable source data. A body that is not valid JSON answers `fail_body_invalid_json` (the message names the line and column); a corrupt gzip / deflate / br body `fail_body_unreadable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing API key (code `fail_api_key_missing`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Invalid or revoked API key (also returned when the key service is unreachable — auth fails closed), OR the `country` you asked for is not active for this account, or none is (code `fail_country_disabled`, envelope `error: FORBIDDEN`, `details.country` — countries are the billable entitlement, activated per account; see Entitlements), OR an explicit `profile` belongs to no active country (code `fail_profile_disabled`), OR a store key on an endpoint other than /v1/send, /v1/validate, /v1/peppol/status and /v1/peppol/lookup (code `fail_key_send_only`), a group key on an endpoint it does not support — it may call those four and /v1/convert (code `fail_group_key_route_unsupported`) — or a group key's firm is deactivated (code `fail_firm_inactive`). See \"Group and store keys\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Chronology violation (code `fail_fr_status_transition`) — the event was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The JSON body is over the 1 MB limit (`fail_body_too_large`). Send larger documents as a multipart file upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The body's charset is not UTF-8, or its Content-Encoding is not gzip, deflate or br (`fail_body_unsupported_encoding`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A JSON body nested deeper than 100 levels answers `fail_body_too_deep`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage-tier limit reached (code `fail_quota_exceeded`) or the per-minute burst limit (code `fail_rate_limited`, with Retry-After). No document is produced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The compliance store is unreachable — nothing was recorded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/fr/payments":{"post":{"operationId":"frReportPayments","summary":"Report collected payments (encaissements)","description":"Each item sets status 212 on the referenced invoice and feeds the e-reporting payment blocks (10.2/10.4) where applicable. `amount` is the collected TTC for ONE payment event (one item per partial payment). Without an explicit `split`, the per-rate breakdown is derived pro-rata from the registered document's VAT breakdown — exact to the cent, Σ splits = amount. A nightly batch of cleared items satisfies the 24-hour rule (the status timestamp is `paid_at`).","tags":["France"],"security":[{"ApiKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"payments":{"type":"array","items":{"type":"object","properties":{"siren":{"type":"string"},"invoice_number":{"type":"string"},"issue_date":{"type":"string","description":"YYYY-MM-DD. Required unless `issue_year` is given — the issue year is part of the PPF uniqueness key and is never guessed."},"issue_year":{"type":"integer","description":"Alternative to `issue_date` when only the year is known."},"paid_at":{"type":"string","description":"Bank VALUE date (YYYY-MM-DD), not the posting date."},"amount":{"type":"string","description":"Collected TTC, ≤2 decimals. Negative = refund."},"payment_ref":{"type":"string","description":"Bank/ERP payment id, 1..80 chars. Makes the push IDEMPOTENT per document: replaying the same (invoice, `payment_ref`) records nothing and answers duplicate:true — safe nightly re-runs."},"currency":{"type":"string","default":"EUR"},"split":{"type":"array","items":{"type":"object","properties":{"percent":{"type":"string"},"amount":{"type":"string"}}},"description":"Optional per-rate breakdown; derived pro-rata when absent."},"means_code":{"type":"string","description":"UNTDID 4461 (58 SEPA credit transfer, …)."},"reference":{"type":"string"}}}}}}}}},"responses":{"200":{"description":"Per-payment results incl. the applied split and the created 212 event.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input — missing file, unknown format/profile, or unparseable source data. A body that is not valid JSON answers `fail_body_invalid_json` (the message names the line and column); a corrupt gzip / deflate / br body `fail_body_unreadable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing API key (code `fail_api_key_missing`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Invalid or revoked API key (also returned when the key service is unreachable — auth fails closed), OR the `country` you asked for is not active for this account, or none is (code `fail_country_disabled`, envelope `error: FORBIDDEN`, `details.country` — countries are the billable entitlement, activated per account; see Entitlements), OR an explicit `profile` belongs to no active country (code `fail_profile_disabled`), OR a store key on an endpoint other than /v1/send, /v1/validate, /v1/peppol/status and /v1/peppol/lookup (code `fail_key_send_only`), a group key on an endpoint it does not support — it may call those four and /v1/convert (code `fail_group_key_route_unsupported`) — or a group key's firm is deactivated (code `fail_firm_inactive`). See \"Group and store keys\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The cumulative collected amount would exceed the amount due (REJ_ENCAISSEMENT guard), or the lifecycle refuses 212.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The JSON body is over the 1 MB limit (`fail_body_too_large`). Send larger documents as a multipart file upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The body's charset is not UTF-8, or its Content-Encoding is not gzip, deflate or br (`fail_body_unsupported_encoding`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A JSON body nested deeper than 100 levels answers `fail_body_too_deep`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage-tier limit reached (code `fail_quota_exceeded`) or the per-minute burst limit (code `fail_rate_limited`, with Retry-After). No document is produced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The compliance store is unreachable — nothing was recorded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/fr/ereporting/transactions":{"post":{"operationId":"frReportEreportingTransactions","summary":"Declare e-reporting transactions (flux 10.1, international B2B)","description":"One record per cross-border invoice (intra-group sales/purchases, exports, …). Each `record` is validated against the OFFICIAL flux-10 rules at ingest (G1.02 cadre, G1.05 id, G1.53 coherence ±0.01, G6.28 buyer mandatory, …) — a bad record is rejected with the official rule id. `operation_date` (fait générateur) decides the reporting period; invoices already sent through `/v1/send` are captured automatically when this feature is enabled.","tags":["France"],"security":[{"ApiKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"transactions":{"type":"array","items":{"type":"object","properties":{"siren":{"type":"string"},"direction":{"type":"string","enum":["sale","purchase"],"default":"sale"},"operation_date":{"type":"string","description":"YYYY-MM-DD — fait générateur (defaults to the invoice issue date)."},"record":{"type":"object","description":"The flux 10.1 invoice record: number, issueDate, typeCode, currency, cadre (B1/S1/M1/…), seller/buyer { companyId, schemeId, vatId, countryCode }, totals { taxExclusive, taxEur }, taxSubtotals [{ taxable, tax, categoryCode, percent }]."}}}}}}}}},"responses":{"200":{"description":"Per-record upsert results.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"A record violates an official flux 10 rule (code `fail_fr_ereporting_input` — the message carries the rule id). A body that is not valid JSON answers `fail_body_invalid_json` (the message names the line and column); a corrupt gzip / deflate / br body `fail_body_unreadable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing API key (code `fail_api_key_missing`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Invalid or revoked API key (also returned when the key service is unreachable — auth fails closed), OR the `country` you asked for is not active for this account, or none is (code `fail_country_disabled`, envelope `error: FORBIDDEN`, `details.country` — countries are the billable entitlement, activated per account; see Entitlements), OR an explicit `profile` belongs to no active country (code `fail_profile_disabled`), OR a store key on an endpoint other than /v1/send, /v1/validate, /v1/peppol/status and /v1/peppol/lookup (code `fail_key_send_only`), a group key on an endpoint it does not support — it may call those four and /v1/convert (code `fail_group_key_route_unsupported`) — or a group key's firm is deactivated (code `fail_firm_inactive`). See \"Group and store keys\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The JSON body is over the 1 MB limit (`fail_body_too_large`). Send larger documents as a multipart file upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The body's charset is not UTF-8, or its Content-Encoding is not gzip, deflate or br (`fail_body_unsupported_encoding`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A JSON body nested deeper than 100 levels answers `fail_body_too_deep`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage-tier limit reached (code `fail_quota_exceeded`) or the per-minute burst limit (code `fail_rate_limited`, with Retry-After). No document is produced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The compliance store is unreachable — nothing was recorded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/fr/ereporting/b2c-daily":{"post":{"operationId":"frReportB2cDailyAggregates","summary":"Declare B2C daily aggregates (flux 10.3)","description":"One aggregate per day × category × currency (Z-report style), replace-on-conflict — re-sending a corrected day overwrites it and flags the affected period for a rectificative transmission. Categories per rule G1.68: TLB1 goods, TPS1 services, TNT1 not subject to French VAT, TMA1 margin schemes.","tags":["France"],"security":[{"ApiKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"aggregates":{"type":"array","items":{"type":"object","properties":{"siren":{"type":"string"},"record":{"type":"object","description":"The flux 10.3 aggregate: date, currency, category (TLB1/TPS1/TNT1/TMA1), taxExclusive, taxEur, transactionsCount?, taxSubtotals [{ percent, taxable, tax }]."}}}}}}}}},"responses":{"200":{"description":"Per-aggregate upsert results.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"An aggregate violates an official flux 10 rule (code `fail_fr_ereporting_input`). A body that is not valid JSON answers `fail_body_invalid_json` (the message names the line and column); a corrupt gzip / deflate / br body `fail_body_unreadable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing API key (code `fail_api_key_missing`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Invalid or revoked API key (also returned when the key service is unreachable — auth fails closed), OR the `country` you asked for is not active for this account, or none is (code `fail_country_disabled`, envelope `error: FORBIDDEN`, `details.country` — countries are the billable entitlement, activated per account; see Entitlements), OR an explicit `profile` belongs to no active country (code `fail_profile_disabled`), OR a store key on an endpoint other than /v1/send, /v1/validate, /v1/peppol/status and /v1/peppol/lookup (code `fail_key_send_only`), a group key on an endpoint it does not support — it may call those four and /v1/convert (code `fail_group_key_route_unsupported`) — or a group key's firm is deactivated (code `fail_firm_inactive`). See \"Group and store keys\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The JSON body is over the 1 MB limit (`fail_body_too_large`). Send larger documents as a multipart file upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The body's charset is not UTF-8, or its Content-Encoding is not gzip, deflate or br (`fail_body_unsupported_encoding`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A JSON body nested deeper than 100 levels answers `fail_body_too_deep`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage-tier limit reached (code `fail_quota_exceeded`) or the per-minute burst limit (code `fail_rate_limited`, with Retry-After). No document is produced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The compliance store is unreachable — nothing was recorded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/fr/periods":{"get":{"operationId":"frListPeriods","summary":"List e-reporting periods and their state","description":"Periods are derived per SIREN from the entity's VAT regime (réel normal monthly: transactions per decade + payments monthly, deadline +10 days; quarterly/RSI: monthly). States: open → ready → exported → submitted/accepted/rejected; `empty` periods are skipped (no nil returns). A correction supersedes the whole period for that SIREN (new version, type RE).","tags":["France"],"security":[{"ApiKeyHeader":[]}],"parameters":[{"name":"siren","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"block","in":"query","schema":{"type":"string","enum":["transactions","payments"]}}],"responses":{"200":{"description":"Periods with due dates, record counts and state.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing API key (code `fail_api_key_missing`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Invalid or revoked API key (also returned when the key service is unreachable — auth fails closed), OR the `country` you asked for is not active for this account, or none is (code `fail_country_disabled`, envelope `error: FORBIDDEN`, `details.country` — countries are the billable entitlement, activated per account; see Entitlements), OR an explicit `profile` belongs to no active country (code `fail_profile_disabled`), OR a store key on an endpoint other than /v1/send, /v1/validate, /v1/peppol/status and /v1/peppol/lookup (code `fail_key_send_only`), a group key on an endpoint it does not support — it may call those four and /v1/convert (code `fail_group_key_route_unsupported`) — or a group key's firm is deactivated (code `fail_firm_inactive`). See \"Group and store keys\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage-tier limit reached (code `fail_quota_exceeded`) or the per-minute burst limit (code `fail_rate_limited`, with Retry-After). No document is produced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The compliance store is unreachable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/fr/periods/{id}/export":{"get":{"operationId":"frExportPeriodXml","summary":"Export a period as official flux 10 XML","description":"Builds the DGFiP flux 10 document (specs v3.2) from the period's stored records, validates it against the official XSD, marks the period exported and returns the XML — ready to hand to whichever Plateforme Agréée transmits it. The transmitting-platform block (TG-3) uses FR_PA_ID / FR_PA_NAME when configured; until then a placeholder is emitted and flagged with the X-Fr-Sender-Placeholder response header.","tags":["France"],"security":[{"ApiKeyHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The flux 10 XML (X-Fr-Transmission-Id / X-Fr-Transmission-Type headers carry the TT-1/TT-4 values).","content":{"application/xml":{"schema":{"type":"string"}}}},"401":{"description":"Missing API key (code `fail_api_key_missing`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Invalid or revoked API key (also returned when the key service is unreachable — auth fails closed), OR the `country` you asked for is not active for this account, or none is (code `fail_country_disabled`, envelope `error: FORBIDDEN`, `details.country` — countries are the billable entitlement, activated per account; see Entitlements), OR an explicit `profile` belongs to no active country (code `fail_profile_disabled`), OR a store key on an endpoint other than /v1/send, /v1/validate, /v1/peppol/status and /v1/peppol/lookup (code `fail_key_send_only`), a group key on an endpoint it does not support — it may call those four and /v1/convert (code `fail_group_key_route_unsupported`) — or a group key's firm is deactivated (code `fail_firm_inactive`). See \"Group and store keys\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown period id (or not yours).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The stored records violate an official rule — correct the data and rebuild the period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage-tier limit reached (code `fail_quota_exceeded`) or the per-minute burst limit (code `fail_rate_limited`, with Retry-After). No document is produced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The compliance store is unreachable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}