FulfillmentOrder

Version 2020-01

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
"assigned_location_id": 3183479

The ID of the location that has been assigned to do the work.

destination
"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.

id
"id": 255858046

An ID for the fulfillment order.

line_items
"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
"order_id": 3183479

The ID of the order that's associated with the fulfillment order.

request_status
"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
"shop_id": 255858046

The ID of the shop that's associated with the fulfillment order.

status
"status": "open"

The status of the fulfillment order. Valid values:

  • open: Default state for newly created fulfillment orders.
  • in_progress: The fulfillment order is being processed.
  • 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
"supported_actions": [
  "create_fulfillment",
  "request_fulfillment",
  "cancel_fulfillment_order",
  "request_cancellation"
]

The actions that can be performed on this fulfillment order.

merchant_requests
"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
"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/2020-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/2020-07/orders/450789469/fulfillment_orders.json
View Response
HTTP/1.1 200 OK
{
  "fulfillment_orders": [
    {
      "id": 1025578638,
      "shop_id": 690933842,
      "order_id": 450789469,
      "assigned_location_id": 48752903,
      "fulfillment_service_handle": "mars-fulfillment",
      "request_status": "submitted",
      "status": "open",
      "supported_actions": [
        "cancel_fulfillment_order"
      ],
      "destination": {
        "id": 1025578632,
        "address1": "Chestnut Street 92",
        "address2": "",
        "city": "Louisville",
        "company": null,
        "country": "United States",
        "email": "bob.norman@hostmail.com",
        "first_name": "Bob",
        "last_name": "Norman",
        "phone": "555-625-1199",
        "province": "Kentucky",
        "zip": "40202"
      },
      "line_items": [
        {
          "id": 1025578651,
          "shop_id": 690933842,
          "fulfillment_order_id": 1025578638,
          "quantity": 1,
          "line_item_id": 518995019,
          "inventory_item_id": 49148385,
          "fulfillable_quantity": 1,
          "variant_id": 49148385
        }
      ],
      "assigned_location": {
        "address1": null,
        "address2": null,
        "city": null,
        "country_code": "DE",
        "location_id": 48752903,
        "name": "Apple Api Shipwire",
        "phone": null,
        "province": null,
        "zip": null
      },
      "merchant_requests": []
    }
  ]
}
GET /admin/api/2020-01/fulfillment_orders/{fulfillment_order_id}.json
Retrieves a specific fulfillment order.

Get a single fulfillment order by its ID

GET /admin/api/2020-07/fulfillment_orders/1025578639.json
View Response
HTTP/1.1 200 OK
{
  "fulfillment_order": {
    "id": 1025578639,
    "shop_id": 690933842,
    "order_id": 450789469,
    "assigned_location_id": 48752903,
    "fulfillment_service_handle": "mars-fulfillment",
    "request_status": "submitted",
    "status": "open",
    "supported_actions": [
      "cancel_fulfillment_order"
    ],
    "destination": {
      "id": 1025578633,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "company": null,
      "country": "United States",
      "email": "bob.norman@hostmail.com",
      "first_name": "Bob",
      "last_name": "Norman",
      "phone": "555-625-1199",
      "province": "Kentucky",
      "zip": "40202"
    },
    "line_items": [
      {
        "id": 1025578652,
        "shop_id": 690933842,
        "fulfillment_order_id": 1025578639,
        "quantity": 1,
        "line_item_id": 518995019,
        "inventory_item_id": 49148385,
        "fulfillable_quantity": 1,
        "variant_id": 49148385
      }
    ],
    "assigned_location": {
      "address1": null,
      "address2": null,
      "city": null,
      "country_code": "DE",
      "location_id": 48752903,
      "name": "Apple Api Shipwire",
      "phone": null,
      "province": null,
      "zip": null
    },
    "merchant_requests": []
  }
}
POST /admin/api/2020-01/fulfillment_orders/{fulfillment_order_id}/cancel.json
Marks a fulfillment order as cancelled.

Cancel a fulfillment order

