amzn / selling-partner-api-models

This repository contains OpenAPI models for developers to use when developing software to call Selling Partner APIs.
Apache License 2.0
569 stars 730 forks source link

The feed API after the status is done does not actually update the product #2791

Closed morgota199 closed 4 months ago

morgota199 commented 4 months ago

I create a feed document and then the feed itself with this document.

After updating this queue I get “DONE”, but still the updates are not applied either immediately or within 24 hours What could be the problem?

Data for create feed Document "Content-Type": "application/json; charset=UTF-8"

{
  "header": {
    "sellerId": "A3311HI1DTJBGY",
    "version": "2.0",
    "issueLocale": "en_US"
  },
  "messages": [
    {
      "messageId": 1,
      "sku": "vartest1",
      "operationType": "PARTIAL_UPDATE",
      "productType": "PRODUCT",
      "patches": [
        {
          "op": "replace",
          "path": "/attributes/purchasable_offer",
          "value": [
            {
              "marketplace_id": "ATVPDKIKX0DER",
              "currency": "USD",
              "our_price": [
                {
                  "schedule": [
                    {
                      "value_with_tax": 30
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "op": "replace",
          "path": "/attributes/fulfillment_availability",
          "value": [
            {
              "fulfillment_channel_code": "DEFAULT",
              "quantity": 2,
              "lead_time_to_ship_max_days": 2
            }
          ]
        }
      ]
    }
  ]
}

Create feed params

const body = {
    feedType: "POST_FLAT_FILE_PRICEANDQUANTITYONLY_UPDATE_DATA",
    marketplaceIds: [marketplaceId],
    inputFeedDocumentId,
};
rodrifed commented 4 months ago

Hi @morgota199,

It seems that you are submitting a JSON_LISTINGS_FEED document, but in the request body you are specifying feedType: "POST_FLAT_FILE_PRICEANDQUANTITYONLY_UPDATE_DATA".

Also, keep in mind that if you use "operationType": "PARTIAL_UPDATE" you have to use the attributes property, and not patches:

"UPDATE" indicates the full set of item attributes are provided and any existing attributes data will be replaced with the provided attributes. "PARTIAL_UPDATE" indicates only the provided item attributes will be updated with the provided attribute data. "PATCH" indicates the provided JSON Patch operations will be used to update the applicable attributes. "DELETE" indicates the listings item will be deleted. "PARTIAL_UPDATE" is equivalent to using "PATCH" with the "replace" op.

You can find an example in this link.

Please fix the issues above and retry the submission.

Also, are you reading the feed processing report using /getFeedDocument after the status changes to DONE? This report will provide details about your submission, including errors (if there were any).

Thank you, Federico Selling Partner Developer Services