Type-ahead suggestions
Suggestions for a partial query, for a search box that completes as the shopper types.
Suggestions are drawn from what the store actually sells — product names, brands, and the
merchant’s own subcategories — so there is no keyword list to configure and nothing that can
drift from the catalogue. Each suggestion carries a kind (product, brand, or
subcategory) so a storefront can group or badge them, and a score for ordering.
Prefixes match first, with similarity as a fallback, so a suggestion still appears when the first characters are already mistyped.
Auth: accepts a publishable (tybrite_pk_*) key, so it is safe to call from client-side
storefront code on every keystroke. Requires a store-scoped key — marketplace operator keys
are rejected.
Fewer than two characters returns an empty suggestions array with a 200, not an
error: a shopper mid-word has not done anything wrong.
Authorizations
API Key Authentication
Use your API key in the Authorization header:
Key Types:
Secret Keys (Server-Side Only):
- Format:
tybrite_sk_live_*(production) ortybrite_sk_test_*(sandbox) - Full read/write access to all endpoints
- ⚠️ NEVER expose in client-side code or public repositories
- Required for: write operations, authentication, payment verification, AI recommendations
Publishable Keys (Client-Safe):
- Format:
tybrite_pk_live_*(production) ortybrite_pk_test_*(sandbox) - Read-only access (GET requests only, plus POST semantic search)
- ✅ Safe for client-side JavaScript, mobile apps, and public code
- Allowed for: browsing products, search, CMS content, pricing queries
Endpoint-Specific Requirements:
- Authentication endpoints (
/v1/auth/*): Secret key required - Payment verification (
POST /v1/payments/verify): Secret key required - AI Recommendations (
POST /v1/recommendations): Secret key required - Semantic Search (
POST /v1/search): Both key types allowed (read-only operation) - All write operations: Secret key required
- All read operations: Both key types allowed
Using a publishable key for restricted operations returns 403 Forbidden.
Query Parameters
The partial query typed so far. Either q or prefix is required.
Alternative spelling of q; use whichever reads better in your client.
Maximum suggestions to return.
1 <= x <= 20
