Diferencia entre revisiones de «Métodos servicio adjuntos web soap - Indice Manual Integración Directa»

De tfhkacolwiki
Ir a la navegación Ir a la búsqueda
Línea 1: Línea 1:
<includeonly>=</includeonly>==Métodos servicio adjuntos web soap==<includeonly>=</includeonly>
+
<includeonly>=</includeonly>==Web soap service attachment methods==<includeonly>=</includeonly>
El Servicio Adjuntos Web SOAP, expone un único método que se utilizará n veces por documento electrónico generado, donde n es la cantidad de archivos adjuntos que tenga la factura electrónica que se está procesando (tener en cuenta que al ser un correo en donde se envía la factura con su representación gráfica y los adjuntos, entonces existe un límite de adjuntos basándose en el peso (en KB) de los mismos).
+
The SOAP Web Attachment Service exposes a single method that will be used n times per generated electronic document, where n is the number of attached files that the electronic invoice that is being processed has (bear in mind that since it is an email where the invoice with its graphic representation and the attachments, then there is a limit of attachments based on the weight (in KB) of the same).
  
=== Método “CargarAdjuntos” ===
+
===“CargarAdjuntos” Method===
Permite adjuntar o enviar archivos (anexos) por email durante la emisión del documento electrónico. Este método se ejecuta después de consumir el método '''Enviar''' con el parámetro adjuntos en “1” o en “11”. A continuación, se presenta el flujo del método:
+
It allows attaching or sending files (attachments) by email during the issuance of the electronic document. This method is executed after consuming the '''Enviar''' method with the attachments parameter set to “1” or “11”. Here is the flow of the method:
  
 
[[Archivo:Diagrama de Envió de adjuntos.png|1000px|thumb|Diagrama de Envío de adjuntos]]
 
[[Archivo:Diagrama de Envió de adjuntos.png|1000px|thumb|Diagrama de Envío de adjuntos]]
 
<br>
 
<br>
'''@IMPORTANTE:''' El método '''CargarAdjuntos''' recibe entre sus parámetros un campo para indicar el envío del correo, es decir, si el campo o propiedad '''enviar''' recibe un “0” entonces el documento sigue a la espera por más adjuntos y si recibe “1” se realiza el envío con los adjuntos que se hayan cargado hasta ese momento.
+
'''@IMPORTANT:''' The '''CargarAdjuntos''' method receives among its parameters a field to indicate the sending of the mail, that is, if the field or property '''enviar''' receives a “0 ” then the document continues to wait for more attachments and if it receives “1” it is sent with the attachments that have been loaded up to that moment.
  
 
<br>
 
<br>
Línea 13: Línea 13:
 
<br>
 
<br>
  
; REQUEST: Parámetros a Enviar
+
; REQUEST: Parameters to Send
 
{| class="mw-collapsible wikitable"  
 
{| class="mw-collapsible wikitable"  
! style="background:#f2f2f2; text-align:center;"|Tipo
+
! style="background:#f2f2f2; text-align:center;"|Type
! style="background:#f2f2f2; text-align:center;"|Identificador
+
! style="background:#f2f2f2; text-align:center;"|Identifier
! style="background:#f2f2f2; text-align:center;"|Descripción
+
! style="background:#f2f2f2; text-align:center;"|Description
 
|- valign="center"
 
|- valign="center"
 
|-
 
|-
 
|rowspan="2"|String
 
|rowspan="2"|String
 
|tokenEmpresa
 
|tokenEmpresa
|rowspan="2"|Suministrado por The Factory HKA Colombia
+
|rowspan="2"|Supplied by The Factory HKA Colombia
 
|-
 
|-
 
|tokenPassword
 
|tokenPassword
Línea 28: Línea 28:
 
|Adjunto
 
|Adjunto
 
|Adjunto
 
|Adjunto
|Datos de control del documento que se desea adjuntar
+
|Control data of the document to be attached
 
|}
 
|}
Donde Class.Adjunto contiene la siguiente información:
+
Where Class.Adjunto contains the following information:
 
