Cart

cart_add

Add one item to an open cart.

View as Markdown

One call per item. Restaurant dishes with required choices (size, sides) need the buyer's picks.

TypeWrite: changes a cart or an order
Needs a cart the buyer approvedNo
Moves moneyNo
Tool description (what the assistant sees)
Adds one shop offer to an open cart. One cart holds one shop; restricted categories and quantities above available stock are refused. Restaurant items with required options need modifiers, and the error lists the available choices. Nothing is reserved or charged.

#Parameters

NameTypeRequiredDescription
cart_iduuidYesThe cart.
product_iduuidYesThe offer, from a search result.
qtyintegerNoHow many, 1 to 99. Left out: 1.
weight_lbnumberNoFor items sold by weight (sold_by: weight in search results): how many pounds, in 0.25 lb steps. Left out: ask by count with qty.
modifiersobject[]NoMenu options for restaurant items, listed under modifier_groups in search results. One entry per group: group_id and the option_ids the buyer picked. Every required group needs an answer.
notestringNoRestaurant items only: the buyer's short note for this item, such as "No onions". At most 140 characters.
substitution_policystringNonever_substitute, ask_first or auto_similar.

#Notes

  • A required option group left out comes back as MISSING_FIELD on modifiers, with the groups and their choices. Ask the buyer; never send the example call as it is.
  • Adding an item clears any approval the cart already had.