I'm trying to automate the process of resuming, or completing a phased release using the "PATCH /v1/appStoreVersionPhasedReleases/{id}" endpoint.
When sending a request to update the PhasedReleaseState, I am seeing a 409 error that states:
An attribute value is not acceptable for the current resource state. You cannot change the state of a phased release in the current version state.
Source: {'pointer': '/data/attributes/pendingDeveloperRelease'}
Apparently PENDING_DEVELOPER_RELEASE is an invalid state.
Based on the "App and submission statuses" document, the PENDING_DEVELOPER_RELEASE state means:
Your app was approved, but you still need to release it for distribution on the App Store.
I'm a bit surprised that it would fail, when releasing the app for distribution is exactly what I'm trying to do by modifying the PhasedReleaseState to ACTIVE, or COMPLETE.
In addition, the "Release a version update in phases" document lists it as a valid state:
When you release a version update of your iOS, macOS, tvOS, or universal app, you can choose to release it to the App Store in stages. This option is available if you're submitting a version update and your app has one of the following app statuses;
Prepare for Submission
Waiting for Review
In Review
Waiting for Export Compliance
Pending Developer Release
Developer Rejected
Rejected
Metadata Rejected
Notably, some of the other states seem like they shouldn't be valid states to rollout an app (e.g. Rejected, Waiting for Review, etc.). So this makes me think that this document doesn't necessarily cover the list of valid states; more so, they tell you that you have the capability to perform a phased rollout for your app.
So, my question is, what are the valid app version states required for me to be able to successfully modify a phased rollout?
Any help, or pointers would be greatly appreciated. Thank you!
API Endpoint URL: https://developer.apple.com/documentation/appstoreconnectapi/modify_an_app_store_version_phased_release
App and submission statuses document:
https://developer.apple.com/help/app-store-connect/reference/app-and-submission-statuses
Release a version update in phases document: https://developer.apple.com/help/app-store-connect/update-your-app/release-a-version-update-in-phases