AddClientLinks 服务操作 - 客户管理

启动客户端链接过程以管理另一个客户的帐户。 将链接请求从一个客户发送到另一个客户或帐户。

注意

只有具有超级管理员或Standard凭据的用户才能添加、更新和搜索指向广告客户帐户的客户端链接。 只有具有超级管理员凭据的用户才能添加、更新和搜索指向客户的客户端链接。 有关详细信息,请参阅 用户角色 技术指南。

可链接到代理的客户帐户数量没有设置限制。 客户帐户必须为付款后计费设置有效的付款方式。 代理不支持管理预付费帐户。

提示

有关客户端链接生命周期的详细信息,请参阅 帐户层次结构 技术指南。 有关成为代理机构的详细信息,请参阅 代理合作伙伴的资源。 有关客户角度的详细信息,请参阅 如何让代理管理Microsoft广告帐户

注意

代理客户在代表客户创建帐户试点 (GetCustomerPilotFeatures 返回 793) 还可以通过 SignupCustomer 服务操作建立广告帐户级客户端链接。 有关详细信息 ,请参阅 SignupCustomer

请求元素

AddClientLinksRequest 对象定义服务操作请求的正文标头元素。 元素的顺序必须与 请求 SOAP 中所示的顺序相同。

注意

除非下面另有说明,否则需要所有请求元素。

请求正文元素

元素 说明 数据类型
ClientLinks 要添加的客户端链接列表。

应将请求限制为每次调用 10 个客户端链接。
ClientLink 数组

请求标头元素

元素 说明 数据类型
AuthenticationToken OAuth 访问令牌,表示有权Microsoft广告帐户的用户的凭据。

有关详细信息,请参阅 使用 OAuth 进行身份验证
string
DeveloperToken 用于访问必应广告 API 的开发人员令牌。

有关详细信息,请参阅 获取开发人员令牌
string
Password 此元素保留供内部使用,将从 API 的未来版本中删除。 必须使用 AuthenticationToken 元素来设置用户凭据。 string
UserName 此元素保留供内部使用,将从 API 的未来版本中删除。 必须使用 AuthenticationToken 元素来设置用户凭据。 string

响应元素

AddClientLinksResponse 对象定义服务操作响应的正文标头元素。 元素的返回顺序与 响应 SOAP 中所示的顺序相同。

响应正文元素

元素 说明 数据类型
OperationErrors 列出服务操作失败的一个或多个原因,并且未添加客户端链接。 OperationError 数组
PartialErrors OperationError 列表的数组,其中包含未成功添加的任何客户端链接的详细信息。

结果以与所请求的客户端链接对应的相同顺序返回。 第一个维度列表元素的数目等于请求的客户端链接计数。 对于成功添加的客户端链接,位于相应索引处的 OperationError 元素为 null。
OperationError 数组

响应标头元素

元素 说明 数据类型
跟踪 ID 包含 API 调用详细信息的日志条目的标识符。 string

请求 SOAP

此模板由一个工具生成,用于显示 SOAP 请求的正文标头元素的顺序。 有关可用于此服务操作的支持类型,请参阅上面的 请求正文元素 参考。

<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:e9="https://bingads.microsoft.com/Customer/v13/Entities" i:nil="false">
        <e9:ClientLink>
          <e9:Type i:nil="false">ValueHere</e9:Type>
          <e9:ClientEntityId i:nil="false">ValueHere</e9:ClientEntityId>
          <e9:ClientEntityNumber i:nil="false">ValueHere</e9:ClientEntityNumber>
          <e9:ClientEntityName i:nil="false">ValueHere</e9:ClientEntityName>
          <e9:ManagingCustomerId i:nil="false">ValueHere</e9:ManagingCustomerId>
          <e9:ManagingCustomerNumber i:nil="false">ValueHere</e9:ManagingCustomerNumber>
          <e9:ManagingCustomerName i:nil="false">ValueHere</e9:ManagingCustomerName>
          <e9:Note i:nil="false">ValueHere</e9:Note>
          <e9:Name i:nil="false">ValueHere</e9:Name>
          <e9:InviterEmail i:nil="false">ValueHere</e9:InviterEmail>
          <e9:InviterName i:nil="false">ValueHere</e9:InviterName>
          <e9:InviterPhone i:nil="false">ValueHere</e9:InviterPhone>
          <e9:IsBillToClient i:nil="false">ValueHere</e9:IsBillToClient>
          <e9:StartDate i:nil="false">ValueHere</e9:StartDate>
          <e9:Status i:nil="false">ValueHere</e9:Status>
          <e9:SuppressNotification>ValueHere</e9:SuppressNotification>
          <e9:LastModifiedDateTime>ValueHere</e9:LastModifiedDateTime>
          <e9:LastModifiedByUserId>ValueHere</e9:LastModifiedByUserId>
          <e9:Timestamp i:nil="false">ValueHere</e9:Timestamp>
          <e9:ForwardCompatibilityMap xmlns:e10="http://schemas.datacontract.org/2004/07/System.Collections.Generic" i:nil="false">
            <e10:KeyValuePairOfstringstring>
              <e10:key i:nil="false">ValueHere</e10:key>
              <e10:value i:nil="false">ValueHere</e10:value>
            </e10:KeyValuePairOfstringstring>
          </e9:ForwardCompatibilityMap>
          <e9:CustomerLinkPermission i:nil="false">ValueHere</e9:CustomerLinkPermission>
        </e9:ClientLink>
      </ClientLinks>
    </AddClientLinksRequest>
  </s:Body>
