PEPPOL and CII Document Type Codes

PEPPOL and CII Document Type Codes (type_document)

Overview

When sending invoices through PEPPOL networks or generating CII/Factur-X format documents, you can specify the document type using the type_document field. This field corresponds to the Invoice Type Code as defined in the UN/CEFACT code list 1001 (UNCL1001).

The codes are used in:

  • PEPPOL BIS Billing 3.0/Chorus (UBL format): InvoiceTypeCode element
  • Cross Industry Invoice (CII) (Factur-X, ZUGFeRD, EN16931): TypeCode element

Usage

The type_document field is optional and acts as a hint for the document type code. B2Brouter will use this value when it's valid for the export format, otherwise it falls back to automatic assignment based on business logic:

  • 380: Standard commercial invoice (default)
  • 381: Credit note
  • 389: Self-billed invoice
  • 480: Not-Taxable / Reverse charge invoice

Important: When exporting documents:

  • If type_document is valid for the target format (PEPPOL, CII, or FatturaPA), it will be used in the exported XML
  • If type_document is not valid for the target format, the system automatically uses an appropriate default code based on invoice type
  • This allows you to import documents in one format (e.g., FatturaPA) and export them in another (e.g., PEPPOL) seamlessly

Setting type_document via API

{
  "invoice": {
    "type_document": "380",
    "number": "INV-2025-001",
    "date": "2025-01-26",
    "contact_id": 12345,
    "invoice_lines_attributes": [...]
  }
}

Valid PEPPOL/UBL Document Type Codes

The following UN/CEFACT codes will be used when exporting to PEPPOL and UBL format invoices:

Standard Invoice Codes

CodeDescription
71Request for payment
80Debit note related to goods or services
82Metered services invoice
84Debit note related to financial adjustments
102Tax notification
218Final payment request based on completion of work
219Payment request for completed units
326Partial invoice
331Commercial invoice which includes a packing list
380Commercial invoice
382Commission note
383Debit note
384Corrected invoice
386Prepayment invoice
388Tax invoice
393Factored invoice
395Consignment invoice
553Forwarder's invoice discrepancy report
575Insurer's invoice
623Forwarder's invoice
780Freight invoice
817Claim notification
870Consular invoice
875Partial construction invoice
876Partial final construction invoice
877Final construction invoice

Note: Codes 326 and 384 can only be used when both parties (supplier and customer) have country 'DE'.

Credit Note Codes (for PEPPOL)

These codes are valid only when the invoice is a credit note (is_credit_note: true):

CodeDescription
81Credit note related to goods or services
83Credit note related to financial adjustments
381Credit note
396Factored credit note
532Forwarder's credit note

Self-Billing Invoice Codes (for PEPPOL)

CodeDescription
389Self-billed invoice
527Self-billed debit note

Self-Billing Credit Note Code (for PEPPOL)

CodeDescription
261Self-billed credit note

Note: This code can only be used when type: IssuedSelfInvoice and is_credit_note: true

Valid CII/Factur-X Document Type Codes

The following codes will be used when exporting to Cross Industry Invoice (CII) format documents:

Standard Invoice Codes

CodeDescription
326Partial invoice
380Commercial invoice
384Corrected invoice
875Partial construction invoice
876Partial final construction invoice
877Final construction invoice

Credit Note Code (for CII)

CodeDescription
381Credit note

Self-Billing Code (for CII)

CodeDescription
389Self-billed invoice

Note: Codes 326 and 384 can only be used when both parties (supplier and customer) have country 'DE'.

Examples

Example 1: Standard PEPPOL Invoice

{
  "send_after_import": true,
  "invoice": {
    "type": "IssuedInvoice",
    "type_document": "380",
    "number": "INV-2025-001",
    "date": "2025-01-26",
    "due_date": "2025-02-26",
    "contact_id": 12345,
    "invoice_lines_attributes": [
      {
        "quantity": 10,
        "price": 50.00,
        "description": "Professional services",
        "taxes_attributes": [
          {
            "name": "VAT",
            "percent": 21
          }
        ]
      }
    ]
  }
}

Example 2: PEPPOL Credit Note

{
  "send_after_import": true,
  "invoice": {
    "type": "IssuedInvoice",
    "type_document": "381",
    "is_credit_note": true,
    "number": "CN-2025-001",
    "date": "2025-01-26",
    "amended_number": "INV-2025-001",
    "contact_id": 12345,
    "invoice_lines_attributes": [...]
  }
}

Example 3: Prepayment Invoice

{
  "send_after_import": true,
  "invoice": {
    "type": "IssuedInvoice",
    "type_document": "386",
    "number": "PREP-2025-001",
    "date": "2025-01-26",
    "contact_id": 12345,
    "invoice_lines_attributes": [...]
  }
}

Example 4: Self-Billed Invoice

{
  "send_after_import": true,
  "invoice": {
    "type": "ReceivedInvoice",
    "type_document": "389",
    "number": "SELF-2025-001",
    "date": "2025-01-26",
    "contact_id": 12345,
    "invoice_lines_attributes": [...]
  }
}

XML Output

PEPPOL BIS 3.0 (UBL)

<Invoice>
  <cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
  ...
</Invoice>

CII (Factur-X/EN16931)

<rsm:CrossIndustryInvoice>
  <rsm:ExchangedDocument>
    <ram:TypeCode>380</ram:TypeCode>
  </rsm:ExchangedDocument>
  ...
</rsm:CrossIndustryInvoice>

Related Documentation

Standards References