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):
InvoiceTypeCodeelement - Cross Industry Invoice (CII) (Factur-X, ZUGFeRD, EN16931):
TypeCodeelement
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_documentis valid for the target format (PEPPOL, CII, or FatturaPA), it will be used in the exported XML - If
type_documentis 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
| Code | Description |
|---|---|
| 71 | Request for payment |
| 80 | Debit note related to goods or services |
| 82 | Metered services invoice |
| 84 | Debit note related to financial adjustments |
| 102 | Tax notification |
| 218 | Final payment request based on completion of work |
| 219 | Payment request for completed units |
| 326 | Partial invoice |
| 331 | Commercial invoice which includes a packing list |
| 380 | Commercial invoice |
| 382 | Commission note |
| 383 | Debit note |
| 384 | Corrected invoice |
| 386 | Prepayment invoice |
| 388 | Tax invoice |
| 393 | Factored invoice |
| 395 | Consignment invoice |
| 553 | Forwarder's invoice discrepancy report |
| 575 | Insurer's invoice |
| 623 | Forwarder's invoice |
| 780 | Freight invoice |
| 817 | Claim notification |
| 870 | Consular invoice |
| 875 | Partial construction invoice |
| 876 | Partial final construction invoice |
| 877 | Final 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):
| Code | Description |
|---|---|
| 81 | Credit note related to goods or services |
| 83 | Credit note related to financial adjustments |
| 381 | Credit note |
| 396 | Factored credit note |
| 532 | Forwarder's credit note |
Self-Billing Invoice Codes (for PEPPOL)
| Code | Description |
|---|---|
| 389 | Self-billed invoice |
| 527 | Self-billed debit note |
Self-Billing Credit Note Code (for PEPPOL)
| Code | Description |
|---|---|
| 261 | Self-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
| Code | Description |
|---|---|
| 326 | Partial invoice |
| 380 | Commercial invoice |
| 384 | Corrected invoice |
| 875 | Partial construction invoice |
| 876 | Partial final construction invoice |
| 877 | Final construction invoice |
Credit Note Code (for CII)
| Code | Description |
|---|---|
| 381 | Credit note |
Self-Billing Code (for CII)
| Code | Description |
|---|---|
| 389 | Self-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
- Mapping JSON Invoice Fields to Cross Industry Invoice (CII) XML
- Send an invoice through PEPPOL
- API Reference - Create Invoice
Standards References
- PEPPOL BIS Billing 3.0 - Invoice Type Code
- EN 16931 - European e-invoicing standard
Updated 2 days ago