> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# IsEligible

# Package: businessEmail

# Namespace: GoogleProductEligibility

# Method link: https://dev.wix.com/docs/api-reference/account-level/premium/business-email/google-subscription-v1/is-eligible.md

## Permission Scopes:
Read Business Email: SCOPE.ACC-DC-PREMIUM.READ-MAILBOXES

## Introduction

Checks whether the caller's account can purchase a Google product for a domain.

Specify the product in `productTypeId`. Supported products: Business Email, Business Email for Base44, Google Workspace, and the Google Voice add-on.

The response contains either an eligible result, with the maximum number of seats the account can purchase, or a not-eligible result that lists the reasons.

To check eligibility to upgrade an existing Business Email subscription, specify `existingSubscriptionPremiumId`.

---

## REST API

### Schema

```
 Method: isEligible
 Description: Checks whether the caller's account can purchase a Google product for a domain.  Specify the product in `productTypeId`. Supported products: Business Email, Business Email for Base44, Google Workspace, and the Google Voice add-on.  The response contains either an eligible result, with the maximum number of seats the account can purchase, or a not-eligible result that lists the reasons.  To check eligibility to upgrade an existing Business Email subscription, specify `existingSubscriptionPremiumId`.
 URL: https://www.wixapis.com/google-subscriptions/v1/google-subscriptions/is-eligible
 Method: GET
 Method parameters:
   query param name: domainName | type: domainName | description: Domain to check. For example, `my-domain.com`.  | validation: format HOSTNAME
   query param name: existingSubscriptionPremiumId | type: existingSubscriptionPremiumId | description: Premium subscription GUID of an existing Business Email subscription, when checking eligibility to upgrade it.  | validation: format GUID
   param name: postEligibility | type: PostEligibilityActions    
        - name: ignoreReasons | type: array<NotEligibleReason> | description: Not-eligible reasons to ignore.  A reason is ignored only when it exactly matches a reason the check returns, including its fields, such as `domainName`.  | validation: minItems 1, maxItems 10
           - ONE-OF: 
              - name: invalidRequestedSeats | type: InvalidRequestedSeats | description: Requested number of seats isn't valid. Reserved, and currently not returned.  
                 - name: availableSeats | type: integer | description: Number of seats that can be purchased.  
                 - name: requestedSeat | type: integer | description: Number of seats requested.  
              - name: noGwsFound | type: NoGWSFound | description: The account has no active Business Email subscription, which the product requires.  
       EMPTY-OBJECT {}
              - name: incompatibleGws | type: IncompatibleWithCurrentGWSProduct | description: The account's current Google Workspace product isn't compatible with the product. Reserved, and currently not returned.  
                 - name: gwsSkuId | type: string | description: Google SKU GUID of the account's current Google Workspace product.  | validation: maxLength 16
              - name: acceptTosRequired | type: AcceptTosRequired | description: The customer must accept Google's terms of service first. Reserved, and currently not returned.  
                 - name: acceptTosGwsId | type: string | description: GUID of the Google Workspace subscription whose terms of service must be accepted.  | validation: format GUID
              - name: alreadyTaken | type: GoogleCustomerAlreadyTakenOnGoogle | description: Another Google customer already uses the domain. Reserved, and currently not returned.  
                 - name: domainName | type: string | description: Domain another Google customer already uses.  | validation: format HOSTNAME
              - name: emailPackageAlreadyExists | type: EmailPackageAlreadyExists | description: The domain already has a Business Email package.  
                 - name: domainName | type: string | description: Domain that already has a Business Email package.  | validation: format HOSTNAME
                 - name: targetAccountId | type: string | description: GUID of the Wix account that owns the existing package.  | validation: format GUID
              - name: domainNotOwnedByUser | type: DomainNotOwnedByUser | description: The caller's account doesn't own the domain.  
                 - name: domainName | type: string | description: Domain the caller's account doesn't own.  | validation: format HOSTNAME
              - name: domainNotFound | type: DomainNotFound | description: Couldn't find the domain.  
                 - name: domainName | type: string | description: Domain that couldn't be found.  | validation: format HOSTNAME
              - name: noPurchasableSkus | type: NoPurchasableSkus | description: No products are available to purchase for the domain. Reserved, and currently not returned.  
                 - name: domainName | type: string | description: Domain with no products available to purchase.  | validation: format HOSTNAME
              - name: addonAlreadyExists | type: AddonAlreadyExists | description: The account already has the add-on.  
                 - name: domainName | type: string | description: Domain whose Google Workspace already has the add-on.  | validation: format HOSTNAME
                 - name: status | type: string | description: Status of the existing add-on subscription. For example, `ACTIVE`.  | validation: maxLength 16
                 - name: productTypeId | type: string | description: Product type GUID of the existing add-on.  | validation: format GUID
              - name: notEligibleCountry | type: NotEligibleCountry | description: The product isn't available in the customer's country.  
                 - name: domainName | type: string | description: Domain that was checked.  | validation: format HOSTNAME
                 - name: countryCode | type: string | description: 2-letter code, in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format, of the country where the product isn't available.  | validation: minLength 2, maxLength 2
              - name: notEligibleCloudIdentityType | type: NotEligibleCloudIdentityType | description: Google can't set up a Google Workspace for the domain, for example because a Google customer already exists for it.  
                 - name: domainName | type: string | description: Domain that was checked.  | validation: format HOSTNAME
                 - name: reason | type: string | description: Why Google can't set up a Google Workspace for the domain.  | validation: minLength 1, maxLength 50
              - name: invalidDomainName | type: InvalidDomainName | description: The domain name isn't valid.  
                 - name: domainName | type: string | description: Domain name that isn't valid.  | validation: maxLength 200
              - name: workspaceSubscriptionAlreadyExists | type: WorkspaceSubscriptionAlreadyExists | description: The domain already has a Google Workspace subscription. Reserved, and currently not returned.  
                 - name: domainName | type: string | description: Domain that already has a Google Workspace subscription.  | validation: format HOSTNAME
                 - name: status | type: string | description: Status of the existing subscription. For example, `ACTIVE`.  | validation: maxLength 16
                 - name: productTypeId | type: string | description: Product type GUID of the existing subscription.  | validation: format GUID
              - name: restrictedDomainName | type: RestrictedDomainName | description: Google Workspace can't be set up on the domain, for example because it's a subdomain or contains a Google trademark.  
                 - name: domainName | type: string | description: Restricted domain.  | validation: maxLength 200
                 - name: reason | type: RestrictedDomainReason | description: Why the domain is restricted.  
                         - enum:
                         -     RESTRICTED_DOMAIN_REASON_UNSPECIFIED: Unknown restriction reason.
                         -     SUBDOMAIN: Not a registrable domain, e.g. app.example.com
                         -     BRAND: Contains a Google trademark, e.g. gmail / youtube
                         -     TLD: Top-level domain Google does not serve
              - name: validationFailure | type: GoogleWorkspaceValidationFailure | description: Another check failed. `reason` describes the check.  
                 - name: reason | type: string | description: Description of the check that failed.  | validation: minLength 1, maxLength 50
              - name: incompatibleSeats | type: IncompatibleGWSSeats | description: Requested number of seats isn't compatible with the current subscription. Reserved, and currently not returned.  
                 - name: seats | type: integer | description: Number of seats in the current subscription.  
   query param name: productTypeId | type: productTypeId | description: GUID of the product to check eligibility for.  Supported products: Business Email, Business Email for Base44, Google Workspace, and the Google Voice add-on.  | validation: format GUID
 Return type: IsEligibleResponse
  - name: domainName | type: string | description: Domain that was checked.  | validation: format HOSTNAME
  - name: result | type: EligibilityResult | description: Overall eligibility result.  
     - ONE-OF: 
        - name: eligible | type: Eligible | description: Returned when the account can purchase the product.  
           - name: seats | type: integer | description: Maximum number of seats the account can purchase.  For a new Business Email purchase, `20`. For an upgrade, the subscription's current number of seats plus 20. For a repurchase or transfer, the previous subscription's number of seats.  
           - name: freeTrial | type: boolean | description: Whether the purchase includes a free trial.  Currently always `false`.  
           - name: renewalType | type: RenewalType | description: Whether, and how, the purchase renews a previous subscription.  
                 - enum:
                 -     RENEWAL_TYPE_UNSPECIFIED: Not a renewal. Returned for a new purchase.
                 -     NEW_PURCHASE: New subscription purchase. Reserved, and currently not returned. A new purchase returns `RENEWAL_TYPE_UNSPECIFIED`.
                 -     REPURCHASE: Repurchase of a subscription that Wix suspended.
                 -     TRANSFER_IN: Transfer back to Wix of a subscription that was transferred out to another reseller.
        - name: notEligible | type: NotEligible | description: Returned when the account can't purchase the product.  
           - name: reasons | type: array<NotEligibleReason> | description: Reasons the account can't purchase the product.  | validation: minItems 1, maxItems 10
              - ONE-OF: 
                 - name: invalidRequestedSeats | type: InvalidRequestedSeats | description: Requested number of seats isn't valid. Reserved, and currently not returned.  
                    - name: availableSeats | type: integer | description: Number of seats that can be purchased.  
                    - name: requestedSeat | type: integer | description: Number of seats requested.  
                 - name: noGwsFound | type: NoGWSFound | description: The account has no active Business Email subscription, which the product requires.  
        EMPTY-OBJECT {}
                 - name: incompatibleGws | type: IncompatibleWithCurrentGWSProduct | description: The account's current Google Workspace product isn't compatible with the product. Reserved, and currently not returned.  
                    - name: gwsSkuId | type: string | description: Google SKU GUID of the account's current Google Workspace product.  | validation: maxLength 16
                 - name: acceptTosRequired | type: AcceptTosRequired | description: The customer must accept Google's terms of service first. Reserved, and currently not returned.  
                    - name: acceptTosGwsId | type: string | description: GUID of the Google Workspace subscription whose terms of service must be accepted.  | validation: format GUID
                 - name: alreadyTaken | type: GoogleCustomerAlreadyTakenOnGoogle | description: Another Google customer already uses the domain. Reserved, and currently not returned.  
                    - name: domainName | type: string | description: Domain another Google customer already uses.  | validation: format HOSTNAME
                 - name: emailPackageAlreadyExists | type: EmailPackageAlreadyExists | description: The domain already has a Business Email package.  
                    - name: domainName | type: string | description: Domain that already has a Business Email package.  | validation: format HOSTNAME
                    - name: targetAccountId | type: string | description: GUID of the Wix account that owns the existing package.  | validation: format GUID
                 - name: domainNotOwnedByUser | type: DomainNotOwnedByUser | description: The caller's account doesn't own the domain.  
                    - name: domainName | type: string | description: Domain the caller's account doesn't own.  | validation: format HOSTNAME
                 - name: domainNotFound | type: DomainNotFound | description: Couldn't find the domain.  
                    - name: domainName | type: string | description: Domain that couldn't be found.  | validation: format HOSTNAME
                 - name: noPurchasableSkus | type: NoPurchasableSkus | description: No products are available to purchase for the domain. Reserved, and currently not returned.  
                    - name: domainName | type: string | description: Domain with no products available to purchase.  | validation: format HOSTNAME
                 - name: addonAlreadyExists | type: AddonAlreadyExists | description: The account already has the add-on.  
                    - name: domainName | type: string | description: Domain whose Google Workspace already has the add-on.  | validation: format HOSTNAME
                    - name: status | type: string | description: Status of the existing add-on subscription. For example, `ACTIVE`.  | validation: maxLength 16
                    - name: productTypeId | type: string | description: Product type GUID of the existing add-on.  | validation: format GUID
                 - name: notEligibleCountry | type: NotEligibleCountry | description: The product isn't available in the customer's country.  
                    - name: domainName | type: string | description: Domain that was checked.  | validation: format HOSTNAME
                    - name: countryCode | type: string | description: 2-letter code, in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format, of the country where the product isn't available.  | validation: minLength 2, maxLength 2
                 - name: notEligibleCloudIdentityType | type: NotEligibleCloudIdentityType | description: Google can't set up a Google Workspace for the domain, for example because a Google customer already exists for it.  
                    - name: domainName | type: string | description: Domain that was checked.  | validation: format HOSTNAME
                    - name: reason | type: string | description: Why Google can't set up a Google Workspace for the domain.  | validation: minLength 1, maxLength 50
                 - name: invalidDomainName | type: InvalidDomainName | description: The domain name isn't valid.  
                    - name: domainName | type: string | description: Domain name that isn't valid.  | validation: maxLength 200
                 - name: workspaceSubscriptionAlreadyExists | type: WorkspaceSubscriptionAlreadyExists | description: The domain already has a Google Workspace subscription. Reserved, and currently not returned.  
                    - name: domainName | type: string | description: Domain that already has a Google Workspace subscription.  | validation: format HOSTNAME
                    - name: status | type: string | description: Status of the existing subscription. For example, `ACTIVE`.  | validation: maxLength 16
                    - name: productTypeId | type: string | description: Product type GUID of the existing subscription.  | validation: format GUID
                 - name: restrictedDomainName | type: RestrictedDomainName | description: Google Workspace can't be set up on the domain, for example because it's a subdomain or contains a Google trademark.  
                    - name: domainName | type: string | description: Restricted domain.  | validation: maxLength 200
                    - name: reason | type: RestrictedDomainReason | description: Why the domain is restricted.  
                             - enum:
                             -     RESTRICTED_DOMAIN_REASON_UNSPECIFIED: Unknown restriction reason.
                             -     SUBDOMAIN: Not a registrable domain, e.g. app.example.com
                             -     BRAND: Contains a Google trademark, e.g. gmail / youtube
                             -     TLD: Top-level domain Google does not serve
                 - name: validationFailure | type: GoogleWorkspaceValidationFailure | description: Another check failed. `reason` describes the check.  
                    - name: reason | type: string | description: Description of the check that failed.  | validation: minLength 1, maxLength 50
                 - name: incompatibleSeats | type: IncompatibleGWSSeats | description: Requested number of seats isn't compatible with the current subscription. Reserved, and currently not returned.  
                    - name: seats | type: integer | description: Number of seats in the current subscription.  
     - name: productFamilyId | type: string | description: GUID of the product family this result is for.  Returned only in `results`.  
  - name: results | type: array<EligibilityResult> | description: Eligibility result for each product family.  Returned only for the Google Voice add-on.  


```

