Skip to main content

Delete Endpoint

This section explains how to use the delete endpoints of the REST API in SolidX. You can remove records either individually or in bulk using these endpoints.

Deleting a Single Record

When soft delete is enabled on a m

Example: Bulk Delete Fee Types odel (like fee-type), the record is not permanently removed — instead, the deletedAt and deletedTracker fields are populated.

Example: Delete a Fee Type Record

Headers

Content-Type: application/json
Authorization: Bearer <token>

Request Body

DELETE /api/fee-type/{id}

Sample Response

{
"statusCode": 200,
"message": [],
"error": "",
"data": {
"partPaymentAllowed": true,
"id": 3,
"createdAt": "2025-08-06T23:30:10.185Z",
"updatedAt": "2025-08-07T00:06:18.418Z",
"deletedAt": "2025-08-07T00:06:18.378Z",
"deletedTracker": "Thu Aug 07 2025 11:06:18 GMT+0530 (India Standard Time)",
"feeType": "tuition",
"updatedBy": {
"id": 1,
"fullName": "Default Admin",
"email": "admin@example.service.com",
"active": true
}
}
}

The above response confirms soft deletion, showing timestamps and tracker info.

Bulk Deletion

SolidX also supports deleting multiple records in a single request.

Example: Bulk Delete Fee Types

Headers

Content-Type: application/json
Authorization: Bearer <token>

Request

DELETE /api/fee-type/bulk

Body

[1]  // List of record IDs to delete

Sample Response

[
{
"statusCode": 200,
"message": [],
"error": "",
"data": {
"partPaymentAllowed": true,
"id": 3,
"createdAt": "2025-08-06T23:30:10.185Z",
"updatedAt": "2025-08-07T00:06:18.418Z",
"deletedAt": "2025-08-07T00:06:18.378Z",
"deletedTracker": "Thu Aug 07 2025 11:06:18 GMT+0530 (India Standard Time)",
"feeType": "tuition",
"updatedBy": {
"id": 1,
"fullName": "Default Admin",
"email": "admin@example.service.com",
"active": true
}
}
}
]

Summary

  • Use DELETE /api/model/{id} for soft-deleting a single record.
  • Use DELETE /api/model/bulk with an array of IDs for bulk deletion.
  • Responses return deleted data including soft delete metadata (deletedAt, deletedTracker).