Invoices are the primary resource in Mandato. Each invoice represents a document that is validated, converted to the target country’s XML format, and submitted to the government e-invoicing system.
"id" : " inv_a1b2c3d4e5f6 " ,
"supplierVat" : " RO12345678 " ,
"customerVat" : " RO87654321 " ,
"grossAmount" : " 6188.00 " ,
"externalId" : " order-12345 " ,
"createdAt" : " 2025-01-15T10:00:00.000Z " ,
"updatedAt" : " 2025-01-15T10:00:15.000Z "
Field Type Description idstringUnique invoice identifier countrystringISO 3166-1 alpha-2 country code (RO, IT, BE, etc.) supplierVatstringSupplier VAT number customerVatstringCustomer VAT number statusstringCurrent lifecycle status (see below) netAmountstringNet amount (decimal string) vatAmountstringTotal VAT amount (decimal string) grossAmountstringGross amount including VAT (decimal string) currencystringISO 4217 currency code govIdstring|nullGovernment-assigned ID after submission externalIdstring|nullYour external reference ID errorMessagestring|nullRaw error from the government system errorTranslatedstring|nullAI-translated error in plain English errorFixstring|nullAI-suggested fix for the error createdAtstringISO 8601 creation timestamp updatedAtstringISO 8601 last update timestamp
Status Description createdInvoice received and queued for processing validatedPassed EN 16931 + country-specific validation rules convertingBeing converted to the target XML format submittingBeing uploaded to the government system submittedGovernment acknowledged receipt, awaiting decision acceptedGovernment accepted the invoice rejectedGovernment rejected the invoice (see errorMessage) errorInternal error during processing
Creates a new invoice, validates it, converts it to XML, and submits it to the government system. The invoice is created immediately with a created status and processed asynchronously.
Header Required Description AuthorizationYes Bearer sk_test_... or Bearer sk_live_...Content-TypeYes application/jsonX-Idempotency-KeyNo Unique key to prevent duplicate submissions
Field Type Required Description countrystringYes Target country code (RO, IT, BE, PL, FR, DE) invoiceTypestringNo invoice (default), credit_note, or debit_notecompanyIdstringNo Specific company ID. If omitted, auto-matched by country. externalIdstringNo Your external reference ID supplierobjectYes Supplier party (see Party object below) customerobjectYes Customer party (see Party object below) linesarrayYes One or more line items (see Line object below) currencystringNo ISO 4217 code. Defaults to EUR. issueDatestringNo ISO 8601 date (YYYY-MM-DD). Defaults to today. dueDatestringNo ISO 8601 date (YYYY-MM-DD) notestringNo Free-text note included in the invoice paymentMeansobjectNo Payment details (see below) attachmentsarrayNo File attachments (see below)
Field Type Required Description vatNumberstringYes VAT identification number (with country prefix) namestringYes Legal name addressobjectNo Address with street, city, postalCode, country, stateOrProvince emailstringNo Contact email phonestringNo Contact phone sdiCodestringNo Italy SDI recipient code (7 characters) peppolIdstringNo Peppol participant ID siretstringNo France SIRET number (14 digits) leitwegIdstringNo Germany Leitweg-ID
Field Type Required Description descriptionstringYes Item description quantitynumberNo Quantity (defaults to 1) unitPricenumberYes Unit price vatRatenumberYes VAT rate as percentage (e.g., 19 for 19%) unitCodestringNo UN/ECE unit code (defaults to C62 / “unit”) discountnumberNo Discount amount per unit itemCodestringNo Product/item classification code
Field Type Required Description bankAccountstringNo IBAN bank account number bicstringNo BIC/SWIFT code paymentTermsstringNo Free-text payment terms description dueDatestringNo ISO 8601 payment due date
Field Type Required Description filenamestringYes File name with extension contentstringYes Base64-encoded file content mimeTypestringYes MIME type (e.g., application/pdf)
curl -X POST https://api.getmandato.dev/v1/invoices \
-H " Authorization: Bearer sk_test_your_key " \
-H " Content-Type: application/json " \
-H " X-Idempotency-Key: order-12345-inv-001 " \
"externalId": "order-12345",
"vatNumber": "RO12345678",
"name": "TechVision SRL",
"street": "Strada Exemplu 42",
"vatNumber": "RO87654321",
"name": "Client Corp SRL",
"street": "Bulevardul Unirii 10",
"description": "Software development services",
"description": "Cloud hosting",
"issueDate": "2025-01-15",
"bankAccount": "RO49AAAA1B31007593840000",
"note": "Thank you for your business."
"id" : " inv_a1b2c3d4e5f6 " ,
"supplierVat" : " RO12345678 " ,
"customerVat" : " RO87654321 " ,
"grossAmount" : " 6188.00 " ,
"externalId" : " order-12345 " ,
"createdAt" : " 2025-01-15T10:00:00.000Z " ,
"updatedAt" : " 2025-01-15T10:00:00.000Z "
Status Type Description 400validation_errorInvalid request body or missing required fields 401authentication_errorInvalid or missing API key 403usage_limit_exceededMonthly invoice limit reached 409conflict_errorIdempotency key conflict (different body for same key) 429rate_limit_errorToo many requests
Returns a paginated list of invoices for your account. Results are ordered by creation date (newest first).
Parameter Type Description countrystringFilter by country code (e.g., RO) statusstringFilter by status (e.g., accepted, rejected) companyIdstringFilter by company ID searchstringSearch in VAT numbers, external ID dateFromstringFilter invoices created after this date (ISO 8601) dateTostringFilter invoices created before this date (ISO 8601) cursorstringCursor for pagination (from nextCursor in previous response) limitnumberNumber of results per page (default 20, max 100)
curl " https://api.getmandato.dev/v1/invoices?country=RO&status=accepted&limit=10 " \
-H " Authorization: Bearer sk_test_your_key "
"id" : " inv_a1b2c3d4e5f6 " ,
"supplierVat" : " RO12345678 " ,
"customerVat" : " RO87654321 " ,
"grossAmount" : " 6188.00 " ,
"externalId" : " order-12345 " ,
"createdAt" : " 2025-01-15T10:00:00.000Z " ,
"updatedAt" : " 2025-01-15T10:00:15.000Z "
"nextCursor" : " eyJpZCI6Imludl9hMWIyYzNkNGU1ZjYifQ "
Mandato uses cursor-based pagination. To get the next page, pass the nextCursor value as the cursor parameter:
curl " https://api.getmandato.dev/v1/invoices?cursor=eyJpZCI6Imludl9hMWIyYzNkNGU1ZjYifQ&limit=10 " \
-H " Authorization: Bearer sk_test_your_key "
When hasMore is false, there are no more results.
Retrieves a single invoice by ID.
Parameter Type Description idstringInvoice ID (e.g., inv_a1b2c3d4e5f6)
curl https://api.getmandato.dev/v1/invoices/inv_a1b2c3d4e5f6 \
-H " Authorization: Bearer sk_test_your_key "
"id" : " inv_a1b2c3d4e5f6 " ,
"supplierVat" : " RO12345678 " ,
"customerVat" : " RO87654321 " ,
"grossAmount" : " 6188.00 " ,
"externalId" : " order-12345 " ,
"createdAt" : " 2025-01-15T10:00:00.000Z " ,
"updatedAt" : " 2025-01-15T10:00:15.000Z "
Status Type Description 404not_foundInvoice not found or belongs to a different account
POST /v1/invoices/validate
Runs the full validation pipeline on an invoice without creating or submitting it. Use this for pre-submission checks and form validation.
The request body is identical to POST /v1/invoices.
curl -X POST https://api.getmandato.dev/v1/invoices/validate \
-H " Authorization: Bearer sk_test_your_key " \
-H " Content-Type: application/json " \
"vatNumber": "RO12345678",
"vatNumber": "RO87654321",
"name": "Client Corp SRL"
"description": "Consulting",
" BR-RO-010: Supplier address is required for Romanian invoices " ,
" BR-16: Invoice must have at least one line with a positive amount "
GET /v1/invoices/:id/events
Returns the full event timeline for an invoice, showing every status transition with timestamps and metadata.
Parameter Type Description idstringInvoice ID
curl https://api.getmandato.dev/v1/invoices/inv_a1b2c3d4e5f6/events \
-H " Authorization: Bearer sk_test_your_key "
"event" : " invoice.created " ,
"createdAt" : " 2025-01-15T10:00:00.000Z "
"event" : " invoice.validated " ,
"createdAt" : " 2025-01-15T10:00:01.000Z "
"event" : " invoice.submitted " ,
"govEndpoint" : " ANAF e-Factura " ,
"createdAt" : " 2025-01-15T10:00:05.000Z "
"event" : " invoice.accepted " ,
"govMessage" : " Factura a fost acceptata "
"createdAt" : " 2025-01-15T10:00:15.000Z "
Event Description invoice.createdInvoice received and queued invoice.validatedPassed all validation rules invoice.submittedUploaded to the government system invoice.acceptedGovernment accepted the invoice invoice.rejectedGovernment rejected the invoice invoice.errorInternal processing error