{| class="mw-collapsible wikitable"  
 
{| class="mw-collapsible wikitable"  
! style="background:#f2f2f2; text-align:center;"|Tipo
+
! style="background:#f2f2f2; text-align:center;"|Type
! style="background:#f2f2f2; text-align:center;"|Identificador
+
! style="background:#f2f2f2; text-align:center;"|Identifier
! style="background:#f2f2f2; text-align:center;"|Descripción
+
! style="background:#f2f2f2; text-align:center;"|Description
 
|- valign="center"
 
|- valign="center"
 
|-
 
|-
 
|byte[]
 
|byte[]
 
|Archivo
 
|Archivo
|Arreglo de bytes del archivo que se desea adjuntar
+
|Array of bytes of the file to be attached
 
|-
 
|-
 
|Array <string>
 
|Array <string>
 
|email
 
|email
|Correo al cual se desea enviar el XML (AttachedDocument) con todos los adjuntos cargados hasta el momento (se activa envío cuando enviar es “1”)
+
|Mail to which you want to send the XML (AttachedDocument) with all the attachments loaded so far (sending is activated when sending is "1")
 
|-
 
|-
 
|String
 
|String
 
|Enviar  
 
|Enviar  
 
|
 
|
: "0" Adjunta archivo y lo asocia al documento electrónico sin enviar el email al Adquiriente
+
: "0" Attaches file and associates it with the electronic document without sending the email to the Acquirer
: "1" Adjunta archivo al documento electrónico y envía email de manera inmediata al Adquiriente
+
: "1" Attach the file to the electronic document and immediately send an email to the Acquirer
 
|-
 
|-
 
|String
 
|String
 
|Formato
 
|Formato
|Extensión del archivo adjunto, formatos permitidos:
+
|Attachment extension, allowed formats:
: (png, bmp, jpg, pdf, doc, docx, xls, xlsx, ppt, pptx,rar)
+
: (png, bmp, jpg, pdf, doc, docx, xls, xlsx, ppt, pptx, rar)
 
|-
 
|-
 
|String
 
|String
 
|Nombre
 
|Nombre
|Nombre que tomará el archivo adjunto
+
|Name that the attached file will take
 
|-
 
|-
 
|String
 
|String
 
|numeroDocumento
 
|numeroDocumento
|Prefijo y consecutivo del Documento Electrónico concatenado sin separadores. Ejemplo “PRUE980338212”
+
|Prefix and consecutive of the Electronic Document concatenated without separators. Example “PRUE980338212”
 
|-
 
|-
 
|String
 
|String
 
|Tipo
 
|Tipo
| 1: Representación gráfica generada por el ERP 2: Tipo de documento anexo o adjuntos
+
| 1: Graphic representation generated by the ERP 2: Type of attached document or attachments
 
|}
 
|}
; RESPONSE: Parámetros a Recibir
+
; RESPONSE: Parameters to Receive
 
{| class="mw-collapsible wikitable"  
 
{| class="mw-collapsible wikitable"  
! style="background:#f2f2f2; text-align:center;"|Tipo
+
! style="background:#f2f2f2; text-align:center;"|Type
! style="background:#f2f2f2; text-align:center;"|Identificador
+
! style="background:#f2f2f2; text-align:center;"|Identifier
! style="background:#f2f2f2; text-align:center;"|Descripción
+
! style="background:#f2f2f2; text-align:center;"|Description
 
|- valign="center"
 
|- valign="center"
 
|-
 
|-
 
|int
 
|int
 
|Código
 
|Código
|Indica el Estado de la operación retornado por el servicio
+
|Indicates the status of the operation returned by the service
 
|-
 
|-
 
|String
 
|String
 
|Mensaje
 
|Mensaje
|Este mensaje de identificación de errores
+
|This error identification message
 
|-
 
|-
 
|Array <String>
 
|Array <String>
 
|mensajesValidacion
 
|mensajesValidacion
|Mensajes de validación en caso de rechazo
+
|Validation messages in case of rejection
 
|-
 
|-
 
|String
 
|String
 
|resultado
 
|resultado
|Resultado
+
|Result
 
|}
 
|}
 
{{clear}}
 
{{clear}}
  
==='''ESCENARIOS EMISIÓN DE DOCUMENTOS CON REPRESENTACIÓN GRÁFICA'''===
+
==='''SCENARIOS ISSUANCE OF DOCUMENTS WITH GRAPHIC REPRESENTATION'''===
  
