Skip to main content

AddToBatch Debit Note

Endpoint

  • Método: POST
  • Ruta: /api/ubl2.1/add-to-batch/debit-note/{batch_id}
  • URL ejemplo: {{BASE_URL}}/api/ubl2.1/add-to-batch/debit-note/batch1

Descripción

Agrega una Nota Débito al lote (batch) indicado en la URL. Luego podrás enviarlo con SendBatch.

Flujo recomendado:

  1. Llama este endpoint por cada documento que quieras agregar al lote.
  2. Cuando completes el lote, ejecuta SendBatch.

Parámetros en la URL

  • batch_id: identificador del lote. Ejemplo: batch1.

Autenticación

  • Tipo: Bearer Token
  • Header: Authorization: Bearer {{API_TOKEN}}

Headers

KeyValue
AuthorizationBearer {{API_TOKEN}}
Content-Typeapplication/json
Acceptapplication/json

Body

{
"billing_reference": {
"number": "SETP990000208",
"uuid": "8a65e3a8a2652a66e82b8cafdbcb036ffa4cdb4140b4eaf7596914fc183af70a6fdbab139a848fa6a745d02cd0a4be13",
"issue_date": "2020-12-17"
},
"number": 24,
"type_document_id": 5,
"date": "2020-12-17",
"time": "04:10:09",
"notes": "PRUEBA DE NOTA DEBITO",
"customer": {
"identification_number": 900166483,
"dv": 1,
"name": "INVERSIONES DAVAL SAS",
"phone": 3103891693,
"address": "CLL 4 NRO 33-90",
"email": "alexanderobandolondono@gmail.com",
"merchant_registration": "0000000-00",
"type_document_identification_id": 6,
"type_organization_id": 1,
"municipality_id": 822,
"type_regime_id": 1
},
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "0.00",
"taxable_amount": "0.00",
"percent": "0.00"
}
],
"requested_monetary_totals": {
"line_extension_amount": "32000.00",
"tax_exclusive_amount": "0",
"tax_inclusive_amount": "32000.00",
"allowance_total_amount": "0",
"charge_total_amount": "0.00",
"payable_amount": "32000.00"
},
"debit_note_lines": [
{
"unit_measure_id": 70,
"invoiced_quantity": "1",
"line_extension_amount": "32000.00",
"free_of_charge_indicator": false,
"allowance_charges": [
{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "0.00",
"base_amount": "32000.00"
}
],
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "0.00",
"taxable_amount": "0.00",
"percent": "0.00"
}
],
"description": "PRUEBA DE NOTA DEBITO ELECTRONICA",
"code": "001NOTA",
"type_item_identification_id": 4,
"price_amount": "32000",
"base_quantity": "1"
}
]
}

Ejemplo cURL

curl -X POST '{{BASE_URL}}/api/ubl2.1/add-to-batch/debit-note/batch1' \
-H 'Authorization: Bearer {{API_TOKEN}}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"billing_reference": {
"number": "SETP990000208",
"uuid": "8a65e3a8a2652a66e82b8cafdbcb036ffa4cdb4140b4eaf7596914fc183af70a6fdbab139a848fa6a745d02cd0a4be13",
"issue_date": "2020-12-17"
},
"number": 24,
"type_document_id": 5,
"date": "2020-12-17",
"time": "04:10:09",
"notes": "PRUEBA DE NOTA DEBITO",
"customer": {
"identification_number": 900166483,
"dv": 1,
"name": "INVERSIONES DAVAL SAS",
"phone": 3103891693,
"address": "CLL 4 NRO 33-90",
"email": "alexanderobandolondono@gmail.com",
"merchant_registration": "0000000-00",
"type_document_identification_id": 6,
"type_organization_id": 1,
"municipality_id": 822,
"type_regime_id": 1
},
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "0.00",
"taxable_amount": "0.00",
"percent": "0.00"
}
],
"requested_monetary_totals": {
"line_extension_amount": "32000.00",
"tax_exclusive_amount": "0",
"tax_inclusive_amount": "32000.00",
"allowance_total_amount": "0",
"charge_total_amount": "0.00",
"payable_amount": "32000.00"
},
"debit_note_lines": [
{
"unit_measure_id": 70,
"invoiced_quantity": "1",
"line_extension_amount": "32000.00",
"free_of_charge_indicator": false,
"allowance_charges": [
{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "0.00",
"base_amount": "32000.00"
}
],
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "0.00",
"taxable_amount": "0.00",
"percent": "0.00"
}
],
"description": "PRUEBA DE NOTA DEBITO ELECTRONICA",
"code": "001NOTA",
"type_item_identification_id": 4,
"price_amount": "32000",
"base_quantity": "1"
}
]
}'