Retrieve, List, or Search Invoices

Use the GetInvoice, ListInvoices, and SearchInvoices endpoints in the Invoices API to retrieve a specific invoice, list invoices at a specific location, and search for invoices at a specific location.

Note

To view itemization and other order information associated with the invoice, call RetrieveOrder in the Orders API using the order_id in the invoice.

Link to section

Retrieve an invoice by ID

To retrieve an invoice by ID, call GetInvoice.

Get invoice

The following is an example response:

For information about key invoice fields, see Invoice object.

Link to section

List invoices

To list invoices, call ListInvoices and specify the required location ID. The following example uses the limit query parameter to specify a maximum page size of three results. The default page size is 100.

List invoices

The following is an excerpt of an example paged response:

If the response is paged, the response includes a cursor field. To retrieve the next page of results, include the cursor query parameter in the next ListInvoices call, as shown in the following example:

List invoices

Link to section

Search for invoices

To search for invoices at a specified location, call SearchInvoices and provide the location ID. You can optionally provide a customer ID to filter for invoices that belong to a specific customer at the specified location. If you need to get the customer ID, you can search customer profiles by phone number, email address, or other supported attribute.

The following example request filters by a customer and location. Although the location_ids and customer_ids fields are arrays, only a single customer ID and a single location ID can be specified in each filter.

Search invoices

The following is an excerpt of an example response:

The following example request filters by a specific customer and location and sorts the results in order from oldest to newest:

Search invoices

The INVOICE_SORT_DATE sort field works as follows:

  • If the invoice is a draft, the invoice created_at date is used for sorting.
  • If the invoice was published and has a scheduled_at date, the scheduled_at date is used for sorting.
  • If the invoice was published and doesn't have a scheduled_at date, the publish date is used for sorting.
Link to section

See also