Method: accounts.customers.entitlements.changeSku

Updates the SKU for an existing customer entitlement. This method creates a new entitlement for the modified SKU and cancels the original SKU's entitlement.

An entitlement update is a long-running operation and it updates the entitlement as a result of fulfillment.

Possible error codes:

  • PERMISSION_DENIED: The customer doesn't belong to the reseller.
  • INVALID_ARGUMENT:
    • Required request parameters are missing or invalid.
    • The new offer's SKU doesn't belong to the same product family as the existing entitlement's SKU
    • Can't upgrade or downgrade an annual commitment.
  • NOT_FOUND: Offer or Entitlement resource not found.
  • ALREADY_EXISTS: The new offer SKU already exists for the customer. Call the entitlements.changePlan api if the new offer has the same product and SKU as the existing one.
  • INVALID_PLAN: If purchasing multiple SKUs of the same product family results in a upgrade, the plan based on the existing SKU is commitment-based and the commitment interval hasn't expired.
  • 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.

Deprecated: Use entitlements.changeOffer instead.

HTTP request

POST https://cloudchannel.googleapis.com/v1alpha1/{name=accounts/*/customers/*/entitlements/*}:changeSku

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. The name of the entitlement to update. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}

Request body

The request body contains data with the following structure:

JSON representation
{
  "offer": string,
  "externalCorrelationId": string,
  "numUnits": integer,
  "maxUnits": integer,
  "purchaseOrderId": string,
  "requestId": string
}
Fields
offer

string

Required. New Offer applicable to a new SKU. The offer takes the form: accounts/{account_id}/offers/{offer_id}.

externalCorrelationId

string

An optional identifier in the external system that partners can use to correlate a Channel Services purchase transaction for the entitlement. Optional.

numUnits

integer

New num units for the entitlement. For seat-based offers, this is the number of seats. For license based offers, this is the number of licenses. Required for commitment based offers.

maxUnits

integer

New max units for the entitlement. It represents the maximum units a flexible offer is allowed to assign. Required for flexible offers.

purchaseOrderId

string

Purchase order ID provided by the reseller. Optional

requestId

string

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 with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Response body

If successful, the response body contains an instance of Operation.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/apps.order

For more information, see the Authentication Overview.