- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- UpdateSubscriptionOfferStateRequest
- ActivateSubscriptionOfferRequest
- DeactivateSubscriptionOfferRequest
- Try it!
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 |
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 |
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 |
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 ( |
Fields | |
---|---|
requests[] |
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 ( |
Fields | |
---|---|
subscriptionOffers[] |
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 |
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 |
Activates an offer. Once activated, the offer will be available to new subscribers. |
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 ( |
Fields | |
---|---|
packageName |
Required. The parent app (package name) of the offer to activate. |
productId |
Required. The parent subscription (ID) of the offer to activate. |
basePlanId |
Required. The parent base plan (ID) of the offer to activate. |
offerId |
Required. The unique offer ID of the offer to activate. |
latencyTolerance |
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 ( |
Fields | |
---|---|
packageName |
Required. The parent app (package name) of the offer to deactivate. |
productId |
Required. The parent subscription (ID) of the offer to deactivate. |
basePlanId |
Required. The parent base plan (ID) of the offer to deactivate. |
offerId |
Required. The unique offer ID of the offer to deactivate. |
latencyTolerance |
Optional. The latency tolerance for the propagation of this product update. Defaults to latency-sensitive. |