add_to_cart
Add a product to a Yandex Lavka cart without charging, incrementing quantity if it is already there. Check cart warnings and remove unavailable items before checkout.
Instructions
Add a product to the cart (increments if already present). No charge.
product_id is the id from a search result. Pass price from the same
search result when available (Lavka validates it on cart writes).
IMPORTANT: search can return items that are only stocked in «Большая Лавка»
(a different store) — they add fine but can't be ordered from the current
one. After adding, check the returned cart's warning and each item's
unavailable_on_depot; drop any flagged item with update_cart_item(id, 0).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| price | No | ||
| quantity | No | ||
| product_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||