質問

I'm trying to upload a new product to mws with the mws api and mws gem The product is added (like Fix failed listings, because, doen't have a quantity and price)

I'm trying with the next code:

mws = Mws.connect( merchant: 'merchant', access: 'access', secret: 'secret' )

Later:

product = Mws::Product('11333663') { upc '1234355462233' tax_code 'GEN_TAX_CODE' name 'Some Pduct 034' brand 'Some Bnd' msrp 18.9, 'USD' quantity 10 manufacturer 'Some Mufacturer' category :ce
details { cable_or_adapter { cable_length as_distance 5, :feet } } }

later:

submission_id = mws.feeds.products.add(product)

The product is added, but when I excuted this line:

submission_id = mws.feeds.products.update(product)

The next message is displayed:

=> #<Mws::Apis::Feeds::SubmissionResult:0x9d9ae78 @transaction_id="12345678", @status=#<Mws::EnumEntry:0x9d96170

@sym=:complete, @val="Complete">, @messages_processed=0, @counts={:success=>0, :error=>1, :warning=>0}, @responses={:"0"=>#, @code=90208, @description="Purge and replace is not allowed for this feed type.">}> 2.0.0-p195 :050 > result = mws.feeds.get(submission_id.id) => #, @messages_processed=1, @counts={:success=>0, :error=>1, :warning=>0}, @responses={:"0"=>#, @code=90000, @description="http://sellercentral.amazon.com/myi/search/ErrorListingsSummary?batchId=7564766086">, :"1"=>#, @code=99042, @description="A value was not provided for \"item_type\". Please provide a value for \"item_type\". Please use the Product Classifier or download the category-specific Browse Tree Guide from Seller Help to see a list of valid \"item_type\" values. This information tells Amazon where your product should be classified and affects how easily customers can find your product.", @additional_info={:sku=>"11333668"}>}>

But, when I tried update the inventory and the price, the follow error ocurred:

result = mws.feeds.get(price_submission_id.id) =>

@sym=:complete, @val="Complete">, @messages_processed=0, @counts={:success=>0, :error=>1, :warning=>0}, @responses={:"0"=>#, @code=90208, @description="Purge and replace is not allowed for this feed type.">}>

What can I do?

役に立ちましたか?

解決

Without any indepth knowledge of that Ruby Gem (and of Ruby), I can probably still point you in the right direction:

In MWS, feeds automatically update information already in the Amazon database. The call to create a record is identical to a subsequent call to update it. That also means you don't have to keep track of which items were already added to Amazon in the past.

In terms of your Ruby library, you probably should call mws.feeds.products.add(product) for subsequent updates of that product record and not call mws.feeds.products.update(product) at all. The latter seems to create what's called PurgeAndReplace feeds in MWS which you should avoid like the plague.

All other errors you encountered seem to be related to the same root cause.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top