Urban Store provides three read endpoints for orders. Each one callsDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ALEJ4NDRO2025/urban-store/llms.txt
Use this file to discover all available pages before exploring further.
check_and_cancel_expired_orders() before returning data, which scans for any pending orders whose expires_at has passed, cancels them, and restores their stock — so the data you receive is always up-to-date without requiring a separate background task.
GET /api/orders/my-orders/
Returns all orders belonging to the authenticated user, newest first.Authentication
Bearer token required. Returns401 if missing or invalid.
Response — 200 OK
An array of order objects (see full field reference below). Returns an empty array[] if the user has no orders.
Example
GET /api/orders/all/
Returns every order in the system, newest first. Restricted to admin users.Authentication
Bearer token required withis_admin: true in the JWT payload. Returns 403 if the user is not an admin.
Response — 200 OK
An array of all order objects across all users.Example
GET /api/orders//
Returns the full detail of a single order identified by its MongoDB ObjectId.Authentication
Bearer token required. Regular users can only fetch their own orders — the server filters by bothid and user_id. Admin users can retrieve any order.
Path Parameter
The MongoDB ObjectId of the order (24-character hex string).
Response — 200 OK
MongoDB ObjectId of the order (string representation).
Human-readable order reference in the format
ORD-<timestamp>-<random>, e.g. ORD-20240522153045-472.Email address of the user who placed the order.
Array of line-item objects. Each contains:
product_slug, product_name, quantity, size, color, price_paid, subtotal.Sum of all item subtotals in COP, before tax and shipping.
Tax amount in COP. Defaults to
0.Shipping cost in COP. Defaults to
0.Final amount charged (subtotal + tax + shipping) in COP.
Current order lifecycle state. One of:
pending, paid, pending_shipment, shipped, cancelled.Embedded object with:
email, name, phone, address, city, department, country.Freetext delivery notes provided at checkout. Empty string if none.
ISO 8601 timestamp of when the order was created.
ISO 8601 timestamp after which an unpaid
pending order is auto-cancelled. null once the order has been paid.ISO 8601 timestamp of when payment was confirmed.
null if not yet paid.Example
Error Responses
| Status | Condition |
|---|---|
401 Unauthorized | Token missing, malformed, or expired |
403 Forbidden | Admin-only endpoint accessed by a regular user (/all/) |
404 Not Found | Order ID does not exist, or belongs to a different user |