Missing partial_failure option in AssetGroupService

2022-09-21 Thread Vincent Falduto
Hi, 

Do you know why *partial_failure *option is missing from 
MutateAssetGroupsRequest ? 
Most mutate services have it, like MutateAdGroupsRequest.

https://developers.google.com/google-ads/api/reference/rpc/v11/MutateAssetGroupsRequest

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/410c273e-796a-47e8-af13-7f6e8b102d64n%40googlegroups.com.


Re: Missing PolicyFindingError details in BatchJobResult

2021-11-29 Thread Vincent Falduto
You can found an exemple in the attachment. 

Le mardi 23 novembre 2021 à 21:10:49 UTC+1, adsapi a écrit :

> Hi Vincent,
>
> Thanks for reaching out. Can you please provide us with the complete 
> request and response for each call so we can have a closer look?
>
> Thanks,
> Matt
> Google Ads API Team
>
>
> Reminder: Share your feedback about the Google Ads (AdWords) API! Take the 
> 2021 
> Google Ads API and AdWords API Annual Survey 
> 
>   
> [image: Google Logo] 
> Matt 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2RvX87:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"AdWords API and Google Ads 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/950b600b-eaa0-4193-8518-8a65130c7c74n%40googlegroups.com.
fromFile()
	->withOAuth2Credential($oAuth2Credential)
	->build();

$customerId = 'your-customer-id';
$adGroupId = 'your-ad_group-id';

$expandedTextAdInfo = new ExpandedTextAdInfo([
	'headline_part1' => 'Cruise to Mars ((( ...(((',
	'headline_part2' => 'Best Space Cruise Line',
	'description' => 'Buy your tickets now!'
]);

$ad = new Ad([
	'expanded_text_ad' => $expandedTextAdInfo,
	'final_urls' => ['http://www.example.com']
]);

$adGroupAd = new AdGroupAd([
	'ad_group' => ResourceNames::forAdGroup($customerId, $adGroupId),
	'status' => AdGroupAdStatus::PAUSED,
	'ad' => $ad
]);

$adGroupAdOperation = new AdGroupAdOperation();
$adGroupAdOperation->setCreate($adGroupAd);
$operations[] = $adGroupAdOperation;

// test with mutate
$adGroupAdServiceClient = $googleAdsClient->getAdGroupAdServiceClient();
$response = $adGroupAdServiceClient->mutateAdGroupAds($customerId, $operations);

$result = $response->serializeToJsonString();
// result contains policyEvidence !

// test with Batch
$batchJobServiceClient = $googleAdsClient->getBatchJobServiceClient();

$batchJobOperation = new BatchJobOperation();
$batchJobOperation->setCreate(new BatchJob());

$batchJobResourceName = $batchJobServiceClient->mutateBatchJob($customerId, $batchJobOperation);
$response = $batchJobServiceClient->addBatchJobOperations($batchJobResourceName, $operations);

$operationResponse = $batchJobServiceClient->runBatchJob($batchJobResourceName);
$operationResponse->pollUntilComplete([
	'initialPollDelayMillis' => 1000,
	'totalPollTimeoutMillis' => 6
]);

$batchJobResults = $batchJobServiceClient->listBatchJobResults($batchJobResourceName, ['pageSize' => 1000]);
foreach($batchJobResults->iterateAllElements() as $operationIndex => $batchJobResult) {
	$result = $batchJobResult->getMutateOperationResponse()->serializeToJsonString();
	$apiErrors = GoogleAdsErrors::fromStatus($operationIndex, $batchJobResult->getStatus());

	// result and $apiErrors DO NOT contains policyEvidence !
}

Missing PolicyFindingError details in BatchJobResult

2021-11-23 Thread Vincent Falduto
Hi, 

I have an issue with BatchJob from V8/V9 Google Ads API. 
When I read / serialize error from Ads. I don't have consistent result 
between Mutate and Batch operation.

The batch operation missing the *policyFindingDetails *part. See below 


Mutate call 
{
"errorCode": {
"policyFindingError": "POLICY_FINDING"
},
"message": "The resource has been disapproved since the policy summary 
includes policy topics of type PROHIBITED.",
"location": {
"fieldPathElements": [
{
"fieldName": "mutate_operations",
"index": 1575
},
{
"fieldName": "ad_group_ad_operation"
},
{
"fieldName": "create"
},
{
"fieldName": "ad"
}
]
}
}

Batch call 
{
"errorCode": {
"policyFindingError": "POLICY_FINDING"
},
"message": "The resource has been disapproved since the policy summary 
includes policy topics of type PROHIBITED.",
"location": {
"fieldPathElements": [
{
"fieldName": "mutate_operations",
"index": 0
},
{
"fieldName": "ad_group_ad_operation"
},
{
"fieldName": "create"
},
{
"fieldName": "ad"
}
]
},
"details": {
"policyFindingDetails": {
"policyTopicEntries": [
{
"topic": "SYMBOLS",
"type": "PROHIBITED",
"evidences": [
{
"textList": {
"texts": [
"("
]
}
}
]
}
]
}
}
}

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"AdWords API and Google Ads 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/5e5a6883-fb1d-447a-8859-11ad7e1e14e1n%40googlegroups.com.