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

# Add Shipping Method

> Add a seller shipping option to the cart.

Adds the chosen shipping option to the cart through Mercur's seller-aware workflow, so each seller's items can carry their own shipping method.

## Path parameters

**id** `string` *required*

The cart's ID.

## Query parameters

**fields** `string`

Comma-separated fields and relations to include on the returned cart; prefix with `+`/`-` to add to or remove from the defaults.

## Body parameters

**option\_id** `string` *required*

ID of the shipping option to add.

**data** `object`

Provider-specific data forwarded to the fulfillment provider.

**additional\_data** `object`

Data passed to the workflow's hooks.

## Response

**cart** `object`

**properties**

**id** `string`

The cart's ID.

**currency\_code** `string`

The cart's currency.

**items** `object[]`

Line items in the cart.

**shipping\_methods** `object[]`

Shipping methods with `shipping_option_id`, `amount`, and tax lines.

**shipping\_total** `number`

Total shipping amount.

**total** `number`

Cart total including tax and shipping.

```bash cURL theme={null}
curl -X POST 'http://localhost:9000/store/carts/cart_01JB2KB1CD/shipping-methods' \
  -H 'Content-Type: application/json' \
  -H 'x-publishable-api-key: pk_01JB2K3XYZ' \
  -d '{"option_id": "so_01JB2KC4GH"}'
```

```ts JS Client theme={null}
const { cart } = await client.store.carts.$id.shippingMethods.mutate({
  $id: "cart_01JB2KB1CD",
  option_id: "so_01JB2KC4GH",
})
```

```json 200 theme={null}
{
  "cart": {
    "id": "cart_01JB2KB1CD",
    "currency_code": "eur",
    "items": [{ "id": "cali_01JB2KB3EF", "quantity": 1, "unit_price": 4500 }],
    "shipping_methods": [
      {
        "shipping_option_id": "so_01JB2KC4GH",
        "amount": 900,
        "is_tax_inclusive": false,
        "tax_lines": []
      }
    ],
    "shipping_total": 900,
    "total": 5400
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.