Condividi tramite


Operazione del servizio UpdateKeywords - Gestione campagna

Aggiornamenti le parole chiave all'interno di un gruppo di annunci specificato.

Elementi della richiesta

L'oggetto UpdateKeywordsRequest definisce il corpo e gli elementi dell'intestazione della richiesta di operazione del servizio. Gli elementi devono essere nello stesso ordine indicato nella richiesta SOAP.

Nota

Se non diversamente indicato di seguito, sono necessari tutti gli elementi della richiesta.

Elementi del corpo della richiesta

Elemento Descrizione Tipo di dati
AdGroupId Identificatore del gruppo di annunci le cui parole chiave verranno aggiornate. long
Parole chiave Matrice di oggetti Keyword che contiene le informazioni aggiornate sulla parola chiave. L'elemento Id di ognuno di questi oggetti identifica la parola chiave da aggiornare.

Questa matrice può contenere un massimo di 1.000 elementi.
Matrice di parole chiave
ReturnInheritedBidStrategyTypes Determina se il servizio deve restituire o meno il tipo di strategia di offerta ereditato dalla campagna o dal gruppo di annunci padre.

Il valore predefinito è false e l'elemento InheritedBidStrategyTypes verrà restituito solo se si imposta questo elemento true.
Boolean

Elementi dell'intestazione della richiesta

Elemento Descrizione Tipo di dati
AuthenticationToken Token di accesso OAuth che rappresenta le credenziali di un utente che dispone delle autorizzazioni per gli account Microsoft Advertising.

Per altre informazioni, vedere Autenticazione con OAuth.
Stringa
CustomerAccountId Identificatore dell'account pubblicitario proprietario o associato alle entità nella richiesta. Questo elemento di intestazione deve avere lo stesso valore dell'elemento del corpo AccountId quando sono necessari entrambi. Questo elemento è necessario per la maggior parte delle operazioni del servizio e, come procedura consigliata, è consigliabile impostarlo sempre.

Per altre informazioni, vedere Ottenere l'account e gli ID cliente.
Stringa
Customerid Identificatore dell'account manager (cliente) da cui l'utente accede o opera. Un utente può avere accesso a più account manager. Questo elemento è necessario per la maggior parte delle operazioni del servizio e, come procedura consigliata, è consigliabile impostarlo sempre.

Per altre informazioni, vedere Ottenere l'account e gli ID cliente.
Stringa
DeveloperToken Token di sviluppo usato per accedere all'API Bing Ads.

Per altre informazioni, vedere Ottenere un token per sviluppatori.
Stringa
Password Questo elemento è riservato per l'uso interno e verrà rimosso da una versione futura dell'API. È necessario usare l'elemento AuthenticationToken per impostare le credenziali utente. Stringa
UserName Questo elemento è riservato per l'uso interno e verrà rimosso da una versione futura dell'API. È necessario usare l'elemento AuthenticationToken per impostare le credenziali utente. Stringa

Elementi di risposta

L'oggetto UpdateKeywordsResponse definisce il corpo e gli elementi dell'intestazione della risposta dell'operazione del servizio. Gli elementi vengono restituiti nello stesso ordine illustrato nella soap di risposta.

Elementi del corpo della risposta

Elemento Descrizione Tipo di dati
InheritedBidStrategyTypes Il valore di ogni stringa rappresenta il tipo di schema di offerta o di strategia di offerta ereditato dalla campagna o dal gruppo di annunci padre.

Ogni stringa nell'elenco viene restituita nello stesso ordine e corrisponde alle parole chiave nel messaggio di richiesta. Se una parola chiave non eredita dal gruppo di annunci o dalla campagna, l'elemento corrispondente nell'elenco sarà nil.

Questo elemento non viene restituito per impostazione predefinita. È necessario impostare ReturnInheritedBidStrategyTypes true nella richiesta.
matrice di stringhe
PartialErrors Matrice di oggetti BatchError che contengono i dettagli per gli elementi della richiesta che non hanno avuto esito positivo.

L'elenco di errori non corrisponde direttamente all'elenco di elementi nella richiesta. L'elenco può essere vuoto se non si sono verificati errori o può includere uno o più oggetti errore corrispondenti a ogni voce di elenco non riuscita nella richiesta.
Matrice BatchError

Elementi dell'intestazione della risposta

Elemento Descrizione Tipo di dati
TrackingId Identificatore della voce di log che contiene i dettagli della chiamata API. Stringa

Richiedi SOAP

Questo modello è stato generato da uno strumento per visualizzare l'ordine degli elementi corpo e intestazione per la richiesta SOAP. Per i tipi supportati che è possibile usare con questa operazione del servizio, vedere il riferimento Request Body Elements sopra riportato.

