Order API's line items and product type

Highlighted
Shopify Partner
200 0 27

Hi Everyone,

Two things. I just wanted to confirm that the order api does NOT return a product's type in the line items, correct? Meaning Order->line_items->product_type does not exist. Or am I missing somthing?

Second part for any shopify employees watching the forms. If it does not exist is there any chance we could see that added in the future?

thanks!
Brendin

Hire Me! - I am available to customize your Shopify store.
0 Likes
Highlighted
Shopify Expert
4260 32 433

You are right. Product type has never been part of the line item data. If you want it you have to make an API call to get the missing product details.

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
0 Likes
Highlighted
Shopify Partner
200 0 27

Thanks for confirming! That is currently what I am doing, but I thought it would be worth asking about. 

I do have another question about API call limits, and I feel like you would be a good person to ask, though I'm guessing it's a rather novice question. Related to my previous post, if I were to make a call for 80 products via product_id (/admin/products.json?ids=001,002,003,....) that counts as one call, correct? Meaning I would not hit the 40 call Leaky Bucket "limit". All I would have too watch out for is the 250 product limit.

Thanks for help!

Hire Me! - I am available to customize your Shopify store.
0 Likes
Highlighted
Shopify Expert
4260 32 433

Call limits are never a problem. You can indeed get 250 products with ONE call. 

All you need to do otherwise is inspect the calls available in the headers of your responses from Shopify. When they get near zero, run a little clock off waiting for more... 

I cannot believe there are still people all scaredy cat about the limits. As if they are difficult or something... 

The worst that can happen is you get a 429. No calls allowed. OMG... a 429... run away, run away.... seriously... so what... sit around and wait a few seconds... and your bucket is empty again... 

The point is, all API driven systems have limits... so learning how to code a simple guard or watch around API calls is par for the course of being an Internet computing worker!

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
0 Likes
Highlighted
Shopify Partner
200 0 27

Haha very good point! The reason I bring it up is because I am calling for a total of 80 products but im only getting 60 back. I just wanted to check and make sure I understood how the limit worked (even though these numbers dont seem remotely related to the limits). Looks like ill be digging deeper to see what is going on! 

Thanks for all your help!

Hire Me! - I am available to customize your Shopify store.
0 Likes
Highlighted
Tourist
5 0 1

Hi, did you ever end up figuring out how to do this via API call? I am trying to add product type to the lineitems and can't seem to figure it out! Thanks!

0 Likes
Highlighted
New Member
1 0 0

Yes we would like to have the {{ item.product.type }} variable available to the order so that we can include it in an invoice for our client.

There should be a way of ea  sily making this variable available using a check box along with other ones we might need. Shouldn't need an API call.

For example using Google Enhanced eCommerce we are able to pick up all sales and product types attached so this data is all available already even to external tools!

0 Likes