POST /admin/api/2020-07/fulfillment_orders/1025578633/cancel.json
{
  "fulfillment_order": {
    "id": 1025578633,
    "shop_id": 690933842,
    "order_id": 450789469,
    "assigned_location_id": 48752903,
    "fulfillment_service_handle": "mars-fulfillment",
    "request_status": "submitted",
    "status": "open",
    "supported_actions": [
      "cancel_fulfillment_order"
    ],
    "destination": {
      "id": 1025578627,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "company": null,
      "country": "United States",
      "email": "bob.norman@hostmail.com",
      "first_name": "Bob",
      "last_name": "Norman",
      "phone": "555-625-1199",
      "province": "Kentucky",
      "zip": "40202"
    },
    "line_items": [
      {
        "id": 1025578646,
        "shop_id": 690933842,
        "fulfillment_order_id": 1025578633,
        "quantity": 1,
        "line_item_id": 518995019,
        "inventory_item_id": 49148385,
        "fulfillable_quantity": 1,
        "variant_id": 49148385
      }
    ],
    "assigned_location": {
      "address1": null,
      "address2": null,
      "city": null,
      "country_code": "DE",
      "location_id": 48752903,
      "name": "Apple Api Shipwire",
      "phone": null,
      "province": null,
      "zip": null
    },
    "merchant_requests": []
  }
}
View Response
HTTP/1.1 200 OK
{
  "fulfillment_order": {
  "id": 1025578633,
  "shop_id": 690933842,
  "order_id": 450789469,
  "assigned_location_id": 48752903,
  "fulfillment_service_handle": "mars-fulfillment",
  "request_status": "submitted",
  "status": "closed",
  "supported_actions": [],
  "destination": {
    "id": 1025578627,
    "address1": "Chestnut Street 92",
    "address2": "",
    "city": "Louisville",
    "company": null,
    "country": "United States",
    "email": "bob.norman@hostmail.com",
    "first_name": "Bob",
    "last_name": "Norman",
    "phone": "555-625-1199",
    "province": "Kentucky",
    "zip": "40202"
  },
  "line_items": [
    {
      "id": 1025578646,
      "shop_id": 690933842,
      "fulfillment_order_id": 1025578633,
      "quantity": 1,
      "line_item_id": 518995019,
      "inventory_item_id": 49148385,
      "fulfillable_quantity": 1,
      "variant_id": 49148385
    }
  ],
  "assigned_location": {
    "address1": null,
    "address2": null,
    "city": null,
    "country_code": "DE",
    "location_id": 48752903,
    "name": "Apple Api Shipwire",
    "phone": null,
    "province": null,
    "zip": null
  },
  "merchant_requests": []
},
  "replacement_fulfillment_order": {
  "id": 1025578634,
  "shop_id": 690933842,
  "order_id": 450789469,
  "assigned_location_id": 48752903,
  "fulfillment_service_handle": "mars-fulfillment",
  "request_status": "unsubmitted",
  "status": "open",
  "supported_actions": [
    "request_fulfillment",
    "create_fulfillment"
  ],
  "destination": {
    "id": 1025578628,
    "address1": "Chestnut Street 92",
    "address2": "",
    "city": "Louisville",
    "company": null,
    "country": "United States",
    "email": "bob.norman@hostmail.com",
    "first_name": "Bob",
    "last_name": "Norman",
    "phone": "555-625-1199",
    "province": "Kentucky",
    "zip": "40202"
  },
  "line_items": [
    {
      "id": 1025578647,
      "shop_id": 690933842,
      "fulfillment_order_id": 1025578634,
      "quantity": 1,
      "line_item_id": 518995019,
      "inventory_item_id": 49148385,
      "fulfillable_quantity": 1,
      "variant_id": 49148385
    }
  ],
  "assigned_location": {
    "address1": null,
    "address2": null,
    "city": null,
    "country_code": "DE",
    "location_id": 48752903,
    "name": "Apple Api Shipwire",
    "phone": null,
    "province": null,
    "zip": null
  },
  "merchant_requests": []
}
}
POST /admin/api/2020-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/2020-07/fulfillment_orders/1025578635/close.json
{
  "fulfillment_order": {
    "message": "Not enough inventory to complete this work."
  }
}
View Response
HTTP/1.1 200 OK
{
  "fulfillment_order": {
    "id": 1025578635,
    "shop_id": 690933842,
    "order_id": 450789469,
    "assigned_location_id": 48752903,
    "fulfillment_service_handle": "mars-fulfillment",
    "request_status": "closed",
    "status": "incomplete",
    "supported_actions": [
      "request_fulfillment",
      "create_fulfillment"
    ],
    "destination": {
      "id": 1025578629,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "company": null,
      "country": "United States",
      "email": "bob.norman@hostmail.com",
      "first_name": "Bob",
      "last_name": "Norman",
      "phone": "555-625-1199",
      "province": "Kentucky",
      "zip": "40202"
    },
    "line_items": [
      {
        "id": 1025578648,
        "shop_id": 690933842,
        "fulfillment_order_id": 1025578635,
        "quantity": 1,
        "line_item_id": 518995019,
        "inventory_item_id": 49148385,
        "fulfillable_quantity": 1,
        "variant_id": 49148385
      }
    ],
    "assigned_location": {
      "address1": null,
      "address2": null,
      "city": null,
      "country_code": "DE",
      "location_id": 48752903,
      "name": "Apple Api Shipwire",
      "phone": null,
      "province": null,
      "zip": null
    },
    "merchant_requests": []
  }
}
POST /admin/api/2020-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/2020-07/fulfillment_orders/1025578636/move.json
{
  "fulfillment_order": {
    "new_location_id": 905684977
  }
}
View Response
HTTP/1.1 200 OK
{
  "original_fulfillment_order": {
  "id": 1025578636,
  "shop_id": 690933842,
  "order_id": 450789469,
  "assigned_location_id": 487838322,
  "fulfillment_service_handle": "manual",
  "request_status": "submitted",
  "status": "closed",
  "supported_actions": [],
  "destination": {
    "id": 1025578630,
    "address1": "Chestnut Street 92",
    "address2": "",
    "city": "Louisville",
    "company": null,
    "country": "United States",
    "email": "bob.norman@hostmail.com",
    "first_name": "Bob",
    "last_name": "Norman",
    "phone": "555-625-1199",
    "province": "Kentucky",
    "zip": "40202"
  },
  "line_items": [
    {
      "id": 1025578649,
      "shop_id": 690933842,
      "fulfillment_order_id": 1025578636,
      "quantity": 1,
      "line_item_id": 518995019,
      "inventory_item_id": 49148385,
      "fulfillable_quantity": 1,
      "variant_id": 49148385
    }
  ],
  "assigned_location": {
    "address1": null,
    "address2": null,
    "city": null,
    "country_code": "DE",
    "location_id": 48752903,
    "name": "Apple Api Shipwire",
    "phone": null,
    "province": null,
    "zip": null
  },
  "merchant_requests": []
},
  "moved_fulfillment_order": {
  "id": 1025578637,
  "shop_id": 690933842,
  "order_id": 450789469,
  "assigned_location_id": 905684977,
  "fulfillment_service_handle": "manual",
  "request_status": "unsubmitted",
  "status": "open",
  "supported_actions": [
    "create_fulfillment",
    "move"
  ],
  "destination": {
    "id": 1025578631,
    "address1": "Chestnut Street 92",
    "address2": "",
    "city": "Louisville",
    "company": null,
    "country": "United States",
    "email": "bob.norman@hostmail.com",
    "first_name": "Bob",
    "last_name": "Norman",
    "phone": "555-625-1199",
    "province": "Kentucky",
    "zip": "40202"
  },
  "line_items": [
    {
      "id": 1025578650,
      "shop_id": 690933842,
      "fulfillment_order_id": 1025578637,
      "quantity": 1,
      "line_item_id": 518995019,
      "inventory_item_id": 49148385,
      "fulfillable_quantity": 1,
      "variant_id": 49148385
    }
  ],
  "assigned_location": {
    "address1": "50 Rideau Street",
    "address2": null,
    "city": "Ottawa",
    "country_code": "CA",
    "location_id": 905684977,
    "name": "50 Rideau Street",
    "phone": null,
    "province": "Ontario",
    "zip": "K1N 9J7"
  },
  "merchant_requests": []
},
  "remaining_fulfillment_order": null
}
Version 2020-04

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
"assigned_location_id": 3183479

