Condividi tramite


Operazione del servizio GetCustomer - Gestione clienti

Ottiene i dettagli di un cliente.

Elementi della richiesta

L'oggetto GetCustomerRequest 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
Customerid Identificatore del cliente di cui si desidera ottenere le informazioni. long

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
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 GetCustomerResponse definisce gli elementi corpo e 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
Cliente Oggetto Customer che contiene informazioni sul cliente. Cliente

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/Customer/v13">
    <Action mustUnderstand="1">GetCustomer</Action>
    <AuthenticationToken i:nil="false">ValueHere</AuthenticationToken>
    <DeveloperToken i:nil="false">ValueHere</DeveloperToken>
  </s:Header>
  <s:Body>
    <GetCustomerRequest xmlns="https://bingads.microsoft.com/Customer/v13">
      <CustomerId>ValueHere</CustomerId>
    </GetCustomerRequest>
  </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/Customer/v13">
    <TrackingId d3p1:nil="false" xmlns:d3p1="http://www.w3.org/2001/XMLSchema-instance">ValueHere</TrackingId>
  </s:Header>
  <s:Body>
    <GetCustomerResponse xmlns="https://bingads.microsoft.com/Customer/v13">
      <Customer xmlns:e233="https://bingads.microsoft.com/Customer/v13/Entities" d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
        <e233:CustomerFinancialStatus d4p1:nil="false">ValueHere</e233:CustomerFinancialStatus>
        <e233:Id d4p1:nil="false">ValueHere</e233:Id>
        <e233:Industry d4p1:nil="false">ValueHere</e233:Industry>
        <e233:LastModifiedByUserId d4p1:nil="false">ValueHere</e233:LastModifiedByUserId>
        <e233:LastModifiedTime d4p1:nil="false">ValueHere</e233:LastModifiedTime>
        <e233:MarketCountry d4p1:nil="false">ValueHere</e233:MarketCountry>
        <e233:ForwardCompatibilityMap xmlns:e234="http://schemas.datacontract.org/2004/07/System.Collections.Generic" d4p1:nil="false">
          <e234:KeyValuePairOfstringstring>
            <e234:key d4p1:nil="false">ValueHere</e234:key>
            <e234:value d4p1:nil="false">ValueHere</e234:value>
          </e234:KeyValuePairOfstringstring>
        </e233:ForwardCompatibilityMap>
        <e233:MarketLanguage d4p1:nil="false">ValueHere</e233:MarketLanguage>
        <e233:Name d4p1:nil="false">ValueHere</e233:Name>
        <e233:ServiceLevel d4p1:nil="false">ValueHere</e233:ServiceLevel>
        <e233:CustomerLifeCycleStatus d4p1:nil="false">ValueHere</e233:CustomerLifeCycleStatus>
        <e233:TimeStamp d4p1:nil="false">ValueHere</e233:TimeStamp>
        <e233:Number d4p1:nil="false">ValueHere</e233:Number>
        <e233:CustomerAddress d4p1:nil="false">
          <e233:City d4p1:nil="false">ValueHere</e233:City>
          <e233:CountryCode d4p1:nil="false">ValueHere</e233:CountryCode>
          <e233:Id d4p1:nil="false">ValueHere</e233:Id>
          <e233:Line1 d4p1:nil="false">ValueHere</e233:Line1>
          <e233:Line2 d4p1:nil="false">ValueHere</e233:Line2>
          <e233:Line3 d4p1:nil="false">ValueHere</e233:Line3>
          <e233:Line4 d4p1:nil="false">ValueHere</e233:Line4>
          <e233:PostalCode d4p1:nil="false">ValueHere</e233:PostalCode>
          <e233:StateOrProvince d4p1:nil="false">ValueHere</e233:StateOrProvince>
          <e233:TimeStamp d4p1:nil="false">ValueHere</e233:TimeStamp>
          <e233:BusinessName d4p1:nil="false">ValueHere</e233:BusinessName>
        </e233:CustomerAddress>
      </Customer>
    </GetCustomerResponse>
  </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<GetCustomerResponse> GetCustomerAsync(
	long customerId)
{
	var request = new GetCustomerRequest
	{
		CustomerId = customerId
	};

	return (await CustomerManagementService.CallAsync((s, r) => s.GetCustomerAsync(r), request));
}
static GetCustomerResponse getCustomer(
	java.lang.Long customerId) throws RemoteException, Exception
{
	GetCustomerRequest request = new GetCustomerRequest();

	request.setCustomerId(customerId);

	return CustomerManagementService.getService().getCustomer(request);
}
static function GetCustomer(
	$customerId)
{

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

	$request = new GetCustomerRequest();

	$request->CustomerId = $customerId;

	return $GLOBALS['CustomerManagementProxy']->GetService()->GetCustomer($request);
}
response=customermanagement_service.GetCustomer(
	CustomerId=CustomerId)

Requisiti

Servizio: CustomerManagementService.svc v13
Namespace: https://bingads.microsoft.com/Customer/v13