Skip to content
API Reference

MyInvoice API documentation

The MyInvoice API converts CSV, Excel, UBL 2.1, CII, EDIFACT and national e-invoice XML (FatturaPA, Facturae, KSeF, myDATA, e-SLOG) into compliant e-invoices, Peppol procurement documents and Peppol Logistics documents — Peppol BIS 3.0, XRechnung, Factur-X / ZUGFeRD, FatturaPA, KSeF, ZATCA, UBL-TR and more — with XSD and Schematron validation, and then sends and receives them over the Peppol network. It is a predictable REST API you can integrate in an afternoon.

Base URL: https://api.myinvoice.llc. All conversion endpoints return the generated XML directly in the response body (or a ZIP for batch/multi-file requests), with rich response headers and a request id for tracing.

Privacy: conversion is stateless. Your file is processed in memory, returned in the response and not persisted — MyInvoice does not store your invoices or their contents. If a document is refused, the diagnosis log keeps its cause, the business partner or item name and the invoice number for 90 days; you can switch it off in Settings (see the privacy policy).

Authentication

Every request to a protected endpoint must include an API key. Keys look like ek_live_<32 hex chars> and are created and managed in your account.

Recommended — header

X-API-Key: ek_live_<your_key>

Alternative — Bearer token

Authorization: Bearer ek_live_<your_key>

Do not send the API key as a query-string parameter (?api_key=…) in production — query strings are logged by servers and proxies.

Endpoint overview

MethodPathDescriptionAuth
GET/healthService statusNo
GET/openapi.jsonMachine-readable OpenAPI 3.1 specNo
GET/docsInteractive API reference (Swagger UI)No
GET/v1/formatsSupported formats and countriesNo
GET/v1/countriesThe country catalog — every country and its formatNo
POST/v1/convertConvert a single invoice → XML (or a Factur-X PDF)Yes
POST/v1/validateValidate a finished e-invoice you already have — findings only, nothing producedYes
POST/v1/batchBatch CSV (many invoices) → ZIPYes
POST/v1/convert-multiUp to 20 mixed files → ZIPYes
POST/v1/orderOrder (T01) → UBL XMLYes
POST/v1/order-responseOrder response (T76) → UBL XMLYes
POST/v1/despatch-adviceDespatch advice (T16) → UBL XMLYes
POST/v1/catalogueCatalogue (T19), JSON body → UBL XMLYes
POST/v1/punch-outPunchOut catalogue (T77), JSON body → UBL XMLYes
POST/v1/catalogue-responseCatalogue response (T58), JSON body → UBL XMLYes
POST/v1/invoice-responseInvoice response (T111), JSON body → UBL XMLYes
POST/v1/mlrMessage level response (T71), JSON body → UBL XMLYes
POST/v1/logistics/…Peppol Logistics 1.3 (T120–T129), JSON body → UBL XMLYes
POST/v1/erp/:connectorERP push (native payload) → XMLYes
POST/v1/email/inboundConvert by email (inbound webhook)No
POST/v1/sendSend a document over the Peppol networkYes
GET/v1/peppol/status/:documentIdDelivery state + timeline for a sent documentYes
GET/v1/peppol/lookupSMP lookup — is this receiver reachable on Peppol?Yes
POST/v1/fr/documents · /v1/fr/status · /v1/fr/paymentsFrance: lifecycle (cycle de vie) and payments (encaissements)Yes
POST/v1/fr/ereporting/transactions · /v1/fr/ereporting/b2c-dailyFrance: e-reporting — flux 10.1 international B2B and 10.3 B2C daily totalsYes
GET/v1/fr/periods · /v1/fr/periods/:id/exportFrance: e-reporting periods and their export as official flux 10 XMLYes

The complete machine-readable description of every endpoint, parameter and response shape is served at GET /openapi.json (OpenAPI 3.1, no API key required), and the same description is rendered as a browsable reference with a working "Try it out" at https://api.myinvoice.llc/docs. Document endpoints return the XML directly in the response body with metadata in headers — not a JSON envelope.

