loki_search_hubs
Find a logistics hub's ID by name or code. Supports filtering by type, business client, and status for accurate identification of pharmacy or diagnostics hubs.
Instructions
Search logistics hubs. Use this first to find a hub's id (a Mongo ObjectId string) when you only know its name/code -- order and task search require hub_id.
Note on hub kinds: pharmacy delivery hubs are business_client="pharmacy" (types like RETAIL); diagnostics phlebo centers (PACs) are business_client="droplet", type="PAC". A "Sec-14 Gurgaon PAC" is therefore a droplet/PAC hub, not the same as the "sec_14_ggn_retail" pharmacy hub.
IMPORTANT: the server DEFAULTS business_client to "pharmacy" when it is
omitted, so a search for a diagnostics/phlebo hub returns nothing unless you
pass business_client="droplet". query is a substring match over both name
AND code, so short numeric queries (e.g. "14") also match hub codes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | 1-based page number. | |
| query | No | Substring match on hub name OR code (sent as `name_code_query`). | |
| status | No | e.g. "active". | |
| compact | No | If True (default) return only key fields per hub (id, name, code, type, status, business_client, city, lat/long). Set False for the full hub objects (large -- may overflow on big pages). | |
| hub_type | No | Hub type filter, e.g. "PAC", "RETAIL". | |
| per_page | No | Page size (default 20). | |
| extra_filters | No | Any additional raw filter fields to merge into the payload (e.g. {"name": "...", "code": "...", "vendor_code": "..."}). | |
| business_client | No | e.g. "pharmacy", "droplet". |