createCustomer
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Knox またはゼロタップ登録で会社(お客様)を一意に識別する Company
オブジェクトを作成します。メソッドが正常に返されたら、指定されたオーナー(primary_emails
)または管理者(secondary_emails
)は、メールアドレスを Google アカウントに関連付けて ゼロタッチ カスタマー ポータルにアクセスできます(詳細については、IT 管理者向けのゼロタッチ登録をご覧ください)。または、Samsung アカウントに関連付けて Knox Mobile Enrollment(KME)ポータルにアクセスできます。
メソッド シグネチャ
public CreateCustomerResponse createCustomer(CreateCustomerRequest request) throws CommonException;
CreateCustomerRequest
プロパティ名 |
値 |
必須 |
説明 |
customer_name |
string |
はい |
会社名。たとえば XYZ 社は、ゼロタッチ登録ポータルで会社の従業員に表示されます。 |
primary_emails |
object(string) のリスト |
はい |
ゼロタッチ: オーナーロールのお客様のユーザーのメールアドレス。メールアドレスを 1 つ以上指定してください。各メールアドレスは Google アカウントに関連付けられている必要があります。所有者は、管理者と同じアクセス権を持ちますが、組織のポータル ユーザーの追加、削除、編集も行うことができます。
Samsung: お客様の特権管理者のメールアドレス。Samsung はリスト内の最初のメールアドレスのみを使用します。メールアドレスは Samsung アカウントに関連付けられている必要があります。 |
secondary_emails |
object(string) のリスト |
いいえ |
管理者ロールを持つお客様のユーザーのメールアドレス。各メールアドレスは Google アカウントに関連付けられている必要があります。注: このプロパティは Samsung ではサポートされていません。 |
vendorParams |
map |
ゼロタッチ: いいえ
Samsung: はい |
追加フィールド、ベンダー指定の Key-Value ペア。SamsungResellerService クラスからのリクエストでは、次のように指定する必要があります。
"country": お客様の ISO 3166-1 国コード(例: 「US」)。
"firstName": お客様の氏名(最大 60 文字)。
"lastName": お客様の姓(最大 60 文字)。
"service": サポートされている値は「KME」のみです。 |
CreateCustomerResponse
プロパティ名 |
値 |
説明 |
customer |
object( Company ) |
新しく作成された顧客の詳細を含むオブジェクト。 |
vendor_params |
map |
追加フィールド、ベンダー指定の Key-Value ペア(Samsung のみ)。 |
エラーの動作
エラーが発生すると、ライブラリは次のいずれかのエラーコードを含む CommonException
をスローします。
CommonException
エラーコード |
INTERNAL_SERVER_ERROR |
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-29 UTC。
[null,null,["最終更新日 2025-08-29 UTC。"],[[["\u003cp\u003eThis process creates a \u003ccode\u003eCompany\u003c/code\u003e object to uniquely identify a customer for Knox or zero-touch enrollment.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ecustomer_name\u003c/code\u003e, \u003ccode\u003eprimary_emails\u003c/code\u003e, and \u003ccode\u003evendorParams\u003c/code\u003e are required parameters for creating a customer, and \u003ccode\u003esecondary_emails\u003c/code\u003e is optional.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eprimary_emails\u003c/code\u003e are email addresses for owners (for zero-touch) or super admins (for Samsung), who can access the zero-touch or Knox Mobile Enrollment portal, and must be associated with a Google Account or Samsung Account, respectively.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003esecondary_emails\u003c/code\u003e represent admin users for zero-touch enrollment, must be associated with a Google Account, and are not supported by Samsung.\u003c/p\u003e\n"],["\u003cp\u003eThe method throws a \u003ccode\u003eCommonException\u003c/code\u003e with an \u003ccode\u003eINTERNAL_SERVER_ERROR\u003c/code\u003e if an issue occurs during customer creation.\u003c/p\u003e\n"]]],["This document outlines how to create a `Company` object to identify a customer for Knox or zero-touch enrollment. The `createCustomer` method requires a company name and a list of primary email addresses (owners/super admins). Secondary email addresses (admins) are optional for zero-touch. Samsung requests also need `vendorParams`, specifying country, first name, last name, and \"KME\" service. Successful creation returns a `Company` object, allowing associated emails access to the zero-touch or KME portal. Errors result in a `CommonException`.\n"],null,["# createCustomer\n\nCreates a [`Company`](/zero-touch/reseller-library/reference/objects#company)\nobject to uniquely identify a company (customer) for Knox or zero-touch\nenrollment. After the method returns successfully, the specified owners (`primary_emails`)\nor admins (`secondary_emails`) can associate their email addresses with a Google\nAccount to access the [zero touch customer portal](https://enterprise.google.com/android/zero-touch/customers)\n(for details, see [Zero-touch enrollment for IT admins](https://support.google.com/work/android/answer/7514005))\nor a Samsung Account to access the Knox Mobile Enrollment (KME) portal.\n\nMethod signature\n----------------\n\n public CreateCustomerResponse createCustomer(CreateCustomerRequest request) throws CommonException;\n\nCreateCustomerRequest\n---------------------\n\n| Property name | Value | Required | Description |\n|--------------------|--------------------------|-------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `customer_name` | `string` | Yes | The name of the company. For example XYZ Corp. Displayed to the company's employees in the zero-touch enrollment portal. |\n| `primary_emails` | List of `object(string)` | Yes | **Zero-touch:** Email address of customer's users in the owner role. At least one email address is required. Each email address must be associated with a Google Account. Owners share the same access as admins but can also add, delete, and edit your organization's portal users. **Samsung:** Email address of customer's super admin. Samsung only takes the first email in the list. Email address must be associated with a Samsung Account. |\n| `secondary_emails` | List of `object(string)` | No | Email address of customer's users in the admin role. Each email address must be associated with a Google Account. **Note:** This property is not supported by Samsung. |\n| `vendorParams` | `map` | **Zero-touch:** No **Samsung:** Yes | Extra fields, vendor specified key-value pair. Requests from the `SamsungResellerService` class must specify: \"country\": [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the customer, for example \"US\". \"firstName\": first name of the customer (max. 60 characters). \"lastName\": last name of the customer (max. 60 characters). \"service\": \"KME\" is the only supported value. |\n\nCreateCustomerResponse\n----------------------\n\n| Property name | Value | Description |\n|-----------------|---------------------------------------------------------------------------------|---------------------------------------------------------------|\n| `customer` | `object(`[`Company`](/zero-touch/reseller-library/reference/objects#company)`)` | Object containing details of the newly created customer. |\n| `vendor_params` | `map` | Extra fields, vendor specified key-value pair (Samsung only). |\n\nError behavior\n--------------\n\nIf an error occurs, the library throws a `CommonException` containing one of the\nfollowing error codes:\n\n### `CommonException`\n\n| Error code |\n|-------------------------|\n| `INTERNAL_SERVER_ERROR` |"]]