Hi,
I was trying to set some criterion options to my adgroup using the API, and I found that if I only need to enable one item for a specific criteria, I need to include several "NegativeAdGroupCriterion" operand in one API since it seems the default value for each item is enable. So I have to send such a request if I want to make the adgroup only targeted to Male, my request message should be like this:
{
'xsi_type': 'AdGroupCriterionOperation',
'operator': operator,
'operand': {
'xsi_type': 'NegativeAdGroupCriterion',
'adGroupId': ad_group_id,
'criterion': {
'xsi_type': 'Gender',
'id': *id for Female*,
}
}
},
{
'xsi_type': 'AdGroupCriterionOperation',
'operator': operator,
'operand': {
'xsi_type': 'NegativeAdGroupCriterion',
'adGroupId': ad_group_id,
'criterion': {
'xsi_type': 'Gender',
'id': *id for unknown*,
}
}
}
I was wondering if I use it correctly or if there is any easier way. Thanks