> For the complete documentation index, see [llms.txt](https://requestmechanic.gitbook.io/request-mechanic-api-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://requestmechanic.gitbook.io/request-mechanic-api-documentation/user/admin-upload-supporting-document.md).

# Admin Upload Supporting Document

Admin users can use the `PATCH /user/admin/upload-supporting-document/{user_id}/` endpoint to upload and modify the supporting document of any user. Admins can update specific user information, including associated specialities, services, and documents.

***

#### **Parameters**

| **Name**  | **Type** | **In** | **Description**                                                   |
| --------- | -------- | ------ | ----------------------------------------------------------------- |
| `data`    | Object   | Body   | Contains the information for updating the supporting document.    |
| `user_id` | String   | Path   | A unique identifier for the user whose document is being updated. |

***

#### **Request Body Fields**

| **Field**            | **Type**          | **Description**                                          |
| -------------------- | ----------------- | -------------------------------------------------------- |
| `car_speciality_ids` | Array of integers | IDs of the car specialities the user is associated with. |
| `services_id`        | Array of integers | IDs of the services the user provides.                   |
| `education_level`    | String (nullable) | The education level of the user.                         |
| `workshop_location`  | String (nullable) | Location of the user's workshop.                         |
| `profile_pic`        | Object            | Contains the profile picture URL.                        |
| **`profile_pic`**    | String            | URL of the user's profile picture.                       |
| `supported_document` | Object            | Contains details of the supporting document.             |
| **`user`**           | String            | ID of the user.                                          |
| **`document`**       | String            | URL of the uploaded document.                            |
| `update_is_active`   | Boolean           | Indicates if the update is active.                       |

***

#### **Responses**

**Success Response (200 OK):**

The request was successfully processed, and the updated user details are returned.

**Example Response Model:**

```json
{
  "id": 123,
  "car_speciality": [
    {
      "id": 1,
      "name": "Sedans"
    }
  ],
  "car_speciality_ids": [1],
  "services": [
    {
      "id": 2,
      "name": "Engine Repair"
    }
  ],
  "services_id": [2],
  "education_level": "Bachelor's Degree",
  "workshop_location": "123 Workshop Street",
  "profile_pic": {
    "profile_pic": "https://example.com/profile-pic.jpg"
  },
  "supported_document": {
    "id": "abcd1234",
    "user": "5678",
    "document": "https://example.com/document.pdf",
    "uploaded_at": "2024-11-17T10:00:00Z"
  },
  "update_is_active": true
}
```
