Skip to content
  • There are no suggestions because the search field is empty.

Format requests to the Casebook API

Tips for using the Casebook API

Introduction

Requests to the Casebook API support standard JSON:API modifiers for formatting, filtering, sorting, and pagination.

This guide provides instructions and code samples for formatting your requests to the Casebook API.

Prerequisites

Your organization must be licensed for External Data Interoperability (API) to interact with the Casebook API.

You will need to register an incoming application and obtain a Bearer token before starting this guide.

Instructions

Set Authorization and Content-Type headers

All requests to the Casebook API must include the following headers:

  • Authorization: Bearer <YOUR_BEARER_TOKEN>
  • Content-Type: application/vnd.api+json

If you do not yet have a token, start with Obtain a Bearer token instructions.

Route your request with an operation and an endpoint

Start your request with the correct base URL:

  • For accounts in Canada, all requests will start with https://api.casebookca.net
  • For accounts in the US, all requests will start with https://api.casebook.net

Next, select the operation that you would like to complete (GET, POST, PATCH, or DELETE) and the endpoint that you would like to reach.

    Here are a few common endpoints:

    Include query parameters to modify results

    Requests often require sorting, filters, and pagination to narrow down the records you want to retrieve. Query parameters let you specify these filters directly in the endpoint URL.

    Use ? before the first modifier, and & before any additional modifiers to chain multiple conditions.

    Here are a few common modifiers:

    Filter

    Filter results based on values in one or more fields

    • Exact match: filter results with a  case-sensitive exact match on a field
      • Equals: filter[<YOUR_FIELD_NAME>]=<YOUR_VALUE>
      • Not equals: filter[<YOUR_FIELD_NAME>][neq]=<YOUR_VALUE>
    • Comparing dates and numbers: filter results within a range of values
      • Greater than: filter[<YOUR_FIELD_NAME>][g]=<YOUR_VALUE>
      • Greater than or equal to: filter[<YOUR_FIELD_NAME>][ge]=<YOUR_VALUE>
      • Less than: filter[<YOUR_FIELD_NAME>][l]=<YOUR_VALUE>
      • Less than or equal to: filter[<YOUR_FIELD_NAME>][le]=<YOUR_VALUE>
    • Empty values: include or exclude results with null values 
      • Include only empty values: filter[<YOUR_FIELD_NAME>]=null;
      • Exclude empty values: filter[<YOUR_FIELD_NAME>][neq]=null
    Sort

    Determine the sort order for your results based on values in one or more fields

    • Sort in ascending order: sort=<YOUR_FIELD_NAME>
    • Sort in descending order: sort=-<YOUR_FIELD_NAME>
    Page

    Page through sets of results to (Default: 10 results per page) 

    • Return a specific page of results: page=<YOUR_PAGE_NUMBER>
    • Specify the page size for results: page[size]=<YOUR_PAGE_SIZE>

    Tips

    Chain multiple query parameters - Use ? before the first parameter and & before each additional parameter (e.g. ?filter=[FILTER_CONDITION]&sort=[SORT_CONDITION])

    Examples

    Get all active Services offered by a specific Provider

    GET <BASE_URL>/services/service_offerings?filter[provider_id]=<YOUR_PROVIDER_ID>&filter[archived]=false
    • Headers:
      • Authorization: Bearer <YOUR_BEARER_TOKEN>
      • Content-Type: application/vnd.api+json
    • Query Parameters:
      • filter[provider_id]: <YOUR_PROVIDER_ID>
      • filter[archived]: false

    Get all Notes created between two dates

    GET <BASE_URL>/attachments/notes?filter[created_at][ge]=2025-01-01T00:00:00Z&filter[created_at][le]=2025-06-30T23:59:59Z
    • Headers:
      • Authorization: Bearer <YOUR_BEARER_TOKEN>
      • Content-Type: application/vnd.api+json
    • Query Parameters:
      • filter[provider_id]: <YOUR_PROVIDER_ID>
      • filter[archived]: false

    People - Get all People with a specific last name

    GET <BASE_URL>/people/people?filter[last_name][like]=Doe
    • Headers:
      • Authorization: Bearer <YOUR_BEARER_TOKEN>
      • Content-Type: application/vnd.api+json
    • Query Parameters:
      • filter[last_name][like]: Doe

    Next steps

    Next, use the framework in this guide to test Casebook APIs with Postman:

    • Test Casebook APIs with Postman

    For more help with the Casebook API, get in touch with the Casebook Support team.