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.CargosDescuentosDiagrama 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
Required on tipoDocumento invoices contingency (AdditionalDocumentReference), in invoices that affect a note (BillingReference), in Credit and Debit Notes (DiscrepancyResponse and BillingReference)
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
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.
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
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
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)
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.
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
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"
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:
AdditionalDocumentReference (FE de contingencia y para acciones comerciales y mercantiles)
DespatchDocumentReference (Doc. De despacho)
ReceiptDocumentReference (Doc. De recepción)
DiscrepancyResponse (N.C y N.D)
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
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.
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).
To reference Dispatch Documents (internal code = '2') or Reception Documents (internal code = '3') the fields are validated: documentnumber and date.
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.
@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.
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
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
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)
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.
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"
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:
AdditionalDocumentReference (FE de contingencia y para acciones comerciales y mercantiles)
DespatchDocumentReference (Doc. De despacho)
ReceiptDocumentReference (Doc. De recepción)
DiscrepancyResponse (N.C y N.D)
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
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.
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).
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.
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:
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:
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