<s:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
    <Action mustUnderstand="1">UpdateKeywords</Action>
    <AuthenticationToken i:nil="false">ValueHere</AuthenticationToken>
    <CustomerAccountId i:nil="false">ValueHere</CustomerAccountId>
    <CustomerId i:nil="false">ValueHere</CustomerId>
    <DeveloperToken i:nil="false">ValueHere</DeveloperToken>
  </s:Header>
  <s:Body>
    <UpdateKeywordsRequest xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
      <AdGroupId>ValueHere</AdGroupId>
      <Keywords i:nil="false">
        <Keyword>
          <Bid i:nil="false">
            <Amount i:nil="false">ValueHere</Amount>
          </Bid>
          <BiddingScheme i:nil="false" i:type="-- derived type specified here with the appropriate prefix --">
            <Type i:nil="false">ValueHere</Type>
            <!--This field is applicable if the derived type attribute is set to MaxClicksBiddingScheme-->
            <MaxCpc i:nil="false">
              <Amount i:nil="false">ValueHere</Amount>
            </MaxCpc>
            <!--These fields are applicable if the derived type attribute is set to MaxConversionsBiddingScheme-->
            <MaxCpc i:nil="false">
              <Amount i:nil="false">ValueHere</Amount>
            </MaxCpc>
            <TargetCpa i:nil="false">ValueHere</TargetCpa>
            <!--These fields are applicable if the derived type attribute is set to TargetCpaBiddingScheme-->
            <MaxCpc i:nil="false">
              <Amount i:nil="false">ValueHere</Amount>
            </MaxCpc>
            <TargetCpa i:nil="false">ValueHere</TargetCpa>
            <!--No additional fields are applicable if the derived type attribute is set to ManualCpcBiddingScheme-->
            <!--No additional fields are applicable if the derived type attribute is set to EnhancedCpcBiddingScheme-->
            <!--No additional fields are applicable if the derived type attribute is set to ManualCpvBiddingScheme-->
            <!--No additional fields are applicable if the derived type attribute is set to ManualCpmBiddingScheme-->
            <!--This field is applicable if the derived type attribute is set to InheritFromParentBiddingScheme-->
            <InheritedBidStrategyType i:nil="false">ValueHere</InheritedBidStrategyType>
            <!--These fields are applicable if the derived type attribute is set to TargetRoasBiddingScheme-->
            <MaxCpc i:nil="false">
              <Amount i:nil="false">ValueHere</Amount>
            </MaxCpc>
            <TargetRoas i:nil="false">ValueHere</TargetRoas>
            <!--This field is applicable if the derived type attribute is set to MaxRoasBiddingScheme-->
            <MaxCpc i:nil="false">
              <Amount i:nil="false">ValueHere</Amount>
            </MaxCpc>
            <!--This field is applicable if the derived type attribute is set to MaxConversionValueBiddingScheme-->
            <TargetRoas i:nil="false">ValueHere</TargetRoas>
            <!--These fields are applicable if the derived type attribute is set to TargetImpressionShareBiddingScheme-->
            <MaxCpc i:nil="false">
              <Amount i:nil="false">ValueHere</Amount>
            </MaxCpc>
            <TargetAdPosition i:nil="false">ValueHere</TargetAdPosition>
            <TargetImpressionShare i:nil="false">ValueHere</TargetImpressionShare>
            <!--This field is applicable if the derived type attribute is set to PercentCpcBiddingScheme-->
            <MaxPercentCpc i:nil="false">ValueHere</MaxPercentCpc>
            <!--This field is applicable if the derived type attribute is set to CommissionBiddingScheme-->
            <CommissionRate i:nil="false">ValueHere</CommissionRate>
            <!--This field is applicable if the derived type attribute is set to ManualCpaBiddingScheme-->
            <ManualCpi i:nil="false">ValueHere</ManualCpi>
            <!--This field is applicable if the derived type attribute is set to CostPerSaleBiddingScheme-->
            <TargetCostPerSale i:nil="false">ValueHere</TargetCostPerSale>
          </BiddingScheme>
          <DestinationUrl i:nil="false">ValueHere</DestinationUrl>
          <EditorialStatus i:nil="false">ValueHere</EditorialStatus>
          <FinalAppUrls i:nil="false">
            <AppUrl>
              <OsType i:nil="false">ValueHere</OsType>
              <Url i:nil="false">ValueHere</Url>
            </AppUrl>
          </FinalAppUrls>
          <FinalMobileUrls i:nil="false" xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
            <a1:string>ValueHere</a1:string>
          </FinalMobileUrls>
          <FinalUrlSuffix i:nil="false">ValueHere</FinalUrlSuffix>
          <FinalUrls i:nil="false" xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
            <a1:string>ValueHere</a1:string>
          </FinalUrls>
          <ForwardCompatibilityMap xmlns:e207="http://schemas.datacontract.org/2004/07/System.Collections.Generic" i:nil="false">
            <e207:KeyValuePairOfstringstring>
              <e207:key i:nil="false">ValueHere</e207:key>
              <e207:value i:nil="false">ValueHere</e207:value>
            </e207:KeyValuePairOfstringstring>
          </ForwardCompatibilityMap>
          <Id i:nil="false">ValueHere</Id>
          <MatchType i:nil="false">ValueHere</MatchType>
          <Param1 i:nil="false">ValueHere</Param1>
          <Param2 i:nil="false">ValueHere</Param2>
          <Param3 i:nil="false">ValueHere</Param3>
          <Status i:nil="false">ValueHere</Status>
          <Text i:nil="false">ValueHere</Text>
          <TrackingUrlTemplate i:nil="false">ValueHere</TrackingUrlTemplate>
          <UrlCustomParameters i:nil="false">
            <Parameters i:nil="false">
              <CustomParameter>
                <Key i:nil="false">ValueHere</Key>
                <Value i:nil="false">ValueHere</Value>
              </CustomParameter>
            </Parameters>
          </UrlCustomParameters>
        </Keyword>
      </Keywords>
      <ReturnInheritedBidStrategyTypes i:nil="false">ValueHere</ReturnInheritedBidStrategyTypes>
    </UpdateKeywordsRequest>
  </s:Body>
