Skip to main content
A purchase invoice is a bill from a supplier. These endpoints create, amend, cancel and reactivate purchase invoices, read their lines, payments and credit note applications, and manage their notes and attached files. This area has 22 endpoints, each available in all seven SDKs.
Deleting a purchase invoice or one of its notes cannot be undone. Cancel a purchase invoice instead if you may need it again.

At a glance

Before you call

Register your API credentials once when your app starts, as shown in Authentication. Every SDK sample on these pages then gets its client in one line. With cURL, send the access token in an Authorization header: Authorization: Bearer $ACCESS_TOKEN.

Things to know

  • Every JSON write body is wrapped in purchase_invoice. The cancel and reactivate calls take an empty object; the note create and update are multipart forms.
  • A new purchase invoice is active. Cancelling sets it to inactive and reactivating sets it back to active.
  • The lines read is not a paged list. It returns purchase_invoice.lines, and one line comes back as purchase_invoice.line.
  • A line can be addressed by its id or by that id written as a UUID. For the UUID form, drop the prefix before _ and add dashes in the 8-4-4-4-12 pattern. An unknown line returns 404.
  • The credit note application read is not scoped to the invoice. Any application can be read through any purchase invoice that exists.
  • Listings page by cursor. Records are under data; pass pagination.next_cursor as cursor while pagination.has_more is true.