POST /v1/convert — Convert an invoice

Converts a single invoice from CSV, Excel, UBL 2.1, CII, EDIFACT or national e-invoice XML into a compliant document in the format of the country you choose (the country parameter), optionally running XSD and Schematron validation. Send multipart/form-data.

ParameterRequiredDescription
fileYesThe input file — CSV / XLSX / UBL XML / CII XML / EDIFACT / PDF / national e-invoice XML.
formatYesInput format: csv | excel | ubl | cii | edifact | fatturapa | facturae | ksef-fa3 | mydata | eslog | legacy-xml.
countryNoThe country whose format you need, e.g. IT (FatturaPA), HR or DE (see the table below); it must be active on your account. The buyer on the document is not checked against it. Without it: the buyer’s country if active, else the seller’s, else your only active country — otherwise 422 fail_country_unknown.
profileNoFor existing integrations: an explicit output format id (GET /v1/formats lists them). It must belong to one of your active countries. Normally leave it out — the format follows the country.
localeNoDecimal localisation, e.g. de-DE (default en-US).
date_formatNoDate format in CSV, e.g. DD.MM.YYYY (default YYYY-MM-DD).
validateNoRun XSD + Schematron validation: true/false (default true).
mappingNoJSON field-mapping object — required for the legacy-xml format.
pdf_fileNoAlternative file field for a ZUGFeRD / Factur-X PDF (use with format=cii).
outputNopdf — return the finished Factur-X PDF/A-3 with the CII XML embedded instead of the bare XML. Available when the output is Factur-X, e.g. country=FR.
base_pdfNoYour own invoice PDF to use as the visual layer of the Factur-X (implies output=pdf). Without it we render a neutral A4 layout; supply your own base when you need a strictly conformant PDF/A-3.
attachmentsNoUp to 10 supporting documents (BG-24) embedded into the output — PDF, PNG, JPEG, CSV, XLSX, ODS; 5 MB each, 10 MB combined. Output formats that cannot carry attachments return 400 rather than silently dropping them.

Input formats

idDescription
csvCSV spreadsheet with one or more invoices.
excelExcel workbook (.xlsx / .xls) — same schema as CSV.
ublUBL 2.1 Invoice or CreditNote XML.
ciiUN/CEFACT CII XML, or a ZUGFeRD / Factur-X PDF (the embedded XML is extracted automatically).
edifactEDIFACT D.96A INVOIC message.
fatturapaItaly FatturaPA — FatturaElettronica v1.2 (FPR12 / FPA12) XML.
facturaeSpain Facturae 3.2 / 3.2.1 / 3.2.2 XML.
ksef-fa3Poland KSeF FA(3) structured-invoice XML.
mydataGreece myDATA / AADE XML (AadeBookInvoiceType).
eslogSlovenia e-SLOG 2.0 XML (XML-serialised EDIFACT INVOIC).
legacy-xmlProprietary XML — requires the mapping parameter.

Countries

You choose countries, not formats. Each country you activate is one format — Italy gives FatturaPA, Croatia eRačun (HR CIUS), Germany Peppol — and you pick it per request with the country parameter. The buyer on the document is not checked: a Croatian company with only Croatia active can send an invoice to a German buyer over Peppol. Countries are activated per account (€150 per country per month); a country that is not active is refused with 403 fail_country_disabled, and a country outside this table cannot be activated.

