Hi ,
I am using Google Ads REST API i am not using the client libraries.
i can add the request that i have done with code and response as well.
I am trying to create assetGroupListingFilters the concern is to create
pmax campaign retail for selective products but getting the error :
*Request :*
$customer_id =
isset($postData['customer_id'])?$postData['customer_id']:"";
$header = array( "content-type: application/json",
"Authorization: Bearer ".$access_token,
"developer-token:".$this->credentials['web']['developer_token']);
$url =
$this->ads_api_url.'/customers/'.$customer_id.'/assetGroupListingGroupFilters:mutate';
$data = array(
"operations" => array(
"create" => array(
"vertical" => "SHOPPING",
"assetGroup" => $resource_name_asset_groups,
"resourceName" => "",
"type"=> "UNIT_INCLUDED",
"caseValue" => array("productItemId" => array('value' =>
"xxxxxx")),
),
),
"validateOnly" => false,
"responseContentType"=> "MUTABLE_RESOURCE"
);
$ch = curl_init();
curl_setopt_array($ch, array(
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 0,
CURLOPT_HTTPHEADER => $header,
CURLOPT_POST => 1,
CURLOPT_POSTFIELDS => json_encode($data)
));
$response = curl_exec($ch);
$response = json_decode($response);
echo "asset Group filter obj";
dd($response);
Getting error below :
+"@type": "
type.googleapis.com/google.ads.googleads.v12.errors.GoogleAdsFailure" +"
errors": array:1 [ 0 => {#737 +"errorCode": {#736 +"fieldError": "REQUIRED"
} +"message": "The required field was not present." +"location": {#741 +"
fieldPathElements": array:3 [ 0 => {#738 +"fieldName": "operations" +"index":
0 } 1 => {#739 +"fieldName": "create" } 2 => {#740 +"fieldName": "
parent_listing_group_filter" }
On Friday, August 4, 2023 at 7:02:01 PM UTC+5:30 Google Ads API Forum
Advisor wrote:
> Hi,
>
> Thank you for reaching out to Google Ads API Forum.
>
> In order for us to investigate further the issue you are encountering, can
> you provide us with the complete API logs (*request* and *response* with
> *request-id *and *request header)* generated on your end when you
> encountered the issue? This is so we can check on our end as well and
> provide more appropriate guidance accordingly.
>
> For the client libraries, logging can be enabled by navigating to the
> Client libraries > Your client library (ex Java) > Logging documentation,
> which you can access from this *link *(
> *https://developers.google.com/google-ads/api/docs/client-libs*
> <https://developers.google.com/google-ads/api/docs/client-libs>). You can
> provide it via the Reply privately to author option. If this option is not
> available, then send it instead on this email address
> [email protected] <https://groups.google.com/>.
>
> You may also refer to this guide (
> *https://developers.google.com/google-ads/api/docs/performance-max/listing-groups*
>
> <https://developers.google.com/google-ads/api/docs/performance-max/listing-groups>)
>
> for *Creating Shopping Listing Groups*. Included in this guide is a code
> example that shows how to add product partitions to a Performance Max
> retail campaign.
>
> Reference links included in this email:
>
> - request:
>
> *https://developers.google.com/google-ads/api/docs/concepts/field-service?hl=en#request*
>
>
> <https://developers.google.com/google-ads/api/docs/concepts/field-service?hl=en#request>
>
> - response:
>
> *https://developers.google.com/google-ads/api/docs/concepts/field-service?hl=en#response*
>
>
> <https://developers.google.com/google-ads/api/docs/concepts/field-service?hl=en#response>
>
> - request-id:
>
> *https://developers.google.com/google-ads/api/docs/concepts/call-structure?hl=en#request-id*
>
>
> <https://developers.google.com/google-ads/api/docs/concepts/call-structure?hl=en#request-id>
>
> - request header -
>
> *https://developers.google.com/google-ads/api/docs/concepts/call-structure#request_headers*
>
>
> <https://developers.google.com/google-ads/api/docs/concepts/call-structure#request_headers>
>
>
>
> This message is in relation to case "ref:_00D1U1174p._5004Q2nazXG:ref"
>
> Thanks,
>
> [image: Google Logo] Google Ads API Team
>
>
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/ce83f661-e928-4fb5-8645-b27db8363d4dn%40googlegroups.com.