# Method: accounts.customers.entitlements.create

- [HTTP request](https://docs.cloud.google.com/channel/docs/reference/rest/v1/accounts.customers.entitlements/create#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/channel/docs/reference/rest/v1/accounts.customers.entitlements/create#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/channel/docs/reference/rest/v1/accounts.customers.entitlements/create#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/channel/docs/reference/rest/v1/accounts.customers.entitlements/create#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/channel/docs/reference/rest/v1/accounts.customers.entitlements/create#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/channel/docs/reference/rest/v1/accounts.customers.entitlements/create#body.aspect)
- [Try it!](https://docs.cloud.google.com/channel/docs/reference/rest/v1/accounts.customers.entitlements/create#try-it)

Creates an entitlement for a customer.

Possible error codes:

- PERMISSION_DENIED:
  - The customer doesn't belong to the reseller.
  - The reseller is not authorized to transact on this Product. See <https://support.google.com/channelservices/answer/9759265>
- INVALID_ARGUMENT:
  - Required request parameters are missing or invalid.
  - There is already a customer entitlement for a SKU from the same product family.
- INVALID_VALUE: Make sure the OfferId is valid. If it is, contact Google Channel support for further troubleshooting.
- NOT_FOUND: The customer or offer resource was not found.
- ALREADY_EXISTS:
  - The SKU was already purchased for the customer.
  - The customer's primary email already exists. Retry after changing the customer's primary contact email.
- CONDITION_NOT_MET or FAILED_PRECONDITION:
  - The domain required for purchasing a SKU has not been verified.
  - A pre-requisite SKU required to purchase an Add-On SKU is missing. For example, Google Workspace Business Starter is required to purchase Vault or Drive.
  - (Developer accounts only) Reseller and resold domain must meet the following naming requirements:
    - Domain names must start with goog-test.
    - Domain names must include the reseller domain.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

To get the results of the operation, call the operations.get method of CloudChannelOperationsService. The Operation metadata will contain an instance of `OperationMetadata`.

### HTTP request

`POST https://cloudchannel.googleapis.com/v1/{parent=accounts/*/customers/*}/entitlements`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The resource name of the reseller's customer account in which to create the entitlement. Parent uses the format: accounts/{account_id}/customers/{customer_id} |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "entitlement": { object (`https://docs.cloud.google.com/channel/docs/reference/rest/v1/accounts.customers.entitlements#Entitlement`) }, "requestId": string } ``` |

| Fields ||
|---|---|
| `entitlement` | ``object (`https://docs.cloud.google.com/channel/docs/reference/rest/v1/accounts.customers.entitlements#Entitlement`)`` Required. The entitlement to create. |
| `requestId` | `string` Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete. For example, you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if it received the original operation with the same request ID. If it did, it will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`). |

### Response body

If successful, the response body contains a newly created instance of `https://docs.cloud.google.com/channel/docs/reference/rest/Shared.Types/ListOperationsResponse#Operation`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/apps.order`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).