SouravPal95
SouravPal95

Reputation: 31

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. 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. The last step is reviewing the feeds API processing and report which is where I am at a dead-end. After decrypting and decompressing the response, I get a JSON payload that looks like this. 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

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"
    }
  ]
}

Upvotes: 0

Views: 1933

Answers (1)

SouravPal95
SouravPal95

Reputation: 31

Finally figured out the error. Use an online JSON schema validator tool. and validate it against the this schema and adjust your payload accordingly.

Upvotes: 0

Related Questions