Requires authorization
Update a subscription plan. Use this method to update a plan for a 30-day trial or a flexible plan subscription to an annual commitment plan with monthly or yearly payments. Try it now.
How a plan is updated differs depending on the plan and the products. For more information, see the description in manage subscriptions.
Request
HTTP request
POST https://www.googleapis.com/apps/reseller/v1/customers/customerId/subscriptions/subscriptionId/changePlan
Parameters
Parameter name | Value | Description |
---|---|---|
Path parameters | ||
customerId |
string |
Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates.
|
subscriptionId |
string |
This is a required property. The subscriptionId is the subscription identifier and is unique for each customer. Since a subscriptionId changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the subscriptionId can be found using the retrieve all reseller subscriptions method.
|
Authorization
This request requires authorization with the following scope (read more about authentication and authorization).
Scope |
---|
https://www.googleapis.com/auth/apps.order |
Request body
In the request body, supply data with the following structure:
{ "kind": "subscriptions#changePlanRequest", "planName": string, "seats": { "kind": "subscriptions#seats", "licensedNumberOfSeats": integer, "numberOfSeats": integer, "maximumNumberOfSeats": integer }, "purchaseOrderId": string, "dealCode": string }
Property name | Value | Description | Notes |
---|---|---|---|
kind |
string |
Identifies the resource as a subscription change plan request. Value: subscriptions#changePlanRequest |
|
planName |
string |
The planName property is required. This is the name of the subscription's payment plan. For more information about the Google payment plans, see API concepts. Possible values are:
|
|
seats |
nested object |
This is a required property. The seats property is the number of user seat licenses. | |
seats.kind |
string |
Identifies the resource as a subscription seat setting. Value: subscriptions#seats |
|
seats.numberOfSeats |
integer |
This is a required property and is exclusive to subscriptions with ANNUAL_MONTHLY_PAY and ANNUAL_YEARLY_PAY plans. This property sets the maximum number of licenses assignable to users on a subscription. The reseller can add more licenses, but once set, the numberOfSeats cannot be reduced until renewal. The reseller is invoiced based on the numberOfSeats value regardless of how many of these user licenses are assigned. |
|
seats.maximumNumberOfSeats |
integer |
This is a required property and is exclusive to subscriptions with FLEXIBLE or TRIAL plans. This property sets the maximum number of licensed users allowed on a subscription. This quantity can be increased up to the maximum limit defined in the reseller's contract. The minimum quantity is the current number of users in the customer account. |
|
purchaseOrderId |
string |
This is an optional property. This purchase order (PO) information is for resellers to use for their company tracking usage. If a purchaseOrderId value is given it appears in the API responses and shows up in the invoice. The property accepts up to 80 plain text characters. |
|
seats.licensedNumberOfSeats |
integer |
Read-only field containing the current number of users that are assigned a license for the product defined in skuId . This field's value is equivalent to the numerical count of users returned by the Enterprise License Manager API method: listForProductAndSku |
|
dealCode |
string |
Google-issued code (100 char max) for discounted pricing on subscription plans. Deal code must be included in changePlan request in order to receive discounted rate. This property is optional. If a deal code has already been added to a subscription, this property may be left empty and the existing discounted rate will still apply (if not empty, only provide the deal code that is already present on the subscription). If a deal code has never been added to a subscription and this property is left blank, regular pricing will apply. |
Response
If successful, this method returns a Subscriptions resource in the response body.
Try it!
Use the APIs Explorer below to call this method on live data and see the response. Alternatively, try the standalone Explorer.