AddClientLinks Service Operation - Customer Management

Initiates the client link process to manage the account of another customer. Sends an invitation from an agency to a potential client. For more information about the client link lifecycle, see Link to Client Accounts.

Note

The client account must have a valid payment instrument set up for post-pay billing. Prepaid accounts are not supported for management by agencies.

Only an agency may call this service operation. For more information about becoming an agency, see the Resources for agency partners.

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.

Note

This feature is not supported in sandbox.

Request Elements

The AddClientLinksRequest 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
ClientLinks The list of client links to add.

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

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 AddClientLinksResponse 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
OperationErrors A list of one or more reasons why the service operation failed, and no client links were added. 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.
OperationError array

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">AddClientLinks</Action>
    <AuthenticationToken i:nil="false">ValueHere</AuthenticationToken>
    <DeveloperToken i:nil="false">ValueHere</DeveloperToken>
  </s:Header>
  <s:Body>
    <AddClientLinksRequest xmlns="https://bingads.microsoft.com/Customer/v12">
      <ClientLinks xmlns:e244="https://bingads.microsoft.com/Customer/v12/Entities" i:nil="false">
        <e244:ClientLink>
          <e244:ClientAccountId i:nil="false">ValueHere</e244:ClientAccountId>
          <e244:ClientAccountNumber i:nil="false">ValueHere</e244:ClientAccountNumber>
          <e244:ManagingCustomerId i:nil="false">ValueHere</e244:ManagingCustomerId>
          <e244:ManagingCustomerNumber i:nil="false">ValueHere</e244:ManagingCustomerNumber>
          <e244:Note i:nil="false">ValueHere</e244:Note>
          <e244:Name i:nil="false">ValueHere</e244:Name>
          <e244:InviterEmail i:nil="false">ValueHere</e244:InviterEmail>
          <e244:InviterName i:nil="false">ValueHere</e244:InviterName>
          <e244:InviterPhone i:nil="false">ValueHere</e244:InviterPhone>
          <e244:IsBillToClient>ValueHere</e244:IsBillToClient>
          <e244:StartDate i:nil="false">ValueHere</e244:StartDate>
          <e244:Status i:nil="false">ValueHere</e244:Status>
          <e244:SuppressNotification>ValueHere</e244:SuppressNotification>
          <e244:LastModifiedDateTime>ValueHere</e244:LastModifiedDateTime>
          <e244:LastModifiedByUserId>ValueHere</e244:LastModifiedByUserId>
          <e244:Timestamp i:nil="false">ValueHere</e244:Timestamp>
          <e244:ForwardCompatibilityMap xmlns:e245="http://schemas.datacontract.org/2004/07/System.Collections.Generic" i:nil="false">
            <e245:KeyValuePairOfstringstring>
              <e245:key i:nil="false">ValueHere</e245:key>
              <e245:value i:nil="false">ValueHere</e245:value>
            </e245:KeyValuePairOfstringstring>
          </e244:ForwardCompatibilityMap>
        </e244:ClientLink>
      </ClientLinks>
    </AddClientLinksRequest>
  </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>
    <AddClientLinksResponse xmlns="https://bingads.microsoft.com/Customer/v12">
      <OperationErrors xmlns:e246="https://bingads.microsoft.com/Customer/v12/Exception" d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
        <e246:OperationError>
          <e246:Code>ValueHere</e246:Code>
          <e246:Details d4p1:nil="false">ValueHere</e246:Details>
          <e246:Message d4p1:nil="false">ValueHere</e246:Message>
        </e246:OperationError>
      </OperationErrors>
      <PartialErrors xmlns:e247="https://bingads.microsoft.com/Customer/v12/Exception" d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
        <e247:ArrayOfOperationError>
          <e247:OperationError>
            <e247:Code>ValueHere</e247:Code>
            <e247:Details d4p1:nil="false">ValueHere</e247:Details>
            <e247:Message d4p1:nil="false">ValueHere</e247:Message>
          </e247:OperationError>
        </e247:ArrayOfOperationError>
      </PartialErrors>
    </AddClientLinksResponse>
  </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<AddClientLinksResponse> AddClientLinksAsync(
	IList<ClientLink> clientLinks)
{
	var request = new AddClientLinksRequest
	{
		ClientLinks = clientLinks
	};

	return (await CustomerManagementService.CallAsync((s, r) => s.AddClientLinksAsync(r), request));
}
static AddClientLinksResponse addClientLinks(
	ArrayOfClientLink clientLinks) throws RemoteException, Exception
{
	AddClientLinksRequest request = new AddClientLinksRequest();

	request.setClientLinks(clientLinks);

	return CustomerManagementService.getService().addClientLinks(request);
}
static function AddClientLinks(
	$clientLinks)
{

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

	$request = new AddClientLinksRequest();

	$request->ClientLinks = $clientLinks;

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

Requirements

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