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 |
erp_invoice_id | String | Invoice ID in ERP | Cannot be empty |
currency | String | Currency code | e.g., COP, USD, EUR |
original_amount | Float | Original invoice amount | Positive decimal |
pending_amount | Float | Pending/outstanding amount | Decimal number |
status | String | Invoice status | OPEN or CLOSED |
issue_date | Date | Invoice issue date | Format: YYYY-MM-DD |
due_date | Date | Payment due date | Format: YYYY-MM-DD |
Optional Fields
| Field | Type | Description | Validations | Default |
|---|---|---|---|---|
advance_amount | Float | Advance payment applied | Decimal | null |
allow_collection | Boolean | Allow collection | 1 or 0 | 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 | 0-100 | 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 | 0-100 | null |
| … | … | Up to 5 cost centers | … | … |
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,,