Get Location Id of the item in order information


Hi Shopify Team,

I'm a developer of the app.

I want to my system be able to cancel the order and make a refund automatically after webhook for "orders/create" were triggered.

How can I refund the order? Cause Shopify API documenation says that I need to specify the location_id of the items that were in that order (location_id is required).  
So how can I get these location_ids ?


1 Like
Shopify Staff
Shopify Staff
1102 77 144

Hey Alex, 


To get potential location_ids for a refund, there are GraphQL and REST examples in our guide here.


While the guide is for updating inventory, the same steps still apply for retrieving a location_id - you'll just only need the 'Step 1' and 'Step 2' parts.