setPartnerDoNotMarket
Requires permission communications:consent:update.
Marks a customer as do-not-market or clears the mark. Marketing messages are not sent to a marked customer. The customer must be in the caller's own book. Requires permission to update consent.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation SetPartnerDoNotMarket($doNotMarket: Boolean!, $partnerId: ID!) {
setPartnerDoNotMarket(doNotMarket: $doNotMarket, partnerId: $partnerId)
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation SetPartnerDoNotMarket($doNotMarket: Boolean!, $partnerId: ID!) {\n setPartnerDoNotMarket(doNotMarket: $doNotMarket, partnerId: $partnerId)\n}",
"variables": {
"doNotMarket": true,
"partnerId": "id"
}
}
EOF
Variables:
{
"doNotMarket": true,
"partnerId": "id"
}
Response:
{
"data": {
"setPartnerDoNotMarket": true
}
}
setPartnerDoNotMarket(
doNotMarket: Boolean!
partnerId: ID!
): Boolean!
Arguments
setPartnerDoNotMarket.doNotMarket ● Boolean! non-null scalar
True to stop marketing messages to the customer, false to allow them again.
setPartnerDoNotMarket.partnerId ● ID! non-null scalar
The ID of the customer.
Type
Boolean scalar
The Boolean scalar type represents true or false.