The ID of the location that has been assigned to do the work.

destination
"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.

id
"id": 255858046

An ID for the fulfillment order.

line_items
"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
"order_id": 3183479

The ID of the order that's associated with the fulfillment order.

request_status
"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
"shop_id": 255858046

The ID of the shop that's associated with the fulfillment order.

status
"status": "open"

The status of the fulfillment order. Valid values:

  • open: Default state for newly created fulfillment orders.
  • in_progress: The fulfillment order is being processed.
  • 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
"supported_actions": [
  "create_fulfillment",
  "request_fulfillment",
  "cancel_fulfillment_order",
  "request_cancellation"
]

The actions that can be performed on this fulfillment order.

merchant_requests
"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
"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/2020-04/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/2020-07/orders/450789469/fulfillment_orders.json
View Response
HTTP/1.1 200 OK
{
  "fulfillment_orders": [
    {
      "id": 1025578638,
      "shop_id": 690933842,
      "order_id": 450789469,
      "assigned_location_id": 48752903,
      "fulfillment_service_handle": "mars-fulfillment",
      "request_status": "submitted",
      "status": "open",
      "supported_actions": [
        "cancel_fulfillment_order"
      ],
      "destination": {
        "id": 1025578632,
        "address1": "Chestnut Street 92",
        "address2": "",
        "city": "Louisville",
        "company": null,
        "country": "United States",
        "email": "bob.norman@hostmail.com",
        "first_name": "Bob",
        "last_name": "Norman",
        "phone": "555-625-1199",
        "province": "Kentucky",
        "zip": "40202"
      },
      "line_items": [
        {
          "id": 1025578651,
          "shop_id": 690933842,
          "fulfillment_order_id": 1025578638,
          "quantity": 1,
          "line_item_id": 518995019,
          "inventory_item_id": 49148385,
          "fulfillable_quantity": 1,
          "variant_id": 49148385
        }
      ],
      "assigned_location": {
        "address1": null,
        "address2": null,
        "city": null,
        "country_code": "DE",
        "location_id": 48752903,
        "name": "Apple Api Shipwire",
        "phone": null,
        "province": null,
        "zip": null
      },
      "merchant_requests": []
    }
  ]
}
GET /admin/api/2020-04/fulfillment_orders/{fulfillment_order_id}.json
Retrieves a specific fulfillment order.

Get a single fulfillment order by its ID

GET /admin/api/2020-07/fulfillment_orders/1025578639.json
View Response
HTTP/1.1 200 OK
{
  "fulfillment_order": {
    "id": 1025578639,
    "shop_id": 690933842,
    "order_id": 450789469,
    "assigned_location_id": 48752903,
    "fulfillment_service_handle": "mars-fulfillment",
    "request_status": "submitted",
    "status": "open",
    "supported_actions": [
      "cancel_fulfillment_order"
    ],
    "destination": {
      "id": 1025578633,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "company": null,
      "country": "United States",
      "email": "bob.norman@hostmail.com",
      "first_name": "Bob",
      "last_name": "Norman",
      "phone": "555-625-1199",
      "province": "Kentucky",
      "zip": "40202"
    },
    "line_items": [
      {
        "id": 1025578652,
        "shop_id": 690933842,
        "fulfillment_order_id": 1025578639,
        "quantity": 1,
        "line_item_id": 518995019,
        "inventory_item_id": 49148385,
        "fulfillable_quantity": 1,
        "variant_id": 49148385
      }
    ],
    "assigned_location": {
      "address1": null,
      "address2": null,
      "city": null,
      "country_code": "DE",
      "location_id": 48752903,
      "name": "Apple Api Shipwire",
      "phone": null,
      "province": null,
      "zip": null
    },
    "merchant_requests": []
  }
}
POST /admin/api/2020-04/fulfillment_orders/{fulfillment_order_id}/cancel.json
Marks a fulfillment order as cancelled.

Cancel a fulfillment order

