次の方法で共有


UpdateUser Service Operation - Customer Management

Microsoft Advertising ユーザーに関する個人およびビジネスの連絡先情報をUpdatesします。

注:

ユーザーを更新できるのは、Super Admin または Standard 資格情報を持つユーザーのみです。 詳細については、 ユーザー ロール のテクニカル ガイドを参照してください。

更新操作には最新のユーザー書き込み操作のタイム スタンプが必要であるため、最初に GetUser 操作を呼び出す必要があります。 GetUser 操作は、タイム スタンプを含むユーザーのデータを返します。 古いタイム スタンプを使用すると、更新呼び出しは失敗します。たとえば、ユーザー データは、タイム スタンプを取得した後、アプリケーションまたは別のアプリケーションによって更新されます。

Request 要素

UpdateUserRequest オブジェクトは、サービス操作要求の本文要素とヘッダー要素を定義します。 要素は、 要求 SOAP に示されている順序と同じ順序である必要があります。

注:

以下に特に記載がない限り、すべての要求要素が必要です。

要求本文要素

要素 説明 データ型
User 更新されたユーザー情報を含むユーザー オブジェクト。

この操作により、既存のユーザー データが、渡したユーザー オブジェクトの内容で上書きされます。 この操作は、部分的な更新ではなく、完全な更新を実行します。 User オブジェクトには、User オブジェクトが最後に書き込まれた時点からのタイム スタンプ値が含まれている必要があります。 タイム スタンプに正しい値が含まれていることを確認するには、 GetUser 操作を呼び出します。 その後、必要に応じてユーザー データを更新し、 UpdateUser を呼び出すことができます。
ユーザー

要求ヘッダー要素

要素 説明 データ型
AuthenticationToken Microsoft Advertising アカウントへのアクセス許可を持つユーザーの資格情報を表す OAuth アクセス トークン。

詳細については、「 OAuth による認証」を参照してください。
string
DeveloperToken Bing Ads API へのアクセスに使用される開発者トークン。

詳細については、「 開発者トークンを取得する」を参照してください。
string
Password この要素は内部使用のために予約されており、今後のバージョンの API から削除されます。 ユーザー資格情報を設定するには、AuthenticationToken 要素を使用する必要があります。 string
UserName この要素は内部使用のために予約されており、今後のバージョンの API から削除されます。 ユーザー資格情報を設定するには、AuthenticationToken 要素を使用する必要があります。 string

Response 要素

UpdateUserResponse オブジェクトは、サービス操作応答の本文要素とヘッダー要素を定義します。 要素は、 応答 SOAP に示されている順序と同じ順序で返されます。

応答本文の要素

要素 説明 データ型
LastModifiedTime ユーザーが最後に更新された日付と時刻。 値は、世界協定時刻 (UTC) です。

日付と時刻の値は、クライアントではなく、サーバーでの日付と時刻を反映します。 日付と時刻の形式については、「 プリミティブ XML データ型」の dateTime エントリを参照してください。
dateTime

応答ヘッダー要素

