Credit Note
POST
/v1/api/facturacionUses 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: 2id_documento_referencia: ID of the original document the note applies toid_concepto_nota: Reason code (see table)credit_note_lines: Lines with credited_quantity instead of invoiced_quantity
Credit Note Concepts (DIAN)
| Code | Concept |
|---|---|
| 1 | Partial return of goods |
| 2 | Cancellation of electronic invoice |
| 3 | Partial rebate or discount |
| 4 | Price adjustment |
| 5 | Others |
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/facturacionUses 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: 3id_documento_referencia: ID of the original documentid_concepto_nota: Reason code (see table)debit_note_lines: Lines with debited_quantity instead of invoiced_quantity
Debit Note Concepts (DIAN)
| Code | Concept |
|---|---|
| 1 | Interests |
| 2 | Receivable expenses |
| 3 | Value change |
| 4 | Others |
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/facturacionUses 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: 4invoice_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/clientesList company customers.
POST
/v1/api/clientesCreate 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/:idResends 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/:idSend document by email
POST
/v1/api/email/reenviar/:id_correoResend email
GET
/v1/api/email/logs/:id_documentoView 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.