Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
I have an order with three line items. I want to cancel one line item. When I tried cancel one line item by using respective API, it cancelled the whole order. Kindly tell me how I can cancel one line item by using respective API?
Here is my example of cancel a whole order.
https://my development store.myshopify.com/admin/api/2021-10/orders/**bleep**/cancel.json
My Json request body:
Solved! Go to the solution
This is an accepted solution.
You will want to use the refund_line_items field to specify the item(s) you want to cancel from the order. You can read more about refund fields here: https://shopify.dev/api/admin-rest/2021-10/resources/refund#[post]/admin/api/2021-10/orders/{order_i...
Regards,
To learn more visit the Shopify Help Center or the Community Blog.
This is an accepted solution.
You will want to use the refund_line_items field to specify the item(s) you want to cancel from the order. You can read more about refund fields here: https://shopify.dev/api/admin-rest/2021-10/resources/refund#[post]/admin/api/2021-10/orders/{order_i...
Regards,
To learn more visit the Shopify Help Center or the Community Blog.
I have tried this refund_line_items field. It didn't work. It asks me to write the location_id but when I tried the get order call to see the location_id, it was set to null. Kindly tell me how I can get the location_id?
We can retrieve a list of locations and location id by using this API.