</s:Envelope>

响应 SOAP

此模板由一个工具生成,用于显示 SOAP 响应的 正文标头 元素的顺序。

<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:e11="https://bingads.microsoft.com/Customer/v13/Exception" d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
        <e11:OperationError>
          <e11:Code>ValueHere</e11:Code>
          <e11:Details d4p1:nil="false">ValueHere</e11:Details>
          <e11:Message d4p1:nil="false">ValueHere</e11:Message>
        </e11:OperationError>
      </OperationErrors>
      <PartialErrors xmlns:e12="https://bingads.microsoft.com/Customer/v13/Exception" d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
        <e12:ArrayOfOperationError>
          <e12:OperationError>
            <e12:Code>ValueHere</e12:Code>
            <e12:Details d4p1:nil="false">ValueHere</e12:Details>
            <e12:Message d4p1:nil="false">ValueHere</e12:Message>
          </e12:OperationError>
        </e12:ArrayOfOperationError>
      </PartialErrors>
    </AddClientLinksResponse>
  </s:Body>
</s:Envelope>

代码语法

示例语法可用于 必应广告 SDK。 有关更多示例,请参阅 必应广告 API 代码示例

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)

要求

服务: CustomerManagementService.svc v13
命名空间: https://bingads.microsoft.com/Customer/v13

请求 URL

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

请求元素

AddClientLinksRequest 对象定义服务操作请求的正文标头元素。

注意

除非下面另有说明,否则需要所有请求元素。

请求正文元素

元素 说明 数据类型
ClientLinks 要添加的客户端链接列表。

应将请求限制为每次调用 10 个客户端链接。
ClientLink 数组

请求标头元素

元素 说明 数据类型
Authorization OAuth 访问令牌,表示有权Microsoft广告帐户的用户的凭据。 请确保令牌的前缀为“持有者”,这是正确身份验证所必需的。

有关详细信息,请参阅 使用 OAuth 进行身份验证
string
DeveloperToken 用于访问必应广告 API 的开发人员令牌。

有关详细信息,请参阅 获取开发人员令牌
string
Password 此元素保留供内部使用,将从 API 的未来版本中删除。 必须使用 AuthenticationToken 元素来设置用户凭据。 string
UserName 此元素保留供内部使用,将从 API 的未来版本中删除。 必须使用 AuthenticationToken 元素来设置用户凭据。 string

响应元素

AddClientLinksResponse 对象定义服务操作响应的正文标头元素。 元素的返回顺序与 响应 JSON 中所示的顺序相同。

响应正文元素

元素 说明 数据类型
OperationErrors 列出服务操作失败的一个或多个原因,并且未添加客户端链接。 OperationError 数组
PartialErrors OperationError 列表的数组,其中包含未成功添加的任何客户端链接的详细信息。

结果以与所请求的客户端链接对应的相同顺序返回。 第一个维度列表元素的数目等于请求的客户端链接计数。 对于成功添加的客户端链接,位于相应索引处的 OperationError 元素为 null。
OperationError 数组

响应标头元素

元素 说明 数据类型
跟踪 ID 包含 API 调用详细信息的日志条目的标识符。 string

请求 JSON

此模板由显示 JSON 请求的 正文标头 元素的工具生成。 有关可用于此服务操作的支持类型,请参阅上面的 请求正文元素 参考。

{
  "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"
    }
  ]
}

响应 JSON

此模板由一个工具生成,用于显示 JSON 响应的 正文标头 元素。

{
  "OperationErrors": [
    {
      "Code": IntValueHere,
      "Details": "ValueHere",
      "Message": "ValueHere"
    }
  ],
  "PartialErrors": [
    {
      "Code": IntValueHere,
      "Details": "ValueHere",
      "Message": "ValueHere"
    }
  ]
}

代码语法

若要通过 SDK 调用 REST API,需要将 SDK 升级到特定版本并配置系统参数。示例语法可用于 必应广告 SDK。 有关更多示例,请参阅 必应广告 API 代码示例

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)