ADMIN role required — This endpoint requires administrator privileges. Non-admin users will receive a 403 Forbidden error.
Endpoint
Authentication
This endpoint requires a valid JWT Bearer token with ADMIN role.
Authorization: Bearer YOUR_JWT_TOKEN
Response
Returns a list of all repair requests ordered by ID in descending order (newest first).
Response Fields
Indicates if the request was successful
Array of repair request objects
Unique receipt identifier (format: RR-)
Customer’s full name (minimum 3 characters)
Customer’s phone number (minimum 8 characters)
Name of the article to be repaired
Serial number of the article (optional)
Accessories included with the article (optional)
Description of the problem
Current status of the repair. One of:
pending - Pending review
in_progress - Under repair
waiting_parts - Waiting for parts
completed - Repaired
delivered - Delivered to the client
canceled - Canceled
Details about the repair work (optional)
Price of the repair (decimal with 2 decimal places)
Date when the article was received (ISO 8601 format)
Date when the repair was completed (ISO 8601 format, optional)
Array of associated images
Polymorphic type (RepairRequest)
Receipt number this image belongs to
Timestamp when the record was created
Timestamp when the record was last updated
Timestamp when the record was soft deleted (null if active)
Examples
curl -X GET https://api.yourservice.com/api/repair-request \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Accept: application/json"
Response Example
{
"success": true,
"message": "All repair requests retrieved successfully",
"data": {
"repairRequests": [
{
"id": 1,
"receipt_number": "RR-20260308143025123456789",
"customer_name": "John Doe",
"customer_phone": "+1234567890",
"customer_email": "[email protected]",
"article_name": "Laptop",
"article_type": "Electronics",
"article_brand": "Dell",
"article_model": "XPS 15",
"article_serialnumber": "SN123456",
"article_accesories": "Charger, Case",
"article_problem": "Screen not turning on",
"repair_status": "in_progress",
"repair_details": "Replacing LCD panel",
"repair_price": "250.00",
"received_at": "2026-03-08T14:30:25.000000Z",
"repaired_at": null,
"images": [
{
"id": 1,
"path": "repair_requests/repair_request_image_RR-20260308143025123456789_1.jpg",
"imageable_type": "App\\Models\\RepairRequest",
"imageable_id": "RR-20260308143025123456789"
}
],
"created_at": "2026-03-08T14:30:25.000000Z",
"updated_at": "2026-03-08T14:30:25.000000Z",
"deleted_at": null
}
]
}
}
Error Responses
401 Unauthorized
{
"success": false,
"message": "Unauthenticated"
}
403 Forbidden
Returned when the authenticated user does not have ADMIN role.
{
"success": false,
"message": "This action is unauthorized"
}
Notes
- The
receipt_number is the unique identifier for repair requests, not the id
- Results are ordered by ID in descending order (newest first)
- Images are loaded with each repair request using eager loading
- Soft-deleted records are excluded from results