customers
Creates, updates, deletes, gets or lists a customers
resource.
Overview
Name | customers |
Type | Resource |
Id | googleadmin.directory.customers |
Fields
The following fields are returned by SELECT
queries:
- get
Successful response
Name | Datatype | Description |
---|---|---|
id | string | The unique ID for the customer's Google Workspace account. (Readonly) |
alternateEmail | string | The customer's secondary contact email address. This email address cannot be on the same domain as the customerDomain |
customerCreationTime | string (date-time) | The customer's creation time (Readonly) |
customerDomain | string | The customer's primary domain name string. Do not include the www prefix when creating a new customer. |
etag | string | ETag of the resource. |
kind | string | Identifies the resource as a customer. Value: admin#directory#customer (default: admin#directory#customer) |
language | string | The customer's ISO 639-2 language code. See the Language Codes 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 . |
phoneNumber | string | The customer's contact phone number in E.164 format. |
postalAddress | object | The customer's postal address information. (id: CustomerPostalAddress) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | customerKey | Retrieves a customer. | |
patch | update | customerKey | Patches a customer. | |
update | replace | customerKey | Updates a customer. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
customerKey | string |
SELECT
examples
- get
Retrieves a customer.
SELECT
id,
alternateEmail,
customerCreationTime,
customerDomain,
etag,
kind,
language,
phoneNumber,
postalAddress
FROM googleadmin.directory.customers
WHERE customerKey = '{{ customerKey }}' -- required;
UPDATE
examples
- patch
Patches a customer.
UPDATE googleadmin.directory.customers
SET
data__id = '{{ id }}',
data__customerDomain = '{{ customerDomain }}',
data__kind = '{{ kind }}',
data__etag = '{{ etag }}',
data__alternateEmail = '{{ alternateEmail }}',
data__customerCreationTime = '{{ customerCreationTime }}',
data__postalAddress = '{{ postalAddress }}',
data__phoneNumber = '{{ phoneNumber }}',
data__language = '{{ language }}'
WHERE
customerKey = '{{ customerKey }}' --required
RETURNING
id,
alternateEmail,
customerCreationTime,
customerDomain,
etag,
kind,
language,
phoneNumber,
postalAddress;
REPLACE
examples
- update
Updates a customer.
REPLACE googleadmin.directory.customers
SET
data__id = '{{ id }}',
data__customerDomain = '{{ customerDomain }}',
data__kind = '{{ kind }}',
data__etag = '{{ etag }}',
data__alternateEmail = '{{ alternateEmail }}',
data__customerCreationTime = '{{ customerCreationTime }}',
data__postalAddress = '{{ postalAddress }}',
data__phoneNumber = '{{ phoneNumber }}',
data__language = '{{ language }}'
WHERE
customerKey = '{{ customerKey }}' --required
RETURNING
id,
alternateEmail,
customerCreationTime,
customerDomain,
etag,
kind,
language,
phoneNumber,
postalAddress;