curl -X POST https://api.factioapp.com/documents \
-H "X-API-Key: fac_TU_API_KEY" \
-H "Content-Type: application/json" \
--max-time 60 \
-d '{
"issuer_id": "TU_ISSUER_ID",
"establishment_id": "TU_ESTABLISHMENT_ID",
"emission_point_id": "TU_EMISSION_POINT_ID",
"document_type": "01",
"issue_date": "2026-10-20",
"numeric_code": "12345678",
"idempotency_key": "erp-factura-000123",
"buyer_id_type": "04",
"buyer_id": "1792146739001",
"buyer_name": "Empresa de Pruebas S.A.",
"buyer_email": "[email protected]",
"buyer_address": "Av. de los Shyris N35-17",
"subtotal": "100.00",
"total_discount": "0.00",
"total_tax": "15.00",
"total": "115.00",
"lines": [
{
"line_number": 1,
"description": "Servicio de consultoría",
"quantity": "1",
"unit_price": "100.00",
"discount": "0.00",
"subtotal": "100.00",
"tax_code": "2",
"tax_rate_code": "4"
}
],
"taxes": [
{
"tax_code": "2",
"tax_rate_code": "4",
"taxable_base": "100.00",
"rate": "0.1500",
"tax_amount": "15.00"
}
],
"payments": [
{
"line_number": 1,
"payment_method_code": "20",
"total": "115.00"
}
]
}'