Method: monetization.subscriptions.basePlans.offers.batchUpdateStates

Updates a batch of subscription offer states.

Set the latencyTolerance field on nested requests to PRODUCT_UPDATE_LATENCY_TOLERANCE_LATENCY_TOLERANT to achieve maximum update throughput.

HTTP request

POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/subscriptions/{productId}/basePlans/{basePlanId}/offers:batchUpdateStates

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
packageName

string

Required. The parent app (package name) of the updated subscription offers.

Must be equal to the packageName field on all the updated SubscriptionOffer resources.

productId

string

Required. The product ID of the parent subscription, if all updated offers belong to the same subscription. If this request spans multiple subscriptions, set this field to "-". Must be set.

basePlanId

string

Required. The parent base plan (ID) for which the offers should be updated. May be specified as '-' to update offers from multiple base plans.

Request body

The request body contains data with the following structure:

JSON representation
{
  "requests": [
    {
      object (UpdateSubscriptionOfferStateRequest)
    }
  ]
}
Fields
requests[]

object (UpdateSubscriptionOfferStateRequest)

Required. The update request list of up to 100 elements. All requests must update different offers.

Response body

Response message for offers.batchUpdateStates.

If successful, the response body contains data with the following structure:

JSON representation
{
  "subscriptionOffers": [
    {
      object (SubscriptionOffer)
    }
  ]
}
Fields
subscriptionOffers[]

object (SubscriptionOffer)

The updated subscription offers list.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/androidpublisher

UpdateSubscriptionOfferStateRequest

Request message to update the state of a subscription offer.

JSON representation
{

  // Union field state_transition_type can be only one of the following:
  "activateSubscriptionOfferRequest": {
    object (ActivateSubscriptionOfferRequest)
  },
  "deactivateSubscriptionOfferRequest": {
    object (DeactivateSubscriptionOfferRequest)
  }
  // End of list of possible types for union field state_transition_type.
}
Fields
Union field state_transition_type. The type of state transition to apply, exactly one must be set. state_transition_type can be only one of the following:
activateSubscriptionOfferRequest

object (ActivateSubscriptionOfferRequest)

Activates an offer. Once activated, the offer will be available to new subscribers.

deactivateSubscriptionOfferRequest

object (DeactivateSubscriptionOfferRequest)

Deactivates an offer. Once deactivated, the offer will become unavailable to new subscribers, but existing subscribers will maintain their subscription

ActivateSubscriptionOfferRequest

Request message for ActivateSubscriptionOffer.

JSON representation
{
  "packageName": string,
  "productId": string,
  "basePlanId": string,
  "offerId": string,
  "latencyTolerance": enum (ProductUpdateLatencyTolerance)
}
Fields
packageName

string

Required. The parent app (package name) of the offer to activate.

productId

string

Required. The parent subscription (ID) of the offer to activate.

basePlanId

string

Required. The parent base plan (ID) of the offer to activate.

offerId

string

Required. The unique offer ID of the offer to activate.

latencyTolerance

enum (ProductUpdateLatencyTolerance)

Optional. The latency tolerance for the propagation of this product update. Defaults to latency-sensitive.

DeactivateSubscriptionOfferRequest

Request message for offers.deactivate.

JSON representation
{
  "packageName": string,
  "productId": string,
  "basePlanId": string,
  "offerId": string,
  "latencyTolerance": enum (ProductUpdateLatencyTolerance)
}
Fields
packageName

string

Required. The parent app (package name) of the offer to deactivate.

productId

string

Required. The parent subscription (ID) of the offer to deactivate.

basePlanId

string

Required. The parent base plan (ID) of the offer to deactivate.

offerId

string

Required. The unique offer ID of the offer to deactivate.

latencyTolerance

enum (ProductUpdateLatencyTolerance)

Optional. The latency tolerance for the propagation of this product update. Defaults to latency-sensitive.