add
Books
add
Add Book
This endpoint allows you to add a new book to the database.
Request Body
- ISBN10 (string): The 10-digit International Standard Book Number.
- title (string): The title of the book.
- author (string): The author of the book.
- genre (string): The genre of the book.
- price (number): The price of the book.
- publisher (string): The publisher of the book.
- publishedMonth (number): The month in which the book was published.
- publishedYear (number): The year in which the book was published.
Response
The response will contain the following fields in JSON schema format:
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"book": {
"type": "object",
"properties": {
"ISBN10": { "type": "string" },
"title": { "type": "string" },
"author": { "type": "string" },
"genre": { "type": "string" },
"price": { "type": "number" },
"publisher": { "type": "string" },
"isPrivatePublisher": { "type": "boolean" },
"publishedDate": { "type": "string" },
"rating": { "type": "number" },
"_id": { "type": "string" },
"createdAt": { "type": "string" },
"updatedAt": { "type": "string" },
"ISBN13": { "type": "string" },
"__v": { "type": "number" }
}
},
"error": { "type": "null" }
}
}
}
}
POST
add
Body
application/json