POST /admin/api/2020-07/fulfillment_orders/1025578633/cancel.json
{
  "fulfillment_order": {
    "id": 1025578633,
    "shop_id": 690933842,
    "order_id": 450789469,
    "assigned_location_id": 48752903,
    "fulfillment_service_handle": "mars-fulfillment",
    "request_status": "submitted",
    "status": "open",
    "supported_actions": [
      "cancel_fulfillment_order"
    ],
    "destination": {
      "id": 1025578627,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "company": null,
      "country": "United States",
      "email": "bob.norman@hostmail.com",
      "first_name": "Bob",
      "last_name": "Norman",
      "phone": "555-625-1199",
      "province": "Kentucky",
      "zip": "40202"
    },
    "line_items": [
      {
        "id": 1025578646,
        "shop_id": 690933842,
        "fulfillment_order_id": 1025578633,
        "quantity": 1,
        "line_item_id": 518995019,
        "inventory_item_id": 49148385,
        "fulfillable_quantity": 1,
        "variant_id": 49148385
      }
    ],
    "assigned_location": {
      "address1": null,
      "address2": null,
      "city": null,
      "country_code": "DE",
      "location_id": 48752903,
      "name": "Apple Api Shipwire",
      "phone": null,
      "province": null,
      "zip": null
    },
    "merchant_requests": []
  }
}
View Response
HTTP/1.1 200 OK
{
  "fulfillment_order": {
  "id": 1025578633,
  "shop_id": 690933842,
  "order_id": 450789469,
  "assigned_location_id": 48752903,
  "fulfillment_service_handle": "mars-fulfillment",
  "request_status": "submitted",
  "status": "closed",
  "supported_actions": [],
  "destination": {
    "id": 1025578627,
    "address1": "Chestnut Street 92",
    "address2": "",
    "city": "Louisville",
    "company": null,
    "country": "United States",
    "email": "bob.norman@hostmail.com",
    "first_name": "Bob",
    "last_name": "Norman",
    "phone": "555-625-1199",
    "province": "Kentucky",
    "zip": "40202"
  },
  "line_items": [
    {
      "id": 1025578646,
      "shop_id": 690933842,
      "fulfillment_order_id": 1025578633,
      "quantity": 1,
      "line_item_id": 518995019,
      "inventory_item_id": 49148385,
      "fulfillable_quantity": 1,
      "variant_id": 49148385
    }
  ],
  "assigned_location": {
    "address1": null,
    "address2": null,
    "city": null,
    "country_code": "DE",
    "location_id": 48752903,
    "name": "Apple Api Shipwire",
    "phone": null,
    "province": null,
    "zip": null
  },
  "merchant_requests": []
},
  "replacement_fulfillment_order": {
  "id": 1025578634,
  "shop_id": 690933842,
  "order_id": 450789469,
  "assigned_location_id": 48752903,
  "fulfillment_service_handle": "mars-fulfillment",
  "request_status": "unsubmitted",
  "status": "open",
  "supported_actions": [
    "request_fulfillment",
    "create_fulfillment"
  ],
  "destination": {
    "id": 1025578628,
    "address1": "Chestnut Street 92",
    "address2": "",
    "city": "Louisville",
    "company": null,
    "country": "United States",
    "email": "bob.norman@hostmail.com",
    "first_name": "Bob",
    "last_name": "Norman",
    "phone": "555-625-1199",
    "province": "Kentucky",
    "zip": "40202"
  },
  "line_items": [
    {
      "id": 1025578647,
      "shop_id": 690933842,
      "fulfillment_order_id": 1025578634,
      "quantity": 1,
      "line_item_id": 518995019,
      "inventory_item_id": 49148385,
      "fulfillable_quantity": 1,
      "variant_id": 49148385
    }
  ],
  "assigned_location": {
    "address1": null,
    "address2": null,
    "city": null,
    "country_code": "DE",
    "location_id": 48752903,
    "name": "Apple Api Shipwire",
    "phone": null,
    "province": null,
    "zip": null
  },
  "merchant_requests": []
}
}
POST /admin/api/2020-04/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/2020-07/fulfillment_orders/1025578635/close.json
{
  "fulfillment_order": {
    "message": "Not enough inventory to complete this work."
  }
}
View Response
HTTP/1.1 200 OK
{
  "fulfillment_order": {
    "id": 1025578635,
    "shop_id": 690933842,
    "order_id": 450789469,
    "assigned_location_id": 48752903,
    "fulfillment_service_handle": "mars-fulfillment",
    "request_status": "closed",
    "status": "incomplete",
    "supported_actions": [
      "request_fulfillment",
      "create_fulfillment"
    ],
    "destination": {
      "id": 1025578629,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "company": null,
      "country": "United States",
      "email": "bob.norman@hostmail.com",
      "first_name": "Bob",
      "last_name": "Norman",
      "phone": "555-625-1199",
      "province": "Kentucky",
      "zip": "40202"
    },
    "line_items": [
      {
        "id": 1025578648,
        "shop_id": 690933842,
        "fulfillment_order_id": 1025578635,
        "quantity": 1,
        "line_item_id": 518995019,
        "inventory_item_id": 49148385,
        "fulfillable_quantity": 1,
        "variant_id": 49148385
      }
    ],
    "assigned_location": {
      "address1": null,
      "address2": null,
      "city": null,
      "country_code": "DE",
      "location_id": 48752903,
      "name": "Apple Api Shipwire",
      "phone": null,
      "province": null,
      "zip": null
    },
    "merchant_requests": []
  }
}
POST /admin/api/2020-04/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/2020-07/fulfillment_orders/1025578636/move.json
{
  "fulfillment_order": {
    "new_location_id": 905684977
  }
}
View Response
HTTP/1.1 200 OK
{
  "original_fulfillment_order": {
  "id": 1025578636,
  "shop_id": 690933842,
  "order_id": 450789469,
  "assigned_location_id": 487838322,
  "fulfillment_service_handle": "manual",
  "request_status": "submitted",
  "status": "closed",
  "supported_actions": [],
  "destination": {
    "id": 1025578630,
    "address1": "Chestnut Street 92",
    "address2": "",
    "city": "Louisville",
    "company": null,
    "country": "United States",
    "email": "bob.norman@hostmail.com",
    "first_name": "Bob",
    "last_name": "Norman",
    "phone": "555-625-1199",
    "province": "Kentucky",
    "zip": "40202"
  },
  "line_items": [
    {
      "id": 1025578649,
      "shop_id": 690933842,
      "fulfillment_order_id": 1025578636,
      "quantity": 1,
      "line_item_id": 518995019,
      "inventory_item_id": 49148385,
      "fulfillable_quantity": 1,
      "variant_id": 49148385
    }
  ],
  "assigned_location": {
    "address1": null,
    "address2": null,
    "city": null,
    "country_code": "DE",
    "location_id": 48752903,
    "name": "Apple Api Shipwire",
    "phone": null,
    "province": null,
    "zip": null
  },
  "merchant_requests": []
},
  "moved_fulfillment_order": {
  "id": 1025578637,
  "shop_id": 690933842,
  "order_id": 450789469,
  "assigned_location_id": 905684977,
  "fulfillment_service_handle": "manual",
  "request_status": "unsubmitted",
  "status": "open",
  "supported_actions": [
    "create_fulfillment",
    "move"
  ],
  "destination": {
    "id": 1025578631,
    "address1": "Chestnut Street 92",
    "address2": "",
    "city": "Louisville",
    "company": null,
    "country": "United States",
    "email": "bob.norman@hostmail.com",
    "first_name": "Bob",
    "last_name": "Norman",
    "phone": "555-625-1199",
    "province": "Kentucky",
    "zip": "40202"
  },
  "line_items": [
    {
      "id": 1025578650,
      "shop_id": 690933842,
      "fulfillment_order_id": 1025578637,
      "quantity": 1,
      "line_item_id": 518995019,
      "inventory_item_id": 49148385,
      "fulfillable_quantity": 1,
      "variant_id": 49148385
    }
  ],
  "assigned_location": {
    "address1": "50 Rideau Street",
    "address2": null,
    "city": "Ottawa",
    "country_code": "CA",
    "location_id": 905684977,
    "name": "50 Rideau Street",
    "phone": null,
    "province": "Ontario",
    "zip": "K1N 9J7"
  },
  "merchant_requests": []
},
  "remaining_fulfillment_order": null
}
Version 2020-07 (Latest)

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
"assigned_location_id": 3183479

