Better Lavka
v0.15.0Order groceries from Yandex Lavka Uzbekistan: search, shopping lists, repeat orders.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
use_address
Choose the delivery address by its saved name ("Дом", "home"), part of the street, or its number in get_account. Remembered; search, cart and ordering then use it.
| Parameter | Type | Description |
|---|---|---|
address * | string |
get_account
Who is signed in, saved addresses (chosen one marked) and saved cards (remembered one marked).
list_order_history
Orders, newest first, with items and total; orders still in progress show their live status (minutes left, courier distance). Next page: older_than=next_older_than. limit 1–21.
| Parameter | Type | Description |
|---|---|---|
limit | integer | |
older_than |
get_order
One order in full: items, fees, total, payment status (3-D Secure link if the bank asks) and live status.
| Parameter | Type | Description |
|---|---|---|
order_id * | string |
get_cart
The cart: items, prices, delivery, total, Plus points; lines the depot can't fill come with Lavka's replacements.
| Parameter | Type | Description |
|---|---|---|
latitude | ||
longitude |
set_cart_quantity
Set one product to an exact quantity (0 removes it). Returns the cart.
| Parameter | Type | Description |
|---|---|---|
product_id * | string | |
quantity * | integer | |
latitude | ||
longitude |
add_to_cart
Add a list in one call: items like {"query": "молоко 2.5%", "quantity": 2} or {"product_id": "…"}. A query takes what the user bought before or the only match; otherwise needs_choice lists options — ask, then add by product_id.
| Parameter | Type | Description |
|---|---|---|
items * | array | |
latitude | ||
longitude |
repeat_order
Put a past order back into the cart (order_id, or "last") at today's prices; sold-out items are listed with replacements.
| Parameter | Type | Description |
|---|---|---|
latitude | ||
longitude | ||
order_id | string |
get_product
Product card: price, pack, stock, description, nutrition per 100 g, ingredients, shelf life.
| Parameter | Type | Description |
|---|---|---|
product_id * | string | |
latitude | ||
longitude |
list_categories
The catalog: groups and categories with category_id.
| Parameter | Type | Description |
|---|---|---|
latitude | ||
longitude |
get_category_products
Products of one category, by shelf; subcategory narrows to one shelf. limit 1–100.
| Parameter | Type | Description |
|---|---|---|
category_id * | string | |
latitude | ||
limit | integer | |
longitude | ||
subcategory |
preview_order
Show the order before paying: address, items, card, total; submit_order places exactly this preview within 5 minutes. Uses the chosen address and remembered card. spend_plus_points=true pays part with Plus points; promo_code applies one of the user's codes (the preview lists them). Charges nothing.
| Parameter | Type | Description |
|---|---|---|
card_last4 | ||
promo_code | ||
saved_address_index | ||
spend_plus_points |
submit_order
Charges money. Places the latest preview_order on this connection (normally this chat). Only after the user agreed: confirmed_total_uzs = the preview's exact total, explicit_confirmation=true. Sent once; returns the payment status (3-D Secure link if needed). Any attempt uses up the preview.
| Parameter | Type | Description |
|---|---|---|
confirmed_total_uzs * | string | |
explicit_confirmation * | boolean |
reconcile_order_attempt
Only after a checkout ended with an unknown result: record that order history and payment were checked, nothing is in flight and duplicate risk is accepted, to unblock checkout. Places nothing.
| Parameter | Type | Description |
|---|---|---|
accepts_duplicate_risk * | boolean | |
checked_order_history * | boolean | |
checked_payment * | boolean | |
explicit_confirmation * | boolean | |
no_request_in_progress * | boolean |
cancel_order
Cancel an order, once, with explicit_confirmation=true after the user agreed. Refund timing is up to the bank.
| Parameter | Type | Description |
|---|---|---|
explicit_confirmation * | boolean | |
order_id * | string |
get_storefront_status
Start here: is Lavka open, delivery time, sign-in, chosen address, cart and latest order.
| Parameter | Type | Description |
|---|---|---|
country |
search_products
Find products with price, discount and stock; favorites and ones bought before are marked. Empty query = the user's favorites and usual buys. RU/KZ: pass country and coordinates. limit 1–50.
| Parameter | Type | Description |
|---|---|---|
country | ||
latitude | ||
limit | integer | |
longitude | ||
query | string |
search_addresses
Find an address by text ("Amir Temur 1"); returns coordinates usable as longitude, latitude in search and cart tools.
| Parameter | Type | Description |
|---|---|---|
query * | string |
login
Sign in with a QR code: the first call returns a QR and a phone link (login keys: show only to the user); call again until the scan is confirmed. replace_existing_session=true switches accounts (needs approval); cancel=true stops a pending login.
| Parameter | Type | Description |
|---|---|---|
cancel | boolean | |
replace_existing_session | boolean |