API Task Flows
The sections below describe the API flows for common uses of the App Submission API.
- API Prerequisites
- About ETags
- About Edits
- The Edit Lifecycle
- Create a new Edit
- Get the Open Edit
- Manage APK Files
- Listings, Details, and APK targets
- Image Uploads
- Video Uploads
- Set a Future Release Date
- Commit the Edit.
- Supported Languages
- Supported Time Zones
Before you use the App Submission API, follow these steps to obtain the App ID key and the open Edit ID for your app.
- Log in to the developer console.
- Navigate to Apps & Services and click the app.
- In the General Information tab, copy the App ID key from the App Submission API Keys panel.
The API provides a mechanism to ensure that concurrent API calls do not cause resource updates to be overwritten. To update a resource, you send a GET request to obtain the current value of the resource, and then send a PUT request to update the value. The GET response includes an ETag, which is unique to the current value of the resource. You return the ETag in the PUT request. The request fails if the ETag value does not match the value on the server, because a mismatch indicates that the resource value has changed since you issued the GET request.
You also need to send the ETag in each DELETE request.
To modify information about your app in the Appstore, you create an Edit. You can think of an Edit as a container for the next version of the app. The Edit allows you to prepare a number of changes to your app and then deploy the changes all at the same time. For example, you can update description fields and upload new resources (such as APK files and images) for the next version of your app. You make these changes in a single Edit, which stays in a draft state until you commit the changes.
When you first create an Edit, the Edit is a copy of the currently-deployed active app. You can then modify the Edit by calling the API methods. When you are ready to submit the changes, you commit the Edit to submit this app version to the Appstore. You can also delete the Edit at any time, which discards the changes and leaves your app as it was.
Note: Each app may have only a single Edit open at a time. If you send a request to create an Edit, but an active Edit already exists, you will receive a response with an error message.
The Edit Lifecycle
This section shows a typical flow for using an Edit to update app information. The flow is identical whether you create a new Edit or retrieve the open Edit.
Modify the Edit fields as required. In all of the API requests, the path parameters include the appId and editId of the Edit.
Because the API supports PUT rather than PATCH, use the following pattern to update fields:
- Send a GET request to retrieve the current value of the field. Also retrieve the ETag from the header in the response.
- Modify the data in the field as required.
- Use a PUT request to update the whole field. Include the ETag in the PUT request header.
Upload resources as required. Depending on the resource type, this action may add the new resource to the list of resources, or it may overwrite the existing resource. Refer to the detailed sections below.
When you are ready to deploy the new app version, commit the Edit.
Create a new Edit
Call createEdit with the appId of the app that you want to modify.
This creates a new Edit for the specified app. The initial field values and uploads for the Edit (such as the APKs, store listings, and images) are copied from the deployed version of the app.
The successful response to this request includes the
editId of the Edit. Use this Id in subsequent requests to update Edit fields or to upload resources.
Get the Open Edit
Call getActiveEdit to get the
editId of the open Edit for your app.
Manage APK Files
For exact request syntax, see the Edits.apks section in the API reference.
Replace an existing APK
Use the REPLACE method to replace an existing APK and keep the existing APK device-targeting information.
- Call listApks to get the list of APKs.
- Call replaceApk to replace the APK, and preserve the existing device targeting.
Delete an existing APK
Use the DELETE method to delete an APK.
If you want to replace an APK and delete the current targeting information, delete the APK and then upload the new version of the APK.
- Call listApks to get the list of APKs.
- Call deleteApk to delete the specified APK.
- (Optional) Call uploadApk to upload a new version of the APK.
Add a new APK
To add a new APK, call uploadApk.
Upload a large APK
If your APK file is larger than 300M, call the following methods to upload the APK:
- call uploadLargeAPK to upload the file.
- call attachAPK to attach the APK to the Edit.
Listings, Details, and APK targets
A new Edit object contains listings for each locale. Use the following steps to add information for a new locale or modify the store listing for an existing locale:
- Call getListing.
- Update the listing. Copy the ETag from the getListing response.
- Call updateListing. Ensure that you add the ETag to the request header.
Follow the same pattern to modify the Edit details. Call the Get method, update the details as required, and then call modifyDetails to save the changes.
Follow the same pattern to modify the APK target devices. Call the Get method, add and update the device targets as required, and then call modifyTargeting to save the changes. See App Submission API Endpoints.
Call uploadImage to upload a new image. If the image type supports a single image (such as icons), the new image replaces the old image. For fields that support multiple image (such as screen shots), the image is added to the set of existing images. You can delete any images that you no longer need.
Valid values for imageType include:
For information about image sizes, see Image Asset Guidelines .
Call uploadVideo to upload new videos.
Set a Future Release Date
By default, the Edit contains a NULL release date. After you commit the Edit, the Appstore starts the publishing procedure for the new version of the app.
To set a future release date, call putAvailability.
In the request body, specify the release date/time using a
dateTime value and a
dateTime follows the UTC format: YYYY-MM-DDThh:mm:ss.s (such as 2017-07-16T19:20:30.45).
zoneId value is one of the supported time zones.
Commit the Edit.
To submit the changes to the Appstore, call commitEdit.
If there are no validation errors, all the changes specified in the Edit will become part of the live app. These changes can take several hours to get published, just as when you make changes through the Play Console.
The following table displays the supported values for the
Supported Time Zones
The following tables display the supported values for the
Last updated: Nov 02, 2020