/api/v1/books/id

DELETE /api/v1/books/<int:id>

⚠️

This endpoints requires Administrator permissions. (@token_required)

Description

This endpoint allows developers to delete a book with the specific ID provided.

Parameters

There is only one parameter available and it's required to this endpoint make the correct request.

  • id: Book ID to get all book informations. (eg: 2, int)

Request

Response

The response will show if the book was deleted successfully.

  {
    "message": "Success", 
    "status": "Book deleted"
  }

Bad Request (400)

If the token is missing in the request header.

{
    "code": "400",
    "status": "Bad Request",
    "message": "Token header is required"
}

Unauthorized (401)

If the Administrator token is expired.

{
    "code": "401",
    "status": "Unauthorized",
    "message": "Token expired"
}

If the Administrator token is incorrect.

{
    "code": "401",
    "status": "Unauthorized",
    "message": "Token incorrect"
}

Not Found (404)

If there is no book with the specified id.

  {
    "code": "404",
    "status": "Not Found", 
    "status": "Book with that ID not found"
  }