Okala
v0.4.2Unofficial read-only Okala: grocery stores that deliver to you, compare prices across stores.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
ok_login Log in to Okala (sends an SMS code)
Log in to the user's Okala account, unlocking real text search in ok_search. Optional. Only when the user asked to log in and gave THEIR OWN phone number. Sends an SMS code (at most one every 2 minutes). With a form the user types the code there; otherwise the reply says `code_sent`: ask for the code and call ok_login_verify.
| Parameter | Type | Description |
|---|---|---|
phone * | string | The user's Iranian mobile number, e.g. '09121234567'. |
ok_login_verify Finish the Okala login
Finish a login started with ok_login with the SMS code. Saves the login on this machine.
| Parameter | Type | Description |
|---|---|---|
code * | string | The SMS code. |
phone * | string | The user's Iranian mobile number, e.g. '09121234567'. |
ok_account Okala login status
Whether the server is logged in to Okala (phone masked); guest = category-only ok_search.
ok_logout Log out of Okala
Delete the saved Okala login on this machine; the server continues as a guest.
ok_locate Find a delivery address
Turn an address into coordinates (lat, lon) for every other tool, plus the street address of the best hit. Use first; pass the chosen candidate's lat / lon on. Candidates can mix similar names: check `description`.
| Parameter | Type | Description |
|---|---|---|
address * | string | Persian address or place, e.g. 'میدان ونک'. |
city | string | Persian city name, e.g. 'مشهد'. |
ok_stores Stores that deliver to a point
Okala stores that deliver to a point, in the site's order: id, type, rating, distance, earliest slot and per-order fees (service, packaging, delivery; Toman). Use after ok_locate. `count` = matches before `limit`.
| Parameter | Type | Description |
|---|---|---|
lat * | number | Latitude from ok_locate. |
lon * | number | Longitude from ok_locate. |
limit | integer | Max stores. |
open_only | boolean | Skip closed stores. |
store_type | string | null | Only this kind (ChainStore = Ofogh, HyperFamily). |
ok_store Store details and delivery slots
One store as seen from the delivery point: whether it delivers there now, minimum order (Toman), rating, distance, location, earliest slot and open delivery slots of the next days (Tehran time). Use before recommending a store: the basket must reach `minimum_order`.
| Parameter | Type | Description |
|---|---|---|
lat * | number | Latitude from ok_locate. |
lon * | number | Longitude from ok_locate. |
store_id * | integer | Store id from ok_stores. |
all_slots | boolean | Include full slots, with an available flag. |
ok_store_reviews Store reviews
Read customers' reviews of a store: 1-5 stars, comment, date and the reasons they ticked. Use as a quality check; LowestRate shows complaints first.
| Parameter | Type | Description |
|---|---|---|
store_id * | integer | Store id from ok_stores. |
full_text | boolean | Whole comments (else cut at 400 chars). |
page | integer | From 1. |
page_size | integer | Per page. |
sort | string | Order: newest or by star rating. |
ok_categories Category tree
Category tree (id, slug, Persian name, children) of everything sold near a point, or in one store. Use to find a slug for ok_compare / ok_store_products. Level-1 slugs ('dairy-products') work in ok_store_products.
| Parameter | Type | Description |
|---|---|---|
depth | integer | Levels: 1 departments, 2 + sub-categories, 3 all. |
lat | number | null | Latitude from ok_locate. |
lon | number | null | Longitude from ok_locate. |
store_id | integer | null | One store instead of a point. |
ok_search Search products near a point
Find products by text near a point (or in one store with store_id), best matches first, then cheapest (Toman). `mode`: "text" = Okala's own search (logged in; up to 12 per store); "category" = guest fallback matching the query to category names (a brand name may find nothing: pick a slug from ok_categories; in one store use ok_store_products with name_contains). Use for "how much is X near me", then ok_compare or ok_product.
| Parameter | Type | Description |
|---|---|---|
query * | string | What to buy, in Persian, e.g. 'شیر کم چرب'. |
lat | number | null | Latitude from ok_locate. |
limit | integer | Max products. |
lon | number | null | Longitude from ok_locate. |
store_id | integer | null | Search this store only (needs login). |
ok_compare Compare prices across stores
Which open nearby store sells the same product cheapest: a category and/or brand, grouped by product id, each store's price cheapest first; products sold by most stores come first. `stores` has distance, earliest slot and fees. At most 12 products per store: narrow with a deeper slug or brand_id.
| Parameter | Type | Description |
|---|---|---|
lat * | number | Latitude from ok_locate. |
lon * | number | Longitude from ok_locate. |
brand_id | integer | null | Brand id from ok_brands / ok_search; with a slug = that brand in the category. |
category_slug | string | null | Category slug from ok_search / ok_categories. |
in_stock_only | boolean | Only orderable products. |
limit | integer | Max products. |
ok_store_products Products of one store
A whole category of one store, sorted and optionally filtered by name, prices in Toman. `total` counts matches before limit / offset. To search inside one store: a level-1 department slug (ok_categories with store_id) plus name_contains.
| Parameter | Type | Description |
|---|---|---|
category_slug * | string | Category slug from ok_categories / ok_search, e.g. 'milk'. |
store_id * | integer | Store id from ok_stores. |
in_stock_only | boolean | Only orderable products. |
limit | integer | Max products. |
name_contains | string | null | Name must contain every word, e.g. 'کم چرب'. |
offset | integer | Skip this many matches. |
sort | string | Price to pay, biggest % off, or the site ranking. |
ok_product Product details in a store
One product in one store: price and discount (Toman), stock, max per order, brand, category, images and description. `sold_here: false` = this store does not sell it (try ok_compare).
| Parameter | Type | Description |
|---|---|---|
product_id * | integer | Product id from any list. |
store_id * | integer | Store id from ok_stores. |
full_text | boolean | Whole description (else cut at 600 chars). |
ok_brands Find brands
Brand ids for ok_compare (`brand_id`) and slugs. Only featured brands are listed; any other is looked up by its Latin slug (okala.com/brands/<slug>, or ok_product's brand_slug).
| Parameter | Type | Description |
|---|---|---|
name | string | null | Brand name (Persian or Latin) or slug, e.g. 'کاله', 'kalleh'. |
ok_deals Current deals
Deal rows running now, with end time (UTC) and top products (Toman). Without store_id: home-page rows across open stores near the point. With store_id: that store's rows plus its biggest discounts. Open a row with ok_offer.
| Parameter | Type | Description |
|---|---|---|
lat * | number | Latitude from ok_locate. |
lon * | number | Longitude from ok_locate. |
per_row | integer | Products per row. |
store_id | integer | null | Store id from ok_stores. |
ok_offer One deal row in full
Every product of one deal row (from ok_deals), Toman. Without store_id: all open stores near the point, with each store's product count and price range; with store_id: that store only.
| Parameter | Type | Description |
|---|---|---|
carousel_id * | integer | carousel_id from ok_deals. |
lat * | number | Latitude from ok_locate. |
lon * | number | Longitude from ok_locate. |
page | integer | From 1 (20 per page). |
sort | string | Row order, price to pay, or biggest % off. |
store_id | integer | null | Store id from ok_stores. |