简体   繁体   English

Amazon SP API:Feeds API 处理报告神秘错误代码和消息

[英]Amazon SP API: Feeds API processing report Mystery error code and message

I am currently in the process of building an API that allows users to programmatically list products in their amazon seller accounts.我目前正在构建一个 API,允许用户以编程方式在他们的亚马逊卖家账户中列出产品。 I have been able to implement the OAuth process, signing mechanism for making API calls and have gone through the recommended steps provided in the use case guide for feeds API.我已经能够实施 OAuth 流程、进行 API 调用的签名机制,并完成了 Feeds API 用例指南中提供的推荐步骤。 The last step is reviewing the feeds API processing and report which is where I am at a dead-end.最后一步是审查提要 API 处理和报告,这是我处于死胡同的地方。 After decrypting and decompressing the response, I get a JSON payload that looks like this.解密和解压缩响应后,我得到一个 JSON 有效负载,如下所示。 However, I am unable to understand the error, and how to rectify it based on the error code and messages displayed:但是,我无法理解错误,以及如何根据显示的错误代码和消息纠正它:

{
  "header": {
    "sellerId": "A1HGLY0OQBKE5U",
    "version": "2.0",
    "feedId": "50021018827"
  },
  "issues": [
    {
      "messageId": 1,
      "code": "4002008",
      "severity": "ERROR",
      "message": "The provided message did not meet the schema validation requirements for a feed message."
    },
    {
      "messageId": 2,
      "code": "4002008",
      "severity": "ERROR",
      "message": "The provided message did not meet the schema validation requirements for a feed message."
    },
    {
      "messageId": 3,
      "code": "4002008",
      "severity": "ERROR",
      "message": "The provided message did not meet the schema validation requirements for a feed message."
    },
    {
      "messageId": 4,
      "code": "4002008",
      "severity": "ERROR",
      "message": "The provided message did not meet the schema validation requirements for a feed message."
    },
    {
      "messageId": 5,
      "code": "4002008",
      "severity": "ERROR",
      "message": "The provided message did not meet the schema validation requirements for a feed message."
    },
    {
      "messageId": 6,
      "code": "4002008",
      "severity": "ERROR",
      "message": "The provided message did not meet the schema validation requirements for a feed message."
    },
    {
      "messageId": 7,
      "code": "4002008",
      "severity": "ERROR",
      "message": "The provided message did not meet the schema validation requirements for a feed message."
    },
    {
      "messageId": 8,
      "code": "4002008",
      "severity": "ERROR",
      "message": "The provided message did not meet the schema validation requirements for a feed message."
    },
    {
      "messageId": 9,
      "code": "4002008",
      "severity": "ERROR",
      "message": "The provided message did not meet the schema validation requirements for a feed message."
    },
    {
      "messageId": 10,
      "code": "4002008",
      "severity": "ERROR",
      "message": "The provided message did not meet the schema validation requirements for a feed message."
    }
  ],
  "summary": {
    "errors": 10,
    "warnings": 0,
    "messagesProcessed": 10,
    "messagesAccepted": 0,
    "messagesInvalid": 10
  }
}

The json payload that was originally uploaded was based on the JSON_LISTINGS_FEED feed type schema provided here最初上传的 json 负载基于此处提供的JSON_LISTINGS_FEED提要类型架构

The exact payload before encryption looks like this:加密前的确切负载如下所示:

{
  "header": {
    "sellerId": "A1HGLY0OQBKE5U",
    "version": "2.0"
  },
  "messages": [
    {
      "messageId": 1,
      "operationType": "UPDATE",
      "sku": "sk129"
    },
    {
      "messageId": 2,
      "operationType": "UPDATE",
      "sku": "sk1005"
    },
    {
      "messageId": 3,
      "operationType": "UPDATE",
      "sku": "sk131"
    },
    {
      "messageId": 4,
      "operationType": "UPDATE",
      "sku": "sk132"
    },
    {
      "messageId": 5,
      "operationType": "UPDATE",
      "sku": "sk133"
    },
    {
      "messageId": 6,
      "operationType": "UPDATE",
      "sku": "sk134"
    },
    {
      "messageId": 7,
      "operationType": "UPDATE",
      "sku": "sk135"
    },
    {
      "messageId": 8,
      "operationType": "UPDATE",
      "sku": "sk136"
    },
    {
      "messageId": 9,
      "operationType": "UPDATE",
      "sku": "sk137"
    },
    {
      "messageId": 10,
      "operationType": "UPDATE",
      "sku": "sk138"
    }
  ]
}

Finally figured out the error.终于找出错误所在。 Use an online JSON schema validator tool.使用在线 JSON 模式验证器工具。 and validate it against the this schema and adjust your payload accordingly.并根据此架构对其进行验证并相应地调整您的有效负载。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM