Skip to main content

AddToBatch InvoiceExport

Endpoint

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

Descripción

Agrega una Factura de exportación 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

{
"number": 990000034,
"type_document_id": 2,
"date": "2020-09-15",
"time": "04:25:44",
"resolution_number": "18760000001",
"prefix": "SETP",
"establishment_name": "TORRE SOFTWARE",
"notes": "SIN OBSERVACIONES",
"idcurrency": 149,
"calculationrate": 3750,
"calculationratedate": "2020-09-15",
"sendmail": true,
"customer": {
"identification_number": "FR42128XD090",
"name": "BLANCA NUBIA ALVAREZ ALZATE ",
"phone": 3148931130,
"address": "CR 14 BIS 31 B 37 BRR SAN NICOLAS",
"email": "blancanubiaa@hotmail.com",
"merchant_registration": "0000-00",
"type_document_identification_id": 8,
"type_organization_id": 2,
"country_id": 65,
"municipality_name": "MIAMI",
"state_name": "FLORIDA",
"type_liability_id": 117,
"type_regime_id": 2
},
"deliveryterms": {
"special_terms": "COSTO SEGURO Y FLETE",
"loss_risk_responsibility_code": "CIF",
"loss_risk": "COSTO SEGURO Y FLETE"
},
"payment_form": {
"payment_form_id": 2,
"payment_method_id": 10,
"payment_due_date": "2020-10-15",
"duration_measure": "30"
},
"allowance_charges": [
{
"discount_id": 10,
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "0.00",
"base_amount": "15840.00"
},
{
"charge_indicator": true,
"allowance_charge_reason": "CARGO POR FLETES/FREIGHT CHARGE",
"amount": "200.00",
"base_amount": "15840.00"
}
],
"legal_monetary_totals": {
"line_extension_amount": "15840.00",
"tax_exclusive_amount": "15840.00",
"tax_inclusive_amount": "15840.00",
"allowance_total_amount": "0.00",
"charge_total_amount": "200.00",
"payable_amount": "16040.00"
},
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "0.00",
"percent": "0",
"taxable_amount": "15840.00"
}
],
"invoice_lines": [
{
"unit_measure_id": 70,
"invoiced_quantity": "5.00",
"line_extension_amount": "4950.00",
"free_of_charge_indicator": false,
"allowance_charges": [
{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "0.00",
"base_amount": "4950.00"
}
],
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "0.00",
"taxable_amount": "4950.00",
"percent": "0.00"
}
],
"description": "LEGGINS DE DAMA REF 1032",
"brandname": "FULLFIT",
"modelname": "1032",
"code": "1032",
"type_item_identification_id": 4,
"price_amount": "990.00",
"base_quantity": "5.00"
},
{
"unit_measure_id": 70,
"invoiced_quantity": "6.00",
"line_extension_amount": "5940.00",
"free_of_charge_indicator": false,
"allowance_charges": [
{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "0.00",
"base_amount": "5940.00"
}
],
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "0.00",
"taxable_amount": "5940.00",
"percent": "0.00"
}
],
"description": "LEGGINS DE DAMA REF 1087",
"brandname": "FULLFIT",
"modelname": "1087",
"code": "1087",
"type_item_identification_id": 4,
"price_amount": "990.00",
"base_quantity": "6.00"
},
{
"unit_measure_id": 70,
"invoiced_quantity": "5.00",
"line_extension_amount": "4950.00",
"free_of_charge_indicator": false,
"allowance_charges": [
{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "0.00",
"base_amount": "4950.00"
}
],
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "0.00",
"taxable_amount": "4950.00",
"percent": "0.00"
}
],
"description": "LEGGINS DE DAMA REF 1088",
"brandname": "FULLFIT",
"modelname": "1088",
"code": "1088",
"type_item_identification_id": 4,
"price_amount": "990.00",
"base_quantity": "5.00"
}
]
}

Ejemplo cURL