countryCountry — formatStatus
AUAustralia — PINT A-NZIn preparation
ATAustria — PeppolLive
BEBelgium — PeppolLive
BGBulgaria — PeppolLive
CACanada — PeppolLive
CNChina — PeppolLive
HRCroatia — eRačun (HR CIUS)Live
CYCyprus — PeppolLive
CZCzechia — PeppolLive
DKDenmark — PeppolLive
EEEstonia — PeppolLive
FIFinland — PeppolLive
FRFrance — Factur-XIn preparation
DEGermany — PeppolLive
GRGreece — myDATAPlanned
HUHungary — PeppolLive
ISIceland — PeppolLive
IEIreland — PeppolLive
ITItaly — FatturaPAPlanned
JPJapan — JP PINTPlanned
LVLatvia — PeppolLive
LILiechtenstein — PeppolLive
LTLithuania — PeppolLive
LULuxembourg — PeppolLive
MYMalaysia — PINT MYLive
MTMalta — PeppolLive
NLNetherlands — PeppolLive
NZNew Zealand — PINT A-NZIn preparation
NGNigeria — PeppolLive
MKNorth Macedonia — UJP e-FakturaConversion only
NONorway — EHF (Peppol)Live
OMOman — PINT OMPlanned
PLPoland — KSeF FA(3)In preparation
PTPortugal — PeppolLive
RORomania — RO CIUS (e-Factura)Live
SASaudi Arabia — ZATCAConversion only
SGSingapore — PINT SGIn preparation
SKSlovakia — PeppolLive
SISlovenia — PeppolLive
ZASouth Africa — PeppolLive
ESSpain — PeppolPlanned
SESweden — PeppolLive
CHSwitzerland — PeppolLive
TRTürkiye — UBL-TR (e-Fatura)Conversion only
AEUnited Arab Emirates — PINT AEIn preparation
GBUnited Kingdom — PeppolLive
USUnited States — PeppolLive

FatturaPA and KSeF FA(3) are national XSD-validated formats (no EN 16931 / Peppol Schematron). Both are in beta: they generate valid XML; national signature/submission is on the roadmap. ZATCA and UBL-TR documents are likewise returned unsigned — the cryptographic stamp (CSID / Mali Mühür) and portal clearance stay with your onboarded system.

Response headers

  • X-Invoice-Number, X-Invoice-Date, X-Profile — echo the produced document.
  • X-Country — the country the document was entitled and billed under (ISO 3166-1 alpha-2).
  • X-Validation-Warnings — number of non-fatal validation warnings. Sent only when there was at least one, so treat a missing header as zero rather than parsing it unconditionally.
  • X-Elapsed-Ms, X-Request-Id — timing and a trace id for support.

CSV / Excel input format

CSV is the quickest way to integrate: one flat file, no XML toolchain. The same column schema applies to Excel workbooks (format=excel) — the sheet is read exactly like the CSV.

The header row carries both the invoice fields and the fields of the first invoice line. Each additional line is a new row that leaves invoice_number empty — the invoice-level values are inherited from the first row. One file may contain several invoices: a row with a new invoice_number starts a new document.

Invoice columns

ColumnReq.DescriptionExample
invoice_numberYesInvoice number.INV-2024-001
issue_dateYesIssue date (YYYY-MM-DD, or per date_format).2024-01-15
type_codeYes380 = invoice · 381 = credit note.380
currencyYesISO 4217 currency code.EUR
due_dateNoPayment due date.2024-02-15
buyer_referenceNoBuyer reference (BT-10) — often required for B2G.PO-2024-001
seller_nameYesSeller’s legal name.Moja Firma d.o.o.
seller_vat_idNoSeller’s VAT identifier.HR12345678901
seller_endpoint_idNoSeller’s Peppol endpoint id.HR12345678901
seller_endpoint_schemeNoEAS code (9934 = HR VAT id).9934
seller_streetNoSeller’s street.Ilica 1
seller_cityYesSeller’s city.Zagreb
seller_zipNoSeller’s postal code.10000
seller_countryYesISO 3166-1 alpha-2 code.HR
buyer_nameYesBuyer’s legal name.Kupac d.o.o.
buyer_vat_idNoBuyer’s VAT identifier.HR98765432101
buyer_endpoint_idNoBuyer’s Peppol endpoint id.HR98765432101
buyer_endpoint_schemeNoBuyer’s EAS code.9934
buyer_streetNoBuyer’s street.Savska 2
buyer_cityYesBuyer’s city.Zagreb
buyer_zipNoBuyer’s postal code.10000
buyer_countryYesISO 3166-1 alpha-2 code.HR
payment_means_codeYes30 = IBAN bank transfer.30
ibanNoSeller’s IBAN.HR1234567890123456789
payment_referenceNoPayment reference.INV-2024-001

