New Shopify Certification now available: Liquid Storefronts for Theme Developers

Fulfilling multiple orders for the same customer using API

aminabudahab
Shopify Partner
1 0 0

Hello,

I am building an Order management app for my business. 

So all orders are routed and will be fulfilled from the same "merchant managed location" but there are cases when a customer places two orders and wants it fulfilled together under the same shipment/fulfillment.

 

If I do this in fulfillment object API:

{
  "fulfillment": {
    "line_items_by_fulfillment_order": [
      {
        "fulfillment_order_id": "6467120070961",
        "fulfillment_order_line_items": [
          {
            "id": "14295468638513",
            "quantity": "2"
          }
        ]
      },
      {
        "fulfillment_order_id": "6445747110193",
        "fulfillment_order_line_items": [
          {
            "id": "14242613428529",
            "quantity": "1"
          }
        ]
      }
    ],
    "tracking_info": {
      "number": "12345",
      "url": "www.kangaroo.com",
      "company": "Kangaroo Shipping"
    },
    "notify_customer": false,
    "origin_address": null,
    "message": "test message"
  }
}

 

I get this error:

{
    "errors": [
        "All fulfillment orders must belong to the same order. Multiple orders with ids [5512091402545, 5528552276273] were found."
    ]
}

 

I know this isn't unique to us, how can one go about doing this?

Thanks,

Amin

Replies 0 (0)