Alex
unread,May 1, 2014, 2:56:24 PM5/1/14Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to boto-...@googlegroups.com
Hi everyone,
I am happy that I discovered boto, as it seems to be
super-comprehensive, doing all the heavy-lifting for me. My goal is to
answer the question "how many orders [of any product] did we have on a
certain day?", and it seems that MWSConnection is what I need.
This is the code I was hoping would achieve that:
```
from boto.mws.connection import MWSConnection
mws = MWSConnection('xxxxxxxxxxxxx', 'yyyyyyyyyyyyyyyyyyyyyyyyyy')
mws.SellerId = 'zzzzzzzzzzzzz'
mws.Merchant='zzzzzzzzzzzzz'
mws.list_orders(CreatedAfter='2014-04-25T12:00:00Z', MarketplaceId =
'qqqqqqqqqqqqqq')
```
This returns an error
MWS Response Error: 401 ResponseError
Undefined response error.
Access to Orders.ListOrders is denied
It sounds like reasonable behaviour, i.e. boto is doing everything
according to the protocol, and the server faithfully returns an error
because some permissions are not satisfied.
However, I still have some doubts and I would like to request advice
on how to use boto correctly.
1. What is the difference between MerchantId and SellerId?
I set them both to the same value, after getting one of these
responses KeyError: 'ListOrders requires SellerId argument. Set the
MWSConnection.SellerId attribute?'
Are they both necessary and should they be set to the same value?
2. Am I correct in assuming that CreatedAfter must be an ISO8601
timestamp, as in my example?
To rule out that the latter, I tried another API call:
mws.list_order_items(AmazonOrderId='002-9xxxxxx-1yyyyyy')
However, this results in the same type of error:
MWS Response Error: 401 ResponseError
Undefined response error.
Access to Orders.ListOrderItems is denied
Is there something else one needs to do before making these calls?
Perhaps there's a checkbox that needs to be ticked in the Amazon
Seller Central?
Your help will be greatly appreciated.