REST Resource: customers
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
資源:Customer
JSON 表示法 |
{
"id": string,
"customerDomain": string,
"kind": string,
"etag": string,
"alternateEmail": string,
"customerCreationTime": string,
"postalAddress": {
object (CustomerPostalAddress )
},
"phoneNumber": string,
"language": string
} |
欄位 |
id |
string
客戶 Google Workspace 帳戶的專屬 ID。(唯讀)
|
customerDomain |
string
客戶的主網域名稱字串。建立新客戶時,請勿輸入 www 前置字元。
|
kind |
string
將資源標示為客戶。值:admin#directory#customer
|
etag |
string
資源的 ETag。
|
alternateEmail |
string
客戶的次要聯絡電子郵件地址。此電子郵件地址不得與 customerDomain 位於相同網域
|
customerCreationTime |
string
客戶的建立時間 (唯讀)
|
postalAddress |
object (CustomerPostalAddress )
客戶的郵寄地址資訊。
|
phoneNumber |
string
客戶的聯絡電話號碼,格式為 E.164。
|
language |
string
客戶的 ISO 639-2 語言代碼。如需支援的代碼清單,請參閱「語言代碼」頁面。API 會接受支援集合以外的有效語言代碼,但可能會導致非預期的行為。預設值為 en 。
|
CustomerPostalAddress
JSON 表示法 |
{
"countryCode": string,
"addressLine2": string,
"region": string,
"addressLine3": string,
"locality": string,
"postalCode": string,
"addressLine1": string,
"organizationName": string,
"contactName": string
} |
欄位 |
countryCode |
string
這是必要屬性。如需 countryCode 相關資訊,請參閱 ISO 3166 國家/地區代碼元素。
|
addressLine2 |
string
地址的第二行。
|
region |
string
區域名稱。範例區域值為 NY (紐約州)。
|
addressLine3 |
string
地址的地址 3。
|
locality |
string
地點名稱。例如 San Francisco 這個城市的地區值。
|
postalCode |
string
郵遞區號。郵遞區號的範例是郵遞區號,例如 10009 。這項做法符合 http: //portablecontacts.net/draft-spec.html#address_element 的規範。
|
addressLine1 |
string
客戶的實際地址。地址可包含一到三行。
|
organizationName |
string
公司名稱或公司部門名稱。
|
contactName |
string
客戶聯絡人的姓名。
|
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-24 (世界標準時間)。
[null,null,["上次更新時間:2025-07-24 (世界標準時間)。"],[],[],null,["# REST Resource: customers\n\nResource: Customer\n------------------\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"id\": string, \"customerDomain\": string, \"kind\": string, \"etag\": string, \"alternateEmail\": string, \"customerCreationTime\": string, \"postalAddress\": { object (/workspace/admin/directory/reference/rest/v1/customers#CustomerPostalAddress) }, \"phoneNumber\": string, \"language\": string } ``` |\n\n| Fields ||\n|------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `id` | `string` The unique ID for the customer's Google Workspace account. (Readonly) |\n| `customerDomain` | `string` The customer's primary domain name string. Do not include the `www` prefix when creating a new customer. |\n| `kind` | `string` Identifies the resource as a customer. Value: `admin#directory#customer` |\n| `etag` | `string` ETag of the resource. |\n| `alternateEmail` | `string` The customer's secondary contact email address. This email address cannot be on the same domain as the `customerDomain` |\n| `customerCreationTime` | `string` The customer's creation time (Readonly) |\n| `postalAddress` | `object (`[CustomerPostalAddress](/workspace/admin/directory/reference/rest/v1/customers#CustomerPostalAddress)`)` The customer's postal address information. |\n| `phoneNumber` | `string` The customer's contact phone number in [E.164](https://en.wikipedia.org/wiki/E.164) format. |\n| `language` | `string` The customer's ISO 639-2 language code. See the [Language Codes](https://developers.google.com/workspace/admin/directory/v1/languages) page for the list of supported codes. Valid language codes outside the supported set will be accepted by the API but may lead to unexpected behavior. The default value is `en`. |\n\nCustomerPostalAddress\n---------------------\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"countryCode\": string, \"addressLine2\": string, \"region\": string, \"addressLine3\": string, \"locality\": string, \"postalCode\": string, \"addressLine1\": string, \"organizationName\": string, \"contactName\": string } ``` |\n\n| Fields ||\n|--------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `countryCode` | `string` This is a required property. For `countryCode` information see the [ISO 3166 country code elements](https://www.iso.org/iso/country_codes.htm). |\n| `addressLine2` | `string` Address line 2 of the address. |\n| `region` | `string` Name of the region. An example of a region value is `NY` for the state of New York. |\n| `addressLine3` | `string` Address line 3 of the address. |\n| `locality` | `string` Name of the locality. An example of a locality value is the city of `San Francisco`. |\n| `postalCode` | `string` The postal code. A postalCode example is a postal zip code such as `10009`. This is in accordance with - http: //portablecontacts.net/draft-spec.html#address_element. |\n| `addressLine1` | `string` A customer's physical address. The address can be composed of one to three lines. |\n| `organizationName` | `string` The company or company division name. |\n| `contactName` | `string` The customer contact's name. |\n\n| Methods ------- ||\n|-----------------------------------------------------------------------------|-----------------------|\n| ### [get](/workspace/admin/directory/reference/rest/v1/customers/get) | Retrieves a customer. |\n| ### [patch](/workspace/admin/directory/reference/rest/v1/customers/patch) | Patches a customer. |\n| ### [update](/workspace/admin/directory/reference/rest/v1/customers/update) | Updates a customer. |"]]