asc_availability_set
Enable or disable an app's App Store availability per territory. Updates each selected country individually and re-reads to confirm the desired sale state.
Instructions
Turn an app’s App Store availability on or off, territory by territory. Apple offers no bulk endpoint — appAvailabilities answers 403 "does not allow UPDATE" once the record exists — so this is one PATCH per territory, up to 175 of them. Territories already in the target state are skipped, a failure part-way does not abandon the rest, and every territory is re-read afterwards and compared against the request, because a loop that finishes is not evidence that the store matches what was asked for. Cannot set availableInNewTerritories: that is web-UI only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | Yes | Bundle ID, store name, or numeric Apple ID. | |
| state | Yes | on = downloadable, off = removed from sale. | |
| confirm | No | Confirmation token from a previous gated call. Not needed when the user is prompted directly. | |
| territories | No | ISO alpha-3 codes, e.g. ["USA","GBR"]. Omit for every territory the app has. |