Anchor to consentPolicyUpdateconsent
consentPolicyUpdate
mutation
Requires access scope.
Update or create consent policies in bulk.
Anchor to Arguments
Arguments
- Anchor to consentPoliciesconsent•
Policies [ConsentPolicy requiredInput!]! The consent policies to update or create. If the country and region matches an existing consent policy, then the consent policy is updated. Otherwise, a new consent policy is created.
Was this section helpful?
Anchor to ConsentPolicyUpdatePayload returnsConsentPolicyUpdatePayload returns
- Anchor to updatedPoliciesupdated•
Policies All updated and created consent policies. The consent policies that haven't been modified as part of the mutation aren't returned.
- Anchor to userErrorsuser•
Errors [ConsentPolicy non-nullError!]! The list of errors that occurred from executing the mutation.
Was this section helpful?
Mutation Reference
mutation consentPolicyUpdate($consentPolicies: [ConsentPolicyInput!]!) {
consentPolicyUpdate(consentPolicies: $consentPolicies) {
updatedPolicies {
# ConsentPolicy fields
}
userErrors {
field
message
}
}
}
Input
{
"consentPolicies": [
{
"consentRequired": true,
"countryCode": "",
"dataSaleOptOutRequired": true,
"regionCode": "<your-regionCode>"
}
]
}
{
"consentPolicies": [
{
"consentRequired": true,
"countryCode": "",
"dataSaleOptOutRequired": true,
"regionCode": "<your-regionCode>"
}
]
}
input ConsentPolicyInput {
consentRequired: Boolean
countryCode: PrivacyCountryCode
dataSaleOptOutRequired: Boolean
regionCode: String
}