Shop It Docs
Developer Resourcesrepair

Repair Requests Feature List

Laptop repair request submission, tracking, and admin management.

Repair Requests — Feature List

1. Feature Overview

The Repair Requests module allows customers to submit laptop repair requests, track status through a multi-stage lifecycle, and receive push notifications at each stage.

Key properties:

  • Repair is free of charge — no payment integration
  • Supports N devices per ticket
  • Brands can be selected from the platform brand catalog or entered as a custom name
  • Admin drives the full status lifecycle; customers may only self-cancel at request_received
  • Collection method (pickup / dropoff) is admin-controlled and can be changed at any time
  • Admin notes are internal and never exposed in customer-facing responses

2. Route Ownership

SurfaceRoute prefixModule
Customer API/api/repair-requestsRepairCustomerModule
Admin API/api/admin/repair-requestsRepairAdminModule

Swagger tags:

  • Repair Requests (Customer)
  • Repair Requests (Admin)

3. Customer Feature Matrix

CapabilityEndpointAuth
Submit repair requestPOST /api/repair-requestsJWT customer
List own repair requestsGET /api/repair-requestsJWT customer
View repair request detailGET /api/repair-requests/:publicIdJWT customer (owner only)
Cancel repair requestPATCH /api/repair-requests/:publicId/cancelJWT customer (owner only, status must be request_received)

4. Admin Feature Matrix

CapabilityEndpointPermission
List all repair requestsGET /api/admin/repair-requestsRepairRequests_READ
View repair request detailGET /api/admin/repair-requests/:idRepairRequests_READ
Update statusPATCH /api/admin/repair-requests/:id/statusRepairRequests_UPDATE
Update collection methodPATCH /api/admin/repair-requests/:id/collection-methodRepairRequests_UPDATE
Update admin notesPATCH /api/admin/repair-requests/:id/notesRepairRequests_UPDATE

5. Status Lifecycle

StatusMeaningWho sets it
request_receivedInitial state on ticket creationSystem (auto on create)
picked_upLaptop collected from customerAdmin
under_repairRepair work startedAdmin
repairedRepair completeAdmin
packedLaptop packed for returnAdmin
deliveredLaptop returned to customerAdmin
cancelledRequest cancelledCustomer (from request_received only) or Admin (from any non-terminal status)

delivered and cancelled are terminal — no further transitions are possible.

6. Notification Triggers

Push notifications are sent to the customer's registered devices at each admin status change.

StatusNotification Title
request_received"Repair Request Received" (on ticket creation)
picked_up"Laptop Picked Up"
under_repair"Repair In Progress"
repaired"Repair Completed"
packed"Out for Delivery Soon"
delivered"Laptop Delivered"
cancelled"Repair Cancelled"

All notifications use type: "transactional" and priority: "high" and are fire-and-forget (never block the API response).

7. Device Configuration

Each repair ticket may contain one or more devices. Per device:

  • brandId — select from the platform brands catalog, OR
  • customBrandName — enter a brand not in the catalog
  • Exactly one of brandId or customBrandName is required (DB-level CHECK constraint enforces this)
  • laptopModel — free-text laptop model name (required)
  • problemDescription — optional per-device description
  • orderItemId — optional link to an order line item

If all devices share the same issue, use sharedDescription at the ticket level instead of per-device descriptions.

8. Business Rules

  • Minimum 1 device per repair request.
  • No limit on the number of devices per ticket.
  • No duplicate ticket prevention — multiple tickets for the same device are allowed.
  • orderId is optional — repair does not need to be linked to a purchase.
  • order_item_id must belong to the linked order_id when both are provided.
  • Guest users: form state is saved in localStorage; after login the user is redirected with pre-filled data (no backend session carryover).
  • adminNotes is excluded from all customer-facing responses.
  • Collection method defaults to pickup and can be changed by admin at any time regardless of status.

9. Data Tables

TablePurpose
repair_ticketOne row per repair request
repair_ticket_deviceOne row per device per ticket (1..N)
repair_ticket_status_historyAppend-only status change log per ticket