listAddBuyers Mutation
Description
Adds buyers to a customer list. If listRef is provided, buyers are added to that existing list. If listTitle is provided and listRef is not, a new customer list is created with that title and buyers are added to it. If neither listRef nor listTitle is provided, an error is returned. The list member count is automatically updated after adding buyers.
mutation listAddBuyers($listRef: ID, $listTitle: String, $userRefs: [ID!]!) {
listAddBuyers(listRef: $listRef, listTitle: $listTitle, userRefs: $userRefs) {
_id
id
title
description
created
count
system
}
}
Variables
{
"listRef": "a81f4cd349a427b96249f0a3",
"listTitle": "listTitle",
"userRefs": [
"4cd53ddfa09515507fdc0502"
]
}
Response
{
"listAddBuyers": {
"_id": "7ae302147c54b136b375f7a3",
"id": 4114894798387,
"title": "example",
"description": "example",
"created": 1704926642014,
"count": 10,
"system": true
}
}
Arguments
| Name | Type | Description |
|---|---|---|
listRef | ID | Reference ID of the customer list to add buyers to. If not provided, a new list will be created using listTitle. |
listTitle | String | Title for a new customer list to create if listRef is not provided. |
userRefs | [ID!]! | List of buyer reference IDs to add to the customer list. |
Returns
List!