### Resumable Chunked File Upload Request Example Source: https://developers.google.com/android-publisher/upload This example demonstrates a PUT request for uploading the first chunk of a file using resumable uploads. It includes essential headers like Content-Length and Content-Range. ```http PUT {session_uri} HTTP/1.1 Host: www.googleapis.com Content-Length: 524288 Content-Type: image/png Content-Range: bytes 0-524287/2000000 bytes 0-524288 ``` -------------------------------- ### Multipart Upload Request Example Source: https://developers.google.com/android-publisher/upload An example of a multipart upload request, which includes both metadata (JSON) and the file data (PNG) in the request body, separated by a boundary. ```http POST /upload/androidpublisher/v3/applications/packageName/edits/editId/listings/language/imageType?uploadType=multipart HTTP/1.1 Host: www.googleapis.com Authorization: Bearer your_auth_token Content-Type: multipart/related; boundary=foo_bar_baz Content-Length: number_of_bytes_in_entire_request_body --foo_bar_baz Content-Type: application/json; charset=UTF-8 { "image": { "id": string, "url": string, "sha1": string } } --foo_bar_baz Content-Type: image/png PNG data --foo_bar_baz-- ``` -------------------------------- ### Start Staged Rollout of APK Source: https://developers.google.com/android-publisher/tracks Initiate a staged rollout for a new APK on the production track. Specify the initial fraction of users to receive the update. ```json { "releases": [{ "versionCodes": ["99"], "userFraction": 0.05, "status": "inProgress" }] } ``` -------------------------------- ### GET Request for Subscription Purchase Source: https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.subscriptions/get This cURL command demonstrates how to make a GET request to retrieve details about a specific subscription purchase. Ensure you replace placeholder values with your actual application package name, subscription ID, and purchase token. ```curl curl -X GET \ 'https://androidpublisher.googleapis.com/androidpublisher/v3/applications/com.example.app/purchases/subscriptions/monthly.premium/tokens/abcdefghijklmnopqrstuvwxyz.0123456789' \ -H 'Accept: application/json' ``` -------------------------------- ### Simple Upload URI Example Source: https://developers.google.com/android-publisher/upload This is the URI format for performing a simple upload of media data. It includes the '/upload' prefix and the 'uploadType=media' query parameter. ```http POST https://www.googleapis.com/upload/androidpublisher/v3/applications/packageName/edits/editId/listings/language/imageType?uploadType=media ``` -------------------------------- ### HTTP Request for purchases.products.get Source: https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.products/get This sample demonstrates how to make an HTTP GET request to retrieve the purchase status of a product. Ensure you replace placeholder values with your actual application details. ```curl curl \ -X GET \ 'https://androidpublisher.googleapis.com/androidpublisher/v3/applications/com.example.app/purchases/products/exampleSKU/tokens/exampleToken' \ -H 'Accept: application/json' ``` -------------------------------- ### Retrieve a list of reviews Source: https://developers.google.com/android-publisher/reply-to-reviews Use this GET request to fetch reviews for your app. Include your package name and an authorization token. ```HTTP GET https://www.googleapis.com/androidpublisher/v3/applications/your_package_name/reviews?access_token=your_auth_token ``` -------------------------------- ### HTTP Request to List In-App Products Source: https://developers.google.com/android-publisher/api-ref/rest/v3/inappproducts/list This is the base HTTP GET request to list all in-app products for a given package name. Ensure the package name is correctly substituted. ```HTTP GET https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/inappproducts ``` -------------------------------- ### HTTP Request to List Reviews Source: https://developers.google.com/android-publisher/api-ref/rest/v3/reviews/list This is the base HTTP GET request to list reviews for an application. It includes the package name as a path parameter. ```HTTP GET https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/reviews ``` -------------------------------- ### reviews.get Source: https://developers.google.com/android-publisher/api-ref/rest/v3/reviews/get Gets a single review for a specified app package name and review ID. Supports optional translation language. ```APIDOC ## GET applications/{packageName}/reviews/{reviewId} ### Description Retrieves a single review for a given app package name and review ID. ### Method GET ### Endpoint `https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/reviews/{reviewId}` ### Path Parameters * **packageName** (string) - Required - Package name of the app. * **reviewId** (string) - Required - Unique identifier for a review. ### Query Parameters * **translationLanguage** (string) - Optional - Language localization code. ### Request Body The request body must be empty. ### Response Body If successful, the response body contains an instance of `Review`. ### Authorization Scopes * `https://www.googleapis.com/auth/androidpublisher` ``` -------------------------------- ### Retrieve an Individual Review Source: https://developers.google.com/android-publisher/reply-to-reviews Use this GET request to fetch a specific review by its ID. Ensure you have the correct package name and review ID. ```bash GET https://www.googleapis.com/androidpublisher/v3/applications/your_package_name/reviews/ review_id?access_token=your_auth_token ``` -------------------------------- ### Standard Resource URI Example Source: https://developers.google.com/android-publisher/upload This is the standard URI for creating or updating metadata associated with an uploaded file. It does not include the '/upload' prefix. ```http POST /androidpublisher/v3/applications/packageName/edits/editId/listings/language/imageType ``` -------------------------------- ### Sample Request for Deferring Subscription Source: https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.subscriptions/defer This sample demonstrates how to make a POST request to defer a subscription purchase using `curl`. It includes the necessary headers and the JSON request body with deferral information. ```bash curl -X POST \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{ "deferralInfo": { "desiredExpiryTimeMillis": "1735689600000", "expectedExpiryTimeMillis": "1704067200000" } }' \ 'https://androidpublisher.googleapis.com/androidpublisher/v3/applications/com.example.myapp/purchases/subscriptions/monthly.premium.v1/tokens/aBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLmNoPqRsTuVwXyZ.1234567890:defer' ``` -------------------------------- ### get Source: https://developers.google.com/android-publisher/api-ref/rest/v3/edits.tracks Gets a track. ```APIDOC ## GET /edits/{editId}/tracks/{trackId} ### Description Gets a specific track by its ID within an edit. ### Method GET ### Endpoint `/edits/{editId}/tracks/{trackId}` ### Parameters #### Path Parameters - **editId** (string) - Required - Identifier of the edit. - **trackId** (string) - Required - Identifier of the track. ### Response #### Success Response (200) - **track** (object) - The requested track resource. - **trackId** (string) - Identifier of the track. - **releases** (array) - The list of releases associated with the track. ### Response Example ```json { "track": { "trackId": "production", "releases": [ { "versionCodes": ["1", "2"], "releaseNotes": [ { "language": "en-US", "text": "Initial release." } ], "status": "completed", "userFraction": 1.0, "countryTargeting": { "includeRestOfWorld": true }, "inAppUpdatePriority": 0 } ] } } ``` ``` -------------------------------- ### List Reviews with Query Parameters Source: https://developers.google.com/android-publisher/api-ref/rest/v3/reviews/list This example demonstrates how to list reviews with optional query parameters for pagination and language filtering. The `token` parameter is used for pagination, `startIndex` and `maxResults` control the number of results, and `translationLanguage` specifies the desired language. ```HTTP GET https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/reviews?token={token}&startIndex={startIndex}&maxResults={maxResults}&translationLanguage={translationLanguage} ``` -------------------------------- ### get Source: https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.subscriptionsv2 Get metadata about a subscription. ```APIDOC ## get ### Description Get metadata about a subscription. ### Method GET ### Endpoint /subscriptions/{subscriptionId} ### Parameters #### Path Parameters - **subscriptionId** (string) - Required - The ID of the subscription to retrieve. ### Response #### Success Response (200) - **subscription** (object) - The subscription resource. #### Response Example { "subscription": { "kind": "androidpublisher#subscription", "startTime": "2023-01-01T10:00:00Z", "expiryTime": "2024-01-01T10:00:00Z" } } ``` -------------------------------- ### Sample Response for purchases.products.get Source: https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.products/get This is a sample JSON response for a successful purchase status check. It includes details about the purchase, such as time, state, and product information. ```json { "kind": "androidpublisher#productPurchase", "purchaseTimeMillis": "1678886400000", "purchaseState": 0, "consumptionState": 0, "developerPayload": "sample developer payload", "orderId": "GPA.1234-5678-9012-34567", "purchaseType": 0, "acknowledgementState": 0, "productId": "com.example.app.productId", "purchaseToken": "purchase token", "quantity": 1, "refundableQuantity": 1, "regionCode": "US", "obfuscatedExternalAccountId": "obfuscated external account id", "obfuscatedExternalProfileId": "obfuscated external profile id" } ``` -------------------------------- ### Retrieve the next page of reviews Source: https://developers.google.com/android-publisher/reply-to-reviews To get the next page of reviews, include the `token` and `maxResults` parameters in your GET request, using the `nextPageToken` from the previous response. ```HTTP GET https://www.googleapis.com/androidpublisher/v3/applications/your_package_name/reviews?access_token=your_auth_token&token=12334566&maxResults=50 ``` -------------------------------- ### applications.deviceTierConfigs.list Source: https://developers.google.com/android-publisher/api-ref/rest/v3/applications.deviceTierConfigs/list Returns created device tier configs, ordered by descending creation time. ```APIDOC ## GET applications.deviceTierConfigs.list ### Description Returns created device tier configs, ordered by descending creation time. ### Method GET ### Endpoint `https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/deviceTierConfigs` ### Parameters #### Path Parameters - **packageName** (string) - Required - Package name of the app. #### Query Parameters - **pageSize** (integer) - Optional - The maximum number of device tier configs to return. The service may return fewer than this value. If unspecified, at most 10 device tier configs will be returned. The maximum value for this field is 100; values above 100 will be coerced to 100. Device tier configs will be ordered by descending creation time. - **pageToken** (string) - Optional - A page token, received from a previous `deviceTierConfigs.list` call. Provide this to retrieve the subsequent page. #### Request Body The request body must be empty. ### Response #### Success Response (200) Response listing existing device tier configs. - **deviceTierConfigs** (array of object) - Device tier configs created by the developer. - **nextPageToken** (string) - A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. ### Authorization scopes - `https://www.googleapis.com/auth/androidpublisher` ``` -------------------------------- ### Get External Transaction Request Source: https://developers.google.com/android-publisher/api-ref/rest/v3/externaltransactions/getexternaltransaction This cURL command demonstrates how to make a GET request to retrieve a specific external transaction. Ensure you replace '[YOUR_ACCESS_TOKEN]' with your valid OAuth token. ```bash curl \ -X GET \ 'https://androidpublisher.googleapis.com/androidpublisher/v3/applications/com.example.app/externalTransactions/1234567890' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' ``` -------------------------------- ### v3.edits.tracks.get Source: https://developers.google.com/android-publisher/api-ref/rest Gets a track. ```APIDOC ## GET /androidpublisher/v3/applications/{packageName}/edits/{editId}/tracks/{track} ### Description Gets a track. ### Method GET ### Endpoint /androidpublisher/v3/applications/{packageName}/edits/{editId}/tracks/{track} ### Parameters #### Path Parameters - **packageName** (string) - Required - The package name of the application. - **editId** (string) - Required - The ID of the edit. - **track** (string) - Required - The name of the track to retrieve. ``` -------------------------------- ### v3.edits.testers.get Source: https://developers.google.com/android-publisher/api-ref/rest Gets testers. ```APIDOC ## GET /androidpublisher/v3/applications/{packageName}/edits/{editId}/testers/{track} ### Description Gets testers. ### Method GET ### Endpoint /androidpublisher/v3/applications/{packageName}/edits/{editId}/testers/{track} ### Parameters #### Path Parameters - **packageName** (string) - Required - The package name of the application. - **editId** (string) - Required - The ID of the edit. - **track** (string) - Required - The track to get testers for. ``` -------------------------------- ### v3.monetization.onetimeproducts.purchaseOptions.offers.list Source: https://developers.google.com/android-publisher/api-ref/rest Lists all offers under a given app, product, or purchase option. ```APIDOC ## GET /androidpublisher/v3/applications/{packageName}/oneTimeProducts/{productId}/purchaseOptions/{purchaseOptionId}/offers ### Description Lists all offers under a given app, product, or purchase option. ### Method GET ### Endpoint /androidpublisher/v3/applications/{packageName}/oneTimeProducts/{productId}/purchaseOptions/{purchaseOptionId}/offers ### Parameters #### Path Parameters - **packageName** (string) - Required - The package name of the application. - **productId** (string) - Required - The unique identifier of the one-time product. - **purchaseOptionId** (string) - Required - The unique identifier of the purchase option. ``` -------------------------------- ### list Source: https://developers.google.com/android-publisher/api-ref/rest/v3/monetization.onetimeproducts.purchaseOptions.offers Lists all offers under a given app, product, or purchase option. ```APIDOC ### `list` Lists all offers under a given app, product, or purchase option. ``` -------------------------------- ### edits.details.get Source: https://developers.google.com/android-publisher/api-ref/rest Gets details of an app. ```APIDOC ## GET /androidpublisher/v3/applications/{packageName}/edits/{editId}/details ### Description Gets details of an app. ### Method GET ### Endpoint /androidpublisher/v3/applications/{packageName}/edits/{editId}/details ``` -------------------------------- ### v3.monetization.subscriptions.basePlans.activate Source: https://developers.google.com/android-publisher/api-ref/rest Activates a base plan. ```APIDOC ## POST /androidpublisher/v3/applications/{packageName}/subscriptions/{productId}/basePlans/{basePlanId}:activate ### Description Activates a base plan. ### Method POST ### Endpoint /androidpublisher/v3/applications/{packageName}/subscriptions/{productId}/basePlans/{basePlanId}:activate ### Parameters #### Path Parameters - **packageName** (string) - Required - The package name of the application. - **productId** (string) - Required - The unique identifier of the subscription. - **basePlanId** (string) - Required - The unique identifier of the base plan. ``` -------------------------------- ### edits.countryavailability.get Source: https://developers.google.com/android-publisher/api-ref/rest Gets country availability. ```APIDOC ## GET /androidpublisher/v3/applications/{packageName}/edits/{editId}/countryAvailability/{track} ### Description Gets country availability. ### Method GET ### Endpoint /androidpublisher/v3/applications/{packageName}/edits/{editId}/countryAvailability/{track} ``` -------------------------------- ### applications.deviceTierConfigs.create Source: https://developers.google.com/android-publisher/api-ref/rest/v3/applications.deviceTierConfigs/create Creates a new device tier config for an app. ```APIDOC ## POST applications.deviceTierConfigs.create ### Description Creates a new device tier config for an app. ### Method POST ### Endpoint `https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/deviceTierConfigs` ### Parameters #### Path Parameters - **packageName** (string) - Required - Package name of the app. #### Query Parameters - **allowUnknownDevices** (boolean) - Optional - Whether the service should accept device IDs that are unknown to Play's device catalog. #### Request Body - **DeviceTierConfig** - Required - An instance of the `DeviceTierConfig` object. ### Response #### Success Response (200) - **DeviceTierConfig** - The newly created instance of `DeviceTierConfig`. ### Authorization scopes Requires the following OAuth scope: - `https://www.googleapis.com/auth/androidpublisher` ``` -------------------------------- ### get Source: https://developers.google.com/android-publisher/api-ref/rest/v3/monetization.subscriptions.basePlans.offers Reads a single offer. ```APIDOC ## get ### Description Reads a single offer. ### Method GET ### Endpoint `/monetization/subscriptions/offers/{packageName}/{productId}/{basePlanId}/{offerId}` (Assumed structure) ``` -------------------------------- ### create Source: https://developers.google.com/android-publisher/api-ref/rest/v3/edits.tracks Creates a new track. ```APIDOC ## POST /edits/{editId}/tracks ### Description Creates a new track within an edit. ### Method POST ### Endpoint `/edits/{editId}/tracks` ### Parameters #### Path Parameters - **editId** (string) - Required - Identifier of the edit. #### Request Body - **track** (object) - Required - The track resource to create. - **trackId** (string) - Required - Identifier of the track. - **releases** (array) - Optional - The list of releases associated with the track. - **release** (object) - Required - A release resource. - **versionCodes** (array) - Required - The version codes of the releases. - **versionCode** (string) - Required - A version code. - **releaseNotes** (array) - Optional - Localized release notes. - **language** (string) - Required - The language of the release notes. - **text** (string) - Required - The release notes. - **status** (string) - Optional - The status of the release (draft, inProgress, halted, completed). - **userFraction** (number) - Optional - The fraction of users to roll out to (0.0 to 1.0). - **countryTargeting** (object) - Optional - Targeting countries. - **countries** (array) - Optional - List of countries. - **country** (string) - Required - A country code. - **includeRestOfWorld** (boolean) - Optional - Whether to include the rest of the world. - **inAppUpdatePriority** (integer) - Optional - The in-app update priority of the release. ### Response #### Success Response (200) - **track** (object) - The created track resource. - **trackId** (string) - Identifier of the track. - **releases** (array) - The list of releases associated with the track. ### Response Example ```json { "track": { "trackId": "production", "releases": [ { "versionCodes": ["1", "2"], "releaseNotes": [ { "language": "en-US", "text": "Initial release." } ], "status": "completed", "userFraction": 1.0, "countryTargeting": { "includeRestOfWorld": true }, "inAppUpdatePriority": 0 } ] } } ``` ``` -------------------------------- ### GET Request for Voided Purchases Source: https://developers.google.com/android-publisher/voided-purchases Use this GET request to retrieve a list of voided purchases for your application. Include your package name and an access token. Optional parameters can filter the results by time, quantity, and type. ```http GET https://www.googleapis.com/androidpublisher/v3/applications/ your_package_name/purchases/voidedpurchases?access_token=your_auth_token ``` -------------------------------- ### monetization.subscriptions.create Source: https://developers.google.com/android-publisher/api-ref/rest/v3/monetization.subscriptions/create Creates a new subscription. Newly added base plans will remain in draft state until activated. ```APIDOC ## POST applications.subscriptions.create ### Description Creates a new subscription. Newly added base plans will remain in draft state until activated. ### Method POST ### Endpoint `https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/subscriptions` ### Parameters #### Path Parameters - **packageName** (string) - Required. The parent app (package name) for which the subscription should be created. Must be equal to the packageName field on the Subscription resource. #### Query Parameters - **productId** (string) - Required. The ID to use for the subscription. For the requirements on this format, see the documentation of the productId field on the Subscription resource. - **regionsVersion** (object (RegionsVersion)) - Required. The version of the available regions being used for the subscription. #### Request Body The request body contains an instance of `Subscription`. ### Response Body If successful, the response body contains a newly created instance of `Subscription`. ### Authorization scopes Requires the following OAuth scope: - `https://www.googleapis.com/auth/androidpublisher` ``` -------------------------------- ### v3.externaltransactions.getexternaltransaction Source: https://developers.google.com/android-publisher/api-ref/rest Gets an existing external transaction. ```APIDOC ## GET /androidpublisher/v3/{name=applications/*/externalTransactions/*} ### Description Gets an existing external transaction. ### Method GET ### Endpoint /androidpublisher/v3/{name=applications/*/externalTransactions/*} ### Parameters #### Path Parameters - **name** (string) - Required - The resource name of the external transaction, in the format `applications/{applicationId}/externalTransactions/{externalTransactionId}`. ``` -------------------------------- ### v3.edits.listings.get Source: https://developers.google.com/android-publisher/api-ref/rest Gets a localized store listing. ```APIDOC ## GET /androidpublisher/v3/applications/{packageName}/edits/{editId}/listings/{language} ### Description Gets a localized store listing. ### Method GET ### Endpoint /androidpublisher/v3/applications/{packageName}/edits/{editId}/listings/{language} ### Parameters #### Path Parameters - **packageName** (string) - Required - The package name of the application. - **editId** (string) - Required - The ID of the edit. - **language** (string) - Required - The language of the listing to retrieve. ``` -------------------------------- ### monetization.subscriptions.basePlans.offers.batchGet Source: https://developers.google.com/android-publisher/api-ref/rest/v3/monetization.subscriptions.basePlans.offers/batchGet Reads one or more subscription offers. The request requires path parameters for `packageName`, `productId`, and `basePlanId`. The request body includes a list of `GetSubscriptionOfferRequest` objects specifying the offers to retrieve. The response body contains a list of `SubscriptionOffer` objects representing the retrieved offers. Authorization using the `https://www.googleapis.com/auth/androidpublisher` OAuth scope is required. ```APIDOC ## POST applications/{packageName}/subscriptions/{productId}/basePlans/{basePlanId}/offers:batchGet ### Description Reads one or more subscription offers. ### Method POST ### Endpoint `https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/subscriptions/{productId}/basePlans/{basePlanId}/offers:batchGet` ### Path Parameters - **packageName** (string) - Required. The parent app (package name) for which the subscriptions should be created or updated. Must be equal to the packageName field on all the requests. - **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 read. May be specified as '-' to read offers from multiple base plans. ### Request Body - **requests** (array of objects) - Required. A list of update requests of up to 100 elements. All requests must update different subscriptions. - **GetSubscriptionOfferRequest** (object) ### Request Example ```json { "requests": [ { "offerId": "offer_1" }, { "offerId": "offer_2" } ] } ``` ### Response Body #### Success Response (200) - **subscriptionOffers** (array of objects) - A list of retrieved subscription offers. - **SubscriptionOffer** (object) #### Response Example ```json { "subscriptionOffers": [ { "offerId": "offer_1", "basePlanId": "base_plan_1", "productId": "product_1" }, { "offerId": "offer_2", "basePlanId": "base_plan_2", "productId": "product_2" } ] } ``` ### Authorization Scopes - `https://www.googleapis.com/auth/androidpublisher` ``` -------------------------------- ### Get Review Source: https://developers.google.com/android-publisher/api-ref/rest/v3/reviews Retrieves a single review by its ID. ```APIDOC ## GET /reviews/{reviewId} ### Description Gets a single review. ### Method GET ### Endpoint /reviews/{reviewId} ### Parameters #### Path Parameters - **reviewId** (string) - Required - The ID of the review to retrieve. ``` -------------------------------- ### deviceTierConfigs.list Source: https://developers.google.com/android-publisher/api-ref/rest Returns created device tier configs, ordered by descending creation time. ```APIDOC ## GET /androidpublisher/v3/applications/{packageName}/deviceTierConfigs ### Description Returns created device tier configs, ordered by descending creation time. ### Method GET ### Endpoint /androidpublisher/v3/applications/{packageName}/deviceTierConfigs ``` -------------------------------- ### HTTP request for applications.deviceTierConfigs.list Source: https://developers.google.com/android-publisher/api-ref/rest/v3/applications.deviceTierConfigs/list This is the HTTP request to list device tier configurations for an application. It requires the application's package name as a path parameter and can optionally include `pageSize` and `pageToken` for pagination. The request body must be empty. ```HTTP GET https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/deviceTierConfigs ``` -------------------------------- ### Get Track Source: https://developers.google.com/android-publisher/api-ref/rest/v3/edits.tracks Retrieves a specific track for an application. ```APIDOC ## GET /Edits.tracks.get ### Description Retrieves a specific track for an application. ### Method GET ### Endpoint /Edits.tracks.get ### Parameters #### Query Parameters - **track** (string) - Required - The identifier of the track to retrieve (e.g., `production`). ### Response #### Success Response (200) - **track** (object) - The requested track resource. - **track** (string) - Identifier of the track. - **releases[]** (array of objects) - In a read request, represents all active releases in the track. #### Response Example { "track": { "track": "production", "releases": [ { "name": "v1.0", "versionCodes": ["1", "2"], "releaseNotes": [ { "language": "en-US", "text": "Initial release." } ], "status": "completed", "userFraction": 1.0, "countryTargeting": { "countries": ["US", "CA"], "includeRestOfWorld": true }, "inAppUpdatePriority": 0 } ] } } ``` -------------------------------- ### Sample SubscriptionPurchaseV2 Response Source: https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.subscriptionsv2/get This is a sample JSON response for a successful `subscriptionsv2.get` request, illustrating the structure of the `SubscriptionPurchaseV2` object and its various fields. ```json { "kind": "androidpublisher#subscriptionPurchaseV2", "regionCode": "US", "startTime": "2024-01-15T10:00:00Z", "subscriptionState": "SUBSCRIPTION_STATE_ACTIVE", "latestOrderId": "GPA.3345-1234-5678-90123", "linkedPurchaseToken": null, "pausedStateContext": null, "canceledStateContext": null, "testPurchase": null, "acknowledgementState": "ACKNOWLEDGEMENT_STATE_ACKNOWLEDGED", "externalAccountIdentifiers": { "externalAccountId": "user-ext-acc-88765", "obfuscatedExternalAccountId": " obfuscated-acc-id-aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789", "obfuscatedExternalProfileId": "obfuscated-prof-id-9876543210zYxWvUtSrQpOnMlKjIhGfEdCbA" }, "subscribeWithGoogleInfo": { "profileId": "109876543210987654321", "profileName": "Alex Smith", "emailAddress": "alex.smith.swg@example.com", "givenName": "Alex", "familyName": "Smith" }, "lineItems": [ { "productId": "premium_monthly_v2", "expiryTime": "2025-01-15T10:00:00Z", "latestSuccessfulOrderId": "GPA.3345-1234-5678-90123", "autoRenewingPlan": { "autoRenewEnabled": true, "recurringPrice": { "units": "12", "nanos": 990000000, "currencyCode": "USD" }, "priceChangeDetails": null, "priceStepUpConsentDetails": null, "installmentDetails": null }, "prepaidPlan": null, "offerDetails": { "basePlanId": "premium-monthly", "offerId": "intro-offer-7day", "offerTags": [ "initial_discount", "seasonal_promo" ] }, "offerPhase": { "basePrice":{} }, "deferredItemReplacement": null, "signupPromotion": null, "itemReplacement": null } ], "etag":"74798db94d8dc4c76ad1df9f77fd9693", "outofAppPurchaseContext": null } ``` -------------------------------- ### Get a Review Source: https://developers.google.com/android-publisher/api-ref/rest/v3/reviews Retrieves a specific app review by its ID. ```APIDOC ## GET /reviews/{reviewId} ### Description Retrieves a specific app review using its unique identifier. ### Method GET ### Endpoint `/reviews/{reviewId}` ### Parameters #### Path Parameters - **reviewId** (string) - Required - The unique identifier of the review to retrieve. ### Response #### Success Response (200) - **reviewId** (string) - Unique identifier for this review. - **authorName** (string) - The name of the user who wrote the review. - **comments** (array of objects) - A repeated field containing comments for the review. ### Response Example ```json { "reviewId": "some-review-id", "authorName": "Jane Doe", "comments": [ { "userComment": { "text": "Great app!", "lastModified": { "seconds": 1678886400, "nanos": 0 }, "starRating": 5, "reviewerLanguage": "en", "device": "Pixel 5", "androidOsVersion": 30, "appVersionCode": 123, "appVersionName": "1.0.0", "thumbsUpCount": 10, "thumbsDownCount": 0, "deviceMetadata": { "productName": "Pixel 5", "manufacturer": "Google", "screenSize": { "width": 1080, "height": 2340 }, "apiVersion": 30, "cpuMake": "Qualcomm", "cpuCores": 8, "largeScreen": false }, "originalText": "" } } ] } ``` ``` -------------------------------- ### HTTP Request for Listing Subscription Offers Source: https://developers.google.com/android-publisher/api-ref/rest/v3/monetization.subscriptions.basePlans.offers/list This is the basic HTTP GET request structure to list all offers for a given subscription base plan. Ensure you replace the placeholder path parameters with your specific values. ```HTTP GET https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/subscriptions/{productId}/basePlans/{basePlanId}/offers ``` -------------------------------- ### PendingCancellation Source: https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.subscriptionsv2 An indicator for a pending cancellation on a virtual installment plan. ```APIDOC ## PendingCancellation ### Description This type has no fields. This is an indicator of whether there is a pending cancellation on the virtual installment plan. The cancellation will happen only after the user finished all committed payments. ``` -------------------------------- ### Get Order Details (Single) Source: https://developers.google.com/android-publisher/api-ref/rest/v3/orders Retrieves order details for a single order. ```APIDOC ## get ### Description Get order details for a single order. ### Method GET (assumed based on common RESTful practices for single resource retrieval) ### Endpoint /orders/{orderId} (assumed path structure with path parameter) ``` -------------------------------- ### Get Order Details (Batch) Source: https://developers.google.com/android-publisher/api-ref/rest/v3/orders Retrieves order details for a list of orders. ```APIDOC ## batchget ### Description Get order details for a list of orders. ### Method GET (assumed based on common RESTful practices for batch retrieval) ### Endpoint /orders:batchGet (assumed path structure) ``` -------------------------------- ### systemapks.variants.create Source: https://developers.google.com/android-publisher/api-ref/rest/v3/systemapks.variants/create Creates an APK which is suitable for inclusion in a system image from an already uploaded Android App Bundle. ```APIDOC ## POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/systemApks/{versionCode}/variants ### Description Creates an APK which is suitable for inclusion in a system image from an already uploaded Android App Bundle. ### Method POST ### Endpoint https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/systemApks/{versionCode}/variants ### Path Parameters - **packageName** (string) - Required - Package name of the app. - **versionCode** (string (int64 format)) - Required - The version code of the App Bundle. ### Request Body The request body contains an instance of `Variant`. ### Response Body If successful, the response body contains a newly created instance of `Variant`. ### Authorization Scopes Requires the following OAuth scope: - https://www.googleapis.com/auth/androidpublisher ``` -------------------------------- ### Batch Get Orders Source: https://developers.google.com/android-publisher/api-ref/rest/v3/orders Retrieves details for multiple orders in a single request. ```APIDOC ## GET /orders:batchGet ### Description Retrieves details for multiple orders in a single request. This method is useful for fetching a list of orders efficiently. ### Method GET ### Endpoint /orders:batchGet ### Parameters #### Query Parameters - **orderIds** (string) - Required - A comma-separated list of order IDs to retrieve. Maximum of 1000 order IDs per request. - **maxResults** (integer) - Optional - The maximum number of orders to return. Defaults to 100. - **startIndex** (integer) - Optional - The index of the first order to return. ### Response #### Success Response (200) - **orders** (array) - A list of order objects. #### Response Example { "orders": [ { "orderId": "1234567890abcdef", "purchaseToken": "abcdef0123456789", "state": "DELIVERED" }, { "orderId": "fedcba0987654321", "purchaseToken": "9876543210fedcba", "state": "CANCELLED" } ] } ``` -------------------------------- ### create Source: https://developers.google.com/android-publisher/api-ref/rest/v3/monetization.subscriptions.basePlans.offers Creates a new subscription offer. ```APIDOC ## create ### Description Creates a new subscription offer. ### Method POST ### Endpoint `/monetization/subscriptions/offers/{packageName}/{productId}/{basePlanId}` (Assumed structure) ``` -------------------------------- ### Get Single Review Source: https://developers.google.com/android-publisher/api-ref/rest Retrieves a single review for a given application and review ID. ```APIDOC ## GET /androidpublisher/v3/applications/{packageName}/reviews/{reviewId} ### Description Gets a single review. ### Method GET ### Endpoint /androidpublisher/v3/applications/{packageName}/reviews/{reviewId} ``` -------------------------------- ### monetization.subscriptions.basePlans.offers.get Source: https://developers.google.com/android-publisher/api-ref/rest/v3/monetization.subscriptions.basePlans.offers/get Reads a single offer. The request requires specifying `packageName`, `productId`, `basePlanId`, and `offerId` as path parameters. The request body must be empty, and a successful response returns a `SubscriptionOffer` instance. Authorization requires the `https://www.googleapis.com/auth/androidpublisher` OAuth scope. ```APIDOC ## GET https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/subscriptions/{productId}/basePlans/{basePlanId}/offers/{offerId} ### Description Reads a single offer. ### Method GET ### Endpoint `https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/subscriptions/{productId}/basePlans/{basePlanId}/offers/{offerId}` ### Parameters #### Path Parameters - **packageName** (string) - Required. The parent app (package name) of the offer to get. - **productId** (string) - Required. The parent subscription (ID) of the offer to get. - **basePlanId** (string) - Required. The parent base plan (ID) of the offer to get. - **offerId** (string) - Required. The unique offer ID of the offer to get. ### Request Body The request body must be empty. ### Response #### Success Response (200) If successful, the response body contains an instance of `SubscriptionOffer`. ### Authorization scopes Requires the following OAuth scope: - `https://www.googleapis.com/auth/androidpublisher` ``` -------------------------------- ### List All Reviews Source: https://developers.google.com/android-publisher/api-ref/rest Lists all reviews for a given application. ```APIDOC ## GET /androidpublisher/v3/applications/{packageName}/reviews ### Description Lists all reviews. ### Method GET ### Endpoint /androidpublisher/v3/applications/{packageName}/reviews ``` -------------------------------- ### Get Subscription Metadata Source: https://developers.google.com/android-publisher/api-ref/rest Retrieves metadata for a specific subscription purchase using its token. ```APIDOC ## GET /androidpublisher/v3/applications/{packageName}/purchases/subscriptionsv2/tokens/{token} ### Description Get metadata about a subscription ### Method GET ### Endpoint /androidpublisher/v3/applications/{packageName}/purchases/subscriptionsv2/tokens/{token} ``` -------------------------------- ### Sample Response for Deferring Subscription Source: https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.subscriptions/defer This sample shows a successful response from the `purchases.subscriptions.defer` API. It contains the `newExpiryTimeMillis` indicating the updated subscription expiry. ```json { "newExpiryTimeMillis": "1776004800000" } ``` -------------------------------- ### Get Order Details Source: https://developers.google.com/android-publisher/api-ref/rest/v3/orders Retrieves the details of a specific order using its order ID. ```APIDOC ## GET /orders/{orderId} ### Description Retrieves the details of a specific order. ### Method GET ### Endpoint /orders/{orderId} ### Parameters #### Path Parameters - **orderId** (string) - Required - The unique identifier of the order. ### Response #### Success Response (200) - **order** (object) - Contains the full details of the order. #### Response Example { "order": { "orderId": "1234567890abcdef", "purchaseToken": "abcdef0123456789", "state": "DELIVERED", "orderTime": "2023-10-27T10:00:00Z", "buyerAddress": { "name": "John Doe", "address1": "123 Main St", "city": "Anytown", "country": "US" }, "lineItems": [ { "productId": "com.example.app.product1", "productTitle": "Example Product", "quantity": 1 } ], "totalPrice": { "currencyCode": "USD", "price": "1.99" } } } ``` -------------------------------- ### Get Product Purchase V2 Source: https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.productsv2/getproductpurchasev2 Checks the purchase and consumption status of an in-app item. ```APIDOC ## GET https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/purchases/productsv2/tokens/{token} ### Description Checks the purchase and consumption status of an in-app item. ### Method GET ### Endpoint https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/purchases/productsv2/tokens/{token} ### Parameters #### Path Parameters - **packageName** (string) - Required - The package name of the application the inapp product was sold in (for example, 'com.some.thing'). - **token** (string) - Required - The token provided to the user's device when the inapp product was purchased. ### Request Body The request body must be empty. ### Response #### Success Response (200) - **ProductPurchaseV2** (object) - An instance of ProductPurchaseV2 containing the purchase and consumption status. ### Authorization scopes Requires the following OAuth scope: - https://www.googleapis.com/auth/androidpublisher ``` -------------------------------- ### monetization.onetimeproducts.purchaseOptions.offers.list Source: https://developers.google.com/android-publisher/api-ref/rest/v3/monetization.onetimeproducts.purchaseOptions.offers/list Lists all offers under a given app, product, or purchase option. The request uses path parameters for the package name, product ID, and purchase option ID to specify the scope of the offers to be listed. Optional query parameters such as `pageSize` and `pageToken` are available for controlling the number of results and retrieving subsequent pages. The request body must be empty for this specific API call. ```APIDOC ## GET applications.oneTimeProducts.purchaseOptions.offers.list ### Description Lists all offers under a given app, product, or purchase option. ### Method GET ### Endpoint `https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/oneTimeProducts/{productId}/purchaseOptions/{purchaseOptionId}/offers` ### Parameters #### Path Parameters - **packageName** (string) - Required. The parent app (package name) for which the offers should be read. - **productId** (string) - Required. The parent one-time product (ID) for which the offers should be read. May be specified as '-' to read all offers under an app. - **purchaseOptionId** (string) - Required. The parent purchase option (ID) for which the offers should be read. May be specified as '-' to read all offers under a one-time product or an app. Must be specified as '-' if productId is specified as '-'. #### Query Parameters - **pageSize** (integer) - Optional. The maximum number of offers to return. The service may return fewer than this value. If unspecified, at most 50 offers will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. - **pageToken** (string) - Optional. A page token, received from a previous `ListOneTimeProductsOffers` call. Provide this to retrieve the subsequent page.When paginating, productId, packageName and purchaseOptionId provided to `ListOneTimeProductsOffersRequest` must match the call that provided the page token. ### Request Body The request body must be empty. ### Response #### Success Response (200) - **oneTimeProductOffers** (array) - The oneTimeProduct offers from the specified request. - **nextPageToken** (string) - A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. #### Response Example ```json { "oneTimeProductOffers": [ { "object (OneTimeProductOffer)" } ], "nextPageToken": "string" } ``` ### Authorization scopes Requires the following OAuth scope: - `https://www.googleapis.com/auth/androidpublisher` ``` -------------------------------- ### Get System APK Variant Source: https://developers.google.com/android-publisher/api-ref/rest Retrieves details of a previously created system APK variant. ```APIDOC ## GET /androidpublisher/v3/applications/{packageName}/systemApks/{versionCode}/variants/{variantId} ### Description Returns a previously created system APK variant. ### Method GET ### Endpoint /androidpublisher/v3/applications/{packageName}/systemApks/{versionCode}/variants/{variantId} ``` -------------------------------- ### Get In-app Product Source: https://developers.google.com/android-publisher/api-ref/rest/v3/inappproducts Retrieves details for a specific in-app product, which can be a managed product or a subscription. ```APIDOC ## get ### Description Gets an in-app product, which can be a managed product or a subscription. ### Method GET ### Endpoint /{productId} ### Parameters #### Path Parameters - **productId** (string) - Required - The ID of the in-app product to retrieve. #### Query Parameters - **packageName** (string) - Required - The package name of the application. ``` -------------------------------- ### monetization.subscriptions.batchGet Source: https://developers.google.com/android-publisher/api-ref/rest/v3/monetization.subscriptions/batchGet Reads one or more subscriptions. Requires the app's package name as a path parameter and up to 100 unique subscription product IDs as query parameters. The request body must be empty, while the response body contains a list of the requested subscriptions. ```APIDOC ## GET https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/subscriptions:batchGet ### Description Reads one or more subscriptions using a GET request. ### Method GET ### Endpoint `https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/subscriptions:batchGet` ### Parameters #### Path Parameters - **packageName** (string) - Required. The parent app (package name) for which the subscriptions should be retrieved. Must be equal to the packageName field on all the requests. #### Query Parameters - **productIds[]** (string) - Required. A list of up to 100 subscription product IDs to retrieve. All the IDs must be different. ### Request Body The request body must be empty. ### Response #### Success Response (200) - **subscriptions** (array) - The list of requested subscriptions, in the same order as the request. - **object (Subscription)** #### Response Example ```json { "subscriptions": [ { "object (Subscription)" } ] } ``` ### Authorization scopes Requires the following OAuth scope: - `https://www.googleapis.com/auth/androidpublisher` ```