> ## Documentation Index
> Fetch the complete documentation index at: https://developers.firmly.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Multi-Shipment Structure

> Understanding shipments in the Full Cart API

## Overview

The Full Cart API organizes items into shipments, providing a standardized structure for complex fulfillment scenarios across all e-commerce platforms. This powerful feature enables sophisticated checkout experiences with multiple delivery options.

<Info>
  Shipments reflect the merchant's fulfillment structure, standardized through Firmly's API for consistent integration across platforms.
</Info>

## What are Shipments?

Shipments represent groups of items that fulfill together. Common shipment scenarios include:

* Items from different warehouse locations
* Products from multiple vendors
* Mixed fulfillment types (shipping, pickup, scheduled delivery)
* Items with different delivery requirements

## Cart Structure with Shipments

```json theme={null}
{
  "cart_id": "cart_123",
  "line_items": [
    { "line_item_id": "item_1", "sku": "WIDGET-001", "quantity": 1 },
    { "line_item_id": "item_2", "sku": "GADGET-002", "quantity": 2 }
  ],
  "shipments": [
    {
      "shipment_id": "ship_abc",
      "line_item_ids": ["item_1", "item_2"],
      "fulfillment_type": {
        "id": "SHIP_TO_ADDRESS",
        "name": "Ship to Address"
      },
      "shipping_method_options": [...],
      "shipping_method": {...}
    }
  ]
}
```

## Key Concepts

### Line Item Assignment

The `line_item_ids` array maps items to their respective shipments:

```mermaid theme={null}
graph LR
    subgraph "Cart Items"
        I1[Sofa - item_1]
        I2[Pillow - item_2]
        I3[Table - item_3]
    end
    
    subgraph "Shipments"
        S1[Shipment 1<br/>Standard Delivery]
        S2[Shipment 2<br/>Scheduled Delivery]
    end
    
    I1 --> S2
    I2 --> S1
    I3 --> S2
```

### Fulfillment Types

Each shipment can support different fulfillment methods:

* **SHIP\_TO\_ADDRESS** - Standard shipping to customer address
* **SCHEDULED\_DELIVERY** - Delivery with appointment selection
* **PICKUP\_IN\_STORE** - Customer pickup at store location

### Shipping Methods

Each shipment provides its own shipping options:

```json theme={null}
{
  "shipment_id": "ship_123",
  "shipping_method_options": [
    {
      "id": "standard",
      "description": "Standard Ground (5-7 days)",
      "price": { "value": 9.99 }
    },
    {
      "id": "express",
      "description": "Express (2 days)",
      "price": { "value": 29.99 }
    }
  ]
}
```

## API Operations

The Full Cart API provides shipment-related operations:

* **[Get Cart](/api-reference/cart-management/get-cart)** - Retrieve current shipment structure
* **[Set Fulfillment Type](/api-reference/shipment-configuration/set-fulfillment-type)** - Change delivery method
* **[Set Shipping Method](/api-reference/shipment-configuration/set-shipping-method)** - Select shipping option
* **[Get Availability](/api-reference/shipment-configuration/get-availability)** - Check delivery windows

## Next Steps

* [Cart Lifecycle](/concepts/cart-lifecycle) - Understanding cart states
* [Shipment Configuration](/api-reference/shipment-configuration/overview) - API endpoints for shipments
* [Choosing Your API](/guides/choosing-your-api) - When to use Full Cart API
