Envio Factura con AIU
Endpoint
- Método: POST
- Ruta:
/api/ubl2.1/invoice-aiu - URL ejemplo:
{{BASE_URL}}/api/ubl2.1/invoice-aiu
ENVIO DE FACTURA CON AIU
-
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 AIU, este tipo de factura tiene como caracteristica que incluye las lineas ADMINISTRACION, IMPREVISTO y UTILIDAD, pero solo se cobra impuesto sobre el campo UTILIDAD, es muy utilizada por contratistas del area de la construccion.
Autenticación
- Tipo: Bearer Token
- Header:
Authorization: Bearer {{API_TOKEN}}
Headers
| Key | Value |
|---|---|
Content-Type | application/json |
Accept | application/json |
Body
- Modo:
raw
{
"number": 990000378,
"dv": 2,
"type_document_id": 1,
"date": "2021-08-17",
"time": "09:44:45",
"notes": "SIN OBSERVACIONES",
"noteAIU": "PRUEBA DE CONTRATO AIU",
"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
},
"sendmail": true,
"foot_note": "Generado por SKALA Platform | NIT 901.450.277 - 1 | Cel: 300 2031148 - www.skala.one",
"tax_totals": [{
"tax_id": 1,
"percent": "19.00",
"tax_amount": "91187.27",
"taxable_amount": "479933.00"
}, {
"tax_id": 1,
"percent": "0.00",
"tax_amount": "0.00",
"taxable_amount": "10174570.59"
}
],
"payment_form": {
"payment_form_id": 2,
"duration_measure": 13,
"payment_due_date": "2021-09-15",
"payment_method_id": 75
},
"sendmailtome": true,
"invoice_lines": [{
"code": "1",
"tax_totals": [{
"tax_id": 1,
"percent": "0.00",
"tax_amount": "0.00",
"taxable_amount": "9598650.59"
}
],
"description": "Instalaciones Generales Con AIU",
"price_amount": "8199.98",
"base_quantity": "1170.57",
"unit_measure_id": 70,
"allowance_charges": [{
"amount": "0.00",
"base_amount": "9598650.59",
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL"
}
],
"invoiced_quantity": "1170.57",
"line_extension_amount": "9598650.59",
"free_of_charge_indicator": false,
"type_item_identification_id": 4
}, {
"code": "2",
"tax_totals": [{
"tax_id": 1,
"percent": "0.00",
"tax_amount": "0.00",
"taxable_amount": "287960.00"
}
],
"description": "Administración",
"price_amount": "287960.00",
"base_quantity": "1.00",
"unit_measure_id": 70,
"allowance_charges": [{
"amount": "0.00",
"base_amount": "287960.00",
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL"
}
],
"invoiced_quantity": "1.00",
"line_extension_amount": "287960.00",
"free_of_charge_indicator": false,
"type_item_identification_id": 4
}, {
"code": "3",
"tax_totals": [{
"tax_id": 1,
"percent": "0.00",
"tax_amount": "0.00",
"taxable_amount": "287960.00"
}
],
"description": "Imprevisto",
"price_amount": "287960.00",
"base_quantity": "1.00",
"unit_measure_id": 70,
"allowance_charges": [{
"amount": "0.00",
"base_amount": "287960.00",
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL"
}
],
"invoiced_quantity": "1.00",
"line_extension_amount": "287960.00",
"free_of_charge_indicator": false,
"type_item_identification_id": 4
}, {
"code": "4",
"tax_totals": [{
"tax_id": 1,
"percent": "19.00",
"tax_amount": "91187.27",
"taxable_amount": "479933.00"
}
],
"description": "Utilidad",
"price_amount": "571120.27",
"base_quantity": "1.00",
"unit_measure_id": 70,
"allowance_charges": [{
"amount": "0.00",
"base_amount": "479933.00",
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL"
}
],
"invoiced_quantity": "1.00",
"line_extension_amount": "479933.00",
"free_of_charge_indicator": false,
"type_item_identification_id": 4
}
],
"allowance_charges": [{
"amount": "0.00",
"base_amount": "10654503.59",
"discount_id": 10,
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL"
}
],
"establishment_name": "COSTA VERTICAL SOLUTION S.A.S",
"legal_monetary_totals": {
"payable_amount": "10745690.86",
"charge_total_amount": "0.00",
"tax_exclusive_amount": "10654503.59",
"tax_inclusive_amount": "10745690.86",
"line_extension_amount": "10654503.59",
"allowance_total_amount": "0.00"
}
}
Ejemplo cURL
curl \
-X POST \
"{{BASE_URL}}/api/ubl2.1/invoice-aiu" \
-H "Authorization: Bearer {{API_TOKEN}}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data '{
"number": 990000378,
"dv": 2,
"type_document_id": 1,
"date": "2021-08-17",
"time": "09:44:45",
"notes": "SIN OBSERVACIONES",
"noteAIU": "PRUEBA DE CONTRATO AIU",
"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
},
"sendmail": true,
"foot_note": "Generado por SKALA Platform | NIT 901.450.277 - 1 | Cel: 300 2031148 - www.skala.one",
"tax_totals": [{
"tax_id": 1,
"percent": "19.00",
"tax_amount": "91187.27",
"taxable_amount": "479933.00"
}, {
"tax_id": 1,
"percent": "0.00",
"tax_amount": "0.00",
"taxable_amount": "10174570.59"
}
],
"payment_form": {
"payment_form_id": 2,
"duration_measure": 13,
"payment_due_date": "2021-09-15",
"payment_method_id": 75
},
"sendmailtome": true,
"invoice_lines": [{
"code": "1",
"tax_totals": [{
"tax_id": 1,
"percent": "0.00",
"tax_amount": "0.00",
"taxable_amount": "9598650.59"
}
],
"description": "Instalaciones Generales Con AIU",
"price_amount": "8199.98",
"base_quantity": "1170.57",
"unit_measure_id": 70,
"allowance_charges": [{
"amount": "0.00",
"base_amount": "9598650.59",
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL"
}
],
"invoiced_quantity": "1170.57",
"line_extension_amount": "9598650.59",
"free_of_charge_indicator": false,
"type_item_identification_id": 4
}, {
"code": "2",
"tax_totals": [{
"tax_id": 1,
"percent": "0.00",
"tax_amount": "0.00",
"taxable_amount": "287960.00"
}
],
"description": "Administración",
"price_amount": "287960.00",
"base_quantity": "1.00",
"unit_measure_id": 70,
"allowance_charges": [{
"amount": "0.00",
"base_amount": "287960.00",
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL"
}
],
"invoiced_quantity": "1.00",
"line_extension_amount": "287960.00",
"free_of_charge_indicator": false,
"type_item_identification_id": 4
}, {
"code": "3",
"tax_totals": [{
"tax_id": 1,
"percent": "0.00",
"tax_amount": "0.00",
"taxable_amount": "287960.00"
}
],
"description": "Imprevisto",
"price_amount": "287960.00",
"base_quantity": "1.00",
"unit_measure_id": 70,
"allowance_charges": [{
"amount": "0.00",
"base_amount": "287960.00",
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL"
}
],
"invoiced_quantity": "1.00",
"line_extension_amount": "287960.00",
"free_of_charge_indicator": false,
"type_item_identification_id": 4
}, {
"code": "4",
"tax_totals": [{
"tax_id": 1,
"percent": "19.00",
"tax_amount": "91187.27",
"taxable_amount": "479933.00"
}
],
"description": "Utilidad",
"price_amount": "571120.27",
"base_quantity": "1.00",
"unit_measure_id": 70,
"allowance_charges": [{
"amount": "0.00",
"base_amount": "479933.00",
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL"
}
],
"invoiced_quantity": "1.00",
"line_extension_amount": "479933.00",
"free_of_charge_indicator": false,
"type_item_identification_id": 4
}
],
"allowance_charges": [{
"amount": "0.00",
"base_amount": "10654503.59",
"discount_id": 10,
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL"
}
],
"establishment_name": "COSTA VERTICAL SOLUTION S.A.S",
"legal_monetary_totals": {
"payable_amount": "10745690.86",
"charge_total_amount": "0.00",
"tax_exclusive_amount": "10654503.59",
"tax_inclusive_amount": "10745690.86",
"line_extension_amount": "10654503.59",
"allowance_total_amount": "0.00"
}
}'