Like Steve with his question, i have problem with this new API : Unknown Error trying to add Pricing to a In App Purchase String
I followed Guide from Apple : https://developer.apple.com/documentation/appstoreconnectapi/app_store/in-app_purchase/managing_in-app_purchases
I can change price from inAppPurchase but now i'm stuck with "Promotional Price".
For example, my inApp Puchase have a product tiers 8 at 9.99€ and from 1 November 2022 to 30 November i want a different price (product tiers 4 at 4.99€). The first of December, price will go back to 9.99€.
When testing inAppPurchasePriceSchedules POST, i have 409 error (Conflict) or 500 error.
Here one of payload i test :
{
"data": {
"relationships": {
"inAppPurchase": {
"data": {
"id": 1592386688,
"type": "inAppPurchases"
}
},
"manualPrices": {
"data": [{
"type": "inAppPurchasePrices",
"id": "${prices-id}"
}, {
"type": "inAppPurchasePrices",
"id": "${prices-id-1}"
}
]
}
},
"type": "inAppPurchasePriceSchedules"
},
"included": [{
"attributes": {
"startDate": "2022-11-01"
},
"id": "${prices-id}",
"relationships": {
"inAppPurchasePricePoint": {
"data": {
"id": "eyJzIjoiMTU5MjM4NjY4OCIsInQiOiJGUkEiLCJwIjoiMyJ9", //Tiers 5
"type": "inAppPurchasePricePoints"
}
},
"inAppPurchaseV2": {
"data": {
"id": "1592386688",
"type": "inAppPurchases"
}
}
}
}, {
"attributes": {
"startDate": "2022-12-01"
},
"id": "${prices-id-1}",
"relationships": {
"inAppPurchasePricePoint": {
"data": {
"id": "eyJzIjoiMTU5MjM4NjY4OCIsInQiOiJGUkEiLCJwIjoiNSJ9", //Tiers 10
"type": "inAppPurchasePricePoints"
}
},
"inAppPurchaseV2": {
"data": {
"id": "1592386688",
"type": "inAppPurchases"
}
}
},
"type": "inAppPurchasePrices"
}
]
}
I tried with 3 manualPrices, with "{$price1}" or "{$price2}" as id. I tried with id from current price...
I'm missing something, I must be close by...
Update
after using Fiddler on appstoreconnect.apple.com and adding / removing promotion i was able to create this payload :
{
"data": {
"type": "inAppPurchasePriceSchedules",
"relationships": {
"inAppPurchase": {
"data": {
"type": "inAppPurchases",
"id": "1592386688"
}
},
"manualPrices": {
"data": [{
"type": "inAppPurchasePrices",
"id": "${price1}"
}, {
"type": "inAppPurchasePrices",
"id": "${price2}"
}, {
"type": "inAppPurchasePrices",
"id": "${price3}"
}
]
}
}
},
"included": [{
"type": "inAppPurchasePrices",
"id": "${price1}",
"attributes": {
"startDate": null
},
"relationships": {
"inAppPurchaseV2": {
"data": {
"type": "inAppPurchases",
"id": "1592386688"
}
},
"inAppPurchasePricePoint": {
"data": {
"type": "inAppPurchasePricePoints",
"id": "eyJzIjoiMTU5MjM4NjY4OCIsInQiOiJGUkEiLCJwIjoiNSJ9"
}
}
}
}, {
"type": "inAppPurchasePrices",
"id": "${price2}",
"attributes": {
"startDate": "2022-11-01"
},
"relationships": {
"inAppPurchaseV2": {
"data": {
"type": "inAppPurchases",
"id": "1592386688"
}
},
"inAppPurchasePricePoint": {
"data": {
"type": "inAppPurchasePricePoints",
"id": "eyJzIjoiMTU5MjM4NjY4OCIsInQiOiJGUkEiLCJwIjoiMyJ9"
}
}
}
}, {
"type": "inAppPurchasePrices",
"id": "${price3}",
"attributes": {
"startDate": "2022-12-01"
},
"relationships": {
"inAppPurchaseV2": {
"data": {
"type": "inAppPurchases",
"id": "1592386688"
}
},
"inAppPurchasePricePoint": {
"data": {
"type": "inAppPurchasePricePoints",
"id": "eyJzIjoiMTU5MjM4NjY4OCIsInQiOiJGUkEiLCJwIjoiNSJ9"
}
}
}
}
]
}
This one worked !
Thanks
Guldil