要素 説明 データ型
TrackingId 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">UpdateUser</Action>
    <AuthenticationToken i:nil="false">ValueHere</AuthenticationToken>
    <DeveloperToken i:nil="false">ValueHere</DeveloperToken>
  </s:Header>
  <s:Body>
    <UpdateUserRequest xmlns="https://bingads.microsoft.com/Customer/v13">
      <User xmlns:e283="https://bingads.microsoft.com/Customer/v13/Entities" i:nil="false">
        <e283:ContactInfo i:nil="false">
          <e283:Address i:nil="false">
            <e283:City i:nil="false">ValueHere</e283:City>
            <e283:CountryCode i:nil="false">ValueHere</e283:CountryCode>
            <e283:Id i:nil="false">ValueHere</e283:Id>
            <e283:Line1 i:nil="false">ValueHere</e283:Line1>
            <e283:Line2 i:nil="false">ValueHere</e283:Line2>
            <e283:Line3 i:nil="false">ValueHere</e283:Line3>
            <e283:Line4 i:nil="false">ValueHere</e283:Line4>
            <e283:PostalCode i:nil="false">ValueHere</e283:PostalCode>
            <e283:StateOrProvince i:nil="false">ValueHere</e283:StateOrProvince>
            <e283:TimeStamp i:nil="false">ValueHere</e283:TimeStamp>
            <e283:BusinessName i:nil="false">ValueHere</e283:BusinessName>
          </e283:Address>
          <e283:ContactByPhone i:nil="false">ValueHere</e283:ContactByPhone>
          <e283:ContactByPostalMail i:nil="false">ValueHere</e283:ContactByPostalMail>
          <e283:Email i:nil="false">ValueHere</e283:Email>
          <e283:EmailFormat i:nil="false">ValueHere</e283:EmailFormat>
          <e283:Fax i:nil="false">ValueHere</e283:Fax>
          <e283:HomePhone i:nil="false">ValueHere</e283:HomePhone>
          <e283:Id i:nil="false">ValueHere</e283:Id>
          <e283:Mobile i:nil="false">ValueHere</e283:Mobile>
          <e283:Phone1 i:nil="false">ValueHere</e283:Phone1>
          <e283:Phone2 i:nil="false">ValueHere</e283:Phone2>
        </e283:ContactInfo>
        <e283:CustomerId i:nil="false">ValueHere</e283:CustomerId>
        <e283:Id i:nil="false">ValueHere</e283:Id>
        <e283:JobTitle i:nil="false">ValueHere</e283:JobTitle>
        <e283:LastModifiedByUserId i:nil="false">ValueHere</e283:LastModifiedByUserId>
        <e283:LastModifiedTime i:nil="false">ValueHere</e283:LastModifiedTime>
        <e283:Lcid i:nil="false">ValueHere</e283:Lcid>
        <e283:Name i:nil="false">
          <e283:FirstName i:nil="false">ValueHere</e283:FirstName>
          <e283:LastName i:nil="false">ValueHere</e283:LastName>
          <e283:MiddleInitial i:nil="false">ValueHere</e283:MiddleInitial>
        </e283:Name>
        <e283:Password i:nil="false">ValueHere</e283:Password>
        <e283:SecretAnswer i:nil="false">ValueHere</e283:SecretAnswer>
        <e283:SecretQuestion>ValueHere</e283:SecretQuestion>
        <e283:UserLifeCycleStatus i:nil="false">ValueHere</e283:UserLifeCycleStatus>
        <e283:TimeStamp i:nil="false">ValueHere</e283:TimeStamp>
        <e283:UserName i:nil="false">ValueHere</e283:UserName>
        <e283:ForwardCompatibilityMap xmlns:e284="http://schemas.datacontract.org/2004/07/System.Collections.Generic" i:nil="false">
          <e284:KeyValuePairOfstringstring>
            <e284:key i:nil="false">ValueHere</e284:key>
            <e284:value i:nil="false">ValueHere</e284:value>
          </e284:KeyValuePairOfstringstring>
        </e283:ForwardCompatibilityMap>
        <e283:AuthenticationToken i:nil="false">ValueHere</e283:AuthenticationToken>
      </User>
    </UpdateUserRequest>
  </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>
    <UpdateUserResponse xmlns="https://bingads.microsoft.com/Customer/v13">
      <LastModifiedTime>ValueHere</LastModifiedTime>
    </UpdateUserResponse>
  </s:Body>
</s:Envelope>

コード構文

構文の例は、 Bing広告 SDK で使用できます。 その他 の例については、「Bing広告 API コードの例 」を参照してください。

public async Task<UpdateUserResponse> UpdateUserAsync(
	User user)
{
	var request = new UpdateUserRequest
	{
		User = user
	};

	return (await CustomerManagementService.CallAsync((s, r) => s.UpdateUserAsync(r), request));
}
static UpdateUserResponse updateUser(
	User user) throws RemoteException, Exception
{
	UpdateUserRequest request = new UpdateUserRequest();

	request.setUser(user);

	return CustomerManagementService.getService().updateUser(request);
}
static function UpdateUser(
	$user)
{

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

	$request = new UpdateUserRequest();

	$request->User = $user;

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

要件

サービス: CustomerManagementService.svc v13
名前 空間: https://bingads.microsoft.com/Customer/v13