Hi,
1. I'm fetching AdGroupCriterion of some Hotel with the query:
SELECT ad_group_criterion.resource_name
FROM ad_group_criterion
WHERE ad_group_criterion.listing_group.case_value.hotel_id.value = 'bc1f979e-0d69-4363-80a1-9b3e76c52b35'
2. The query results are:
"ad_group_criterion { resource_name: "customers/1038314460/adGroupCriteria/79476509951~796560777108"}",
"ad_group_criterion { resource_name: "customers/1038314460/adGroupCriteria/79476509951~859424928717"}"
3. Now, I need to remove these resources. I try to do that with:
var op = AdGroupCriterionOperation.newBuilder.setRemove("customers/1038314460/adGroupCriteria/79476509951~859424928717").build
client.mutateAdGroupCriteria("1038314460", Collections.singletonList(op))
(all using Google Ads API client for Java, version 4.2.0)
And removal fails with error messages:
ex=[c.g.a.g.v.e.GoogleAdsException], errors {
error_code {
mutate_error: RESOURCE_NOT_FOUND
}
message: "Resource was not found."
trigger {
string_value: "CriterionId{id=859424928717}"
}
location {
field_path_elements {
field_name: "operations"
index {
}
}
field_path_elements {
field_name: "remove"
}
}
}
FAILURE REQUEST SUMMARY. Method: google.ads.googleads.v2.services.AdGroupCriterionService/MutateAdGroupCriteria, Endpoint: googleads.googleapis.com:443, CustomerID: 1038314460, RequestID: -WRXeE5g1hQCavPpJqBy0w, ResponseCode: INVALID_ARGUMENT, Fault: Request contains an invalid argument..
What am I doing wrong here?
Thanks, Linas