Covers all questions related to inventory management, order fulfillment, and shipping.
How to update the order status(delivery Status) using Rest API's ?
When a seller is using a third party fulfillment service and is integrated w9th shopify using rest API , how to update the order status to shopify using API.
Hi Krishna111,
To update the delivery status of an order, you can use the Order and Fulfillment REST API in Shopify. Here's a step-by-step guide:
Retrieve the Order : To get the order you want to update, you can use the Order API. The endpoint for this is GET /admin/api/2023-10/orders/{order_id}.json
where {order_id}
is the ID of the order.
Create a Fulfillment for the Order : Once you have the order, you can create a fulfillment for that order. The fulfillment is the process of packaging and shipping an order to a customer. The endpoint for this is POST /admin/api/2023-10/orders/{order_id}/fulfillments.json
where {order_id}
is the ID the order. In the request body, you need to provide the necessary details like location_id, tracking_numbers etc. Here is an example of a request body:
{
"fulfill": {
"location_id": 905684977,
"tracking_numbers": ["123456"],
"notify_customer": true
}
}
PUT /admin/api/2023-10/orders/{order_id}/fulfillments/{fulfillment_id}.json
where {order_id}
is the ID of the order and {fulfillment_id}
is the ID of the fulfillment. In the request body, you can provide the updated details like trackingnumber, trackingurls etc.Remember to replace {order_id}
and {fulfillment_id}
with the actual IDs in your app.
Please refer to the Shopify API documentation here for more details.
Hope this helps!
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Hi Liam can you help me with the 2nd step what exactly to provide in the body?