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

# Set Shipping Method

> Sets the shipping method for the order

## Overview

Sets the shipping method for the cart. You must set shipping information first to get available shipping methods.

## Authentication

> [card]
>
> **x-firmly-authorization** `string` *required*
>
> Device authentication token from browser session

## Path Parameters

**domain** `string` *required*

Merchant domain (e.g., `staging.luma.gift`)

## Request Body

**shipping\_method** `string` *required*

Shipping method SKU from available options (e.g., `standard_ground`)

## Response

Returns the cart with the selected shipping method and updated pricing.

### Response Fields

Same as [Get Cart](https://firmly.mintlify.site/api-reference/simple-cart-api/cart/get-cart.md#response-fields) response, with the selected shipping method reflected in pricing.

```bash cURL theme={null}
curl --request POST \
  --url https://api.firmly.work/api/v1/domains/staging.luma.gift/cart/shipping-method \
  --header 'x-firmly-authorization: YOUR_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{"shipping_method": "express_2day"}'
```

```javascript JavaScript theme={null}
const response = await fetch('https://api.firmly.work/api/v1/domains/staging.luma.gift/cart/shipping-method', {
  method: 'POST',
  headers: {
    'x-firmly-authorization': 'YOUR_TOKEN',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    shipping_method: 'express_2day'
  })
});

const cart = await response.json();
```

```python Python theme={null}
import requests

response = requests.post(
    'https://api.firmly.work/api/v1/domains/staging.luma.gift/cart/shipping-method',
    headers={
        'x-firmly-authorization': 'YOUR_TOKEN',
        'Content-Type': 'application/json'
    },
    json={
        'shipping_method': 'express_2day'
    }
)

cart = response.json()
```

```json Success Response theme={null}
{
  "cart_id": "1e43868c-d4a5-418c-bd6b-5fff043550d2",
  "platform_id": "example",
  "shop_id": "staging.luma.gift",
  "display_name": "Luma Store",
  "line_items": [
    {
      "line_item_id": "1ee530e1-063d-4e07-afb2-e7e65245977e",
      "sku": "WS12-XS-Orange",
      "quantity": 1,
      "description": "Radiant Tee - Orange XS",
      "price": {
        "currency": "USD",
        "value": 22.00,
        "symbol": "$",
        "number": 2200
      },
      "line_price": {
        "currency": "USD",
        "value": 22.00,
        "symbol": "$",
        "number": 2200
      }
    }
  ],
  "shipping_info": {
    "first_name": "John",
    "last_name": "Smith",
    "email": "john@staging.luma.gift",
    "address1": "123 Main St",
    "city": "Seattle",
    "postal_code": "98101",
    "state_or_province": "Washington",
    "country": "United States"
  },
  "shipping_method": {
    "sku": "express_2day",
    "description": "Express 2-Day",
    "price": {
      "currency": "USD",
      "value": 19.99,
      "symbol": "$",
      "number": 1999
    }
  },
  "sub_total": {
    "currency": "USD",
    "value": 869.99,
    "symbol": "$",
    "number": 86999
  },
  "shipping_total": {
    "currency": "USD",
    "value": 19.99,
    "symbol": "$",
    "number": 1999
  },
  "tax": {
    "currency": "USD",
    "value": 4.40,
    "symbol": "$",
    "number": 440
  },
  "fees": [
    {
      "description": "Recycle fee",
      "currency": "USD",
      "value": 2.00,
      "symbol": "$",
      "number": 200
    }
  ],
  "fee_total": {
    "currency": "USD",
    "value": 2.00,
    "symbol": "$",
    "number": 200
  },
  "total": {
    "currency": "USD",
    "value": 48.39,
    "symbol": "$",
    "number": 4839
  }
}
```

## Error Responses

### 400 Bad Request

* Missing or invalid authentication header
* Invalid shipping method

### 404 Not Found

Cart not found

### 412 Precondition Failed

* Shipping information must be set first
* Cart must have at least one item


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