The ID of the location that has been assigned to do the work.

destination
"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.

id
"id": 255858046

An ID for the fulfillment order.

line_items
"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
"order_id": 3183479

The ID of the order that's associated with the fulfillment order.

request_status
"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
"shop_id": 255858046

The ID of the shop that's associated with the fulfillment order.

status
"status": "open"

The status of the fulfillment order. Valid values:

  • open: Default state for newly created fulfillment orders.
  • in_progress: The fulfillment order is being processed.
  • 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
"supported_actions": [
  "create_fulfillment",
  "request_fulfillment",
  "cancel_fulfillment_order",
  "request_cancellation"
]

The actions that can be performed on this fulfillment order.

merchant_requests
"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
"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/2020-07/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/2020-07/orders/450789469/fulfillment_orders.json
View Response
HTTP/1.1 200 OK
{
  "fulfillment_orders": [
    {
      "id": 1025578638,
      "shop_id": 690933842,
      "order_id": 450789469,
      "assigned_location_id": 48752903,
      "fulfillment_service_handle": "mars-fulfillment",
      "request_status": "submitted",
      "status": "open",
      "supported_actions": [
        "cancel_fulfillment_order"
      ],
      "destination": {
        "id": 1025578632,
        "address1": "Chestnut Street 92",
        "address2": "",
        "city": "Louisville",
        "company": null,
        "country": "United States",
        "email": "bob.norman@hostmail.com",
        "first_name": "Bob",
        "last_name": "Norman",
        "phone": "555-625-1199",
        "province": "Kentucky",
        "zip": "40202"
      },
      "line_items": [
        {
          "id": 1025578651,
          "shop_id": 690933842,
          "fulfillment_order_id": 1025578638,
          "quantity": 1,
          "line_item_id": 518995019,
          "inventory_item_id": 49148385,
          "fulfillable_quantity": 1,
          "variant_id": 49148385
        }
      ],
      "assigned_location": {
        "address1": null,
        "address2": null,
        "city": null,
        "country_code": "DE",
        "location_id": 48752903,
        "name": "Apple Api Shipwire",
        "phone": null,
        "province": null,
        "zip": null
      },
      "merchant_requests": []
    }
  ]
}
GET /admin/api/2020-07/fulfillment_orders/{fulfillment_order_id}.json
Retrieves a specific fulfillment order.

Get a single fulfillment order by its ID

GET /admin/api/2020-07/fulfillment_orders/1025578639.json
View Response
HTTP/1.1 200 OK
{
  "fulfillment_order": {
    "id": 1025578639,
    "shop_id": 690933842,
    "order_id": 450789469,
    "assigned_location_id": 48752903,
    "fulfillment_service_handle": "mars-fulfillment",
    "request_status": "submitted",
    "status": "open",
    "supported_actions": [
      "cancel_fulfillment_order"
    ],
    "destination": {
      "id": 1025578633,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "company": null,
      "country": "United States",
      "email": "bob.norman@hostmail.com",
      "first_name": "Bob",
      "last_name": "Norman",
      "phone": "555-625-1199",
      "province": "Kentucky",
      "zip": "40202"
    },
    "line_items": [
      {
        "id": 1025578652,
        "shop_id": 690933842,
        "fulfillment_order_id": 1025578639,
        "quantity": 1,
        "line_item_id": 518995019,
        "inventory_item_id": 49148385,
        "fulfillable_quantity": 1,
        "variant_id": 49148385
      }
    ],
    "assigned_location": {
      "address1": null,
      "address2": null,
      "city": null,
      "country_code": "DE",
      "location_id": 48752903,
      "name": "Apple Api Shipwire",
      "phone": null,
      "province": null,
      "zip": null
    },
    "merchant_requests": []
  }
}
POST /admin/api/2020-07/fulfillment_orders/{fulfillment_order_id}/cancel.json
Marks a fulfillment order as cancelled.

Cancel a fulfillment order

