Export (0) Print
Expand All

GetCustomer Service Operation

Gets the details of a customer.

Request | Response

Error Codes

Service: CustomerManagementService.svc v9 | Namespace: https://bingads.microsoft.com/Customer/v9

GetCustomerRequest Message

Request Body

The GetCustomerRequest object defines the elements of the request’s body. The elements must be in the same order as shown in the SOAP example.

Element

Description

Data Type

CustomerId

The identifier of the customer whose information you want to get.

long

Request Header

For information about the values you set the DeveloperToken, Password, and UserName elements to, see Getting Started With the Bing Ads API.

Element

Description

Data Type

ApplicationToken

The application-access token. This header element is not used and should be null.

string

AuthenticationToken

The OAuth access token used to manage Bing Ads accounts linked to a Microsoft Account. For more information, see Managing User Authentication with OAuth.

string

DeveloperToken

The client application's developer access token.

string

Password

The Bing Ads user's sign-in password.

string

UserName

The Bing Ads user's sign-in user name. You may not set this element to a Microsoft account.

string

Request SOAP

The following example shows the complete request envelope.

<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/v9">
    <Action mustUnderstand="1">GetCustomer</Action>
    <ApplicationToken i:nil="false"></ApplicationToken>
    <AuthenticationToken i:nil="false"></AuthenticationToken>
    <DeveloperToken i:nil="false"></DeveloperToken>
    <Password i:nil="false"></Password>
    <UserName i:nil="false"></UserName>
  </s:Header>
  <s:Body>
    <GetCustomerRequest xmlns="https://bingads.microsoft.com/Customer/v9">
      <CustomerId></CustomerId>
    </GetCustomerRequest>
  </s:Body>
</s:Envelope>

GetCustomerResponse Message

Response Body

Element

Description

Data Type

Customer

A Customer object that contains information about the customer.

Customer

Response Header

Element

Description

Data Type

TrackingId

The identifier of the log entry that contains the details of the API call.

string

Response SOAP

The following example shows the complete response envelope.

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header xmlns="https://bingads.microsoft.com/Customer/v9">
    <TrackingId p4:nil="false" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance"></TrackingId>
  </s:Header>
  <s:Body>
    <GetCustomerResponse xmlns="https://bingads.microsoft.com/Customer/v9">
      <Customer xmlns:e13="https://bingads.microsoft.com/Customer/v9/Entities" p5:nil="false" xmlns:p5="http://www.w3.org/2001/XMLSchema-instance">
        <e13:CustomerAddress p5:nil="false">
          <e13:City p5:nil="false"></e13:City>
          <e13:CountryCode p5:nil="false"></e13:CountryCode>
          <e13:Id p5:nil="false"></e13:Id>
          <e13:Line1 p5:nil="false"></e13:Line1>
          <e13:Line2 p5:nil="false"></e13:Line2>
          <e13:Line3 p5:nil="false"></e13:Line3>
          <e13:Line4 p5:nil="false"></e13:Line4>
          <e13:PostalCode p5:nil="false"></e13:PostalCode>
          <e13:StateOrProvince p5:nil="false"></e13:StateOrProvince>
          <e13:TimeStamp p5:nil="false"></e13:TimeStamp>
        </e13:CustomerAddress>
        <e13:CustomerFinancialStatus p5:nil="false"></e13:CustomerFinancialStatus>
        <e13:Id p5:nil="false"></e13:Id>
        <e13:Industry p5:nil="false"></e13:Industry>
        <e13:LastModifiedByUserId p5:nil="false"></e13:LastModifiedByUserId>
        <e13:LastModifiedTime p5:nil="false"></e13:LastModifiedTime>
        <e13:MarketCountry p5:nil="false"></e13:MarketCountry>
        <ForwardCompatibilityMap xmlns:e14="http://schemas.datacontract.org/2004/07/System.Collections.Generic" p5:nil="false">
          <e14:KeyValuePairOfstringstring>
            <e14:key p5:nil="false"></e14:key>
            <e14:value p5:nil="false"></e14:value>
          </e14:KeyValuePairOfstringstring>
        </ForwardCompatibilityMap>
        <e13:MarketLanguage p5:nil="false"></e13:MarketLanguage>
        <e13:Name p5:nil="false"></e13:Name>
        <e13:ServiceLevel p5:nil="false"></e13:ServiceLevel>
        <e13:CustomerLifeCycleStatus p5:nil="false"></e13:CustomerLifeCycleStatus>
        <e13:TimeStamp p5:nil="false"></e13:TimeStamp>
        <e13:Number p5:nil="false"></e13:Number>
      </Customer>
    </GetCustomerResponse>
  </s:Body>
</s:Envelope>

Error Codes

If the service operation fails, it throws a FaultException exception, which contains one or more of the Bing Ads API error data objects. For information about the fault detail objects, see Customer Management Error Data Objects and Handling Service Errors and Exceptions.

The following are example error codes that the error objects can include when using this service operation. For all documented error codes, please see Bing Ads Operation Error Codes.

Error Code

InvalidCredentials

Community Additions

ADD
Show:
© 2014 Microsoft