Factuconect API

Integration & Documentation

Testing

Watch our tutorial video to understand the API better.

▶ Watch API Tutorial Video
1. Authentication

POST /clients/login

Login with demo credentials to get the authentication token required for other endpoints.

POST Get Test Token (by NIT)

Alternative for testing: get token + uid + idSucursal by NIT (like auto_generator). Use when you need to quickly test DTE creation and Send to MH.

2. Catalogs (Required for Client Creation)

Before creating a client, fetch these catalogs to get the correct IDs for Country, Department, Municipality, Document Type, and Economic Activity.

3. Client Management

POST /receptor/add

Use the IDs obtained from the catalogs above to create a new client.

GET /receptor/showAll

List all clients (receptors) for the authenticated account. Supports pagination via query params.

What this API response is for:

Example response:

{
  "data": [
    {
      "id": 4708,
      "id_clientes": 53,
      "id_actividad_economica": 2,
      "nit": "06140104991287",
      "nrc": "2787841",
      "nombre": "Cliente demo",
      "nombreComercial": "Nombre comercial",
      "id_departamento": 7,
      "id_municipio": 25,
      "direccionComplemento": "COL LAS MARGARITAS,PSJ FELIPE SANCHEZ BO SAN JACINTO-Casa#1",
      "telefono": "70896057",
      "correo": "raac000@gmail.com",
      "id_pais": 0,
      "id_tipo_documento": 1,
      "observacionesCustom": null,
      "password": "",
      "status": "ACTIVO",
      "createdAt": "2026-03-19T03:42:34.000Z",
      "updatedAt": "2026-03-19T03:42:34.000Z"
    },
    {
      "id": 4709,
      "id_clientes": 53,
      "id_actividad_economica": 2,
      "nit": "06140104991287",
      "nrc": "2787841",
      "nombre": "Cliente demo",
      "nombreComercial": "Nombre comercial",
      "id_departamento": 7,
      "id_municipio": 25,
      "direccionComplemento": "COL LAS MARGARITAS,PSJ FELIPE SANCHEZ BO SAN JACINTO-Casa#1",
      "telefono": "70896057",
      "correo": "raac000@gmail.com",
      "id_pais": 0,
      "id_tipo_documento": 1,
      "observacionesCustom": null,
      "password": "",
      "status": "ACTIVO",
      "createdAt": "2026-03-19T03:53:43.000Z",
      "updatedAt": "2026-03-19T03:53:43.000Z"
    }
  ],
  "pagination": {
    "total": 2,
    "currentPage": 0,
    "pageSize": 100,
    "totalPages": 1
  }
}

GET /receptor/searchByNitNrc

Search clients (receptors) by NIT or NRC. Results are scoped to the authenticated account (UID from token). Min 2 characters.

Search term. Matches NIT or NRC (partial match)
4. Invoice Configuration

GET /facturar/typeFacts

Returns the invoice types enabled for the authenticated client. Requires Token.

What this API response is for:

Example response:

{
  "msg": "Type facts",
  "data": [
    {
      "id": 113,
      "id_clientes": 53,
      "id_typeFacts": 1,
      "createdAt": "2025-10-14T23:39:25.000Z",
      "updatedAt": "2025-10-14T23:39:25.000Z",
      "typeFacts": {
        "id": 1,
        "name": "Factura"
      }
    },
    {
      "id": 114,
      "id_clientes": 53,
      "id_typeFacts": 3,
      "createdAt": "2025-10-14T23:39:26.000Z",
      "updatedAt": "2025-10-14T23:39:26.000Z",
      "typeFacts": {
        "id": 3,
        "name": "Comprobante de crédito fiscal"
      }
    },
    {
      "id": 115,
      "id_clientes": 53,
      "id_typeFacts": 5,
      "createdAt": "2025-10-14T23:39:26.000Z",
      "updatedAt": "2025-10-14T23:39:26.000Z",
      "typeFacts": {
        "id": 5,
        "name": "Nota de crédito"
      }
    }
  ]
}

Use id_typeFacts or typeFacts.id when calling document generation endpoints (e.g., "01" for Factura, "03" for CCF).

5. Document Generation (DTE)

Uses UID, idSucursal and Ambiente from the config above. idCliente = Receiver ID in DB (from /receptor/showAll). To send to MH: create first, then use section 6; or use Create + Send.
View invoice: https://dte.factuconect.com/viewDte?id={codigoGeneracion}Ticket format: https://dte.factuconect.com/ticket?id={codigoGeneracion} (codigoGeneracion is returned in the create response).

POST /facturar/ccf-exe

Tax Credit Voucher (typeFacts: "03"). Receiver data inline (no DB).

Economic activity code (dte_codigo_actividad_economica catalog)
Receiver NIT, 14 digits
Receiver NRC (7 digits)

After creating, codigoGeneracion is returned in the response (right panel). You can view the document immediately by passing that ID in the URL: viewDte?id=… or ticket?id=…

POST /facturar/fe

Electronic Invoice (typeFacts: "01"). Uses idCliente = Receiver ID in DB (same as auto_generator). Get from /receptor/showAll.

Receiver ID in DB (clientes_receptor.id)
VAT % (13 = 13%)
Invoice total ($)

After creating, codigoGeneracion is returned in the response (right panel). You can view the document immediately by passing that ID in the URL: viewDte?id=… or ticket?id=…

POST /facturar/fsex

Excluded Subject Invoice (typeFacts: "14"). For VAT-exempt clients.

Receiver ID in DB
Document total ($)

After creating, codigoGeneracion is returned in the response (right panel). You can view the document immediately by passing that ID in the URL: viewDte?id=… or ticket?id=…

POST /facturar/nc

Credit Note (typeFacts: "05"). References original document (CCF or FE).

Receiver ID in DB
UUID of original doc. Use "Use Last" button if you just created one
03=CCF, 01=FE (document being referenced)

After creating, codigoGeneracion is returned in the response (right panel). You can view the document immediately by passing that ID in the URL: viewDte?id=… or ticket?id=…

POST /facturar/nd

Debit Note (typeFacts: "06"). Same as NC, references original document.

Receiver ID in DB
codigoGeneracion of original doc
03=CCF, 01=FE

After creating, codigoGeneracion is returned in the response (right panel). You can view the document immediately by passing that ID in the URL: viewDte?id=… or ticket?id=…

6. Send to MH (Tax Authority)

POST /facturar/sendFteMH

Step 2 after creating a DTE: After creating a CCF or FE above, the response returns codigoGeneracion. Use it here to sign and send the document to the Tax Authority (like auto_generator).

7. DTE Cancellation (Anulación)

POST /facturar/anulacionDte

Cancel (void) a previously issued DTE. Provide the generation code of the document to void (codGenerationAnula), the original document code (codGenerationOriginal), the environment, the cancellation reason, and the date.

Generation code of the document being cancelled
Generation code of the original document (can be the same)
Reason for cancellation
Cancellation date (defaults to today)

Request & Response

Request Payload (editable)

Response (editable)

Waiting for action...