Skip to main content

Overview

The Store Exploration API provides comprehensive store discovery functionality including paginated browsing, location-based search, category filtering, and text search. This system powers the main store discovery experience for customers. Location: convex/customers/explore.ts

Get Stores with Pagination

Retrieve stores with pagination and optional category filtering, perfect for infinite scroll implementations.
paginationOpts
PaginationOptions
required
Pagination configuration with numItems and cursor
categoryId
Id<'categories'>
Optional category filter to show only stores in specific category

Get Nearby Stores

Find stores within a specified radius of given coordinates with distance calculation.
userLatitude
number
required
User’s latitude coordinate (GPS)
userLongitude
number
required
User’s longitude coordinate (GPS)
radiusKm
number
Search radius in kilometers (default: platform config default)
categoryId
Id<'categories'>
Optional category filter
limit
number
Maximum number of stores to return (default: 20)

Get Store by ID

Get a specific store by ID for customer viewing. Returns store details with follow status if a customer ID is provided.
storeId
Id<'stores'>
required
Store ID to retrieve
customerId
Id<'customers'>
Optional customer ID to check follow status

Store Discovery Components

Complete store exploration interface:

Location-based Features

GPS Discovery

Find stores near user’s current location with distance calculation and radius filtering

Area-based Search

Browse stores by specific UAE cities and areas for targeted discovery

Delivery Radius

Show only stores that deliver to user’s location based on delivery zones

Real-time Distance

Calculate and display real-time distances from user’s location to stores

Store Filtering Options

Advanced filtering capabilities:

Error Handling

Status Code: 400
Status Code: 200 (Success with empty results)
Status Code: 503
Store exploration results are real-time and automatically update when stores change their status, add new products, or update their information.
Use location-based search to provide personalized store recommendations and improve the customer discovery experience.