4.3 Invoice API
4.3.1. Retrieve Invoice:
Returns this object graph: Invoice, InvoiceLineItem, InvoiceLineItemCharge
4.3.2. Retrieve Invoice List:
Returns a paged list of Invoices. The invoices are sorted in descending order by dueDate. Either the internal CustomerId or the Customer Account Number (extCustomerRef) may be used to query for a single customer's invoices.
Defaults used if the query string parameters are missing:
status = ignored if not defined
customerId = ignored if not defined (i.e, returns a list of all customers)
extCustomerRef = ignored if not defined (i.e, returns a list of all customers)
createStartTime and createEndTime are optional params and can be used to retrieve a list of records created between the specified date range. Note that if createStartTime is specified and createEndTime is not specified, then createEndTime defaults to the current date/time
updateStartTime and updateEndTime are optional params and can be used to retrieve a list of records updated between the specified date range. Note that if updateStartTime is specified and updateEndTime is not specified, then updateEndTime defaults to the current date/time
4.3.3. Cancel Invoice:
While an Invoice cannot be deleted (for financial audit reasons), you may cancel an invoice that is in the "outstanding" status. This changes the status of the Invoice to Cancelled and reverses the invoice amount from the Customer's account balance. The REST calls for cancelling an invoice use the HTTP DELETE operation:
The invoice status must be Outstanding
If the suspendOrders parameter is set to true, then all Active Orders that are associated with the Invoice will be suspended. It defaults to false if not provided.
radio button 1 which signifies cancel the current invoice and don't make any change to underlying orders (the NextBillDate for the order line items will not change)
radio button 2 which signifies cancel the current invoice and change the underlying order(s) so that the NextBillDate is rolled back.
radio button 3 which signifies cancel the invoice and also cancel the orders as well. There will be no more invoices generated from these order(s).
4.3.4. Create Invoice:
Here we can have either customerRef or customerId in the url parameter