Skip to main content
Accounts are the customers and suppliers you bill and buy from. Here you create, read, change, cancel and delete accounts, manage their contacts, addresses, payment methods, billing preferences, notes, image and emails, and list the orders, invoices, payments and other records that belong to an account. This area has 65 endpoints, and every SDK supports all of them.
Purging an account removes it and its records permanently, and cannot be undone.

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

  • Paths take the account’s id, not its uuid. The id is a short code such as ACC0001; passing the uuid returns 404.
  • Most writes wrap their fields in one key. Account writes use account, a single address address, a contact contact, a payment method payment_method and billing preferences billing_preferences. Adding contacts takes a top-level contacts list and adding addresses a top-level addresses list. Setting a password, sending an email and uploading an image take their fields at the top level. Custom object instance writes use custom_object_instances, and notes are sent as a multipart form.
  • Contacts and payment methods are read by one value and written by another. Retrieve a contact with its slot, CONTACT_1 to CONTACT_5, and update, replace or delete it with its con_ id; a contact created as CONTACT_1 reads back with type billing. Retrieve a payment method with its reference, and update, replace or delete it with its id, as listed under payment_methods.
  • Writes are flatter than reads. currency and time_zone go in as a code and a name and read back as objects, an address is written with post_code and reads back with postal_code, and a contact’s name is written as first_name and last_name and reads back under name.
  • Many reads and most writes return the whole account under account. Note writes return the note, sending an email returns the email, and deletes return 204 with no body. The contacts, addresses, payment methods, billing preferences, inventories and partial invoice reads return the account, carrying the part asked for, rather than a paged listing.
  • Paged listings use a cursor. Records come under data with a pagination object; while has_more is true, pass pagination.next_cursor as cursor to get the next page.