Cancel Order API location

Solved
rikutonakamura7
Shopify Partner
11 0 1

I'm assuming the Cancel API will bring the inventory back, but the location doesn't seem to be correct.
The API doesn't seem to allow me to specify a location, is there any solution?

Accepted Solution (1)
lizk
Shopify Staff
Shopify Staff
246 57 61

This is an accepted solution.

Hi there! 

I think you will want to be using the Refund Resource.
https://shopify.dev/api/admin-rest/2022-04/resources/refund#post-orders-order-id-refunds

With the refund resource you will be able to include restocking instructions for the line items, including the location_id, of where the item should be restocked to.

To learn more visit the Shopify Help Center or the Community Blog.

View solution in original post

Reply 1 (1)
lizk
Shopify Staff
Shopify Staff
246 57 61

This is an accepted solution.

Hi there! 

I think you will want to be using the Refund Resource.
https://shopify.dev/api/admin-rest/2022-04/resources/refund#post-orders-order-id-refunds

With the refund resource you will be able to include restocking instructions for the line items, including the location_id, of where the item should be restocked to.

To learn more visit the Shopify Help Center or the Community Blog.