我创建了北美不记得其他国家订阅了 现在其他国家再创建提示
string(69) "https://sellingpartnerapi-fe.amazon.com/notifications/v1/destinations"
string(389) "[409] {
"errors": [
{
"code": "Conflict",
"message": "The requested resource conflict with a resource in the server.",
"details": "A destination with arn aws.partner/sellingpartnerapi.amazon.com/*******already exists for the application amzn1.sp.solution.*******
}
]
}"
然后需要删除试试 又删除不掉
string(333) "[404] {
"errors": [
{
"code": "NotFound",
"message": "The resource specified does not exist.",
"details": "Cannot find any subscription of notification type LISTINGS_ITEM_STATUS_CHANGE for applicationId amzn1.sp.solution******* and related authorized selling partner"
}
]
}"
我查询了getSubscription 的方法已经没有订阅事件了然后删除deleteDestination 一直提示我
string(173) "[403] {
"errors": [
{
"code": "Unauthorized",
"message": "The requested action is forbidden.",
"details": "Destination has subscriptions"
}
]
}" 这是为什么?
还有创建 创建 Destination(createDestination) 是需要每个卖家都创建一遍各自订阅自己的还是我只需要创建一次 让别人都订阅这个就可以啦? 北美欧洲日本是创建三个 Destination 还是一个就是通用的?
我试了一遍创建到删除,没有任何问题哦。你这个应该是中间接口哪里用的有问题
https://api.sp-api.net/zh/api-289542717
https://api.sp-api.net/zh/api-308930057
body:
{
"resourceSpecification": {
"sqs": {
"arn": "arn:aws:sqs:ap-southeast-1:345345343:myorder"
}
},
"name": "MySQSDestination0905"
}
如果是事件桥
{
"resourceSpecification": {
"eventBridge": {
"region": "us-east-1",
"accountId": "123456789012"
}
},
"name": "MyEventBridgeDestination"
}
这个地方同一个arn只能创建一次,你执行完毕之后,再创建,就会报错。name也不要重复
你的报错应该在这个地方
返回值:
{
"payload": {
"resource": {
"sqs": {
"arn": "arn:aws:sqs:ap-southeast-1:742343:myorder"
},
"eventBridge": null,
"privateSqs": null,
"webhook": null
},
"destinationId": "53f3423a5a1-4f9b-be5c-329423684c",
"name": "MySQSDestination0905"
}
}
不同地区是用同一个,还是分开。答案: 都可以。 不分地区,这个Destination 是共用的。
所以看你业务情况,你希望放在一个Destination 可以,分开也可以