library-rest

Delete a book.

DELETE/books/{id}

Permanently removes the book and unlinks it from its author. A book that is currently borrowed cannot be deleted — return it first.

Parameters

NameInTypeRequiredDescription
idpathstringyesThe book's unique identifier.

Responses

204 The book was deleted. The response has no body.

Errors

CodeMessageDescription
401The request is missing a valid Authorization: Bearer <token> header.
404No resource exists with the given id.
409The book is currently borrowed and cannot be deleted.
500An unexpected error occurred. The response never leaks internal error details.