# Split a shipment

Products
            Plans
          
        
        
          
            
              
              Formerly ShipEngine
            
            
              Free
              Advanced
              Enterprise
            
          
          
            
              
            
            
              Free
              Starter
              Standard
              Premium
            
          
        
      
      
        
          Learn about products and plans
          
        
      
    

Move items from a shipment into one or more new shipments. Each entry in shipments creates one new
shipment holding the items and quantities listed for it. Items and quantities that you don't list
stay on the original shipment.

Each new shipment is based on the original shipment and stays linked to the same sales order, so
the order source keeps getting shipment notifications after the split.

To split a shipment:

- It must have a shipment_status of pending, awaiting_payment, or on_hold.
- It must be linked to a sales order. Check sales_order_ids on the shipment.
- It can't come from a marketplace that supplies its own shipping labels.
- All of the items you move must belong to the same sales order. To move items from more than one
  sales order, make one request for each sales order.
- At least one item must stay on the original shipment.

Get the item_id values from the items array of the shipment, using
Get shipment by id.

Endpoint: POST /v2/shipments/{shipment_id}/split
Version: 2.0.0
Security: api_keys

## Path parameters:

  - `shipment_id` (string, required)
    Shipment ID
    Example: "se-28529731"

## Request fields (application/json):

  - `shipments` (array, required)
    The new shipments to create. Each entry creates one new shipment that holds the listed items.
Items and quantities that you don't list stay on the original shipment.

  - `shipments.items` (array, required)
    The items to move from the original shipment into this new shipment

  - `shipments.items.item_id` (string, required)
    The item_id of an item on the original shipment, from the items array returned by
[Get shipment by id](#operation/get_shipment_by_id). Each item can be listed only once
in the same new shipment.
    Example: "1402291169813"

  - `shipments.items.quantity` (integer, required)
    The number of units of the item to move into the new shipment. Across all new
shipments, the total for an item can't be more than the quantity on the original shipment.
    Example: 1

## Response 200 fields (application/json):

  - `shipment_id` (string)
    The original shipment, which keeps the items that weren't moved
    Example: "se-28529731"

  - `new_shipment_ids` (array)
    The new shipments, in the same order as the shipments array in the request
    Example: ["se-202902301"]

## Response 400 fields (application/json):

  - `request_id` (string, required)
    A UUID that uniquely identifies the request id.
This can be given to the support team to help debug non-trivial issues that may occur
    Example: "aa3d8e8e-462b-4476-9618-72db7f7b7009"

  - `errors` (array, required)
    The errors associated with the failed API call

  - `errors.error_source` (string, required)
    The source of the error, as indicated by the name this informs us if the API call failed because of the
carrier, the order source, the ShipStation API itself, or the underlying ShipEngine platform.
    Enum: "carrier", "order_source", "ShipStation", "shipengine"

  - `errors.error_type` (string, required)
    The type of error
    Enum: "account_status", "business_rules", "validation", "security", "system", "integrations", "funding_sources"

  - `errors.error_code` (string, required)
    The error code specified for the failed API Call
    Enum: "auto_fund_not_supported", "batch_cannot_be_modified", "bring_your_own_label_not_supported", "carrier_conflict", "carrier_disconnected", "carrier_not_connected", "carrier_not_supported", "confirmation_not_supported", "default_warehouse_cannot_be_deleted", "field_conflict", "field_value_required", "forbidden", "identifier_conflict", "identifiers_must_match", "insufficient_funds", "invalid_address", "invalid_billing_plan", "invalid_field_value", "invalid_identifier", "invalid_status", "invalid_string_length", "label_images_not_supported", "meter_failure", "multiple_sales_orders", "order_source_not_active", "rate_limit_exceeded", "refresh_not_supported", "request_body_required", "return_label_not_supported", "sales_order_link_required", "settings_not_supported", "subscription_inactive", "terms_not_accepted", "tracking_not_supported", "trial_expired", "unauthorized", "unknown", "unspecified", "verification_failure", "warehouse_conflict", "webhook_event_type_conflict", "customs_items_required", "incompatible_paired_labels", "invalid_charge_event", "invalid_object", "no_rates_returned", "freight_connection_inactive", "freight_provider_id_required", "freight_shipment_not_found", "freight_tracking_not_available", "freight_tracking_not_found", "freight_shipment_not_batchable", "freight_provider_already_connected", "funding_source_missing_configuration"

  - `errors.message` (string, required)
    An error message associated with the failed API call
    Example: "Body of request cannot be null."

  - `errors.field_name` (string)
    The name of the field that caused the error (only present for validation errors)
    Example: "inventory_warehouse_id"

  - `errors.field_value` (string)
    The invalid value that was provided for the field (only present for validation errors)
    Example: "invalid-id"


