Skip to main content

SendInvoice-TestSetId Articulos Con impuesto Saludable Alimentos Ultraprocesados

Endpoint

  • Método: POST
  • Ruta: /api/ubl2.1/invoice
  • URL ejemplo: http://apidian2024.oo/api/ubl2.1/invoice

Descripción

ENVIO DE FACTURA CON ARTICULOS QUE TENGAN DOS IMPUESTOS

  • Aplica la misma documentacion que el PRIMER ENVIO DE FACTURA de la seccion 02 - PRIMEROS ENVIOS.

  • Este ejemplo ilustra como se debe utilizar la API para enviar una factura que incluya articulos que lleven dos impuestos, aunque esto es muy poco frecuente, se da en casos como la telefonia celular que tiene IVA e Impuesto al Consumo.

Autenticación

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

Headers

KeyValue
Content-Typeapplication/json
Acceptapplication/json
  • host: apidian2021.oo

Body

{
"number": 990000957,
"type_document_id": 1,
"resolution_number": "18760000001",
"prefix": "SETP",
"date": "2024-03-07",
"time": "04:07:12",
"sendmail": false,
"customer": {
"identification_number": 89008003,
"dv": 2,
"name": "ALEXANDER OBANDO LONDOÑO",
"phone": "3103891693",
"address": "CLL 11 NRO 21-73",
"email": "alexander_obando@hotmail.com",
"merchant_registration": "0000000-00",
"type_document_identification_id": 3,
"type_organization_id": 2,
"municipality_id": 822,
"type_regime_id": 2
},
"payment_form": {
"payment_form_id": 1,
"payment_method_id": 10,
"payment_due_date": "2024-03-07",
"duration_measure": "0"
},
"legal_monetary_totals": {
"line_extension_amount": "141270.95",
"tax_exclusive_amount": "141270.95",
"tax_inclusive_amount": "169634.48",
"allowance_total_amount": "0.00",
"charge_total_amount": "0.00",
"payable_amount": "169634.48"
},
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "26841.48",
"percent": "19",
"taxable_amount": "141270.95"
},
{
"tax_id": 22,
"tax_amount": "1522.05",
"percent": "10",
"taxable_amount": "15220.53"
}
],
"invoice_lines": [
{
"unit_measure_id": 70,
"invoiced_quantity": "1",
"line_extension_amount": "15220.53",
"free_of_charge_indicator": false,
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "2891.90",
"taxable_amount": "15220.53",
"percent": "19.00"
},
{
"tax_id": 22,
"tax_amount": "1522.05",
"taxable_amount": "15220.53",
"percent": "10.00"
}
],
"description": "PRODUCTO ALIMENTICIO ULTRAPROCESADO",
"code": "ULTRAPROCESADO",
"type_item_identification_id": 4,
"price_amount": "19634.49",
"base_quantity": "1"
},
{
"unit_measure_id": 70,
"invoiced_quantity": "1",
"line_extension_amount": "126050.42",
"free_of_charge_indicator": false,
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "23949.58",
"taxable_amount": "126050.42",
"percent": "19.00"
}
],
"description": "PRODUCTO ALIMENTICIO NO ULTRAPROCESADO",
"code": "NOULTRAPROCESADO",
"type_item_identification_id": 4,
"price_amount": "150000.00",
"base_quantity": "1"
}
]
}

cURL

curl -X POST "http://apidian2024.oo/api/ubl2.1/invoice" \
-H "Authorization: Bearer {API_TOKEN}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "host: apidian2021.oo" \
-H "Content-Type: application/json" \
-d '{
"number": 990000957,
"type_document_id": 1,
"resolution_number": "18760000001",
"prefix": "SETP",
"date": "2024-03-07",
"time": "04:07:12",
"sendmail": false,
"customer": {
"identification_number": 89008003,
"dv": 2,
"name": "ALEXANDER OBANDO LONDOÑO",
"phone": "3103891693",
"address": "CLL 11 NRO 21-73",
"email": "alexander_obando@hotmail.com",
"merchant_registration": "0000000-00",
"type_document_identification_id": 3,
"type_organization_id": 2,
"municipality_id": 822,
"type_regime_id": 2
},
"payment_form": {
"payment_form_id": 1,
"payment_method_id": 10,
"payment_due_date": "2024-03-07",
"duration_measure": "0"
},
"legal_monetary_totals": {
"line_extension_amount": "141270.95",
"tax_exclusive_amount": "141270.95",
"tax_inclusive_amount": "169634.48",
"allowance_total_amount": "0.00",
"charge_total_amount": "0.00",
"payable_amount": "169634.48"
},
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "26841.48",
"percent": "19",
"taxable_amount": "141270.95"
},
{
"tax_id": 22,
"tax_amount": "1522.05",
"percent": "10",
"taxable_amount": "15220.53"
}
],
"invoice_lines": [
{
"unit_measure_id": 70,
"invoiced_quantity": "1",
"line_extension_amount": "15220.53",
"free_of_charge_indicator": false,
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "2891.90",
"taxable_amount": "15220.53",
"percent": "19.00"
},
{
"tax_id": 22,
"tax_amount": "1522.05",
"taxable_amount": "15220.53",
"percent": "10.00"
}
],
"description": "PRODUCTO ALIMENTICIO ULTRAPROCESADO",
"code": "ULTRAPROCESADO",
"type_item_identification_id": 4,
"price_amount": "19634.49",
"base_quantity": "1"
},
{
"unit_measure_id": 70,
"invoiced_quantity": "1",
"line_extension_amount": "126050.42",
"free_of_charge_indicator": false,
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "23949.58",
"taxable_amount": "126050.42",
"percent": "19.00"
}
],
"description": "PRODUCTO ALIMENTICIO NO ULTRAPROCESADO",
"code": "NOULTRAPROCESADO",
"type_item_identification_id": 4,
"price_amount": "150000.00",
"base_quantity": "1"
}
]
}'

Probar endpoint

POST
Enviar Factura (Casuística)
BASE URL
Se guarda localmente en tu navegador.
BEARER TOKEN
Se guarda solo en esta sesión/pestaña.
URL FINAL
/api/ubl2.1/invoice
BODY JSON
RESPUESTA
Envía la solicitud para ver la respuesta aquí.