api returning empty sku for certain line_items

jamestan
New Member
2 0 0

using api, we called:

https://hidden:hiden@kbright-sg.myshopify.com/admin/orders.json to retrieve orders 

 

and we found many orders that return line_items.sku empty string.

but other orders works fine. when we check the sku in the product page, its the sku exists

 

"id" : 1096474624035,
"id" : 1096474624035,
"id" : 1096474624035,
"id" : 1096474624035,
"id" : 1096474624035,
"id" : 1096474624035,
"id" : 1096383070243,
"id" : 1096383070243,
"id" : 1096383070243,
"id" : 1096383070243
"id" : 1096379203619,
"id" : 1096379203619,
"id" : 1096378974243,
"id" : 1096378974243,
"id" : 1096378974243,
"id" : 1096259207203,
"id" : 1096259207203,
"id" : 1095272398883,
"id" : 1095272398883,
"id" : 1095272398883,
 
any reason for this to happen?
Replies 2 (2)
Busfox
Shopify Staff (Retired)
Shopify Staff (Retired)
628 49 110

Hi @jamestan,

 

An order's line item is a snapshot of the variant as it was at the time of purchase. If there's no SKU value on a line item, it meant the associated variant had no SKU at the time of purchase.

 

Hope that helps!

Andrew | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

jamestan
New Member
2 0 0

hi thank you for clarification , i suspect it too