Invoice-line columns

ColumnReq.DescriptionExample
line_idYesSequential line number (1, 2, 3…).1
line_nameYesLine item name.Consulting service
line_descriptionNoLine item description.Q1 advisory
quantityYesQuantity.10
unit_codeYesUN/ECE code — C62 = piece · HUR = hour · MTR = metre.HUR
unit_priceYesUnit price, excluding VAT.100.00
tax_categoryYesS = standard · Z = zero · E = exempt.S
tax_rateYesVAT rate in percent.25
line_allowance_amountNoLine allowance / discount.10.00
line_charge_amountNoLine charge / surcharge.5.00

Req. means the CSV parser rejects the file without it (422 PARSE_ERROR, code fail_required_field). It is not the same as what a given country’s format requires: an optional column here can still be mandatory for the target format, and then validation fails at the next step with a Schematron rule id — e.g. omitting seller_vat_id yields BR-S-02 on a standard-rated invoice. Totals, VAT breakdown and document-level sums are always computed by us from the lines; do not send them.

ERP connectors

POST your ERP’s native payload to /v1/erp/:connector with your API key and get back a compliant document. A push model: your systems call us, we never store ERP credentials and never call back into your ERP. Totals and the VAT breakdown are always recomputed from the lines.

connectorPayloadNotes
business-centralJSONDynamics 365 Business Central sales invoice.
d365foJSONDynamics 365 Finance & Operations (ER / data-entity).
sapXML / JSONSAP IDoc INVOIC01/02 (ECC / S/4HANA); partners resolved by PARVW role.
business-oneJSONSAP Business One (Service Layer / DI API) — the caller supplies the issuing seller party.
inforXML / JSONInfor OAGIS Invoice BOD via ION (may carry several invoices).
genericJSONAny standard export: { format, content } where format is ubl | csv | excel | edifact | legacy-xml.

Connectors are off by default. Until one is enabled for your account it answers 403 FORBIDDEN with code fail_erp_connector_disabled — ask support to activate the connector you need. Every other endpoint on this page works with a new key straight away.

Peppol Logistics

Post-award transport and delivery documents per Peppol Logistics 1.3. Each endpoint takes a JSON body, serialises to UBL, validates against the UBL XSD and the official Peppol Logistics Schematron, and returns the XML.

EndpointTxDocument
/v1/logistics/advanced-despatch-adviceT120Advanced Despatch Advice
/v1/logistics/weight-statementT122Weight Statement (UBL 2.3)
/v1/logistics/transport-execution-plan-requestT123Transport Execution Plan Request
/v1/logistics/transport-execution-planT124Transport Execution Plan
/v1/logistics/waybillT125Waybill
/v1/logistics/transportation-status-requestT126Transportation Status Request
/v1/logistics/transportation-statusT127Transportation Status
/v1/logistics/receipt-adviceT128Receipt Advice
/v1/logistics/application-responseT129Logistics Application Response

Email gateway

Convert invoices by email. An inbound-parse provider POSTs the parsed email to /v1/email/inbound; the API key (and an optional country=<XX>) travel in the email subject. Each attachment runs the standard pipeline and the reply is an email with a ZIP of generated XML. A reply is sent only when the key is valid, so the gateway cannot be abused to spam spoofed senders.

Peppol delivery — send, receive and track

The conversion endpoints hand you the XML. /v1/send goes one step further and transmits it over the Peppol network to the receiver you name, so the compliant document and its delivery come from the same API and the same key.

