Retrieve User Requests

GET /client/user-requests/

Use the GET /client/user-requests/ endpoint to retrieve a list of all service requests created by the client. Each request includes details about the user, the mechanic (if assigned), the car, and the service request.


Parameters

This endpoint does not require any parameters.


Responses

200 OK

Description: A list of user requests is returned.

Example Response:

[
  {
    "id": 1,
    "description": "Car engine making strange noise.",
    "user": {
      "id": "u12345",
      "username": "john_doe",
      "first_name": "John",
      "last_name": "Doe",
      "profile_pic": "https://example.com/profile/john_doe.jpg"
    },
    "car_brand": "Toyota",
    "mechanic": {
      "id": "m67890",
      "email": "mechanic@example.com",
      "phone_number": "+123456789",
      "is_available": "true",
      "rate": "4.5",
      "first_name": "Mike",
      "last_name": "Smith",
      "car_speciality": "Engine repair",
      "services": "Engine diagnostics, oil change"
    },
    "date": "2024-11-15",
    "time": "14:30:00",
    "location": "123 Elm Street, Springfield"
  },
  {
    "id": 2,
    "description": "Flat tire needs replacement.",
    "user": {
      "id": "u12346",
      "username": "jane_doe",
      "first_name": "Jane",
      "last_name": "Doe",
      "profile_pic": "https://example.com/profile/jane_doe.jpg"
    },
    "car_brand": "Honda",
    "mechanic": null,
    "date": "2024-11-16",
    "time": "10:00:00",
    "location": "456 Oak Avenue, Springfield"
  }
]

Last updated