v3 invoices changes

In v3, there are a range of improvements and new features with invoice operations.

v2v3
Create an invoice with POST /v2/Crud/Create/Invoice.json. An existing customer is required for creating an invoice.

Email the created invoice to the customer with POST /v2/SendInvoice.json.
Creating an invoice with POST /v3/invoices combines 3 operations.
1. Create an invoice
2. In addition, you can create a customer for the invoice
3. You can email the invoice to the customer

The request and response field names have changed. Relevant fields are grouped under the customer, lineItems, and processingOptions objects.

See Invoices for more information.
Read an invoice with POST /v2/Crud/Read/Invoice.json.Get invoice details with GET /v3/invoices/{invoiceId}. invoiceId is now set as a path parameter.

See Get invoice details in the API reference for more information.
List invoices with POST /v2/List/Invoice.json.Get list of invoices with GET /v3/invoices.

Filtering and sorting values are now query parameters. For filtering, use the filters=field:op:value format . The operator values are now acronyms. For example, = is now eq and >= is now gte.

For sorting, use the sort=field:order format. For example, sort by dueDate in the ascending order with sort=dueDate:asc.

The response includes nextPage and prevPage values for you to navigate between the pages of results.

See Search operations with lists for more information.
Update an invoice with POST /v2/Crud/Update/Invoice.json.Replace an invoice with PUT /v3/invoices/{invoiceId}. This is a PUT operation and invoiceId is now set as a path parameter.

The request and response field names have changed. Use the v3 PUT operation to add, remove, or replace the number of line items in an invoice. You can also update other invoice details.

Update an invoice with PATCH /v3/invoices/{invoiceId}. This is a PATCH operation and invoiceId is now set as a path parameter.

The request and response field names have changed. Use the v3 PATCH operation to modify existing line item details, such as amount, quantity, and description. You can also update other invoice details.

See Replace an invoice and Update an invoice in the API reference for more information.
Delete an invoice with POST /v2/Crud/Delete/Invoice.jsonArchive an invoice with POST /v3/invoices/{invoiceId}/archive. invoiceId is now set as a path parameter.

In the response, isActive is now archived. The archived field is boolean.

See Archive an invoice in the API reference for more information.
Undelete an invoice with POST /v2/Crud/Undelete/Invoice.json.Restore an invoice with POST /v3/invoices/{invoiceId}/restore. invoiceId is now set as a path parameter.

In the response, isActive is now archived. The archived field is boolean.

See Restore an archived invoice in the API reference for more information.