Creates a Review resource.

POST /reviews

Creates a Review resource.

Body Required

The new Review resource

  • rating integer
  • body string
  • author string
  • publicationDate string(date-time)
  • book string(iri-reference) | null

Responses

  • 201

    Review resource created

    Hide response attributes Show response attributes object
    • id integer
    • rating integer
    • body string
    • author string
    • publicationDate string(date-time)
    • book string(iri-reference) | null
  • 400

    Invalid input

  • 422

    Unprocessable entity

POST /reviews
curl \
 -X POST http://api.example.com/reviews \
 -H "Content-Type: application/json" \
 -d '{"rating":42,"body":"string","author":"string","publicationDate":"2023-05-04T09:42:00+00:00","book":"string"}'
Request example
{
  "rating": 42,
  "body": "string",
  "author": "string",
  "publicationDate": "2023-05-04T09:42:00+00:00",
  "book": "string"
}
Request examples
{
  "rating": 42,
  "body": "string",
  "author": "string",
  "publicationDate": "2025-05-04T09:42:00Z",
  "book": "string"
}
Response examples (201)
{
  "id": 42,
  "rating": 42,
  "body": "string",
  "author": "string",
  "publicationDate": "2023-05-04T09:42:00+00:00",
  "book": "string"
}
Response examples (201)
{
  "id": 42,
  "rating": 42,
  "body": "string",
  "author": "string",
  "publicationDate": "2025-05-04T09:42:00Z",
  "book": "string"
}