Got error when create a new GroupCriteria

42 views
Skip to first unread message

Nguyen Mark

unread,
Sep 25, 2020, 6:14:49 AM9/25/20
to AdWords API and Google Ads API Forum
Hi There!

I have got an error when tried to creating a new Group criteria, here is the log detail.

Method Name: /google.ads.googleads.v4.services.AdGroupCriterionService/MutateAdGroupCriteria
Headers: {
    "x-goog-api-client": "gl-php\/7.4.3 gapic\/ gax\/1.3.1 grpc\/1.31.1",
    "x-goog-request-params": "customer_id=2519239778",
    "developer-token": "REDACTED",
    "login-customer-id": "2519239778"
}
Request: {"customerId":"2519239778","operations":[{"create":{"resourceName":"customers\/2519239778\/adGroupCriteria\/113833595030~-1","status":"ENABLED","listingGroup":{"type":"SUBDIVISION"}}},{"create":{"status":"ENABLED","adGroup":"customers\/2519239778\/adGroups\/113833595030","listingGroup":{"type":"UNIT","caseValue":{"productType":{"value":"quilt","level":"LEVEL1"}},"parentAdGroupCriterion":"customers\/2519239778\/adGroupCriteria\/113833595030~-1"}}},{"create":{"status":"ENABLED","adGroup":"customers\/2519239778\/adGroups\/113833595030","listingGroup":{"type":"UNIT","caseValue":{"productType":{}},"parentAdGroupCriterion":"customers\/2519239778\/adGroupCriteria\/113833595030~-1"}}}]}

Response
-------
Headers: {
    "request-id": "e4fkq2epbtF8LC0ykFgiMw",
    "date": "Fri, 25 Sep 2020 10:08:18 GMT",
    "alt-svc": "h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-27=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-T050=\":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":{"fieldError":"REQUIRED"},"message":"The required field was not present.","trigger":{"stringValue":""},"location":{"fieldPathElements":[{"fieldName":"operations","index":"2"},{"fieldName":"create"},{"fieldName":"listing_group"},{"fieldName":"case_value"},{"fieldName":"product_type"},{"fieldName":"level"}]}}]}

Plz help me to fix it.

Google Ads API Forum Advisor Prod

unread,
Sep 25, 2020, 3:22:10 PM9/25/20
to maker...@gmail.com, adwor...@googlegroups.com
Hello,

It appears you are missing the case_value. You can find more details on how to create listing groups through the API here.

Regards,
Anthony
Google Ads API Team

Google Logo
Anthony
Google Ads API Team
 
  

ref:_00D1U1174p._5004Q25WoGm:ref

Nguyen Mark

unread,
Sep 25, 2020, 11:05:08 PM9/25/20
to AdWords API and Google Ads API Forum
Thank you for respond here is my logic code



Vào lúc 02:22:10 UTC+7 ngày Thứ Bảy, 26 tháng 9, 2020, adsapiforumadvisor đã viết:

Nguyen Mark

unread,
Sep 27, 2020, 1:42:22 PM9/27/20
to AdWords API and Google Ads API Forum
Hi there

I fixed it, my logic lacks the `level` field in the "case_value" because I thought that in the other case can set equals new ProductTypeInfo().

Thank you for supported.
Vào lúc 10:05:08 UTC+7 ngày Thứ Bảy, 26 tháng 9, 2020, Nguyen Mark đã viết:
Reply all
Reply to author
Forward
0 new messages