An order fulfillment refers to the process of preparing and delivering orders to customers. This process usually involves receiving orders, picking the products from inventory, packing them securely, providing tracking information, and shipping them to the customer's address.
A fulfillment object contains information about an order's shipping provider, tracking details, and the line items associated with the fulfillment.
With the Order Fulfillments API you can:
This article shares a possible use case your app could support, as well as a sample flow that could support the use case. This can be a helpful jumping off point as you plan your app's implementation.
You can use webhooks to listen for when an order is placed, and then create a fulfillment for the new order.
Use the Order Approved Webhook to listen for incoming approved orders.
When a new order comes in, save the order ID. This can be found as the value of the entityId
or actionEvent.body.order.id
fields in the Order Approved Webhook's payload.
Pass the new order ID and the new fulfillment info to the Create Fulfillment endpoint. The response holds information about the newly created fulfillment and the ID of its associated order.
Create and manage eCommerce order fulfillments
Order ID.
Fulfillments associated with the order.
{
"orderWithFulfillments": {
"orderId": "58c9a790-27b7-463f-a865-c7cb494f7c29",
"fulfillments": [
{
"id": "0d824fc7-2621-4e97-a5c8-489ec1b43377",
"createdDate": "2023-02-22T15:55:47.021Z",
"lineItems": [
{
"id": "00000000-0000-0000-0000-000000000001",
"quantity": 1
}
],
"trackingInfo": {
"trackingNumber": "12345",
"shippingProvider": "fedex",
"trackingLink": "https://www.fedex.com/apps/fedextrack/?action=track&trackingnumber=12345"
}
}
]
}
}