Post not yet marked as solved
Post marked as unsolved with 1 replies, 669 views
Hi,
I'm trying to schedule a price change for an in-app purchase using the new ASC 2.3 API. Here is my request payload for the inAppPurchasePriceSchedules endpoint:
{
"data": {
"type": "inAppPurchasePriceSchedules",
"relationships": {
"manualPrices": {
"data": [
{
"type": "inAppPurchasePrices",
"id": "eyJzIjoiMTQzMTk5MjE5MiIsInQiOiJBRkciLCJwIjoiMTAxMjcifQ"
}
]
},
"inAppPurchase": {
"data": {
"type": "inAppPurchases",
"id": "1431992192"
}
},
"baseTerritory": {
"data": {
"type": "territories",
"id": "USA"
}
}
}
},
"included": [
{
"id": "eyJzIjoiMTQzMTk5MjE5MiIsInQiOiJBRkciLCJwIjoiMTAxMjcifQ",
"relationships": {
"inAppPurchaseV2": {
"data": {
"type": "inAppPurchases",
"id": "1431992192"
}
},
"inAppPurchasePricePoint": {
"data": {
"type": "inAppPurchasePricePoints",
"id": "eyJzIjoiMTQzMTk5MjE5MiIsInQiOiJBRkciLCJwIjoiMTAxMjcifQ"
}
}
},
"type": "inAppPurchasePrices",
"attributes": {}
},
{
"type": "territories",
"id": "USA"
}
]
}
The API returns the following error response:
{
"errors": [
{
"id": "e467f4e4-eb82-42b9-9a32-28d38b47881f",
"status": "409",
"code": "ENTITY_ERROR.BASE_TERRITORY_INTERVAL_REQUIRED",
"title": "There is a problem with the request entity",
"detail": "There must be at least one manual price for the base territory.",
"source": {
"pointer": "/data/relationships/manualPrices"
}
}
]
}
I probably need to create another relation between manualPrices and territory. But I have not found anything in the documentation in this regard.
It would be great if the documentation could be improved with some sample requests and parameter descriptions. For example, there are a lot of "id" properties without any explanation what the identifier means and how to retrieve it.
Thank you for your help!