SearchClientLinks Service Operation - Customer Management

Searches for the client links for the customer of the current authenticated user, filtered by the search criteria. The operation returns the most recent link for each unique combination of agency customer and client account. For more information about the client link lifecycle, see Link to Client Accounts.

If your user is within a client customer that has one or more accounts managed by an agency, then you may search one at a time for individual accounts that were or are eligible to be linked. To search by individual account, set the predicate field to ClientAccountId and set the predicate value to the account identifier that you want to find.

Note

This feature is not supported in sandbox.

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

Request Elements

The SearchClientLinksRequest 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
Ordering Determines the order of results.

This request element is optional. If specified, you should only include one OrderBy element in the list. Additional elements are not supported and will be ignored by the service.

For this service operation, the following values are supported in the Field element of a OrderBy object.

Id - The order is determined by the ClientAccountId element of the returned ClientLink.

Name - The order is determined by the Name element of the returned ClientLink.

Number - The order is determined by the ManagingCustomerNumber element of the returned ClientLink.
OrderBy array
PageInfo Determines the index and size of results per page. Paging
Predicates Determines the request conditions. This operation's response will include client links that match all of the specified predicates.

You can specify either one or two predicates per service call.

For a list of supported Field and Operator elements of a Predicate object for this service operation, see Predicate Remarks.
Predicate array

Request Header Elements

Element Description Data Type
AuthenticationToken The OAuth access token that represents a Microsoft Account user who has permissions to Microsoft Advertising 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 SearchClientLinksResponse 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
ClientLinks The list of client link invitations. ClientLink 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">SearchClientLinks</Action>
    <AuthenticationToken i:nil="false">ValueHere</AuthenticationToken>
    <DeveloperToken i:nil="false">ValueHere</DeveloperToken>
  </s:Header>
  <s:Body>
    <SearchClientLinksRequest xmlns="https://bingads.microsoft.com/Customer/v12">
      <Predicates xmlns:e405="https://bingads.microsoft.com/Customer/v12/Entities" i:nil="false">
        <e405:Predicate>
          <e405:Field i:nil="false">ValueHere</e405:Field>
          <e405:Operator>ValueHere</e405:Operator>
          <e405:Value i:nil="false">ValueHere</e405:Value>
        </e405:Predicate>
      </Predicates>
      <Ordering xmlns:e406="https://bingads.microsoft.com/Customer/v12/Entities" i:nil="false">
        <e406:OrderBy>
          <e406:Field>ValueHere</e406:Field>
          <e406:Order>ValueHere</e406:Order>
        </e406:OrderBy>
      </Ordering>
      <PageInfo xmlns:e407="https://bingads.microsoft.com/Customer/v12/Entities" i:nil="false">
        <e407:Index>ValueHere</e407:Index>
        <e407:Size>ValueHere</e407:Size>
      </PageInfo>
    </SearchClientLinksRequest>
  </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>
    <SearchClientLinksResponse xmlns="https://bingads.microsoft.com/Customer/v12">
      <ClientLinks xmlns:e408="https://bingads.microsoft.com/Customer/v12/Entities" d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
        <e408:ClientLink>
          <e408:ClientAccountId d4p1:nil="false">ValueHere</e408:ClientAccountId>
          <e408:ClientAccountNumber d4p1:nil="false">ValueHere</e408:ClientAccountNumber>
          <e408:ManagingCustomerId d4p1:nil="false">ValueHere</e408:ManagingCustomerId>
          <e408:ManagingCustomerNumber d4p1:nil="false">ValueHere</e408:ManagingCustomerNumber>
          <e408:Note d4p1:nil="false">ValueHere</e408:Note>
          <e408:Name d4p1:nil="false">ValueHere</e408:Name>
          <e408:InviterEmail d4p1:nil="false">ValueHere</e408:InviterEmail>
          <e408:InviterName d4p1:nil="false">ValueHere</e408:InviterName>
          <e408:InviterPhone d4p1:nil="false">ValueHere</e408:InviterPhone>
          <e408:IsBillToClient>ValueHere</e408:IsBillToClient>
          <e408:StartDate d4p1:nil="false">ValueHere</e408:StartDate>
          <e408:Status d4p1:nil="false">ValueHere</e408:Status>
          <e408:SuppressNotification>ValueHere</e408:SuppressNotification>
          <e408:LastModifiedDateTime>ValueHere</e408:LastModifiedDateTime>
          <e408:LastModifiedByUserId>ValueHere</e408:LastModifiedByUserId>
          <e408:Timestamp d4p1:nil="false">ValueHere</e408:Timestamp>
          <e408:ForwardCompatibilityMap xmlns:e409="http://schemas.datacontract.org/2004/07/System.Collections.Generic" d4p1:nil="false">
            <e409:KeyValuePairOfstringstring>
              <e409:key d4p1:nil="false">ValueHere</e409:key>
              <e409:value d4p1:nil="false">ValueHere</e409:value>
            </e409:KeyValuePairOfstringstring>
          </e408:ForwardCompatibilityMap>
        </e408:ClientLink>
      </ClientLinks>
    </SearchClientLinksResponse>
  </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<SearchClientLinksResponse> SearchClientLinksAsync(
	IList<Predicate> predicates,
	IList<OrderBy> ordering,
	Paging pageInfo)
{
	var request = new SearchClientLinksRequest
	{
		Predicates = predicates,
		Ordering = ordering,
		PageInfo = pageInfo
	};

	return (await CustomerManagementService.CallAsync((s, r) => s.SearchClientLinksAsync(r), request));
}
static SearchClientLinksResponse searchClientLinks(
	ArrayOfPredicate predicates,
	ArrayOfOrderBy ordering,
	Paging pageInfo) throws RemoteException, Exception
{
	SearchClientLinksRequest request = new SearchClientLinksRequest();

	request.setPredicates(predicates);
	request.setOrdering(ordering);
	request.setPageInfo(pageInfo);

	return CustomerManagementService.getService().searchClientLinks(request);
}
static function SearchClientLinks(
	$predicates,
	$ordering,
	$pageInfo)
{

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

	$request = new SearchClientLinksRequest();

	$request->Predicates = $predicates;
	$request->Ordering = $ordering;
	$request->PageInfo = $pageInfo;

	return $GLOBALS['CustomerManagementProxy']->GetService()->SearchClientLinks($request);
}
response=customermanagement_service.SearchClientLinks(
	Predicates=Predicates,
	Ordering=Ordering,
	PageInfo=PageInfo)

Requirements

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