get by id
Books
get by id
This endpoint makes an HTTP GET request to retrieve the details of a specific book based on the provided book ID.
Request
- The request does not require a request body.
- The
:bookIdparameter in the URL path specifies the unique identifier of the book to be retrieved.
Response
- If the book with the specified ID is found, the response will include the details of the book such as its ID, ISBN10, title, author, genre, price, publisher, publication date, rating, and timestamps.
- If no book is found with the specified ID, the response will return a
nullvalue for thebookfield.
Example Response 1:
{
"data": {
"book": {
"_id": "",
"ISBN10": "",
"title": "",
"author": "",
"genre": "",
"price": 0,
"publisher": "",
"isPrivatePublisher": true,
"publishedDate": "",
"rating": 0,
"createdAt": "",
"updatedAt": "",
"ISBN13": "",
"__v": 0
},
"error": null
}
}
Example Response 2:
```json
{
"data": {
"book": null
},
"error": null
}
GET
get by id