POST /admin/api/2020-07/fulfillment_orders/1025578633/cancel.json
{
  "fulfillment_order": {
    "id": 1025578633,
    "shop_id": 690933842,
    "order_id": 450789469,
    "assigned_location_id": 48752903,
    "fulfillment_service_handle": "mars-fulfillment",
    "request_status": "submitted",
    "status": "open",
    "supported_actions": [
      "cancel_fulfillment_order"
    ],
    "destination": {
      "id": 1025578627,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "company": null,
      "country": "United States",
      "email": "bob.norman@hostmail.com",
      "first_name": "Bob",
      "last_name": "Norman",
      "phone": "555-625-1199",
      "province": "Kentucky",
      "zip": "40202"
    },
    "line_items": [
      {
        "id": 1025578646,
        "shop_id": 690933842,
        "fulfillment_order_id": 1025578633,
        "quantity": 1,
        "line_item_id": 518995019,
        "inventory_item_id": 49148385,
        "fulfillable_quantity": 1,
        "variant_id": 49148385
      }
    ],
    "assigned_location": {
      "address1": null,
      "address2": null,
      "city": null,
      "country_code": "DE",
      "location_id": 48752903,
      "name": "Apple Api Shipwire",
      "phone": null,
      "province": null,
      "zip": null
    },
    "merchant_requests": []
  }
}
View Response
HTTP/1.1 200 OK
{
  "fulfillment_order": {
  "id": 1025578633,
  "shop_id": 690933842,
  "order_id": 450789469,
  "assigned_location_id": 48752903,
  "fulfillment_service_handle": "mars-fulfillment",
  "request_status": "submitted",
  "status": "closed",
  "supported_actions": [],
  "destination": {
    "id": 1025578627,
    "address1": "Chestnut Street 92",
    "address2": "",
    "city": "Louisville",
    "company": null,
    "country": "United States",
    "email": "bob.norman@hostmail.com",
    "first_name": "Bob",
    "last_name": "Norman",
    "phone": "555-625-1199",
    "province": "Kentucky",
    "zip": "40202"
  },
  "line_items": [
    {
      "id": 1025578646,
      "shop_id": 690933842,
      "fulfillment_order_id": 1025578633,
      "quantity": 1,
      "line_item_id": 518995019,
      "inventory_item_id": 49148385,
      "fulfillable_quantity": 1,
      "variant_id": 49148385
    }
  ],
  "assigned_location": {
    "address1": null,
    "address2": null,
    "city": null,
    "country_code": "DE",
    "location_id": 48752903,
    "name": "Apple Api Shipwire",
    "phone": null,
    "province": null,
    "zip": null
  },
  "merchant_requests": []
},
  "replacement_fulfillment_order": {
  "id": 1025578634,
  "shop_id": 690933842,
  "order_id": 450789469,
  "assigned_location_id": 48752903,
  "fulfillment_service_handle": "mars-fulfillment",
  "request_status": "unsubmitted",
  "status": "open",
  "supported_actions": [
    "request_fulfillment",
    "create_fulfillment"
  ],
  "destination": {
    "id": 1025578628,
    "address1": "Chestnut Street 92",
    "address2": "",
    "city": "Louisville",
    "company": null,
    "country": "United States",
    "email": "bob.norman@hostmail.com",
    "first_name": "Bob",
    "last_name": "Norman",
    "phone": "555-625-1199",
    "province": "Kentucky",
    "zip": "40202"
  },
  "line_items": [
    {
      "id": 1025578647,
      "shop_id": 690933842,
      "fulfillment_order_id": 1025578634,
      "quantity": 1,
      "line_item_id": 518995019,
      "inventory_item_id": 49148385,
      "fulfillable_quantity": 1,
      "variant_id": 49148385
    }
  ],
  "assigned_location": {
    "address1": null,
    "address2": null,
    "city": null,
    "country_code": "DE",
    "location_id": 48752903,
    "name": "Apple Api Shipwire",
    "phone": null,
    "province": null,
    "zip": null
  },
  "merchant_requests": []
}
}
POST /admin/api/2020-07/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/2020-07/fulfillment_orders/1025578635/close.json
{
  "fulfillment_order": {
    "message": "Not enough inventory to complete this work."
  }
}
View Response
HTTP/1.1 200 OK
{
  "fulfillment_order": {
    "id": 1025578635,
    "shop_id": 690933842,
    "order_id": 450789469,
    "assigned_location_id": 48752903,
    "fulfillment_service_handle": "mars-fulfillment",
    "request_status": "closed",
    "status": "incomplete",
    "supported_actions": [
      "request_fulfillment",
      "create_fulfillment"
    ],
    "destination": {
      "id": 1025578629,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "company": null,
      "country": "United States",
      "email": "bob.norman@hostmail.com",
      "first_name": "Bob",
      "last_name": "Norman",
      "phone": "555-625-1199",
      "province": "Kentucky",
      "zip": "40202"
    },
    "line_items": [
      {
        "id": 1025578648,
        "shop_id": 690933842,
        "fulfillment_order_id": 1025578635,
        "quantity": 1,
        "line_item_id": 518995019,
        "inventory_item_id": 49148385,
        "fulfillable_quantity": 1,
        "variant_id": 49148385
      }
    ],
    "assigned_location": {
      "address1": null,
      "address2": null,
      "city": null,
      "country_code": "DE",
      "location_id": 48752903,
      "name": "Apple Api Shipwire",
      "phone": null,
      "province": null,
      "zip": null
    },
    "merchant_requests": []
  }
}
POST /admin/api/2020-07/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/2020-07/fulfillment_orders/1025578636/move.json
{
  "fulfillment_order": {
    "new_location_id": 905684977
  }
}
View Response
HTTP/1.1 200 OK
{
  "original_fulfillment_order": {
  "id": 1025578636,
  "shop_id": 690933842,
  "order_id": 450789469,
  "assigned_location_id": 487838322,
  "fulfillment_service_handle": "manual",
  "request_status": "submitted",
  "status": "closed",
  "supported_actions": [],
  "destination": {
    "id": 1025578630,
    "address1": "Chestnut Street 92",
    "address2": "",
    "city": "Louisville",
    "company": null,
    "country": "United States",
    "email": "bob.norman@hostmail.com",
    "first_name": "Bob",
    "last_name": "Norman",
    "phone": "555-625-1199",
    "province": "Kentucky",
    "zip": "40202"
  },
  "line_items": [
    {
      "id": 1025578649,
      "shop_id": 690933842,
      "fulfillment_order_id": 1025578636,
      "quantity": 1,
      "line_item_id": 518995019,
      "inventory_item_id": 49148385,
      "fulfillable_quantity": 1,
      "variant_id": 49148385
    }
  ],
  "assigned_location": {
    "address1": null,
    "address2": null,
    "city": null,
    "country_code": "DE",
    "location_id": 48752903,
    "name": "Apple Api Shipwire",
    "phone": null,
    "province": null,
    "zip": null
  },
  "merchant_requests": []
},
  "moved_fulfillment_order": {
  "id": 1025578637,
  "shop_id": 690933842,
  "order_id": 450789469,
  "assigned_location_id": 905684977,
  "fulfillment_service_handle": "manual",
  "request_status": "unsubmitted",
  "status": "open",
  "supported_actions": [
    "create_fulfillment",
    "move"
  ],
  "destination": {
    "id": 1025578631,
    "address1": "Chestnut Street 92",
    "address2": "",
    "city": "Louisville",
    "company": null,
    "country": "United States",
    "email": "bob.norman@hostmail.com",
    "first_name": "Bob",
    "last_name": "Norman",
    "phone": "555-625-1199",
    "province": "Kentucky",
    "zip": "40202"
  },
  "line_items": [
    {
      "id": 1025578650,
      "shop_id": 690933842,
      "fulfillment_order_id": 1025578637,
      "quantity": 1,
      "line_item_id": 518995019,
      "inventory_item_id": 49148385,
      "fulfillable_quantity": 1,
      "variant_id": 49148385
    }
  ],
  "assigned_location": {
    "address1": "50 Rideau Street",
    "address2": null,
    "city": "Ottawa",
    "country_code": "CA",
    "location_id": 905684977,
    "name": "50 Rideau Street",
    "phone": null,
    "province": "Ontario",
    "zip": "K1N 9J7"
  },
  "merchant_requests": []
},
  "remaining_fulfillment_order": null
}
Version 2020-10 (Release candidate)

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
"assigned_location_id": 3183479

