shipments

Merge one or more shipments into the shipment in the URL. The items from each shipment in shipment_ids move onto the shipment in the URL, and the shipments in shipment_ids are then deleted.

The shipment in the URL stays linked to its own sales orders and becomes linked to the sales orders of every shipment merged into it, so order sources keep getting shipment notifications. The merged shipments can belong to different sales orders.

To merge shipments:

  • Every shipment, including the one in the URL, must have a shipment_status of pending, awaiting_payment, or on_hold.
  • Every shipment must be linked to a sales order. Check sales_order_ids on each shipment.
  • None of the shipments can come from a marketplace that supplies its own shipping labels.

If shipment_ids includes the shipment in the URL or lists a shipment more than once, the extra entries are ignored.

post/v1/shipments/{shipment_id}/merge

Request

  • Base URL: https://api.shipengine.com
  • URL: https://api.shipengine.com/v1/shipments/{shipment_id}/merge
  • Auth: API key in header API-Key

Request body

shipment_idsSeId[] required

The shipments to merge into the shipment in the URL. At least one of them must be a shipment other than the one in the URL.

Example request

{
  "shipment_ids": [
    "se-202902301",
    "se-202902302"
  ]
}

Response

The shipments were merged.

shipment_idstring

A string that uniquely identifies a ShipEngine resource, such as a carrier, label, shipment, etc.

merged_shipment_idsSeId[]

The shipments that were merged in. These shipments have been deleted.

Example response

{
  "shipment_id": "se-28529731",
  "merged_shipment_ids": [
    "se-202902301",
    "se-202902302"
  ]
}

Changes