有两种接收通知的方式:
LISTINGS_ITEM_STATUS_CHANGELISTINGS_ITEM_MFN_QUANTITY_CHANGEBRANDED_ITEM_CONTENT_CHANGE接口: POST /notifications/v1/destinations
参数:
{
  "resourceSpecification": {
    "eventBridge": {
      "region": "us-east-1",
      "accountId": "AWS_ACCOUNT_ID"
    }
  },
  "name": "MyEventBridgeDestination"
}返回值中保存:
destinationIdresource.eventBridge.name(用于 EventBridge 配置)aws.partner/sellingpartnerapi.amazon.com/{AWS Account Id}/{Application Id} 的 sourceRules > Create rule{
  "source": [
    {
      "prefix": "aws.partner/sellingpartnerapi.amazon.com"
    }
  ],
  "detail-type": ["LISTINGS_ITEM_STATUS_CHANGE"]
}接口: POST /notifications/v1/subscriptions/{notificationType}
参数示例:
{
  "payloadVersion": "1.0",
  "destinationId": "YOUR_DESTINATION_ID"
}notificationType 示例值:
"LISTINGS_ITEM_STATUS_CHANGE""BRANDED_ITEM_CONTENT_CHANGE"ORDER_CHANGEANY_OFFER_CHANGED(可以包含 marketplaceIds 过滤器)参考 AWS 文档配置权限策略,允许 SP-API 写入您指定的 SQS 队列。
提供以下 IAM policy 示例:
{
  "Effect": "Allow",
  "Principal": {
    "AWS": "arn:aws:iam::437568002678:root"
  },
  "Action": ["kms:GenerateDataKey", "kms:Decrypt"],
  "Resource": "*"
}接口: POST /notifications/v1/destinations
参数:
{
  "resourceSpecification": {
    "sqs": {
      "arn": "arn:aws:sqs:region:account_id:queue_name"
    }
  },
  "name": "MySQSQueueDestination"
}返回值中保存:
destinationId接口: POST /notifications/v1/subscriptions/{notificationType}
常见 notificationType 示例:
"ORDER_CHANGE"(订单状态/买家取消)"ANY_OFFER_CHANGED"(包含市场过滤器)参数示例(带过滤器):
{
  "payloadVersion": "1.0",
  "destinationId": "YOUR_DESTINATION_ID",
  "processingDirective": {
    "eventFilter": {
      "eventFilterType": "ANY_OFFER_CHANGED",
      "marketplaceIds": ["ATVPDKIKX0DER"]
    },
    "aggregationSettings": {
      "aggregationTimePeriod": "FiveMinutes"
    }
  }
}NotificationMetadata.notificationIdORDER_CHANGE 不支持 marketplaceIds 过滤,若需要请使用 ANY_OFFER_CHANGED具体流程是这个文档:https://developer-docs.amazon.com/sp-api/docs/notifications-api-v1-use-case-guide
@alex 想问下 这两种方式都依赖aws,如果用阿里云这个要怎么搞。我看事件和sqs都是aws服务
只能AWS。去申请一个AWS账号