Logo
Hack Back Better Demo API Documentation

Get books

GET {{baseUrl}}/books

Get all books, or add query parameters to filter results by genre, search keyword, and/or checkedOut status

 

Body PARAM

Key Datatype Required Description 
genre
string a genre to filter for
checkedOut
boolean a value true or false
search
string a search term to match against author or title



HEADERS

Key Datatype Required Description 
Accept
string




RESPONSES

status OK

[ { "id": "50b1a8e9-78f0-4a80-b350-8fdf8fb1b8b8", "title": "A Thousand Splendid Suns", "author": "Khaled Hosseini", "genre": "fiction", "yearPublished": 2007, "checkedOut": false, "isPermanentCollection": true, "createdAt": "2022-03-04T22:10:24.526Z" }, { "id": "29cd820f-82f9-4b45-a7f4-0924111b5b89", "title": "Ficciones", "author": "Jorge Luis Borges", "genre": "fiction", "yearPublished": 1944, "checkedOut": false, "isPermanentCollection": true, "createdAt": "2022-03-04T22:10:24.526Z" } ]

Curl
curl -X GET 'https://library-api.postmanlabs.com/books?genre=fiction&checkedOut=false&search=borges' -H 'Accept: application/json'

ENDPOINTS