Endpoint
DELETE /api/management/authors/{id}
Authentication
Requires authentication with a valid Bearer token and ADMIN role.
Path Parameters
Unique identifier of the author to delete
Response
Indicates if the request was successful
ISO 8601 timestamp of the response
Success message confirming deletion
No data returned for delete operations
Example Request
curl -X DELETE "http://localhost:8080/api/management/authors/1" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json"
Example Response
{
"success": true,
"timestamp": "2026-03-03T10:00:00Z",
"message": "Author deleted successfully",
"data": null
}
Error Responses
401 Unauthorized
{
"success": false,
"timestamp": "2026-03-03T10:00:00Z",
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required"
}
}
403 Forbidden
{
"success": false,
"timestamp": "2026-03-03T10:00:00Z",
"error": {
"code": "FORBIDDEN",
"message": "Access denied. ADMIN role required"
}
}
404 Not Found
{
"success": false,
"timestamp": "2026-03-03T10:00:00Z",
"error": {
"code": "NOT_FOUND",
"message": "Author not found with id: 999"
}
}
409 Conflict - Author Has Books
{
"success": false,
"timestamp": "2026-03-03T10:00:00Z",
"error": {
"code": "CONFLICT",
"message": "Cannot delete author with associated books"
}
}
Deleting an author may fail if the author has associated books in the system. Remove or reassign all books before attempting to delete the author.