Credit Note

POST/v1/api/facturacion

Uses the same invoicing endpoint with id_tipo_documento: 2

💡 Same endpoint: The Credit Note is issued via POST /v1/api/facturacion, differentiated by the field id_tipo_documento: 2.

Additional required fields

  • id_tipo_documento: 2
  • id_documento_referencia: ID of the original document the note applies to
  • id_concepto_nota: Reason code (see table)
  • credit_note_lines: Lines with credited_quantity instead of invoiced_quantity

Credit Note Concepts (DIAN)

CodeConcept
1Partial return of goods
2Cancellation of electronic invoice
3Partial rebate or discount
4Price adjustment
5Others

Request Example

JSON
{
  "id_tipo_documento": 2,
  "id_documento_referencia": 15,
  "id_concepto_nota": "1",
  "customer": {
    "identification_number": "900123456",
    "name": "Empresa XYZ SAS",
    "email": "facturacion@xyz.com"
  },
  "credit_note_lines": [
    {
      "description": "Devolución parcial - Servicio de consultoría",
      "credited_quantity": 1,
      "line_extension_amount": 500000,
      "price_amount": 500000
    }
  ],
  "legal_monetary_totals": {
    "line_extension_amount": 500000,
    "tax_exclusive_amount": 500000,
    "tax_inclusive_amount": 595000,
    "payable_amount": 595000
  },
  "transmit": true
}

Debit Note

POST/v1/api/facturacion

Uses the same invoicing endpoint with id_tipo_documento: 3

💡 Same endpoint: The Debit Note is issued via POST /v1/api/facturacion, differentiated by the field id_tipo_documento: 3.

Additional required fields

  • id_tipo_documento: 3
  • id_documento_referencia: ID of the original document
  • id_concepto_nota: Reason code (see table)
  • debit_note_lines: Lines with debited_quantity instead of invoiced_quantity

Debit Note Concepts (DIAN)

CodeConcept
1Interests
2Receivable expenses
3Value change
4Others

Request Example

JSON
{
  "id_tipo_documento": 3,
  "id_documento_referencia": 15,
  "id_concepto_nota": "1",
  "customer": {
    "identification_number": "900123456",
    "name": "Empresa XYZ SAS",
    "email": "facturacion@xyz.com"
  },
  "debit_note_lines": [
    {
      "description": "Intereses por mora",
      "debited_quantity": 1,
      "line_extension_amount": 50000,
      "price_amount": 50000
    }
  ],
  "legal_monetary_totals": {
    "line_extension_amount": 50000,
    "tax_exclusive_amount": 50000,
    "tax_inclusive_amount": 59500,
    "payable_amount": 59500
  },
  "transmit": true
}

Support Document

POST/v1/api/facturacion

Uses the same invoicing endpoint with id_tipo_documento: 4

💡 Same endpoint: The Support Document is issued via POST /v1/api/facturacion with id_tipo_documento: 4. Uses invoice_lines (same structure as FE).

Issued when you acquire goods or services from persons NOT obliged to invoice. Uses the same invoice_lines structure as the Electronic Invoice.

  • id_tipo_documento: 4
  • invoice_lines: Same structure as FE (with invoiced_quantity)
  • The customer is usually a Natural Person (type_organization.code: "2")

Request Example

JSON
{
  "id_tipo_documento": 4,
  "customer": {
    "identification_number": "1023456789",
    "name": "Juan Pérez",
    "email": "juan@correo.com",
    "type_document_identification": {
      "code": "13"
    },
    "type_organization": {
      "code": "2"
    }
  },
  "invoice_lines": [
    {
      "description": "Compra de insumos agrícolas",
      "invoiced_quantity": 10,
      "line_extension_amount": 200000,
      "price_amount": 20000
    }
  ],
  "legal_monetary_totals": {
    "line_extension_amount": 200000,
    "tax_exclusive_amount": 200000,
    "tax_inclusive_amount": 200000,
    "payable_amount": 200000
  },
  "transmit": true
}

Customers

GET/v1/api/clientes

List company customers.

POST/v1/api/clientes

Create a new customer.

Code Examples
curl -X GET "https://api.jcflow.com.co/v1/api/clientes?limit=10" \
  -H "X-Api-Key: sk_test_tu_api_key_aqui"

Resend to DIAN

POST/v1/api/facturacion/reenviar/:id

Resends a document in draft or rejected status to DIAN.

Useful to retransmit documents that previously failed due to connection issues or validation errors, or to transmit those saved as drafts. Applies to any document type (FE, NC, ND, DS).

ℹ️ Nota: Only documents in Draft (1) or Rejected (4) status can be resent.

Emails

POST/v1/api/email/documento/:id

Send document by email

POST/v1/api/email/reenviar/:id_correo

Resend email

GET/v1/api/email/logs/:id_documento

View email logs

ℹ️ Nota: The email is sent automatically when a document is successfully transmitted to DIAN.
ℹ️ Nota: The email includes the signed XML + PDF as attachments.