I have an app with a relatively complex subscription service (about 80 subscriptions). I am trying to set prices for the subscriptions using the following tutorial:
https://developer.apple.com/documentation/appstoreconnectapi/app_store/auto-renewable_subscriptions/managing_auto-renewable_subscriptions#4054523
All is good to start. I find the price that I want, then I find the equalizations for that price in all territories. The part that I get caught up on is the following:
To set a price point for another territory, use POST /v1/subscriptionPrices (Create a Subscription Price Change) again, replacing the subscriptionPricePoint ID with the other values you obtain from GET /v1/subscriptionPricePoints/{id}/equalizations (List All Subscription Price Point Equalizations). If the subscription is available in all territories, an individual POST /v1/subscriptionPrices call is necessary for each territory. You might consider automating this step.
If my app is available in all 160 territories, that is 160*80=12800 post requests that I need to make. If I send posts as fast as possible, I am able to get a couple per second, which would still take over an hour. However, when I do that, I get a 429 error:
{'errors': [{'status': '429', 'code': 'RATE_LIMIT_EXCEEDED', 'title': 'The request rate limit has been reached.', 'detail': "We've received too many requests for this API. Please wait and try again or slow down your request rate."}]}
When I set the price via the app store connect GUI, I am able to set price in all territories very quickly. I can't seem to find it, but it seems like there has to be a quicker way than doing the 12K post requests. Is it possible to batch these post requests, or another endpoint that allows me to set all equalizations at the same time? Any help would be appreciated.
Follow the below steps:-
/v1/subscriptions/{id}/pricePoints to get list of all prices, filter out and keep the price id of your desired price for next endpoint./v1/subscriptionPricePoints/{id}/equalizations with above price id, You will receive price ids for all territories./v1/subscriptionPrices to set price, instead you need to call /v1/subscriptions/{id} with PATCH means you need to modify your created subscription (Using this we can add prices for all territories at once)
https://developer.apple.com/documentation/appstoreconnectapi/modify_an_auto-renewable_subscriptionI think the information on the Apple documentation is ambiguous or lacks clear details about this matter:
To set a price point for another territory, use POST /v1/subscriptionPrices (Create a Subscription Price Change) again, replacing the subscriptionPricePoint ID with the other values you obtain from GET /v1/subscriptionPricePoints/{id}/equalizations (List All Subscription Price Point Equalizations). If the subscription is available in all territories, an individual POST /v1/subscriptionPrices call is necessary for each territory. You might consider automating this step.
https://developer.apple.com/documentation/appstoreconnectapi/app_store/auto-renewable_subscriptions/managing_auto-renewable_subscriptions
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With