FulfillmentOrder

The FulfillmentOrder resource represents either an item or a group of items in an order that are to be fulfilled from the same location. There can be more than one fulfillment order for an order at a given location.

What you can do with FulfillmentOrder

The Shopify API lets you do the following with the FulfillmentOrder resource. More detailed versions of these general actions may be available:

FulfillmentOrder properties

assigned_location_id plain "assigned_location_id": 3183479 The ID of the location that has been assigned to do the work.
destination plain "destination": { "id": 54433189, "address1": "123 Amoebobacterieae St", "address2": "Unit 806", "city": "Ottawa", "company": "", "country": "Canada", "email": "bob@customer.com", "first_name": "Bob", "last_name": "Bobsen", "phone": "(555)555-5555", "province": "Ontario", "zip": "K2P0V6" } The destination where the items should be sent.
+ id: The ID of the fulfillment order destination.
+ address1: The street address of the assigned location.
+ address2: An optional additional field for the street address of the assigned location.
+ city: The city of the destination.
+ company: The company of the destination.
+ country: The country of the destination.
+ email: The email of the customer at the destination.
+ first_name: The first name of the customer at the destination.
+ last_name: The last name of the customer at the destination.
+ phone: The phone number of the customer at the destination.
+ province: The province of the destination.
+ zip: The ZIP code of the destination.
fulfill_at plain "fulfill_at": "2021-01-01" The datetime (in UTC) when the fulfillment order is ready for fulfillment. When this datetime is reached, a scheduled fulfillment order is automatically transitioned to open. For more information about fulfillment statuses, refer to the status property.
id plain "id": 255858046 An ID for the fulfillment order.
line_items plain "line_items": [ { "id": 466157049, "shop_id": 3998762, "fulfillment_order_id": 1568020, "line_item_id": 466157049, "inventory_item_id": 6588097, "quantity": 1, "fulfillable_quantity": 1, "variant_id": 2385087 } ] Represents line items belonging to a fulfillment order:
+ id: The ID of the fulfillment order line item.
+ shop_id: The ID of the shop associated with the fulfillment order line item.
+ fulfillment_order_id: The ID of the fulfillment order associated with this line item.
+ line_item_id: The ID of the line item associated with this fulfillment order line item.
+ inventory_item_id: The ID of the inventory item associated with this fulfillment order line item.
+ quantity: The total number of units to be fulfilled.
+ fulfillable_quantity: The number of units remaining to be fulfilled.
+ variant_id: The ID of the variant associated with this fulfillment order line item.
order_id plain "order_id": 3183479 The ID of the order that’s associated with the fulfillment order.
request_status plain "request_status": "unsubmitted" The request status of the fulfillment order. Valid values:
+ unsubmitted: The initial state for newly created fulfillment orders. This is the only valid state for fulfillment orders not assigned to a fulfillment service.
+ submitted: The merchant requested fulfillment for this fulfillment order.
+ accepted: The fulfillment service accepted the merchant’s fulfillment request.
+ rejected: The fulfillment service rejected the merchant’s fulfillment request.
+ cancellation_requested: The merchant requested a cancellation of the fulfillment request for this fulfillment order.
+ cancellation_accepted: The fulfillment service accepted the merchant’s fulfillment cancellation request.
+ cancellation_rejected: The fulfillment service rejected the merchant’s fulfillment cancellation request.
+ closed: The fulfillment service closed the fulfillment order without completing it.
shop_id plain "shop_id": 255858046 The ID of the shop that’s associated with the fulfillment order.
status plain "status": "open" The status of the fulfillment order. Valid values:
+ open: The fulfillment order is ready for fulfillment.
+ in_progress: The fulfillment order is being processed.
+ scheduled: The fulfillment order is deferred and will be ready for fulfillment after the datetime specified in fulfill_at.
+ cancelled: The fulfillment order has been cancelled by the merchant.
+ incomplete: The fulfillment order cannot be completed as requested.
+ closed: The fulfillment order has been completed and closed.
supported_actions plain "supported_actions": [ "create_fulfillment", "request_fulfillment", "cancel_fulfillment_order", "request_cancellation" ] The actions that can be performed on this fulfillment order.
merchant_requests plain "merchant_requests": [ { "message": "Hello, World!", "request_options": { "shipping_method": "pidgeon carrier", "note": "handle with care", "date": "2019-08-13T16:09:58-04:00" }, "kind": "fulfillment_request" } ] A list of requests sent by the merchant to the fulfillment service for this fulfillment order.
+ message: The message returned by the merchant, if any.
+ request_options: The request options returned by the merchant, if any.
+ kind: The kind of request. Valid values: fulfillment_request, cancellation_request, or legacy_fulfill_request.
assigned_location plain "assigned_location": { "address1": "123 Amoebobacterieae St", "address2": "Unit 806", "city": "Ottawa", "country_code": "CA", "location_id": 17232953366, "name": "Bob Bobsen", "phone": "(555)555-5555", "province": "Ontario", "zip": "K2P0V6" } The fulfillment order’s assigned location. This is the location expected to perform fulfillment.
+ address1: The street address of the assigned location.
+ address2: An optional additional field for the street address of the assigned location.
+ city: The city of the assigned location.
+ country_code: The two-letter code for the country of the assigned location.
+ location_id: The ID of the assigned location.
+ name: The name of the assigned location.
+ phone: The phone number of the assigned location.
+ province: The province of the assigned location.
+ zip: The ZIP code of the assigned location.

