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
Name | Type | In | Description |
---|---|---|---|
organizationId | string | path | Organization ID |
listId | string | path | List 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
Name | Type | In | Description |
---|---|---|---|
organizationId | string | path | Organization ID |
after | string | query |
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
Name | Type | In | Description |
---|---|---|---|
organizationId | string | path | Organization ID |
after | string | query | |
listId | string | path | List 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
Name | Type | In | Description |
---|---|---|---|
organizationId | string | path | Organization ID |
listId | string | path | List ID |
customerId | string | path | ID 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
Name | Type | In | Description |
---|---|---|---|
organizationId | string | path | Organization ID |
listId | string | path | List ID |
customerId | string | path | ID 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
Name | Type | In | Description |
---|---|---|---|
organizationId | string | path | Organization ID |
listId | string | path | List ID |
Request Body
CustomerListSetMembersPayload
{
"customerIds": [
"01FCCGYZA9JPQ97HBSTKW0KT7P",
"01FCCGYZA9JPQ97HBSTKW0KT7Q"
]
}
Responses
204: No Content response.
Models
CustomerList
Name | Type | Description |
---|---|---|
id | string | Unique ID of the customer list |
name | string | The name of the customer list |
createdAt | string | The date and time that the customer list was created |
memberCount | integer | (optional) The number of customers currently on the customer list |
CustomerListMember
Name | Type | Description |
---|---|---|
id | string | Unique ID of the Customer |
addedAt | string | (optional) The date that the customer was added as a member of the list |
string | (optional) The Customers email address | |
firstName | string | Customer first name or given name |
lastName | string | Customer last name or surname |
phoneNumber | string | (optional) The Customers mobile phone number |
CustomerListSetMembersPayload
Name | Type | Description |
---|---|---|
customerIds | string[] | Customer IDs. Sending an empty array will clear the list |