# REST Resource: customers

- [Resource: Customer](https://developers.google.com/workspace/admin/reseller/reference/rest/v1/customers#Customer)
  - [JSON representation](https://developers.google.com/workspace/admin/reseller/reference/rest/v1/customers#Customer.SCHEMA_REPRESENTATION)
- [Address](https://developers.google.com/workspace/admin/reseller/reference/rest/v1/customers#Address)
  - [JSON representation](https://developers.google.com/workspace/admin/reseller/reference/rest/v1/customers#Address.SCHEMA_REPRESENTATION)
- [CustomerType](https://developers.google.com/workspace/admin/reseller/reference/rest/v1/customers#CustomerType)
- [PrimaryAdmin](https://developers.google.com/workspace/admin/reseller/reference/rest/v1/customers#PrimaryAdmin)
  - [JSON representation](https://developers.google.com/workspace/admin/reseller/reference/rest/v1/customers#PrimaryAdmin.SCHEMA_REPRESENTATION)
- [Methods](https://developers.google.com/workspace/admin/reseller/reference/rest/v1/customers#METHODS_SUMMARY)

## Resource: Customer

When a Google customer's account is registered with a reseller, the customer's subscriptions for Google services are managed by this reseller. A customer is described by a primary domain name and a physical address.

| JSON representation |
|---|
| ``` { "customerId": string, "customerDomain": string, "postalAddress": { object (`https://developers.google.com/workspace/admin/reseller/reference/rest/v1/customers#Address`) }, "phoneNumber": string, "alternateEmail": string, "resourceUiUrl": string, "customerDomainVerified": boolean, "kind": string, "customerType": enum (`https://developers.google.com/workspace/admin/reseller/reference/rest/v1/customers#CustomerType`), "primaryAdmin": { object (`https://developers.google.com/workspace/admin/reseller/reference/rest/v1/customers#PrimaryAdmin`) } } ``` |

| Fields ||
|---|---|
| `customerId` | `string` This property will always be returned in a response as the unique identifier generated by Google. In a request, this property can be either the primary domain or the unique identifier generated by Google. |
| `customerDomain` | `string` The customer's primary domain name string. `customerDomain` is required when creating a new customer. Do not include the `www` prefix in the domain when adding a customer. |
| `postalAddress` | ``object (`https://developers.google.com/workspace/admin/reseller/reference/rest/v1/customers#Address`)`` A customer's address information. Each field has a limit of 255 charcters. |
| `phoneNumber` | `string` Customer contact phone number. Must start with "+" followed by the country code. The rest of the number can be contiguous numbers or respect the phone [local format conventions](http://wikipedia.org/wiki/Local_conventions_for_writing_telephone_numbers), but it must be a real phone number and not, for example, "123". This field is silently ignored if invalid. |
| `alternateEmail` | `string` Like the "Customer email" in the reseller tools, this email is the secondary contact used if something happens to the customer's service such as service outage or a security issue. This property is required when creating a new "domain" customer and should not use the same domain as `customerDomain`. The `alternateEmail` field is not necessary to create a "team" customer. |
| `resourceUiUrl` | `string` URL to customer's Admin console dashboard. The read-only URL is generated by the API service. This is used if your client application requires the customer to complete a task in the Admin console. |
| `customerDomainVerified` | `boolean` Whether the customer's primary domain has been verified. |
| `kind` | `string` Identifies the resource as a customer. Value: `reseller#customer` |
| `customerType` | ``enum (`https://developers.google.com/workspace/admin/reseller/reference/rest/v1/customers#CustomerType`)`` Identifies the type of the customer. Acceptable values include: - `domain`: Implies a domain-verified customer (default). - `team`: Implies an email-verified customer. For more information, see [managed teams](https://support.google.com/a/users/answer/9939479). |
| `primaryAdmin` | ``object (`https://developers.google.com/workspace/admin/reseller/reference/rest/v1/customers#PrimaryAdmin`)`` The first admin details of the customer, present in case of TEAM customer. |

## Address

JSON template for address of a customer.

| JSON representation |
|---|
| ``` { "countryCode": string, "kind": string, "region": string, "addressLine2": string, "locality": string, "addressLine3": string, "postalCode": string, "addressLine1": string, "organizationName": string, "contactName": string } ``` |

| Fields ||
|---|---|
| `countryCode` | `string` For `countryCode` information, see the [ISO 3166 country code elements](http://www.iso.org/iso/country_codes.htm). Verify that country is [approved](https://www.cloudconnect.goog/docs/DOC-29141) for resale of Google products. This property is required when creating a new customer. |
| `kind` | `string` Identifies the resource as a customer address. Value: `customers#address` |
| `region` | `string` An example of a `region` value is `CA` for the state of California. |
| `addressLine2` | `string` Line 2 of the address. |
| `locality` | `string` An example of a `locality` value is the city of `San Francisco`. |
| `addressLine3` | `string` Line 3 of the address. |
| `postalCode` | `string` A `postalCode` example is a postal zip code such as `94043`. This property is required when creating a new customer. |
| `addressLine1` | `string` A customer's physical address. An address can be composed of one to three lines. The `addressline2` and `addressLine3` are optional. |
| `organizationName` | `string` The company or company division name. This is required. |
| `contactName` | `string` The customer contact's name. This is required. |

## CustomerType

Type of the customer

| Enums ||
|---|---|
| `customerTypeUnspecified` | Customer type not known |
| `domain` | Domained or domain-owning customers |
| `team` | Domainless or email-verified customers |

## PrimaryAdmin

JSON template for primary admin in case of TEAM customers

| JSON representation |
|---|
| ``` { "primaryEmail": string } ``` |

| Fields ||
|---|---|
| `primaryEmail` | `string` The business email of the primary administrator of the customer. The email verification link is sent to this email address at the time of customer creation. Primary administrators have access to the customer's Admin Console, including the ability to invite and evict users and manage the administrative needs of the customer. |

| ## Methods ||
|---|---|
| ### `https://developers.google.com/workspace/admin/reseller/reference/rest/v1/customers/get` | Gets a customer account. |
| ### `https://developers.google.com/workspace/admin/reseller/reference/rest/v1/customers/insert` | Orders a new customer's account. |
| ### `https://developers.google.com/workspace/admin/reseller/reference/rest/v1/customers/patch` | Updates a customer account's settings. |
| ### `https://developers.google.com/workspace/admin/reseller/reference/rest/v1/customers/update` | Updates a customer account's settings. |