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
577 stars 730 forks source link

The report status of the uploaded product is always in'IN_QUEUE' or'IN_PROGRESS' #2062

Closed yafeng33 closed 2 years ago

yafeng33 commented 2 years ago

After uploading products using "feeds.createFeed", the result obtained through "feeds.getFeed" has been in'IN_QUEUE' or'IN_PROGRESS' for 6 hours, what should I do?

My code is as follows

let msg_str=`<?xml version="1.0" encoding="utf-8"?>

1.01 ckhw
Product false 1 Update QZN5XiRzapepmDtt9BD 2021-11-24T12:06:00 coat women N\P coat 100% Polyester 1 2 3 4 5 N\P 1 0.50 Migrated Template coat COAT Women CN parent ColorSize Coat Casual female adult as1 regular regular 2 Update QZN5XiRzapepvDVt9JDu4IJXDsF UPC6976591921359 2021-11-24T12:06:00 COAT N\P Description 6 7 8 9 10 1 0.50 Migrated Template coat Women Coat 7420706011 N\P 3x_l 3x_l CN COAT child ColorSize 3x_l black Casual Coat Women black 3x_l female adult alpha as1 regular regular 3x_l 3x_l
`; let feed = { content: msg_str, contentType: 'text/xml; charset=utf-8' }; const feed_upload_details = await sellingPartner.callAPI({ operation: 'createFeedDocument', endpoint: "feeds", body: { contentType: feed.contentType, }, method: "POST", options: { version: "2020-09-04" } }); let res = await sellingPartner.upload(feed_upload_details, feed); const rs = await sellingPartner.callAPI({ operation: 'createFeed', endpoint: "feeds", body: { feedType: "POST_PRODUCT_DATA", marketplaceIds: ["A2EUQ1WTGCTBG2"], inputFeedDocumentId: feed_upload_details.feedDocumentId }, method: "POST", options: { version: "2020-09-04" } }); const feed_rs = await sellingPartner.callAPI({ operation: 'getFeed', endpoint: "feeds", path: { feedId: 'xxxxxx' }, options: { version: "2020-09-04" } }); console.log("feed_rs", feed_rs); the request result as follows: processingStatus: 'IN_PROGRESS', marketplaceIds: [ 'ATVPDKIKX0DER' ], feedId: 'xxxxxx', feedType: 'POST_PRODUCT_DATA', createdTime: '2021-11-24T05:08:14+00:00', processingStartTime: '2021-11-24T05:08:21+00:00'
aibirriaga commented 2 years ago

Hello, it's still in_progress? what is the difference between IN_QUEUE and IN_PROGRESS? I am trying to upload a feed for product listings but the feed is IN_QUEUE for an hour.

yafeng33 commented 2 years ago

@aibirriaga in_progress is a stage before IN_QUEUE

yafeng33 commented 2 years ago

Is there a better way to create products?

aibirriaga commented 2 years ago

Is there a better way to create products?

yes, you can create them one by one using listings api but the feeds api fits better to our requirements. By the way, the feed is steel IN_QUEUE for almost 24h

yafeng33 commented 2 years ago

@aibirriaga As far as I know, the listing api can only modify and delete products, not create new products.I didn't do any processing and it is no longer blocked. But there are new problems。 `<?xml version="1.0" encoding="utf-8"?>

1.01 caihai
Product false 4 Update uFzvHkFN625jBha7xCXS1ZO9Bb6X7DPFA UPC 6902427821357 New Men T-Shirt N\P Lyric sheeting by Peacock Alley plain weave (percale) 100% Egyptian cotton 12.50 T-Shirt 3271420011 Migrated Template ColorSize Large black Shirt mens black 100% Cotton Machine Wash Casual Summer T-Shirt Collarless HalfSleeve IN Large Cotton Cotton RoundNeck Printed MyColl 1 Trendy Latest Round neck male Cartoon Evening adult alpha as1 l 9 1 count Cotton l
` The error report is as follows `{ "AmazonEnvelope": { "Header": { "DocumentVersion": 1.02, "MerchantIdentifier": "A3BM8Z5CBUMQWY" }, "MessageType": "ProcessingReport", "Message": { "MessageID": 1, "ProcessingReport": { "DocumentTransactionID": 50480018956, "StatusCode": "Complete", "ProcessingSummary": { "MessagesProcessed": 1, "MessagesSuccessful": 0, "MessagesWithError": 1, "MessagesWithWarning": 0 }, "Result": { "MessageID": 4, "ResultCode": "Error", "ResultMessageCode": 5000, "ResultDescription": "XML Parsing Error at Line 71, Column 32: cvc-complex-type.2.4.a: Invalid content was found starting with element 'ShirtSize'. One of '{MaterialTypeFree}' is expected.", "AdditionalInfo": { "SKU": "QZN5XiRzxpepvDvt9JDu4IJXDsF" } } } } } }` But the element "MaterialTypeFree" already exists
yafeng33 commented 2 years ago

My problem has been solved, caused by incorrect sorting of elements in xml

aibirriaga commented 2 years ago

@yafeng33 it is definitely possible to make partial updates of products with listing feeds using "operationType": "PARTIAL_UPDATE",

yafeng33 commented 2 years ago

@aibirriaga thinks