Web Soap Broadcast Service Methods - Direct Integration Manual Index

De tfhkacolwiki
Ir a la navegación Ir a la búsqueda

Web Soap Broadcast Service Methods

The parameters to be incorporated in the methods of this Web Service must comply with the format and the corresponding directives according to the following rules:

Format Description
A Alphabetic character
N Numeric character
AN AlphaNumeric character
A|3 3 Alphabetic characters (fixed length)
N|3 3 Numeric characters (fixed length)
AN|3 3 alphaNumeric characters (fixed length)
A|..3 Up to 3 Alphabetic characters (variable length)
N|..3 Up to 3 Numeric characters (variable length)
AN|..3 Up to 3 alphaNumeric characters (variable length)
N|2..6 Between 2 and 6 Numeric characters (variable length)
INT32 Whole. (Maximum Value: 2,147,483,647)


Mandatory Description
YES If it is mandatory for the DIAN
NOT It is not mandatory for the DIAN
C/C It is required where applicable (or under certain conditions by the client's business model)

Enviar Method

The function in charge of building and sending the electronic documents to the technology provider.

REQUEST
Parameters to Send
Type Identifier Description
String tokenEmpresa Provided by technology provider
tokenPassword
FacturaGeneral factura See the detail of the Invoice Object below
String adjuntos

Possible values:

“0” Attachments are not allowed. XML and standard graphic representation is generated by The Factory HKA
“1” Supports attachments. XML and standard graphic representation is generated by The Factory HKA
“10” Attachments are not allowed. Only XML is generated without standard Graphic representation by The Factory HKA
“11” Supports attachments. Only XML is generated without standard graphical representation by The Factory HKA


@IMPORTANT: If the value “1” or “11” is sent in the attachments parameter, no email will be sent until the method is consumed CargarAdjuntos (ServicE Adjuntos Web SOAP). For documents that accept attachments, the fieldDestinatario.email of the client is required and the notify field must be set to “YES”.

WARNING: If options '10' or '11' are used in the attachments parameter, our platform will not generate standard graphic representation (PDF), therefore PDF is not hosted on it and the graphic representation cannot be viewed from the platform. web portal, in the notification email to the acquirer (view document section), nor download through the DescargaPDF method  of the SOAP Web Broadcast Service or forward the graphical representation through the EnvioCorreo method, since it is being assumed that it has been generated locally by the billing software (ERP).

Next, the diagram of the invoice object for the billing model with prior validation is exposed, where the changes in its structure can be seen with respect to the object used in the model with post validation :

  • In Blue new classes/attributes that were not present in the post validation model.
  • In Yellow existing classes/attributes in the post-validation model that underwent changes in pre-validation.
  • In Orange existing classes/attributes in post-validation model that are deprecated (removed) in pre-validation.


The invoice object for the billing model with prior validation is described in greater detail below:

Diagram Class.FacturaGeneral con Class.Anticipos, Class.Autorizado y Class.CargosDescuentos
Diagrama Class.FacturaGeneral con Class.Anticipos, Class.Autorizado y Class.CargosDescuentos


Diagram Class.FacturaGeneral con Class.Cliente

Diagram Class.FacturaGeneral con Class.Cliente


Diagram Class.FacturaGeneral con Class.CondicionPago

Diagram Class.FacturaGeneral con Class.CondicionPago


Diagram Class.FacturaGeneral con Class.FacturaDetalle

Diagram Class.FacturaGeneral con Class.FacturaDetalle


Diagram Class.FacturaGeneral con Class.DocumentoReferenciado

Diagram Class.FacturaGeneral con Class.DocumentoReferenciado


Diagram Class.FacturaGeneral Class.EntregaMercancia

Diagram Class.FacturaGeneral Class.EntregaMercancia


Diagram Class.FacturaGeneral con Class.Extras. Class.FacturaImpuestos, Class.ImpuestosTotales, Class.MediosDePago, Class.OrdenDeCompra y Array - informacionAdicional

Diagram Class.FacturaGeneral con Class.Extras. Class.FacturaImpuestos, Class.ImpuestosTotales, Class.MediosDePago, Class.OrdenDeCompra y Array - informacionAdicional


Diagram Class.FacturaGeneral con Class.TasaDeCambio, Class.TasaDeCambioAlternativa y Class.TerminosEntrega

Diagram Class.FacturaGeneral con Class.TasaDeCambio, Class.TasaDeCambioAlternativa y Class.TerminosEntrega

Class.FacturaGeneral

Attribute Data Type Format Required Description
anticipos Array <Anticipos> - NOT
Information related to advances
PATH: /root/cac:PrepaidPayment
(see detail in Class.Anticipos)
autorizado Autorizado - NOT
Information of the person authorized to download documents
PATH: /root/cac:TaxRepresentativeParty
(ver see detail in Class.Autorizado)
cantidadDecimales String N|1 YES
The number of decimals to be used is sent (minimum 0, maximum 6)
Rejection If more decimals are received in the amounts than those indicated in this field
PATH: Does not apply
cargosDescuentos Array <CargosDescuentos> - NOT
Information related to a charge or a discount on an invoice scale that does not affect the tax base
PATH: /root/cac:AllowanceCharge
(see detail in Class.CargosDescuentos)
cliente Cliente - YES
Acquirer Information
PATH:/root/cac:AccountingCustomerParty
(see detail in Class.Cliente)
condicionPago Array <CondicionPago> - NOT
Information related to the payment condition
PATH: /root/cac:PaymentTerms
(see detail in Class.CondicionPago)
consecutivoDocumento String AN..20 YES
Correlative/consecutive of the electronic document
prefix concatenation (AN|..4) + the consecutive DIAN,
according to the configuration in the web portal:
Manual with prefix: prefix required (No hyphen). Example: “PREF2147483647”
Manual without prefix: prefix not required. Example: “2147483647”
Rejection Additional characters such as spaces or hyphens are not allowed
Rejection Consecutive number must be equal to or greater than the initial value of the numbering range granted by the DIAN
Rejection Consecutive number must be equal to or less than the final value of the numbering range granted by the DIAN
PATH: /root/cbc:ID
detalleDeFactura Array <FacturaDetalle> - YES
Details or product information
PATH: /root/cac:InvoiceLine
(see detail in Class.FacturaDetalle)
documentosReferenciados Array <DocumentoReferenciado> - C/C
Information describing a referenced document
Required on tipoDocumento invoices contingency (AdditionalDocumentReference), in invoices that affect a note (BillingReference), in Credit and Debit Notes (DiscrepancyResponse and BillingReference)
PATH: /root/cac:DiscrepancyResponse,
/root/cac:BillingReference,
/root/cac: AdditionalDocumentReference,
/root/cac: DespatchDocumentReference,
/root/cac: ReceiptDocumentReference
(see detail in Class.DocumentoReferenciado)
entregaMercancia Entrega - NOT
Delivery information (Delivery) of goods
PATH: /root/cac:Delivery
(see detail in Class.Entrega)
extras Array <Extras> - NOT
Optional fields or information for the issuer's business model
PATH: Not defined
(see detail in Class.Extras)
fechaEmision String AN|19 YES
Date and time of issuance of the document, in format: YYYY-MM-DD HH:MM:SS
Notification If the issue date is earlier than five (5) days from the calendar date
Rejection If the issue date is later than ten calendar days
PATH: /root/cbc:IssueDate, root/cbc:IssueTime
fechaFinPeriodoFacturacion String AN|19 NOT
Date/Time of the end of the billing period (Interval of dates to which the bill refers, for example in public services), in format: YYYY-MM-DD HH:MM:SS
PATH: /root/cac:InvoicePeriod/cbc:EndDate, /root/cac:InvoicePeriod/cbc:EndTime
fechaInicioPeriodoFacturacion String AN|19 NOT
Billing period start date/time, in format: YYYY-MM-DD HH:MM:SS
PATH:
/root/cac:InvoicePeriod/cbc:StartDate, /root/cac:InvoicePeriod/cbc:StartTime
fechaPagoImpuestos String AN|19 NOT
Tax payment date, in format: YYYY-MM-DD HH:MM:SS
PATH: root/cbc:TaxPointDate
fechaVencimiento String AN|10 NOT
Due date of the invoice, in format: YYYY-MM-DD
PATH: /root/cbc:DueDate
impuestosGenerales Array <FacturaImpuestos> - YES
General or global tax information
Rejection If the taxes/withholdings reported in this arrangement do not correspond to what is reported in the details
PATH: /root/cac:TaxTotal (impuestos),
/root/cac: WithholdingTaxTotal (retenciones),
(see detail in Class.FacturaImpuestos)
impuestosTotales Array <ImpuestosTotales> - YES
Sum of general taxes/withholdings by type of impuesto/retención
Rejection If the total value of the tax/withholding indicated is different from the sum of those reported in the impuestosGenrales arrangement
PATH: /root/cac:TaxTotal/cbc:TaxAmount (impuestos),
/root/cac: WithholdingTaxTotal/cbc:TaxAmount (retenciones),
(see detail in Class.ImpuestosTotales)
informacionAdicional Array <String> AN|...10000 NOT
Additional information or free text related to the document
PATH: root/cbc:Note
mediosDePago Array <MediosDePago> - YES
Information related to the payment of the invoice
PATH: /root/cac:PaymentMeans
(see detail in Class.MediosDePago)
moneda String AN|3 YES
Currency or currency of the document
Use ISO 4217 codes (Example Colombian Pesos “COP”)
Rejection If the value does not correspond to one of the ISO 4217 codes
PATH: /root/cbc:DocumentCurrencyCode
ordenDeCompra Array <OrdenDeCompra> - NOT
Information related to the purchase order
PATH: /root/cac:OrderReference
(see detail in Class.OrdenDeCompra)
rangoNumeracion String AN|20 YES
Consecutive from which the series begins for the document to be issued, the prefix (with hyphen) must always be placed regardless of the sequential mode.
Example: 'PREF-1123456'
PATH:
/root/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/
sts:DianExtensions/sts:InvoiceControl/sts:AuthorizedInvoices/(sts:Prefix, sts:From)
redondeoAplicado String Ent: N|..15

Dec: N|0..6

YES
Rounding applied to arrive at totalMonto
Rejection If rounding is greater than the greater value between 500 pesos or 0.1% of the total value of the invoice
PATH: /root/cac:LegalMonetaryTotal/cbc:PayableRoundingAmount
sectorSalud sectorSalud - C/C
Information related to emissions from the Health SectorRequired: When typeSector = '2' is informed
(see detail in Class.sectorSalud)
tasaDeCambio TasaDeCambio - C/C
Information related to the exchange rate of foreign currency to Colombian peso (COP)
Required If documenttype is export/international or if the base currency is different from “COP”
PATH: /root/cac:PaymentExchangeRate
(see detail in Class.TasaDeCambio)
tasaDeCambioAlternativa TasaDeCambioAlternativa - NOT
Information used as an alternative method to report conversions to other currencies
PATH: /root/cac:PaymentAlternativeExchangeRate
(see detail in Class.TasaDeCambioAlternativa)
terminosEntrega TerminosEntrega - C/C
Information related to the delivery
Required If documenttype is export/international
PATH: /root/cac:DeliveryTerms
(see detail in Class.TerminosEntrega)
tipoDocumento String AN|2 YES
Document type
PATH: Invoice, CreditNote, DebitNote
Rejection If the content of this attribute does not correspond to one of the values ​​of the Tabla 1
tipoSector String N|| YES
To issue documents from the Health Sector, indicate code '2' in this field
PATH: Invoice, CreditNote, DebitNote
tipoOperacion String AN|..4 YES
Operation type indicator
Rejection If the content of this attribute does not correspond to one of the values ​​of the Tabla 2
PATH: /root/cbc:CustomizationID
totalAnticipos String Ent: N|..15

Dec: N|0..6

NOT
Sum of all advance payments
Rejection Si totalAnticipos does not correspond to the sum of the Anticipos.montoPagado attributes in the advances array
PATH: /root/LegalMonetaryTotal/cbc:PrepaidAmount
totalBaseImponible String Ent: N|..15

Dec: N|0..6

YES
Total Taxable Base Value: Sum of Taxable Bases for the calculation of taxes at the invoice level
Rejection If totalBaseImponible is not equal to the sum of occurrences FacturaImpuestos.baseImponibleTOTALImp
PATH: /root/LegalMonetaryTotal/cbc:TaxExclusiveAmount
totalBrutoConImpuesto String Ent: N|..15

Dec: N|0..6

YES
Total gross value with taxes
Rejection If totalGrossWithTax is not equal to the sum: totalSinImpuestos + sum(ImpuestosTotales.montoTotal)
PATH: /root/LegalMonetaryTotal/cbc:TaxInclusiveAmount
totalCargosAplicados String Ent: N|..15

Dec: N|0..6

NOT
Total Charge: Sum of all charges applied at the invoice level
Rejection If totalCargosAplicados does not correspond to the sum of occurrences CargosDescuentos.monto when CargosDescuentos.indicador is “true”
PATH: /root/LegalMonetaryTotal/cbc:ChargeTotalAmount
totalDescuentos String Ent: N|..15

Dec: N|0..6

NOT
Total Discount: Sum of all the discounts applied at the invoice level
Rejection If totalDescuentos does not correspond to the sum of occurrences CargosDescuentos.monto when CargosDescuentos.indicador is “false”
PATH: /root/LegalMonetaryTotal/cbc:AllowanceTotalAmount
totalMonto String Ent: N|..15

Dec: N|0..6

YES
Value to pay of the document: Total value of items (including charges and discounts at item level) + value of taxes + value of charges – value of discounts – value of advances
Rejection If totalMonto is not consistent with the total value of items + value of taxes + value of charges – value of discounts – value of advances + rounding appliedno es consistente con el valor total de ítems + valor de tributos + valor de cargos – valor de descuentos – valor anticipos + redondeo aplicado
PATH: /root/LegalMonetaryTotal/cbc:PayableAmount
totalProductos String AN|..5 YES
Number or quantity of product lines (rows) present in the document
Rejection If the value of totalProductos is different from the number of occurrences of rans in the detalleDeFactura array
PATH: /root/cbc:LineCountNumeric
totalSinImpuestos String Ent: N|..15

Dec: N|0..6

YES
Total Gross Value before taxes: Sum of the gross values ​​of the invoice lines
Rejection If totalSinImpuestos does not correspond to the sum of the attributes precioTotalSinImpuestos in the detalleDeFactura array
PATH: /root/LegalMonetaryTotal/cbc:LineExtensionAmount

Class.Anticipos

Attribute Data Type Format Required Description
extras Array <Extensible> - NOT
Optional fields or information for the issuer's business model
PATH: Not defined
(see detail in Class.Extensible)
fechaDeRecibido String AN|10 YES
Date on which the payment was received, in format: YYYY-MM-DD
PATH: …/cbc:ReceivedDate
fechadePago String AN|10 NOT
Date on which the payment was made, in format: YYYY-MM-DD
PATH: …/cbc:PaidDate
horaDePago String AN|8 NOT
Time in which the payment was made, in format:HH:MM:SS
PATH: …/cbc:PaidTime
id String A|..150 YES
Internal identification of the payment
PATH: …/cbc:ID
instrucciones String AN|15..500 YES
Payment Instructions
PATH: …/cbc:InstructionID
montoPagado String Ent: N|..15

Dec: N|0..6

YES
Value of the advance payment, it cannot be higher than the total value of the invoice
Notification If montoPagado > totalMonto
PATH: …/cbc:PaidAmount

Class.Autorizado

Attribute Data Type Format Required Description
direccion Direccion - NOT
Direction
PATH: ../cac:PhysicalLocation/cac:Address
email String AN|..50 NOT
Correo Electrónico
PATH: ../cac:Contact/cbc:ElectronicMail
extras Array <Extensible> - NOT
Optional fields or information for the issuer's business model
PATH: Undefined
(see detail in Class.Extensible)
nombreComercial String AN|..50 NOT
Tradename
PATH: ../cac:PartyName/cbc:Name
nombreContacto String AN|..50 NOT
Contact name
PATH: ../cac:Contact/cbc:Name
nota String AN|..50 NOT
Note
PATH: ../cac:Contact/cbc:Note
numeroDocumento String AN|..12 YES
Identification number
PATH: ../cac:PartyIdentification/cbc:ID
numeroDocumentoDV String AN|..2 C/C
Check digit
Obligatory Si tipoIdentificacion es “31”
PATH: ../cac:PartyIdentification/cbc:ID@schemeID
razonSocial String AN|..50 NOT
Business name
PATH: ../cac:PartyLegalEntity/cbc:RegistrationName
telefax String AN|..50 NOT
Facsimile
PATH: ../cac:Contact/cbc:Telefax
telefono String AN|..50 NOT
Telephone
PATH: ../cac:Contact/cbc:Telephone
tipoIdentificacion String AN|..2 YES
ID Type
PATH: /cac:PartyIdentification/cbc:ID@schemeName
See list of possible values ​​in the Tabla 3

Class.CargosDescuentos

Attribute Data Type Format Required Description
codigo String AN|2 C/C
Code to categorize the discount
Mandatory: If it is a discount at invoice level (general)
Rejection If it is a discount and some of the values ​​are not reported in the Tabla 4
PATH: …/cbc:AllowanceChargeReasonCode
Description String AN|10..5000 YES
Free text to inform the reason for the discount
PATH: …/cbc:AllowanceChargeReason
Notification : If a charge or discount is reported and this item is not reported
extras Array <Extensible> - NOT
Optional fields or information for the issuer's business model
PATH: Undefined
(see detail in Class.Extensible)
indicador String N|1 YES
Indicator of whether it is Charge "1" or Discount "0"
Rejection : If this item contains information other than “1” or “0”
PATH: …/cbc:ChargeIndicator
monto String Ent: N|..15

Dec: N|0..6

YES
Total value of the charge or discount, if it is a discount, it cannot be higher than the base value
Rejection : If it is Discount and monto > montoBase
PATH: …/cbc:Amount
montoBase String Ent: N|..15

Dec: N|0..6

YES
Base Value to calculate the discount or charge,
Rejection: If the montoBase is negative, if it is a discount it cannot be greater than the total value of the invoice
Rejection: If montoBase > totalMonto
PATH: …/cbc:BaseAmount
porcentaje String Ent: N|..6

Dec: N|2

YES
Discount percentage
Rejection If this element > 100
PATH: …/cbc:MultiplierFactorNumeric
secuencia String N|..3 YES
Sequence order indicator
PATH: …/cbc:ID

Class.Cliente

Attribute Data Type Format Required Description
actividadEconomicaCIIU String AN|…4 NOT
Corresponds to the economic activity code CIIU
PATH: .. /cac:Party/cbc:IndustryClassificationCode
apellido String AN|…50 NOT
Last name of the acquirer.
PATH: No definido
destinatario Array <Destinatario> - C/C
It allows specifying the means and data of the electronic delivery of the document
Required: If notify field = 'YES'
PATH: Not defined
(see detail in Class.Destinatario)
detallesTributarios Array <Tributos> - YES
Tax details of the acquirer
Rejection If the class is not informed
PATH: /cac:Party/cac:PartyTaxScheme/cac:TaxScheme
(see detail in Class.Tributos)
direccionCliente Direccion - C/C
Information detailing the receiving address of the acquirer
Recommended: This ransf address is the one that is painted in the standard graphical representation
PATH: ../cac:Party/cac:PhysicalLocation/cac:Address
(see detail in Class.Direccion)
direccionFiscal Direccion - C/C
Tax address of the acquirer.
Mandatory: If the purchaser is responsible
Notification If the acquirer is responsible and this class was not informed
PATH: .. /cac:Party/cac:PartyTaxScheme/cac:RegistrationAddress
(see detail in Class.Direccion)
email String AN|..50 C/C
E-mail of the acquirer that will go to the fiscal XML/UBL
(only one email is sent in this field)
PATH: Does not apply node
extras Array <Extensible> - NOT
Optional fields or information for the issuer's business model
PATH: Not defined
(see detail in Class.Extensible)
informacionLegalCliente InformacionLegalCliente - C/C
Legal information of the client
Notification : If tipoPersona = '1' is reported and the attribute is not reported
PATH: ../cac:Party/cac:PartyLegalEntity
(see detail in Class.InformacionLegalCliente)
nombreComercial String AN|5..450 C/C
Commercial name of the acquirer
Obligatory If the commercial name will be shown in the Graphic Rep.
PATH: /cac:Party/cac:PartyName
nombreContacto String AN|5..450 NOT
Contact name
PATH: ../cac:Party/cac:Contact/cbc:Name
nombreRazonSocial String AN|5..450 YES
Name or company name of the acquirer
Recommended: If the person is natural, concatenate in this field the full name (names + surnames)
PATH: …/cac:Party/cac:PartyTaxScheme/cbc:RegistrationName
nota String AN|..450 NOT
Additional contact note
PATH: ../cac:Party/cac:Contact/cbc:Note
notificar String AN|2 YES
Activates the sending of email to the acquirer.
Possible values: “YES” or “NO”
PATH: Does not apply
numeroDocumento String AN|..12 YES
Number of the Document or Fiscal Identification of the purchaser
Mandatory If the acquirer is responsible, he must inform the NIT
Rejection If tipoIdentificacion is '31' and the NIT structure is invalid
Rejection : It is generated if the value of AdditionalAccountID = “2” and it is not mentioned.
Note : To identify the final consumer, the following document “222222222222” is used
PATH: …/cac:Party/cac:PartyTaxScheme/cbc:CompanyID
numeroIdentificacionDV String AN|..2 C/C
NIT verification digit of the acquirer
Required: If TipoIndentificacion = 31, it must be informed
PATH:
../cac:Party/cac:PartyTaxScheme/cbc:CompanyID/@schemeID
responsabilidadesRut Array <Obligaciones> - YES
Obligations and regime of the acquirer
Rejection If the class is not informed
PATH: ../cac:Party/cac:PartyTaxScheme/cbc:TaxLevelCode
(see detail in Class.Obligaciones)
segundoNombre String AN|..50 NOT
Second name of the acquirer.
PATH: Not defined
telefax String N|..20 NOT
Facsimile
PATH: ../cac:Party/cac:Contact/cbc:Telefax
telefono String AN|..20 NOT
Purchaser's phone
PATH: …/cac:Party/cac:Contact/cbc:Telephone
tipoIdentificacion String N|2 YES
Acquirer ID Type
ReRejection If the content of this attribute does not correspond to one of the values ​​of the Tabla 3
Note: To identify the final consumer, the code “13” is used.
PATH: ./cac:Party/cac:PartyTaxScheme/cbc:CompanyID/@schemeName
tipoPersona String N|1 YES
Person type identifier
Rejection If the content of this attribute does not correspond to one of the values ​​of the Tabla 5
PATH: …/cbc:AdditionalAccountID

Class.CondicionPago

Atributte Data Type Format Required Description
codigoEvento String AN|..3 NOT
Event Code
PATH: ../cbc:ReferenceEventCode
comentario String AN|..50 NOT
Note
PATH: ../cbc:Note
duracionPeriodo String AN|..2 NOT
Period Length
PATH: ../cac:SettlementPeriod/cbc:DurationMeasure
duracionPeriodoMedida String AN|..10 NOT
Period length unit of measure
PATH: ../cac:SettlementPeriod/cbc:DurationMeasure@unitCode
extras Array <Extensible> - NOT
Optional fields or information for the issuer's business model
PATH: No definido
fechaVencimiento String AN|..10 YES
Due date
PATH: ../cbc:PaymentDueDate
identificador String AN|..2 NO
Payment conditions
PATH: ../cbc:ID
medioPagoAsociado String AN|..2 NO
Associated payment method
PATH: ../cbc:PaymentMeansID
monto String Ent: N|..15 YES
Amount
PATH: ../cbc:Amount
montoMulta String Ent: N|..15

Dec: N|0..6

YES
Amount of the fine
PATH: ../cbc:PenaltySurchargePercent
montoPenalidad String Ent: N|..15

Dec: N|0..6

YES
Penalty Amount
PATH: ../cbc:PenaltyAmount
periodoDesde String AN|..10 NO
period from
PATH: ../cbc:StartDate
periodoHasta String AN|..10 NO
period until
PATH: ../cbc:EndDate
porcentajeDescuento String Ent: N|..6

Dec: N|2

NO
Discount rate
PATH: ../cbc:SettlementDiscountPercent
porcentajePago String Ent: N|..6

Dec: N|2

YES
Payment Percentage
PATH: . /cbc:PaymentPercent
referenciaAnticipo String AN|..20 NO
Advance reference number
PATH: ../cac:PrepaidPaymentReferenceID

Class.FacturaDetalle

Atributte Data Type Format Required Description
cantidadPorEmpaque String N|..3 NO
Unit quantity of this item per package.
For example, if the item consists of three “six packs”, the quantity to be reported in QuantityPerPackage is 6, while the quantity to be reported in QuantityActual is 3, and the total number of cans being described is 18
PATH: ..cac:Item/cbc:PackSizeNumeric
cantidadReal String N|..6 YES
Real amount on which the price applies
PATH: .. /cac:Price/cbc:BaseQuantity
cantidadRealUnidadMedida String AN|..6 YES
Unit of the quantity on which the price applies
Notification If the attribute value is not found in the Tabla 6
(You can use the standard code "WSD", unit "94" or Mutual Agreement "ZZ" to NOT reclassify the products)
PATH: .. /cac:Price/cbc:BaseQuantity/@unitCode
cantidadUnidades String N|..6 YES
Number of units of the product/service billed
PATH: .. /cbc:InvoicedQuantity
cargosDescuentos Array <CargosDescuentos> - C/C
Information on charges and discounts
Mandatory This arrangement must be reported at the item level, if and only if the charge or discount affects the item's tax base.
If a general individual charge to the invoice generates VAT, it must be reported as an item
PATH: ../cac:AllowanceCharge
(see detail in Class.CargosDescuentos)
codigoFabricante String - NO
Manufacturer code corresponding to the item
PATH: .. /cac:Item/cac:
ManufacturersItemIdentification/cbc:ID
codigoIdentificadorPais String A|2 NO
Identifier code of the country of origin of the item or service
Rejection If the content of this element does not correspond to a value of the ISO 3166-1 alpha-2 standard
PATH: .. /cac:Item/cac:OriginCountry/cbc:IdentificationCode
codigoProducto String AN|..50 YES
Vendor code corresponding to the item
PATH: .. /cac:Item/cac:SellersItemIdentification/cbc:ID
codigoTipoPrecio String AN|..3 C/C
Reported price type code
Required For commercial samples (value = 01)
Rejection If the attribute value is not found in the Tabla 7
PATH: ../cac:PricingReference/cac:AlternativeConditionPrice/cbc:PriceTypeCode
Description String AN|..300 YES
Description of the product or service
PATH: ../Item/cbc:Description[1]
Description2 String AN|..300 YES
Description of the product or service
PATH: ../Item/cbc:Description[2]
Description3 String AN|..300 YES
Description of the product or service
PATH: ../Item/cbc:Description[3]
DescriptionTecnica String AN|..300 NO
Technical data associated with the product or service
PATH: .. /cac:Item/cbc:AdditionalInformation
documentosReferenciados Array <DocumentoReferenciado> - NO
Information describing a referenced document
Required In invoices tipoDocumento Contingency (AdditionalDocumentReference), in invoices that affect a note (BillingReference), in Credit and Debit Notes (DiscrepancyResponse)
PATH: /root/cac:DiscrepancyResponse,
/root/cac:BillingReference,
/root/cac: AdditionalDocumentReference,
/root/cac: DespatchDocumentReference,
/root/cac: ReceiptDocumentReference
(see detail in Class.DocumentoReferenciado)
estandarCodigo String AN NO
Standard code (item or service identification according to a standard)
See attribute values ​​in the Tabla 8
Notification If it is an export invoice (tipoDocumento = 02), and the tariff subheading was not reported
Notification If the code does not exist in a closed standard.
Example: UNSPSC
Notification If the code does not follow the rule of formation of an open code, but with verifiable values
Example: GTIN, Example: Tariff headings
Note: In this case the code 999 (Taxpayer adoption standard) can be used to avoid reclassifying the products
PATH: /cac:Item/cac:StandardItemIdentification/cbc:ID/@schemeID
estandarCodigoID String AN NO
Associated with the standard code (item or service identification according to a standard).
Rejection If standardCodigo = 010 and estandarCodigoID is different from 9
See attribute values ​​in the Tabla 8
PATH: ../cac:Item/cac:StandardItemIdentification/cbc:ID/@schemeAgencyID
estandarCodigoIdentificador String AN NO
Associated with the standard code (item or service identification according to a standard).
See attribute values ​​in the Tabla 8
PATH: ../cac:Item/cac:StandardItemIdentification/cbc:ID@schemeDataURI
estandarCodigoNombre String AN NO
Associated with the standard code (item or service identification according to a standard).
See attribute values ​​in the Tabla 8
PATH: ../cac:Item/cac:StandardItemIdentification/cbc:ID@schemeAgencyName
estandarCodigoProducto String AN NO
Product code according to the standard informed in estandarCodigo
View attribute values ​​in the Tabla 8
PATH: ../cac:Item/cac:StandardItemIdentification/cbc:ID
estandarOrganizacion String - NO
organization standard
PATH: ../cac:Item/cac:StandardItemIdentification/cac:IssuerParty/cac:PartyName/cbc:Name
estandarSubCodigoProducto String - NO
Sub code of the product standard
PATH: ../cac:Item/cac:StandardItemIdentification/cbc:ExtendedID
extras Array <Extensible> - NO
Optional fields or information for the issuer's business model
PATH: No definido
(see detail in Class.Extensible)
impuestosDetalles Array <FacturaImpuestos > - YES
tax information
Rejection If there is more than one element with the same value in the attribute FacturaImpuestos.codigoTOTALImp
This group should NOT be reported for excluded items according to the provisions of the Tax Statute.
Additionally, it should NOT be informed for invoices of the simple group I regime, nor for items whose concept in AIU contracts is not part of the tax base.
At the item level, it only applies to taxes that must be reported at the item level, for example: VAT, INC, IC, National Tax on Fuels, among others.
PATH: ../cac:TaxTotal (impuestos),
../cac: WithholdingTaxTotal (retenciones)
(see detail in Class.FacturaImpuestos)
impuestosTotales Array <ImpuestosTotales> - YES
Sum of taxes for all types
This group should NOT be reported for excluded items according to the provisions of the Tax Statute.
Rejection If the value of the total value of the indicated tax is different from the sum of what is reported in FacturaImpuestos. valorTOTALImp.
At the item level, it only applies to taxes that must be reported at the item level, for example, VAT, INC, IC, National Tax on Fuels, among others.
PATH: ../cac:TaxTotal/cbc:TaxAmount (impuestos),
../cac: WithholdingTaxTotal/cbc:TaxAmount (retenciones)
(see detail in Class.ImpuestosTotales)
informacionAdicional Array <LineaInformacionAdicional> - NO
It serves to add specific product information that may be requested by authorities or entities other than the DIAN
PATH: ../cac:Item/cac:AdditionalItemProperty
(see detail in Class.LineaInformacionAdicional)
mandatorioNumeroIdentificacion String N|..12 C/C
NIT of the agent
Obligatory para facturas por mandato
PATH: ../cac:Item/cac:InformationContentProviderParty/cac:PowerOfAttorney/cac:AgentParty/cbc:ID
mandatorioNumeroIdentificacionDV String N|..2 C/C
Verifier Digit of the agent's NIT
Required for mandated invoices
PATH: ../cac:Item/cac:InformationContentProviderParty/cac:PowerOfAttorney/cac:AgentParty/cbc:ID/ @schemeID
mandatorioTipoIdentificacion String N|2 C/C
Agent identification type
Required For mandated invoices
Notification If mandatorioNumeroIdentificacion is informed and the value of this field is not found in the Tabla 3
PATH: ../cac:Item/cac:InformationContentProviderParty/cac:PowerOfAttorney/cac:AgentParty/cbc:ID/@schemeName
marca String AN|..100 C/C
Item brand.
Required If it is an international invoice
Notification If tipoDocumento = “02” and this item was not reported
PATH: ../Item/cbc:BrandName
modelo String AN|..100 C/C
Item model.
Required If it is an international invoice
Notification If tipoDocumento = “02” and this item was not reported
PATH: ../Item/cbc:ModelName
muestraGratis String N|1 C/C
Indicator of whether the item is free or not (no commercial value)
Required For commercial samples
Possible values: “1” (It is a free sample) or “0” (It is not a free sample)
PATH: ../cbc:FreeOfChargeIndicator
nombreFabricante String AN|..100 NO
Name of the manufacturer of the product/service
PATH: ../cac:Item/cac:ManufacturersItemIdentification/cac:IssuerParty/cac:PartyName/cbc:Name
nota String AN|20..5000 C/C
Free text to add additional information to the article
Mandatory Inform in the case of invoices for AIU-type service contracts. For the Administration item. In this case, the note must begin with the text: "AIU services contract for:" The taxpayer must include the object of the invoiced contract
PATH: ../cbc:Note
precioReferencia String Ent: N|..15

Dec: N|0..6

C/C
Value of the item or service.
Corresponds to the value of the reference price of the item that is given as a sample or gift without commercial value
Required For commercial samples
Rejection If the precioReferencua attribute is reported, then the value of TotalPriceWithoutTaxes must be (0.00), since it is a commercial sample or gift
PATH: ../cac:PricingReference/cac:AlternativeConditionPrice/cbc:PriceAmount
precioTotal String Ent: N|..15

Dec: N|0..6

C/C
Total price of the product or service.
(quantityUnits*UnitSalePrice +charges-discounts +taxes)
Required For use in graphical representations
PATH: Undefined
precioTotalSinImpuestos String Ent: N|..15

Dec: N|0..6

YES
Total value of the line without taxes.
(QuantityUnits*UnitSalePrice +charges-discounts)
Rejection If the TotalPriceWithoutTaxes attribute is reported as 0.00, then the ReferencePrice value must be reported since it is a commercial sample or gift
PATH: ../cbc:LineExtensionAmount
precioVentaUnitario String Ent: N|..15

Dec: N|0..6

YES
Unit price of the product/service
PATH: ../Price/cbc:PriceAmount
secuencia String AN|..4 YES
Sequence order indicator (line number)
Notification If it contains a value already used in the sequence attribute in another group of this file
Notification If the numbers used in the different groups are not consecutive, starting at "1"
PATH: ../cbc:ID
seriales String AN|..500 NO
Product serials (comma separator), Ex: ABC123,ABC456
PATH: ../cac:Item/cac:ItemInstance/cbc:SerialID
subCodigoFabricante String AN|..50 NO
Manufacturer code corresponding to a sub-specification of the article
PATH: ../cac:Item/cac:ManufacturersItemIdentification/cbc:ExtendedID
subCodigoProducto String AN|..50 NO
Issuer/seller code corresponding to a sub-specification of the item
PATH: ../Item/cac:SellersItemIdentification/cbc:ExtendedID
tipoAIU String AN|..50 NO
To classify the type of AIU
PATH: No aplica
unidadMedida String AN|..3 YES
Unit of measure code of the invoiced product/service
Notification If the attribute value is not found in the Tabla 6
(You can use the standard code "WSD", unit "94" or Mutual Agreement "ZZ" to NOT reclassify the products)
PATH: ../cbc:InvoicedQuantity@unitCode

Class.Destinatario

Attribute Data Type Format Required Description
canalDeEntrega String - YES
Electronic Document Delivery Means
It can take the following values: 0– Email; 1– Reception; 2– Interoperability; 3- Whatsapp; 4- Telegram
PATH: Does not apply
email Array <String> - C/C
List of Emails to which the electronic document will be delivered if the DeliveryChannel='0'
Required When deliveryChannel=’0’
PATH: Does not apply
extras Array <Extensible> - NO
Optional fields or information for the issuer's business model
PATH: Not defined
(see detail in Class.Extensible)
fechaProgramada String AN|19 NO
scheduled date
PATH: Does not apply
mensajeProgramado String - NO
Message
PATH: Does not apply
nitProveedorReceptor String N|..12 C/C
NIT of the Recipient
Required When deliveryChannel='1' or '2'
PATH: Does not apply
telefono String AN|..20 C/C
Recipient Telephone
Required When deliveryChannel='3' or '4'
PATH: Does not apply

Class.DocumentoReferenciado

Attribute Data Type Format Required Description
codigoEstatusDocumento String - C/C
Document code or reason
Required When InternalCode is '4'
Rejection If the content of this attribute does not correspond to any of the values ​​of Tabla 9 and Tabla 10
PATH: ../cac:DiscrepancyResponse/cbc:ResponseCode
codigoInterno String N|1 YES
This field decides if in which XML node the ReferencedDocument information is going to be sent, possible values:
  1. AdditionalDocumentReference (FE de contingencia y para acciones comerciales y mercantiles)
  2. DespatchDocumentReference (Doc. De despacho)
  3. ReceiptDocumentReference (Doc. De recepción)
  4. DiscrepancyResponse (N.C y N.D)
  5. BillingReference (Facturas por corrección, N.C y N.D)
cufeDocReferenciado String AN|..90 C/C
CUFE or CUDE of the referenced document
Required When InternalCode is '5'
Mandatory In invoices, it must be filled out only when the transfer invoice originates from the correction or adjustment that occurs through a NC or ND
Mandatory In N.C and N.D, are the references to electronic invoices affected by the Note.
You can only report electronic invoices from the same acquirer
Rejection If CUFE or CUDE does not exist in the DIAN
PATH: /Invoice/cac:BillingReference/cac:CreditNoteDocumentReference/cbc:UUID
/CreditNote/cac:BillingReference/cac:InvoiceDocumentReference/cbc:UUID
/DebitNote/cac:BillingReference/cac:InvoiceDocumentReference/cbc:UUID
Description Array <String> AN|20..5000 C/C
Description of the nature of the correction
Required When InternalCode is '4'
PATH: ../cac:DiscrepancyResponse/cbc:Description
extras Array <Extensible> - NO
Optional fields or information for the issuer's business model
PATH: Not defined
(see detail in Class.Extensible)
fecha String AN|10 C/C
Ransfe date of the referenced document, in format: YYYY-MM-DD
Mandatory When InternalCode is '1', '2', '3' or '5'
Rejection If the date is later than that of the referenced document
PATH: /Invoice/cac:BillingReference/cac:CreditNoteDocumentReference/cbc:IssueDate
/CreditNote/cac:BillingReference/cac:InvoiceDocumentReference/cbc:IssueDate
/DebitNote/cac:BillingReference/cac:InvoiceDocumentReference
/cbc:IssueDate
fechaFinValidez String AN|10 NO
End of Validity Date
PATH: No definido
fechaInicioValidez String AN|10 NO
Validity Start Date
PATH: Not defined
numeroDocumento String AN..20 YES
Concatenation of the prefix and the referenced document number
Rejection If codigoInterno is reported equal to '1', '2', '3', '4' or '5' and the reference document ID is not related
PATH:
/Invoice/cac:BillingReference/cac:CreditNoteDocumentReference/cbc:ID
/CreditNote/cac:BillingReference/cac:InvoiceDocumentReference/cbc:ID
/DebitNote/cac:BillingReference/cac:InvoiceDocumentReference
/cbc:ID
tipoCUFE String AN|..11 C/C
CUFE type algorithm.
“CUFE-SHA384” or “CUDE-SHA384”
Required When InternalCode is '5'
PATH: /Invoice/cac:BillingReference/cac:CreditNoteDocumentReference/cbc:UUID/@schemeName
/CreditNote/cac:BillingReference/cac:InvoiceDocumentReference/cbc:UUID/@schemeName
/DebitNote/cac:BillingReference/cac: InvoiceDocumentReference/cbc:UUID/@schemeName
tipoDocumento String AN|..50 NO
Description of the type of referenced document,
Example: "National Sales Invoice"
PATH: No definido
tipoDocumentoCodigo String AN|2 C/C
Identifier of the referenced document type.
Required When InternalCode is '1'
RejectionIf codigoInterno equal to '1' and the content of this attribute does not correspond to one of the values ​​of the Tabla 21
Note: For remission orders, inform the code ‘AAJ’
PATH: /Invoice/cac:AdditionalDocumentReference/cbc: DocumentTypeCode
/ CreditNote /cac:AdditionalDocumentReference/cbc: DocumentTypeCode
/ DebitNote /cac:AdditionalDocumentReference/cbc: DocumentTypeCode

@IMPORTANT: # To reference sales invoices when issuing a NC or ND, two objects of type DocumentsReferenced must be sent indicating the following:

    • Object 1: indicating the fields codigoEstatusDocumento; internalCode = '4', documentNumber, transfer.
    • Object 2: if the tipoOperacion is equal to 20 (for NC) or 30 (for ND) and codigoInterno = '5', the fields are validated: cufeDocReferenciado, date, and DocumentNumber.
  1. When transmitting a Contingency Invoice, an array of the ReferenceDocuments type must be sent, indicating the fields: internal code = '1', numberDocument, date, typeDocumentCode (corresponding to Contingency Invoice).
  2. To reference Dispatch Documents (internal code = '2') or Reception Documents (internal code = '3') the fields are validated: documentnumber and date.

Class.Entrega

Attribute Data Type Format Required Description
datosTransportistas DatoTransportistas - NO
Carrier Data
PATH: ../cac:DeliveryParty
(see detail in Class.DatosTransportista)
direccionDespacho Direccion - NO
Dispatch Information
PATH: ../cac:Despatch/cac:DespatchAddress
(see detail in Class.Direccion)
direccionEntrega Direccion - NO
Delivery information
PATH: ../cac:DeliveryAddress
(see detail in Class.Direccion)
extras Array <Extensible> - NO
Optional fields or information for the issuer's business model
PATH: Not defined
(see detail in Class.Extensible)
fechaEfectivaSalida String AN|19 NO
Effective date and time of departure of the goods, in format: YYYY-MM-DD HH:MM:SS
Rejection if the effective date of departure is before the date of issue
PATH: ../cbc:ActualDeliveryDate + ../cbc:ActualDeliveryTime
fechaEstimada String AN|19 NO
Estimated date and time, in format: YYYY-MM-DD HH:MM:SS
Rejection si la fecha estimada es anterior a la fecha de emisión
PATH: ../cac:Despatch/cbc:EstimatedDespatchDate y EstimatedDespatchTime
fechaReal String AN|19 NO
Real date, in Format: YYYY-MM-DD HH:MM:SS
Rejection if the actual date is before the issue date
PATH: ../cac:Despatch/cbc:ActualDespatchDate y ActualDespatchTime
fechaSolicitada String AN|19 NO
Requested date, in Format: YYYY-MM-DD HH:MM:SS
Rejection if the Requested date is before the issue date
PATH: ../cac:Despatch/ cbc:RequestedDespatchDate y RequestedDespatchTime
identificacionTransporte String AN|..20 NO
Transportation data
PATH: ../cac:Despatch/cbc:ID
matriculaTransporte String AN|..20 NO
Transportation Enrollment
PATH: ../cac:Despatch/ cbc:ID/@schemeAgencyID

Class.Extras

Atributte Data Type Format Required Description
controlInterno1 String AN|100 C/C
Label assigned for the PDF Printed Representation.
PATH: Variable
controlInterno2 String It depends on the field C/C
Allows two or more fields to be associated using an index (if the fields are associable)
PATH: Variable
nombre String It depends on the field SI
Código del campo extensible a referenciar
(Ver sección USO DE CAMPOS EXTRAS)
PATH: Variable
pdf String N|1 SI
Indicación de mostrar el campo en la representación gráfica PDF
(“0” = No mostrar / “1” = Mostrar)
PATH: Variable
valor String It depends on the field YES
Value of the field to add
PATH: Variable
xml String N|1 YES
Indication to display the field in the XML
(“0” = Don't show / “1” = Show)
PATH: Variable

Class.Extensible

Attribute Data Type Format Required Description
controlInterno1 String AN|100 C/C
Assigned Label for PDF Printed Representation.
PATH: Variable
controlInterno2 String It depends on the field C/C
Allows two or more fields to be associated using an index (if the fields are associable)
PATH: Variable
nombre String It depends on the field YES
Code of the extensible field to reference
PATH: Variable
valor String It depends on the field YES
Value of the field to add
PATH: Variable

Class.FacturaImpuestos

Attribute Data Type Format Required Description
baseImponibleTOTALImp String Ent: N|..15

Dec: N|0..6

YES
Tax base on which the value of the tax is calculated
PATH: ../cac:TaxTotal/TaxSubtotal/cbc:TaxableAmount
codigoTOTALImp String AN|2 YES
tribute identifier
Rejection If the content of this element does not correspond to one of the codes in the Tabla 11
PATH:../cac:TaxTotal/TaxSubtotal/cac:TaxCategory/cac:TaxScheme/cbc:ID
controlInterno String N|1 C/C
Retention type indicator
PATH: Not Defined
extras Array <Extensible> - NO
Optional fields or information for the issuer's business model
PATH: Not defined
(see detail in Class.Extensible)
porcentajeTOTALImp String Ent: N|..2

Dec: N|2*

YES
Tribute rate.
In the event that the tax is a percentage of the taxable value: inform the "percentage" rate to be applied to the tax base
Rejection If you report a different rate for one of the taxes listed in the Tabla 12
PATH:../cac:TaxTotal/TaxSubtotal/cac:TaxCategory/cbc:Percent
unidadMedida String AN|..5 YES
Identification of the unit of measure
Rejection If the content of this element does not correspond to one of the codes in the Tabla 6
PATH:../cac:TaxTotal/cac:TaxSubtotal/cbc:BaseUnitMeasure/@unitCode
unidadMedidaTributo String Ent: N|..2

Dec: N|2

C/C
Base unit of measure for the tribute
Mandatory In the event that the tax is a fixed value per taxed unit, for example the consumption tax on bags or fuel taxes
Rejection If valorTributoUnidad element is informed and UnidadMedidaTributo is not informed
PATH: ../cac:TaxTotal/TaxSubtotal/cbc:BaseUnitMeasure
valorTOTALImp String Ent: N|..15

Dec: N|0..6

YES
Tribute value. Product of the percentage applied to the tax base
Rejection For taxes whose rate is stated in percentages, if valorTOTALImp is different from baseImponibleTOTALImp * percentageTOTALImp
Rejection For taxes whose rate is stated in nominal values ​​(for example, plastic bags), if valorTOTALImp is different from valorTributoUnidad * cantidadUnidades
PATH: ../cac:TaxTotal/TaxSubtotal/cbc:TaxAmount
valorTributoUnidad String Ent: N|..15

Dec: N|0..6

C/C
It is the nominal value of the tax per unit
Mandatory In the event that the tax is a fixed value per taxed unit, for example the consumption tax on bags or fuel taxes
Rejection if the unitMedidaTributo element is NOT informed.
PATH: ../cac:TaxTotal/TaxSubtotal/cbc:PerUnitAmount

@IMPORTANT: In the case of the ICA and RETEICA in which the value of the percentage is based on a thousand, the value of said percentage must be reported based on a hundred, that is, if you want to report a percentage of 11.04% thousand for any of these taxes, it must be indicated in the TOTALImp percentage field as 1,104.

Class.ImpuestosTotales

Attribute Data Type Format Required Description
codigoTOTALImp String AN|2 YES
tribute identifier
Rejection If the content of this element does not correspond to one of the codes in the Tabla 11
PATH: To define
extras Array <Extensible> - NO
Optional fields or information for the issuer's business model.
PATH: Not defined
(see detail in Class.Extensible)
montoTotal String Ent: N|..15

Dec: N|0..6

YES
Sum of all attributes valorTOTALImp
Rejection If montoTotal is different from the sum of all occurrences ofFacturaImpuestos.valorTOTALImp
PATH: ../cac:TaxTotal/cbc:TaxAmount

Class.MediosDePago

Attribute Data Type Format Required Description
codigoBanco String AN|..20 NO
Code of the Bank or Financial Entity
PATH: ../cac:PayeeFinancialAccount/cbc:AccountTypeCode
codigoCanalPago String AN|..20 NO
Payment channel code
PATH: ../cbc:PaymentChannelCode
codigoReferencia String AN|..20 NO
Optional not used for now
PATH: No definido
extras Array <Extensible> - NO
Optional fields or information for the issuer's business model.
PATH: Not defined
(see detail in Class.Extensible)
fechaDeVencimiento String AN|19 C/C
Due date of payment of the invoice in format: YYYY-MM-DD
Mandatory If the sale is on credit
Rejection: If the payment method code is "2" and the expiration date is not sent
PATH: ../cbc:PaymentDueDate
medioPago String AN|..2 YES
Code corresponding to the means of payment
Rejection:If the value of this attribute does not correspond to a value of the Tabla 13
PATH: ../cbc:PaymentMeansCode
metodoDePago String AN|..2 YES
Payment method
Rejection: If the value of this attribute does not correspond to a value of the Tabla 14
PATH: ../cbc:ID
nombreBanco String AN|..50 NO
Name of the Bank or Financial Entity
PATH: ../cac:PayeeFinancialAccount/cbc:Name
numeroDeReferencia String AN|..200 NO
Identifier or internal reference of the Payment
PATH: ../cbc:PaymentID
numeroDias String N|..3 NO
Number of days for payment
PATH: ../cbc:InstructionNote
numeroTransferencia String AN|..20 NO
Transfer number or check number
PATH: ../cac:PayeeFinancialAccount/cbc:ID

Class.OrdenDeCompra

Attribute Data Type Format Required Description
codigoCliente String AN|..20 NO
customer code
PATH: ../cbc:CustomerReference
documentoReferencia DocumentoReferencia - NO
Document Reference
PATH: ../cac:DocumentReference
(see detail in Class.DocumentoReferencia)
extras Array <Extensible> - NO
Optional fields or information for the issuer's business model
PATH: Not defined
(see detail in Class.Extensible)
fecha String AN|10 NO
Date of the Order, in format: YYYY-MM-DD HH:MM:SS
PATH: ../cbc:IssueDate
numeroOrden String AN|..20 YES
Purchase Order Number
Required To send the Purchase Order
PATH: ../cbc:ID
numeroPedido String AN|..20 C/C
Order Number
Required To send the Order
PATH: ../cbc:SalesOrderID
tipoCUFE String AN|..20 NO
CUFE type identifier
PATH: ../cbc:UUID@schemeName
tipoOrden String AN|..20 NO
Order type
PATH: ../cbc:OrderTypeCode
uuid String AN|..90 NO
UUID of some referenced document
PATH: ../cbc:UUID

NOTE: As it is a delivery order, the OrdemDeCompra class must be informed, if it is necessary to indicate more than one order, it must be informed through the DocumentReferenced class with codigoInterno ='1 ', this in order to send the information referring to them in the AdditionalDocumentReference group.

Class.TasaDeCambio

Attribute Data Type Format Required Description
baseMonedaDestino String Ent: N|..15

Dec: N|0..6

YES
Monetary basis for conversion.
Must be 1.00
Rejection If it brings a value other than 1.00
PATH: ../cbc:TargetCurrencyBaseRate
baseMonedaOrigen String Ent: N|..15

Dec: N|0..6

YES
Monetary base of the foreign currency for exchange.
Must be 1.00
Rejection If it brings a value other than 1.00
PATH: ../cbc:SourceCurrencyBaseRate
extras Array <Extensible> - NO
Optional fields or information for the issuer's business model
PATH: Not defined
(see detail in Class.Extensible)
fechaDeTasaDeCambio String AN|10 YES
Date on which the exchange rate was fixed, in format: YYYY-MM-DD
PATH: ../cbc:Date
indicadorDeTasa String - NO
Exchange Rate Indicator
PATH: ../cbc:ExchangeMarketID
monedaDestino String AN|3 YES
Destination currency code of the document.
Rejection If the content of this element is not 'COP'
PATH: ../cbc:TargetCurrencyCode
monedaOrigen String AN|3 YES
Document Base Currency Code
Rejection If the content of this element does not correspond to the ISO-4217 standard

PATH: ../cbc:SourceCurrencyCode

operadorCalculo String - NO
Calculation Operator
PATH: ../cbc: MathematicOperatorCode
tasaDeCambio String Ent: N|..15

Dec: N|0..6

YES
Value of the exchange rate between currencies. It must be filled out with the value of the exchange rate.
For example, for USD-COP, it can be the value of the TRM or rate agreed between the parties (Reported value * Exchange rate value = Reported value in currency reported in destination currency)
PATH: ../cbc:CalculationRate

Class.TasaDeCambioAlternativa

Attribute Data Type Format Required Description
baseMonedaDestino String Ent: N|..15

Dec: N|0..6

SI
Monetary basis for conversion.
Must be 1.00
Rejection If it brings a value other than 1.00
PATH: ../cbc:TargetCurrencyBaseRate
baseMonedaOrigen String Ent: N|..15

Dec: N|0..6

YES
Monetary base of the foreign currency for exchange.
Must be 1.00
Rejection If brings value other than 1.00
PATH: ../cbc:SourceCurrencyBaseRate
extras Array <Extensible> - NO
Optional fields or information for the issuer's business model
PATH: Not defined
(see detail in Class.Extensible)
fechaDeTasaDeCambio String AN|10 YES
Date on which the exchange rate was fixed, in format: YYYY-MM-DD
PATH: ../cbc:Date
indicadorDeTasa String - NO
Exchange Rate Indicator
PATH: ../cbc:ExchangeMarketID
monedaDestino String AN|3 YES
Destination currency code of the document.
Rejection If the content of this element is not 'COP'
PATH: ../cbc:TargetCurrencyCode
monedaOrigen String AN|3 YES
Document Base Currency Code
Rejection If the content of this element does not correspond to the ISO-4217 standard
PATH: ../cbc:SourceCurrencyCode
operadorCalculo String - NO
Calculation Operator
PATH: ../cbc: MathematicOperatorCode
tasaDeCambio String Ent: N|..15

Dec: N|0..6

YES
Value of the exchange rate between currencies. It must be filled out with the value of the exchange rate.
For example, for USD-COP, it can be the value of the TRM or rate agreed between the parties (Reported value * Exchange rate value = Reported value in currency reported in destination currency)
PATH: ../cbc:CalculationRate

Class.TerminosEntrega

Attribute Dato Type Format Required Description
cargosDescuentos Array <CargosDescuentos> - NO
Information related to a charge or a discount
PATH: ../cac:AllowanceCharge
(see detail in Class.CargosDescuentos)
codigoCondicionEntrega String AN|3 C/C
Delivery Conditions Code
Obligatory If it is an export/international invoice
Rejection: If the value of this attribute does not correspond to a value of the Tabla 15
PATH: ../cbc:LossRiskResponsibilityCode
costoTransporte String To define NO
Transport payment method: It is used to indicate how transport costs are paid, for example: http://www.unece.org/
PATH: ../cbc: SpecialTerms
direccionEntrega Class.Direccion - NO
Information detailing the delivery address
PATH: ../cac:DeliveryLocation
(see detail in Class.Direccion)
extras Array <Extensible> - NO
Optional fields or information for the issuer's business model.
PATH: Undefined
(see detail in Class.Extensible)
identificacion String AN|..12 NO
Identification number
PATH: ../cbc:ID
monto String Ent: N|..15

Dec: N|0..6

NO
Amount
PATH: ../cbc:Amount
responsableEntrega String AN|..50 NO
Description of who assumes responsibility in case the merchandise is lost
PATH: ../cbc:LossRisk

Class.Direccion

Attribute Data Type Format Required Description
aCuidadoDe String AN|..50 NO
Care of
PATH: ../cac:Address/cbc:MarkCare
aLaAtenciónDe String AN|..50 NO
For the attention of
PATH: ../cac:Address/cbc:MarkAttention
bloque String AN|..50 NO
block name
PATH: ../cac:Address/cbc:BlockName
buzon String AN|..50 NO
Buzón postal
PATH: ../cac:Address/cbc:Postbox
calle String AN|..50 NO
Name of the street
PATH: ../cac:Address/cbc:StreetName
calleAdicional String AN|..50 NO
Additional Name to better specify the street name
PATH: ../cac:Address/cbc:AdditionalStreetName
City String AN|…50 YES
City
Rejection If country is "CO" and the content of this attribute does not correspond to one of the values ​​in the 'Name' column of the Tabla 19 (columna ‘Nombre : : : : Municipio’ del numeral 6.4.3 del Anexo Técnico)
PATH: ../cac:Address/cbc:CityName
codigoDepartamento String AN|…5 YES
department code
If country is "CO", CodigoDepartamento must correspond to one of the values ​​in the Code column of the Tabla 16
Mandatory for Responsible Issuers and Acquirers
PATH: ../cac:Address/cbc:CountrySubentityCode
correccionHusoHorario String AN|6 NO
Corresponding time zone correction
PATH: ../cac:Address/cbc:TimezoneOffset
departamento String AN|…50 YES
department name
Rejection if the code of the country field is "CO" and the content of this attribute does not correspond to one of the values ​​of the Name column of the Tabla 16
PATH: ../cac:Address/cbc:CountrySubentity
departamentoOrg String AN|..50 NO
An addressable department of an organization
PATH: ../cac:Address/cbc:Department
direccion String AN|…100 YES
Client's address, without indicating city or department
PATH: ../cac:Address/cac:AddressLine/cbc:Line
distrito String AN|..50 NO
District
PATH: /cac:Address/cbc:District
extras Array <Extensible> - NO
Optional fields or information for the issuer's business model.
PATH: Not defined
(see detail in Class.Extensible)
habitacion String AN|..50 NO
Bedroom
PATH: ../cac:Address/cbc:Room
lenguaje String A|2 ISO 639-1 YES
Identifier of the language used in the country name
Notification If the content of this attribute does not correspond to one of the values ​​of the ISO 639-1 standard
NotificaNotificationión If this is a group with information regarding the address of the issuer of an electronic document, it must contain the literal "is"
PATH: /cac:Address/cac:Country/cbc:Name/@languageID
localizacion Array <Coordenadas> AN|..50 NO
address coordinates
PATH: ../cac:Address/cac:LocationCoordinate
(see detail in Class.Coordenadas)
municipio String AN|..50 YES
Municipality Code
Notification If the content of this attribute does not correspond to one of the values ​​of the Tabla 19
PATH: ../cbc:ID
nombreEdificio String AN|..50 NO
Name of a Building
PATH: ../cac:Address/cbc:BuildingName
numeroEdificio String AN|..50 NO
House or building number
PATH: ../cac:Address/cbc:BuildingNumber
numeroParcela String AN|..50 NO
Parcel Number
PATH: ../cac:Address/cbc:PlotIdentification
pais String A|2 YES
Customer country.
Rejection If the content of this element does not correspond to a value of the ISO 3166-1 alpha-2 standard
PATH: ../cac:Address/cac:Country/cbc:IdentificationCode
piso String AN|..50 NO
Flat
PATH: ../cac:Address/cbc:Floor
Region String AN|..50 NO
Region
PATH: ../cac:Address/cbc:Region
subDivision String AN|..50 NO
Subdivision (Name of the Neighborhood)
PATH: ../cac:Address/cbc:CitySubdivisionName
ubicación String AN|..50 NO
A specific location within a building
PATH: ../cac:Address/cbc:InhouseMail
zonaPostal String AN|..10 NO
Postal zone
Notification If the content of this element does not correspond to a corresponding value of the Tabla 20
Notification If the value of the CodigoDepartamento attribute is different from the first 2 digits of the postal code.
PATH: ../cac:Address/cbc:PostalZone

Class.Coordenadas

Attribute Dato Type Format Required Description
gradosLatitud String To define NO
latitude measure in degrees
PATH: ../cbc:LatitudeDegreesMeasure
gradosLongitud String To define NO
measure of longitude in degrees
Rejection Unit greater than 60 minutes
PATH: ../cbc:LongitudeDegreesMeasure
minutosLatitud String N|…5|2.2 NO
Latitude measurement in decimal minutes in mm.mm format
PATH: ../cbc:MarkAttentionIndicator
minutosLongitud String N|…5|2.2 NO
Longitude measurement in decimal minutes in mm.mm format
Rejection Unit greater than 60 minutes
PATH: ../cbc:LongitudeMinutesMeasure
orientacionLatitud String AN|1 NO
Sense of measurement of latitude in relation to the Equator
PATH: ../cbc:LatitudeDirectionCode
orientacionLongitud String AN|1 NO
Sense of longitude measurement in relation to the Equator
PATH: ../cbc:LongitudeDirectionCode

Class.Tributos

Atribute Data Type Format Required Description
codigoImpuesto String AN|2 Yes
tribute identifier
Rejection If the content of this element does not correspond to one of the codes in the Tabla 11
PATH: ../cbc:ID
extras Array <Extensible> - NO
Optional fields or information for the issuer's business model.
PATH: Not defined (see detail in Class.Extensible)

Class.InformacionLegalCliente

Attribute Dato Type Format Required Description
codigoEstablecimiento String - NO
Establishment Code
PATH: /cac:CorporateRegistrationScheme/cbc:CorporateRegistrationTypeCode
nombreRegistroRUT String AN|..450 YES
Name or company name of the acquirer
PATH: ../cac:PartyLegalEntity/cbc:RegistrationName
numeroIdentificacion String AN|..12 YES
Acquirer Identifier.
You must inform the NIT if you are responsible
PATH: ../cac:Party/cac:PartyLegalEntity/cbc:CompanyID
numeroIdentificacionDV String N|..2 C/C
Check digit
Mandatory If tipoIdentificacion =31, the DV of the NIT must be informed
PATH: ../cac:PartyLegalEntity/cbc:CompanyID@schemeID
numeroMatriculaMercantil String N|9 NO
Commercial registration number
PATH: ../cac:CorporateRegistrationScheme/cbc:Name
prefijoFacturacion String - NO
Billing prefix:
PATH: ../cac:CorporateRegistrationScheme/cbc:ID
tipoIdentificacion String N|2 YES
Customer identification type
Rejection If the content of this element is different from “31”
PATH: ../cac:PartyLegalEntity/cbc:CompanyID@schemeName

Class.Obligaciones

Attribute Data Type Format Required Description
extras Array <Extensible> - NO
Optional fields or information for the issuer's business model
PATH: Not defined
(see detail in Class.Extensible)
obligaciones String AN|7 YES
Obligations of the acquirer
Rejection If the content of this attribute does not correspond to one of the values ​​of the Tabla 17
PATH: ../cbc:TaxLevelCode
regimen String AN|2 NO
Optional, if informed, indicate “Not applicable”. Possible Values:
48: “Sales tax - IVA”
49: “Not responsible for IVA”
PATH: .. /cbc:TaxLevelCode/@listName

Class.LineaInformacionAdicional

Attribute Data Type Format Required Description
cantidad String AN|..5 NO
additional quantity
PATH: ../cbc:ValueQuantity
codigo String AN|..5 NO
additional code
PATH: ../cbc:NameCode
codigoInterno1 String - NO
Optional not used for now
PATH: Not defined
codigoInterno2 String - NO
Optional not used for now
PATH: Not defined
Description String AN|..450 NO
additional description
PATH: ../cac:UsabilityPeriod/cbc:Description
fechaFin String AN|10 NO
Period End Date
PATH: ../cac:UsabilityPeriod/cbc:EndDate
fechaInicio String AN|10 NO
Beginning date of the period
PATH: ../cac:UsabilityPeriod/cbc:StartDate
nombre String AN|..50 NO
Characteristic you want to report on the item, for example: (Vehicle Use)
Rejection For each name there must be a value
PATH: ../cbc:Name
(For defining extensible field catalogs at the detail level)
secuencia String AN|..3 NO
Sequence order indicator
PATH: Not defined
tipo String N|1 NO
Value Type Indicator, example Value = ’1’
PATH: Does not apply
valor String AN|..50 NO
Value of the characteristic to be reported, for example: (Particular)
Rejection For each value there must be a name
PATH: ../cbc:Value

Class.DatosTransportistas

Attribute Data Type Format Requerido Description
detallesTributarios Tributos - NO
Tax Types
PATH: ../cac:PartyTaxScheme/cac:TaxScheme
(see detail in Class.Tributos)
direccionResponsableEntrega Direccion - NO
Information on the Address of the Person Responsible for Delivery
PATH: ../cac:Address/cbc:PhysicalLocation
(see detail in Class.Direccion)
email String AN|..50 NO
Email
PATH: ..cac:Contact/cbc:ElectronicMail
extras Array <Extensible> - NO
Optional fields or information for the issuer's business model.
PATH: Not defined
(see detail in Class.Extensible)
indicadordeAtencion String AN|..50 NO
Indicator if it is information on “for the attention of” (FAO)
PATH: ../cbc:MarkAttentionIndicator
indicadordeCuidado String AN|..50 NO
Indicador si es información sobre alguien responsable por los bienes
PATH: ../cbc:MarkCareIndicator
nombreContacto String AN|..50 NO
Contact name
PATH: .. /cac:Contact/cbc:Name
nombreResponsableEntrega String AN|..50 NO
Name of the Responsible for the Delivery
PATH: ../cac:PartyName/cbc:Name
nota String - NO
Contact Note
PATH: ../cac:Contact/cbc:Note
numeroIdentificacion String AN|…12 NO
Carrier NIT
PATH: ../cac:PartyTaxScheme/cbc:CompanyID
numeroIdentificacionDV String N|..2 NO
Check digit
PATH: ../cac:PartyTaxScheme/cbc:CompanyID@schemeID
numeroMatriculaMercantil String AN|..20 NO
Commercial registration number
PATH: ../cac:PartyLegalEntity/cac:CorporateRegistrationScheme/cbc:Name
prefijoFacturacion String AN|..20 NO
Carrier Billing Prefix
PATH: .. /cac:PartyLegalEntity//cac:CorporateRegistrationScheme/cbc:ID
responsabilidadesRut Array <Obligaciones> - NO
Carrier Liability
PATH: ../cac:PartyTaxScheme/cbc:TaxLevelCode
(see detail in Class.Obligaciones)
telefax String AN|..20 NO
Carrier Telefax
PATH: ../cac:PartyTaxScheme/cbc:CompanyID/@schemeName
telefono String AN|..20 NO
carrier phone
PATH: ../cac:Contact/cbc:Telefax
tipoIdentificacion String N|2 NO
Carrier Identification Type
Rejection If the content of this attribute does not correspond to one of the values ​​of the Tabla 3
PATH: ../cac:PartyTaxScheme/cbc:CompanyID/@schemeName
transportadorDireccion Direccion - NO
Tax address of the transporter
PATH: ../cac:PartyLegalEntity/cac:RegistrationAddress
(see detail in Class.Direccion)
transportadorNombre String AN|..50 NO
carrier name
PATH: ../cac:PartyLegalEntity/cbc:RegistrationName
transportadorNumeroDocumento String AN|..12 NO
Carrier document number
PATH: ../cac:PartyLegalEntity/cbc:CompanyID
transportadorNumeroDocumentoDV String AN|..2 NO
Verifier Digit of the NIT of the transporter
PATH: ../cac:PartyLegalEntity/cbc:CompanyID@schemeID
transportadorTipoIdentificacion String N|2 NO
Carrier document type
PATH: ../cac:PartyLegalEntity/cbc:CompanyID@schemeName

Class.DocumentoReferencia

Attribute Data Type Format Required Description
codigoEstatusDocumento String - C/C
Document code or reason
Mandatory When InternalCode is '4'
Rejection If the content of this attribute does not correspond to any of the values ​​of Tabla 9 and Tabla 10
PATH: ../cac:DiscrepancyResponse/cbc:ResponseCode
codigoInterno String N|1 YES
This field decides if in which XML node the information will be sent DocumentoReferenciado, possible values:
  1. AdditionalDocumentReference (FE de contingencia y para acciones comerciales y mercantiles)
  2. DespatchDocumentReference (Doc. De despacho)
  3. ReceiptDocumentReference (Doc. De recepción)
  4. DiscrepancyResponse (N.C y N.D)
  5. BillingReference (Facturas por corrección, N.C y N.D)
cufeDocReferenciado String AN|..90 C/C
CUFE or CUDE of the referenced document
Required When InternalCode is '5'
Mandatory In invoices, it must be filled out only when the electronic invoice originates from the correction or adjustment that occurs through a NC or ND
Mandatory In N.C and N.D, are the references to electronic invoices affected by the Note. You can only report electronic invoices of the same acquirer
Rejection If CUFE or CUDE does not exist in the DIAN
PATH: /Invoice/cac:BillingReference/cac:CreditNoteDocumentReference/cbc:UUID
/CreditNote/cac:BillingReference/cac:InvoiceDocumentReference/cbc:UUID
/DebitNote/cac:BillingReference/cac:InvoiceDocumentReference/cbc:UUID
Description Array <String> AN|20..5000 C/C
Description of the nature of the correction
Required When InternalCode is '4'
PATH: ../cac:DiscrepancyResponse/cbc:Description
extras Array <Extensible> - NO
Optional fields or information for the issuer's business model
PATH: Not defined
(see detail in Class.Extensible)
fecha String AN|10 C/C
Issue date of the referenced document, in Format: YYYY-MM-DD
Mandatory When internal code is '1', '2', '3' or '5'
Rejection If the date is later than that of the referenced document
PATH: /Invoice/cac:BillingReference/cac:CreditNoteDocumentReference/cbc:IssueDate
/CreditNote/cac:BillingReference/cac:InvoiceDocumentReference/cbc:IssueDate
/DebitNote/cac:BillingReference/cac:InvoiceDocumentReference
/cbc:IssueDate
fechaFinValidez String AN|10 NO
End of Validity Date
PATH: Undefined
fechaInicioValidez String AN|10 NO
Validity Start Date
PATH: Undefined
numeroDocumento String AN..20 SI
Concatenation of the prefix and the referenced document number
Rejection if codigoInterno is reported equal to '1', '2', '3', '4' or '5' and the reference document ID is not related
PATH: /Invoice/cac:BillingReference/cac:CreditNoteDocumentReference/cbc:ID
/CreditNote/cac:BillingReference/cac:InvoiceDocumentReference/cbc:ID
/DebitNote/cac:BillingReference/cac:InvoiceDocumentReference
/cbc:ID
tipoCUFE String AN|..11 C/C
CUFE type algorithm.
“CUFE-SHA384” or “CUDE-SHA384”
Required When InternalCode is '5'
PATH: /Invoice/cac:BillingReference/cac:CreditNoteDocumentReference
/cbc:UUID/@schemeName
/CreditNote/cac:BillingReference/cac:InvoiceDocumentReference
/cbc:UUID/@schemeName
/DebitNote/cac:BillingReference/cac: InvoiceDocumentReference
/cbc:UUID/@schemeName
tipoDocumento String AN|..50 NO
Description of the type of referenced document, Example: "National Sales Invoice"
PATH: Not defined
tipoDocumentoCodigo String AN|2 C/C
Identifier of the referenced document type
Required When InternalCode is '1'
Rejection If codigoInterno equal to '1' and the content of this attribute does not correspond to one of the values ​​of the Tabla 21
PATH: Undefined

@IMPORTANT:

  1. To reference sales invoices when issuing a NC or ND, two objects of type DocumentosReferenciados must be sent indicating the following:
    • Object 1: indicating the fields codigoEstatusDocumento; CodihoInterno = '4', numeroDocumento, Description.
    • Object 2: if the tipoOperacion is equal to 20 (for NC) or 30 (for ND) and codigoInterno = '5', the fields are validated: cufeDocReferenciado, date, and DocumentNumber.
  2. When transmitting a Factura de Contingencia , an array of the documentosReferenciados type must be sent, indicating the fields: internal code = '1', numberDocument, date, tipoDocumentCode (corresponding to Contingenc Invoice).
  3. To reference Dispatch Documents (internal code = '2') or Reception Documents (internal code = '3') the fields are validated: documentnumber and date.

Class.sectorSalud

Attribute Data Type Format Required Description
Beneficiario Beneficiario - C/C
Complementary data of the beneficiary of the health service for collection scenarios.
PATH: ../cac:AccountingCustomerParty/cac:Person
(see detail in Class.Beneficiario)
extras Array <Extras> - NO
Optional fields or information for the issuer's business model.
PATH: Not defined
(see detail in Class.Extras)
IdPersonalizacion String To define C/C
To indicate the type of operation through which the collection was made in the accreditation or report scenarios
PATH: To be defined
Pacientes Array <DatosPacienteSalud> - C/C For the report of the additional data fields of the Health Sector
(see detail in Class.DatosPacientesSalud)
TipoEscenario String N|1 YES
Type of Health Sector Scenario. Tabla 27

NOTE: The issuance of health sector documents is only available through version 4 of the issuance service.

Class.Beneficiario

Attribute Data Type Format Required Description
DireccionResidencia Direccion - C/C
Information detailing the address of the beneficiary of the health service.
PATH: ../cac:ResidenceAddress
(see detail in Class.Direccion)
TipoIdentificacion Array <GeneralSalud> - C/C
Identification type of the beneficiary user of the health service.
PATH: cbc:ID/@schemeID

Class.DatosPacientesSalud

Attribute Data Type Format Required Description
CamposGenerales Array <GeneralSalud> - C/C
Additional data fields of the Health Sector to report information associated with the beneficiaries of the health service
PATH: Invoice/ext:UBLExtensions/ext:UBLExtension
(see detail in Class.Direccion)
TipoIdentificacion Array <GeneralSalud> - C/C
Identification type of the beneficiary user of the health service.
PATH: cbc:ID/@schemeID
(see detail in Class.GeneralSalud)

Class.GeneralSalud

Attribute Data Type Format Required Description
nombre String ..2 Si
Additional data field code.
PATH:../Interoperabilidad/Group schemeName="Sector Salud"/Collection schemeName="Usuario"/AdditionalInformation/Name
@Note: It must correspond to one of the codes in the columnTabla 28
valor String depends on the field Yes
Value of the additional data field of the health sector as appropriate.
PATH: ../Interoperabilidad/Group schemeName="Sector Salud"/Collection schemeName="Usuario"/AdditionalInformation/Value

Important: In the case of the field rangoNumeracion, this value must always have the following format (Pefijo-campoDesde), that is, said field is independent of the sequential mode configured in the portal (manual with prefix or manual without prefix).

In the case of the field consecutivoDocumento, This field does depend on the sequential mode configured in the web portal.

  • If the assigned modality is“manual sin prefijo”, the values ​​for the fields rangoNumeracion and consecutivoDocumento’ They should be for example:
Invoice #1: rangoNumeracion= "PRUE-1", consecutivoDocumento= "1"
Invoice #2: rangeNumeracion= "PRUE-1", consecutiveDocument= "2"
...
Invoice #1000: rangoNumeracion= "PRUE-1", consecutivoDocumento= "1000"
  • If the assigned modality is “manual with prefix”, the values ​​for the fields rangoNumeracion and consecutivoDocumento must be, for example:
Invoice #1: rangeNumeracion= "PRUE-1", consecutiveDocument= "PRUE1"
Invoice #2: rangoNumeracion= "PRUE-1", consecutivoDocumento= "PRUE2"
...
Invoice #1000: rangeNumeracion= "PRUE-1", consecutivoDocumento= "PRUE1000"


RESPONSE
Parameters to Receive
Type ID Description
int codigo Indicates the status of the operation returned by the service, (to define catalog)
String consecutivoDocumento Prefix and Consecutive of the Concatenated Document without separators. For the example above it corresponds to: “PRUE980338337”
String cufe "Unique Electronic Invoice Code" corresponding to the document consulted.
Bool esValidoDian “true” if valid
String fechaAceptacionDIAN Day and time in which the DIAN accepted the electronic document, in YYYY-MM-DD HH:MM:SS format
String fechaRespuesta Day and time in which the electronic document was generated, in format AAAA-MM-DD HH:MM:SS
String hash Error detection code
String mensaje This message is associated with the response code, useful for error identification
Array mensajesValidacion Validation messages in case of notification or rejection
String nombre Name defined by the DIAN
String qr QR code string concatenation (control element)
Array reglasNotificacionDIAN Validation rules in case of notification
Array reglasValidacionDIAN Validation rules in case of rejection
String resultado Method consumption result: Processed” or “Error”
String tipoCufe CUFE type algorithm. “CUFE-SHA384” or “CUDE-SHA384”
String xml XML file (type AttachedDocument) encoded in Base64

Once the electronic invoice has been sent successfully (code '200' or '201' in the response), the attached files are sent (through the methodCargarAdjuntos) consuming the SOAP Web Attachments Service, in the scenario that the attachments parameter has been assigned to “1” or “11”, otherwise the SOAP Web Attachments Service will return an error indicating that the document does NOT support attachments.

EstadoDocumento Method

It allows you to consult the status of the document indicated before the Acquirer, before the DIAN, the type of delivery and if it was successful, the list of associated events (ApplicationResponse) and other parameters of interest that can be useful in the software control processes billing (ERP) or for the business model of the issuing client.

REQUEST
Parameters to Send
Type Identifier Description
String tokenEmpresa Supplied by The Factory HKA Colombia
tokenPassword
Documento Prefix and Consecutive of the electronic Document concatenated without separators. Example “PRUE980338212
RESPONSE
Parameters to Receive
Typr Identifier Description
Bool aceptacionFisica Indicates if the document has physical acceptance (physically delivered): “true” or “false”
String acuseComentario Comment informed by the acquirer when making the acknowledgment
String acuseEstatus 0: Acknowledgment not made ; 1: Acknowledgment made
String acuseResponsable Email of the person responsible for making the acknowledgment
String acuseRespuesta 0: Response not sent; 1: Reply Sent
String ambiente Type of document generation environment:
“1: ProductionEnvironment”
“2: TestEnvironment”
String cadenaCodigoQR QR code string concatenation (control element)
String cadenaCufe Chain concatenation of the CUFE code prior to calculation by the corresponding algorithm of the service
int Codigo Indicates the status of the operation returned by the service
String consecutivo Consecutive Document TFHKA/DIAN
String cufe "Unique Code of Electronic Invoice" corresponding to the document consulted, calculated by the corresponding algorithm of the service
String DescriptionDocumento Reference document type identifier,
Example: "National Sales Invoice"
String DescriptionEstatusDocumento Description corresponding to the statusDocument before the DIAN: "Processed Correctly"
String entregaMetodoDIAN Indicates the delivery method to the DIAN
(Synchronous or Asynchronous), (Individual or Batch)
Bool esValidoDIAN
“true” if valid
"false" If not valid
String estatusDocumento Code obtained in the response corresponding to the status of the document before the DIAN (Catalogue to be defined)
Array <Evento> eventos List of Electronic Document events
String fechaAceptacionDIAN Day and time in which the DIAN accepted the electronic document, in format AAAA-MM-DD HH:MM:SS
String fechaDocumento Date on which the document was generated, in format: AAAA-MM-DD
Array <HistorialDeEntregas> historialDeEntregas History of document deliveries
String mensaje This message is associated with the code, useful for identifying errors
String mensajeDocumento Provides a description of the error of each of the initial validations. If there are no errors, no description is provided.
Bool poseeAdjuntos Indicates if the document has attachments:
"true" or "false"
Bool poseeRepresentacionGrafica Indicates if the document has a graphic representation:
"true" or "false"
Array <String> reglasValidacionDIAN Validation messages by the DIAN
String resultado Result of method consumption:
“Processed” or “Error”
String tipoCufe Algorithm used to calculate CUFE:
SHA-256, SHA-384, SHA-512
String tipoDocumento Reference document type identifier
Watch Tabla 1
String trackID This element corresponds to the TrackId of the processed document

Where Class.Evento contains the following information:

Type identifier Description
String ambienteDIAN Generation environment in the DIAN
“1:ambienteDeProducción”
“2:ambienteDePruebas”
String codigo Code the document of the Application Response (event)
String comentario event commentary
String cufe CUFE of the electronic document
String DescriptionEvento Description of use/source of the event
String emisorNumeroDocumento Issuer Identification Number
String emisorNumeroDocumentoDV Issuer Document Number Check Digit
String emisorRazonSocial Company Name of the Issuer
String emisorTipoIdentificacion Issuer Identification Type
Array <ExtrasEvento> extras Extra information corresponding to the event
String fechaEmision Date of Issue of the Application Response (event)
String fechaRecepcion Application Response Reception Date (event)
String hash Application Response document hash
String idPerfilDIAN DIAN Profile
String mensaje ApplicationResponse description message
String nombreArchivoXML XML file name
String nota Content of the Note field of the Application Response
String numeroDelEvento Consecutive Application Response
String receptorNumeroDocumento Receiver Identification Number
String receptorNumeroDocumentoDV Receiver Document Number Check Digit
String receptorRazonSocial Receiver's Business Name
String receptorTipoIdentificacion Receiver Identification Type
String resultado Result of method consumption:
“Processed” or “Error”
String tipoCufe Algorithm used to calculate CUDE of the event:
SHA-256, SHA-384, SHA-512
String tipoEvento Event type identifier:
(Internal/ApplicationResponse)
String versionUBL UBL version of the XML

And Class.ExtrasEvento contains the following information:

Type Identifier Description
String codigoInterno1 Hashtag
String codigoInterno2 Additional Description
String nombre Additional Description
String valor Información Adicional

Class.HistorialDeEntregas will correspond to:

Type Identifier Description
String LeidoEmailIPAddress IP address of the computer in which the acknowledgment of the notification mail was made
String LeidoEstatus Notification mail acknowledgment status
String LeidoFecha Date of acknowledgment of notification mail
String canalDeEntrega Electronic document delivery channel
Array <String> email Email of the recipient of the electronic document
String entregaEstatus Delivery status:
'0': Mail not sent
'200': Mail sent
String entregaEstatusDescription Delivery Status Description
String entregaFecha Document delivery date
String fechaProgramada Delivery Date
String mensajePersonalizado Personalized message to be delivered by Email, WhatsApp or Telegram
String nitProveedorReceptor NIT of the receiving Technological Provider, in case of delivery by Interoperability
String recepcionEmailComentario Customer Acknowledgment Comment
String recepcionEmailEstatus E-mail reception status
1: Accepted
2: Rejected
3: In verification
String recepcionEmailFecha Date of receipt of the Email
String recepcionEmailIPAddress Email receiving IP address
String telefono For delivery by Whatsapp/Telegram

@Important: The structure of this Response may still be subject to change in a future update.

EnvioCorreo Method

Allows you to forward the indicated document to one or more email addresses.

REQUEST
Parameters to Send
Type Identifier Description
String tokenEmpresa Supplied by The Factory HKA Colombia
tokenPassword
Documento Prefix and consecutive of the Electronic Document concatenated without separators. Example “PRUE980338212”. Allows sending multiple recipients (maximum 5) separated by a comma character ','
correo Email to which the document will be sent. Example name@company.com
adjuntos
“0”: Resends the mail without attachments
“1”: Forwards the mail with the attachments stored during the issuance of the document.
RESPONSE
Parameters to Receive
Type Identifier Description
int codigo Indicates the status of the operation returned by the service
String mensaje This message is associated with the code, useful for identifying errors
resultado Result of method consumption:
“Processed” or “Error”

@Important: If during the issuance of the document (Enviar method) the attachments parameter was set to “10” or “11”, The Factory HKA - DFACTURE platform does not will generate standard graphical representation (PDF), therefore only the documents hosted on the platform (AttachedDocument) will be forwarded to the recipients. To forward the mail (with the AttachedDocument and attachments) to an email address different from the one used during the transmission, the CargarAtjuntos method of the SOAP Web Attachments Service can be used again.

DescargaPDF Method

Allows you to download the standard graphic representation (PDF generated by TFHKA) of the document for local storage, local consultation or reprint purposes.

REQUEST
Parameters to Send
Type Identifier Description
String tokenEmpresa Supplied by The Factory HKA Colombia
tokenPassword
documento prefix and consecutive of the Electronic Document concatenated without separators. Example “PRUE980338212”
RESPONSE
Parameters to Receive
Type Identifier Description
int codigo Indicates the status of the operation returned by the service
String cufe “Unique Electronic Invoice Code” corresponding to the document consulted.
String documento Base64 encoded PDF document
String hash Error detection code
String mensaje This message is associated with the code, useful for identifying errors
String resultado Result of method consumption:
“Processed” or “Error”

@Important: If during the issuance of the document (Enviar method) the adjuntos parameter was set to “10” or “11”, The Factory HKA - DFACTURE platform will not will generate standard graphic representation (PDF), therefore this method cannot be used since the service will throw an error indicating that there is NO associated PDF, since it is assumed that the graphic representation has been generated locally by the billing software (ERP).

DescargaXML Method

It allows the download of the XML document (only the electronic document Invoice, CreditNote and DebitNote), in case it is required to validate the information such as the signature or its authenticity or for the purpose of local management and storage.

REQUEST
Parameters to Send
Type Identifier Description
String tokenEmpresa Supplied by The Factory HKA Colombia
tokenPassword
Documento Prefix and Consecutive of the electronic Document concatenated without separators. Example “PRUE980338212
RESPONSE
Parameters to Receive
Type Identifier Description
int codigo Indicates the status of the operation returned by the service
String cufe “Unique Electronic Invoice Code” corresponding to the document consulted
String documento XML document (Invoice, CreditNote or DebitNote) encoded in Base64
String hash Error detection code
String mensaje This message is associated with the code, useful for identifying errors
String resultado Result of method consumption:
“Processed” or “Error”

FoliosRestantes Method

Allows you to consult the stamps (transactions) available. The stamps are consumed in proportion to the transactions made.

REQUEST
Parameters to Send
Type Identifier Description
String tokenEmpresa Supplied by The Factory HKA Colombia
tokenPassword
RESPONSE
Parameters to Receive
Type Identifier Description
int codigo Indicates the status of the operation returned by the service
int foliosRestantes Number of sheets available
String mensaje This message is associated with the code, useful for identifying errors
String resultado Result of method consumption:
“Processed” or “Error”

CargarCertificado Method

For now, this method will only be used internally by The Factory HKA Colombia.

DescargarEventoXML Method

It allows downloading an event or occurrence (ApplicationResponse) related to an Electronic Document (Invoice, CreditNote or DebitNote), generated by a person or entity related to this document (DIAN, Issuer, Acquirer).

REQUEST
Parameters to Send
Type Identifier Description
String tokenEmpresa Supplied by The Factory HKA Colombia
tokenPassword
documentoEvento Consecutive of the event (ApplicationResponse)
Documento Prefix and Consecutive of the electronic Document concatenated without separators. Example “PRUE980338212
RESPONSE
Parameters to Receive
Type Identifier Description
int Código Indicates the status of the operation returned by the service
String Cufe Event CUFE (ApplicationResponse)
String Documento XML document (ApplicationResponse) encoded in Base64
String fechaRespuesta Date and Time consumption of the method, format: AAAA-MM-DD HH:MM:SS
String Hash Error detection code
String Mensaje This message is associated with the code, useful for error identification.
String Resultado Result of method consumption:
“Processed” or “Error”
String tipoCufe Algorithm used to calculate CUFE:
SHA-256, SHA-384, SHA-512

GenerarContenedor Method

UA container is a type of AttachedDocument document, its structure is intended to contain and transmit an electronic document (Invoice, CreditNote or DebitNote) and all the events (ApplicationResponse) generated to date in a single XML file.

REQUEST
Parameters to Send
Type Identifier Description
String tokenEmpresa Supplied by The Factory HKA Colombia
tokenPassword
Documento Prefix and Consecutive of the electronic Document concatenated without separators. Example “PRUE980338212
RESPONSE
Parameters to Receive
Type Identifier Description
int Código Indicates the status of the operation returned by the service
String Contenedor XML document (AttachedDocument) encoded in Base64
String Fecha Date and Time consumption of the method, format: AAAA-MM-DD HH:MM:SS
String Hash Error detection code
String Mensaje This message is associated with the code, useful for error identification.
String Resultado Result of method consumption:
“Processed” or “Error”

GenerarEvento Method

Allows the generation of an event or occurrence (ApplicationResponse) associated with an Electronic Document (Invoice, CreditNote or DebitNote), generated by a person or entity related to this document (DIAN, Issuer, Acquirer).

REQUEST
Parameters to Send
Type Identifier Description
String tokenEmpresa Supplied by The Factory HKA Colombia
tokenPassword
DatosEvento datosEvento Object with the data of the event (ApplicationResponse) to generate

Where Class.DatosEvento contains the following information:

Type Identifier Description
String codigoEvento Indicates the code of the event (to define catalog)
String codigoInterno1 Hashtag
String codigoInterno2 Additional Description
String Comentario Comment or description of the event
String Documento Prefix and consecutive of the Electronic Document concatenated without separators. Example “PRUE980338212”
Array <ExtrasEvento> Extras Additional event information

Where Class.ExtrasEvento contains the following information:

Type Identifier Description
String codigoInterno1 Hashtag
String codigoInterno2 Additional Description
String Nombre Código of the field
String valor Additional Information
RESPONSE
Parameters to Receive
Type Identifier Description
int Código Indicates the status of the operation returned by the service
String consecutivoDocumentoEvento Consecutive of the event (ApplicationResponse)
String Cufe Event CUFE (ApplicationResponse)
String fechaRespuesta Date and Time consumption of the method, format: AAAA-MM-DD HH:MM:SS
String Hash Error detection code
String Mensaje This message is associated with the code, useful for error identification.
String Resultado Result of method consumption:
“Processed” or “Error”
String tipoCufe Algorithm used to calculate CUFE:
SHA-256, SHA-384, SHA-512
String Xml XML document (ApplicationResponse) encoded in Base64