BETA: Please note that the current endpoints are considered beta. It is possible there may be changes before these endpoints are finalised.

Customer Lists

Get the details of a list by id

Get a customer list

get /organizations/{organizationId}/customer-lists/{listId}

Parameters

NameTypeInDescription
organizationIdstringpathOrganization ID
listIdstringpathList ID

Responses

200: OK response.CustomerList
{
  "createdAt": "2021-10-20T14:51:16Z",
  "id": "01FCCGYZA9JPQ97HBSTKW0KT7P",
  "memberCount": 100,
  "name": "Loyal Customers"
}
404: not_found: Not Found response.

Show a list of all customer lists

Get all customer lists

get /organizations/{organizationId}/customer-lists

Parameters

NameTypeInDescription
organizationIdstringpathOrganization ID
afterstringquery

Responses

200: OK response.CustomerList[]
[
  {
    "createdAt": "2021-10-20T14:51:16Z",
    "id": "01FCCGYZA9JPQ97HBSTKW0KT7P",
    "memberCount": 100,
    "name": "Loyal Customers"
  },
  {
    "createdAt": "2021-10-20T14:51:16Z",
    "id": "01FCCGYZA9JPQ97HBSTKW0KT7P",
    "memberCount": 100,
    "name": "Loyal Customers"
  }
]

Show all members on a specific list

Lists all members on a customer list

get /organizations/{organizationId}/customer-lists/{listId}/members

Parameters

NameTypeInDescription
organizationIdstringpathOrganization ID
afterstringquery
listIdstringpathList ID

Responses

200: OK response.CustomerListMember[]
[
  {
    "addedAt": "2020-10-20T15:32:16Z",
    "email": "john@example.com",
    "firstName": "John",
    "id": "01FCCGYZA9JPQ97HBSTKW0KT7P",
    "lastName": "Smith",
    "phoneNumber": "+61411222333"
  },
  {
    "addedAt": "2020-10-20T15:32:16Z",
    "email": "john@example.com",
    "firstName": "John",
    "id": "01FCCGYZA9JPQ97HBSTKW0KT7P",
    "lastName": "Smith",
    "phoneNumber": "+61411222333"
  }
]

Add a member to a list

Adds a member to a list

put /organizations/{organizationId}/customer-lists/{listId}/members/{customerId}

Parameters

NameTypeInDescription
organizationIdstringpathOrganization ID
listIdstringpathList ID
customerIdstringpathID of customer to add to list

Responses

204: No Content response.

Remove a member from a list

Removes a member to a list

delete /organizations/{organizationId}/customer-lists/{listId}/members/{customerId}

Parameters

NameTypeInDescription
organizationIdstringpathOrganization ID
listIdstringpathList ID
customerIdstringpathID of customer to remove from list

Responses

204: No Content response.

Set the members of a list

Sets the members of a list to the provided customers

put /organizations/{organizationId}/customer-lists/{listId}/members

Parameters

NameTypeInDescription
organizationIdstringpathOrganization ID
listIdstringpathList ID

Request Body

CustomerListSetMembersPayload
{
  "customerIds": [
    "01FCCGYZA9JPQ97HBSTKW0KT7P",
    "01FCCGYZA9JPQ97HBSTKW0KT7Q"
  ]
}

Responses

204: No Content response.

Models

CustomerList

NameTypeDescription
idstring Unique ID of the customer list
namestring The name of the customer list
createdAtstring The date and time that the customer list was created
memberCountinteger(optional) The number of customers currently on the customer list

CustomerListMember

NameTypeDescription
idstring Unique ID of the Customer
addedAtstring(optional) The date that the customer was added as a member of the list
emailstring(optional) The Customers email address
firstNamestring Customer first name or given name
lastNamestring Customer last name or surname
phoneNumberstring(optional) The Customers mobile phone number

CustomerListSetMembersPayload

NameTypeDescription
customerIdsstring[] Customer IDs. Sending an empty array will clear the list

In this article