The Ocha API uses query parameters for pagination and filtering across listing endpoints. All paginated responses share a consistent shape —Documentation Index
Fetch the complete documentation index at: https://mintlify.com/floriansalvi/HEIG-VD_Ocha-api/llms.txt
Use this file to discover all available pages before exploring further.
page, totalPages, a total-count field, and an array of items — making it straightforward to build paginated UIs or iterate through results programmatically.
Pagination
Pagination is supported onGET /api/v1/products, GET /api/v1/stores, and GET /api/v1/users/orders. Two query parameters control it:
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number to retrieve |
limit | integer | 10 | Number of items returned per page |
Paginated response shape
All paginated listing endpoints return the same envelope structure:totalStores; for orders it is totalOrders.
Example: paginate products
Example: paginate stores
Example: paginate the authenticated user’s orders
Filtering products by active status
Pass?active=true to restrict the product listing to active products only. The filter maps to the isActive field on the product document.
Only
active=true has an effect. Omitting the parameter — or passing active=false — returns all products regardless of their active status.Geolocation store search
GET /api/v1/stores accepts a near parameter to return stores sorted by proximity to a given coordinate. When near is present, pagination parameters are ignored and the response contains all matching stores up to the specified radius.
| Parameter | Type | Default | Description |
|---|---|---|---|
near | string | — | Coordinates in lng,lat format (e.g. 6.93,46.99) |
radius | integer | 10000 | Maximum distance in meters from the target point |
Geolocation queries do not return
page or totalPages in the response — only totalStores and the stores array.Combining parameters
You can combine theactive filter with page and limit on the products endpoint:
Next steps
Products API
Full reference for the products listing endpoint and its query parameters.
Stores API
Full reference for the stores listing endpoint including geolocation search.
User orders
Reference for the authenticated user’s paginated order history.
Roles and permissions
Understand which endpoints require authentication or admin access.