Regenerar PDFs
Regeneración de representaciones gráficas PDF.
2 operaciones documentadas.
Regenerar Documento Con JSON
Section titled “Regenerar Documento Con JSON”POSThttps://api.facttec.co/api/ubl2.1/regeneratepdf
-
Usa la base URL de Facttec:
https://api.facttec.co -
Requiere un token de autorización el cual fue devuelto al realizar el Paso 1 — Configurar empresa, si lo extraviaste, puedes consultarlo o regenerarlo desde el panel admin de Facttec.
-
En URL el último parametro corresponde al id del set de pruebas que la dian entregó al momento de registrar el modo de operación software propio.
https://api.facttec.co/api/ubl2.1/invoice/iddelsetdepruebasdeladian
- Este endpoint se puede utilizar de dos modos:
-
asíncrono:
https://api.facttec.co/api/ubl2.1/invoice/iddelsetdepruebasdeladian -
síncrono:
https://api.facttec.co/api/ubl2.1/invoice
-
El modo síncrono no afecta al set de pruebas, pero la respuesta de la DIAN incluye posibles errores de validación y estado de la factura, válida o no válida.
-
El modo asíncrono, afecta el set de pruebas y en la respuesta no se incluye el resultado de la factura, solo se entrega un ZIP_KEY el cual debe ser consultado mediante el endpoint:
https://api.facttec.co/api/ubl2.1/status/zip
de la sección 03 - Consultas de estado para asi poder establecer si la factura fue válida o no y los errores de validación.
Headers
| Header | Valor |
|---|---|
Accept |
application/json |
Content-Type |
application/json |
Authorization |
Bearer {api_token} |
Body JSON
{ "cufe": "c4075c096de4eb5f6ab17697936fb1687e468bb73f015bfe62701af753c7f1878614234734efea07e76bc3edfb922e44", "number": 990000667, "type_document_id": 1, "date": "2022-10-26", "time": "04:08:12", "resolution_number": "18760000001", "prefix": "SETP", "notes": "ESTA ES UNA NOTA DE PRUEBA, ESTA ES UNA NOTA DE PRUEBA, ESTA ES UNA NOTA DE PRUEBA, ESTA ES UNA NOTA DE PRUEBA, ESTA ES UNA NOTA DE PRUEBA, ESTA ES UNA NOTA DE PRUEBA, ESTA ES UNA NOTA DE PRUEBA, ESTA ES UNA NOTA DE PRUEBA, ESTA ES UNA NOTA DE PRUEBA, ESTA ES UNA NOTA DE PRUEBA, ESTA ES UNA NOTA DE PRUEBA, ESTA ES UNA NOTA DE PRUEBA, ESTA ES UNA NOTA DE PRUEBA, ESTA ES UNA NOTA DE PRUEBA", "disable_confirmation_text": true, "establishment_name": "TORRE SOFTWARE", "establishment_address": "BRR LIMONAR MZ 6 CS 3 ET 1 PISO 2", "establishment_phone": "3226563672", "establishment_municipality": 600, "atacheddocument_name_prefix": "FES-SETP990000244-", "establishment_email": "alternate_email@alternate.com", "sendmail": true, "sendmailtome": true, "seze": "2021-2017", "foot_note": "PRUEBA DE TEXTO LIBRE QUE DEBE POSICIONARSE EN EL PIE DE PAGINA DE LA REPRESENTACION GRAFICA DE LA FACTURA ELECTRONICA VALIDACION PREVIA DIAN", "customer": { "identification_number": 800135582, "dv": 7, "name": "FUNDACION ALEJANDRO LONDOÑO", "phone": "3105193539", "address": "CLL 4 NRO 33-90", "email": "gerencia@torresoftware.com", "merchant_registration": "0000000-00", "type_document_identification_id": 6, "type_organization_id": 1, "type_liability_id": 117, "municipality_id": 822, "type_regime_id": 1 }, "payment_form": { "payment_form_id": 2, "payment_method_id": 30, "payment_due_date": "2022-11-26", "duration_measure": "30" }, "allowance_charges": [ { "discount_id": 1, "charge_indicator": false, "allowance_charge_reason": "DESCUENTO GENERAL", "amount": "50000.00", "base_amount": "1000000.00" } ], "legal_monetary_totals": { "line_extension_amount": "840336.134", "tax_exclusive_amount": "840336.134", "tax_inclusive_amount": "1000000.00", "allowance_total_amount": "50000.00", "payable_amount": "950000.00" }, "tax_totals": [ { "tax_id": 1, "tax_amount": "159663.865", "percent": "19", "taxable_amount": "840336.134" } ], "invoice_lines": [ { "unit_measure_id": 70, "invoiced_quantity": "1", "line_extension_amount": "840336.134", "free_of_charge_indicator": false, "tax_totals": [ { "tax_id": 1, "tax_amount": "159663.865", "taxable_amount": "840336.134", "percent": "19.00" } ], "description": "COMISION POR SERVICIOS", "notes": "ESTA ES UNA PRUEBA DE NOTA DE DETALLE DE LINEA.", "code": "COMISION", "type_item_identification_id": 4, "price_amount": "1000000.00", "base_quantity": "1" } ]}Ejemplo cURL
curl -X POST 'https://api.facttec.co/api/ubl2.1/regeneratepdf' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {api_token}' \ -H 'Content-Type: application/json' \ -d '{ "cufe": "c4075c096de4eb5f6ab17697936fb1687e468bb73f015bfe62701af753c7f1878614234734efea07e76bc3edfb922e44", "number": 990000667, "type_document_id": 1, "date": "2022-10-26", "time": "04:08:12", "resolution_number": "18760000001", "prefix": "SETP", "notes": "ESTA ES UNA NOTA DE PRUEBA, ESTA ES UNA NOTA DE PRUEBA, ESTA ES UNA NOTA DE PRUEBA, ESTA ES UNA NOTA DE PRUEBA, ESTA ES UNA NOTA DE PRUEBA, ESTA ES UNA NOTA DE PRUEBA, ESTA ES UNA NOTA DE PRUEBA, ESTA ES UNA NOTA DE PRUEBA, ESTA ES UNA NOTA DE PRUEBA, ESTA ES UNA NOTA DE PRUEBA, ESTA ES UNA NOTA DE PRUEBA, ESTA ES UNA NOTA DE PRUEBA, ESTA ES UNA NOTA DE PRUEBA, ESTA ES UNA NOTA DE PRUEBA", "disable_confirmation_text": true, "establishment_name": "TORRE SOFTWARE", "establishment_address": "BRR LIMONAR MZ 6 CS 3 ET 1 PISO 2", "establishment_phone": "3226563672", "establishment_municipality": 600, "atacheddo…'Regenerar Documento Con URL
Section titled “Regenerar Documento Con URL”POSThttps://api.facttec.co/api/ubl2.1/regeneratepdf/SETP/990000667/c4075c096de4eb5f6ab17697936fb1687e468bb73f015bfe62701af753c7f1878614234734efea07e76bc3edfb922e44
-
Usa la base URL de Facttec:
https://api.facttec.co -
Requiere un token de autorización el cual fue devuelto al realizar el Paso 1 — Configurar empresa, si lo extraviaste, puedes consultarlo o regenerarlo desde el panel admin de Facttec.
-
En URL el último parametro corresponde al id del set de pruebas que la dian entregó al momento de registrar el modo de operación software propio.
https://api.facttec.co/api/ubl2.1/invoice/iddelsetdepruebasdeladian
- Este endpoint se puede utilizar de dos modos:
-
asíncrono:
https://api.facttec.co/api/ubl2.1/invoice/iddelsetdepruebasdeladian -
síncrono:
https://api.facttec.co/api/ubl2.1/invoice
-
El modo síncrono no afecta al set de pruebas, pero la respuesta de la DIAN incluye posibles errores de validación y estado de la factura, válida o no válida.
-
El modo asíncrono, afecta el set de pruebas y en la respuesta no se incluye el resultado de la factura, solo se entrega un ZIP_KEY el cual debe ser consultado mediante el endpoint:
https://api.facttec.co/api/ubl2.1/status/zip
de la sección 03 - Consultas de estado para asi poder establecer si la factura fue válida o no y los errores de validación.
Headers
| Header | Valor |
|---|---|
Accept |
application/json |
Content-Type |
application/json |
Authorization |
Bearer {api_token} |
Ejemplo cURL
curl -X POST 'https://api.facttec.co/api/ubl2.1/regeneratepdf/SETP/990000667/c4075c096de4eb5f6ab17697936fb1687e468bb73f015bfe62701af753c7f1878614234734efea07e76bc3edfb922e44' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {api_token}'