GetAccount Service Operation - Customer Management

Gets the details of an account.

Request Elements

The GetAccountRequest object defines the body and header elements of the service operation request. The elements must be in the same order as shown in the Request SOAP.

Request Body Elements

Element Description Data Type
AccountId The identifier of the account to get. long

Request Header Elements

Element Description Data Type
AuthenticationToken The OAuth access token that represents a Microsoft Account user who has permissions to Bing Ads accounts. string
DeveloperToken The developer token used to access the Bing Ads API. string
Password This element is reserved for internal use and will be removed from a future version of the API. You must use the AuthenticationToken element to set user credentials. string
UserName This element is reserved for internal use and will be removed from a future version of the API. You must use the AuthenticationToken element to set user credentials. string

Response Elements

The GetAccountResponse object defines the body and header elements of the service operation response. The elements are returned in the same order as shown in the Response SOAP.

Response Body Elements

Element Description Data Type
Account An account object that contains information about the account, such as payment method, account type, and parent customer. AdvertiserAccount

Response Header Elements

Element Description Data Type
TrackingId The identifier of the log entry that contains the details of the API call. string

Request SOAP

This template was generated by a tool to show the order of the body and header elements for the SOAP request. For supported types that you can use with this service operation, see the Request Body Elements reference above.

<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/v12">
    <Action mustUnderstand="1">GetAccount</Action>
    <AuthenticationToken i:nil="false">ValueHere</AuthenticationToken>
    <DeveloperToken i:nil="false">ValueHere</DeveloperToken>
  </s:Header>
  <s:Body>
    <GetAccountRequest xmlns="https://bingads.microsoft.com/Customer/v12">
      <AccountId>ValueHere</AccountId>
    </GetAccountRequest>
  </s:Body>
</s:Envelope>

Response SOAP

This template was generated by a tool to show the order of the body and header elements for the SOAP response.

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header xmlns="https://bingads.microsoft.com/Customer/v12">
    <TrackingId d3p1:nil="false" xmlns:d3p1="http://www.w3.org/2001/XMLSchema-instance">ValueHere</TrackingId>
  </s:Header>
  <s:Body>
    <GetAccountResponse xmlns="https://bingads.microsoft.com/Customer/v12">
      <Account xmlns:e252="https://bingads.microsoft.com/Customer/v12/Entities" d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
        <e252:BillToCustomerId d4p1:nil="false">ValueHere</e252:BillToCustomerId>
        <e252:CurrencyCode d4p1:nil="false">ValueHere</e252:CurrencyCode>
        <e252:AccountFinancialStatus d4p1:nil="false">ValueHere</e252:AccountFinancialStatus>
        <e252:Id d4p1:nil="false">ValueHere</e252:Id>
        <e252:Language d4p1:nil="false">ValueHere</e252:Language>
        <e252:LastModifiedByUserId d4p1:nil="false">ValueHere</e252:LastModifiedByUserId>
        <e252:LastModifiedTime d4p1:nil="false">ValueHere</e252:LastModifiedTime>
        <e252:Name d4p1:nil="false">ValueHere</e252:Name>
        <e252:Number d4p1:nil="false">ValueHere</e252:Number>
        <e252:ParentCustomerId>ValueHere</e252:ParentCustomerId>
        <e252:PaymentMethodId d4p1:nil="false">ValueHere</e252:PaymentMethodId>
        <e252:PaymentMethodType d4p1:nil="false">ValueHere</e252:PaymentMethodType>
        <e252:PrimaryUserId d4p1:nil="false">ValueHere</e252:PrimaryUserId>
        <e252:AccountLifeCycleStatus d4p1:nil="false">ValueHere</e252:AccountLifeCycleStatus>
        <e252:TimeStamp d4p1:nil="false">ValueHere</e252:TimeStamp>
        <e252:TimeZone d4p1:nil="false">ValueHere</e252:TimeZone>
        <e252:PauseReason d4p1:nil="false">ValueHere</e252:PauseReason>
        <e252:ForwardCompatibilityMap xmlns:e253="http://schemas.datacontract.org/2004/07/System.Collections.Generic" d4p1:nil="false">
          <e253:KeyValuePairOfstringstring>
            <e253:key d4p1:nil="false">ValueHere</e253:key>
            <e253:value d4p1:nil="false">ValueHere</e253:value>
          </e253:KeyValuePairOfstringstring>
        </e252:ForwardCompatibilityMap>
        <e252:LinkedAgencies d4p1:nil="false">
          <e252:CustomerInfo>
            <e252:Id d4p1:nil="false">ValueHere</e252:Id>
            <e252:Name d4p1:nil="false">ValueHere</e252:Name>
          </e252:CustomerInfo>
        </e252:LinkedAgencies>
        <e252:SalesHouseCustomerId d4p1:nil="false">ValueHere</e252:SalesHouseCustomerId>
        <e252:TaxInformation xmlns:e254="http://schemas.datacontract.org/2004/07/System.Collections.Generic" d4p1:nil="false">
          <e254:KeyValuePairOfstringstring>
            <e254:key d4p1:nil="false">ValueHere</e254:key>
            <e254:value d4p1:nil="false">ValueHere</e254:value>
          </e254:KeyValuePairOfstringstring>
        </e252:TaxInformation>
        <e252:BackUpPaymentInstrumentId d4p1:nil="false">ValueHere</e252:BackUpPaymentInstrumentId>
        <e252:BillingThresholdAmount d4p1:nil="false">ValueHere</e252:BillingThresholdAmount>
        <e252:BusinessAddress d4p1:nil="false">
          <e252:City d4p1:nil="false">ValueHere</e252:City>
          <e252:CountryCode d4p1:nil="false">ValueHere</e252:CountryCode>
          <e252:Id d4p1:nil="false">ValueHere</e252:Id>
          <e252:Line1 d4p1:nil="false">ValueHere</e252:Line1>
          <e252:Line2 d4p1:nil="false">ValueHere</e252:Line2>
          <e252:Line3 d4p1:nil="false">ValueHere</e252:Line3>
          <e252:Line4 d4p1:nil="false">ValueHere</e252:Line4>
          <e252:PostalCode d4p1:nil="false">ValueHere</e252:PostalCode>
          <e252:StateOrProvince d4p1:nil="false">ValueHere</e252:StateOrProvince>
          <e252:TimeStamp d4p1:nil="false">ValueHere</e252:TimeStamp>
          <e252:BusinessName d4p1:nil="false">ValueHere</e252:BusinessName>
        </e252:BusinessAddress>
        <e252:AutoTagType d4p1:nil="false">ValueHere</e252:AutoTagType>
        <e252:SoldToPaymentInstrumentId d4p1:nil="false">ValueHere</e252:SoldToPaymentInstrumentId>
      </Account>
    </GetAccountResponse>
  </s:Body>
</s:Envelope>

Code Syntax

The example syntax can be used with Bing Ads SDKs. See Bing Ads Code Examples for more examples.

public async Task<GetAccountResponse> GetAccountAsync(
	long accountId)
{
	var request = new GetAccountRequest
	{
		AccountId = accountId
	};

	return (await CustomerManagementService.CallAsync((s, r) => s.GetAccountAsync(r), request));
}
static GetAccountResponse getAccount(
	java.lang.Long accountId) throws RemoteException, Exception
{
	GetAccountRequest request = new GetAccountRequest();

	request.setAccountId(accountId);

	return CustomerManagementService.getService().getAccount(request);
}
static function GetAccount(
	$accountId)
{

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

	$request = new GetAccountRequest();

	$request->AccountId = $accountId;

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

Requirements

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