===<font color="Blue">Representación gráfica estándar (Uso del parámetro adjuntos del método Enviar en ‘0’ o ‘1’)</font>===
+
===<font color="Blue">Standard Graphical Representation (Using the Attachment parameter of the Send method as '0' or '1')</font>===
  
Bajo este escenario, el emisor de documentos electrónicos cuenta con la representación gráfica estándar generada por TFHKA, la cual será entregada al adquiriente en el correo de notificación del documento electrónico.
+
Under this scenario, the issuer of electronic documents has the standard graphic representation generated by TFHKA, which will be delivered to the acquirer in the notification email of the electronic document.
Durante la emisión del documento, pueden incluirse en la representación gráfica estándar campos extras reservados por TFHKA, los cuales incluirán etiquetas predeterminadas en la misma con el fin de brindarle al lector de la representación, claridad sobre los montos e información
+
During the issuance of the document, extra fields reserved by TFHKA may be included in the standard graphic representation, which will include predetermined labels in it in order to provide the reader of the representation with clarity about the amounts and information
reportada. A continuación se detallan los campos extras reservados por TFHKA en la representación gráfica estándar:
+
reported. The extra fields reserved by TFHKA in the standard graphic representation are detailed below:
  
 
{| class="wikitable" style="width: 100%;"
 
{| class="wikitable" style="width: 100%;"
Línea 105: Línea 105:
 
|- valign="center"
 
|- valign="center"
 
|-style="text-align:center;"  
 
|-style="text-align:center;"  
|colspan="2"|CAMPOS EXTENSIBLES RESERVADOS POR TFHKA
+
|colspan="2"|EXTENSIBLE FIELDS RESERVED BY TFHKA
 
{| class="wikitable" style="width: 100%;" style="margin: auto;"  
 
{| class="wikitable" style="width: 100%;" style="margin: auto;"  
! style="color:white;background:#2F5496; text-align:center;"|Código
+
! style="color:white;background:#2F5496; text-align:center;"|Code
! style="color:white;background:#2F5496; text-align:center;"|Etiqueta PDF
+
! style="color:white;background:#2F5496; text-align:center;"|PDF label
! style="color:white;background:#2F5496; text-align:center;"|Descripción
+
! style="color:white;background:#2F5496; text-align:center;"|Description
! style="color:white;background:#2F5496; text-align:center;"|Etiqueta PDF
+
! style="color:white;background:#2F5496; text-align:center;"|PDF label
! style="color:white;background:#2F5496; text-align:center;"|Observaciones
+
! style="color:white;background:#2F5496; text-align:center;"|Observations
 
|- valign="center"
 
|- valign="center"
 
|100200
 
|100200
|Pie de página
+
|Footer
|Pie de página
+
|Footer
 
|AN|100
 
|AN|100
 
|
 
|
 
|-
 
|-
 
|5170000
 
|5170000
|Total Base Excluida
+
|Total Base Excluded
|Total Base Excluida
+
|Total Base Excluded
|Formato Libre
+
|Free Format
|Para totales el R.G
+
|For totals the R.G
 
|-
 
|-
 
|5170001
 
|5170001
|TOTAL Descuento Detalle
+
|TOTAL Discount Detail
|TOTAL Descuento Detalle
+
|TOTAL Discount Detail
|Formato Libre
+
|Free Format
|Para totales el R.G
+
|For totals the R.G
 
|-
 
|-
 
|5170002
 
|5170002
|TOTAL Retenciones
+
|TOTAL Withholdings
|TOTAL Retenciones
+
|TOTAL Withholdings
|Formato Libre
+
|Free Format
|Para totales el R.G
+
|For totals the R.G
 
|-
 
|-
 
|5170003
 
|5170003
|TOTAL a Pagar
+
|Total to pay
|TOTAL a Pagar
+
|TOTAL to Pay
|Formato Libre
+
|Free Format
|Para totales el R.G
+
|For totals the R.G
 
|-
 
|-
 
|5170004
 
|5170004
|TOTAL A PAGAR en Letras
+
|TOTAL TO PAY in Letters
|TOTAL A PAGAR en Letras
+
| TOTAL TO PAY in Letters
|Formato Libre
+
|Free Format
|Para totales el R.G
+
|For totals the R.G
 
|}
 
|}
 
|}
 
|}
Línea 153: Línea 153:
 
