The get orders endpoint returns a paginated collection of all orders associated with the authenticated user. Results are scoped exclusively to the requesting user — no cross-user data is exposed. Use theDocumentation 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 and limit query parameters to control the size and offset of the result set. The response includes pagination metadata alongside the orders array.
This endpoint requires a valid JWT token. Include it as
Authorization: Bearer <token> in the request headers. Requests without a valid token are rejected with 401 Unauthorized.GET Path: /api/v1/users/orders
Query parameters
The page number to retrieve. Starts at
1. Defaults to 1 if omitted.The number of orders to return per page. Defaults to
10 if omitted.Filter orders by status. Accepted values:
"en préparation", "prête", "récupérée". Omit to return all statuses.Filter orders by store. Pass a MongoDB ObjectId to return only orders placed at that store.
Response — 200 OK
The current page number returned in this response.
The total number of pages available given the current
limit.The total number of orders belonging to the authenticated user across all pages.
An array of order objects for the current page. The array is empty when no orders exist or the requested page exceeds the total.
Error codes
| Status | Meaning | Cause |
|---|---|---|
401 Unauthorized | Missing or invalid token | No Authorization header was sent, or the token is expired or malformed |