SendInvoice-TestSetId Allowance A Credito
Endpoint
- Método: POST
- Ruta:
/api/ubl2.1/invoice - URL ejemplo:
http://apidian2023.oo/api/ubl2.1/invoice
Descripción
ENVIO DE FACTURA CON PAGO A CREDITO Y DESCUENTO
-
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 pago a credito y ademas tenga descuento.
Autenticación
- Tipo: Bearer Token
- Header:
Authorization: Bearer {{API_TOKEN}}
Headers
| Key | Value |
|---|---|
Content-Type | application/json |
Accept | application/json |
Body
{
"number": 990000361,
"type_document_id": 1,
"date": "2021-08-17",
"time": "04:36:32",
"resolution_number": "18760000001",
"prefix": "SETP",
"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": 2,
"payment_method_id": 10,
"payment_due_date": "2021-09-17",
"duration_measure": "30"
},
"allowance_charges": [
{
"discount_id": 1,
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "600.00",
"base_amount": "8067.23"
}
],
"legal_monetary_totals": {
"line_extension_amount": "8067.23",
"tax_exclusive_amount": "8067.23",
"tax_inclusive_amount": "9600.00",
"allowance_total_amount": "600.00",
"charge_total_amount": "0.00",
"payable_amount": "9000.00"
},
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "1532.77",
"percent": "19",
"taxable_amount": "8067.23"
}
],
"invoice_lines": [
{
"unit_measure_id": 70,
"invoiced_quantity": "8",
"line_extension_amount": "8067.23",
"free_of_charge_indicator": false,
"allowance_charges": [
{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "600.00",
"base_amount": "9600.00"
}
],
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "1532.77",
"taxable_amount": "8067.23",
"percent": "19.00"
}
],
"description": "MANZANA",
"code": "MANZANA",
"type_item_identification_id": 4,
"price_amount": "1083.40",
"base_quantity": "8"
}
]
}
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 "Content-Type: application/json" \
-d '{
"number": 990000361,
"type_document_id": 1,
"date": "2021-08-17",
"time": "04:36:32",
"resolution_number": "18760000001",
"prefix": "SETP",
"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": 2,
"payment_method_id": 10,
"payment_due_date": "2021-09-17",
"duration_measure": "30"
},
"allowance_charges": [
{
"discount_id": 1,
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "600.00",
"base_amount": "8067.23"
}
],
"legal_monetary_totals": {
"line_extension_amount": "8067.23",
"tax_exclusive_amount": "8067.23",
"tax_inclusive_amount": "9600.00",
"allowance_total_amount": "600.00",
"charge_total_amount": "0.00",
"payable_amount": "9000.00"
},
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "1532.77",
"percent": "19",
"taxable_amount": "8067.23"
}
],
"invoice_lines": [
{
"unit_measure_id": 70,
"invoiced_quantity": "8",
"line_extension_amount": "8067.23",
"free_of_charge_indicator": false,
"allowance_charges": [
{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "600.00",
"base_amount": "9600.00"
}
],
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "1532.77",
"taxable_amount": "8067.23",
"percent": "19.00"
}
],
"description": "MANZANA",
"code": "MANZANA",
"type_item_identification_id": 4,
"price_amount": "1083.40",
"base_quantity": "8"
}
]
}'