Skip to main content
POST
/
reviews
/
add
add
curl --request POST \
  --url http://localhost:8000/v1/reviews/add \
  --header 'Content-Type: application/json' \
  --data '
{
  "book": "670e2ce78296c4aa4d1374ad",
  "rating": 4,
  "review": "A great book, Gilead."
}
'
{
  "data": {
    "review": {
      "__v": 0,
      "_id": "670e317b59f06fc0a2501117",
      "book": "670e2ce78296c4aa4d1374ad",
      "createdAt": "2024-10-15T09:10:19.964Z",
      "downvoters": [],
      "isRemoved": false,
      "rating": 4,
      "review": "A great book, Gilead.",
      "reviewer": "6708d54f9c193b2aeae09b80",
      "updatedAt": "2024-10-15T09:10:19.964Z",
      "upvoters": []
    }
  },
  "error": null
}

Body

application/json
book
string
Example:

"670e2ce78296c4aa4d1374ad"

rating
number
Example:

4

review
string
Example:

"A great book, Gilead."

Response

add - success

data
object
error
unknown