BETA: Please note that the current endpoints are considered beta. It is possible there may be changes before these endpoints are finalised.
Customer Lists
List Customer Lists
Get all customer lists
get /organizations/{organizationId}/customer-listsParameters
| Name | Type | In | Description |
|---|---|---|---|
organizationId | string | path | Organization ID |
after | string | query | The cursor to use for pagination. Do not use this field manually it will be automatically provided in the response headers (see Paging guide). |
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"
}
]404: not_found: Not Found response.
Create a Customer List
Creates a new customer list
post /organizations/{organizationId}/customer-listsParameters
| Name | Type | In | Description |
|---|---|---|---|
organizationId | string | path | Organization ID |
Request Body
CustomerListPayload
{
"name": "Loyal Customers"
}Responses
201: Created response.CustomerList
{
"createdAt": "2021-10-20T14:51:16Z",
"id": "01FCCGYZA9JPQ97HBSTKW0KT7P",
"memberCount": 100,
"name": "Loyal Customers"
}Get a Customer List
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.
Update a Customer List
Updates an existing customer list. Only permitted for lists created by this client.
put /organizations/{organizationId}/customer-lists/{listId}Parameters
| Name | Type | In | Description |
|---|---|---|---|
organizationId | string | path | Organization ID |
listId | string | path | The ID of the list to update |
Request Body
CustomerListPayload
{
"name": "Loyal Customers"
}Responses
200: OK response.CustomerList
{
"createdAt": "2021-10-20T14:51:16Z",
"id": "01FCCGYZA9JPQ97HBSTKW0KT7P",
"memberCount": 100,
"name": "Loyal Customers"
}404: not_found: Not Found response.
409: conflict: Conflict response.
Delete a Customer List
Delete a customer list. Only permitted for lists created by this client.
delete /organizations/{organizationId}/customer-lists/{listId}Parameters
| Name | Type | In | Description |
|---|---|---|---|
organizationId | string | path | Organization ID |
listId | string | path | List ID |
Responses
204: No Content response.
404: not_found: Not Found response.
409: conflict: Conflict response.
List Members of a Customer List
Lists all members on a customer list
get /organizations/{organizationId}/customer-lists/{listId}/membersParameters
| Name | Type | In | Description |
|---|---|---|---|
organizationId | string | path | Organization ID |
after | string | query | The cursor to use for pagination. Do not use this field manually it will be automatically provided in the response headers (see Paging guide). |
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"
},
{
"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"
}
]404: not_found: Not Found response.
Add a Member to a Customer 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.
404: not_found: Not Found response.
409: read_only: Conflict response.
Remove a Member from a Customer 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.
404: not_found: Not Found response.
409: read_only: Conflict response.
Replace Members in a Customer List
Sets the members of a list to the provided customers
put /organizations/{organizationId}/customer-lists/{listId}/membersParameters
| 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.
404: not_found: Not Found response.
409: read_only: Conflict response.
Models
CustomerList
A customer list
| 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 |
CustomerListPayload
| Name | Type | Description |
|---|---|---|
| name | string |
CustomerListSetMembersPayload
| Name | Type | Description |
|---|---|---|
| customerIds | string[] | Customer IDs. Sending an empty array will clear the list |