☑ Kizspy.me
title, author, genres, published Year, or availableCopies.
• Endpoint: PUT /api/books/:id
Zoom
- FUO
. Processing Requirements:
。 Validate that the book with the given ID exists.
。 Validate that any provided author and genre IDs exist in their collections.
o Update the relevant fields.
• Return the updated book document.
• Request Example:
{
"title": "Refactoring (2nd Edition)",
"author": "66211aaa12bcab1234567788",
"genres":["66211aaa12bcab1234567711", "66211aaa12bcab1234567722"],
"publishedYear": 2019,
"availableCopies": 6
• Response Example:
{
"id": "6621bbaabbccdd1234567890",
"title": "Refactoring (2nd Edition)",
+100%
Close