[[Archivo:EtiquetasRG.png|centro|EtiquetasRG]]
 
[[Archivo:EtiquetasRG.png|centro|EtiquetasRG]]
  
===<font color="Blue">Representación gráfica personalizada por TFHKA</font>===
+
===<font color="Blue">Custom graphic representation by TFHKA</font>===
  
Para el caso en que el emisor contrate un servicio de representación gráfica con TFHKA, se debe tener en cuenta que el mismo es un proyecto de desarrollo el cual conlleva tiempos y costos asociados.
+
In the event that the issuer contracts a graphic representation service with TFHKA, it must be taken into account that it is a development project which entails associated times and costs.
Adicional al tiempo asociado al desarrollo del template personalizado por parte TFHKA, se debe tener en cuenta la adaptación del desarrollo en el sistema contable, el cual debe ser realizado por la casa de software o desarrollador del mismo, con el fin de reportar los campos extras en los cuales se reflejará la información que se desea visualizar.
+
In addition to the time associated with the development of the personalized template by TFHKA, the adaptation of the development in the accounting system must be taken into account, which must be carried out by the software house or its developer, in order to report the extra fields. in which the information to be displayed will be reflected.
  
Los campos extras mencionados anteriormente son suministrados por el equipo de representaciones gráficas de TFHKA, una vez se cuente con una versión aprobada por el contirbuyente para su uso.
+
The extra fields mentioned above are provided by the TFHKA graphics team, once a version approved by the taxpayer is available for use.
  
<font color="red">@IMPORTANTE:</font>Como se observa, este escenario involucra desarrollo de ambas partes (ERP y TFHKA), por lo tanto antes de contratar este servicio se deben dimensionar el alcance y costos de personalización.
+
<font color="red">@IMPORTANT:</font>As can be seen, this scenario involves the development of both parties (ERP and TFHKA), therefore, before contracting this service, the scope and customization costs must be determined.
  
===<font color="Blue">Representación gráfica enviada como adjunto desde el sistema administrativo o ERP (Uso del parámetro adjuntos del método Enviar en ‘11’)</font>===
+
===<font color="Blue">Graphic representation sent as an attachment from the administrative system or ERP (Use of the attachments parameter of the method Send in '11')</font>===
  
Para el caso en que el emisor contrate un servicio de representación gráfica con la casa de software, desarrollador o encargado de realizar los ajustes correspondientes en el software contable o ERP para la emisión de documentos electrónicos, se deben tener en cuenta los siguientes aspectos:
+
In the case in which the issuer contracts a graphic representation service with the software house, developer or person in charge of making the corresponding adjustments in the accounting software or ERP for the issuance of electronic documents, the following aspects must be taken into account:
* The Factory HKA es responsable de la generación del UBL y su transmisión a la DIAN.
+
* The Factory HKA is responsible for the generation of the UBL and its transmission to the DIAN.
* Una vez se compruebe la correcta validación y generación del UBL la casa de software puede proceder a generar una representación gráfica que debe cumplir con:
+
* Once the correct validation and generation of the UBL is verified, the software house can proceed to generate a graphic representation that must comply with:
* Los elementos de ley exigidos por la DIAN: inclusión del código QR y de la cadena del CUFE ó CUDE en los documentos, según corresponda.
+
* The elements of law required by the DIAN: inclusion of the QR code and the CUFE or CUDE chain in the documents, as appropriate.
* Los elementos de ley exigidos por cualquier entidad supervisora al emisor de los documentos.
+
* The elements of law required by any supervisory entity to the issuer of the documents.
* Los elementos visuales y de representación de marca exigidos por el propio cliente: logos, información bancaria, leyendas referentes a las responsabilidades tributarias del emisor, etc.
+
* The visual and brand representation elements required by the client: logos, banking information, legends referring to the tax responsibilities of the issuer, etc.
* La Casa de Software, en este escenario, asume la responsabilidad junto con el propio contribuyente de cualquier incidente de fraude por evasión, malinterpretación, error u omisión de información relevante y obligatoria por parte de la normativa.
+
* The Software House, in this scenario, assumes responsibility together with the taxpayer for any incident of fraud due to evasion, misinterpretation, error or omission of relevant and mandatory information by the regulations.
* TFHKA no resguarda esta representación en sus sistemas y deja claro que su participación como proveedor tecnológico se limita a la generación del UBL y su validación ante la DIAN.
+
* TFHKA does not protect this representation in its systems and makes it clear that its participation as a technology provider is limited to the generation of the UBL and its validation before the DIAN.
  
