Skip to main content
GET
/
books
/
{isbn}
Get Book
curl --request GET \
  --url https://api.example.com/books/{isbn}
{
  "isbn": "<string>",
  "title": "<string>",
  "author": {
    "author.id": 123,
    "author.name": "<string>",
    "author.age": 123
  },
  "stock": 123,
  "coverImage": "<string>"
}
Retrieve a specific book by its ISBN.

Authentication

This endpoint requires HTTP Basic Authentication.

Path Parameters

isbn
string
required
The ISBN of the book to retrieve.

Response

isbn
string
The ISBN of the book.
title
string
The title of the book.
author
object
The author information.
author.id
integer
The unique identifier of the author.
author.name
string
The name of the author.
author.age
integer
The age of the author.
stock
integer
The number of copies available in stock.
coverImage
string
URL or path to the book’s cover image. Only included if set.

Status Codes

  • 200 OK: Successfully retrieved the book
  • 404 Not Found: Book with the specified ISBN does not exist
  • 401 Unauthorized: Authentication credentials are missing or invalid

Example Request

curl -X GET https://api.example.com/books/978-0-7475-3269-9 \
  -u username:password

Example Response

Success (200 OK)

{
  "isbn": "978-0-7475-3269-9",
  "title": "Harry Potter and the Philosopher Stone",
  "author": {
    "id": 1,
    "name": "J.K. Rowling",
    "age": 58
  },
  "stock": 15,
  "coverImage": "https://example.com/covers/hp1.jpg"
}

Not Found (404)

If the book does not exist, the endpoint returns a 404 status code with an empty response body.

Notes

  • The ISBN must be an exact match (case-sensitive).
  • If the book has no cover image, the coverImage field will be omitted from the response.

Build docs developers (and LLMs) love