title | ms.service | ms.subservice | ms.topic | author | ms.author | description | dev_langs | ||||
---|---|---|---|---|---|---|---|---|---|---|---|
GetAccount Service Operation - Customer Management |
bing-ads |
customer-management-api |
article |
jonmeyers |
jonmeyers |
Gets the details of an account. |
|
Gets the details of an account.
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.
Note
Unless otherwise noted below, all request elements are required.
Element | Description | Data Type |
---|---|---|
AccountId | The identifier of the account to get. | long |
ReturnAdditionalFields | The list of additional properties that you want included within each returned account. The additional field values enable you to get the latest features using the current version of Customer Management API, and in the next version the corresponding elements will be included by default. This request element is optional. |
AccountAdditionalField |
[!INCLUDErequest-header]
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.
Element | Description | Data Type |
---|---|---|
Account | An account object that contains information about the account, such as payment method, account type, and parent customer. | AdvertiserAccount |
[!INCLUDEresponse-header]
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/v13">
<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/v13">
<AccountId>ValueHere</AccountId>
<ReturnAdditionalFields i:nil="false">ValueHere</ReturnAdditionalFields>
</GetAccountRequest>
</s:Body>
</s:Envelope>
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/v13">
<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/v13">
<Account xmlns:e228="https://bingads.microsoft.com/Customer/v13/Entities" d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
<e228:BillToCustomerId d4p1:nil="false">ValueHere</e228:BillToCustomerId>
<e228:CurrencyCode d4p1:nil="false">ValueHere</e228:CurrencyCode>
<e228:AccountFinancialStatus d4p1:nil="false">ValueHere</e228:AccountFinancialStatus>
<e228:Id d4p1:nil="false">ValueHere</e228:Id>
<e228:Language d4p1:nil="false">ValueHere</e228:Language>
<e228:LastModifiedByUserId d4p1:nil="false">ValueHere</e228:LastModifiedByUserId>
<e228:LastModifiedTime d4p1:nil="false">ValueHere</e228:LastModifiedTime>
<e228:Name d4p1:nil="false">ValueHere</e228:Name>
<e228:Number d4p1:nil="false">ValueHere</e228:Number>
<e228:ParentCustomerId>ValueHere</e228:ParentCustomerId>
<e228:PaymentMethodId d4p1:nil="false">ValueHere</e228:PaymentMethodId>
<e228:PaymentMethodType d4p1:nil="false">ValueHere</e228:PaymentMethodType>
<e228:PrimaryUserId d4p1:nil="false">ValueHere</e228:PrimaryUserId>
<e228:AccountLifeCycleStatus d4p1:nil="false">ValueHere</e228:AccountLifeCycleStatus>
<e228:TimeStamp d4p1:nil="false">ValueHere</e228:TimeStamp>
<e228:TimeZone d4p1:nil="false">ValueHere</e228:TimeZone>
<e228:PauseReason d4p1:nil="false">ValueHere</e228:PauseReason>
<e228:ForwardCompatibilityMap xmlns:e229="http://schemas.datacontract.org/2004/07/System.Collections.Generic" d4p1:nil="false">
<e229:KeyValuePairOfstringstring>
<e229:key d4p1:nil="false">ValueHere</e229:key>
<e229:value d4p1:nil="false">ValueHere</e229:value>
</e229:KeyValuePairOfstringstring>
</e228:ForwardCompatibilityMap>
<e228:LinkedAgencies d4p1:nil="false">
<e228:CustomerInfo>
<e228:Id d4p1:nil="false">ValueHere</e228:Id>
<e228:Name d4p1:nil="false">ValueHere</e228:Name>
</e228:CustomerInfo>
</e228:LinkedAgencies>
<e228:SalesHouseCustomerId d4p1:nil="false">ValueHere</e228:SalesHouseCustomerId>
<e228:TaxInformation xmlns:e230="http://schemas.datacontract.org/2004/07/System.Collections.Generic" d4p1:nil="false">
<e230:KeyValuePairOfstringstring>
<e230:key d4p1:nil="false">ValueHere</e230:key>
<e230:value d4p1:nil="false">ValueHere</e230:value>
</e230:KeyValuePairOfstringstring>
</e228:TaxInformation>
<e228:BackUpPaymentInstrumentId d4p1:nil="false">ValueHere</e228:BackUpPaymentInstrumentId>
<e228:BillingThresholdAmount d4p1:nil="false">ValueHere</e228:BillingThresholdAmount>
<e228:BusinessAddress d4p1:nil="false">
<e228:City d4p1:nil="false">ValueHere</e228:City>
<e228:CountryCode d4p1:nil="false">ValueHere</e228:CountryCode>
<e228:Id d4p1:nil="false">ValueHere</e228:Id>
<e228:Line1 d4p1:nil="false">ValueHere</e228:Line1>
<e228:Line2 d4p1:nil="false">ValueHere</e228:Line2>
<e228:Line3 d4p1:nil="false">ValueHere</e228:Line3>
<e228:Line4 d4p1:nil="false">ValueHere</e228:Line4>
<e228:PostalCode d4p1:nil="false">ValueHere</e228:PostalCode>
<e228:StateOrProvince d4p1:nil="false">ValueHere</e228:StateOrProvince>
<e228:TimeStamp d4p1:nil="false">ValueHere</e228:TimeStamp>
<e228:BusinessName d4p1:nil="false">ValueHere</e228:BusinessName>
</e228:BusinessAddress>
<e228:AutoTagType d4p1:nil="false">ValueHere</e228:AutoTagType>
<e228:SoldToPaymentInstrumentId d4p1:nil="false">ValueHere</e228:SoldToPaymentInstrumentId>
<e228:TaxCertificate d4p1:nil="false">
<e228:TaxCertificateBlobContainerName d4p1:nil="false">ValueHere</e228:TaxCertificateBlobContainerName>
<e228:TaxCertificates xmlns:e231="http://schemas.datacontract.org/2004/07/System.Collections.Generic" d4p1:nil="false">
<e231:KeyValuePairOfstringbase64Binary>
<e231:key d4p1:nil="false">ValueHere</e231:key>
<e231:value d4p1:nil="false">ValueHere</e231:value>
</e231:KeyValuePairOfstringbase64Binary>
</e228:TaxCertificates>
<e228:Status d4p1:nil="false">ValueHere</e228:Status>
</e228:TaxCertificate>
<e228:AccountMode d4p1:nil="false">ValueHere</e228:AccountMode>
</Account>
</GetAccountResponse>
</s:Body>
</s:Envelope>
The example syntax can be used with Bing Ads SDKs. See Bing Ads API Code Examples for more examples.
public async Task<GetAccountResponse> GetAccountAsync(
long accountId,
AccountAdditionalField? returnAdditionalFields)
{
var request = new GetAccountRequest
{
AccountId = accountId,
ReturnAdditionalFields = returnAdditionalFields
};
return (await CustomerManagementService.CallAsync((s, r) => s.GetAccountAsync(r), request));
}
static GetAccountResponse getAccount(
java.lang.Long accountId,
ArrayList<AccountAdditionalField> returnAdditionalFields) throws RemoteException, Exception
{
GetAccountRequest request = new GetAccountRequest();
request.setAccountId(accountId);
request.setReturnAdditionalFields(returnAdditionalFields);
return CustomerManagementService.getService().getAccount(request);
}
static function GetAccount(
$accountId,
$returnAdditionalFields)
{
$GLOBALS['Proxy'] = $GLOBALS['CustomerManagementProxy'];
$request = new GetAccountRequest();
$request->AccountId = $accountId;
$request->ReturnAdditionalFields = $returnAdditionalFields;
return $GLOBALS['CustomerManagementProxy']->GetService()->GetAccount($request);
}
response=customermanagement_service.GetAccount(
AccountId=AccountId,
ReturnAdditionalFields=ReturnAdditionalFields)
Service: CustomerManagementService.svc v13
Namespace: https://bingads.microsoft.com/Customer/v13