Part Ship Orders

Hi,

I’d like to only partially ship orders, as opposed to shipping the whole order when using the shipping request.

What is the best way to achieve this?

Many thanks,

Hi, @JackG!
Welcome to the Veeqo developer forum!

With Veeqo, shipments are based off the allocation for an order.

You will first need to remove any allocations on the order that may exist already. You’ll then need to ensure that you have created an allocation, which allocates only the items you wish to ship. Then, once the allocation is created, take that allocation ID, and create a shipment as usual.

Here’s an example

If I have an order (let’s give it an ID of 123456) that contains 2 line items (let’s give the first line item a sellable ID of 234567 and the second, a sellable ID of 345678) then here’s what I’d do…

  • Remove any allocations (reference)
    • Veeqo will auto-allocate an order upon creation, if there is enough stock for the items or if Veeqo’s auto-allocation feature is enabled
  • Create an allocation for a partial shipment (reference)
    • Let’s allocate sellable ID 234567 (You’ll need to assign a warehouse ID)
{
  "allocation": {
    "warehouse_id": WAREHOUSE_ID_HERE,
    "line_items_attributes": [
      {
        "sellable_id": 234567,
        "quantity": 1
      }
    ]
  }
}
  • Now, let’s create the shipment (reference) (the allocation ID is returned when you create the allocation)
{
  "shipment": {
    "tracking_number_attributes": {
      "tracking_number": "12345679ABC"
    },
    "carrier_id": 3,
    "notify_customer": true,
    "update_remote_order": true
  },
  "allocation_id": ALLOCATION_ID_HERE,
  "order_id": 123456
}

That should do the trick!
In short:

  • Remove any existing allocations
  • Allocate only the line items you wish to ship
  • Create the shipment using the above allocation

Hope this helps!