Skip to main content
The GET /v2/books endpoint no longer supports the sort=title parameter. Replace it with sort=createdDate or implement client-side sorting.

Prerequisites

Before you begin, ensure you meet the following prerequisites:
  • Familiarity with BookHub Publisher API v1.
  • Access to your codebase that integrates with the BookHub Publisher API.
  • A valid JWT for authentication.

Step 1: Audit your codebase for sort=title parameters

You should see a list of all instances where sort=title or sort.*title appears.

Step 2: Replace with sort=createdDate or client-side sorting

To update your code, replace any instances of sort=title with either sort=createdDate or client-side sorting. Option A uses the API’s sort=createdDate parameter to return results pre-sorted. Option B fetches unsorted results and sorts them in your application code. Here are examples of both approaches:

Before (v1)

After (v2) option B: client-side sorting

Client-side sorting requires fetching all books. For large catalogs, this may hit rate limits (150 requests per minute) or impact performance. Use sort=createdDate where possible.
When fetching books, you can sort them by title on the client side after retrieving the data. Here’s an example of how to do this in Python:
This example fetches up to 100 books in a single request. For catalogs larger than 100 books, paginate through all pages before sorting. See Handle pagination for details.

Response

A successful GET /v2/books request using sort=createdDate returns 200 OK:
Passing order=desc returns books newest first, order=asc for oldest first. See Get all books for all available parameter values.

Step 3: Verify your changes

Send a test request and confirm the response returns 200 OK with books ordered by createdDate. For catalogs larger than 100 books, run the pagination test from Handle pagination to verify all pages return correctly.
Verify the first book in the response has the most recent createdDate. If your code still passes sort=title, v2 returns a 400 error:
Then handle it in your code:

Error handling

Next steps

Explore related topics:

How-to guides

Reference

  • Release notes — Explore all changes in BookHub Publisher API v2.
  • Breaking changes in v2 — Details all breaking changes in v2 of the BookHub Publisher API.
  • API endpoints — Provides additional information about the BookHub Publisher API v2 endpoints, including business rules.
  • Code examples — Copy code samples for book creation, sorting by creation date, handling removed title sorting, and tracking performance with hitCount.

Last modified on August 18, 2026