AddClientLinks Service Operation - Customer Management
Initiates the client link process to manage the accounts of another customer. Sends a link request from one customer to another customer or 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.
There is no set limit to the amount of client accounts that can be linked to an agency. The client account must have a valid payment instrument set up for post-pay billing. Prepaid accounts are not supported for management by agencies.
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.
Note
Agency customers in the Create Accounts on Behalf of Client pilot (GetCustomerPilotFeatures returns 793) can also establish ad account level client links via the SignupCustomer service operation. Please see SignupCustomer for more information.
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 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 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/v13">
<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/v13">
<ClientLinks xmlns:e465="https://bingads.microsoft.com/Customer/v13/Entities" i:nil="false">
<e465:ClientLink>
<e465:Type i:nil="false">ValueHere</e465:Type>
<e465:ClientEntityId i:nil="false">ValueHere</e465:ClientEntityId>
<e465:ClientEntityNumber i:nil="false">ValueHere</e465:ClientEntityNumber>
<e465:ClientEntityName i:nil="false">ValueHere</e465:ClientEntityName>
<e465:ManagingCustomerId i:nil="false">ValueHere</e465:ManagingCustomerId>
<e465:ManagingCustomerNumber i:nil="false">ValueHere</e465:ManagingCustomerNumber>
<e465:ManagingCustomerName i:nil="false">ValueHere</e465:ManagingCustomerName>
<e465:Note i:nil="false">ValueHere</e465:Note>
<e465:Name i:nil="false">ValueHere</e465:Name>
<e465:InviterEmail i:nil="false">ValueHere</e465:InviterEmail>
<e465:InviterName i:nil="false">ValueHere</e465:InviterName>
<e465:InviterPhone i:nil="false">ValueHere</e465:InviterPhone>
<e465:IsBillToClient i:nil="false">ValueHere</e465:IsBillToClient>
<e465:StartDate i:nil="false">ValueHere</e465:StartDate>
<e465:Status i:nil="false">ValueHere</e465:Status>
<e465:SuppressNotification>ValueHere</e465:SuppressNotification>
<e465:LastModifiedDateTime>ValueHere</e465:LastModifiedDateTime>
<e465:LastModifiedByUserId>ValueHere</e465:LastModifiedByUserId>
<e465:Timestamp i:nil="false">ValueHere</e465:Timestamp>
<e465:ForwardCompatibilityMap xmlns:e466="http://schemas.datacontract.org/2004/07/System.Collections.Generic" i:nil="false">
<e466:KeyValuePairOfstringstring>
<e466:key i:nil="false">ValueHere</e466:key>
<e466:value i:nil="false">ValueHere</e466:value>
</e466:KeyValuePairOfstringstring>
</e465:ForwardCompatibilityMap>
<e465:CustomerLinkPermission i:nil="false">ValueHere</e465:CustomerLinkPermission>
</e465: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/v13">
<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/v13">
<OperationErrors xmlns:e467="https://bingads.microsoft.com/Customer/v13/Exception" d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
<e467:OperationError>
<e467:Code>ValueHere</e467:Code>
<e467:Details d4p1:nil="false">ValueHere</e467:Details>
<e467:Message d4p1:nil="false">ValueHere</e467:Message>
</e467:OperationError>
</OperationErrors>
<PartialErrors xmlns:e468="https://bingads.microsoft.com/Customer/v13/Exception" d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
<e468:ArrayOfOperationError>
<e468:OperationError>
<e468:Code>ValueHere</e468:Code>
<e468:Details d4p1:nil="false">ValueHere</e468:Details>
<e468:Message d4p1:nil="false">ValueHere</e468:Message>
</e468:OperationError>
</e468:ArrayOfOperationError>
</PartialErrors>
</AddClientLinksResponse>
</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<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 v13
Namespace: https://bingads.microsoft.com/Customer/v13
Request Url
https://clientcenter.api.bingads.microsoft.com/CustomerManagement/v13/ClientLinks
Request Elements
The AddClientLinksRequest 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 |
---|---|---|
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 |
---|---|---|
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 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 JSON.
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 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.
{
"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"
}
]
}
Response JSON
This template was generated by a tool to show the body and header elements for the JSON response.
{
"OperationErrors": [
{
"Code": IntValueHere,
"Details": "ValueHere",
"Message": "ValueHere"
}
],
"PartialErrors": [
{
"Code": IntValueHere,
"Details": "ValueHere",
"Message": "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<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)