Salta al contingut
Log in

Codis de tipus de document Peppol i CII

Quan envieu factures a través de xarxes PEPPOL o genereu documents en format CII o Factur-X, podeu especificar el tipus de document amb el camp type_document. Aquest camp es correspon amb l’Invoice Type Code definit a la llista de codis UN/CEFACT 1001 (UNCL1001).

Els codis s’utilitzen a:

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

El camp type_document és opcional i actua com una pista per al codi de tipus de document. B2Brouter utilitzarà aquest valor quan sigui vàlid per al format d’exportació; en cas contrari, aplicarà una assignació automàtica basada en la lògica de negoci:

  • 380: factura comercial estàndard, per defecte
  • 381: nota de crèdit
  • 389: autofactura
  • 480: factura no subjecta o amb reverse charge

Important: en exportar documents:

  • Si type_document és vàlid per al format de destí, PEPPOL, CII o FatturaPA, s’utilitzarà a l’XML exportat
  • Si type_document no és vàlid per al format de destí, el sistema utilitza automàticament un codi per defecte adequat segons el tipus de factura
  • Això us permet importar documents en un format, per exemple FatturaPA, i exportar-los en un altre, com PEPPOL, de manera transparent
{
"invoice": {
"type_document": "380",
"number": "INV-2025-001",
"date": "2025-01-26",
"contact_id": 12345,
"invoice_lines_attributes": [...]
}
}

Codis vàlids de tipus de document PEPPOL / UBL

Section titled “Codis vàlids de tipus de document PEPPOL / UBL”

Els codis UN/CEFACT següents s’utilitzen en exportar factures en format PEPPOL i UBL:

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

Nota: els codis 326 i 384 només es poden fer servir quan ambdues parts, proveïdor i client, tenen el país DE.

Aquests codis només són vàlids quan la factura és una nota de crèdit, 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
CodeDescription
389Self-billed invoice
527Self-billed debit note

Codi d’autofactura rectificativa per a PEPPOL

Section titled “Codi d’autofactura rectificativa per a PEPPOL”
CodeDescription
261Self-billed credit note

Nota: aquest codi només es pot utilitzar quan type: IssuedSelfInvoice i is_credit_note: true

Codis vàlids de tipus de document CII / Factur-X

Section titled “Codis vàlids de tipus de document CII / Factur-X”

Els codis següents s’utilitzen en exportar documents en format Cross Industry Invoice, CII:

CodeDescription
326Partial invoice
380Commercial invoice
384Corrected invoice
875Partial construction invoice
876Partial final construction invoice
877Final construction invoice
CodeDescription
381Credit note
CodeDescription
389Self-billed invoice

Nota: els codis 326 i 384 només es poden fer servir quan ambdues parts, proveïdor i client, tenen el país DE.

{
"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.0,
"description": "Professional services",
"taxes_attributes": [
{
"name": "VAT",
"percent": 21
}
]
}
]
}
}
{
"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": [...]
}
}
{
"send_after_import": true,
"invoice": {
"type": "IssuedInvoice",
"type_document": "386",
"number": "PREP-2025-001",
"date": "2025-01-26",
"contact_id": 12345,
"invoice_lines_attributes": [...]
}
}
{
"send_after_import": true,
"invoice": {
"type": "ReceivedInvoice",
"type_document": "389",
"number": "SELF-2025-001",
"date": "2025-01-26",
"contact_id": 12345,
"invoice_lines_attributes": [...]
}
}
<Invoice>
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
...
</Invoice>
<rsm:CrossIndustryInvoice>
<rsm:ExchangedDocument>
<ram:TypeCode>380</ram:TypeCode>
</rsm:ExchangedDocument>
...
</rsm:CrossIndustryInvoice>