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.

GET{{base_url}}/user/wishlist
Bearer Token Required
Query Parameters
FieldTypeRequiredDescription
userIdstringREQUIREDUser'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.

POST{{base_url}}/user/wishlist
Bearer Token Required
Request Body — application/json
FieldTypeRequiredDescription
itemIdstringREQUIREDItem UUID from GET /items or GET /item/slug
userIdstringREQUIREDUser 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.

POST{{base_url}}/user/recent-items
Bearer Token Required
Request Body — application/json
FieldTypeRequiredDescription
itemIdstringREQUIREDItem UUID
userIdstringREQUIREDUser UUID from JWT token
To display recently viewed items, call GET /items with isRecentlyViewed=true and userId=<uuid>.

# Create Review

Submit a star rating and review text for a completed booking. Only allow after bookingStatus = COMPLETED.

POST{{base_url}}/user/review
Bearer Token Required
Request Body — application/json
FieldTypeRequiredDescription
namestringREQUIREDReviewer's display name
ratingnumberREQUIREDInteger 1–5
titlestringREQUIREDExperience name (for context)
datestringREQUIREDISO datetime. Example: 2026-03-23T07:28:19.387Z
verifiedboolREQUIREDAlways set true for post-booking reviews
reviewstringREQUIREDReview text content
bookingIdstringREQUIREDFrom GET /user/tickets: formattedTickets[n].bookingId
imagesarrayOPTIONALArray of image URLs. Can be empty []
userIdstringOPTIONALUser UUID — extracted from JWT if omitted

# Get User Tickets

Fetch all bookings for the authenticated user — the "My Bookings" / "My Tickets" page.

GET{{base_url}}/user/tickets
Bearer Token Required
Query Parameters
FieldTypeRequiredDescription
pagenumberREQUIREDPage number
limitnumberREQUIREDItems per page. Example: 5
userIdstringREQUIREDUser 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.

GET{{base_url}}/user/ticket/:transactionId
Bearer Token Required
Path Parameters
FieldTypeRequiredDescription
transactionIdstringREQUIREDONDC transaction UUID from GET /user/tickets: formattedTickets[n].transactionId
Query Parameters
FieldTypeRequiredDescription
userIdstringREQUIREDUser 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.