GetCustomer Service Operation


Gets the details of a customer.

Request | Response

Error Codes

Service: CustomerManagementService.svc v11 | Namespace:

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 Request SOAP.

ElementDescriptionData Type
CustomerIdThe identifier of the customer whose information you want to get.long

Request Headers

Set the required header elements for each service request. New customers are required to sign up for Bing Ads with a Microsoft Account, and to manage those accounts you must use OAuth. Existing users with legacy Bing Ads credentials may continue to specify the UserName and Password header elements. In future versions of the API, Bing Ads will transition exclusively to Microsoft Account authentication. For more information, see Getting Started With the Bing Ads API.

OAuth Authentication

These request headers are required for Authentication with OAuth.

ElementDescriptionData Type
AuthenticationTokenThe OAuth access token that represents a Microsoft Account user who has permissions to Bing Ads accounts.string
DeveloperTokenThe developer token used to access the Bing Ads API.string

Password Authentication

These request headers are required for legacy username and password authentication.

ElementDescriptionData Type
DeveloperTokenThe developer token used to access the Bing Ads API.string
PasswordThe Bing Ads user's sign-in password.string
UserNameThe Bing Ads user's sign-in user name. You must not set this element to a Microsoft account or email address. To authenticate a Microsoft account, use the AuthenticationToken header instead of UserName and Password.string

Request SOAP

The following example shows the complete request envelope.

<s:Envelope xmlns:i="" xmlns:s="">
  <s:Header xmlns="">
    <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>
    <GetCustomerRequest xmlns="">

Response Body

ElementDescriptionData Type
CustomerA Customer object that contains information about the customer.Customer

Response Header

ElementDescriptionData Type
TrackingIdThe 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="">
  <s:Header xmlns="">
    <TrackingId p4:nil="false" xmlns:p4=""></TrackingId>
    <GetCustomerResponse xmlns="">
      <Customer xmlns:e13="" p5:nil="false" xmlns:p5="">
        <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: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="" p5:nil="false">
            <e14:key p5:nil="false"></e14:key>
            <e14:value p5:nil="false"></e14:value>
        <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>

If the service operation fails, it throws a FaultException, 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