Cargar factura
Developing
POST
/v1/invoices
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.treli.co/v1/invoices' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Og==' \
--data-raw '{
"items": [
{
"unit_price": "20000.00",
"quantity": 1,
"price ": "price_1Q8VwAGkNzLGa86BS12312"
}
],
"invoice_number": "string",
"invoice_pdf": "http://example.com",
"invoicing": "upload",
"currency": "COP",
"collection_method": "collect",
"days_until_due": 0,
"collection_rule_id": "string",
"installments": {
"number_of_installments": 1,
"installments_settings": [
{
"amount": "string",
"days_until_due": 0
}
]
},
"meta_data": {},
"invoice_settings": {
"invoice_document_id": "string",
"invoice_cost_center": "string"
},
"invoice_retentions": {
"reteica": "string",
"retefte": "string"
},
"customer": "cus_TgfdA2vL9rnWblZM8LtWMsdY"
}'
Response Response Example
{
"id": "col_zdhBDP4k3JiRHNQ4RBUHyHgu",
"items": [
{
"id": "si_d7d2UrHwSG5A5YkYF7vfZmFf",
"name": "Nombre del producto",
"unit_price": "20000.00",
"quantity": 1,
"subtotal": "20000.00",
"total": "20000.00",
"product": {
"id": "prod_GYzZ5BXNRu6DxqQcEPJNoeCk",
"name": "Nombre del producto",
"description": "string",
"status": "active",
"product_merchant_id": null,
"product_invoicing_id": null,
"product_shopify_id": null,
"product_woocommerce_id": null,
"created_date": "2024-11-15 16:44:50",
"image": "http://example.com",
"is_test": false,
"invoice_settings": {
"invoice_tax_id": "12345",
"invoice_tax_percentage": "19"
}
},
"price": {
"id": "price_zUI6hNgEkX8sOLIUjnB9JpaQ",
"unit_price": "20000.00",
"pricing_model": "standard",
"currency": "COP",
"billing_period": "day",
"billing_interval": 1,
"type": "recurring",
"pricing_tiers": null,
"ntp_pricing": null,
"created_date": "2024-11-15 16:44:50",
"active": true,
"is_test": false,
"product_id": "prod_GYzZ5BXNRu6DxqQcEPJNoeCk"
}
}
],
"invoice_number": "string",
"invoice_pdf": "http://example.com",
"invoicing": "upload",
"invoice_provider_id": "siigo",
"subtotal": "string",
"total": "string",
"total_paid": "string",
"currency": "COP",
"created_date": "2024-11-15 16:44:50",
"paid_date": "2019-08-24T14:15:22Z",
"voided_at_date": "2019-08-24T14:15:22Z",
"due_date": "2019-08-24T14:15:22Z",
"collection_rule_id": "string",
"status": "pending",
"invoice_provider_status": "generating",
"is_test": false,
"is_paid": false,
"meta_data": {},
"invoice_provider": "siigo",
"invoice_settings": {
"invoice_document_id": "string",
"invoice_cost_center": "string"
},
"invoice_retentions": {
"reteica": "string",
"retefte": "string"
},
"customer": "cus_TgfdA2vL9rnWblZM8LtWMsdY",
"billing_address": {
"address_1": "string",
"address_2": null,
"city": "string",
"state": "string",
"postcode": null,
"country": "string"
}
}
Request
Body Params application/json