SendInvoice-TestSetId Varias Tarifas y Descuentos
Endpoint
- Método: POST
- Ruta:
/api/ubl2.1/invoice - URL ejemplo:
{{BASE_URL}}/api/ubl2.1/invoice
Descripción
ENVIO DE FACTURA CON VARIAS TARIFAS DE IVA Y DESCUENTOS INCLUIDOS
-
Aplica la misma documentacion que el PRIMER ENVIO DE FACTURA de la seccion 02 - PRIMEROS ENVIOS.
-
Utilice este ejemplo cuando incluya articulos con varias tarifas de impuestos y/o descuentos incluidos, ejemplo, en una misma factura se venden articulos con IVA 19% y articulos con IVA 5%.
Autenticación
- Tipo: Bearer Token
- Header:
Authorization: Bearer {{API_TOKEN}}
Headers
| Key | Value |
|---|---|
Content-Type | application/json |
Accept | application/json |
Body
{
"number": 990060196,
"type_document_id": 1,
"date": "2025-01-20",
"time": "11:12:48",
"customer": {
"identification_number": 89008003,
"name": "ALEXANDER OBANDO LONDONO",
"phone": "3103891693",
"address": "BRR LIMONAR MZ 6 CS 3 ET 1",
"email": "alexander_obando@hotmail.com",
"merchant_registration": "0000-00",
"type_document_identification_id": 3,
"type_organization_id": 2,
"municipality_id": 149,
"type_regime_id": 2
},
"payment_form": {
"payment_form_id": 1,
"payment_method_id": 10,
"payment_due_date": "2025-01-20",
"duration_measure": "0"
},
"allowance_charges": [
{
"discount_id": 1,
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "1317.08",
"base_amount": "32246.50"
}
],
"legal_monetary_totals": {
"line_extension_amount": "32246.50",
"tax_exclusive_amount": "32246.50",
"tax_inclusive_amount": "36014.00",
"allowance_total_amount": "1317.08",
"charge_total_amount": "0.00",
"payable_amount": "34696.92"
},
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "0.00",
"percent": "0",
"taxable_amount": "5400.00"
},
{
"tax_id": 1,
"tax_amount": "476.19",
"percent": "5",
"taxable_amount": "9523.81"
},
{
"tax_id": 1,
"tax_amount": "3291.31",
"percent": "19",
"taxable_amount": "17322.69"
}
],
"invoice_lines": [
{
"unit_measure_id": 70,
"invoiced_quantity": "4",
"line_extension_amount": "6722.69",
"free_of_charge_indicator": false,
"allowance_charges": [
{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "336.13",
"base_amount": "8000.00"
}
],
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "1277.31",
"taxable_amount": "6722.69",
"percent": "19.00"
}
],
"description": "BONOS POR SERVICIOS",
"code": "BONOS",
"type_item_identification_id": 4,
"price_amount": "1764.70",
"base_quantity": "4"
},
{
"unit_measure_id": 70,
"invoiced_quantity": "1",
"line_extension_amount": "9523.81",
"free_of_charge_indicator": false,
"allowance_charges": [
{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "380.95",
"base_amount": "10000.00"
}
],
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "476.19",
"taxable_amount": "9523.81",
"percent": "5.00"
}
],
"description": "CARNE MOLIDA",
"code": "CARNE",
"type_item_identification_id": 4,
"price_amount": "9904.76",
"base_quantity": "1"
},
{
"unit_measure_id": 70,
"invoiced_quantity": "2",
"line_extension_amount": "3000.00",
"free_of_charge_indicator": false,
"allowance_charges": [
{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "360.00",
"base_amount": "3000.00"
}
],
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "0.00",
"taxable_amount": "3000.00",
"percent": "0.00"
}
],
"description": "CESANTIA MERCANTIL",
"code": "CESANTIA",
"type_item_identification_id": 4,
"price_amount": "1680.00",
"base_quantity": "2"
},
{
"unit_measure_id": 70,
"invoiced_quantity": "1",
"line_extension_amount": "2000.00",
"free_of_charge_indicator": false,
"allowance_charges": [
{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "0.00",
"base_amount": "2380.00"
}
],
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "380.00",
"taxable_amount": "2000.00",
"percent": "19.00"
}
],
"description": "COMISION POR SERVICIOS",
"code": "COMISION",
"type_item_identification_id": 4,
"price_amount": "2000.00",
"base_quantity": "1"
},
{
"unit_measure_id": 70,
"invoiced_quantity": "2",
"line_extension_amount": "2400.00",
"free_of_charge_indicator": false,
"allowance_charges": [
{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "240.00",
"base_amount": "2400.00"
}
],
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "0.00",
"taxable_amount": "2400.00",
"percent": "0.00"
}
],
"description": "CURUBA",
"code": "CURUBA",
"type_item_identification_id": 4,
"price_amount": "1320.00",
"base_quantity": "2"
},
{
"unit_measure_id": 70,
"invoiced_quantity": "1",
"line_extension_amount": "1000.00",
"free_of_charge_indicator": false,
"allowance_charges": [
{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "0.00",
"base_amount": "1190.00"
}
],
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "190.00",
"taxable_amount": "1000.00",
"percent": "19.00"
}
],
"description": "MANZANA",
"code": "MANZANA",
"type_item_identification_id": 4,
"price_amount": "1000.00",
"base_quantity": "1"
},
{
"unit_measure_id": 70,
"invoiced_quantity": "4",
"line_extension_amount": "7600.00",
"free_of_charge_indicator": false,
"allowance_charges": [
{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "0.00",
"base_amount": "9044.00"
}
],
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "1444.00",
"taxable_amount": "7600.00",
"percent": "19.00"
}
],
"description": "PERAS",
"code": "PERAS",
"type_item_identification_id": 4,
"price_amount": "1900.00",
"base_quantity": "4"
}
]
}
cURL
curl -X POST "{{BASE_URL}}/api/ubl2.1/invoice" \
-H "Authorization: Bearer {API_TOKEN}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"number": 990060196,
"type_document_id": 1,
"date": "2025-01-20",
"time": "11:12:48",
"customer": {
"identification_number": 89008003,
"name": "ALEXANDER OBANDO LONDONO",
"phone": "3103891693",
"address": "BRR LIMONAR MZ 6 CS 3 ET 1",
"email": "alexander_obando@hotmail.com",
"merchant_registration": "0000-00",
"type_document_identification_id": 3,
"type_organization_id": 2,
"municipality_id": 149,
"type_regime_id": 2
},
"payment_form": {
"payment_form_id": 1,
"payment_method_id": 10,
"payment_due_date": "2025-01-20",
"duration_measure": "0"
},
"allowance_charges": [
{
"discount_id": 1,
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "1317.08",
"base_amount": "32246.50"
}
],
"legal_monetary_totals": {
"line_extension_amount": "32246.50",
"tax_exclusive_amount": "32246.50",
"tax_inclusive_amount": "36014.00",
"allowance_total_amount": "1317.08",
"charge_total_amount": "0.00",
"payable_amount": "34696.92"
},
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "0.00",
"percent": "0",
"taxable_amount": "5400.00"
},
{
"tax_id": 1,
"tax_amount": "476.19",
"percent": "5",
"taxable_amount": "9523.81"
},
{
"tax_id": 1,
"tax_amount": "3291.31",
"percent": "19",
"taxable_amount": "17322.69"
}
],
"invoice_lines": [
{
"unit_measure_id": 70,
"invoiced_quantity": "4",
"line_extension_amount": "6722.69",
"free_of_charge_indicator": false,
"allowance_charges": [
{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "336.13",
"base_amount": "8000.00"
}
],
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "1277.31",
"taxable_amount": "6722.69",
"percent": "19.00"
}
],
"description": "BONOS POR SERVICIOS",
"code": "BONOS",
"type_item_identification_id": 4,
"price_amount": "1764.70",
"base_quantity": "4"
},
{
"unit_measure_id": 70,
"invoiced_quantity": "1",
"line_extension_amount": "9523.81",
"free_of_charge_indicator": false,
"allowance_charges": [
{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "380.95",
"base_amount": "10000.00"
}
],
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "476.19",
"taxable_amount": "9523.81",
"percent": "5.00"
}
],
"description": "CARNE MOLIDA",
"code": "CARNE",
"type_item_identification_id": 4,
"price_amount": "9904.76",
"base_quantity": "1"
},
{
"unit_measure_id": 70,
"invoiced_quantity": "2",
"line_extension_amount": "3000.00",
"free_of_charge_indicator": false,
"allowance_charges": [
{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "360.00",
"base_amount": "3000.00"
}
],
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "0.00",
"taxable_amount": "3000.00",
"percent": "0.00"
}
],
"description": "CESANTIA MERCANTIL",
"code": "CESANTIA",
"type_item_identification_id": 4,
"price_amount": "1680.00",
"base_quantity": "2"
},
{
"unit_measure_id": 70,
"invoiced_quantity": "1",
"line_extension_amount": "2000.00",
"free_of_charge_indicator": false,
"allowance_charges": [
{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "0.00",
"base_amount": "2380.00"
}
],
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "380.00",
"taxable_amount": "2000.00",
"percent": "19.00"
}
],
"description": "COMISION POR SERVICIOS",
"code": "COMISION",
"type_item_identification_id": 4,
"price_amount": "2000.00",
"base_quantity": "1"
},
{
"unit_measure_id": 70,
"invoiced_quantity": "2",
"line_extension_amount": "2400.00",
"free_of_charge_indicator": false,
"allowance_charges": [
{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "240.00",
"base_amount": "2400.00"
}
],
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "0.00",
"taxable_amount": "2400.00",
"percent": "0.00"
}
],
"description": "CURUBA",
"code": "CURUBA",
"type_item_identification_id": 4,
"price_amount": "1320.00",
"base_quantity": "2"
},
{
"unit_measure_id": 70,
"invoiced_quantity": "1",
"line_extension_amount": "1000.00",
"free_of_charge_indicator": false,
"allowance_charges": [
{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "0.00",
"base_amount": "1190.00"
}
],
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "190.00",
"taxable_amount": "1000.00",
"percent": "19.00"
}
],
"description": "MANZANA",
"code": "MANZANA",
"type_item_identification_id": 4,
"price_amount": "1000.00",
"base_quantity": "1"
},
{
"unit_measure_id": 70,
"invoiced_quantity": "4",
"line_extension_amount": "7600.00",
"free_of_charge_indicator": false,
"allowance_charges": [
{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "0.00",
"base_amount": "9044.00"
}
],
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "1444.00",
"taxable_amount": "7600.00",
"percent": "19.00"
}
],
"description": "PERAS",
"code": "PERAS",
"type_item_identification_id": 4,
"price_amount": "1900.00",
"base_quantity": "4"
}
]
}'