Hi Luis,

Thank you for your time and your answer. I found my problem.
I based my operation on the answer receive by a get on API.
"criterion": {
  "Criterion.Type": "InteractionType", # This line was not good. I should 
write "xsi_type": "InteractionType"
  "id": 8000,
  "type": "INTERACTION_TYPE"
},

Regards,


Wilfried


On Thursday, August 30, 2018 at 11:25:40 PM UTC-4, Luis Xander Talag 
(AdWords API Team) wrote:
>
> Hi Wilfried,
>
> Thank you for providing detailed information of your issue. Upon 
> investigating and based on your SOAP request, you did not explicitly use or 
> indicate the type of criterion which is the InteractionType 
> <https://developers.google.com/adwords/api/docs/reference/v201806/CampaignBidModifierService.InteractionType>
>  which 
> may have caused the InternalApiError.UNEXPECTED_INTERNAL_API_ERROR error. 
> You may refer to below SOAP request for your reference.
>
>         <mutate xmlns="https://adwords.google.com/api/adwords/cm/v201806";>
>             <operations>
>                 <operator>SET</operator>
>                 <operand>
>                     <campaignId>1535056550</campaignId>
>                     <criterion xmlns:ns2="
> https://adwords.google.com/api/adwords/cm/v201806"; 
> xsi:type="ns2:InteractionType">
>                         <ns2:id>8000</ns2:id>
>                         <ns2:type>INTERACTION_TYPE</ns2:type>
>                     </criterion>
>                     <bidModifier>2.5</bidModifier>
>                 </operand>
>             </operations>
>         </mutate>
>
>
> Let me know if it works.
>
> Regards,
> Luis
> AdWords API Team 
>
> On Friday, August 31, 2018 at 2:21:17 AM UTC+8, wtemmerman wrote:
>>
>> Here my SOAP content :
>>
>> <soap-env:Envelope xmlns:soap-env="
>> http://schemas.xmlsoap.org/soap/envelope/";>
>>   <soap-env:Header>
>>     <ns0:RequestHeader xmlns:ns0="
>> https://adwords.google.com/api/adwords/cm/v201802";>
>>       <ns0:clientCustomerId>476-128-0144</ns0:clientCustomerId>
>>       <ns0:developerToken>REDACTED</ns0:developerToken>
>>       <ns0:userAgent>Ads Python Client Library (AwApi-Python, 
>> googleads/11.0.1, Python/3.5.2, zeep)</ns0:userAgent>
>>       <ns0:validateOnly>false</ns0:validateOnly>
>>       <ns0:partialFailure>false</ns0:partialFailure>
>>     </ns0:RequestHeader>
>>   </soap-env:Header>
>>   <soap-env:Body>
>>     <ns0:mutate xmlns:ns0="
>> https://adwords.google.com/api/adwords/cm/v201802";>
>>       <ns0:operations>
>>         <ns0:operator>SET</ns0:operator>
>>         <ns0:operand>
>>           <ns0:campaignId>1535056550</ns0:campaignId>
>>           <ns0:criterion>
>>             <ns0:id>8000</ns0:id>
>>             <ns0:type>INTERACTION_TYPE</ns0:type>
>>             <ns0:Criterion.Type>InteractionType</ns0:Criterion.Type>
>>           </ns0:criterion>
>>           <ns0:bidModifier>2.5</ns0:bidModifier>
>>         </ns0:operand>
>>       </ns0:operations>
>>     </ns0:mutate>
>>   </soap-env:Body>
>> </soap-env:Envelope>
>>
>>
>>
>> On Thursday, August 30, 2018 at 1:40:13 PM UTC-4, 
>> wtemm...@cyberpublicity.com wrote:
>>>
>>> Hi Luis,
>>>
>>> Some update, I was trying to use batchJobService with this service. But 
>>> BatchJobService doesn't support CampaignBidModifier.
>>> So I tried to update a campaign call bid adjustment without batchjob but 
>>> I have a InternalApiError.UNEXPECTED_INTERNAL_API_ERROR.
>>>
>>> Here my operation :
>>> [
>>>     {
>>>         "xsi_type": "CampaignBidModifierOperation",
>>>         "operator": "SET"
>>>         "operand": {
>>>             "campaignId": 1535056550,
>>>             "criterion": {
>>>                 "Criterion.Type": "InteractionType",
>>>                 "id": 8000,
>>>                 "type": "INTERACTION_TYPE"
>>>             },
>>>             "bidModifier": 2.5,
>>>             "xsi_type": "CampaignBidModifier"
>>>         },
>>>     }
>>> ]
>>>
>>> And stack with error :
>>> INFO 2018-08-30 13:37:18,365 util 16101 139867432646400 Request made: 
>>> Service: "CampaignBidModifierService" Method: "mutate" URL: "
>>> https://adwords.google.com/api/adwords/cm/v201802/CampaignBidModifierService
>>> "
>>> WARNING 2018-08-30 13:37:18,963 util 16101 139867432646400 Error 
>>> summary: 
>>> {
>>>     "operations": "0",
>>>     "methodName": "mutate",
>>>     "faultMessage": "[InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ 
>>> com.google.ads.api.services.common.error.InternalApiError.<init>(InternalApiErro]",
>>>     "requestId": "000574aa86ccbfc80a3773c6d7042898",
>>>     "serviceName": 
>>> "campaign_bid_modifier_service.CampaignBidModifierService",
>>>     "responseTime": "558"
>>> }
>>> [InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ 
>>> com.google.ads.api.services.common.error.InternalApiError.<init>(InternalApiErro]
>>>
>>> Do you have any idea why I have go an InternalApiError ?
>>>
>>> On Thursday, August 30, 2018 at 8:10:32 AM UTC-4, 
>>> wtemm...@cyberpublicity.com wrote:
>>>>
>>>> Hi Luis,
>>>>
>>>> To keep this POST update, here the link of issue on github : 
>>>> https://github.com/googleads/googleads-python-lib/issues/320
>>>>
>>>> Regards,
>>>>
>>>> Wilfried
>>>>
>>>> On Thursday, August 30, 2018 at 1:31:34 AM UTC-4, Luis Xander Talag 
>>>> (AdWords API Team) wrote:
>>>>>
>>>>> Hi Wilfried,
>>>>>
>>>>> If you successfully downloaded and installed the Python client 
>>>>> library, you should be able to see the operation as it is possible to 
>>>>> adjust bid through the API. This being said, the possible issue here is 
>>>>> specific to the Python client library rather than the AdWords API. I 
>>>>> would 
>>>>> suggest to post your issue here 
>>>>> <https://github.com/googleads/googleads-python-lib/issues> as the 
>>>>> client library owners are better equipped to assist you.
>>>>>
>>>>> Thanks and regards,
>>>>> Luis
>>>>> AdWords API Team
>>>>>
>>>>> On Thursday, August 30, 2018 at 5:23:05 AM UTC+8, wtemmerman wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I tried to create a call bid adjustment with the API. So after 
>>>>>> reading the Adwords API and analyze data return by Adwords API.
>>>>>> The problem is : 
>>>>>>
>>>>>> I create my add operation but the CampaignBidModifierService 
>>>>>> <https://developers.google.com/adwords/api/docs/reference/v201802/CampaignBidModifierService>
>>>>>>  doesn't 
>>>>>> have his CampaignBidModifierOperation present in _OPERATION_MAP (line 
>>>>>> 641) 
>>>>>> of googleads/adwords.py 
>>>>>> <https://github.com/googleads/googleads-python-lib/blob/master/googleads/adwords.py>
>>>>>> . 
>>>>>>
>>>>>> So that raise a KeyError.
>>>>>>
>>>>>>
>>>>>> Stack error : 
>>>>>>
>>>>>>> ~/projects/tool/lib/python3.5/site-packages/googleads/adwords.py in 
>>>>>>> _GenerateRawRequestXML(self, operations)
>>>>>>
>>>>>>     891         KeyError: If the given operation type is not 
>>>>>>> supported.
>>>>>>
>>>>>>     892       """
>>>>>>
>>>>>> --> 893       operation = 
>>>>>>> self._OPERATION_MAP[operations[0]['xsi_type']]
>>>>>>
>>>>>>     894       service = self.client.GetService(operation.service, 
>>>>>>> self._version)
>>>>>>
>>>>>>     895       return service.GetRequestXML(operation.method, 
>>>>>>> operations)
>>>>>>
>>>>>>
>>>>>>> KeyError: 'CampaignBidModifierOperation'
>>>>>>
>>>>>>
>>>>>> Do you have an idea why this operation is not present in 
>>>>>> _OPERATION_MAP ?
>>>>>> And is it possible to create a call bid adjustement with API ? (it's 
>>>>>> possible by Google Ads website)
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Wilfried
>>>>>>
>>>>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/bd11339a-8cad-463a-aa49-b21869af8c27%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • ... wtemmerman
    • ... 'Luis Xander Talag (AdWords API Team)' via AdWords API and Google Ads API Forum
      • ... wtemmerman
        • ... wtemmerman
          • ... wtemmerman
            • ... 'Luis Xander Talag (AdWords API Team)' via AdWords API and Google Ads API Forum
              • ... wtemmerman

Reply via email to