curl -X POST '{{BASE_URL}}/api/ubl2.1/add-to-batch/invoice-export/batch1' \
-H 'Authorization: Bearer {{API_TOKEN}}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"number": 990000034,
"type_document_id": 2,
"date": "2020-09-15",
"time": "04:25:44",
"resolution_number": "18760000001",
"prefix": "SETP",
"establishment_name": "TORRE SOFTWARE",
"notes": "SIN OBSERVACIONES",
"idcurrency": 149,
"calculationrate": 3750,
"calculationratedate": "2020-09-15",
"sendmail": true,
"customer": {
"identification_number": "FR42128XD090",
"name": "BLANCA NUBIA ALVAREZ ALZATE ",
"phone": 3148931130,
"address": "CR 14 BIS 31 B 37 BRR SAN NICOLAS",
"email": "blancanubiaa@hotmail.com",
"merchant_registration": "0000-00",
"type_document_identification_id": 8,
"type_organization_id": 2,
"country_id": 65,
"municipality_name": "MIAMI",
"state_name": "FLORIDA",
"type_liability_id": 117,
"type_regime_id": 2
},
"deliveryterms": {
"special_terms": "COSTO SEGURO Y FLETE",
"loss_risk_responsibility_code": "CIF",
"loss_risk": "COSTO SEGURO Y FLETE"
},
"payment_form": {
"payment_form_id": 2,
"payment_method_id": 10,
"payment_due_date": "2020-10-15",
"duration_measure": "30"
},
"allowance_charges": [
{
"discount_id": 10,
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "0.00",
"base_amount": "15840.00"
},
{
"charge_indicator": true,
"allowance_charge_reason": "CARGO POR FLETES/FREIGHT CHARGE",
"amount": "200.00",
"base_amount": "15840.00"
}
],
"legal_monetary_totals": {
"line_extension_amount": "15840.00",
"tax_exclusive_amount": "15840.00",
"tax_inclusive_amount": "15840.00",
"allowance_total_amount": "0.00",
"charge_total_amount": "200.00",
"payable_amount": "16040.00"
},
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "0.00",
"percent": "0",
"taxable_amount": "15840.00"
}
],
"invoice_lines": [
{
"unit_measure_id": 70,
"invoiced_quantity": "5.00",
"line_extension_amount": "4950.00",
"free_of_charge_indicator": false,
"allowance_charges": [
{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "0.00",
"base_amount": "4950.00"
}
],
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "0.00",
"taxable_amount": "4950.00",
"percent": "0.00"
}
],
"description": "LEGGINS DE DAMA REF 1032",
"brandname": "FULLFIT",
"modelname": "1032",
"code": "1032",
"type_item_identification_id": 4,
"price_amount": "990.00",
"base_quantity": "5.00"
},
{
"unit_measure_id": 70,
"invoiced_quantity": "6.00",
"line_extension_amount": "5940.00",
"free_of_charge_indicator": false,
"allowance_charges": [
{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "0.00",
"base_amount": "5940.00"
}
],
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "0.00",
"taxable_amount": "5940.00",
"percent": "0.00"
}
],
"description": "LEGGINS DE DAMA REF 1087",
"brandname": "FULLFIT",
"modelname": "1087",
"code": "1087",
"type_item_identification_id": 4,
"price_amount": "990.00",
"base_quantity": "6.00"
},
{
"unit_measure_id": 70,
"invoiced_quantity": "5.00",
"line_extension_amount": "4950.00",
"free_of_charge_indicator": false,
"allowance_charges": [
{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "0.00",
"base_amount": "4950.00"
}
],
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "0.00",
"taxable_amount": "4950.00",
"percent": "0.00"
}
],
"description": "LEGGINS DE DAMA REF 1088",
"brandname": "FULLFIT",
"modelname": "1088",
"code": "1088",
"type_item_identification_id": 4,
"price_amount": "990.00",
"base_quantity": "5.00"
}
]
}'

Probar endpoint

POST
AddToBatch InvoiceExport
BASE URL
Se guarda localmente en tu navegador.
BEARER TOKEN
Se guarda solo en esta sesión/pestaña.
PATH PARAMS
batch_id
URL FINAL
/api/ubl2.1/add-to-batch/invoice-export/batch1
BODY JSON
RESPUESTA
Envía la solicitud para ver la respuesta aquí.