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
534 stars 722 forks source link

FeedsApi Can I upload using JSON messages? #3968

Closed txq236 closed 3 weeks ago

txq236 commented 3 weeks ago

Document address:https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-use-case-guide#json-feeds Why is it mentioned in the user guide that you can upload JSON messages? An 5001 error occurred when I tried to change the inventory using the JSON format

Follow the document steps to set when calling createFeedDocument contentType=application/json; charset=UTF-8 Upload the feed data Also set contentType=application/json; charset=UTF-8 Up until step 6, I didn't get any errors, but when I finally downloaded the results, I was told that the XML format was wrong

Step 7. Download the feed processing report The response results are as follows:

1.02 merchantid
ProcessingReport 1 133837019889 Complete 0 0 1 0 0 Error 5001 XML Parsing Fatal Error at Line 1, Column 1: Content is not allowed in prolog. Content is not allowed in prolog.

Step 3. Upload the feed data Upload the message as follows : { "header": { "issueLocale": "en_US", "sellerId": "merchantId", "version": "2.0" }, "messages": [ { "messageId": 1, "operationType": "PARTIAL_UPDATE", "attributes": { "fulfillment_availability": [ { "quantity": 199, "fulfillment_channel_code": "DEFAULT" } ] }, "sku": "SKU1" }, { "messageId": 2, "operationType": "PARTIAL_UPDATE", "attributes": { "fulfillment_availability": [ { "quantity": 199, "fulfillment_channel_code": "DEFAULT" } ] }, "sku": "SKU2" } ] }

xyloneX commented 3 weeks ago

feedtype="JSON_LISTINGS_FEED" ?

txq236 commented 3 weeks ago

feedtype="JSON_LISTINGS_FEED" ?

Thank you very much. It is for this reason that I made a stupid mistake

I have successfully modified the inventory, but the JSON message I originally provided was wrong and a productType was missing

harguph commented 3 weeks ago

Hello @txq236 ,

Great to see the issue is resolved.

In the issue re-occurs or if you need any further assistance, Please feel free to open a case with developer support so that we can better help you with issues related to SP API.

Note: SP API or docs related issues / troubleshooting support is managed by a different team. We can help if the issue is related to the content published on this repo.

Regards