Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Cancel Order API location

Solved

Cancel Order API location

rikutonakamura7
Shopify Partner
11 0 2

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
246 58 79

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
246 58 79

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.