Update
Information about the update endpoints of the REST API, including usage, parameters, and responses.
Update Endpoints in SolidX
This section provides details about the Update Endpoints of the REST API, including usage patterns, headers, request/response formats, and examples of both partial and full updates.
Types of Updates
1 Partial Update
- Method:
PATCH - Purpose: Update specific fields of a record without affecting the rest.
Example: Update <code>feeType</code> FieldHeaders
Content-Type: application/json
Authorization: Bearer <token>Request
PATCH /api/fee-type/1Body
{
"feeType": "tuition"
}Response
{
"statusCode": 200,
"message": [],
"error": "",
"data": {
"feeType": "tuition",
"partPaymentAllowed": true,
"id": 3,
"updatedBy": {
"fullName": "Default Admin",
"email": "admin@example.service.com",
"active": true,
"id": 1
},
"updatedAt": "2025-08-06T23:30:10.185Z"
}
}2 Full Update
- Method:
PUT - Purpose: Replace the entire model with a new object.
- Idempotent: Yes (repeated calls with the same payload have the same effect).
Example: Full Update of Fee TypeHeaders
Content-Type: application/json
Authorization: Bearer <token>Request
PUT /api/fee-type/1Body
{
"feeType": "tuition",
"instituteUserKey": "Don Bosco",
"partPaymentAllowed": true
}Response
{
"statusCode": 200,
"message": [],
"error": "",
"data": {
"feeType": "tuition",
"partPaymentAllowed": true,
"institute": {
"instituteName": "Don Bosco",
"id": 3
},
"updatedBy": {
"fullName": "Default Admin",
"email": "admin@example.service.com",
"id": 1
},
"updatedAt": "2025-08-06T23:30:10.185Z"
}
}Update Without Media
Used when no files (like images or documents) are uploaded.
Example: JSON-only UpdatePATCH /api/institute-user/1
Content-Type: application/json
Authorization: Bearer <token>{
"userType": "Institute Admin",
"email": "admin@institute.com"
}Update With Media
Used when the request includes file uploads (e.g., profile pictures, attachments).
Example: Update with Multipart Form DataPATCH /api/institute-user/1
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary
Authorization: Bearer <token>Form Fields
updateDto(as JSON string)files(actual file(s))
Example Payload
updateDto: {
"userType": "Institute Admin",
"email": "admin@institute.com"
}
files: profile-picture.jpg