No variant Id listed in admin panel for orders created via the API

Shopify Partner
4 0 1

Hi there,

I have been successfully creating orders via the API for several stores.  However, we are not seeing the variant Id's that were sent along with the order when it was created. I'm able to to view the order details from the admin panel, but for some reason I'm not seeing the variant Id. I double checked that the variant Id's that I'm passing do indeed exist in the store's inventory. I can't think of why else it would not be listed as part of the order. Am I missing something?

Any help would be greatly appreciated. Thanks in advance. 

 

 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
591 0 44

Could you include a gist of what your API request looks like along with a screenshot pointing out what you mean.

0 Likes
New Member
3 0 0

Hello,

I have the exact same problem. The orders that I create with the API are listed in the Admin page, but the link of the product goes to the product and doesn't indicate which variant the customer bought.

Although the image sent in email of the order receipt is different (color in my case)...

Could you solve the problem?
Any help would be greatly appreciated.

 

0 Likes
New Member
3 0 0

This is the code I am using to create the line_items (variant_id and quantity) for the order (through Python API)

shopify.Order.create(dict(line_items = [dict(variant_id = 988662969, quantity = 1)], ...other params... ))

Thanks for any help!

0 Likes
New Member
3 0 0

I got it solved. Actually I thought that by passing variant_id in the line_items the order in Shopify Admin would automatically list the "title" and "sku" from it in my orders.

I passed those 2 values (title and sku) inside the line_item and now I now which variant the customer bought.

I still think the API could automatically get those value :)

0 Likes