- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- UpdateOneTimeProductOfferStateRequest
- CancelOneTimeProductOfferRequest
- DeactivateOneTimeProductOfferRequest
- Try it!
Updates a batch of one-time product offer states.
HTTP request
POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/oneTimeProducts/{productId}/purchaseOptions/{purchaseOptionId}/offers:batchUpdateStates
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
packageName |
Required. The parent app (package name) of the updated one-time product offers. |
productId |
Required. The product ID of the parent one-time product, if all updated offers belong to the same one-time product. If this batch update spans multiple one-time products, set this field to "-". |
purchaseOptionId |
Required. The purchase option ID of the parent purchase option, if all updated offers belong to the same purchase option. If this batch update spans multiple purchase options, set this field to "-". |
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 |
---|
{
"oneTimeProductOffers": [
{
object ( |
Fields | |
---|---|
oneTimeProductOffers[] |
The updated one-time product offers list, in the same order as the request. |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/androidpublisher
UpdateOneTimeProductOfferStateRequest
Request message to update the state of a one-time product 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: |
|
activateOneTimeProductOfferRequest |
Activates an offer. Once activated, the offer is available to users, as long as its conditions are met. |
cancelOneTimeProductOfferRequest |
Cancels an offer. Once cancelled, the offer is not available to users. Any pending orders related to this offer will be cancelled. This state transition is specific to pre-orders. |
deactivateOneTimeProductOfferRequest |
Deactivates an offer. Once deactivated, the offer is no longer available to users. This state transition is specific to discounted offers. |
CancelOneTimeProductOfferRequest
Request message for offers.cancel.
JSON representation |
---|
{
"packageName": string,
"productId": string,
"purchaseOptionId": string,
"offerId": string,
"latencyTolerance": enum ( |
Fields | |
---|---|
packageName |
Required. The parent app (package name) of the offer to cancel. |
productId |
Required. The parent one-time product (ID) of the offer to cancel. |
purchaseOptionId |
Required. The parent purchase option (ID) of the offer to cancel. |
offerId |
Required. The offer ID of the offer to cancel. |
latencyTolerance |
Optional. The latency tolerance for the propagation of this update. Defaults to latency-sensitive. |
DeactivateOneTimeProductOfferRequest
Request message for offers.deactivate.
JSON representation |
---|
{
"packageName": string,
"productId": string,
"purchaseOptionId": string,
"offerId": string,
"latencyTolerance": enum ( |
Fields | |
---|---|
packageName |
Required. The parent app (package name) of the offer to deactivate. |
productId |
Required. The parent one-time product (ID) of the offer to deactivate. |
purchaseOptionId |
Required. The parent purchase option (ID) of the offer to deactivate. |
offerId |
Required. The offer ID of the offer to deactivate. |
latencyTolerance |
Optional. The latency tolerance for the propagation of this update. Defaults to latency-sensitive. |