편집

다음을 통해 공유


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.

Note

Only a user with Super Admin or Standard credentials can add, update, and search for client links to advertiser accounts. Only a user with Super Admin credentials can add, update, and search for client links to customers. For more information, see the User Roles technical guide.

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.

Tip

For more information about the client link lifecycle, see the Account Hierarchy technical guide. For more information about becoming an agency, see the Resources for agency partners. For more information from a client's perspective, see How to have an agency manage your Microsoft Advertising account.

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 conditions that must be met to return client links.

You must include one or two predicates.

For details about how results are determined for each supported predicate Field value see Predicate Remarks.
Predicate array

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 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/v13">
    <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/v13">
      <Predicates xmlns:e531="https://bingads.microsoft.com/Customer/v13/Entities" i:nil="false">
        <e531:Predicate>
          <e531:Field i:nil="false">ValueHere</e531:Field>
          <e531:Operator>ValueHere</e531:Operator>
          <e531:Value i:nil="false">ValueHere</e531:Value>
        </e531:Predicate>
      </Predicates>
      <Ordering xmlns:e532="https://bingads.microsoft.com/Customer/v13/Entities" i:nil="false">
        <e532:OrderBy>
          <e532:Field>ValueHere</e532:Field>
          <e532:Order>ValueHere</e532:Order>
        </e532:OrderBy>
      </Ordering>
      <PageInfo xmlns:e533="https://bingads.microsoft.com/Customer/v13/Entities" i:nil="false">
        <e533:Index>ValueHere</e533:Index>
        <e533:Size>ValueHere</e533: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/v13">
    <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/v13">
      <ClientLinks xmlns:e534="https://bingads.microsoft.com/Customer/v13/Entities" d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
        <e534:ClientLink>
          <e534:Type d4p1:nil="false">ValueHere</e534:Type>
          <e534:ClientEntityId d4p1:nil="false">ValueHere</e534:ClientEntityId>
          <e534:ClientEntityNumber d4p1:nil="false">ValueHere</e534:ClientEntityNumber>
          <e534:ClientEntityName d4p1:nil="false">ValueHere</e534:ClientEntityName>
          <e534:ManagingCustomerId d4p1:nil="false">ValueHere</e534:ManagingCustomerId>
          <e534:ManagingCustomerNumber d4p1:nil="false">ValueHere</e534:ManagingCustomerNumber>
          <e534:ManagingCustomerName d4p1:nil="false">ValueHere</e534:ManagingCustomerName>
          <e534:Note d4p1:nil="false">ValueHere</e534:Note>
          <e534:Name d4p1:nil="false">ValueHere</e534:Name>
          <e534:InviterEmail d4p1:nil="false">ValueHere</e534:InviterEmail>
          <e534:InviterName d4p1:nil="false">ValueHere</e534:InviterName>
          <e534:InviterPhone d4p1:nil="false">ValueHere</e534:InviterPhone>
          <e534:IsBillToClient d4p1:nil="false">ValueHere</e534:IsBillToClient>
          <e534:StartDate d4p1:nil="false">ValueHere</e534:StartDate>
          <e534:Status d4p1:nil="false">ValueHere</e534:Status>
          <e534:SuppressNotification>ValueHere</e534:SuppressNotification>
          <e534:LastModifiedDateTime>ValueHere</e534:LastModifiedDateTime>
          <e534:LastModifiedByUserId>ValueHere</e534:LastModifiedByUserId>
          <e534:Timestamp d4p1:nil="false">ValueHere</e534:Timestamp>
          <e534:ForwardCompatibilityMap xmlns:e535="http://schemas.datacontract.org/2004/07/System.Collections.Generic" d4p1:nil="false">
            <e535:KeyValuePairOfstringstring>
              <e535:key d4p1:nil="false">ValueHere</e535:key>
              <e535:value d4p1:nil="false">ValueHere</e535:value>
            </e535:KeyValuePairOfstringstring>
          </e534:ForwardCompatibilityMap>
          <e534:CustomerLinkPermission d4p1:nil="false">ValueHere</e534:CustomerLinkPermission>
        </e534: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 v13
Namespace: https://bingads.microsoft.com/Customer/v13

Request Url

https://clientcenter.api.bingads.microsoft.com/CustomerManagement/v13/ClientLinks/Search

Request Elements

The SearchClientLinksRequest 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
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 conditions that must be met to return client links.

You must include one or two predicates.

For details about how results are determined for each supported predicate Field value see Predicate Remarks.
Predicate array

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 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 JSON.

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

{
  "Predicates": [
    {
      "Field": "ValueHere",
      "Operator": "ValueHere",
      "Value": "ValueHere"
    }
  ],
  "Ordering": [
    {
      "Field": "ValueHere",
      "Order": "ValueHere"
    }
  ],
  "PageInfo": {
    "Index": IntValueHere,
    "Size": IntValueHere
  }
}

Response JSON

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

{
  "ClientLinks": [
    {
      "ClientEntityId": "LongValueHere",
      "ClientEntityName": "ValueHere",
      "ClientEntityNumber": "ValueHere",
      "CustomerLinkPermission": "ValueHere",
      "ForwardCompatibilityMap": [
        {
          "key": "ValueHere",
          "value": "ValueHere"
        }
      ],
      "InviterEmail": "ValueHere",
      "InviterName": "ValueHere",
      "InviterPhone": "ValueHere",
      "IsBillToClient": "ValueHere",
      "LastModifiedByUserId": "LongValueHere",
      "LastModifiedDateTime": "ValueHere",
      "ManagingCustomerId": "LongValueHere",
      "ManagingCustomerName": "ValueHere",
      "ManagingCustomerNumber": "ValueHere",
      "Name": "ValueHere",
      "Note": "ValueHere",
      "StartDate": "ValueHere",
      "Status": "ValueHere",
      "SuppressNotification": "ValueHere",
      "Timestamp": "ValueHere",
      "Type": "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<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)