Cart

cart_set_shipping

Set the delivery address and shipping option for a cart from a shop that ships.

View as Markdown

Only for shops that ship. It returns the shipping options for the address with their fees and latest delivery dates.

TypeWrite: changes a cart or an order
Needs a cart the buyer approvedNo
Moves moneyNo
Tool description (what the assistant sees)
Sets where a cart from a shop that ships goes: a delivery address (or saved_home: true), the recipient, and the shipping option. Returns the options for that address with their fees and latest delivery dates, the selected one, and the items, shipping, tax and total. option_code pickup picks collecting at the shop where the shop allows it, with no address. PO boxes, military addresses, states the shop does not ship to and addresses outside the US are refused with the field to fix. Any change clears the buyer's approval of the cart. Nothing is reserved or charged.

#Parameters

NameTypeRequiredDescription
cart_iduuidYesThe cart.
addressobjectNoWhere the shop ships the order: line1, city, state and zip, with an optional line2. Leave out with saved_home: true, or to change only the option on a cart that already has an address.
saved_homebooleanNotrue ships to the buyer's saved home address. Do not send address with it.
recipientobjectNoWho receives the order: name and phone. Leave out when it is the buyer; their name and verified phone are used.
option_codestringNostandard, express, same_day or pickup. Left out: the cheapest option for this address. pickup means the buyer collects at the shop, only where the shop allows it, and needs no address.

#What to call next

Tell the buyer the shipping fee and the latest delivery date, then cart_approve.