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
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).
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