The ID of the location that has been assigned to do the work.

destination
"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.

id
"id": 255858046

An ID for the fulfillment order.

line_items
"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
"order_id": 3183479

The ID of the order that's associated with the fulfillment order.

request_status
"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
"shop_id": 255858046

The ID of the shop that's associated with the fulfillment order.

status
"status": "open"

The status of the fulfillment order. Valid values:

  • open: Default state for newly created fulfillment orders.
  • in_progress: The fulfillment order is being processed.
  • 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
"supported_actions": [
  "create_fulfillment",
  "request_fulfillment",
  "cancel_fulfillment_order",
  "request_cancellation"
]

The actions that can be performed on this fulfillment order.

merchant_requests
"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
"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/2020-10/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/2020-07/orders/450789469/fulfillment_orders.json
View Response
HTTP/1.1 200 OK
{
  "fulfillment_orders": [
    {
      "id": 1025578638,
      "shop_id": 690933842,
      "order_id": 450789469,
      "assigned_location_id": 48752903,
      "fulfillment_service_handle": "mars-fulfillment",
      "request_status": "submitted",
      "status": "open",
      "supported_actions": [
        "cancel_fulfillment_order"
      ],
      "destination": {
        "id": 1025578632,
        "address1": "Chestnut Street 92",
        "address2": "",
        "city": "Louisville",
        "company": null,
        "country": "United States",
        "email": "bob.norman@hostmail.com",
        "first_name": "Bob",
        "last_name": "Norman",
        "phone": "555-625-1199",
        "province": "Kentucky",
        "zip": "40202"
      },
      "line_items": [
        {
          "id": 1025578651,
          "shop_id": 690933842,
          "fulfillment_order_id": 1025578638,
          "quantity": 1,
          "line_item_id": 518995019,
          "inventory_item_id": 49148385,
          "fulfillable_quantity": 1,
          "variant_id": 49148385
        }
      ],
      "assigned_location": {
        "address1": null,
        "address2": null,
        "city": null,
        "country_code": "DE",
        "location_id": 48752903,
        "name": "Apple Api Shipwire",
        "phone": null,
        "province": null,
        "zip": null
      },
      "merchant_requests": []
    }
  ]
}
GET /admin/api/2020-10/fulfillment_orders/{fulfillment_order_id}.json
Retrieves a specific fulfillment order.

Get a single fulfillment order by its ID

GET /admin/api/2020-07/fulfillment_orders/1025578639.json
View Response
HTTP/1.1 200 OK
{
  "fulfillment_order": {
    "id": 1025578639,
    "shop_id": 690933842,
    "order_id": 450789469,
    "assigned_location_id": 48752903,
    "fulfillment_service_handle": "mars-fulfillment",
    "request_status": "submitted",
    "status": "open",
    "supported_actions": [
      "cancel_fulfillment_order"
    ],
    "destination": {
      "id": 1025578633,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "company": null,
      "country": "United States",
      "email": "bob.norman@hostmail.com",
      "first_name": "Bob",
      "last_name": "Norman",
      "phone": "555-625-1199",
      "province": "Kentucky",
      "zip": "40202"
    },
    "line_items": [
      {
        "id": 1025578652,
        "shop_id": 690933842,
        "fulfillment_order_id": 1025578639,
        "quantity": 1,
        "line_item_id": 518995019,
        "inventory_item_id": 49148385,
        "fulfillable_quantity": 1,
        "variant_id": 49148385
      }
    ],
    "assigned_location": {
      "address1": null,
      "address2": null,
      "city": null,
      "country_code": "DE",
      "location_id": 48752903,
      "name": "Apple Api Shipwire",
      "phone": null,
      "province": null,
      "zip": null
    },
    "merchant_requests": []
  }
}
POST /admin/api/2020-10/fulfillment_orders/{fulfillment_order_id}/cancel.json
Marks a fulfillment order as cancelled.

Cancel a fulfillment order

