Set shipping method
set_shipping_methodSelect the shipping method for your cart's checkout using an option ID from get_shipping_options. Requires at least one item; unknown IDs return an error.
Instructions
Select the shipping method for the current cart's checkout by an id from get_shipping_options. Only 'worldwide' exists today and it is already the default, so this call is optional — use it when the human explicitly picks a method, or once more methods appear. Needs at least one item in the cart; an unknown option_id returns an error and changes nothing. Repeating it is harmless.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| option_id | No | Shipping option id from get_shipping_options (currently 'worldwide'). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| error | No | Unknown option_id or empty cart. | |
| shipping_method | No |