---
title: "e-CF lifecycle"
description: "How a document travels from your POST to the final DGII acknowledgement: validation, signing, submission, persistence and background polling."
canonical: https://factura.com.do/en/desarrolladores/ciclo-ecf
lang: en
generator: factura.com.do docs-index
---

Platform 

# e-CF lifecycle

When you call `POST /api/v1/<resource>`, factura.com.do orchestrates signing, submission and acknowledgement polling against the DGII. This page documents the conceptual flow; the internal endpoints of the flow are not a public surface.

## Summary

The POST never waits for the DGII acknowledgement. Your integration receives the immediate confirmation and the final status arrives later via webhook. This design protects your latency: the DGII can take seconds or minutes depending on load, and your UI never waits.

## Five lifecycle steps

1. 01  
Request validation  
Types, expiries, tenant permissions. If anything is wrong, factura.com.do returns 400 before touching the DGII.
2. 02  
XML construction and signing  
Converter selection by e-CF type (E31, E32 RFCE, E44…) and signing with the tenant's digital certificate.
3. 03  
Submission to the DGII service  
DGIIEcfService or DGIIRFCEService depending on the type. The DGII responds with a trackId and a status code (5/6/7/8).
4. 04  
Persistence and immediate response  
Document + status + trace are persisted. Your original call receives { documentId, consultationUrl } without waiting for the final acknowledgement.
5. 05  
Background polling  
DGIIStatusCheckBackgroundService refreshes the statuses of documents in progress. When there is a change, factura.com.do fires the corresponding webhook.

## e-CF types and resources

The ten e-CF types the DGII recognizes today map to the public API resources. Internal slices change the converter when signing, but the public contract is uniform.

| Type | Name            | V1 resource                                     |
| ---- | --------------- | ----------------------------------------------- |
| E31  | Tax credit      | </en/desarrolladores/facturas>                  |
| E32  | Consumer        | </en/desarrolladores/facturas>                  |
| E33  | Debit note      | </en/desarrolladores/notas-debito>              |
| E34  | Credit note     | </en/desarrolladores/notas-credito>             |
| E41  | Purchases       | </en/desarrolladores/compras>                   |
| E43  | Minor expenses  | </en/desarrolladores/gastos>                    |
| E44  | Special regime  | </en/desarrolladores/facturas#regimen-especial> |
| E45  | Government      | </en/desarrolladores/facturas#gubernamental>    |
| E46  | Export          | </en/desarrolladores/facturas#exportacion>      |
| E47  | Foreign payment | </en/desarrolladores/facturas#pago-exterior>    |

## DGII statuses

The DGII status code travels in the `data.StatusId` field of the webhook and maps one-to-one with the `dgii.*` event.

| Status | Webhook event              | Meaning                                                                              |
| ------ | -------------------------- | ------------------------------------------------------------------------------------ |
| 5      | dgii.aprobado              | Document accepted in full                                                            |
| 6      | dgii.rechazado             | Document rejected; reconcile with a GET to the resource to read the persisted reason |
| 7      | dgii.en\_proceso           | DGII evaluating; polling continues                                                   |
| 8      | dgii.aceptado\_condicional | Accepted with observations; log the entry                                            |

When the DGII does not respond

If the DGII does not acknowledge the document on the first delivery, `DGIIStatusCheckBackgroundService` retries periodically until the final status is resolved. Your integration keeps receiving `documentId` and `consultationUrl` in the immediate response; the `dgii.aprobado` or `dgii.rechazado` event arrives when the query is resolved. The formal contingency mode and resubmission deadlines are defined by [Norma 06-2018](https://dgii.gov.do/cicloContribuyente/facturacion/comprobantesFiscales/Paginas/comprobantesFiscalesElectronicos.aspx) and are the issuer's responsibility; they are not applied automatically by the platform.

## Certification and signing

These routes support the certification process as an electronic issuer. `certifications` stores the holder's data and the digital certificate password; `certification/run-all` generates, signs and sends the test documents to the DGII and responds with a `.zip` file (with `errores.txt` if any failed); and `sign-xml` signs your own XML with the workspace certificate. The last two respond `400` with `{ message }` if no digital certificate is configured. All of them require the Corporativo plan.

[  GET /api/v1/certifications X-Api-Key Stable Devuelve un PagedResult con los registros de certificación: titular, identificación, país, contacto y si ya tiene guardada la contraseña del certificado. ](#) 

| Name             | Type             | Description                               |
| ---------------- | ---------------- | ----------------------------------------- |
| search query     | string Optional  | Término de búsqueda.                      |
| pageNumber query | integer Optional | Página solicitada. Por defecto 1.         |
| pageSize query   | integer Optional | Tamaño de página. Por defecto 10.         |
| isActive query   | boolean Optional | Filtra por registros activos o inactivos. |

[  GET /api/v1/certifications/{id} X-Api-Key Stable Devuelve un registro de certificación por su id. ](#) 

| Name    | Type                   | Description                                  |
| ------- | ---------------------- | -------------------------------------------- |
| id path | string (uuid) Required | Identificador del registro de certificación. |

[  POST /api/v1/certifications X-Api-Key Stable Crea un registro de certificación con los datos del titular. Responde { certificationId, success, message }. ](#) 

| Name                    | Type             | Description                                              |
| ----------------------- | ---------------- | -------------------------------------------------------- |
| name body               | string Required  | Nombre del titular.                                      |
| lastName body           | string Required  | Apellido del titular.                                    |
| identificationType body | integer Required | Tipo de identificación del titular.                      |
| countryId body          | integer Required | País del titular (ver \`GET /api/v1/countries-lookup\`). |
| email body              | string Required  | Correo del titular.                                      |
| phone body              | string Required  | Teléfono del titular.                                    |

[  PUT /api/v1/certifications/{id} X-Api-Key Stable Reemplaza los datos del titular de un registro de certificación. Usa el mismo cuerpo que la creación. ](#) 

| Name    | Type                   | Description                                  |
| ------- | ---------------------- | -------------------------------------------- |
| id path | string (uuid) Required | Identificador del registro de certificación. |

[  PATCH /api/v1/certifications/{id}/certificate-password X-Api-Key Stable Guarda la contraseña del certificado digital en un registro de certificación. Responde { certificationId, success, message }. ](#) 

| Name                     | Type                   | Description                                  |
| ------------------------ | ---------------------- | -------------------------------------------- |
| id path                  | string (uuid) Required | Identificador del registro de certificación. |
| certificatePassword body | string Optional        | Contraseña del certificado digital.          |

[  POST /api/v1/certification/run-all X-Api-Key Stable Genera, firma y envía a la DGII los comprobantes de prueba de la certificación y responde un .zip con los PDF, el XML firmado del E32 y errores.txt si algo falló. ](#) 

[  POST /api/v1/sign-xml X-Api-Key Stable Firma un XML con el certificado digital del espacio de trabajo y responde { signedXml, signedXmlBase64 }. ](#) 

| Name           | Type            | Description                                                          |
| -------------- | --------------- | -------------------------------------------------------------------- |
| xml body       | string Optional | XML a firmar, como texto. Envía este campo o \`xmlBase64\`.          |
| xmlBase64 body | string Optional | XML a firmar, codificado en base64\. Si envías los dos, se usa este. |

## Next steps

Next step 

## Continue here

- [  Webhooks The catalog of 28 events and the payload shape. ](/en/desarrolladores/webhooks)
- [  Errors How to react when the DGII rejects a document or submission fails. ](/en/desarrolladores/errores)
- [  Invoices Entry point for the E31, E32 and special case types. ](/en/desarrolladores/facturas)
