lineofflight/peddler

get_prep_instructions_for_asin throws Validation error

Closed this issue · 3 comments

I am getting a validation error when getting prep instructions using ASINList, but there are no problems using SKUList:

response = client.get_prep_instructions_for_asin('US', 'asinexample') Peddler::Errors::ValidationError: 1 validation error detected: Value null at 'asinList' failed to satisfy constraint: Member must not be null from /Users/ylee/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/peddler-2.0.4/lib/peddler/client.rb:152:in handle_http_status_error'`

response = client.get_prep_instructions_for_sku('US', 'sku1example', 'sku2example') # works successfully

If I were to guess, it's coming from differences in Amazon naming convention vs Ruby naming convention of ASINList vs asinList.

Edit: Oddly other methods using ASINList seem to work fine: response = client.get_inbound_guidance_for_asin('marketplace_example', 'asinexample')

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@yubrew, it seems Amazon has a bug upstream and is expecting AsinList instead of ASINList as a request parameter. I'll implement a workaround.

@yubrew @hakanensari
I was also working on a same problem i.e. same error while fetching FbaFee for a particular ASIN and even requesting on AMAZON ScratchPad was not working, I did some more research and found out that ASIN may lack some information, because of which AMAZON cannot identify your requested data. As for me, it was DIMENSIONS missing for that ASIN, so you won't know what the problem is.