Click to Rate and Give Feedback

  Switch on low bandwidth view
Microsoft Advertising APIs
CampaignManagement UpdateKeywords Service Operation

Updates the keywords within a specified ad group.

<wsdl:operation name="UpdateKeywords">
  <soap:operation soapAction="UpdateKeywords" style="document" />
  <wsdl:input name="UpdateKeywordsRequest">
    <soap:header message="tns:UpdateKeywordsRequest_Headers" part="ApplicationToken" use="literal" />
    <soap:header message="tns:UpdateKeywordsRequest_Headers" part="CustomerAccountId" use="literal" />
    <soap:header message="tns:UpdateKeywordsRequest_Headers" part="CustomerId" use="literal" />
    <soap:header message="tns:UpdateKeywordsRequest_Headers" part="DeveloperToken" use="literal" />
    <soap:header message="tns:UpdateKeywordsRequest_Headers" part="Password" use="literal" />
    <soap:header message="tns:UpdateKeywordsRequest_Headers" part="UserName" use="literal" />
    <soap:body use="literal" />
  </wsdl:input>
  <wsdl:output name="UpdateKeywordsResponse">
    <soap:header message="tns:UpdateKeywordsResponse_Headers" part="TrackingId" use="literal" />
    <soap:body use="literal" />
  </wsdl:output>
  <wsdl:fault name="AdApiFaultDetailFault">
    <soap:fault use="literal" name="AdApiFaultDetailFault" namespace="" />
  </wsdl:fault>
  <wsdl:fault name="EditorialApiFaultDetailFault">
    <soap:fault use="literal" name="EditorialApiFaultDetailFault" namespace="" />
  </wsdl:fault>
</wsdl:operation>

An UpdateKeywordsRequest object that contains the header and parameter information for the service operation.

An UpdateKeywordsResponse object that contains the response information for the service request.

If a Microsoft adCenter API error occurs, a FaultException exception is thrown. It contains one of the following objects:

For more information about fault detail objects, see Microsoft adCenter API Error Handling. For a list of campaign-management–specific error codes, see Campaign Management Error Codes. For a list of generic error codes, see Common Error Codes.

The following is a fictitious example of an UpdateKeywords request.

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header>
    <h:ApplicationToken xmlns:h="https://adcenter.microsoft.com/v6">apptoken</h:ApplicationToken>
    <h:CustomerAccountId xmlns:h="https://adcenter.microsoft.com/v6">customeraccountid</h:CustomerAccountId>
    <h:CustomerId xmlns:h="https://adcenter.microsoft.com/v6">customerid</h:CustomerId>
    <h:DeveloperToken xmlns:h="https://adcenter.microsoft.com/v6">devtoken</h:DeveloperToken>
    <h:Password xmlns:h="https://adcenter.microsoft.com/v6">password</h:Password>
    <h:UserName xmlns:h="https://adcenter.microsoft.com/v6">username</h:UserName>
  </s:Header>
  <s:Body>
    <UpdateKeywordsRequest xmlns="https://adcenter.microsoft.com/v6">
      <AdGroupId>123456</AdGroupId>
      <Keywords xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <Keyword>
          <BroadMatchBid>
            <Amount>8.2</Amount>
          </BroadMatchBid>
          <CashBackInfo i:nil="true"/>
          <CashBackPriority i:nil="true"/>
          <ContentMatchBid i:nil="true"/>
          <EditorialStatus i:nil="true"/>
          <ExactMatchBid>
            <Amount>10</Amount>
          </ExactMatchBid>
          <Id>1234</Id>
          <NegativeKeywords i:nil="true" xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
          <Param1 i:nil="true"/>
          <Param2 i:nil="true"/>
          <Param3 i:nil="true"/>
          <PhraseMatchBid i:nil="true"/>
          <Status i:nil="true"/>
          <Text i:nil="true"/>
        </Keyword>
        <Keyword>
          <BroadMatchBid i:nil="true"/>
          <CashBackInfo>
            <CashBackAmount>125</CashBackAmount>
            <CashBackStatus>Enable</CashBackStatus>
            <CashBackText>Earn a rebate with your purchase</CashBackText>
          </CashBackInfo>
          <CashBackPriority>KeywordEnable</CashBackPriority>
          <ContentMatchBid i:nil="true"/>
          <EditorialStatus i:nil="true"/>
          <ExactMatchBid i:nil="true"/>
          <Id>5678</Id>
          <NegativeKeywords xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
            <a:string>latex</a:string>
            <a:string>boxing</a:string>
            <a:string>softball</a:string>
            <a:string>baseball</a:string>
          </NegativeKeywords>
          <Param1 i:nil="true"/>
          <Param2 i:nil="true"/>
          <Param3>Param 3</Param3>
          <PhraseMatchBid>
            <Amount>16.2</Amount>
          </PhraseMatchBid>
          <Status i:nil="true"/>
          <Text i:nil="true"/>
        </Keyword>
      </Keywords>
    </UpdateKeywordsRequest>
  </s:Body>
</s:Envelope>

Set the elements of the Keyword objects in the keywords array to the new values, and then set all the elements to null that should not be updated.

The ExactMatchBid, BroadMatchBid, PhraseMatchBid, ContentMatchBid, and NegativeKeywords elements can be changed without causing the keyword to go through editorial review. However, any change to the Param1, Param2, or Param3 element causes the keyword to go through editorial review.

To update only the bid amounts for a keyword, set the Keyword.ExactMatchBid, Keyword.BroadMatchBid, Keyword.PhraseMatchBid, and/or Keyword.ContentMatchBid elements to the new bid amounts. If there are bids that should not be updated, set to null their corresponding elements.

To remove an existing bid match type, set to zero (not null) the corresponding bid amount element, and then call the UpdateKeywords service operation. For example, to remove the phrase match type, set Keyword.PhraseMatchBid to zero, and then call the UpdateKeywords service operation.

Because this service operation uses arrays, we recommend that you read the Quotas in Microsoft adCenter topic before you use this service operation. Arrays can consume a large percentage of your allocated quota.

WSDL: CampaignManagementService.svc in version 6.

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker