UpdateAccount Service Operation - Customer Management

Updates the details of the specified account.

Note

Only a user with Super Admin or Standard credentials can update accounts. For more information, see the User Roles technical guide.

Because the update operation requires the time stamp of the most recent account write operation, you must first call the GetAccount operation. The GetAccount operation returns the account's data, which includes the time stamp. The update call will fail if you use an old time stamp e.g., the account data is updated by your application or another application after you obtained the time stamp.

Because the update operation completely overwrites the existing account data, the account data must contain all required data; otherwise, the operation will fail.

Request Elements

The UpdateAccountRequest 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.

Request Body Elements

Element Description Data Type
Account An AdvertiserAccount object that contains the updated account information.

This operation overwrites the existing account data with the contents of the account object that you pass. This operation performs a full update, and not a partial update. The Account object must contain the time stamp value from the last time that the Account object was written to. To ensure that the time stamp contains the correct value, call the GetAccount operation. You can then update the account data as appropriate, and call UpdateAccount.
AdvertiserAccount

Request Header Elements

Element Description Data Type
AuthenticationToken The OAuth access token that represents the credentials of a user who has permissions to Microsoft Advertising accounts.

For more information see Authentication with OAuth.
string
DeveloperToken The developer token used to access the Bing Ads API.

For more information see Get a Developer Token.
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 UpdateAccountResponse 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
LastModifiedTime The date and time that the account was last updated. The value is in Coordinated Universal Time (UTC).

