I'm filing this as a bug, with three sections, "To Repro", "Actual" and "Expected"
To Repro
Using the App Store Connect API, you can load the price schedule for an IAP, like this:
https://api.appstoreconnect.apple.com/v1/inAppPurchasePriceSchedules/:iapId/manualPrices
Actual: Indistinguishable Prices
The API at least one inAppPurchasePrices
object per territory, but doesn't mention any relationships to the territory or the price point. For the current price, where the startDate
is null, it's showing a bunch of indistinguishable "price" objects that include no pricing information, and no visible link to any pricing information.
In other words, the API returns 175 of these meaningless blobs, which are only distinguished by their IDs, with no visible price or territory information:
{
"type": "inAppPurchasePrices",
"id": "eyJpIjoiMTM5MzU0MTgzMSIsImQiOjAsImMiOiJUVE8ifQ",
"attributes": {
"startDate": null
},
"links": {
"self": "https://api.appstoreconnect.apple.com/v1/inAppPurchasePrices/eyJpIjoiMTM5MzU0MTgzMSIsImQiOjAsImMiOiJUVE8ifQ"
}
},
{
"type": "inAppPurchasePrices",
"id": "eyJpIjoiMTM5MzU0MTgzMSIsImQiOjAsImMiOiJCSUgifQ",
"attributes": {
"startDate": null
},
"links": {
"self": "https://api.appstoreconnect.apple.com/v1/inAppPurchasePrices/eyJpIjoiMTM5MzU0MTgzMSIsImQiOjAsImMiOiJCSUgifQ"
}
},
{
"type": "inAppPurchasePrices",
"id": "eyJpIjoiMTM5MzU0MTgzMSIsImQiOjAsImMiOiJNU1IifQ",
"attributes": {
"startDate": null
},
"links": {
"self": "https://api.appstoreconnect.apple.com/v1/inAppPurchasePrices/eyJpIjoiMTM5MzU0MTgzMSIsImQiOjAsImMiOiJNU1IifQ"
}
}
Workaround: include price points and territories
You can workaround this by adding include=inAppPurchasePricePoint,territory
to the request.
https://api.appstoreconnect.apple.com/v1/inAppPurchasePriceSchedules/:iapId/manualPrices?include=inAppPurchasePricePoint,territory
When you do that, each inAppPurchasePrices
object will have a relationships
section, like this:
{
"type": "inAppPurchasePrices",
"id": "eyJpIjoiMTM5MzU0MTgzMSIsImQiOjAsImMiOiJaV0UifQ",
"attributes": {
"startDate": null
},
"relationships": {
"inAppPurchasePricePoint": {
"data": {
"type": "inAppPurchasePricePoints",
"id": "MTM5MzU0MTgzMV96d181NTA"
}
},
"territory": {
"data": {
"type": "territories",
"id": "ZWE"
}
}
},
"links": {
"self": "https://api.appstoreconnect.apple.com/v1/inAppPurchasePrices/eyJpIjoiMTM5MzU0MTgzMSIsImQiOjAsImMiOiJaV0UifQ"
}
},
{
"type": "inAppPurchasePrices",
"id": "eyJpIjoiMTM5MzU0MTgzMSIsImQiOjAsImMiOiJNS0QifQ",
"attributes": {
"startDate": null
},
"relationships": {
"inAppPurchasePricePoint": {
"data": {
"type": "inAppPurchasePricePoints",
"id": "MTM5MzU0MTgzMV9ta181NTA"
}
},
"territory": {
"data": {
"type": "territories",
"id": "MKD"
}
}
},
"links": {
"self": "https://api.appstoreconnect.apple.com/v1/inAppPurchasePrices/eyJpIjoiMTM5MzU0MTgzMSIsImQiOjAsImMiOiJNS0QifQ"
}
},
{
"type": "inAppPurchasePrices",
"id": "eyJpIjoiMTM5MzU0MTgzMSIsImQiOjAsImMiOiJGU00ifQ",
"attributes": {
"startDate": null
},
"relationships": {
"inAppPurchasePricePoint": {
"data": {
"type": "inAppPurchasePricePoints",
"id": "MTM5MzU0MTgzMV9mbV81NTA"
}
},
"territory": {
"data": {
"type": "territories",
"id": "FSM"
}
}
},
But when you do that, the territories and price points will also appear in the response, in the included
section. (That's what include=
normally does in the App Store Connect API.)
Expected: The relationships links should be present even without explicitly including them
Normally, in the App Store Connect API, important relationships are linked even without explicitly adding includes
. For example, if you make a request like this:
https://api.appstoreconnect.apple.com/v1/apps/:appId/inAppPurchasesV2
You'll see that the corresponding data
objects each have a bunch of declared relationships, for inAppPurchaseLocalizations
, pricePoints
, content
, etc. The relationship links are there, even though I didn't explicitly include
any of them, so they don't clutter up the included
array.
Each inAppPurchasePrices
data
object should mention its territory and its price point, even without explicitly including
it (i.e. the relationships
links should be there, but the included
array should not).
Ideally, when I do this query:
https://api.appstoreconnect.apple.com/v1/inAppPurchasePriceSchedules/:iapId/manualPrices
The response should look like this:
{
"type": "inAppPurchasePrices",
"id": "eyJpIjoiMTM5MzU0MTgzMSIsImQiOjAsImMiOiJaV0UifQ",
"attributes": {
"startDate": null
},
"relationships": {
"inAppPurchasePricePoint": {
"links": {
"self": "https://api.appstoreconnect.apple.com/v1/inAppPurchasePricePoints/MTM5MzU0MTgzMV96d181NTA"
}
},
"territory": {
"links:" {
"self": "https://api.appstoreconnect.apple.com/v1/territories/ZWE"
}
}
},
"links": {
"self": "https://api.appstoreconnect.apple.com/v1/inAppPurchasePrices/eyJpIjoiMTM5MzU0MTgzMSIsImQiOjAsImMiOiJaV0UifQ"
}
},
{
"type": "inAppPurchasePrices",
"id": "eyJpIjoiMTM5MzU0MTgzMSIsImQiOjAsImMiOiJNS0QifQ",
"attributes": {
"startDate": null
},
"relationships": {
"inAppPurchasePricePoint": {
"links": {
"self": "https://api.appstoreconnect.apple.com/v1/inAppPurchasePricePoints/MTM5MzU0MTgzMV9ta181NTA"
}
},
"territory": {
"links:" {
"self": "https://api.appstoreconnect.apple.com/v1/territories/MKD"
}
}
"links": {
"self": "https://api.appstoreconnect.apple.com/v1/inAppPurchasePrices/eyJpIjoiMTM5MzU0MTgzMSIsImQiOjAsImMiOiJNS0QifQ"
}
},
{
"type": "inAppPurchasePrices",
"id": "eyJpIjoiMTM5MzU0MTgzMSIsImQiOjAsImMiOiJGU00ifQ",
"attributes": {
"startDate": null
},
"relationships": {
"inAppPurchasePricePoint": {
"links": {
"self": "https://api.appstoreconnect.apple.com/v1/inAppPurchasePricePoints/MTM5MzU0MTgzMV9mbV81NTA"
}
},
"territory": {
"links:" {
"self": "https://api.appstoreconnect.apple.com/v1/territories/FSM"
}
}
}
},