Cancel Order API issue

Excursionist
18 1 0

Hey There,

We are Trying to build full cancel order module for our application.

But we some doubts as below related to that can any body help us in that.

 

1. In Our testing store we are getting location_id: null in order.json and to refund/cancel line_item we need location_id  so how we can get location_id for that line_items and full order? 

As per documentation (here) restock is deprecated so what to do for restocking items.

2. we want to cancel partial cancel order is that possible? or it has any alternative solution?

3. What is primary_location_id in shop.json?

4. Our workflow is very simple.
     1. Customer will initiate (can be partial) the cancel order request (Wether paid or not, fulfilled or not).

     2. Store owner approve or reject the cancel request.

          i. If accept the cancel request we will refund(if paid) restock items(if fulfilled)(Based on some conditions).
         ii. If rejects nothing will happen (Just notify the customers about that.)

Any suggestions would be great on that.

 

0 Likes