User APIs
Manage user-specific data — wishlist, recently viewed items, reviews, and booking tickets with QR codes.
# Get User Wishlist
Retrieve the user's saved wishlist items with full item details.
Bearer Token RequiredQuery Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| userId | string | REQUIRED | User's UUID from JWT token claims. Example: aebeb5aa-4dbf-11f0-bceb-0242ac1d0002 |
Response — 200 OK
{
"data": {
"filteredItems": [ // Full item objects for display (same format as GET /items)
{
"id": "01994b3d-...",
"title": "From the Ghats of Varanasi...",
"price": 6999,
"image": "https://cdn.rzervit.com/...",
"location": "Varanasi"
}
],
"wishlistItems": [ // Raw records — use for management logic
{ "id": "68c8ebcff2...", "itemId": "01994b3d-...", "createdAt": "..." }
],
"total": 5
}
}# Toggle Wishlist
Add an item to wishlist if not saved; remove it if already saved. Use the returned isFavorite to update the heart/bookmark icon state.
Request Body — application/json
| Field | Type | Required | Description |
|---|---|---|---|
| itemId | string | REQUIRED | Item UUID from GET /items or GET /item/slug |
| userId | string | REQUIRED | User UUID from JWT token |
// Added
{ "data": { "message": "Added to wishlist", "isFavorite": true } }
// Removed
{ "data": { "message": "Removed from wishlist", "isFavorite": false } }# Add to Recent Items
Track item views to power the "Recently Viewed" carousel. Call on every item detail page open.
Bearer Token RequiredRequest Body — application/json
| Field | Type | Required | Description |
|---|---|---|---|
| itemId | string | REQUIRED | Item UUID |
| userId | string | REQUIRED | User UUID from JWT token |
# Create Review
Submit a star rating and review text for a completed booking. Only allow after bookingStatus = COMPLETED.
Request Body — application/json
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | REQUIRED | Reviewer's display name |
| rating | number | REQUIRED | Integer 1–5 |
| title | string | REQUIRED | Experience name (for context) |
| date | string | REQUIRED | ISO datetime. Example: 2026-03-23T07:28:19.387Z |
| verified | bool | REQUIRED | Always set true for post-booking reviews |
| review | string | REQUIRED | Review text content |
| bookingId | string | REQUIRED | From GET /user/tickets: formattedTickets[n].bookingId |
| images | array | OPTIONAL | Array of image URLs. Can be empty [] |
| userId | string | OPTIONAL | User UUID — extracted from JWT if omitted |
# Get User Tickets
Fetch all bookings for the authenticated user — the "My Bookings" / "My Tickets" page.
Bearer Token RequiredQuery Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| page | number | REQUIRED | Page number |
| limit | number | REQUIRED | Items per page. Example: 5 |
| userId | string | REQUIRED | User UUID from JWT token |
Response — 200 OK (key fields)
{
"data": {
"formattedTickets": [
{
"title": "National Gallery Of Modern Art",
"location": "NEW DELHI",
"fulfillmentDate": "21 March, 2026, 10 AM - 7 PM", // Human-readable
"orderId": "HDBAP0000000142",
"bookingStatus": "COMPLETED", // COMPLETED | EXPIRED | CANCELLED | PENDING
"orderStatus": "SUCCESS",
"transactionId": "1474bd59-...", // ← Use in GET /user/ticket/:transactionId
"bookingId": "69bd38037264...", // ← Use in Create Review → bookingId
"qrCode": "M2Q5NTcy...", // Base64 PDF or image QR code
"review": null, // null = not yet reviewed
"fulfillmentStatus": "CONFIRMED"
}
]
}
}
QR Code: If
qrCode starts with JVBER... it's a base64-encoded PDF — use a PDF viewer. Otherwise render as a base64 image (<img src="data:image/png;base64,...">). Show "Write Review" only when bookingStatus = COMPLETED AND review = null.
# Get Ticket Detail
Fetch complete booking details including the QR token, real-time claim status, pricing breakdown, and any registered issues.
Bearer Token RequiredPath Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| transactionId | string | REQUIRED | ONDC transaction UUID from GET /user/tickets: formattedTickets[n].transactionId |
Query Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| userId | string | REQUIRED | User UUID from JWT token |
Key Response Fields
{
"data": {
"formattedTicket": {
"title": "Activity Demo",
"status": "CONFIRMED", // CONFIRMED | EXPIRED | CANCELLED
"startTime": {
"range": {
"start": "2026-03-24T02:30:00.000Z", // UTC — convert to IST for display
"end": "2026-03-24T09:30:00.000Z"
}
},
"qrCodeDetails": {
"token": "MTQ1YzI2ODItMmQ4Ny...", // ← Render as QR image for venue entry
"validTo": "2026-03-24T09:30:00.000Z", // QR expiry — show countdown
"status": "UNCLAIMED" // UNCLAIMED | CLAIMED (scanned at venue)
},
"totalAmount": 354,
"pricing": [
{ "label": "Child", "amount": "100", "quantity": 2 },
{ "label": "Adult", "amount": "100", "quantity": 1 }
],
"issues": [], // Registered IGM issues for this booking
"review": null // null = not yet reviewed
}
}
}
QR Code: Use
qrCodeDetails.token (Base64) to render a QR image. Libraries like qrcode.react or qrcode.js can decode it. Show a countdown timer based on validTo. Once scanned, status changes from UNCLAIMED to CLAIMED.