1. Knowledge Base
  2. Admin
  3. Integrations (External Applications)

Casebook API Documentation

How Casebook API works

Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. 

Please Note: Setting up the API will require the involvement of a development team or an individual with equivalent experience

Casebook's APIs are documented in Swagger Hub and can be found here

Casebook API Request Methods

Request Meaning
Post Create a new record
Get Retrieve or get the information
Patch Update / Modify
Delete Delete

 

API Response Codes

Casebook uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted). Codes in the 5xx range indicate an error with Caseboo's servers (these are rare).

Response Code Meaning
200 - OK Everything worked as expected.
400 - Bad Request The request was unacceptable, often due to missing a required parameter.
401 - Unauthorized No valid API key provided.
403 - Forbidden The API key doesn't have permissions to perform the request.
404 - Not Found The requested resource doesn't exist.
422 - Unprocessable Entity The server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions.
500, 502, 503, 504 - Server Errors Something went wrong on Casebook's end. (These are rare.)

Special Situations / Considerations 

  • Casebook's Attachment API has a limitation on file upload size, 10MB max.
  • Casebook's People API, the hispanic_or_latino field can only contain one of these values: 'yes', 'no', 'unable to determine', 'unknown'.
  • A Provider's location is required for it to render the provider page, but this is not enforced when creating a provider through the API. It is best practice to include the Provider's location when creating a new Provider through the API. 
  • There is a bi-directional relationship between Providers and locations, which requires you to make a separate PATCH request to fully link the two records.
  • To assign a unit of work to a user, you'll need to:
    • GET the Unit Of Work from the API, read the assignment_id attribute
    • Create an assignment_users record in the Memberships API using that assignment_id and the user_id of the assignee

Data Dependencies

  • All entities that have a Foreign Key need such keys to first be supplied before they can be created. Foreign Key: a relationship field that points to another entity.
  • When creating an attachment in the Attachments API:
    • POST the attachments record
    • Get the pre-signed upload URL (AWS S3)  from the response of that request
    • Upload the file to that URL