调用AppStore Connect API设置IAP定价遇日期参数错误求助
解决App Store Connect API设置IAP定价时的409错误(ENTITY_ERROR.INVALID_END_DATE)
问题根源
你的请求中为CZE地区的价格区间设置了endDate,但App Store Connect要求基准地区的最后一个价格区间必须不包含结束日期,以此保证定价时间线完全覆盖,没有空白期。
正确参数设置方案
修改请求内容,核心调整点:
- 移除
included数组内对应CZE价格项的endDate字段(不要传该字段,既不能设为null也不能填日期) - 若希望定价立即生效,可省略
startDate;若需要指定生效时间,保留合理的startDate即可
修正后的完整请求示例
{ "data": { "type": "inAppPurchasePriceSchedules", "relationships": { "baseTerritory": { "data": { "id": "CZE", "type": "territories" } }, "inAppPurchase": { "data": { "id": "6477355320", "type": "inAppPurchases" } }, "manualPrices": { "data": [ { "id": "eyJzIjoiNjQ3NzM1NTMyMCIsInQiOiJDWkUiLCJwIjoiMTAwNTEifQ", "type": "inAppPurchasePrices" } ] } } }, "included": [ { "id": "eyJzIjoiNjQ3NzM1NTMyMCIsInQiOiJDWkUiLCJwIjoiMTAwNTEifQ", "type": "inAppPurchasePrices", "attributes": { "startDate": "2024-02-04" }, "relationships": { "inAppPurchasePricePoint": { "data": { "id": "eyJzIjoiNjQ3NzM1NTMyMCIsInQiOiJDWkUiLCJwIjoiMTAwNTEifQ", "type": "inAppPurchasePricePoints" } }, "inAppPurchaseV2": { "data": { "id": "6477355320", "type": "inAppPurchases" } } } } ] }
额外注意事项
- 确认
inAppPurchasePricePoint的ID对应99.00捷克克朗的价格点(通过GET /v2/inAppPurchases/{id}/pricePoints获取的正确值) - 由于你选择以CZE为基准地区并接受自动汇率转换,无需手动添加其他地区的价格,App Store会自动根据基准价生成其他地区的定价
内容的提问来源于stack exchange,提问作者Miroslav
相关产品推荐
相关产品推荐

