Skip to main content
GET
/
api
/
v1
/
books
/
isbn
/
{isbn}
curl -X GET "https://api.example.com/api/v1/books/isbn/978-0-618-00222-1" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
{
  "isbn": "978-0-618-00222-1",
  "title": "The Lord of the Rings",
  "subtitle": "The Fellowship of the Ring",
  "publishers": ["Allen & Unwin", "Houghton Mifflin"],
  "publishDate": "1954",
  "numberOfPages": 423,
  "authors": ["J.R.R. Tolkien"]
}

Authentication

This endpoint requires a valid JWT token in the Authorization header.
Authorization: Bearer <your_jwt_token>

Path Parameters

isbn
string
required
The International Standard Book Number (ISBN) to search for. Supports both ISBN-10 and ISBN-13 formats.

Response

This endpoint returns a BookResponseDTO object, which differs from the standard BookResponse format.
isbn
string
The International Standard Book Number (ISBN).
title
string
The main title of the book.
subtitle
string
The subtitle of the book.
publishers
array
List of publisher names.
publishDate
string
The publication date of the book.
numberOfPages
integer
The number of pages in the book.
authors
array
List of author names.
curl -X GET "https://api.example.com/api/v1/books/isbn/978-0-618-00222-1" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
{
  "isbn": "978-0-618-00222-1",
  "title": "The Lord of the Rings",
  "subtitle": "The Fellowship of the Ring",
  "publishers": ["Allen & Unwin", "Houghton Mifflin"],
  "publishDate": "1954",
  "numberOfPages": 423,
  "authors": ["J.R.R. Tolkien"]
}

OpenLibrary Integration

This endpoint integrates with the OpenLibrary API to fetch book information when a book is not found in the local database. The integration workflow is:
  1. Local Database Check: First searches the local database for the ISBN
  2. External API Query: If not found locally, queries OpenLibrary API
  3. Auto-Save: If found externally, the book is automatically saved to the local database
  4. Response Status: Returns 200 OK for existing books, 201 Created for newly added books from OpenLibrary

Status Codes

Book found in the local database.
201
Created
Book found in OpenLibrary API and successfully added to the local database.
401
Unauthorized
Missing or invalid JWT token.
403
Forbidden
Valid token but insufficient permissions.
404
Not Found
Book with the specified ISBN was not found in either the local database or OpenLibrary API.

Build docs developers (and LLMs) love