Skip to main content

SendInvoice-TestSetId Charge Encabezado

Endpoint

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

Descripción

ENVIO DE FACTURA CON CARGOS

  • 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 un cargo por cualquier motivo, en el ejemplo se incluye un cargo por valor de consignacion bancaria.

Autenticación

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

Headers

KeyValue
Content-Typeapplication/json
Acceptapplication/json

Body

{
"number": 990001108,
"type_document_id": 1,
"date": "2024-06-25",
"time": "20:20:24",
"resolution_number": "18760000001",
"prefix": "SETP",
"customer": {
"identification_number": 89008003,
"name": "ALEXANDER OBANDO LONDONO",
"phone": "3103891693",
"address": "BRR EL CARDAL MZ 4 CS 7 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": "2024-06-25",
"duration_measure": "0"
},
"allowance_charges": [
{
"discount_id": 1,
"charge_indicator": true,
"allowance_charge_reason": "CARGO POR CONSIGNACION BANCARIA",
"amount": "7000.00",
"base_amount": "300000.00"
}
],
"legal_monetary_totals": {
"line_extension_amount": "252100.84",
"tax_exclusive_amount": "252100.84",
"tax_inclusive_amount": "300000.00",
"allowance_total_amount": "0.00",
"charge_total_amount": "7000.00",
"payable_amount": "307000.00"
},
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "47899.16",
"percent": "19",
"taxable_amount": "252100.84"
}
],
"invoice_lines": [
{
"unit_measure_id": 70,
"invoiced_quantity": "1",
"line_extension_amount": "252100.84",
"free_of_charge_indicator": false,
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "47899.16",
"taxable_amount": "252100.84",
"percent": "19.00"
}
],
"description": "COMISION POR SERVICIOS",
"code": "COMISION",
"type_item_identification_id": 4,
"price_amount": "300000.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 "Content-Type: application/json" \
-d '{
"number": 990001108,
"type_document_id": 1,
"date": "2024-06-25",
"time": "20:20:24",
"resolution_number": "18760000001",
"prefix": "SETP",
"customer": {
"identification_number": 89008003,
"name": "ALEXANDER OBANDO LONDONO",
"phone": "3103891693",
"address": "BRR EL CARDAL MZ 4 CS 7 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": "2024-06-25",
"duration_measure": "0"
},
"allowance_charges": [
{
"discount_id": 1,
"charge_indicator": true,
"allowance_charge_reason": "CARGO POR CONSIGNACION BANCARIA",
"amount": "7000.00",
"base_amount": "300000.00"
}
],
"legal_monetary_totals": {
"line_extension_amount": "252100.84",
"tax_exclusive_amount": "252100.84",
"tax_inclusive_amount": "300000.00",
"allowance_total_amount": "0.00",
"charge_total_amount": "7000.00",
"payable_amount": "307000.00"
},
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "47899.16",
"percent": "19",
"taxable_amount": "252100.84"
}
],
"invoice_lines": [
{
"unit_measure_id": 70,
"invoiced_quantity": "1",
"line_extension_amount": "252100.84",
"free_of_charge_indicator": false,
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "47899.16",
"taxable_amount": "252100.84",
"percent": "19.00"
}
],
"description": "COMISION POR SERVICIOS",
"code": "COMISION",
"type_item_identification_id": 4,
"price_amount": "300000.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í.