Добрый день! Создаю дополнительные ссылки для групп рекламной компании, хочу ускорить процесс, поэтому хочу посылать сразу несколько дополнительных ссылок в запросе на создание. Использую только прямые запросы. Пример запроса на создание 3 дополнительных ссылок:
<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:v20="https://adwords.google.com/api/adwords/cm/v201601" xmlns:soapenv= "http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header> <v20:RequestHeader> <v20:clientCustomerId>ххх-ххх-хххх</v20:clientCustomerId> <v20:developerToken>ххххххххххххх-хххххх</v20:developerToken> <v20:userAgent>1cAdWords</v20:userAgent> <v20:validateOnly>false</v20:validateOnly> <v20:partialFailure>false</v20:partialFailure> </v20:RequestHeader> </soapenv:Header> <soapenv:Body> <v20:mutate> <v20:operations xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <v20:operator>ADD</v20:operator> <v20:operand> <v20:feedId>24098551</v20:feedId> <v20:adGroupId>22845921913</v20:adGroupId> <v20:matchingFunction> <v20:operator>IN</v20:operator> <v20:lhsOperand i:type="ns2:RequestContextOperand" xmlns:ns2= "https://adwords.google.com/api/adwords/cm/v201601"> <v20:contextType>FEED_ITEM_ID</v20:contextType> </v20:lhsOperand> <v20:rhsOperand i:type="ns2:ConstantOperand" xmlns:ns2= "https://adwords.google.com/api/adwords/cm/v201601"> <v20:type>LONG</v20:type> <v20:longValue>3733762978</v20:longValue> </v20:rhsOperand> <v20:rhsOperand i:type="ns2:ConstantOperand" xmlns:ns2= "https://adwords.google.com/api/adwords/cm/v201601"> <v20:type>LONG</v20:type> <v20:longValue>3731967914</v20:longValue> </v20:rhsOperand> </v20:matchingFunction> <v20:placeholderTypes>1</v20:placeholderTypes> <v20:status>ENABLED</v20:status> </v20:operand> </v20:operations> <v20:operations xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <v20:operator>ADD</v20:operator> <v20:operand> <v20:feedId>24098551</v20:feedId> <v20:adGroupId>22845921913</v20:adGroupId> <v20:matchingFunction> <v20:operator>IN</v20:operator> <v20:lhsOperand i:type="ns2:RequestContextOperand" xmlns:ns2= "https://adwords.google.com/api/adwords/cm/v201601"> <v20:contextType>FEED_ITEM_ID</v20:contextType> </v20:lhsOperand> <v20:rhsOperand i:type="ns2:ConstantOperand" xmlns:ns2= "https://adwords.google.com/api/adwords/cm/v201601"> <v20:type>LONG</v20:type> <v20:longValue>3733762981</v20:longValue> </v20:rhsOperand> <v20:rhsOperand i:type="ns2:ConstantOperand" xmlns:ns2= "https://adwords.google.com/api/adwords/cm/v201601"> <v20:type>LONG</v20:type> <v20:longValue>3731967914</v20:longValue> </v20:rhsOperand> </v20:matchingFunction> <v20:placeholderTypes>1</v20:placeholderTypes> <v20:status>ENABLED</v20:status> </v20:operand> </v20:operations> <v20:operations xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <v20:operator>ADD</v20:operator> <v20:operand> <v20:feedId>24098551</v20:feedId> <v20:adGroupId>22845921913</v20:adGroupId> <v20:matchingFunction> <v20:operator>IN</v20:operator> <v20:lhsOperand i:type="ns2:RequestContextOperand" xmlns:ns2= "https://adwords.google.com/api/adwords/cm/v201601"> <v20:contextType>FEED_ITEM_ID</v20:contextType> </v20:lhsOperand> <v20:rhsOperand i:type="ns2:ConstantOperand" xmlns:ns2= "https://adwords.google.com/api/adwords/cm/v201601"> <v20:type>LONG</v20:type> <v20:longValue>3733762984</v20:longValue> </v20:rhsOperand> <v20:rhsOperand i:type="ns2:ConstantOperand" xmlns:ns2= "https://adwords.google.com/api/adwords/cm/v201601"> <v20:type>LONG</v20:type> <v20:longValue>3731967914</v20:longValue> </v20:rhsOperand> </v20:matchingFunction> <v20:placeholderTypes>1</v20:placeholderTypes> <v20:status>ENABLED</v20:status> </v20:operand> </v20:operations> </v20:mutate> </soapenv:Body> </soapenv:Envelope> В ответ получаю: <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201601"> <requestId>00052e8cb51595580a0ddc86fb096a27</requestId> <serviceName>AdGroupFeedService</serviceName> <methodName>mutate</methodName> <operations>3</operations> <responseTime>88</responseTime> </ResponseHeader> </soap:Header> <soap:Body> <soap:Fault> <faultcode>soap:Server</faultcode> <faultstring>[DistinctError.DUPLICATE_ELEMENT @ operations[1].operand, DistinctError.DUPLICATE_ELEMENT @ operations[2].operand]</faultstring> <detail> <ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/cm/v201601" > <message>[DistinctError.DUPLICATE_ELEMENT @ operations[1].operand, DistinctError.DUPLICATE_ELEMENT @ operations[2].operand]</message> <ApplicationException.Type>ApiException</ApplicationException.Type> <errors xsi:type="DistinctError" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"> <fieldPath>operations[1].operand</fieldPath> <trigger/> <errorString>DistinctError.DUPLICATE_ELEMENT</errorString> <ApiError.Type>DistinctError</ApiError.Type> <reason>DUPLICATE_ELEMENT</reason> </errors> <errors xsi:type="DistinctError" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"> <fieldPath>operations[2].operand</fieldPath> <trigger/> <errorString>DistinctError.DUPLICATE_ELEMENT</errorString> <ApiError.Type>DistinctError</ApiError.Type> <reason>DUPLICATE_ELEMENT</reason> </errors> </ApiExceptionFault> </detail> </soap:Fault> </soap:Body> </soap:Envelope> Подскажите то я не так делаю? Спасибо... -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords 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 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/d910e869-efed-42f6-817e-a3c4f09d96b9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.