Skip to main content

SendInvoice-TestSetId Articulos Con Dos Impuestos - Telefonia Celular

Endpoint

  • Método: POST
  • Ruta: /api/ubl2.1/invoice
  • URL ejemplo: http://apidian2023.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": 990000365,
"type_document_id": 1,
"resolution_number": "18760000001",
"prefix": "SETP",
"date": "2021-08-17",
"time": "04:07:12",
"sendmail": false,
"customer": {
"identification_number": 73187745,
"dv": null,
"name": "Arnold Jose Perez",
"phone": 3042484748,
"address": "CLL 4 NRO 33-95",
"email": "sr.arnoldt@gmail.com",
"merchant_registration": "0000000-00",
"type_document_identification_id": 3,
"type_organization_id": 2,
"municipality_id": 823,
"type_regime_id": 2
},
"payment_form": {
"payment_form_id": 1,
"payment_method_id": 10,
"payment_due_date": "2021-08-17",
"duration_measure": "0"
},
"legal_monetary_totals": {
"line_extension_amount": "142013.42",
"tax_exclusive_amount": "142013.42",
"tax_inclusive_amount": "169634.49",
"allowance_total_amount": "0.00",
"charge_total_amount": "0.00",
"payable_amount": "169634.49"
},
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "26982.55",
"percent": "19",
"taxable_amount": "142013.4"
},
{
"tax_id": 4,
"tax_amount": "638.52",
"percent": "4",
"taxable_amount": "15963.00"
}
],
"invoice_lines": [
{
"unit_measure_id": 70,
"invoiced_quantity": "1",
"line_extension_amount": "15963.00",
"free_of_charge_indicator": false,
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "3032.97",
"taxable_amount": "15963.00",
"percent": "19.00"
},
{
"tax_id": 4,
"tax_amount": "638.52",
"taxable_amount": "15963.00",
"percent": "4.00"
}
],
"description": "Cadena tejido chino (peso 3.4gr)",
"code": "Item",
"type_item_identification_id": 4,
"price_amount": "19634.49",
"base_quantity": "1"
},
{
"unit_measure_id": 70,
"invoiced_quantity": "1",
"line_extension_amount": "126050.00",
"free_of_charge_indicator": false,
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "23949.58",
"taxable_amount": "126050.00",
"percent": "19.00"
}
],
"description": "Anillo chibcha (peso 43.5gr)",
"code": "Item",
"type_item_identification_id": 4,
"price_amount": "150000.00",
"base_quantity": "1"
}
]
}

cURL

curl -X POST "http://apidian2023.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": 990000365,
"type_document_id": 1,
"resolution_number": "18760000001",
"prefix": "SETP",
"date": "2021-08-17",
"time": "04:07:12",
"sendmail": false,
"customer": {
"identification_number": 73187745,
"dv": null,
"name": "Arnold Jose Perez",
"phone": 3042484748,
"address": "CLL 4 NRO 33-95",
"email": "sr.arnoldt@gmail.com",
"merchant_registration": "0000000-00",
"type_document_identification_id": 3,
"type_organization_id": 2,
"municipality_id": 823,
"type_regime_id": 2
},
"payment_form": {
"payment_form_id": 1,
"payment_method_id": 10,
"payment_due_date": "2021-08-17",
"duration_measure": "0"
},
"legal_monetary_totals": {
"line_extension_amount": "142013.42",
"tax_exclusive_amount": "142013.42",
"tax_inclusive_amount": "169634.49",
"allowance_total_amount": "0.00",
"charge_total_amount": "0.00",
"payable_amount": "169634.49"
},
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "26982.55",
"percent": "19",
"taxable_amount": "142013.4"
},
{
"tax_id": 4,
"tax_amount": "638.52",
"percent": "4",
"taxable_amount": "15963.00"
}
],
"invoice_lines": [
{
"unit_measure_id": 70,
"invoiced_quantity": "1",
"line_extension_amount": "15963.00",
"free_of_charge_indicator": false,
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "3032.97",
"taxable_amount": "15963.00",
"percent": "19.00"
},
{
"tax_id": 4,
"tax_amount": "638.52",
"taxable_amount": "15963.00",
"percent": "4.00"
}
],
"description": "Cadena tejido chino (peso 3.4gr)",
"code": "Item",
"type_item_identification_id": 4,
"price_amount": "19634.49",
"base_quantity": "1"
},
{
"unit_measure_id": 70,
"invoiced_quantity": "1",
"line_extension_amount": "126050.00",
"free_of_charge_indicator": false,
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "23949.58",
"taxable_amount": "126050.00",
"percent": "19.00"
}
],
"description": "Anillo chibcha (peso 43.5gr)",
"code": "Item",
"type_item_identification_id": 4,
"price_amount": "150000.00",
"base_quantity": "1"
}
]
}'