Reseller API

customers.insert

400:invalid

Cause
One of the customer object parameters is invalid

Common causes for this error:
  • Invalid postalAddress.postalCode
  • Ineligible postalAddress.countryCode for reselling G Suite
  • alternateEmail cannot be at the same domain as customerDomain
Recommendation
Verify that required parameters are present and valid for the customer.
Only 6 parameters are required to create a customer:
  • customerDomain
  • alternateEmail
  • postalAddress.contactName
  • postalAddress.organizationName
  • postalAddress.postalCode
  • postalAddress.countryCode

customers.get

404:notFound

Cause
Customer/Domain does not exist for any G Suite Account
Recommendation
This is the desired error when attempting to create a new G Suite account. It signals that the input domain is available for creating a G Suite account.

429:usageLimits.quotaExceeded

Cause
Queries per second limit has been surpassed.
Recommendation
Implement a backoff retry strategy or cache results to make fewer API calls.

subscriptions.changeRenewalSettings

412:conditionNotMet

Cause
Renewal settings don't apply to flexible or trial payment plans
Recommendation
Make sure you only call this method on commitment payment plans:
  • ANNUAL_MONTHLY_PAY
  • ANNUAL_YEARLY_PAY

subscriptions.changeSeats

400:badRequest

Cause
Subscription is either suspended or cancelled
Recommendation
Verify that the subscription is active and customer is still under your reseller account

400:invalid

Cause
Several possible causes:
  • Seat reduction is not allowed for annual plan types
  • Seat amount requested is less than current users on account
  • Increased the incorrect seat parameter or attempted to change licensedNumberOfSeats parameter which is read-only
  • During trial period, customers have a maximum seat limit of 10
Recommendation
Seat reduction is not allowed for annual plan types
  • Consider changing renewal settings for the subscription to automatically set (at time of renewal) seats equal to the amount of active users on the account
Seat amount requested is less than current users on account
  • Message customer that they must remove a user before they can decrease their seat count
Increased the incorrect seat parameter or attempted to change licensedNumberOfSeats parameter which is read-only
  • For FLEX, increase maximumNumberOfSeats
  • For ANNUAL, increase numberOfSeats
During trial period, customers have a maximum seat limit of 10

subscriptions.delete

403:forbidden

Cause
Reseller no longer owns the customer or they never did
Recommendation
Either call customers.get before making these calls or keep better syncing of local customers

412:conditionNotMet

Cause
Transfers to direct are not allowed if no admin user is present on the G Suite account
Recommendation
Add a temporary admin user then retry transfer:

subscriptions.get

403:forbidden

Cause
Reseller no longer owns the customer or they never did
Recommendation
Either call `customers.get` before making these calls or keep better syncing of local customers

403:usageLimits.dailyLimitExceeded

Cause
Daily quota for calls on this API has been reached. Too many calls were made likely a cause of no delay in retry logic.
Recommendation
Implement a backoff delay. If attempting to retrieve many subscriptions, consider using subscriptions.list without specifying customerId or subscriptionId. 100 subscriptions can be returned max per call. Use pageToken parameter to continue retrieving all subscriptions under reseller account.

429:usageLimits.quotaExceeded

Cause
Queries per second limit has been surpassed.
Recommendation
Implement a backoff delay. If attempting to retrieve many subscriptions, consider using subscriptions.list without specifying customerId or subscriptionId. 100 subscriptions can be returned max per call. Use pageToken parameter to continue retrieving all subscriptions under reseller account.

subscriptions.insert

412:conditionNotMet

Cause
Reseller is not enabled to either:
  • Sell selected SKU
  • Sell to emerging market customer
Recommendation
Accept the applicable terms of service:

subscriptions.list

403:forbidden

Cause
Reseller no longer owns the customer or they never did
Recommendation
Either call customers.get before making these calls or keep better syncing of local customers

403:usageLimits.accessNotConfigured

Cause
Reseller API is not enabled in your cloud project
Recommendation
Go to your cloud console and enable the Reseller API in your project

429:usageLimits.quotaExceeded

Cause
Queries per second limit has been surpassed.
Recommendation
Implement a backoff retry strategy or cache results to make fewer API calls.