</s:Envelope>

SOAP della risposta

Questo modello è stato generato da uno strumento per visualizzare l'ordine degli elementi del corpo e dell'intestazione per la risposta SOAP.

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
    <TrackingId d3p1:nil="false" xmlns:d3p1="http://www.w3.org/2001/XMLSchema-instance">ValueHere</TrackingId>
  </s:Header>
  <s:Body>
    <UpdateKeywordsResponse xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
      <InheritedBidStrategyTypes d4p1:nil="false" xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
        <a1:string>ValueHere</a1:string>
      </InheritedBidStrategyTypes>
      <PartialErrors d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
        <BatchError d4p1:type="-- derived type specified here with the appropriate prefix --">
          <Code>ValueHere</Code>
          <Details d4p1:nil="false">ValueHere</Details>
          <ErrorCode d4p1:nil="false">ValueHere</ErrorCode>
          <FieldPath d4p1:nil="false">ValueHere</FieldPath>
          <ForwardCompatibilityMap xmlns:e208="http://schemas.datacontract.org/2004/07/System.Collections.Generic" d4p1:nil="false">
            <e208:KeyValuePairOfstringstring>
              <e208:key d4p1:nil="false">ValueHere</e208:key>
              <e208:value d4p1:nil="false">ValueHere</e208:value>
            </e208:KeyValuePairOfstringstring>
          </ForwardCompatibilityMap>
          <Index>ValueHere</Index>
          <Message d4p1:nil="false">ValueHere</Message>
          <Type d4p1:nil="false">ValueHere</Type>
          <!--These fields are applicable if the derived type attribute is set to EditorialError-->
          <Appealable d4p1:nil="false">ValueHere</Appealable>
          <DisapprovedText d4p1:nil="false">ValueHere</DisapprovedText>
          <Location d4p1:nil="false">ValueHere</Location>
          <PublisherCountry d4p1:nil="false">ValueHere</PublisherCountry>
          <ReasonCode>ValueHere</ReasonCode>
        </BatchError>
      </PartialErrors>
    </UpdateKeywordsResponse>
  </s:Body>
</s:Envelope>

Sintassi del codice

La sintassi di esempio può essere usata con gli SDK di Bing Ads. Per altri esempi, vedere Esempi di codice DELL'API Bing Ads .

public async Task<UpdateKeywordsResponse> UpdateKeywordsAsync(
	long adGroupId,
	IList<Keyword> keywords,
	bool? returnInheritedBidStrategyTypes)
{
	var request = new UpdateKeywordsRequest
	{
		AdGroupId = adGroupId,
		Keywords = keywords,
		ReturnInheritedBidStrategyTypes = returnInheritedBidStrategyTypes
	};

	return (await CampaignManagementService.CallAsync((s, r) => s.UpdateKeywordsAsync(r), request));
}
static UpdateKeywordsResponse updateKeywords(
	java.lang.Long adGroupId,
	ArrayOfKeyword keywords,
	boolean returnInheritedBidStrategyTypes) throws RemoteException, Exception
{
	UpdateKeywordsRequest request = new UpdateKeywordsRequest();

	request.setAdGroupId(adGroupId);
	request.setKeywords(keywords);
	request.setReturnInheritedBidStrategyTypes(returnInheritedBidStrategyTypes);

	return CampaignManagementService.getService().updateKeywords(request);
}
static function UpdateKeywords(
	$adGroupId,
	$keywords,
	$returnInheritedBidStrategyTypes)
{

	$GLOBALS['Proxy'] = $GLOBALS['CampaignManagementProxy'];

	$request = new UpdateKeywordsRequest();

	$request->AdGroupId = $adGroupId;
	$request->Keywords = $keywords;
	$request->ReturnInheritedBidStrategyTypes = $returnInheritedBidStrategyTypes;

	return $GLOBALS['CampaignManagementProxy']->GetService()->UpdateKeywords($request);
}
response=campaignmanagement_service.UpdateKeywords(
	AdGroupId=AdGroupId,
	Keywords=Keywords,
	ReturnInheritedBidStrategyTypes=ReturnInheritedBidStrategyTypes)

Requisiti

Servizio: CampaignManagementService.svc v13
Namespace: https://bingads.microsoft.com/CampaignManagement/v13