The date and time value reflects the date and time at the server, not the client. For information about the format of the date and time, see the dateTime entry in Primitive XML Data Types.
dateTime

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/v13">
    <Action mustUnderstand="1">UpdateAccount</Action>
    <AuthenticationToken i:nil="false">ValueHere</AuthenticationToken>
    <DeveloperToken i:nil="false">ValueHere</DeveloperToken>
  </s:Header>
  <s:Body>
    <UpdateAccountRequest xmlns="https://bingads.microsoft.com/Customer/v13">
      <Account xmlns:e569="https://bingads.microsoft.com/Customer/v13/Entities" i:nil="false">
        <e569:BillToCustomerId i:nil="false">ValueHere</e569:BillToCustomerId>
        <e569:CurrencyCode i:nil="false">ValueHere</e569:CurrencyCode>
        <e569:AccountFinancialStatus i:nil="false">ValueHere</e569:AccountFinancialStatus>
        <e569:Id i:nil="false">ValueHere</e569:Id>
        <e569:Language i:nil="false">ValueHere</e569:Language>
        <e569:LastModifiedByUserId i:nil="false">ValueHere</e569:LastModifiedByUserId>
        <e569:LastModifiedTime i:nil="false">ValueHere</e569:LastModifiedTime>
        <e569:Name i:nil="false">ValueHere</e569:Name>
        <e569:Number i:nil="false">ValueHere</e569:Number>
        <e569:ParentCustomerId>ValueHere</e569:ParentCustomerId>
        <e569:PaymentMethodId i:nil="false">ValueHere</e569:PaymentMethodId>
        <e569:PaymentMethodType i:nil="false">ValueHere</e569:PaymentMethodType>
        <e569:PrimaryUserId i:nil="false">ValueHere</e569:PrimaryUserId>
        <e569:AccountLifeCycleStatus i:nil="false">ValueHere</e569:AccountLifeCycleStatus>
        <e569:TimeStamp i:nil="false">ValueHere</e569:TimeStamp>
        <e569:TimeZone i:nil="false">ValueHere</e569:TimeZone>
        <e569:PauseReason i:nil="false">ValueHere</e569:PauseReason>
        <e569:ForwardCompatibilityMap xmlns:e570="http://schemas.datacontract.org/2004/07/System.Collections.Generic" i:nil="false">
          <e570:KeyValuePairOfstringstring>
            <e570:key i:nil="false">ValueHere</e570:key>
            <e570:value i:nil="false">ValueHere</e570:value>
          </e570:KeyValuePairOfstringstring>
        </e569:ForwardCompatibilityMap>
        <e569:LinkedAgencies i:nil="false">
          <e569:CustomerInfo>
            <e569:Id i:nil="false">ValueHere</e569:Id>
            <e569:Name i:nil="false">ValueHere</e569:Name>
          </e569:CustomerInfo>
        </e569:LinkedAgencies>
        <e569:SalesHouseCustomerId i:nil="false">ValueHere</e569:SalesHouseCustomerId>
        <e569:TaxInformation xmlns:e571="http://schemas.datacontract.org/2004/07/System.Collections.Generic" i:nil="false">
          <e571:KeyValuePairOfstringstring>
            <e571:key i:nil="false">ValueHere</e571:key>
            <e571:value i:nil="false">ValueHere</e571:value>
          </e571:KeyValuePairOfstringstring>
        </e569:TaxInformation>
        <e569:BackUpPaymentInstrumentId i:nil="false">ValueHere</e569:BackUpPaymentInstrumentId>
        <e569:BillingThresholdAmount i:nil="false">ValueHere</e569:BillingThresholdAmount>
        <e569:BusinessAddress i:nil="false">
          <e569:City i:nil="false">ValueHere</e569:City>
          <e569:CountryCode i:nil="false">ValueHere</e569:CountryCode>
          <e569:Id i:nil="false">ValueHere</e569:Id>
          <e569:Line1 i:nil="false">ValueHere</e569:Line1>
          <e569:Line2 i:nil="false">ValueHere</e569:Line2>
          <e569:Line3 i:nil="false">ValueHere</e569:Line3>
          <e569:Line4 i:nil="false">ValueHere</e569:Line4>
          <e569:PostalCode i:nil="false">ValueHere</e569:PostalCode>
          <e569:StateOrProvince i:nil="false">ValueHere</e569:StateOrProvince>
          <e569:TimeStamp i:nil="false">ValueHere</e569:TimeStamp>
          <e569:BusinessName i:nil="false">ValueHere</e569:BusinessName>
        </e569:BusinessAddress>
        <e569:AutoTagType i:nil="false">ValueHere</e569:AutoTagType>
        <e569:SoldToPaymentInstrumentId i:nil="false">ValueHere</e569:SoldToPaymentInstrumentId>
        <e569:TaxCertificate i:nil="false">
          <e569:TaxCertificateBlobContainerName i:nil="false">ValueHere</e569:TaxCertificateBlobContainerName>
          <e569:TaxCertificates xmlns:e572="http://schemas.datacontract.org/2004/07/System.Collections.Generic" i:nil="false">
            <e572:KeyValuePairOfstringbase64Binary>
              <e572:key i:nil="false">ValueHere</e572:key>
              <e572:value i:nil="false">ValueHere</e572:value>
            </e572:KeyValuePairOfstringbase64Binary>
          </e569:TaxCertificates>
          <e569:Status i:nil="false">ValueHere</e569:Status>
        </e569:TaxCertificate>
        <e569:AccountMode i:nil="false">ValueHere</e569:AccountMode>
      </Account>
    </UpdateAccountRequest>
  </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/v13">
    <TrackingId d3p1:nil="false" xmlns:d3p1="http://www.w3.org/2001/XMLSchema-instance">ValueHere</TrackingId>
  </s:Header>
  <s:Body>
    <UpdateAccountResponse xmlns="https://bingads.microsoft.com/Customer/v13">
      <LastModifiedTime>ValueHere</LastModifiedTime>
    </UpdateAccountResponse>
  </s:Body>
</s:Envelope>

Code Syntax

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

