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

FieldTypeDescriptionValidations
erp_customer_idStringCustomer ID in ERPMust exist in Customers. Rows whose customer does not exist are dropped silently and the upload still reports success
erp_invoice_idStringInvoice ID in ERPThe column must be present
currencyStringCurrency codee.g., COP, USD, EUR. The column must be present
original_amountFloatOriginal invoice amountDecimal number
pending_amountFloatPending/outstanding amountDecimal number
statusStringInvoice statusOPEN or CLOSED, uppercase — open and closed are rejected
issue_dateDateInvoice issue dateYYYY-MM-DD recommended. Other formats are accepted; values that cannot be parsed are stored empty rather than raising an error
due_dateDatePayment due dateYYYY-MM-DD recommended. Other formats are accepted; values that cannot be parsed are stored empty rather than raising an error

Optional Fields

FieldTypeDescriptionValidationsDefault
advance_amountFloatAdvance payment appliedDecimal number. If omitted or left empty it is stored as 0.000.00
allow_collectionBooleanAllow collection1 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 kept1
invoice_urlStringURL to invoice document-null
cost_center_1_erp_idStringCost center 1 IDMust provide matching _pctnull
cost_center_1_pctFloatCost center 1 percentageOnly values greater than 0 are recordednull
cost_center_2_erp_idStringCost center 2 IDMust provide matching _pctnull
cost_center_2_pctFloatCost center 2 percentageOnly values greater than 0 are recordednull
cost_center_3_erp_idStringCost center 3 IDMust provide matching _pctnull
cost_center_3_pctFloatCost center 3 percentageOnly values greater than 0 are recordednull
cost_center_4_erp_idStringCost center 4 IDMust provide matching _pctnull
cost_center_4_pctFloatCost center 4 percentageOnly values greater than 0 are recordednull
cost_center_5_erp_idStringCost center 5 IDMust provide matching _pctnull
cost_center_5_pctFloatCost center 5 percentageOnly values greater than 0 are recordednull

Cost center allocations

Up to 5 cost center pairs are accepted. For each pair i:

  • If you send either cost_center_i_erp_id or cost_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_id is 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,,