API - Fulfill an order after canceling some line items

Shopify Partner
2 0 0

Hi All,

We are trying to partially cancel and order and fulfill the rest, but getting a "Line items are already fulfilled". The scenario is:

  1. Create an order with more than one line item
  2. Mark it as paid
  3. Cancel one of the line items using the cancel endpoint => "financial_status" property moved to "partially_refunded"
  4. Fulfill the rest of the order => 422 error throw

We have been using the fulfillment endpoint for a long time and is working perfectly, but looks like in this scenario there is something wrong.

Could you help me determine what the issue is?


An example would be:


    "fulfillment": {
        "tracking_company": "Shop.com",
        "tracking_number": "1111",
        "tracking_numbers": ["1111"],
        "tracking_urls": [null],
        "line_items": [{
                "price": 0.0,
                "quantity": 1,
                "sku": null,
                "name": null,
                "tax_lines": null,
                "properties": null,
                "origin_location": null,
                "id": "5422444609624"
        "location_id": "256181",
        "notify_customer": true


    "errors": {
        "base": ["Line items are already fulfilled"]


Shopify Staff
Shopify Staff
823 97 178

Hey @Matthew10,

If you're using the cancel endpoint before attempting fulfillment, this is the reason you're unable to fulfill the order. Using the cancel endpoint cancels the entire order, even if you only refund/restock some of the items. Once an order is cancelled it can no longer have fulfillments created for it.

If you're looking to refund/restock certain items but still plan to ship other items on an order, you should use the refund endpoint instead of cancel. Once the items are refunded, you can continue to fulfill the order as usual.

JB | Developer Support @ 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