'''Durante la sincronización de los archivos adjuntos se deben tener en cuenta los siguientes aspectos:'''
+
'''During the synchronization of attachments, the following aspects must be taken into account:'''
  
* Los archivos a sincronizar deben ser codifcados en Base64.
+
* Files to be synced must be Base64 encoded.
* Se recomienda indicar como correos de destinatarios los emails reportados en el array Class.Destinatario.email[]
+
* It is recommended to indicate as recipient emails the emails reported in the Class.Destinatario.email[] array
* Los nombres de los archivos adjuntos a sincronizar deben ser diferentes.
+
* The names of the attachments to be synced must be different.
* Solo se admite la sincronización de un (1) archivo con el parámetro tipo = ‘1’, correspondiente a la representación gráfica del documento electrónico.
+
* Only the synchronization of one (1) file is allowed with the type parameter = '1', corresponding to the graphic representation of the electronic document.
* Para los adjuntos comunes a sincronizar, los cuales no corresponden a la representación gráfica del documento, se deberá indicar el parámetro tipo del método CargarAdjuntos en ‘2’, correpondiente a Anexos o adjuntos comunes.
+
* For the common attachments to be synchronized, which do not correspond to the graphic representation of the document, the type parameter of the Loading Attachments method must be set to '2', corresponding to Annexes or common attachments.
* Todos los adjuntos a ser sincronizados no deben superar el peso de 1.8 MB, esto con el fin de dar cumplimiento a lo estableciedo en el Anexo Técnico de la DIAN con respecto al peso máximo de 2MB del archivo .ZIP entregado en la notificación de correo electrónico.
+
* All attachments to be synchronized must not exceed the weight of 1.8 MB, this in order to comply with the provisions of the DIAN Technical Annex regarding the maximum weight of 2MB of the .ZIP file delivered in the email notification electronic.

Revisión del 18:27 1 mar 2022

Web soap service attachment methods

The SOAP Web Attachment Service exposes a single method that will be used n times per generated electronic document, where n is the number of attached files that the electronic invoice that is being processed has (bear in mind that since it is an email where the invoice with its graphic representation and the attachments, then there is a limit of attachments based on the weight (in KB) of the same).

“CargarAdjuntos” Method

It allows attaching or sending files (attachments) by email during the issuance of the electronic document. This method is executed after consuming the Enviar method with the attachments parameter set to “1” or “11”. Here is the flow of the method:

Diagrama de Envío de adjuntos


@IMPORTANT: The CargarAdjuntos method receives among its parameters a field to indicate the sending of the mail, that is, if the field or property enviar receives a “0 ” then the document continues to wait for more attachments and if it receives “1” it is sent with the attachments that have been loaded up to that moment.




REQUEST
Parameters to Send
Type Identifier Description
String tokenEmpresa Supplied by The Factory HKA Colombia
tokenPassword
Adjunto Adjunto Control data of the document to be attached

Where Class.Adjunto contains the following information:

Type Identifier Description
byte[] Archivo Array of bytes of the file to be attached
Array <string> email Mail to which you want to send the XML (AttachedDocument) with all the attachments loaded so far (sending is activated when sending is "1")
String Enviar
"0" Attaches file and associates it with the electronic document without sending the email to the Acquirer
"1" Attach the file to the electronic document and immediately send an email to the Acquirer
String Formato Attachment extension, allowed formats:
(png, bmp, jpg, pdf, doc, docx, xls, xlsx, ppt, pptx, rar)
String Nombre Name that the attached file will take
String numeroDocumento Prefix and consecutive of the Electronic Document concatenated without separators. Example “PRUE980338212”
String Tipo 1: Graphic representation generated by the ERP 2: Type of attached document or attachments
RESPONSE
Parameters to Receive
Type Identifier Description
int Código Indicates the status of the operation returned by the service
String Mensaje This error identification message
Array <String> mensajesValidacion Validation messages in case of rejection
String resultado Result

