Export (0) Print
Expand All

UpdateClientLinks Service Operation

System_CLiX_note Note

This feature is not supported in sandbox.

Updates the status of the specified client links. To update a client link, the TimeStamp element is required for validation, so you must first call the SearchClientLinks operation to get the existing ClientLink object. Then modify the Status element of the returned ClientLink, and include the updated ClientLink object in a subsequent call to the UpdateClientLinks operation. For more information about the client link lifecycle, see Link to Client Accounts.

If your user is within an agency, then the operation may be used to update the client link status of any account that you manage or have invited to manage. For more information about becoming an agency, see the Getting started with Bing Ads section of the Agency hub page.

If your user is within a client customer that has one or more accounts managed or invited to be managed by an agency, then you may only use this operation to update the status as LinkAccepted or LinkDeclined. A client may also accept or decline the link request via the Bing Ads web application. For more information, see Accept an agency request.

The role of the user calling this operation must be Super Admin. For more information, see User Roles and Available Service Operations.

There is no set limit to the amount of client accounts that can be linked to an agency.

Request | Response

Error Codes

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

UpdateClientLinksRequest Message

Request Body

The UpdateClientLinksRequest 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

ClientLinks

The list of client links to update.

You should limit your request to 10 client links per call.

ClientLink array

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">UpdateClientLinks</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>
    <UpdateClientLinksRequest xmlns="https://bingads.microsoft.com/Customer/v9">
      <ClientLinks xmlns:e45="https://bingads.microsoft.com/Customer/v9/Entities" i:nil="false">
        <e45:ClientLink>
          <e45:ClientAccountId i:nil="false"></e45:ClientAccountId>
          <e45:ClientAccountNumber i:nil="false"></e45:ClientAccountNumber>
          <e45:ManagingCustomerId i:nil="false"></e45:ManagingCustomerId>
          <e45:ManagingCustomerNumber i:nil="false"></e45:ManagingCustomerNumber>
          <e45:Note i:nil="false"></e45:Note>
          <e45:Name i:nil="false"></e45:Name>
          <e45:InviterEmail i:nil="false"></e45:InviterEmail>
          <e45:InviterName i:nil="false"></e45:InviterName>
          <e45:InviterPhone i:nil="false"></e45:InviterPhone>
          <e45:IsBillToClient></e45:IsBillToClient>
          <e45:StartDate i:nil="false"></e45:StartDate>
          <e45:Status i:nil="false"></e45:Status>
          <e45:SuppressNotification></e45:SuppressNotification>
          <e45:LastModifiedDateTime></e45:LastModifiedDateTime>
          <e45:LastModifiedByUserId></e45:LastModifiedByUserId>
          <e45:Timestamp i:nil="false"></e45:Timestamp>
          <ForwardCompatibilityMap xmlns:e46="http://schemas.datacontract.org/2004/07/System.Collections.Generic" i:nil="false">
            <e46:KeyValuePairOfstringstring>
              <e46:key i:nil="false"></e46:key>
              <e46:value i:nil="false"></e46:value>
            </e46:KeyValuePairOfstringstring>
          </ForwardCompatibilityMap>
        </e45:ClientLink>
      </ClientLinks>
    </UpdateClientLinksRequest>
  </s:Body>
</s:Envelope>

UpdateClientLinksResponse Message

Response Body

Element

Description

Data Type

OperationErrors

A list of one or more reasons why the service operation failed, and no client links were added.

For error codes, please see Bing Ads Operation Error Codes.

OperationError array

PartialErrors

An array of OperationError lists that contain details for any client links that were not successfully added.

Results are returned in the same order corresponding to the requested client links. The number of first dimension list elements is equal to the requested client links count. For successfully added client links, the OperationError element at the corresponding index is null.

For error codes, please see Bing Ads Operation Error Codes.

OperationError [][]

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>
    <UpdateClientLinksResponse xmlns="https://bingads.microsoft.com/Customer/v9">
      <OperationErrors xmlns:e47="https://bingads.microsoft.com/Customer/v9/Exception" p5:nil="false" xmlns:p5="http://www.w3.org/2001/XMLSchema-instance">
        <e47:OperationError>
          <e47:Code></e47:Code>
          <e47:Details p5:nil="false"></e47:Details>
          <e47:Message p5:nil="false"></e47:Message>
        </e47:OperationError>
      </OperationErrors>
      <PartialErrors xmlns:e48="https://bingads.microsoft.com/Customer/v9/Exception" p5:nil="false" xmlns:p5="http://www.w3.org/2001/XMLSchema-instance">
        <e48:ArrayOfOperationError>
          <e48:OperationError>
            <e48:Code></e48:Code>
            <e48:Details p5:nil="false"></e48:Details>
            <e48:Message p5:nil="false"></e48:Message>
          </e48:OperationError>
        </e48:ArrayOfOperationError>
      </PartialErrors>
    </UpdateClientLinksResponse>
  </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:
© 2015 Microsoft