POST /admin/api/2020-07/fulfillment_orders/1025578633/cancel.json
{
  "fulfillment_order": {
    "id": 1025578633,
    "shop_id": 690933842,
    "order_id": 450789469,
    "assigned_location_id": 48752903,
    "fulfillment_service_handle": "mars-fulfillment",
    "request_status": "submitted",
    "status": "open",
    "supported_actions": [
      "cancel_fulfillment_order"
    ],
    "destination": {
      "id": 1025578627,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "company": null,
      "country": "United States",
      "email": "bob.norman@hostmail.com",
      "first_name": "Bob",
      "last_name": "Norman",
      "phone": "555-625-1199",
      "province": "Kentucky",
      "zip": "40202"
    },
    "line_items": [
      {
        "id": 1025578646,
        "shop_id": 690933842,
        "fulfillment_order_id": 1025578633,
        "quantity": 1,
        "line_item_id": 518995019,
        "inventory_item_id": 49148385,
        "fulfillable_quantity": 1,
        "variant_id": 49148385
      }
    ],
    "assigned_location": {
      "address1": null,
      "address2": null,
      "city": null,
      "country_code": "DE",
      "location_id": 48752903,
      "name": "Apple Api Shipwire",
      "phone": null,
      "province": null,
      "zip": null
    },
    "merchant_requests": []
  }
}
View Response
HTTP/1.1 200 OK
{
  "fulfillment_order": {
  "id": 1025578633,
  "shop_id": 690933842,
  "order_id": 450789469,
  "assigned_location_id": 48752903,
  "fulfillment_service_handle": "mars-fulfillment",
  "request_status": "submitted",
  "status": "closed",
  "supported_actions": [],
  "destination": {
    "id": 1025578627,
    "address1": "Chestnut Street 92",
    "address2": "",
    "city": "Louisville",
    "company": null,
    "country": "United States",
    "email": "bob.norman@hostmail.com",
    "first_name": "Bob",
    "last_name": "Norman",
    "phone": "555-625-1199",
    "province": "Kentucky",
    "zip": "40202"
  },
  "line_items": [
    {
      "id": 1025578646,
      "shop_id": 690933842,
      "fulfillment_order_id": 1025578633,
      "quantity": 1,
      "line_item_id": 518995019,
      "inventory_item_id": 49148385,
      "fulfillable_quantity": 1,
      "variant_id": 49148385
    }
  ],
  "assigned_location": {
    "address1": null,
    "address2": null,
    "city": null,
    "country_code": "DE",
    "location_id": 48752903,
    "name": "Apple Api Shipwire",
    "phone": null,
    "province": null,
    "zip": null
  },
  "merchant_requests": []
},
  "replacement_fulfillment_order": {
  "id": 1025578634,
  "shop_id": 690933842,
  "order_id": 450789469,
  "assigned_location_id": 48752903,
  "fulfillment_service_handle": "mars-fulfillment",
  "request_status": "unsubmitted",
  "status": "open",
  "supported_actions": [
    "request_fulfillment",
    "create_fulfillment"
  ],
  "destination": {
    "id": 1025578628,
    "address1": "Chestnut Street 92",
    "address2": "",
    "city": "Louisville",
    "company": null,
    "country": "United States",
    "email": "bob.norman@hostmail.com",
    "first_name": "Bob",
    "last_name": "Norman",
    "phone": "555-625-1199",
    "province": "Kentucky",
    "zip": "40202"
  },
  "line_items": [
    {
      "id": 1025578647,
      "shop_id": 690933842,
      "fulfillment_order_id": 1025578634,
      "quantity": 1,
      "line_item_id": 518995019,
      "inventory_item_id": 49148385,
      "fulfillable_quantity": 1,
      "variant_id": 49148385
    }
  ],
  "assigned_location": {
    "address1": null,
    "address2": null,
    "city": null,
    "country_code": "DE",
    "location_id": 48752903,
    "name": "Apple Api Shipwire",
    "phone": null,
    "province": null,
    "zip": null
  },
  "merchant_requests": []
}
}
POST /admin/api/2020-10/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/2020-07/fulfillment_orders/1025578635/close.json
{
  "fulfillment_order": {
    "message": "Not enough inventory to complete this work."
  }
}
View Response
HTTP/1.1 200 OK
{
  "fulfillment_order": {
    "id": 1025578635,
    "shop_id": 690933842,
    "order_id": 450789469,
    "assigned_location_id": 48752903,
    "fulfillment_service_handle": "mars-fulfillment",
    "request_status": "closed",
    "status": "incomplete",
    "supported_actions": [
      "request_fulfillment",
      "create_fulfillment"
    ],
    "destination": {
      "id": 1025578629,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "company": null,
      "country": "United States",
      "email": "bob.norman@hostmail.com",
      "first_name": "Bob",
      "last_name": "Norman",
      "phone": "555-625-1199",
      "province": "Kentucky",
      "zip": "40202"
    },
    "line_items": [
      {
        "id": 1025578648,
        "shop_id": 690933842,
        "fulfillment_order_id": 1025578635,
        "quantity": 1,
        "line_item_id": 518995019,
        "inventory_item_id": 49148385,
        "fulfillable_quantity": 1,
        "variant_id": 49148385
      }
    ],
    "assigned_location": {
      "address1": null,
      "address2": null,
      "city": null,
      "country_code": "DE",
      "location_id": 48752903,
      "name": "Apple Api Shipwire",
      "phone": null,
      "province": null,
      "zip": null
    },
    "merchant_requests": []
  }
}
POST /admin/api/2020-10/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/2020-07/fulfillment_orders/1025578636/move.json
{
  "fulfillment_order": {
    "new_location_id": 905684977
  }
}
View Response
HTTP/1.1 200 OK
{
  "original_fulfillment_order": {
  "id": 1025578636,
  "shop_id": 690933842,
  "order_id": 450789469,
  "assigned_location_id": 487838322,
  "fulfillment_service_handle": "manual",
  "request_status": "submitted",
  "status": "closed",
  "supported_actions": [],
  "destination": {
    "id": 1025578630,
    "address1": "Chestnut Street 92",
    "address2": "",
    "city": "Louisville",
    "company": null,
    "country": "United States",
    "email": "bob.norman@hostmail.com",
    "first_name": "Bob",
    "last_name": "Norman",
    "phone": "555-625-1199",
    "province": "Kentucky",
    "zip": "40202"
  },
  "line_items": [
    {
      "id": 1025578649,
      "shop_id": 690933842,
      "fulfillment_order_id": 1025578636,
      "quantity": 1,
      "line_item_id": 518995019,
      "inventory_item_id": 49148385,
      "fulfillable_quantity": 1,
      "variant_id": 49148385
    }
  ],
  "assigned_location": {
    "address1": null,
    "address2": null,
    "city": null,
    "country_code": "DE",
    "location_id": 48752903,
    "name": "Apple Api Shipwire",
    "phone": null,
    "province": null,
    "zip": null
  },
  "merchant_requests": []
},
  "moved_fulfillment_order": {
  "id": 1025578637,
  "shop_id": 690933842,
  "order_id": 450789469,
  "assigned_location_id": 905684977,
  "fulfillment_service_handle": "manual",
  "request_status": "unsubmitted",
  "status": "open",
  "supported_actions": [
    "create_fulfillment",
    "move"
  ],
  "destination": {
    "id": 1025578631,
    "address1": "Chestnut Street 92",
    "address2": "",
    "city": "Louisville",
    "company": null,
    "country": "United States",
    "email": "bob.norman@hostmail.com",
    "first_name": "Bob",
    "last_name": "Norman",
    "phone": "555-625-1199",
    "province": "Kentucky",
    "zip": "40202"
  },
  "line_items": [
    {
      "id": 1025578650,
      "shop_id": 690933842,
      "fulfillment_order_id": 1025578637,
      "quantity": 1,
      "line_item_id": 518995019,
      "inventory_item_id": 49148385,
      "fulfillable_quantity": 1,
      "variant_id": 49148385
    }
  ],
  "assigned_location": {
    "address1": "50 Rideau Street",
    "address2": null,
    "city": "Ottawa",
    "country_code": "CA",
    "location_id": 905684977,
    "name": "50 Rideau Street",
    "phone": null,
    "province": "Ontario",
    "zip": "K1N 9J7"
  },
  "merchant_requests": []
},
  "remaining_fulfillment_order": null
}