Add Shipping Method

POST/store/:storeCode/carts/:cartId/shipping-methods
publishable key

Add a shipping method to a cart.

Path Parameters
storeCoderequiredstring

Store slug in the URL (first argument to every SDK store method).

cartIdrequiredstring

The cart's ID.

Query Parameters
fieldsstring

Comma-separated fields to include. Prefix with `*` to expand a relation (e.g. `id,*variants`).

Request Body

Schema

Copy
HttpTypes.StoreAddCartShippingMethods

Properties

option_idrequiredstring

Shipping option ID.

dataRecord<string, unknown>

Provider-specific data.

Response

Status

200OK

Schema

Copy
HttpTypes.StoreCartResponse

Properties

cartrequiredStoreCart

The cart with shipping method.