Invoices
Manage accounts receivable invoices.
Accounts receivable invoices issued to customers.
Dependency: Requires Customers to be uploaded first.
Endpoint
POST /full-csv-integration/upload-invoices
- Form Field:
invoicesFile
Required Fields
| Field | Type | Description | Validations |
|---|---|---|---|
erp_customer_id | String | Customer ID in ERP | Must exist in Customers. Rows whose customer does not exist are dropped silently and the upload still reports success |
erp_invoice_id | String | Invoice ID in ERP | The column must be present |
currency | String | Currency code | e.g., COP, USD, EUR. The column must be present |
original_amount | Float | Original invoice amount | Decimal number |
pending_amount | Float | Pending/outstanding amount | Decimal number |
status | String | Invoice status | OPEN or CLOSED, uppercase — open and closed are rejected |
issue_date | Date | Invoice issue date | YYYY-MM-DD recommended. Other formats are accepted; values that cannot be parsed are stored empty rather than raising an error |
due_date | Date | Payment due date | YYYY-MM-DD recommended. Other formats are accepted; values that cannot be parsed are stored empty rather than raising an error |
Optional Fields
| Field | Type | Description | Validations | Default |
|---|---|---|---|---|
advance_amount | Float | Advance payment applied | Decimal number. If omitted or left empty it is stored as 0.00 | 0.00 |
allow_collection | Boolean | Allow collection | 1 or 0. The default only applies when the invoice is created; a blank cell is read as 0, and on updates the existing value is kept | 1 |
invoice_url | String | URL to invoice document | - | null |
cost_center_1_erp_id | String | Cost center 1 ID | Must provide matching _pct | null |
cost_center_1_pct | Float | Cost center 1 percentage | Only values greater than 0 are recorded | null |
cost_center_2_erp_id | String | Cost center 2 ID | Must provide matching _pct | null |
cost_center_2_pct | Float | Cost center 2 percentage | Only values greater than 0 are recorded | null |
cost_center_3_erp_id | String | Cost center 3 ID | Must provide matching _pct | null |
cost_center_3_pct | Float | Cost center 3 percentage | Only values greater than 0 are recorded | null |
cost_center_4_erp_id | String | Cost center 4 ID | Must provide matching _pct | null |
cost_center_4_pct | Float | Cost center 4 percentage | Only values greater than 0 are recorded | null |
cost_center_5_erp_id | String | Cost center 5 ID | Must provide matching _pct | null |
cost_center_5_pct | Float | Cost center 5 percentage | Only values greater than 0 are recorded | null |
Cost center allocations
Up to 5 cost center pairs are accepted. For each pair i:
- If you send either
cost_center_i_erp_idorcost_center_i_pct, you must send both columns, otherwise the upload fails. - Only rows with a percentage greater than 0 produce an allocation.
- The percentages are not checked: they need not add up to 100, and values above 100 are not rejected.
cost_center_i_erp_idis stored as given — it is not verified against Cost Centers.- Allocations are replaced per invoice on every upload: send all of an invoice’s cost centers together.
Example CSV
erp_customer_id,erp_invoice_id,currency,original_amount,pending_amount,status,issue_date,due_date,advance_amount,allow_collection,cost_center_1_erp_id,cost_center_1_pct,cost_center_2_erp_id,cost_center_2_pct
CUST001,INV001,COP,1000000.00,500000.00,OPEN,2024-01-15,2024-02-15,0.00,1,CC001,60.0,CC002,40.0
CUST002,INV002,COP,500000.00,0.00,CLOSED,2024-01-20,2024-02-20,0.00,1,CC001,100.0,,