Aggiorna un piano di abbonamento. Utilizza questo metodo per aggiornare un piano per una prova di 30 giorni o un abbonamento a un piano flessibile in un piano con impegno annuale con pagamenti mensili o annuali.
Il modo in cui viene aggiornato un piano varia in base al piano e ai prodotti. Per ulteriori informazioni, consulta la descrizione in Gestire gli abbonamenti.
Richiesta HTTP
POST https://reseller.googleapis.com/apps/reseller/v1/customers/{customerId}/subscriptions/{subscriptionId}/changePlan
Può essere il nome di dominio principale del cliente o il suo identificatore univoco. Se il nome di dominio di un cliente cambia, il vecchio nome di dominio non può essere utilizzato per accedere al cliente, ma è sempre possibile utilizzare l'identificatore univoco del cliente (come restituito dall'API). Ti consigliamo di memorizzare l'identificatore univoco nei tuoi sistemi, se applicabile.
subscriptionId
string
Questa è una proprietà obbligatoria. subscriptionId è l'identificatore dell'abbonamento ed è univoco per ogni cliente. Poiché un subscriptionId cambia quando un abbonamento viene aggiornato, ti consigliamo di non utilizzare questo ID come chiave per i dati permanenti. subscriptionId può essere trovato utilizzando il metodo recupera tutti gli abbonamenti del rivenditore.
Identifica la risorsa come richiesta di modifica del piano di abbonamento. Valore: subscriptions#changePlanRequest
planName
string
La proprietà planName è obbligatoria. Si tratta del nome del piano di pagamento dell'abbonamento. Per ulteriori informazioni sui piani di pagamento di Google, consulta Concetti API.
I valori possibili sono:
ANNUAL_MONTHLY_PAY: il piano di impegno annuale con pagamenti mensili
ANNUAL_YEARLY_PAY: il piano con impegno annuale e pagamenti annuali
FLEXIBLE - Il piano flessibile
TRIAL - Il piano di prova senza costi di 30 giorni
Questa è una proprietà obbligatoria. La proprietà seats indica il numero di licenze per utenti.
purchaseOrderId
string
Questa è una proprietà facoltativa. Queste informazioni sull'ordine di acquisto (OA) sono destinate all'utilizzo dei rivenditori per il monitoraggio dell'utilizzo della loro azienda. Se viene specificato un valore purchaseOrderId, questo viene visualizzato nelle risposte dell'API e nella fattura. La proprietà accetta fino a 80 caratteri di testo normale.
dealCode
string
Codice emesso da Google (massimo 100 caratteri) per i prezzi scontati dei piani di abbonamento. Il codice promozionale deve essere incluso nella richiesta changePlan per ricevere la tariffa scontata. Questa proprietà è facoltativa. Se a un abbonamento è già stato aggiunto un codice sconto, questa proprietà può essere lasciata vuota e verrà applicata la tariffa scontata esistente (se non è vuota, fornisci solo il codice sconto già presente nell'abbonamento). Se non è mai stato aggiunto un codice sconto a un abbonamento e questa proprietà viene lasciata vuota, verranno applicati i prezzi normali.
[null,null,["Ultimo aggiornamento 2025-07-25 UTC."],[],[],null,["# Method: subscriptions.changePlan\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [ChangePlanRequest](#ChangePlanRequest)\n - [JSON representation](#ChangePlanRequest.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\nUpdates 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.\n\nHow a plan is updated differs depending on the plan and the products. For more information, see the description in [manage subscriptions](https://developers.google.com/workspace/admin/reseller/v1/how-tos/manage_subscriptions#update_subscription_plan).\n\n### HTTP request\n\n`POST https://reseller.googleapis.com/apps/reseller/v1/customers/{customerId}/subscriptions/{subscriptionId}/changePlan`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `customerId` | `string` This can be either the customer's primary domain name or the customer's unique identifier. If the domain name for a customer changes, the old domain name cannot be used to access the customer, but the customer's unique identifier (as returned by the API) can always be used. We recommend storing the unique identifier in your systems where applicable. |\n| `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](https://developers.google.com/workspace/admin/reseller/v1/how-tos/manage_subscriptions#get_all_subscriptions) method. |\n\n### Request body\n\nThe request body contains an instance of [ChangePlanRequest](/workspace/admin/reseller/reference/rest/v1/subscriptions/changePlan#ChangePlanRequest).\n\n### Response body\n\nIf successful, the response body contains an instance of [Subscription](/workspace/admin/reseller/reference/rest/v1/subscriptions#Subscription).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/apps.order`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent).\n\nChangePlanRequest\n-----------------\n\nJSON template for the subscriptions.changePlan rpc request.\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"kind\": string, \"planName\": string, \"seats\": { object (/workspace/admin/reseller/reference/rest/v1/subscriptions#Seats) }, \"purchaseOrderId\": string, \"dealCode\": string } ``` |\n\n| Fields ||\n|-------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `kind` | `string` Identifies the resource as a subscription change plan request. Value: `subscriptions#changePlanRequest` |\n| `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](https://developers.google.com/workspace/admin/reseller/v1/how-tos/concepts.html). Possible values are: - `ANNUAL_MONTHLY_PAY` - The annual commitment plan with monthly payments **Caution:** `ANNUAL_MONTHLY_PAY` is returned as `ANNUAL` in all API responses. - `ANNUAL_YEARLY_PAY` - The annual commitment plan with yearly payments - `FLEXIBLE` - The flexible plan - `TRIAL` - The 30-day free trial plan \u003cbr /\u003e |\n| `seats` | `object (`[Seats](/workspace/admin/reseller/reference/rest/v1/subscriptions#Seats)`)` This is a required property. The seats property is the number of user seat licenses. |\n| `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. |\n| `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. |"]]