How the network hop works, stated plainly: MyInvoice is not itself a certified Peppol Access Point. Transmission runs through our white-label partner, which is a certified Peppol AP and SMP, and which signs and seals the AS4 transport layer as the network requires. You send and receive under one contract and one API key without becoming an access point or contracting one separately. The document itself is not signed — that is how Peppol works; document-level e-signatures required by some national formats (SdI .p7m, ZATCA stamp) are not part of this service.

POST /v1/send — transmit a document

Sends invoices and credit notes (multipart, same fields as /v1/convert) as well as orders, order responses, despatch advice, catalogues, punch-out, catalogue responses, MLRs and invoice responses (JSON body — the document is the body, so routing travels as query parameters). The pipeline is: build → local XSD + Schematron validation → provider validation → draft → dispatch. Peppol Logistics documents are not sendable and return 400 fail_peppol_document_unsupported.

ParameterRequiredDescription
documentNoWhat to send: invoice (default) | order | order-response | despatch-advice | catalogue | punch-out | catalogue-response | mlr | invoice-response.
countryNoThe country of the document (ISO code); it must be active on your account, and that country’s network format is sent. Without it: the buyer’s or the seller’s country if active, or your only active country. The receiver is not checked against it.
receiverYesReceiver Peppol ID as "scheme:id" (4-digit numeric scheme), e.g. 0208:0123456789.
receiver_peppol_scheme / receiver_peppol_idAlt.The same routing target in split form. Note there is no receiver_scheme parameter.
sendNofalse stops at a draft instead of dispatching (where the network provider supports drafts).
attachmentsNoUp to 10 supporting documents (BG-24), same rules as /v1/convert.
external_idNoYour own reference (e.g. the ERP invoice id), up to 128 characters. Echoed in the response, stored with the document and returned on status.
Idempotency-Key (header)NoYour unique id for this send. A retry with the same key returns the original 200 (same document_id, header Idempotent-Replayed: true) and sends nothing again. Kept 24 hours; a refused send frees the key.
inbound_document_idFor answersWith document=invoice-response: the received document you are answering. The answer goes to its sender; AP / RE is one decision per document (a second one → 409 fail_inbound_already_responded).

Input faults keep their status (400); documents that fail the business rules return 422 with the rule ids you have to fix. The sender is derived from the Peppol ID registered for your account — you do not pass it. An account that is not registered on Peppol yet gets 409 fail_peppol_not_registered and nothing is sent under anyone else’s identity.

GET /v1/peppol/status/:documentId — did it arrive?

Returns a normalised state — draft, pending, sent, failed or received — plus the delivery timeline. Poll it, or register a webhook and we push the lifecycle events to your endpoint as they happen.

GET /v1/peppol/lookup?peppol_id=scheme:id — is the receiver reachable?

An SMP participant lookup. Check that a trading partner is registered on Peppol (and for which document types) before you try to invoice them.

Receiving documents

Documents addressed to you are captured with their original UBL, parsed into a readable summary and stored against your account, with unread counts and a full XML download. A received invoice can be accepted or rejected, which sends the response back to the sender. You read everything from our API — you never poll the network yourself.

Peppol send and receive is enabled per account rather than being on by default for a new key: the network side needs your Peppol participant registration. Contact us with the countries you trade in and we set it up.

Several clients — the Partner API

If you run invoicing for your own clients (an ERP house, an accounting firm, a reseller), each client is its own account with its own Peppol registration and its own API key. The Partner API (/partner/v1, bearer key we issue to your organisation) creates the clients and submits their Peppol registrations, reports each client’s registration state (registered, pending, error, not_registered), hands back their API keys, lists their sent and received documents and signs webhooks for every status change. Documents still go through /v1/send with the client’s own key, so every invoice leaves under the client’s own Peppol identity. The full contract is published at /partner/v1/openapi.json.