Endpoints

GET/admin/api/2021-01/orders/{order_id}/fulfillment_orders.json Retrieves a list of fulfillment orders for a specific order.
order_id The ID of the order that is associated with the fulfillment orders.

Retrieve a list of all fulfillment orders for an order

GET /admin/api/2021-01/orders/450789469/fulfillment_orders.json

View Response

GET/admin/api/2021-01/fulfillment_orders/{fulfillment_order_id}.json Retrieves a specific fulfillment order.

Get a single fulfillment order by its ID

GET /admin/api/2021-01/fulfillment_orders/1046000812.json

View Response

POST/admin/api/2021-01/fulfillment_orders/{fulfillment_order_id}/cancel.json Marks a fulfillment order as cancelled.

Cancel a fulfillment order

POST /admin/api/2021-01/fulfillment_orders/1046000813/cancel.json

{

}

View Response

POST/admin/api/2021-01/fulfillment_orders/{fulfillment_order_id}/close.json Marks an in progress fulfillment order as incomplete, indicating the fulfillment service is unable to ship any remaining items and intends to close the fulfillment order.
message An optional reason for marking the fulfillment order as incomplete.

Transition a fulfillment order from in progress to incomplete

POST /admin/api/2021-01/fulfillment_orders/1046000816/close.json

{

“fulfillment_order”: {

  1. "message": "Not enough inventory to complete this work."

}

}

View Response

POST/admin/api/2021-01/fulfillment_orders/{fulfillment_order_id}/move.json Moves a fulfillment order from one merchant managed location to another merchant managed location.
new_location_id The id of the location to which the fulfillment order will be moved.

Move a fulfillment order to a new location

POST /admin/api/2021-01/fulfillment_orders/1046000817/move.json

{

“fulfillment_order”: {

  1. "new_location_id": 905684977

}

}

View Response

POST/admin/api/2021-01/fulfillment_orders/{fulfillment_order_id}/open.json Marks a scheduled fulfillment order as ready for fulfillment. This endpoint allows merchants to work on a scheduled fulfillment order before its expected <font style="background-color:#F4F6F8;">fulfill_at</font> datetime.

Transition a fulfillment order from scheduled to open

POST /admin/api/2021-01/fulfillment_orders/1046000819/open.json

{

}

View Response

POST/admin/api/2021-01/fulfillment_orders/{fulfillment_order_id}/reschedule.json Updates the <font style="background-color:#F4F6F8;">fulfill_at</font> time of a scheduled fulfillment order. This endpoint is used to manage the time a scheduled fulfillment order will be marked as ready for fulfillment.

Update the fulfill_at time of a scheduled fulfillment order

POST /admin/api/2021-01/fulfillment_orders/1046000820/reschedule.json

{

“fulfillment_order”: {

  1. "new_fulfill_at": "2022-03-06"

}

}

View Response