订购新客户帐号
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
在创建新客户账号之前,请考虑以下事项:
创建客户账号
如需创建客户账号,请使用以下 POST
请求并添加授权令牌:
POST https://reseller.googleapis.com/apps/reseller/v1/customers
在新客户的账号中创建用户。
如果响应返回 HTTP 409 Conflict
状态代码,则表示 customerId
已存在。在注册客户账号之前,您必须转移客户的订阅。
如果适用,请更改客户的默认语言。
将用户提升为超级管理员角色。
创建管理员账号时,您可以生成临时随机密码,也可以提示客户提供密码。
通知客户,他们必须登录管理控制台并签署《Google Workspace 转销商协议》,才能激活其账号。转销商不得代表客户签署《服务条款》。
客户类型
您可以在 Google Workspace 中创建两种类型的客户:
- 通过域名验证的客户。这些客户需要 Gmail,并且需要完整的管理员访问权限。创建此类客户时,请将
customerType
设置为 domain
。
- 通过电子邮件地址验证的客户。这些客户不拥有或管理自己的网域。创建此类客户时,请将
customerType
设置为 team
。这类客户可以购买 Google Workspace 的基本功能版和企业基本功能版。
以下 JSON 请求正文示例展示了已验证网域的客户:
{
"customerDomain": "DOMAIN_NAME",
"customerType": "domain",
"postalAddress": {
"contactName": "NAME",
"organizationName": "ORGANIZATION_NAME",
"postalCode": "POSTAL_CODE",
"countryCode": "COUNTRY_CODE"
},
"alternateEmail": "EMAIL_ADDRESS"
}
替换以下内容:
DOMAIN_NAME
:客户的网域,例如 example.com
NAME
:客户的名称,例如 Alex Cruz
。
ORGANIZATION_NAME
:客户的组织名称,例如 Example Organization
。
POSTAL_CODE
:客户的邮政编码,例如 94043
。
COUNTRY_CODE
:客户的 2 个字符的 ISO 国家/地区代码。
EMAIL_ADDRESS
:客户的电子邮件地址,例如 cruz@example.com
。
如果响应成功,则会返回 HTTP 200
状态代码和新客户的信息:
{
"kind": "reseller#customer",
"customerId": "CUSTOMER_ID",
"customerDomain": "DOMAIN_NAME",
"customerType": "domain",
"postalAddress": {
"kind": "customers#address",
"contactName": "NAME",
"organizationName": "ORGANIZATION_NAME",
"postalCode": "POSTAL_CODE",
"countryCode": "COUNTRY_CODE",
},
"alternateEmail": "EMAIL_ADDRESS"
}
以下 JSON 请求正文是经过电子邮件验证的客户的示例:
{
"customerDomain": "DOMAIN_NAME",
"customerType": "team",
"primaryAdmin": {
"primaryEmail": "EMAIL_ADDRESS"
},
"postalAddress": {
"contactName": "NAME",
"organizationName": "ORGANIZATION_NAME",
"postalCode": "POSTAL_CODE",
"countryCode": "COUNTRY_CODE"
},
"alternateEmail": "EMAIL_ADDRESS"
}
如果响应成功,则会返回 HTTP 200
状态代码和新客户的信息:
{
"kind": "reseller#customer",
"customerId": "CUSTOMER_ID",
"customerDomain": "DOMAIN_NAME,
"customerType": "team",
"primaryAdmin": {
"primaryEmail": "EMAIL_ADDRESS"
},
"postalAddress": {
"kind": "customers#address",
"contactName": "NAME",
"organizationName": "ORGANIZATION_NAME",
"postalCode": "POSTAL_CODE",
"countryCode": "COUNTRY_CODE",
},
"alternateEmail": "EMAIL_ADDRESS"
}
更改客户的默认语言
客户的默认语言仅适用于新用户,且仅在创建新用户时应用。即使您更新了默认语言,现有用户仍会保留当前语言。因此,您必须先设置客户默认语言,然后才能创建任何用户。
新创建的客户的默认语言为英语。如需更改默认语言,请使用 Directory API Customers 端点的 PATCH
或 UPDATE
调用。
使用 Directory API 更新客户的默认 language
值:
PATCH https://reseller.googleapis.com/admin/directory/v1/customers/CUSTOMER_ID
添加以下 JSON 请求正文:
{
"language":"LANGUAGE_CODE"
}
替换以下内容:
CUSTOMER_ID
:客户的唯一标识符,例如 C0123456
LANGUAGE_CODE
:接受的语言代码,例如 es
表示西班牙语。
成功的 JSON 响应会返回 HTTP 200
状态代码和更新后的客户资源:
{
"alternateEmail": "EMAIL_ADDRESS",
"customerCreationTime": "2022-12-12T23:04:10.620Z",
"customerDomain": "DOMAIN_NAME",
"id": "CUSTOMER_ID",
"kind": "admin#directory#customer",
"language": "LANGUAGE_CODE",
"postalAddress": {
"contactName": "NAME",
"countryCode": "COUNTRY_CODE",
"organizationName": "ORGANIZATION_NAME",
"postalCode": "POSTAL_CODE"
}
}
后续步骤
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-29。
[null,null,["最后更新时间 (UTC):2025-08-29。"],[],[],null,["# Order a new customer account\n\nBefore you create a new customer account, consider the following:\n\n- Country code restrictions might apply. To confirm that the customer's country is approved for resale, check [the Partner Sales Console](https://channelservices.cloud.google.com/).\n- If the account is created by upgrading from a consumer Gmail account to a business email with a domain name, make sure that the account has additional Google Workspace settings unlocked. For more information, see [Create business emails for your team](https://support.google.com/work/mail/faq/6233331#6241806) and [Create a business email alias](https://support.google.com/work/mail/faq/6233331#6243069).\n\nCreate a customer account\n-------------------------\n\n1. To create a customer account, use the following `POST` request and\n include the authorization token:\n\n POST https://reseller.googleapis.com/apps/reseller/v1/customers\n\n2. Within the new customer's account,\n [create a user](/workspace/admin/directory/v1/guides/manage-users#create_user).\n If the response returns an HTTP `409 Conflict` status code, the\n `customerId` already exists. Before registering the customer account, you must\n [transfer the customer's subscriptions](/workspace/admin/reseller/v1/how-tos/manage_subscriptions#transfer_a_subscription).\n\n3. If applicable, [change the customer's default launguage](#change_a_customers_default_language).\n\n4. Promote the\n [user to the super administrator role](/workspace/admin/directory/v1/guides/manage-users#make_admin).\n When creating the administrator account, you can either generate a temporary\n random password or prompt the customer to provide a password.\n\n5. Notify the customer that they must sign-in to the Admin console and\n sign the Google Workspace via Reseller agreement in order to activate\n their account. Resellers are prohibited from signing the Terms of Service on\n the customer's behalf.\n\n### Types of customers\n\nYou can create two kinds of customers on Google Workspace:\n\n- **Domain-verified customers** . These customers need Gmail and need full administrator access. When you create this type of customer, set the `customerType` to `domain`.\n- **Email-verified customers** . These customers don't own or manage their domain. When you create this type of customer, set the `customerType` to `team`. These type of customers can purchase the [Essentials and Enterprise Essentials](https://support.google.com/channelservices/answer/9398241?ref_topic=9755957) editions of Google Workspace.\n\nThe following JSON request body is an example of a domain-verified customer: \n\n```\n{\n \"customerDomain\": \"DOMAIN_NAME\",\n \"customerType\": \"domain\",\n \"postalAddress\": {\n \"contactName\": \"NAME\",\n \"organizationName\": \"ORGANIZATION_NAME\",\n \"postalCode\": \"POSTAL_CODE\",\n \"countryCode\": \"COUNTRY_CODE\"\n },\n \"alternateEmail\": \"EMAIL_ADDRESS\"\n}\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eDOMAIN_NAME\u003c/var\u003e: your customer's domain---for example, `example.com`\n- \u003cvar translate=\"no\"\u003eNAME\u003c/var\u003e: your customer's name---for example, `Alex Cruz`.\n- \u003cvar translate=\"no\"\u003eORGANIZATION_NAME\u003c/var\u003e: your customer's organization name---for example, `Example Organization`.\n- \u003cvar translate=\"no\"\u003ePOSTAL_CODE\u003c/var\u003e: your customer's ZIP or postal code---for example, `94043`.\n- \u003cvar translate=\"no\"\u003eCOUNTRY_CODE\u003c/var\u003e: your customer's 2 character [ISO country code](https://countrycode.org/).\n- \u003cvar translate=\"no\"\u003eEMAIL_ADDRESS\u003c/var\u003e: your customer's email address---for example, `cruz@example.com`.\n\nA successful response returns an HTTP `200` status code and the new customer's\ninformation: \n\n```\n{\n \"kind\": \"reseller#customer\",\n \"customerId\": \"CUSTOMER_ID\",\n \"customerDomain\": \"DOMAIN_NAME\",\n \"customerType\": \"domain\",\n \"postalAddress\": {\n \"kind\": \"customers#address\",\n \"contactName\": \"NAME\",\n \"organizationName\": \"ORGANIZATION_NAME\",\n \"postalCode\": \"POSTAL_CODE\",\n \"countryCode\": \"COUNTRY_CODE\",\n },\n \"alternateEmail\": \"EMAIL_ADDRESS\"\n}\n```\n\nThe following JSON request body is an example of an email-verified customer: \n\n```\n{\n \"customerDomain\": \"DOMAIN_NAME\",\n \"customerType\": \"team\",\n \"primaryAdmin\": {\n \"primaryEmail\": \"EMAIL_ADDRESS\"\n },\n \"postalAddress\": {\n \"contactName\": \"NAME\",\n \"organizationName\": \"ORGANIZATION_NAME\",\n \"postalCode\": \"POSTAL_CODE\",\n \"countryCode\": \"COUNTRY_CODE\"\n },\n \"alternateEmail\": \"EMAIL_ADDRESS\"\n}\n```\n\nA successful response returns an HTTP `200` status code and the new customer's\ninformation: \n\n```\n{\n \"kind\": \"reseller#customer\",\n \"customerId\": \"CUSTOMER_ID\",\n \"customerDomain\": \"DOMAIN_NAME,\n \"customerType\": \"team\",\n \"primaryAdmin\": {\n \"primaryEmail\": \"EMAIL_ADDRESS\"\n },\n \"postalAddress\": {\n \"kind\": \"customers#address\",\n \"contactName\": \"NAME\",\n \"organizationName\": \"ORGANIZATION_NAME\",\n \"postalCode\": \"POSTAL_CODE\",\n \"countryCode\": \"COUNTRY_CODE\",\n },\n \"alternateEmail\": \"EMAIL_ADDRESS\"\n}\n```\n\nChange a customer's default language\n------------------------------------\n\nA customer's default language is only applied to *new* users when they're\ncreated. Existing users retain their current language even after you\nupdate the default language. Therefore, you must set the customer default\nlanguage before you create any users.\n\nA newly created customer has a default language of English. To change the\ndefault language, use the\n[`PATCH`](/workspace/admin/directory/v1/reference/customers/patch)\nor\n[`UPDATE`](/workspace/admin/directory/v1/reference/customers/update)\ncalls from the Directory API\n[Customers](/workspace/admin/directory/v1/reference/customers)\nendpoint.\n\nUse the Directory API to update the default `language` value for a customer: \n\n```\nPATCH https://reseller.googleapis.com/admin/directory/v1/customers/CUSTOMER_ID\n```\n\nInclude the following JSON request body: \n\n```\n{\n \"language\":\"LANGUAGE_CODE\"\n}\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eCUSTOMER_ID\u003c/var\u003e: a unique identifier for your customer---for example, `C0123456`\n- \u003cvar translate=\"no\"\u003eLANGUAGE_CODE\u003c/var\u003e: an accepted [language code](/workspace/admin/directory/v1/languages) ---for example, `es` for Spanish.\n\nA successful JSON response returns an HTTP `200` status code and the updated\ncustomer resource: \n\n```\n{\n \"alternateEmail\": \"EMAIL_ADDRESS\",\n \"customerCreationTime\": \"2022-12-12T23:04:10.620Z\",\n \"customerDomain\": \"DOMAIN_NAME\",\n \"id\": \"CUSTOMER_ID\",\n \"kind\": \"admin#directory#customer\",\n \"language\": \"LANGUAGE_CODE\",\n \"postalAddress\": {\n \"contactName\": \"NAME\",\n \"countryCode\": \"COUNTRY_CODE\",\n \"organizationName\": \"ORGANIZATION_NAME\",\n \"postalCode\": \"POSTAL_CODE\"\n }\n}\n```\n\nNext steps\n----------\n\n- [Reseller API common errors](/workspace/admin/reseller/v1/support/reseller_api_common_errors)\n- [Directory API common errors](/workspace/admin/reseller/v1/support/directory_api_common_errors)"]]