SendInvoiceAIU-TestSetId Sencilla
Descripción
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.
Endpoint
- Método: POST
- URL:
{{BASE_URL}}/api/ubl2.1/invoice-aiu
Autenticación
Bearer {{API_TOKEN}}
Headers
| Header | Valor |
|---|---|
Content-Type | application/json |
Accept | application/json |
Body
Tipo: json
{
"number": 990000606,
"type_document_id": 1,
"date": "2024-01-04",
"time": "14:20:49",
"notes": "SIN OBSERVACIONES",
"noteAIU": "PARA PROYECTO DE PAVIMENTACION VIA SAN CARLOS - GRANADA",
"sendmail": false,
"resolution_number": "18760000001",
"customer": {
"identification_number": 18387250,
"dv": 1,
"name": "CARLOS MARIO CARMONA PATI\u00d1O",
"phone": "3176364715",
"address": "CRA 98 B 48 164 AP 203",
"email": "alexanderobandolondon@gmail.com",
"merchant_registration": "0000-00",
"type_document_identification_id": 3,
"type_organization_id": 2,
"municipality_id": 1006,
"type_regime_id": 2
},
"payment_form": {
"payment_form_id": 1,
"payment_method_id": 10,
"payment_due_date": "2024-01-04",
"duration_measure": "0"
},
"allowance_charges": [{
"discount_id": 1,
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "0.00",
"base_amount": "42136609.22"
}
],
"legal_monetary_totals": {
"line_extension_amount": "42136609.22",
"tax_exclusive_amount": "42136609.22",
"tax_inclusive_amount": "42487747.65",
"allowance_total_amount": "0.00",
"charge_total_amount": "0.00",
"payable_amount": "42487747.65"
},
"tax_totals": [{
"tax_id": 1,
"tax_amount": "0.00",
"percent": "0",
"taxable_amount": "40288512.22"
}, {
"tax_id": 1,
"tax_amount": "351138.43",
"percent": "19",
"taxable_amount": "1848097.00"
}
],
"invoice_lines": [{
"unit_measure_id": 70,
"invoiced_quantity": "1.00",
"line_extension_amount": "2956955.00",
"free_of_charge_indicator": false,
"allowance_charges": [{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "0.00",
"base_amount": "2956955.00"
}
],
"tax_totals": [{
"tax_id": 1,
"tax_amount": "0.00",
"taxable_amount": "2956955.00",
"percent": "0.00"
}
],
"description": "Administraci\u00f3n",
"code": "ADMINIST",
"type_item_identification_id": 4,
"price_amount": "2956955.00",
"base_quantity": "1.00"
}, {
"unit_measure_id": 70,
"invoiced_quantity": "1915.30",
"line_extension_amount": "36961938.22",
"free_of_charge_indicator": false,
"allowance_charges": [{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "0.00",
"base_amount": "36961938.22"
}
],
"tax_totals": [{
"tax_id": 1,
"tax_amount": "0.00",
"taxable_amount": "36961938.22",
"percent": "0.00"
}
],
"description": "AFIRMADO X M3",
"code": "ND10002B",
"type_item_identification_id": 4,
"price_amount": "19298.25",
"base_quantity": "1915.30"
}, {
"unit_measure_id": 70,
"invoiced_quantity": "1.00",
"line_extension_amount": "369619.00",
"free_of_charge_indicator": false,
"allowance_charges": [{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "0.00",
"base_amount": "369619.00"
}
],
"tax_totals": [{
"tax_id": 1,
"tax_amount": "0.00",
"taxable_amount": "369619.00",
"percent": "0.00"
}
],
"description": "Imprevisto",
"code": "IMPREVIS",
"type_item_identification_id": 4,
"price_amount": "369619.00",
"base_quantity": "1.00"
}, {
"unit_measure_id": 70,
"invoiced_quantity": "1.00",
"line_extension_amount": "1848097.00",
"free_of_charge_indicator": false,
"allowance_charges": [{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "0.00",
"base_amount": "2199235.43"
}
],
"tax_totals": [{
"tax_id": 1,
"tax_amount": "351138.43",
"taxable_amount": "1848097.00",
"percent": "19.00"
}
],
"description": "Utilidad",
"code": "UTILIDAD",
"type_item_identification_id": 4,
"price_amount": "1848097.00",
"base_quantity": "1.00"
}
]
}
Ejemplo cURL
curl --request POST \
--url "{{BASE_URL}}/api/ubl2.1/invoice-aiu" \
--header "Authorization: Bearer {{API_TOKEN}}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data '{
"number": 990000606,
"type_document_id": 1,
"date": "2024-01-04",
"time": "14:20:49",
"notes": "SIN OBSERVACIONES",
"noteAIU": "PARA PROYECTO DE PAVIMENTACION VIA SAN CARLOS - GRANADA",
"sendmail": false,
"resolution_number": "18760000001",
"customer": {
"identification_number": 18387250,
"dv": 1,
"name": "CARLOS MARIO CARMONA PATI\u00d1O",
"phone": "3176364715",
"address": "CRA 98 B 48 164 AP 203",
"email": "alexanderobandolondon@gmail.com",
"merchant_registration": "0000-00",
"type_document_identification_id": 3,
"type_organization_id": 2,
"municipality_id": 1006,
"type_regime_id": 2
},
"payment_form": {
"payment_form_id": 1,
"payment_method_id": 10,
"payment_due_date": "2024-01-04",
"duration_measure": "0"
},
"allowance_charges": [{
"discount_id": 1,
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "0.00",
"base_amount": "42136609.22"
}
],
"legal_monetary_totals": {
"line_extension_amount": "42136609.22",
"tax_exclusive_amount": "42136609.22",
"tax_inclusive_amount": "42487747.65",
"allowance_total_amount": "0.00",
"charge_total_amount": "0.00",
"payable_amount": "42487747.65"
},
"tax_totals": [{
"tax_id": 1,
"tax_amount": "0.00",
"percent": "0",
"taxable_amount": "40288512.22"
}, {
"tax_id": 1,
"tax_amount": "351138.43",
"percent": "19",
"taxable_amount": "1848097.00"
}
],
"invoice_lines": [{
"unit_measure_id": 70,
"invoiced_quantity": "1.00",
"line_extension_amount": "2956955.00",
"free_of_charge_indicator": false,
"allowance_charges": [{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "0.00",
"base_amount": "2956955.00"
}
],
"tax_totals": [{
"tax_id": 1,
"tax_amount": "0.00",
"taxable_amount": "2956955.00",
"percent": "0.00"
}
],
"description": "Administraci\u00f3n",
"code": "ADMINIST",
"type_item_identification_id": 4,
"price_amount": "2956955.00",
"base_quantity": "1.00"
}, {
"unit_measure_id": 70,
"invoiced_quantity": "1915.30",
"line_extension_amount": "36961938.22",
"free_of_charge_indicator": false,
"allowance_charges": [{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "0.00",
"base_amount": "36961938.22"
}
],
"tax_totals": [{
"tax_id": 1,
"tax_amount": "0.00",
"taxable_amount": "36961938.22",
"percent": "0.00"
}
],
"description": "AFIRMADO X M3",
"code": "ND10002B",
"type_item_identification_id": 4,
"price_amount": "19298.25",
"base_quantity": "1915.30"
}, {
"unit_measure_id": 70,
"invoiced_quantity": "1.00",
"line_extension_amount": "369619.00",
"free_of_charge_indicator": false,
"allowance_charges": [{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "0.00",
"base_amount": "369619.00"
}
],
"tax_totals": [{
"tax_id": 1,
"tax_amount": "0.00",
"taxable_amount": "369619.00",
"percent": "0.00"
}
],
"description": "Imprevisto",
"code": "IMPREVIS",
"type_item_identification_id": 4,
"price_amount": "369619.00",
"base_quantity": "1.00"
}, {
"unit_measure_id": 70,
"invoiced_quantity": "1.00",
"line_extension_amount": "1848097.00",
"free_of_charge_indicator": false,
"allowance_charges": [{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "0.00",
"base_amount": "2199235.43"
}
],
"tax_totals": [{
"tax_id": 1,
"tax_amount": "351138.43",
"taxable_amount": "1848097.00",
"percent": "19.00"
}
],
"description": "Utilidad",
"code": "UTILIDAD",
"type_item_identification_id": 4,
"price_amount": "1848097.00",
"base_quantity": "1.00"
}
]
}'