Hi, I'm trying to create a display campaign with targeting, boot with 
negative at false and true in the criteria, I get this error but in the 
request seem they are set correctly

Method Name: 
/google.ads.googleads.v11.services.CampaignCriterionService/MutateCampaignCriteria
Host: googleads.googleapis.com
Headers: {
    "x-goog-api-client": "gl-php\/7.4.3 gccl\/15.1.0 gapic\/15.1.0 
gax\/1.17.0 grpc\/1.45.0 rest\/1.17.0 pb\/+n",
    "x-goog-request-params": "customer_id=5853512917",
    "developer-token": "REDACTED",
    "login-customer-id": "4424088593"
}
Request: 
{"customerId":"5853512917","operations":[{"create":{"campaign":"customers\/5853512917\/campaigns\/18538503796","type":"LOCATION","location":{"geoTargetConstant":"geoTargetConstants\/9049956"}}},{"create":{"campaign":"customers\/5853512917\/campaigns\/18538503796","type":"LANGUAGE","language":{"languageConstant":"languageConstants\/1019"}}},{"create":{"campaign":"customers\/5853512917\/campaigns\/18538503796","negative":true,"type":"AGE_RANGE","ageRange":{"type":"AGE_RANGE_18_24"}}},{"create":{"campaign":"customers\/5853512917\/campaigns\/18538503796","negative":true,"type":"AGE_RANGE","ageRange":{"type":"AGE_RANGE_25_34"}}},{"create":{"campaign":"customers\/5853512917\/campaigns\/18538503796","negative":true,"type":"AGE_RANGE","ageRange":{"type":"AGE_RANGE_35_44"}}},{"create":{"campaign":"customers\/5853512917\/campaigns\/18538503796","negative":true,"type":"AGE_RANGE","ageRange":{"type":"AGE_RANGE_55_64"}}},{"create":{"campaign":"customers\/5853512917\/campaigns\/18538503796","negative":true,"type":"AGE_RANGE","ageRange":{"type":"AGE_RANGE_65_UP"}}},{"create":{"campaign":"customers\/5853512917\/campaigns\/18538503796","negative":true,"type":"AGE_RANGE","ageRange":{"type":"AGE_RANGE_UNDETERMINED"}}},{"create":{"campaign":"customers\/5853512917\/campaigns\/18538503796","negative":false,"type":"TOPIC","topic":{"path":["Arts
 
& 
Entertainment"]}}},{"create":{"campaign":"customers\/5853512917\/campaigns\/18538503796","negative":false,"type":"PLACEMENT","placement":{"url":"https:\/\/www.qiwyrelyh.net"}}},{"create":{"campaign":"customers\/5853512917\/campaigns\/18538503796","negative":false,"type":"YOUTUBE_VIDEO","youtubeVideo":{"videoId":"ovcndxL4wik"}}},{"create":{"campaign":"customers\/5853512917\/campaigns\/18538503796","negative":false,"type":"YOUTUBE_CHANNEL","youtubeChannel":{"channelId":"UCvG51jLCVxwMEJeVHacUh9Q"}}},{"create":{"campaign":"customers\/5853512917\/campaigns\/18538503796","negative":false,"type":"MOBILE_APPLICATION","mobileApplication":{"appId":"2-com.getmimo"}}},{"create":{"campaign":"customers\/5853512917\/campaigns\/18538503796","negative":true,"type":"PARENTAL_STATUS","parentalStatus":{"type":"NOT_A_PARENT"}}},{"create":{"campaign":"customers\/5853512917\/campaigns\/18538503796","negative":true,"type":"PARENTAL_STATUS","parentalStatus":{"type":"UNDETERMINED"}}},{"create":{"campaign":"customers\/5853512917\/campaigns\/18538503796","negative":true,"type":"GENDER","gender":{"type":"FEMALE"}}},{"create":{"campaign":"customers\/5853512917\/campaigns\/18538503796","negative":true,"type":"GENDER","gender":{"type":"UNDETERMINED"}}},{"create":{"campaign":"customers\/5853512917\/campaigns\/18538503796","negative":true,"type":"INCOME_RANGE","incomeRange":{"type":"INCOME_RANGE_0_50"}}},{"create":{"campaign":"customers\/5853512917\/campaigns\/18538503796","negative":true,"type":"INCOME_RANGE","incomeRange":{"type":"INCOME_RANGE_50_60"}}},{"create":{"campaign":"customers\/5853512917\/campaigns\/18538503796","negative":true,"type":"INCOME_RANGE","incomeRange":{"type":"INCOME_RANGE_70_80"}}},{"create":{"campaign":"customers\/5853512917\/campaigns\/18538503796","negative":true,"type":"INCOME_RANGE","incomeRange":{"type":"INCOME_RANGE_80_90"}}},{"create":{"campaign":"customers\/5853512917\/campaigns\/18538503796","negative":true,"type":"INCOME_RANGE","incomeRange":{"type":"INCOME_RANGE_90_UP"}}},{"create":{"campaign":"customers\/5853512917\/campaigns\/18538503796","negative":true,"type":"INCOME_RANGE","incomeRange":{"type":"INCOME_RANGE_UNDETERMINED"}}}]}

Response
-------
Headers: {
    "request-id": "j7nIkKMQjpAqdA1dBKMB7g",
    "date": "Fri, 07 Oct 2022 08:35:28 GMT",
    "alt-svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; 
ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; 
ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; 
v=\"46,43\""
}

Fault
-------
Status code: 3
Details: Request contains an invalid argument.
Failure: 
{"errors":[{"errorCode":{"criterionError":"FIELD_INCOMPATIBLE_WITH_NEGATIVE_TARGETING"},"message":"The
 
field is not allowed to be set when the negative field is set to true, for 
example, we don't allow bids in negative ad group or campaign 
criteria.","location":{"fieldPathElements":[{"fieldName":"operations","index":8},{"fieldName":"create"},{"fieldName":"topic"}]}},{"errorCode":{"criterionError":"FIELD_INCOMPATIBLE_WITH_NEGATIVE_TARGETING"},"message":"The
 
field is not allowed to be set when the negative field is set to true, for 
example, we don't allow bids in negative ad group or campaign 
criteria.","location":{"fieldPathElements":[{"fieldName":"operations","index":9},{"fieldName":"create"},{"fieldName":"placement"}]}},{"errorCode":{"criterionError":"FIELD_INCOMPATIBLE_WITH_NEGATIVE_TARGETING"},"message":"The
 
field is not allowed to be set when the negative field is set to true, for 
example, we don't allow bids in negative ad group or campaign 
criteria.","location":{"fieldPathElements":[{"fieldName":"operations","index":10},{"fieldName":"create"},{"fieldName":"youtube_video"}]}},{"errorCode":{"criterionError":"FIELD_INCOMPATIBLE_WITH_NEGATIVE_TARGETING"},"message":"The
 
field is not allowed to be set when the negative field is set to true, for 
example, we don't allow bids in negative ad group or campaign 
criteria.","location":{"fieldPathElements":[{"fieldName":"operations","index":11},{"fieldName":"create"},{"fieldName":"youtube_channel"}]}},{"errorCode":{"criterionError":"FIELD_INCOMPATIBLE_WITH_NEGATIVE_TARGETING"},"message":"The
 
field is not allowed to be set when the negative field is set to true, for 
example, we don't allow bids in negative ad group or campaign 
criteria.","location":{"fieldPathElements":[{"fieldName":"operations","index":12},{"fieldName":"create"},{"fieldName":"mobile_application"}]}}],"requestId":"j7nIkKMQjpAqdA1dBKMB7g"}
  

THE REQUEST ID: j7nIkKMQjpAqdA1dBKMB7g
THE FAULT: Negative in Topic and Placement cannot be true

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/b988e46b-0099-4bcf-b0da-897136f400ffn%40googlegroups.com.
  • FI... Emanuele Isaia
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to