### Examples

### Check eligibility for Business Email
Checks whether the caller's account can purchase Business Email for a domain.

```curl
curl -X GET \
'https://www.wixapis.com/google-subscriptions/v1/google-subscriptions/is-eligible?domainName=my-domain.com&productTypeId=9570ef56-e556-4282-9471-71779ad3d9b6' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.premium.googleSubscriptions.isEligible(options)
 Description: Checks whether the caller's account can purchase a Google product for a domain.  Specify the product in `productTypeId`. Supported products: Business Email, Business Email for Base44, Google Workspace, and the Google Voice add-on.  The response contains either an eligible result, with the maximum number of seats the account can purchase, or a not-eligible result that lists the reasons.  To check eligibility to upgrade an existing Business Email subscription, specify `existingSubscriptionPremiumId`.
 Method parameters:
   param name: options | type: IsEligibleOptions  none  
        - name: domainName | type: string | description: Domain to check. For example, `my-domain.com`.  | validation: format HOSTNAME
        - name: productTypeId | type: string | description: GUID of the product to check eligibility for.  Supported products: Business Email, Business Email for Base44, Google Workspace, and the Google Voice add-on.  | validation: format GUID
        - name: postEligibility | type: PostEligibilityActions | description: Not-eligible reasons to ignore when calculating the result.  
           - name: ignoreReasons | type: array<NotEligibleReason> | description: Not-eligible reasons to ignore.  A reason is ignored only when it exactly matches a reason the check returns, including its fields, such as `domainName`.  | validation: minItems 1, maxItems 10
              - ONE-OF: 
                 - name: invalidRequestedSeats | type: InvalidRequestedSeats | description: Requested number of seats isn't valid. Reserved, and currently not returned.  
                    - name: availableSeats | type: integer | description: Number of seats that can be purchased.  
                    - name: requestedSeat | type: integer | description: Number of seats requested.  
                 - name: incompatibleGws | type: IncompatibleWithCurrentGWSProduct | description: The account's current Google Workspace product isn't compatible with the product. Reserved, and currently not returned.  
                    - name: gwsSkuId | type: string | description: Google SKU GUID of the account's current Google Workspace product.  | validation: maxLength 16
                 - name: acceptTosRequired | type: AcceptTosRequired | description: The customer must accept Google's terms of service first. Reserved, and currently not returned.  
                    - name: acceptTosGwsId | type: string | description: GUID of the Google Workspace subscription whose terms of service must be accepted.  | validation: format GUID
                 - name: alreadyTaken | type: GoogleCustomerAlreadyTakenOnGoogle | description: Another Google customer already uses the domain. Reserved, and currently not returned.  
                    - name: domainName | type: string | description: Domain another Google customer already uses.  | validation: format HOSTNAME
                 - name: emailPackageAlreadyExists | type: EmailPackageAlreadyExists | description: The domain already has a Business Email package.  
                    - name: domainName | type: string | description: Domain that already has a Business Email package.  | validation: format HOSTNAME
                    - name: targetAccountId | type: string | description: GUID of the Wix account that owns the existing package.  | validation: format GUID
                 - name: domainNotOwnedByUser | type: DomainNotOwnedByUser | description: The caller's account doesn't own the domain.  
                    - name: domainName | type: string | description: Domain the caller's account doesn't own.  | validation: format HOSTNAME
                 - name: domainNotFound | type: DomainNotFound | description: Couldn't find the domain.  
                    - name: domainName | type: string | description: Domain that couldn't be found.  | validation: format HOSTNAME
                 - name: noPurchasableSkus | type: NoPurchasableSkus | description: No products are available to purchase for the domain. Reserved, and currently not returned.  
                    - name: domainName | type: string | description: Domain with no products available to purchase.  | validation: format HOSTNAME
                 - name: addonAlreadyExists | type: AddonAlreadyExists | description: The account already has the add-on.  
                    - name: domainName | type: string | description: Domain whose Google Workspace already has the add-on.  | validation: format HOSTNAME
                    - name: status | type: string | description: Status of the existing add-on subscription. For example, `ACTIVE`.  | validation: maxLength 16
                    - name: productTypeId | type: string | description: Product type GUID of the existing add-on.  | validation: format GUID
                 - name: notEligibleCountry | type: NotEligibleCountry | description: The product isn't available in the customer's country.  
                    - name: domainName | type: string | description: Domain that was checked.  | validation: format HOSTNAME
                    - name: countryCode | type: string | description: 2-letter code, in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format, of the country where the product isn't available.  | validation: minLength 2, maxLength 2
                 - name: notEligibleCloudIdentityType | type: NotEligibleCloudIdentityType | description: Google can't set up a Google Workspace for the domain, for example because a Google customer already exists for it.  
                    - name: domainName | type: string | description: Domain that was checked.  | validation: format HOSTNAME
                    - name: reason | type: string | description: Why Google can't set up a Google Workspace for the domain.  | validation: minLength 1, maxLength 50
                 - name: invalidDomainName | type: InvalidDomainName | description: The domain name isn't valid.  
                    - name: domainName | type: string | description: Domain name that isn't valid.  | validation: maxLength 200
                 - name: workspaceSubscriptionAlreadyExists | type: WorkspaceSubscriptionAlreadyExists | description: The domain already has a Google Workspace subscription. Reserved, and currently not returned.  
                    - name: domainName | type: string | description: Domain that already has a Google Workspace subscription.  | validation: format HOSTNAME
                    - name: status | type: string | description: Status of the existing subscription. For example, `ACTIVE`.  | validation: maxLength 16
                    - name: productTypeId | type: string | description: Product type GUID of the existing subscription.  | validation: format GUID
                 - name: restrictedDomainName | type: RestrictedDomainName | description: Google Workspace can't be set up on the domain, for example because it's a subdomain or contains a Google trademark.  
                    - name: domainName | type: string | description: Restricted domain.  | validation: maxLength 200
                    - name: reason | type: RestrictedDomainReason | description: Why the domain is restricted.  
                             - enum:
                             -     RESTRICTED_DOMAIN_REASON_UNSPECIFIED: Unknown restriction reason.
                             -     SUBDOMAIN: Not a registrable domain, e.g. app.example.com
                             -     BRAND: Contains a Google trademark, e.g. gmail / youtube
                             -     TLD: Top-level domain Google does not serve
                 - name: validationFailure | type: GoogleWorkspaceValidationFailure | description: Another check failed. `reason` describes the check.  
                    - name: reason | type: string | description: Description of the check that failed.  | validation: minLength 1, maxLength 50
                 - name: incompatibleSeats | type: IncompatibleGWSSeats | description: Requested number of seats isn't compatible with the current subscription. Reserved, and currently not returned.  
                    - name: seats | type: integer | description: Number of seats in the current subscription.  
        - name: existingSubscriptionPremiumId | type: string | description: Premium subscription GUID of an existing Business Email subscription, when checking eligibility to upgrade it.  | validation: format GUID
 Return type: PROMISE<IsEligibleResponse>
  - name: domainName | type: string | description: Domain that was checked.  | validation: format HOSTNAME
  - name: result | type: EligibilityResult | description: Overall eligibility result.  
     - ONE-OF: 
        - name: eligible | type: Eligible | description: Returned when the account can purchase the product.  
           - name: seats | type: integer | description: Maximum number of seats the account can purchase.  For a new Business Email purchase, `20`. For an upgrade, the subscription's current number of seats plus 20. For a repurchase or transfer, the previous subscription's number of seats.  
           - name: freeTrial | type: boolean | description: Whether the purchase includes a free trial.  Currently always `false`.  
           - name: renewalType | type: RenewalType | description: Whether, and how, the purchase renews a previous subscription.  
                 - enum:
                 -     RENEWAL_TYPE_UNSPECIFIED: Not a renewal. Returned for a new purchase.
                 -     NEW_PURCHASE: New subscription purchase. Reserved, and currently not returned. A new purchase returns `RENEWAL_TYPE_UNSPECIFIED`.
                 -     REPURCHASE: Repurchase of a subscription that Wix suspended.
                 -     TRANSFER_IN: Transfer back to Wix of a subscription that was transferred out to another reseller.
        - name: notEligible | type: NotEligible | description: Returned when the account can't purchase the product.  
           - name: reasons | type: array<NotEligibleReason> | description: Reasons the account can't purchase the product.  | validation: minItems 1, maxItems 10
              - ONE-OF: 
                 - name: invalidRequestedSeats | type: InvalidRequestedSeats | description: Requested number of seats isn't valid. Reserved, and currently not returned.  
                    - name: availableSeats | type: integer | description: Number of seats that can be purchased.  
                    - name: requestedSeat | type: integer | description: Number of seats requested.  
                 - name: incompatibleGws | type: IncompatibleWithCurrentGWSProduct | description: The account's current Google Workspace product isn't compatible with the product. Reserved, and currently not returned.  
                    - name: gwsSkuId | type: string | description: Google SKU GUID of the account's current Google Workspace product.  | validation: maxLength 16
                 - name: acceptTosRequired | type: AcceptTosRequired | description: The customer must accept Google's terms of service first. Reserved, and currently not returned.  
                    - name: acceptTosGwsId | type: string | description: GUID of the Google Workspace subscription whose terms of service must be accepted.  | validation: format GUID
                 - name: alreadyTaken | type: GoogleCustomerAlreadyTakenOnGoogle | description: Another Google customer already uses the domain. Reserved, and currently not returned.  
                    - name: domainName | type: string | description: Domain another Google customer already uses.  | validation: format HOSTNAME
                 - name: emailPackageAlreadyExists | type: EmailPackageAlreadyExists | description: The domain already has a Business Email package.  
                    - name: domainName | type: string | description: Domain that already has a Business Email package.  | validation: format HOSTNAME
                    - name: targetAccountId | type: string | description: GUID of the Wix account that owns the existing package.  | validation: format GUID
                 - name: domainNotOwnedByUser | type: DomainNotOwnedByUser | description: The caller's account doesn't own the domain.  
                    - name: domainName | type: string | description: Domain the caller's account doesn't own.  | validation: format HOSTNAME
                 - name: domainNotFound | type: DomainNotFound | description: Couldn't find the domain.  
                    - name: domainName | type: string | description: Domain that couldn't be found.  | validation: format HOSTNAME
                 - name: noPurchasableSkus | type: NoPurchasableSkus | description: No products are available to purchase for the domain. Reserved, and currently not returned.  
                    - name: domainName | type: string | description: Domain with no products available to purchase.  | validation: format HOSTNAME
                 - name: addonAlreadyExists | type: AddonAlreadyExists | description: The account already has the add-on.  
                    - name: domainName | type: string | description: Domain whose Google Workspace already has the add-on.  | validation: format HOSTNAME
                    - name: status | type: string | description: Status of the existing add-on subscription. For example, `ACTIVE`.  | validation: maxLength 16
                    - name: productTypeId | type: string | description: Product type GUID of the existing add-on.  | validation: format GUID
                 - name: notEligibleCountry | type: NotEligibleCountry | description: The product isn't available in the customer's country.  
                    - name: domainName | type: string | description: Domain that was checked.  | validation: format HOSTNAME
                    - name: countryCode | type: string | description: 2-letter code, in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format, of the country where the product isn't available.  | validation: minLength 2, maxLength 2
                 - name: notEligibleCloudIdentityType | type: NotEligibleCloudIdentityType | description: Google can't set up a Google Workspace for the domain, for example because a Google customer already exists for it.  
                    - name: domainName | type: string | description: Domain that was checked.  | validation: format HOSTNAME
                    - name: reason | type: string | description: Why Google can't set up a Google Workspace for the domain.  | validation: minLength 1, maxLength 50
                 - name: invalidDomainName | type: InvalidDomainName | description: The domain name isn't valid.  
                    - name: domainName | type: string | description: Domain name that isn't valid.  | validation: maxLength 200
                 - name: workspaceSubscriptionAlreadyExists | type: WorkspaceSubscriptionAlreadyExists | description: The domain already has a Google Workspace subscription. Reserved, and currently not returned.  
                    - name: domainName | type: string | description: Domain that already has a Google Workspace subscription.  | validation: format HOSTNAME
                    - name: status | type: string | description: Status of the existing subscription. For example, `ACTIVE`.  | validation: maxLength 16
                    - name: productTypeId | type: string | description: Product type GUID of the existing subscription.  | validation: format GUID
                 - name: restrictedDomainName | type: RestrictedDomainName | description: Google Workspace can't be set up on the domain, for example because it's a subdomain or contains a Google trademark.  
                    - name: domainName | type: string | description: Restricted domain.  | validation: maxLength 200
                    - name: reason | type: RestrictedDomainReason | description: Why the domain is restricted.  
                             - enum:
                             -     RESTRICTED_DOMAIN_REASON_UNSPECIFIED: Unknown restriction reason.
                             -     SUBDOMAIN: Not a registrable domain, e.g. app.example.com
                             -     BRAND: Contains a Google trademark, e.g. gmail / youtube
                             -     TLD: Top-level domain Google does not serve
                 - name: validationFailure | type: GoogleWorkspaceValidationFailure | description: Another check failed. `reason` describes the check.  
                    - name: reason | type: string | description: Description of the check that failed.  | validation: minLength 1, maxLength 50
                 - name: incompatibleSeats | type: IncompatibleGWSSeats | description: Requested number of seats isn't compatible with the current subscription. Reserved, and currently not returned.  
                    - name: seats | type: integer | description: Number of seats in the current subscription.  
     - name: productFamilyId | type: string | description: GUID of the product family this result is for.  Returned only in `results`.  
  - name: results | type: array<EligibilityResult> | description: Eligibility result for each product family.  Returned only for the Google Voice add-on.  


```

### Examples

### Check eligibility for Business Email
Checks whether the caller's account can purchase Business Email for a domain.

```javascript
import { googleSubscriptions } from "@wix/premium";

async function isEligible() {
  const response = await googleSubscriptions.isEligible({
    domainName: "my-domain.com",
    productTypeId: "9570ef56-e556-4282-9471-71779ad3d9b6",
  });
}

/* Promise resolves to:
 * {
 *   "domainName": "my-domain.com",
 *   "result": {
 *     "eligible": {
 *       "seats": 20,
 *       "freeTrial": false
 *     }
 *   }
 * }
 */

```

### isEligible (self-hosted)
Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { googleSubscriptions } from '@wix/premium';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { googleSubscriptions },
  // Include the auth strategy and host as relevant
});


async function isEligible(options) {
  const response = await myWixClient.googleSubscriptions.isEligible(options);
};
```

---