...
The aggregation is done on a selected set of IDs provided, and grouped by Currency and VAT
URL
Code Block |
---|
(POST) /api/invoices/aggregationitems/new/aggregation |
PARAMETERS
The URL takes no parameters
...
ids | An array of integer ids, each belonging to an Invoice For example:
See detailed description further downYou can include up to 20,000 elements. | object[], Mandatory | |||||
periodFrom | Start date of the financial period for invoice aggregation. Only invoices with an EffectiveDate on or after this date will be included. Example (ISO date strings):
| DateTime, Mandatory | |||||
periodTo | End date of the financial period for invoice aggregation. Only invoices with an EffectiveDate on or before this date will be included. Example (ISO date strings):
| DateTime, Mandatory | |||||
isClientInvoices | Determines whether to aggregate client invoices or supplier invoices.
| bool, Optional | |||||
doNotAggregateSingle | Controls whether to skip aggregation of single invoices. Defaults to true Single invoices can result from sending a single invoice id, or from a group of company+currency+vat | bool, Optional |
...
have a status of
InvoiceDraft
, invoices with other statuses will be ignoredhave an Effective Date between the
periodFrom
andperiodTo
mandatory propertiesbe either Client or Supplier invoices (matching
isClientInvoices
property)
RESULTS
This method is an asynchronous operation: Your request is queued and will execute as soon as possible.
...
The node custom/ids
returns the list of IDs of the newly created invoices resulting from the aggregation of the given invoice IDs. If no invoices were aggregated, the list will be empty
ERROR HANDLING
Effective error handling involves careful consideration and effort. Let’s break it down into three levels of errors:
...