Skip to main content
GET
/
einvoicing
/
documents
/
{document_id}
/
download
Download Document
curl --request GET \
  --url https://api.example.com/einvoicing/documents/{document_id}/download \
  --header 'Authorization: <api-key>'
{
  "document_id": "DOC-20250402-0001",
  "request_id": "a3d56940-2827-4b87-a229-00d8b95cbe77",
  "documents": [
    {
      "mime_type": "application/xml",
      "document_url": "https://your-bucket.s3.amazonaws.com/invoice-20250402.xml?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=EXAMPLE",
      "expires_at": "2025-03-28T09:24:29.000Z"
    }
  ],
  "model": "PEPPOL"
}

Documentation Index

Fetch the complete documentation index at: https://spidocs.chargebee.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Path Parameters

document_id
string
required

Query Parameters

mime_type
string

Optional MIME type filter for the document representation to download.

When provided, the adapter MUST return only the document(s) matching this MIME type (for example, application/xml, application/pdf, or a country-specific UBL MIME type).

When omitted, the adapter MUST attempt to retrieve and return all available representations for the given document_id from the underlying e-invoicing provider.

Example:

"application/xml"

country
string
required

The ISO 3166-1 alpha-2 country code representing the country for which the e-invoicing data input fields need to be retrieved. Different countries may have varying e-invoicing requirements.

Example:

"DE"

transaction_type
enum<string>
required

The transaction type for which the data input fields need to be retrieved. Required fields may vary depending on the type: B2B (Business to Business), B2C (Business to Consumer), or B2G (Business to Government).

Available options:
B2B,
B2C,
B2G
Example:

"B2B"

model
enum<string>
required

Indicates the eInvoicing flow model that governs the document exchange and processing mechanism. Different countries adopt different models based on legal, technical, and administrative mandates. Supported values:

  • PEPPOL: A standardized, secure eInvoicing network enabling cross-border electronic document exchange between businesses and governments.
  • EINVOICE: Traditional eInvoicing model where invoices are digitally exchanged between businesses and sometimes stored.
  • CLEARANCE: Invoices must be pre-approved by a tax authority before they are sent to the buyer.
  • REPORTING: Invoices are shared with tax authorities after issuance, usually for compliance and audit purposes.
  • ZUGFERD: A hybrid eInvoicing format used in Germany combining PDF and XML for human and machine readability.
  • CTC: Continuous Transaction Controls involve real-time or near-real-time invoice validation and transmission to tax authorities.
  • NEMHANDEL: Denmark’s national infrastructure for eInvoicing that supports secure delivery via specific formats like OIOUBL.
  • FACE: Spain’s centralized system (FACe/FACeB2B) for routing invoices to government or private recipients.
  • VERIFACTU: Spain’s mechanism for validating and reporting sales invoices directly to the tax agency.
Available options:
PEPPOL,
EINVOICE,
CLEARANCE,
REPORTING,
ZUGFERD,
CTC,
NEMHANDEL,
FACE,
VERIFACTU
Example:

"PEPPOL"

document_type
string
required

Type of business document.

Example:

"ubl-invoice"

Response

Document downloaded successfully.

document_id
string
required
documents
object[]
required
request_id
string
model
any

Indicates the eInvoicing flow model that governs the document exchange and processing mechanism. Different countries adopt different models based on legal, technical, and administrative mandates. Supported values:

  • PEPPOL: A standardized, secure eInvoicing network enabling cross-border electronic document exchange between businesses and governments.
  • EINVOICE: Traditional eInvoicing model where invoices are digitally exchanged between businesses and sometimes stored.
  • CLEARANCE: Invoices must be pre-approved by a tax authority before they are sent to the buyer.
  • REPORTING: Invoices are shared with tax authorities after issuance, usually for compliance and audit purposes.
  • ZUGFERD: A hybrid eInvoicing format used in Germany combining PDF and XML for human and machine readability.
  • CTC: Continuous Transaction Controls involve real-time or near-real-time invoice validation and transmission to tax authorities.
  • NEMHANDEL: Denmark’s national infrastructure for eInvoicing that supports secure delivery via specific formats like OIOUBL.
  • FACE: Spain’s centralized system (FACe/FACeB2B) for routing invoices to government or private recipients.
  • VERIFACTU: Spain’s mechanism for validating and reporting sales invoices directly to the tax agency. schema: type: string enum:
    • PEPPOL
    • EINVOICE
    • CLEARANCE
    • REPORTING
    • ZUGFERD
    • CTC
    • NEMHANDEL
    • FACE
    • VERIFACTU example: "PEPPOL"