ADMIN role required — This endpoint requires administrator privileges. Non-admin users will receive a 403 Forbidden error.
Endpoint
GET /api/repair-request/{receipt_number}
Authentication
This endpoint requires a valid JWT Bearer token with ADMIN role.
Authorization: Bearer YOUR_JWT_TOKEN
Path Parameters
The unique receipt number of the repair request (e.g., RR-20260308143025123456789)
Response
Returns the details of a specific repair request including associated images.
Response Fields
Indicates if the request was successful
Unique receipt identifier (format: RR-)
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/RR-20260308143025123456789 \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Accept: application/json"
Response Example
{
"success": true,
"message": "Repair request retrieved successfully",
"data": {
"repairRequest": {
"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"
}
404 Not Found
Returned when the repair request with the specified receipt number does not exist.
{
"success": false,
"message": "Repair request not found"
}
Notes
- The
receipt_number is used as the unique identifier, not the database id
- Images are automatically loaded with the repair request
- Route binding automatically handles model lookup by receipt number