REST Resource: customers
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Tài nguyên: Khách hàng
Biểu diễn dưới dạng JSON |
{
"id": string,
"customerDomain": string,
"kind": string,
"etag": string,
"alternateEmail": string,
"customerCreationTime": string,
"postalAddress": {
object (CustomerPostalAddress )
},
"phoneNumber": string,
"language": string
} |
Trường |
id |
string
Mã nhận dạng duy nhất cho tài khoản Google Workspace của khách hàng. (Chỉ có thể đọc)
|
customerDomain |
string
Chuỗi tên miền chính của khách hàng. Không thêm tiền tố www khi tạo khách hàng mới.
|
kind |
string
Xác định tài nguyên là khách hàng. Giá trị: admin#directory#customer
|
etag |
string
ETag của tài nguyên.
|
alternateEmail |
string
Địa chỉ email liên hệ phụ của khách hàng. Địa chỉ email này không được nằm trên cùng miền với customerDomain
|
customerCreationTime |
string
Thời gian tạo khách hàng (Chỉ có thể đọc)
|
postalAddress |
object (CustomerPostalAddress )
Thông tin địa chỉ bưu chính của khách hàng.
|
phoneNumber |
string
Số điện thoại liên hệ của khách hàng ở định dạng E.164.
|
language |
string
Mã ngôn ngữ ISO 639-2 của khách hàng. Hãy xem trang Mã ngôn ngữ để biết danh sách các mã được hỗ trợ. API sẽ chấp nhận các mã ngôn ngữ hợp lệ nằm ngoài tập hợp được hỗ trợ, nhưng có thể dẫn đến hành vi không mong muốn. Giá trị mặc định là en .
|
CustomerPostalAddress
Biểu diễn dưới dạng JSON |
{
"countryCode": string,
"addressLine2": string,
"region": string,
"addressLine3": string,
"locality": string,
"postalCode": string,
"addressLine1": string,
"organizationName": string,
"contactName": string
} |
Trường |
countryCode |
string
Đây là thuộc tính bắt buộc. Để biết thông tin về countryCode , hãy xem các phần tử mã quốc gia theo tiêu chuẩn ISO 3166.
|
addressLine2 |
string
Dòng địa chỉ thứ hai của địa chỉ.
|
region |
string
Tên khu vực. Ví dụ về giá trị khu vực là NY cho tiểu bang New York.
|
addressLine3 |
string
Dòng địa chỉ 3 của địa chỉ.
|
locality |
string
Tên địa phương. Ví dụ về giá trị địa phương là thành phố San Francisco .
|
postalCode |
string
Mã bưu chính. Ví dụ về postalCode là mã zip bưu chính, chẳng hạn như 10009 . Điều này tuân thủ - http: //portablecontacts.net/draft-spec.html#address_element.
|
addressLine1 |
string
Địa chỉ thực tế của khách hàng. Địa chỉ có thể bao gồm từ một đến ba dòng.
|
organizationName |
string
Tên công ty hoặc bộ phận công ty.
|
contactName |
string
Tên người liên hệ của khách hàng.
|
Phương thức |
|
Truy xuất khách hàng. |
|
Vá một khách hàng. |
|
Cập nhật thông tin về khách hàng. |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-24 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-24 UTC."],[],[],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. |"]]