Set shipping address
set_shipping_addressSets the delivery address for the current cart's checkout so order preview and preparation can use it. Requires at least one cart item and replaces any previously saved address.
Instructions
Set the delivery address for the current cart's checkout; get_order_preview and prepare_order use it. Needs at least one item in the cart and replaces any address set before. For a returning buyer, offer get_saved_addresses first and pass the chosen one here. The phone is normalized to international form; if that fails the result carries a warning — ask the human for the number with its country code, since the courier calls it. Only the required fields and the phone are checked; the street itself is not verified. Missing fields or an empty cart return an error and save nothing. The country can switch the order to local currency (UZS for Uzbekistan).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| zip | No | Postal / ZIP code; omit where the country has none. | |
| city | Yes | Destination city. | |
| name | Yes | Recipient full name. | |
| phone | Yes | Recipient phone, ideally with country code, e.g. +61 412 462 423. | |
| address | Yes | Street, house and apartment in one line. | |
| country | Yes | Destination country: name or 2-letter code, e.g. 'Australia' or 'AU'. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| error | No | Missing fields or empty cart. | |
| warning | No | Phone could not be put in international form — ask the human for it with the country code. | |
| shipping | No | Saved address snapshot. |