set_shipping_address
Set the cart shipping destination (collected from the buyer) and return available shipping options with costs. Call after items are in the cart and before select_shipping_option. country_code is required; include postal_code/state for accurate rates.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"site_id": "<site_id>",
"cart_id": "<cart_id>",
"country_code": "<country_code>"
},
"name": "set_shipping_address"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| city | No | City | |
| state | No | State/province/region code where carriers need it | |
| cart_id | Yes | Cart ID | |
| site_id | Yes | Registered site ID | |
| postal_code | No | Postal/ZIP code for accurate rates | |
| country_code | Yes | ISO-3166 alpha-2 country code (e.g. US) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| items | Yes | ||
| total | Yes | ||
| cartId | Yes | ||
| siteId | Yes | ||
| shipping | No | ||
| subtotal | Yes | ||
| shippingOptions | No | ||
| selectedShippingId | No |