d
Topic
modoo Member
Posts:
4
Last edited 12 days ago

Adding new Orders through Admin API

Im using the shopify python api, and have this code.

new_order = shopify.Order.create({'order': { "email": "foo@example.com", "fulfillment_status": "fulfilled", "line_items": [{'message': "words go here"}]}}))

The response is "unhashable type"

 

I also tried

new_order = shopify.Order.create(json.dumps({'order': { "email": "foo@example.com", "fulfillment_status": "fulfilled", "line_items": [{'message': "words go here"}]}}))

and got "AttributeError: 'str' object has no attribute 'iteritems'"

 

The shopify python api page is lacking any kind of direction on these issues (and most others) and I can't seem to find an answer anywhere else.

i
Replies
Posts:
138
9 days ago

Line items should be list of products and not some message.. Please check Order API documents..