Send an invoice over Peppol (curl)

curl -X POST "https://api.myinvoice.llc/v1/send?receiver=0208:0123456789" \
  -H "X-API-Key: ek_live_<your_key>" \
  -F "[email protected]" \
  -F "format=csv" \
  -F "country=BE"

Errors

Errors return a JSON body with two stable identifiers. error is the broad class, code is the precise machine-readable reason — branch and localise on code, and never parse the English message, which may change. request_id identifies the call in our logs; quote it in support requests.

{
  "error": "BAD_REQUEST",
  "code": "fail_format_invalid",
  "message": "Parameter \"format\" is required. Supported: …",
  "request_id": "f16a6fc6-caa2-45f7-bf6e-ee80ea640f93"
}
StatuserrorTypical codeMeaning
400BAD_REQUESTfail_format_invalid, fail_profile_invalidInvalid request parameters (format, country, …).
401UNAUTHORIZEDfail_api_key_missingAPI key was not sent.
403FORBIDDENfail_api_key_invalid, fail_erp_connector_disabledKey is invalid, expired or revoked — or the ERP connector is not enabled.
403FORBIDDENfail_country_disabledThe document’s country is not active on your account.
422COUNTRY_INVALIDfail_country_unknown, fail_country_unsupportedNo country given and none could be settled (several countries active, none matching the document) — pass country; or the country is not in the table.
413FILE_TOO_LARGEfail_file_too_largeFile exceeds the maximum size (default 50 MB).
422VALIDATION_FAILEDfail_validationGenerated document fails XSD or Schematron — see errors[] and error_codes[].
422PARSE_ERRORfail_required_fieldInput is malformed — a required field is missing or invalid.
429QUOTA_EXCEEDEDfail_quota_exceededUsage-tier limit reached for the key.
500INTERNAL_ERRORfail_internalUnexpected server error — retry or contact support with the request id.

Validation failures (422)

A VALIDATION_FAILED body adds errors[] with the full human-readable findings and error_codes[] with the bare rule identifiers. Key your own handling off error_codes[] — those ids are stable across releases and map directly to the EN 16931 / Peppol rule that has to be satisfied.

{
  "error": "VALIDATION_FAILED",
  "code": "fail_validation",
  "errors": [
    "[BR-S-02] An Invoice that contains an Invoice line … shall contain the Seller VAT Identifier (BT-31) …"
  ],
  "error_codes": ["BR-S-02", "BR-CO-26"],
  "warnings": [],
  "request_id": "22712c24-1ddb-481f-a93f-34b3c1618a7f",
  "elapsed_ms": 292
}

Diagnostics — where to fix it

Every response with findings also carries diagnostics[]: one entry per cause, not per rule. Each tells you the cause in plain language, the fix, where the fix belongs (fix_location: master_data | document | mapping | routing | platform), who it concerns (subject: seller, buyer, a line, the document) and — only when we can prove it — the source field in your own input: the SAP IDoc segment and partner role, the CSV column, the Business Central or F&O field, or the XPath in your document. errors[] and error_codes[] stay exactly as they were, so existing integrations keep working.

"diagnostics": [{
  "symptom": "seller-vat-id-missing",
  "severity": "fatal",
  "terms": ["BT-31"],
  "findings": [{ "rule": "BR-S-02", "message": "…" }],
  "subject": { "kind": "seller", "label": "Moja Firma d.o.o." },
  "source": { "connector": "csv", "path": "seller_vat_id" },
  "fix_location": "master_data",
  "explanation": "…",
  "fix": "…",
  "lang": "en"
}]

Language: ?lang= or Accept-Language — en, de or hr. diagnostics=false switches the block off for a request. The diagnosis is deterministic (a versioned rule knowledge base, kb.version) — no AI guessing. If your account keeps the diagnosis log on, a recurrence object shows how often the same cause hit the same partner in the last 30 days.

POST /v1/validate — check a document you already have

