在v10中添加NegativeKeywordsToEntities [英] AddNegativeKeywordsToEntities in v10
问题描述
我对v10中的AddNegativeKeywordsToEntities API感到震惊.Below是我正在形成的请求,我收到了错误响应。你能告诉我出了什么问题吗?
I am struck with AddNegativeKeywordsToEntities API in v10.Below is the request I am forming and I am receiving an error response for it. Can you please tell me what is wrong?
< AddNegativeKeywordsToEntitiesRequest xmlns =" https://guideads.microsoft.com/CampaignManagement/v10" SOAP-ENC:root =" 1">
< EntityNegativeKeywords xmlns:xsi =" http://www.w3.org/2001/XMLSchema-instance">
< EntityNegativeKeyword>
< EntityId> 52623362< / EntityId>
< EntityType> Campaign< / EntityType>
< NegativeKeywords xmlns:xsi =" http://www.w3.org/2001/XMLSchema-instance">
< SharedListItem xsi:type =" NegativeKeyword">
<类型> NegativeKeyword< / Type>
< MatchType> Exact< / MatchType>
< Text> keyword1< / Text>
< / SharedListItem>
< SharedListItem xsi:type =" NegativeKeyword">
< Type> NegativeKeyword< / Type> ;
$
< MatchType>词组< / MatchType>
<文字> keyword2< /文字>
< / SharedListItem>
< / NegativeKeywords>
< / EntityNegativeKeyword>
< / EntityNegativeKeywords& gt;
$
< / AddNegativeKeywordsToEntitiesRequest>
<AddNegativeKeywordsToEntitiesRequest xmlns="https://bingads.microsoft.com/CampaignManagement/v10" SOAP-ENC:root="1">
<EntityNegativeKeywords xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<EntityNegativeKeyword>
<EntityId>52623362</EntityId>
<EntityType>Campaign</EntityType>
<NegativeKeywords xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SharedListItem xsi:type="NegativeKeyword">
<Type>NegativeKeyword</Type>
<MatchType>Exact</MatchType>
<Text>keyword1</Text>
</SharedListItem>
<SharedListItem xsi:type="NegativeKeyword">
<Type>NegativeKeyword</Type>
<MatchType>Phrase</MatchType>
<Text>keyword2</Text>
</SharedListItem>
</NegativeKeywords>
</EntityNegativeKeyword>
</EntityNegativeKeywords>
</AddNegativeKeywordsToEntitiesRequest>
回复
>< NestedPartialErrors xmlns:i =" http://www.w3.org/2001/XMLSchema-instance">< BatchErrorCollection>< BatchErrors i:nil =" true" />< Code> 1034< /代码><详情i:nil =" true" />< ErrorCode> CampaignServiceNegativeKeywordsNotPassed< / ErrorCode>< FieldPath
i:nil =" true" />< ForwardCompatibilityMap i:nil ="真" xmlns:a =" http://schemas.datacontract.org/2004/07/System.Collections.Generic" />< Index> 0< / index>< Message>传递的否定关键字为空。< / Message>< Type> BatchErrorCollection< / Type>< / BatchErrorCollection>< / NestedPartialErrors>
><NestedPartialErrors xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><BatchErrorCollection><BatchErrors i:nil="true"/><Code>1034</Code><Details i:nil="true"/><ErrorCode>CampaignServiceNegativeKeywordsNotPassed</ErrorCode><FieldPath i:nil="true"/><ForwardCompatibilityMap i:nil="true" xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic"/><Index>0</Index><Message>Negative keywords passed is null.</Message><Type>BatchErrorCollection</Type></BatchErrorCollection></NestedPartialErrors>
谢谢
推荐答案
请尝试使用NegativeKeyword而不是SharedListItem,并确保所需元素的顺序与此工作SOAP请求相同:
Please try NegativeKeyword instead of SharedListItem, and make sure the order of required elements is the same as this working SOAP request:
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ApplicationToken i:nil="true" xmlns:h="https://bingads.microsoft.com/CampaignManagement/v10" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" />
<h:AuthenticationToken xmlns:h="https://bingads.microsoft.com/CampaignManagement/v10">***</h:AuthenticationToken>
<h:CustomerAccountId xmlns:h="https://bingads.microsoft.com/CampaignManagement/v10">***</h:CustomerAccountId>
<h:CustomerId xmlns:h="https://bingads.microsoft.com/CampaignManagement/v10">***</h:CustomerId>
<h:DeveloperToken xmlns:h="https://bingads.microsoft.com/CampaignManagement/v10">***</h:DeveloperToken>
<h:Password i:nil="true" xmlns:h="https://bingads.microsoft.com/CampaignManagement/v10" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" />
<h:UserName i:nil="true" xmlns:h="https://bingads.microsoft.com/CampaignManagement/v10" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" />
</s:Header>
<s:Body>
<AddNegativeKeywordsToEntitiesRequest xmlns="https://bingads.microsoft.com/CampaignManagement/v10">
<EntityNegativeKeywords xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<EntityNegativeKeyword>
<EntityId>***</EntityId>
<EntityType>Campaign</EntityType>
<NegativeKeywords>
<NegativeKeyword>
<ForwardCompatibilityMap i:nil="true" xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Type i:nil="true" />
<Id i:nil="true" />
<MatchType>Phrase</MatchType>
<Text>auto</Text>
</NegativeKeyword>
<NegativeKeyword>
<ForwardCompatibilityMap i:nil="true" xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Type i:nil="true" />
<Id i:nil="true" />
<MatchType>Exact</MatchType>
<Text>auto</Text>
</NegativeKeyword>
</NegativeKeywords>
</EntityNegativeKeyword>
</EntityNegativeKeywords>
</AddNegativeKeywordsToEntitiesRequest>
</s:Body>
</s:Envelope>
我希望这有帮助!
这篇关于在v10中添加NegativeKeywordsToEntities的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!