我正在尝试通过新的 iTunes Connect API 端点自动上传应用内购买字符串。我已成功调用 Create InAppPurchase,但现在尝试通过调用 inAppPurchasePriceSchedules 添加定价层(https://developer.apple.com/documentation/appstoreconnectapi/add_a_scheduled_price_change_to_an_in-app_purchase https://developer.apple.com/documentation/appstoreconnectapi/add_a_scheduled_price_change_to_an_in-app_purchase)但它失败了。
我收到“UNEXPECTED_ERROR”消息,如果问题仍然存在,请联系 Apple
{
"errors":[
{
"status":"500",
"code":"UNEXPECTED_ERROR",
"title":"An unexpected error occurred.",
"detail":"An unexpected error occurred on the server side. If this issue continues, contact us at https://developer.apple.com/contact/."
}
]
}
我不确定我做错了什么?我可能完全错过了我需要做的事情。我发现很难理解这个 API 端点,因为它要求一个价格点的 ID,而我是通过调用其他端点之一来获取价格点的。但是,当我调用它请求第 6 层时,我返回了单层的 175 个结果(对于该单层 6,似乎每个地区都有一个结果)。那么,我是否需要在出现错误的端点中包含 175 个定价层?我尝试过添加单层以及所有 175 个层,但它仍然给出相同的错误,这让我更加困惑,
我找到了此页面上显示的示例(https://developer.apple.com/documentation/appstoreconnectapi/app_store/in-app_purchase/managing_in-app_purchases https://developer.apple.com/documentation/appstoreconnectapi/app_store/in-app_purchase/managing_in-app_purchases) 与 OpenAPI/Swagger 的定义不匹配inAppPurchasePriceSchedules
端点,例如该示例显示了一个属性prices
但招摇有一个manualPrices
data.relationships 部分中的属性。
我提出的要求
[POST] v1/inAppPurchasePriceSchedules
"data":{
"type":"inAppPurchasePriceSchedules",
"relationships":{
"inAppPurchase":{
"data":{
"type":"inAppPurchases",
"id":"1640694240"
}
},
"manualPrices":{
"data":[
{
"type":"inAppPurchasePrices",
"id":"${price1}"
}
]
}
}
},
"included":[
{
"attributes":{
"startDate":null
},
"relationships":{
"inAppPurchaseV2":{
"data":{
"type":"inAppPurchasesV2",
"id":"1640694240"
}
},
"inAppPurchasePricePoint":{
"data":{
"type":"inAppPurchasePricePoints",
"id":"eyJzIjoiMTY0MDY5NDI0MCIsInQiOiJHQlIiLCJwIjoiNiJ9"
}
}
},
"type":"inAppPurchasePrices",
"id":"${price1}"
}
]
}