New to these APIs and I've spent a day searching the conversations and 
can't understand what the fields are mis-matched in my googleAds:mutate 
campaignCriterionOperation.

I get this error if I join the campaignCriterion with "language" or 
"location", but works with things like "keyword".

Here is an example of language criterion, scoped it down to just campaign.

Endpoint:
https://googleads.googleapis.com/v17/customers/{{googAccountId}}/googleAds:mutate

Request Body:
{
"mutateOperations": [
{
"campaignBudgetOperation": {
"create": {
"resourceName": "customers/{{googAccountId}}/campaignBudgets/-1",
"deliveryMethod": "STANDARD",
"period": "DAILY",
"type": "STANDARD",
"name": "API RDA Keyword to website #6 Campaign Budget",
"amountMicros": 5000000,
"explicitlyShared": false
}
}
},
{
"campaignOperation": {
"create": {
"resourceName": "customers/{{googAccountId}}/campaigns/-2",
"status": "ENABLED",
"advertisingChannelType": "SEARCH",
"name": "API RDA Keyword to website #6 Campaign",
"campaignBudget": "customers/{{googAccountId}}/campaignBudgets/-1",
"networkSettings": {
"targetGoogleSearch": true,
"targetSearchNetwork": true,
"targetContentNetwork": false,
"targetPartnerSearchNetwork": false,
"targetYoutube": false,
"targetGoogleTvNetwork": false
},
"frequencyCaps": [
{
"key": {
"level": "AD_GROUP",
"eventType": "IMPRESSION",
"timeUnit": "DAY",
"timeLength": 1
},
"cap": 2
}
],
"paymentMode": "CLICKS",
"assetAutomationSettings": [
{
"assetAutomationType": "TEXT_ASSET_AUTOMATION",
"assetAutomationStatus": "OPTED_OUT"
}
],
"manualCpc": {
"enhancedCpcEnabled": true
}
}
}
},
{
"campaignCriterionOperation": {
"create": {
"resourceName": "customers/{{googAccountId}}/campaignCriteria/-2~-7",
"status": "ENABLED",
"campaign": "customers/{{googAccountId}}/campaigns/-2",
// "bidModifier": number,
"negative": false,
"language": {
"languageConstant": "languageConstants/1000"
}
// "location": {
// "geoTargetConstant": "geoTargetConstants/2840"
// }
// "keyword": {
// "matchType": "EXACT",
// "text": "Desk"
// }
}
}
}
]
}

Request Response:
{
"error": {
"code": 400,
"message": "Request contains an invalid argument.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": 
"type.googleapis.com/google.ads.googleads.v17.errors.GoogleAdsFailure",
"errors": [
{
"errorCode": {
"mutateError": "INCONSISTENT_FIELD_VALUES"
},
"message": "The field's contents don't match another field that represents 
the same data.",
"location": {
"fieldPathElements": [
{
"fieldName": "mutate_operations",
"index": 2
},
{
"fieldName": "campaign_criterion_operation"
},
{
"fieldName": "create"
},
{
"fieldName": "resource_name"
}
]
}
}
],
"requestId": "_bYxfOF37nzaZDeQcsNd-Q"
}
]
}
}

Thanks in advance for any insight or help

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/2c882257-c95a-4dca-a500-01d22a1ce862n%40googlegroups.com.

Reply via email to