public async Task<UpdateAccountResponse> UpdateAccountAsync(
	AdvertiserAccount account)
{
	var request = new UpdateAccountRequest
	{
		Account = account
	};

	return (await CustomerManagementService.CallAsync((s, r) => s.UpdateAccountAsync(r), request));
}
static UpdateAccountResponse updateAccount(
	AdvertiserAccount account) throws RemoteException, Exception
{
	UpdateAccountRequest request = new UpdateAccountRequest();

	request.setAccount(account);

	return CustomerManagementService.getService().updateAccount(request);
}
static function UpdateAccount(
	$account)
{

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

	$request = new UpdateAccountRequest();

	$request->Account = $account;

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

Requirements

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

Request Url

https://clientcenter.api.bingads.microsoft.com/CustomerManagement/v13/Account

Request Elements

The UpdateAccountRequest object defines the body and header elements of the service operation request.

Note

Unless otherwise noted below, all request elements are required.

Request Body Elements

Element Description Data Type
Account An AdvertiserAccount object that contains the updated account information.

This operation overwrites the existing account data with the contents of the account object that you pass. This operation performs a full update, and not a partial update. The Account object must contain the time stamp value from the last time that the Account object was written to. To ensure that the time stamp contains the correct value, call the GetAccount operation. You can then update the account data as appropriate, and call UpdateAccount.
AdvertiserAccount

Request Header Elements

Element Description Data Type
Authorization The OAuth access token that represents the credentials of a user who has permissions to Microsoft Advertising accounts. Please ensure that the token is prefixed with "Bearer ", this is necessary for proper authentication.

For more information see Authentication with OAuth.
string
DeveloperToken The developer token used to access the Bing Ads API.

For more information see Get a Developer Token.
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 UpdateAccountResponse 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 JSON.

Response Body Elements

Element Description Data Type
LastModifiedTime The date and time that the account was last updated. The value is in Coordinated Universal Time (UTC).

The date and time value reflects the date and time at the server, not the client. For information about the format of the date and time, see the dateTime entry in Primitive XML Data Types.
dateTime

Response Header Elements

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

Request JSON

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

{
  "Account": {
    "AccountFinancialStatus": "ValueHere",
    "AccountLifeCycleStatus": "ValueHere",
    "AccountMode": "ValueHere",
    "AutoTagType": "ValueHere",
    "BackUpPaymentInstrumentId": "LongValueHere",
    "BillingThresholdAmount": DecimalValueHere,
    "BillToCustomerId": "LongValueHere",
    "BusinessAddress": {
      "BusinessName": "ValueHere",
      "City": "ValueHere",
      "CountryCode": "ValueHere",
      "Id": "LongValueHere",
      "Line1": "ValueHere",
      "Line2": "ValueHere",
      "Line3": "ValueHere",
      "Line4": "ValueHere",
      "PostalCode": "ValueHere",
      "StateOrProvince": "ValueHere",
      "TimeStamp": "ValueHere"
    },
    "CurrencyCode": "ValueHere",
    "ForwardCompatibilityMap": [
      {
        "key": "ValueHere",
        "value": "ValueHere"
      }
    ],
    "Id": "LongValueHere",
    "Language": "ValueHere",
    "LastModifiedByUserId": "LongValueHere",
    "LastModifiedTime": "ValueHere",
    "LinkedAgencies": [
      {
        "Id": "LongValueHere",
        "Name": "ValueHere"
      }
    ],
    "Name": "ValueHere",
    "Number": "ValueHere",
    "ParentCustomerId": "LongValueHere",
    "PauseReason": "ValueHere",
    "PaymentMethodId": "LongValueHere",
    "PaymentMethodType": "ValueHere",
    "PrimaryUserId": "LongValueHere",
    "SalesHouseCustomerId": "LongValueHere",
    "SoldToPaymentInstrumentId": "LongValueHere",
    "TaxCertificate": {
      "Status": "ValueHere",
      "TaxCertificateBlobContainerName": "ValueHere",
      "TaxCertificates": [
        {
          "key": "ValueHere",
          "value": "ValueHere"
        }
      ]
    },
    "TaxInformation": [
      {
        "key": "ValueHere",
        "value": "ValueHere"
      }
    ],
    "TimeStamp": "ValueHere",
    "TimeZone": "ValueHere"
  }
}

Response JSON

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

{
  "LastModifiedTime": "ValueHere"
}

Code Syntax

To call REST API through SDKs, you need to upgrade SDK to a certain version and configure the system parameters.The example syntax can be used with Bing Ads SDKs. See Bing Ads API Code Examples for more examples.

public async Task<UpdateAccountResponse> UpdateAccountAsync(
	AdvertiserAccount account)
{
	var request = new UpdateAccountRequest
	{
		Account = account
	};

	return (await CustomerManagementService.CallAsync((s, r) => s.UpdateAccountAsync(r), request));
}
static UpdateAccountResponse updateAccount(
	AdvertiserAccount account) throws RemoteException, Exception
{
	UpdateAccountRequest request = new UpdateAccountRequest();

	request.setAccount(account);

	return CustomerManagementService.getService().updateAccount(request);
}
static function UpdateAccount(
	$account)
{

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

	$request = new UpdateAccountRequest();

	$request->Account = $account;

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