Skip to content

Commit a2f807c

Browse files
committed
add more scenarios to admin api order management guide
1 parent 87244a3 commit a2f807c

1 file changed

Lines changed: 105 additions & 0 deletions

File tree

docs/api/admin/guides/order-management.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,95 @@ Depending on the product type and status of the line items being refunded, there
153153
:::
154154

155155

156+
### Update Shipping Address
156157

158+
Updating an order shipping address is a common task that can be done with a PATCH request to the [ordersUpdate](/docs/api/admin/reference/#/operations/ordersUpdate) endpoint.
157159

158160

161+
```json title="Update Order Shipping Address"
162+
// PATCH https://{store}.29next.store/api/admin/orders/{number}/
163+
164+
{
165+
"shipping_address": {
166+
"line1": "4765 Test Lane West", // new shipping adddress line 1
167+
"line4": "Mountain Pass", // new shipping address city
168+
"state": "CA", // new shipping address state
169+
"postcode": "92366", // new shipping address postcode
170+
"country": "US" // new shipping address country
171+
}
172+
}
173+
```
174+
:::info Before Fulfillment Processing
175+
176+
Updating an order shipping address should be done **before** the order is sent to a fulfillment location for fulfillment. If the order has already been accepted and processing, send a a [cancellationRequestSend](/docs/api/admin/reference/#/operations/cancellationRequestSend) request and then [fulfillmentRequestSend](/docs/api/admin/reference/#/operations/fulfillmentRequestSend) after you've updated the shipping address.
177+
:::
178+
179+
180+
### Request Fulfillment
181+
182+
Fulfillment can be requested immediately through the [fulfillmentRequestSend](/docs/api/admin/reference/#/operations/fulfillmentRequestSend) for cases that you'd like to immediately send the fulfillment order to the fulfillment location for fulfillment.
183+
184+
185+
```json title="Fulfillment Request"
186+
// POST https://{store}.29next.store/api/admin/fulfillment-orders/{id}/fulfillment-request/
187+
188+
{
189+
"fulfillment_order_line_items": [ // will split the fulfillment order into a new fulfillment order
190+
{
191+
"id": 0,
192+
"quantity": 1
193+
}
194+
],
195+
"message": "Special message to warehouse", // message to the fulfillment location
196+
"notify": true // notify the customer when fulfillment order is fulfilled
197+
}
198+
```
199+
200+
### Holding Fulfillment
201+
202+
Holding fulfillment for an order while waiting for additional review or making adments to the order before sending to the fulfillment location for shipping.
203+
204+
```mermaid
205+
stateDiagram-v2
206+
direction LR
207+
retrieveFulfillmentOrders: Retrieve Fulfillment Orders
208+
sendFulfillmentCancelRequest: Send Fulfillment Cancel Request
209+
retrieveFulfillmentOrders --> sendFulfillmentCancelRequest
210+
```
211+
- Retrieve all fulfillment Orders using the [ordersFulfillmentOrdersRetrieve](/docs/api/admin/reference/#/operations/ordersFulfillmentOrdersRetrieve) endpoint.
212+
- Send a [fulfillmentOrdersHold](/docs/api/admin/reference/#/operations/fulfillmentOrdersHold) request for each fulfillment order to hold.
213+
214+
```json title="Hold Fulfillment Order Request"
215+
// POST https://{store}.29next.store/api/admin/fulfillment-orders/{id}/hold/
216+
217+
{
218+
"reason": "address_incorrect", // see available reasons in api reference
219+
"reason_message": "Additional relevant detail." // provide additional relevant detail
220+
}
221+
```
222+
223+
### Cancel Fulfillment
224+
225+
Canceling a fulfillment order that is already accepted and processing with a fuflillment location is a common order management task to stop fulfillment or as a prerequisite step to moving a fulfillment order to a new location.
226+
227+
```mermaid
228+
stateDiagram-v2
229+
direction LR
230+
retrieveFulfillmentOrders: Retrieve Fulfillment Orders
231+
sendFulfillmentCancelRequest: Send Fulfillment Cancel Request
232+
retrieveFulfillmentOrders --> sendFulfillmentCancelRequest
233+
```
234+
- Retrieve all fulfillment Orders using the [ordersFulfillmentOrdersRetrieve](/docs/api/admin/reference/#/operations/ordersFulfillmentOrdersRetrieve) endpoint.
235+
- Send a [cancellationRequestSend](/docs/api/admin/reference/#/operations/cancellationRequestSend) request for each fulfillment order to request fulfillment cancellation.
236+
237+
238+
```json titl="Fulfillment Order Cancellation Request"
239+
// POST https://{store}.29next.store/api/admin/fulfillment-orders/{id}/cancellation-request/
240+
{
241+
"message": "Reason why canceling fulfillment" // message sent to the fulfillment location regarding the cancellation
242+
}
243+
```
244+
159245
### Moving Fulfillment Orders
160246

161247
```mdx-code-block
@@ -164,3 +250,22 @@ import MoveFulfillmentOrders from '@site/_snippets/_moving-fulfillment-orders.md
164250
165251
<MoveFulfillmentOrders />
166252
```
253+
254+
### Cancel Order
255+
256+
Canceling an order is a common order management task when you need to cancel the entire order and refund all payment transactions. To cancel an order, send a request to the [ordersCancelCreate](/docs/api/admin/reference/?v=2024-04-01#/operations/ordersCancelCreate) endpoint.
257+
258+
```json title="Cacenl Order Request"
259+
// POST https://{store}.29next.store/api/admin/orders/{number}/cancel/
260+
261+
{
262+
"cancel_reason": "Customer wants to cancel", // Appropiate cancel reason message
263+
"full_refund": true, // Refund all remainaing payments or not
264+
"send_cancel_notification": true // Send the customer a notification or not
265+
}
266+
```
267+
268+
269+
270+
271+

0 commit comments

Comments
 (0)