Using the API to find out item status per order

Highlighted
New Member
4 0 0

Hey Guys,

 

Hope everyone is keeping well in these uncertain times.

 

I've been working with a third party who sell our product on their store linking to us via the API, they've currently been taking product and stock information via the API then manually placing order, as we look to place orders via the API we've bumped into a small problem.

 

1) At the moment we can find out the status of and order, but we need to find out the status of each order item (if each particular item was added to the order or it was cancelled) - is this possible in the Shopify API?

 

2) And second issue is with the decrement_obeying_policy - we indeed added this parameter to their request but it results with error for the whole order even if there is only one item that is out of stock. 

 

We can live without #1 while the integration won't make enough sense due to the #2 issue as we would never know which items won't arrive in our customer's warehouse due to being out of stock. This will turn out to the delay in the delivery to the customer. 

Any help with this would be greatly appreciated

0 Likes
Highlighted
Shopify Staff (Retired)
Shopify Staff (Retired)
624 103 124

HI @AltoExyl ,

 

1) The line items themselves do not have any status property, but you can determine if a line item has been added to the order or if it has been fulfilled or if it has been cancelled/refunded based on where it in the order.json response. For example if you see the line item under order.fulfillments.line_items then you know it has begun fulfilling, and if you see the line item under order.refunds.line_items then you know its been cancelled/refunded

 

2) I am not sure if I understand what the question here is. But if this parameter is not working for your use case you can try using `decrement_ignore_policy` or updating the product so you continue selling while it is out of stock.

 

Hassain | Developer Support Specialist @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes