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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | yes | The book's unique identifier. |
Responses
204 The book was deleted. The response has no body.
Errors
| Code | Message | Description |
|---|---|---|
| 401 | The request is missing a valid Authorization: Bearer <token> header. | |
| 404 | No resource exists with the given id. | |
| 409 | The book is currently borrowed and cannot be deleted. | |
| 500 | An unexpected error occurred. The response never leaks internal error details. |