Customers

Customers are people who buy from the authenticated company.

Get all customers

GET /v1/companies/5678/customers Get all customers
GET /v1/companies/5678/customers ?reference_id=ABC123 Get customers by reference ID
  • If filtering by reference_id then multiple customers for the same client may share the same reference_id, so you will receive an array of customers for zero (representing no customers found) or more customers. However, the response will always be a 200 success.

Get a customer

GET /v1/companies/5678/customers/389427 Get a customer by ID
GET /v1/companies/5678/customers ?email=jmcdonald@kounta.kom Get a customer by email address
GET /v1/companies/5678/customers ?first_name=Jamie&last_name=McDonald&phone=02+8765+4321 Get a customer by first_name, last_name, and phone
  • If there is no reference_id for the customer then an empty string is returned.
  • If searching by name and phone, then all values first_name, last_name, and phone must be provided.
  • If retrieving a customer by either email, or name and phone, then the response will be a 302 redirect to the matching customer record, or 404 if not found.
  • Note: the created_at and updated_at fields are included for consistency but will always be set to the current timestamp, not the actual created or updated time, as this data is unavailable.

Create a customer

Creation of new customers is currently limited to the fields below.

POST /v1/companies/5678/customers Create a new customer
  • At a minimum, first_name and either email or phone are required.
  • reference_id is an identifier you can set that is applicable only to your application. You could use this to store a mapping to that same customer in your system. You can not see reference_id values assigned by other applications.
  • country should be specified as a two-character ISO 3166-1 country code.

Update a customer

Modification of customers is currently limited to the first_name, last_name, phone, email, tags, image, primary_address, shipping_address, reference_id and accepts_marketing.

PUT /v1/companies/5678/customers/389427 Update a customer
PUT /v1/companies/5678/customers/389427 Update a customer's address

List of Webhooks

Here is a list of the supported webhook topics.

customers/created

When a customer is created. You will receive the complete customer.

customers/updated

When a customer is updated. You will receive the complete customer after the modifications have been applied.

You also may provide the following attribute filters:

  • name - if either first_name or last_name are updated.
  • phone
  • email
  • address - if either primary_address or shipping_address are updated.
  • tags
  • image
  • accepts_marketing

customers/deleted

When a customer is deleted. You will receive the complete customer.