SCENARIOS ISSUANCE OF DOCUMENTS WITH GRAPHIC REPRESENTATION

Standard Graphical Representation (Using the Attachment parameter of the Send method as '0' or '1')

Under this scenario, the issuer of electronic documents has the standard graphic representation generated by TFHKA, which will be delivered to the acquirer in the notification email of the electronic document. During the issuance of the document, extra fields reserved by TFHKA may be included in the standard graphic representation, which will include predetermined labels in it in order to provide the reader of the representation with clarity about the amounts and information reported. The extra fields reserved by TFHKA in the standard graphic representation are detailed below:

EXTENSIBLE FIELDS RESERVED BY TFHKA
Code PDF label Description PDF label Observations
100200 Footer Footer 100
5170000 Total Base Excluded Total Base Excluded Free Format For totals the R.G
5170001 TOTAL Discount Detail TOTAL Discount Detail Free Format For totals the R.G
5170002 TOTAL Withholdings TOTAL Withholdings Free Format For totals the R.G
5170003 Total to pay TOTAL to Pay Free Format For totals the R.G
5170004 TOTAL TO PAY in Letters TOTAL TO PAY in Letters Free Format For totals the R.G
CamposExtrasReservados
EtiquetasRG

Custom graphic representation by TFHKA

In the event that the issuer contracts a graphic representation service with TFHKA, it must be taken into account that it is a development project which entails associated times and costs. In addition to the time associated with the development of the personalized template by TFHKA, the adaptation of the development in the accounting system must be taken into account, which must be carried out by the software house or its developer, in order to report the extra fields. in which the information to be displayed will be reflected.

The extra fields mentioned above are provided by the TFHKA graphics team, once a version approved by the taxpayer is available for use.

@IMPORTANT:As can be seen, this scenario involves the development of both parties (ERP and TFHKA), therefore, before contracting this service, the scope and customization costs must be determined.

Graphic representation sent as an attachment from the administrative system or ERP (Use of the attachments parameter of the method Send in '11')

In the case in which the issuer contracts a graphic representation service with the software house, developer or person in charge of making the corresponding adjustments in the accounting software or ERP for the issuance of electronic documents, the following aspects must be taken into account:

  • The Factory HKA is responsible for the generation of the UBL and its transmission to the DIAN.
  • Once the correct validation and generation of the UBL is verified, the software house can proceed to generate a graphic representation that must comply with:
  • The elements of law required by the DIAN: inclusion of the QR code and the CUFE or CUDE chain in the documents, as appropriate.
  • The elements of law required by any supervisory entity to the issuer of the documents.
  • The visual and brand representation elements required by the client: logos, banking information, legends referring to the tax responsibilities of the issuer, etc.
  • The Software House, in this scenario, assumes responsibility together with the taxpayer for any incident of fraud due to evasion, misinterpretation, error or omission of relevant and mandatory information by the regulations.
  • TFHKA does not protect this representation in its systems and makes it clear that its participation as a technology provider is limited to the generation of the UBL and its validation before the DIAN.

During the synchronization of attachments, the following aspects must be taken into account:

  • Files to be synced must be Base64 encoded.
  • It is recommended to indicate as recipient emails the emails reported in the Class.Destinatario.email[] array
  • The names of the attachments to be synced must be different.
  • Only the synchronization of one (1) file is allowed with the type parameter = '1', corresponding to the graphic representation of the electronic document.
  • For the common attachments to be synchronized, which do not correspond to the graphic representation of the document, the type parameter of the Loading Attachments method must be set to '2', corresponding to Annexes or common attachments.
  • All attachments to be synchronized must not exceed the weight of 1.8 MB, this in order to comply with the provisions of the DIAN Technical Annex regarding the maximum weight of 2MB of the .ZIP file delivered in the email notification electronic.