Nota Ajuste Documento Soporte
Método: POST
URL: https://apidian2024.oo/api/ubl2.1/sd-credit-note
PRIMER ENVIO DE FACTURA
- Si se instalo un dominio se debe utilizar de la siguiente manera:
http://midominio.com/api/ubl2.1/invoice
-
Requiere un token de autorizacion el cual fue devuelto al realizar el Paso 1 - Config Company, si este token se extravio, se puede consultar en la tabla de la base de datos de la API en la tabla users, en el campo API_TOKEN.
-
En URL el ultimo parametro corresponde al id del set de pruebas que la dian entrego al momento de registrar el modo de operacion software propio.
.../ubl2.1/invoice/iddelsetdepruebasdeladian
- Este endpoint se puede utilizar de dos modos:
-
Asincrono: .../ubl2.1/invoice/iddelsetdepruebasdeladian
-
Sincrono: .../ubl2.1/invoice
-
El modo sincrono no afecta al set de pruebas, pero la respuesta de la DIAN incluye posibles errores de validacion y estado de la factura, valida o no valida.
-
El modo asincrono, 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:
.../ubl2.1/status/zip
de la seccion 03 - Consultas de estado para asi poder establecer si la factura fue valida o no y los errores de validacion.
Autenticación
- Tipo: Bearer Token
- Header:
Authorization: Bearer {{vault:BearerBuho}}
Headers
| Key | Value |
|---|---|
Content-Type | application/json |
Accept | application/json |
Body
{
"billing_reference": {
"number": "SEDS984112077",
"uuid": "dd63a744f54e7257bfb2fd70d69eb865724a8f629d496c006ece2f2cd7a869cc2e0c5ed6fa4094b6ae517e56adbe8806",
"issue_date": "2025-11-26"
},
"resolution_number": 4,
"discrepancyresponsecode": 2,
"discrepancyresponsedescription": "PRUEBA DE MOTIVO NOTA CREDITO",
"notes": "PRUEBA DE NOTA CREDITO",
"prefix": "NDS",
"number": 40008,
"type_document_id": 13,
"date": "2025-11-26",
"time": "06:00:13",
"establishment_name": "TORRE SOFTWARE",
"establishment_address": "BRR LIMONAR MZ 6 CS 3 ET 1 PISO 2",
"establishment_phone": "3226563672",
"establishment_municipality": 600,
"sendmail": true,
"sendmailtome": true,
"seze": "2021-2017",
"head_note": "PRUEBA DE TEXTO LIBRE QUE DEBE POSICIONARSE EN EL ENCABEZADO DE PAGINA DE LA REPRESENTACION GRAFICA DE LA FACTURA ELECTRONICA VALIDACION PREVIA DIAN",
"foot_note": "PRUEBA DE TEXTO LIBRE QUE DEBE POSICIONARSE EN EL ENCABEZADO DE PAGINA DE LA REPRESENTACION GRAFICA DE LA FACTURA ELECTRONICA VALIDACION PREVIA DIAN",
"seller": {
"identification_number": "41946692",
"dv": "6",
"name": "ELIZABETH CARDONA VILLADA",
"phone": "3226563672",
"address": "LIMONAR MZ 6 CS 3 ET 1 PISO 2",
"email": "elizabethcardonav@gmail.com",
"merchant_registration": "0000-00",
"postal_zone_code": 630001,
"type_document_identification_id": 3,
"type_organization_id": 2,
"municipality_id": 820,
"type_liability_id": 117,
"type_regime_id": 1
},
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "0.00",
"taxable_amount": "200.00",
"percent": "0.00"
}
],
"allowance_charges": [
{
"discount_id": 1,
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "0.00",
"base_amount": "200.00"
}
],
"legal_monetary_totals": {
"line_extension_amount": "200.00",
"tax_exclusive_amount": "200.00",
"tax_inclusive_amount": "200.00",
"allowance_total_amount": "0.00",
"charge_total_amount": "0.00",
"payable_amount": "200.00"
},
"credit_note_lines": [
{
"unit_measure_id": 70,
"invoiced_quantity": "1",
"line_extension_amount": "200.00",
"free_of_charge_indicator": false,
"allowance_charges": [
{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "0.00",
"base_amount": "200.00"
}
],
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "0.00",
"taxable_amount": "200.00",
"percent": "0.00"
}
],
"description": "COMISION POR SERVICIOS",
"code": "COMISION",
"brandname": "FULLFIT",
"modelname": "1088",
"type_item_identification_id": 4,
"price_amount": "200.00",
"base_quantity": "1"
}
]
}
Ejemplo cURL
curl -X POST "https://apidian2024.oo/api/ubl2.1/sd-credit-note" \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-raw '{
"billing_reference": {
"number": "SEDS984112077",
"uuid": "dd63a744f54e7257bfb2fd70d69eb865724a8f629d496c006ece2f2cd7a869cc2e0c5ed6fa4094b6ae517e56adbe8806",
"issue_date": "2025-11-26"
},
"resolution_number":4,
"discrepancyresponsecode": 2,
"discrepancyresponsedescription": "PRUEBA DE MOTIVO NOTA CREDITO",
"notes": "PRUEBA DE NOTA CREDITO",
"prefix": "NDS",
"number": 40008,
"type_document_id": 13,
"date": "2025-11-26",
"time": "06:00:13",
"establishment_name": "TORRE SOFTWARE",
"establishment_address": "BRR LIMONAR MZ 6 CS 3 ET 1 PISO 2",
"establishment_phone": "3226563672",
"establishment_municipality": 600,
"sendmail": true,
"sendmailtome": true,
"seze": "2021-2017",
"head_note": "PRUEBA DE TEXTO LIBRE QUE DEBE POSICIONARSE EN EL ENCABEZADO DE PAGINA DE LA REPRESENTACION GRAFICA DE LA FACTURA ELECTRONICA VALIDACION PREVIA DIAN",
"foot_note": "PRUEBA DE TEXTO LIBRE QUE DEBE POSICIONARSE EN EL ENCABEZADO DE PAGINA DE LA REPRESENTACION GRAFICA DE LA FACTURA ELECTRONICA VALIDACION PREVIA DIAN",
"seller": {
"identification_number": "41946692",
"dv": "6",
"name": "ELIZABETH CARDONA VILLADA",
"phone": "3226563672",
"address": "LIMONAR MZ 6 CS 3 ET 1 PISO 2",
"email": "elizabethcardonav@gmail.com",
"merchant_registration": "0000-00",
"postal_zone_code": 630001,
"type_document_identification_id": 3,
"type_organization_id": 2,
"municipality_id": 820,
"type_liability_id": 117,
"type_regime_id": 1
},
"tax_totals": [{
"tax_id": 1,
"tax_amount": "0.00",
"taxable_amount": "200.00",
"percent": "0.00"
}],
"allowance_charges": [{
"discount_id": 1,
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "0.00",
"base_amount": "200.00"
}],
"legal_monetary_totals": {
"line_extension_amount": "200.00",
"tax_exclusive_amount": "200.00",
"tax_inclusive_amount": "200.00",
"allowance_total_amount": "0.00",
"charge_total_amount": "0.00",
"payable_amount": "200.00"
},
"credit_note_lines": [{
"unit_measure_id": 70,
"invoiced_quantity": "1",
"line_extension_amount": "200.00",
"free_of_charge_indicator": false,
"allowance_charges": [{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "0.00",
"base_amount": "200.00"
}],
"tax_totals": [{
"tax_id": 1,
"tax_amount": "0.00",
"taxable_amount": "200.00",
"percent": "0.00"
}],
"description": "COMISION POR SERVICIOS",
"code": "COMISION",
"brandname": "FULLFIT",
"modelname": "1088",
"type_item_identification_id": 4,
"price_amount": "200.00",
"base_quantity": "1"
}]
}'