Upload a finished e-invoice — Peppol BIS UBL, XRechnung, a national CIUS, or Factur-X / ZUGFeRD as CII XML or PDF — and get the rule findings and diagnostics back. Nothing is converted and nothing is produced. The rule set follows the document’s country (optionally confirmed with country); the input format is recognised from the document itself. Useful for checking what a supplier sent you, or what your own ERP already emits, before it goes out.

curl -X POST https://api.myinvoice.llc/v1/validate \
  -H "X-API-Key: ek_live_<your_key>" \
  -F "[email protected]"

France — Factur-X, lifecycle and e-reporting

For the French reform (receiving for everyone and issuing for large and mid-sized companies since 1 September 2026, everyone else from 1 September 2027) the API covers the formats and the data. Factur-X comes as XML or as a finished PDF (output=pdf), UBL and CII carry the French domestic mentions, and the /v1/fr endpoints keep the state the reform asks for. Rules and codes follow the official DGFiP external specifications v3.2; flux 10 is validated against the official XSD before it is exported.

EndpointWhat it does
POST /v1/fr/documentsRegister issued or received invoices for lifecycle tracking (up to 500 per call).
POST /v1/fr/statusPush a lifecycle status — déposée (200), rejetée (210), refusée (213), encaissée (212). Out-of-order transitions are refused with 409.
POST /v1/fr/paymentsReport collected payments (encaissements), split pro rata across VAT rates; payment_ref makes the push idempotent.
POST /v1/fr/ereporting/transactionsDeclare international B2B transactions (flux 10.1). Records are validated on arrival, so a rejection carries the official rule id.
POST /v1/fr/ereporting/b2c-dailyDeclare B2C daily totals (flux 10.3).
GET /v1/fr/periods · /v1/fr/periods/:id/exportList reporting periods per your VAT regime and export a period as official flux 10 XML.

Transmission to the tax administration runs through a Plateforme Agréée (PA), and that step is not part of this service: the period export hands the official XML to the PA you work with. Lifecycle and e-reporting are add-on modules enabled per account; without them the endpoints answer 403.

Code examples

Convert an invoice (curl)

curl -X POST https://api.myinvoice.llc/v1/convert \
  -H "X-API-Key: ek_live_<your_key>" \
  -F "[email protected]" \
  -F "format=csv" \
  -F "country=HR" \
  -o invoice.xml

Factur-X as a finished PDF (curl)

curl -X POST https://api.myinvoice.llc/v1/convert \
  -H "X-API-Key: ek_live_<your_key>" \
  -F "[email protected]" \
  -F "format=csv" \
  -F "country=FR" \
  -F "output=pdf" \
  -o facture.pdf

Convert an invoice (JavaScript)

const body = new FormData()
body.set("file", file)          // a File/Blob
body.set("format", "csv")
body.set("country", "DE")

const res = await fetch("https://api.myinvoice.llc/v1/convert", {
  method: "POST",
  headers: { "X-API-Key": "ek_live_<your_key>" },
  body,
})
const xml = await res.text()

Multiple files → ZIP (curl)

curl -X POST https://api.myinvoice.llc/v1/convert-multi \
  -H "X-API-Key: ek_live_<your_key>" \
  -F "[email protected]" -F "[email protected]" -F "[email protected]" \
  -o out.zip

Repeat the field name files for every file — plain files, without brackets. A bracketed files[] is not the same field and the request will be rejected. Without country, each file’s country is decided on its own (buyer, seller or your only active country); a file whose country is not active fails on its own in summary.json.

Try it without an account

The in-browser sandbox converts a sample or your own file for any supported country — no account required (fair-use limited).

Sample files

Every input format below is a working file you can post straight to /v1/convert with the matching format parameter — useful for smoke-testing your integration before you touch your own data.

Country-specific CSV samples — same schema, pre-filled with the data a given country’s national format expects:

JSON bodies for the procurement and logistics endpoints: