Merge Fulfillment Orders

Combines line items from one fulfillment order into another.

Use Cases

  • Consolidating shipments to reduce shipping costs
  • Combining split orders when inventory becomes available at one location
  • Optimizing fulfillment operations

Merge Process

Specify:

  • Source: The fulfillment order (with specific line items) to merge from
  • Destination: The fulfillment order to merge into

After merging:

  • Source line items are moved to the destination fulfillment order
  • If all items are moved, the source fulfillment order is removed
  • Order status is recalculated
  • Webhooks are triggered

Restrictions

Both source and destination fulfillment orders:

  • ❌ Cannot have any fulfilled line items (only pending items can be merged)
  • ✅ Must have the same location_id
  • ✅ Must have the same delivery_type (if specified)
  • ✅ Must have the same delivery method (from metadata)
  • ❌ Cannot mix items where some require shipping and some don't

Inventory Impact

No direct inventory changes occur during merge - items are simply reorganized between fulfillment orders.

SecurityOAuth2-Production or OAuth2-Demo
Request
path Parameters
orderReference
required
string

The order reference (order_id or partner_order_reference based on the key parameter).

query Parameters
key
string
Default: "order_id"

Specifies which reference type is being used for the order reference.

Enum: "order_id" "partner_order_reference"
header Parameters
x-api-key
required
string

Your Carriyo API key for authentication.

tenant-id
required
string

Your unique tenant identifier in Carriyo.

Content-Type
string
Default: application/json
Request Body schema: application/json
required
required
object

The fulfillment order to merge from.

required
object

The fulfillment order to merge into.

Responses
200

Fulfillment orders merged successfully.

400

Cannot merge fulfillment orders.

404

Order or fulfillment orders not found.

post/orders/{orderReference}/fulfillment-orders/merge
Request samples
application/json
{
  • "source": {
    },
  • "destination": {
    }
}
Response samples
application/json
{
  • "tenant": "string",
  • "order_id": "string",
  • "merchant": "string",
  • "partner_order_reference": "string",
  • "language": "string",
  • "order_date": "2019-08-24T14:15:22Z",
  • "sales_channel": "string",
  • "creation_source": {
    },
  • "update_source": {
    },
  • "carriyo_metadata": [
    ],
  • "status": "open",
  • "auto_allocation_failed": true,
  • "cancellation_reason": "CUSTOMER_CANCELLATION",
  • "shipping_address": {
    },
  • "billing_address": {
    },
  • "customer": {
    },
  • "payment": {
    },
  • "redacted": true,
  • "taxes_included": true,
  • "duties_included": true,
  • "discount_applications": [
    ],
  • "line_items": [
    ],
  • "fulfillment_orders": [
    ],
  • "shipping_lines": [
    ],
  • "error_details": [
    ],
  • "creation_date": "2019-08-24T14:15:22Z",
  • "update_date": "2019-08-24T14:15:22Z"
}