Creates a Book resource.

POST /books

Creates a Book resource.

Body Required

The new Book resource

  • isbn string | null
  • title string
  • description string
  • author string
  • publicationDate string(date-time)
  • reviews array[string(iri-reference)]

Responses

  • 201

    Book resource created

    Hide response attributes Show response attributes object
    • id integer
    • isbn string | null
    • title string
    • description string
    • author string
    • publicationDate string(date-time)
    • reviews array[string(iri-reference)]
  • 400

    Invalid input

  • 422

    Unprocessable entity

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