Skip to content

API docs

How to call the Clinic API with a token.

Base URL

Every path in these docs starts here.

Authentication

Send the token in the Authorization header.

Header
Authorization: Bearer {token}

Make a token on the page API tokens

Scopes

A token has one scope for each resource and operation, and the scope of the app.

Resource Read Write Delete
Agent conversations agent-conversations:read agent-conversations:write agent-conversations:delete
Appointments appointments:read appointments:write appointments:delete
Patients patients:read patients:write patients:delete
Procedures procedures:read procedures:write procedures:delete
Providers providers:read providers:write providers:delete
Treatment plans treatment-plans:read treatment-plans:write treatment-plans:delete

app:clinic is always on the token. Write does not include Read. Older tokens can carry read, write, delete for all resources.

Rate limit

60 requests in one minute for each token. The next request gets 429.

Lists

search
Text to find.
filter[field]
Filter by one field. Use filter[field]=value for one value, filter[field]=a,b for a list, filter[field][from] and filter[field][to] for a range, and filter[field]=null or not_null for a null check.
sort
A field. Add - for descending.
page
Starts at 1.
per_page
25 by default, 100 at most.

Errors

Every error is JSON.

Error body
{"message": "..."}
Code Meaning
401 No token, or the token is unknown, revoked or expired.
403 The token has no scope for this call, or no access to this app.
404 The record does not exist.
422 The input is not valid. The body names each field.
429 Too many requests in one minute.

Agent conversations

Operations, fields and examples.

Operations

Method Path Scope What it does
GET /agent-conversations agent-conversations:read List the agent-conversations of the clinic app.
GET /agent-conversations/{id} agent-conversations:read Get one agent-conversations of the clinic app by its id.
POST /agent-conversations agent-conversations:write Create one agent-conversations in the clinic app.
PATCH /agent-conversations/{id} agent-conversations:write Change the given fields of one agent-conversations of the clinic app.
DELETE /agent-conversations/{id} agent-conversations:delete Delete one agent-conversations of the clinic app.
GET /agent-conversations/{id}/comments agent-conversations:read List the comments of one agent-conversations of the clinic app, newest first.
POST /agent-conversations/{id}/comments agent-conversations:write Add a comment to one agent-conversations of the clinic app. The body is plain text, and each mentions id is a member of the clinic app.
DELETE /agent-conversations/{id}/comments/{comment} agent-conversations:delete Delete one comment of one agent-conversations of the clinic app.
GET /agent-conversations/{id}/files agent-conversations:read List the files of one agent-conversations of the clinic app, newest first. The answer gives the metadata and the REST download path, not the file content.
POST /agent-conversations/{id}/files agent-conversations:write Add one file to one agent-conversations of the clinic app.
GET /agent-conversations/{id}/files/{file} agent-conversations:read Download one file of one agent-conversations of the clinic app. The answer is the file content as an attachment, not JSON.
DELETE /agent-conversations/{id}/files/{file} agent-conversations:delete Delete one file of one agent-conversations of the clinic app.

Each record has comments and files. Post a comment with body (plain text, at most 5000 characters) and mentions (a list of user ids of active members of the app, at most 20). Upload one file in the multipart field file, at most 10 MB. The download is an attachment. The scope of the resource applies: read to list and download, write to post and upload, delete to delete.

Fields

Field Type Required on create Note
id uuid No Read only.
subject string, max 255 Yes
patient_id uuid No Can be null.
appointment_id uuid No Can be null.
channel enum: whatsapp, web_chat, phone, email Yes
agent_name string, max 255 Yes
outcome enum: booked, rescheduled, answered, handed_off, unresolved Yes
needs_follow_up boolean No Can be null.
started_at date-time Yes
ended_at date-time No Can be null.
message_count integer No Can be null.
summary string No Can be null.
assigned_to_id integer No Can be null.
created_at date-time No Read only.
updated_at date-time No Read only.

Filters

Filter Type Example
channel Exact filter[channel]=whatsapp
outcome Exact filter[outcome]=booked
needs_follow_up Exact filter[needs_follow_up]=1
patient_id Exact filter[patient_id]=019a0000-0000-7000-8000-000000000000

Sorts and search

Sort by subject, started_at, created_at. Search matches subject, agent_name.

Examples

List the agent-conversations of the clinic app.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/agent-conversations?sort=-subject"
Get one agent-conversations of the clinic app by its id.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/agent-conversations/$ID"
Create one agent-conversations in the clinic app.
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"subject":"Example","channel":"whatsapp","agent_name":"Example","outcome":"booked","started_at":"Example"}' "https://demo.velosyd.com/clinic/api/v1/agent-conversations"
Change the given fields of one agent-conversations of the clinic app.
curl -X PATCH -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"subject":"Example"}' "https://demo.velosyd.com/clinic/api/v1/agent-conversations/$ID"
Delete one agent-conversations of the clinic app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/agent-conversations/$ID"
List the comments of one agent-conversations of the clinic app, newest first.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/agent-conversations/$ID/comments"
Add a comment to one agent-conversations of the clinic app. The body is plain text, and each mentions id is a member of the clinic app.
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"body":"Example"}' "https://demo.velosyd.com/clinic/api/v1/agent-conversations/$ID/comments"
Delete one comment of one agent-conversations of the clinic app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/agent-conversations/$ID/comments/$COMMENT"
List the files of one agent-conversations of the clinic app, newest first. The answer gives the metadata and the REST download path, not the file content.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/agent-conversations/$ID/files"
Add one file to one agent-conversations of the clinic app.
curl -X POST -H "Authorization: Bearer $TOKEN" -F "file=@report.pdf" "https://demo.velosyd.com/clinic/api/v1/agent-conversations/$ID/files"
Download one file of one agent-conversations of the clinic app. The answer is the file content as an attachment, not JSON.
curl -OJ -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/agent-conversations/$ID/files/$FILE"
Delete one file of one agent-conversations of the clinic app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/agent-conversations/$ID/files/$FILE"

Appointments

Operations, fields and examples.

Operations

Method Path Scope What it does
GET /appointments appointments:read List the appointments of the clinic app.
GET /appointments/{id} appointments:read Get one appointments of the clinic app by its id.
POST /appointments appointments:write Create one appointments in the clinic app.
PATCH /appointments/{id} appointments:write Change the given fields of one appointments of the clinic app.
POST /appointments/{id}/confirm appointments:write Run the confirm action on one appointments of the clinic app.
DELETE /appointments/{id} appointments:delete Delete one appointments of the clinic app.
GET /appointments/{id}/comments appointments:read List the comments of one appointments of the clinic app, newest first.
POST /appointments/{id}/comments appointments:write Add a comment to one appointments of the clinic app. The body is plain text, and each mentions id is a member of the clinic app.
DELETE /appointments/{id}/comments/{comment} appointments:delete Delete one comment of one appointments of the clinic app.
GET /appointments/{id}/files appointments:read List the files of one appointments of the clinic app, newest first. The answer gives the metadata and the REST download path, not the file content.
POST /appointments/{id}/files appointments:write Add one file to one appointments of the clinic app.
GET /appointments/{id}/files/{file} appointments:read Download one file of one appointments of the clinic app. The answer is the file content as an attachment, not JSON.
DELETE /appointments/{id}/files/{file} appointments:delete Delete one file of one appointments of the clinic app.

Each record has comments and files. Post a comment with body (plain text, at most 5000 characters) and mentions (a list of user ids of active members of the app, at most 20). Upload one file in the multipart field file, at most 10 MB. The download is an attachment. The scope of the resource applies: read to list and download, write to post and upload, delete to delete.

Fields

Field Type Required on create Note
id uuid No Read only.
title string, max 255 No Can be null.
patient_id uuid Yes
provider_id uuid Yes
procedure_id uuid Yes
starts_at date-time Yes
ends_at date-time No Can be null.
status enum: scheduled, confirmed, checked_in, in_progress, completed, no_show, cancelled No Can be null.
confirmation_sent_at date-time No Read only.
confirmation_message string No Read only.
notes string No Can be null.
created_at date-time No Read only.
updated_at date-time No Read only.

Filters

Filter Type Example
status Exact filter[status]=scheduled
patient_id Exact filter[patient_id]=019a0000-0000-7000-8000-000000000000
provider_id Exact filter[provider_id]=019a0000-0000-7000-8000-000000000000
procedure_id Exact filter[procedure_id]=019a0000-0000-7000-8000-000000000000

Sorts and search

Sort by title, starts_at, created_at. Search matches title.

Examples

List the appointments of the clinic app.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/appointments?sort=-title"
Get one appointments of the clinic app by its id.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/appointments/$ID"
Create one appointments in the clinic app.
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"patient_id":"019a0000-0000-7000-8000-000000000000","provider_id":"019a0000-0000-7000-8000-000000000000","procedure_id":"019a0000-0000-7000-8000-000000000000","starts_at":"Example"}' "https://demo.velosyd.com/clinic/api/v1/appointments"
Change the given fields of one appointments of the clinic app.
curl -X PATCH -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"title":"Example"}' "https://demo.velosyd.com/clinic/api/v1/appointments/$ID"
Run the confirm action on one appointments of the clinic app.
curl -X POST -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/appointments/$ID/confirm"
Delete one appointments of the clinic app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/appointments/$ID"
List the comments of one appointments of the clinic app, newest first.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/appointments/$ID/comments"
Add a comment to one appointments of the clinic app. The body is plain text, and each mentions id is a member of the clinic app.
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"body":"Example"}' "https://demo.velosyd.com/clinic/api/v1/appointments/$ID/comments"
Delete one comment of one appointments of the clinic app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/appointments/$ID/comments/$COMMENT"
List the files of one appointments of the clinic app, newest first. The answer gives the metadata and the REST download path, not the file content.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/appointments/$ID/files"
Add one file to one appointments of the clinic app.
curl -X POST -H "Authorization: Bearer $TOKEN" -F "file=@report.pdf" "https://demo.velosyd.com/clinic/api/v1/appointments/$ID/files"
Download one file of one appointments of the clinic app. The answer is the file content as an attachment, not JSON.
curl -OJ -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/appointments/$ID/files/$FILE"
Delete one file of one appointments of the clinic app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/appointments/$ID/files/$FILE"

Patients

Operations, fields and examples.

Operations

Method Path Scope What it does
GET /patients patients:read List the patients of the clinic app.
GET /patients/{id} patients:read Get one patients of the clinic app by its id.
POST /patients patients:write Create one patients in the clinic app.
PATCH /patients/{id} patients:write Change the given fields of one patients of the clinic app.
DELETE /patients/{id} patients:delete Delete one patients of the clinic app.
GET /patients/{id}/comments patients:read List the comments of one patients of the clinic app, newest first.
POST /patients/{id}/comments patients:write Add a comment to one patients of the clinic app. The body is plain text, and each mentions id is a member of the clinic app.
DELETE /patients/{id}/comments/{comment} patients:delete Delete one comment of one patients of the clinic app.
GET /patients/{id}/files patients:read List the files of one patients of the clinic app, newest first. The answer gives the metadata and the REST download path, not the file content.
POST /patients/{id}/files patients:write Add one file to one patients of the clinic app.
GET /patients/{id}/files/{file} patients:read Download one file of one patients of the clinic app. The answer is the file content as an attachment, not JSON.
DELETE /patients/{id}/files/{file} patients:delete Delete one file of one patients of the clinic app.

Each record has comments and files. Post a comment with body (plain text, at most 5000 characters) and mentions (a list of user ids of active members of the app, at most 20). Upload one file in the multipart field file, at most 10 MB. The download is an attachment. The scope of the resource applies: read to list and download, write to post and upload, delete to delete.

Fields

Field Type Required on create Note
id uuid No Read only.
name string, max 255 Yes
email email, max 255 No Can be null.
phone string, max 50 No Can be null.
birth_date date No Can be null.
status enum: new, active, inactive No Can be null.
insurance_provider string, max 255 No Can be null.
notes string No Can be null.
created_at date-time No Read only.
updated_at date-time No Read only.

Filters

Filter Type Example
status Exact filter[status]=new

Sorts and search

Sort by name, birth_date, created_at. Search matches name, email, phone.

Examples

List the patients of the clinic app.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/patients?sort=-name"
Get one patients of the clinic app by its id.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/patients/$ID"
Create one patients in the clinic app.
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"name":"Example"}' "https://demo.velosyd.com/clinic/api/v1/patients"
Change the given fields of one patients of the clinic app.
curl -X PATCH -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"name":"Example"}' "https://demo.velosyd.com/clinic/api/v1/patients/$ID"
Delete one patients of the clinic app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/patients/$ID"
List the comments of one patients of the clinic app, newest first.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/patients/$ID/comments"
Add a comment to one patients of the clinic app. The body is plain text, and each mentions id is a member of the clinic app.
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"body":"Example"}' "https://demo.velosyd.com/clinic/api/v1/patients/$ID/comments"
Delete one comment of one patients of the clinic app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/patients/$ID/comments/$COMMENT"
List the files of one patients of the clinic app, newest first. The answer gives the metadata and the REST download path, not the file content.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/patients/$ID/files"
Add one file to one patients of the clinic app.
curl -X POST -H "Authorization: Bearer $TOKEN" -F "file=@report.pdf" "https://demo.velosyd.com/clinic/api/v1/patients/$ID/files"
Download one file of one patients of the clinic app. The answer is the file content as an attachment, not JSON.
curl -OJ -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/patients/$ID/files/$FILE"
Delete one file of one patients of the clinic app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/patients/$ID/files/$FILE"

Procedures

Operations, fields and examples.

Operations

Method Path Scope What it does
GET /procedures procedures:read List the procedures of the clinic app.
GET /procedures/{id} procedures:read Get one procedures of the clinic app by its id.
POST /procedures procedures:write Create one procedures in the clinic app.
PATCH /procedures/{id} procedures:write Change the given fields of one procedures of the clinic app.
DELETE /procedures/{id} procedures:delete Delete one procedures of the clinic app.
GET /procedures/{id}/comments procedures:read List the comments of one procedures of the clinic app, newest first.
POST /procedures/{id}/comments procedures:write Add a comment to one procedures of the clinic app. The body is plain text, and each mentions id is a member of the clinic app.
DELETE /procedures/{id}/comments/{comment} procedures:delete Delete one comment of one procedures of the clinic app.
GET /procedures/{id}/files procedures:read List the files of one procedures of the clinic app, newest first. The answer gives the metadata and the REST download path, not the file content.
POST /procedures/{id}/files procedures:write Add one file to one procedures of the clinic app.
GET /procedures/{id}/files/{file} procedures:read Download one file of one procedures of the clinic app. The answer is the file content as an attachment, not JSON.
DELETE /procedures/{id}/files/{file} procedures:delete Delete one file of one procedures of the clinic app.

Each record has comments and files. Post a comment with body (plain text, at most 5000 characters) and mentions (a list of user ids of active members of the app, at most 20). Upload one file in the multipart field file, at most 10 MB. The download is an attachment. The scope of the resource applies: read to list and download, write to post and upload, delete to delete.

Fields

Field Type Required on create Note
id uuid No Read only.
name string, max 255 Yes
code string, max 50 Yes
specialty enum: general_dentistry, hygiene, orthodontics, oral_surgery, endodontics Yes
duration_minutes integer Yes
price decimal string Yes
is_active boolean No Can be null.
description string No Can be null.
created_at date-time No Read only.
updated_at date-time No Read only.

Filters

Filter Type Example
specialty Exact filter[specialty]=general_dentistry
is_active Exact filter[is_active]=1

Sorts and search

Sort by name, code, price, created_at. Search matches name, code.

Examples

List the procedures of the clinic app.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/procedures?sort=-name"
Get one procedures of the clinic app by its id.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/procedures/$ID"
Create one procedures in the clinic app.
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"name":"Example","code":"Example","specialty":"general_dentistry","duration_minutes":1,"price":100}' "https://demo.velosyd.com/clinic/api/v1/procedures"
Change the given fields of one procedures of the clinic app.
curl -X PATCH -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"name":"Example"}' "https://demo.velosyd.com/clinic/api/v1/procedures/$ID"
Delete one procedures of the clinic app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/procedures/$ID"
List the comments of one procedures of the clinic app, newest first.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/procedures/$ID/comments"
Add a comment to one procedures of the clinic app. The body is plain text, and each mentions id is a member of the clinic app.
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"body":"Example"}' "https://demo.velosyd.com/clinic/api/v1/procedures/$ID/comments"
Delete one comment of one procedures of the clinic app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/procedures/$ID/comments/$COMMENT"
List the files of one procedures of the clinic app, newest first. The answer gives the metadata and the REST download path, not the file content.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/procedures/$ID/files"
Add one file to one procedures of the clinic app.
curl -X POST -H "Authorization: Bearer $TOKEN" -F "file=@report.pdf" "https://demo.velosyd.com/clinic/api/v1/procedures/$ID/files"
Download one file of one procedures of the clinic app. The answer is the file content as an attachment, not JSON.
curl -OJ -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/procedures/$ID/files/$FILE"
Delete one file of one procedures of the clinic app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/procedures/$ID/files/$FILE"

Providers

Operations, fields and examples.

Operations

Method Path Scope What it does
GET /providers providers:read List the providers of the clinic app.
GET /providers/{id} providers:read Get one providers of the clinic app by its id.
POST /providers providers:write Create one providers in the clinic app.
PATCH /providers/{id} providers:write Change the given fields of one providers of the clinic app.
DELETE /providers/{id} providers:delete Delete one providers of the clinic app.
GET /providers/{id}/comments providers:read List the comments of one providers of the clinic app, newest first.
POST /providers/{id}/comments providers:write Add a comment to one providers of the clinic app. The body is plain text, and each mentions id is a member of the clinic app.
DELETE /providers/{id}/comments/{comment} providers:delete Delete one comment of one providers of the clinic app.
GET /providers/{id}/files providers:read List the files of one providers of the clinic app, newest first. The answer gives the metadata and the REST download path, not the file content.
POST /providers/{id}/files providers:write Add one file to one providers of the clinic app.
GET /providers/{id}/files/{file} providers:read Download one file of one providers of the clinic app. The answer is the file content as an attachment, not JSON.
DELETE /providers/{id}/files/{file} providers:delete Delete one file of one providers of the clinic app.

Each record has comments and files. Post a comment with body (plain text, at most 5000 characters) and mentions (a list of user ids of active members of the app, at most 20). Upload one file in the multipart field file, at most 10 MB. The download is an attachment. The scope of the resource applies: read to list and download, write to post and upload, delete to delete.

Fields

Field Type Required on create Note
id uuid No Read only.
name string, max 255 Yes
user_id integer No Can be null.
email email, max 255 No Can be null.
phone string, max 50 No Can be null.
specialty enum: general_dentistry, hygiene, orthodontics, oral_surgery, endodontics Yes
is_active boolean No Can be null.
created_at date-time No Read only.
updated_at date-time No Read only.

Filters

Filter Type Example
specialty Exact filter[specialty]=general_dentistry
is_active Exact filter[is_active]=1

Sorts and search

Sort by name, created_at. Search matches name, email.

Examples

List the providers of the clinic app.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/providers?sort=-name"
Get one providers of the clinic app by its id.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/providers/$ID"
Create one providers in the clinic app.
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"name":"Example","specialty":"general_dentistry"}' "https://demo.velosyd.com/clinic/api/v1/providers"
Change the given fields of one providers of the clinic app.
curl -X PATCH -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"name":"Example"}' "https://demo.velosyd.com/clinic/api/v1/providers/$ID"
Delete one providers of the clinic app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/providers/$ID"
List the comments of one providers of the clinic app, newest first.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/providers/$ID/comments"
Add a comment to one providers of the clinic app. The body is plain text, and each mentions id is a member of the clinic app.
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"body":"Example"}' "https://demo.velosyd.com/clinic/api/v1/providers/$ID/comments"
Delete one comment of one providers of the clinic app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/providers/$ID/comments/$COMMENT"
List the files of one providers of the clinic app, newest first. The answer gives the metadata and the REST download path, not the file content.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/providers/$ID/files"
Add one file to one providers of the clinic app.
curl -X POST -H "Authorization: Bearer $TOKEN" -F "file=@report.pdf" "https://demo.velosyd.com/clinic/api/v1/providers/$ID/files"
Download one file of one providers of the clinic app. The answer is the file content as an attachment, not JSON.
curl -OJ -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/providers/$ID/files/$FILE"
Delete one file of one providers of the clinic app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/providers/$ID/files/$FILE"

Treatment plans

Operations, fields and examples.

Operations

Method Path Scope What it does
GET /treatment-plans treatment-plans:read List the treatment-plans of the clinic app.
GET /treatment-plans/{id} treatment-plans:read Get one treatment-plans of the clinic app by its id.
POST /treatment-plans treatment-plans:write Create one treatment-plans in the clinic app.
PATCH /treatment-plans/{id} treatment-plans:write Change the given fields of one treatment-plans of the clinic app.
DELETE /treatment-plans/{id} treatment-plans:delete Delete one treatment-plans of the clinic app.
GET /treatment-plans/{id}/comments treatment-plans:read List the comments of one treatment-plans of the clinic app, newest first.
POST /treatment-plans/{id}/comments treatment-plans:write Add a comment to one treatment-plans of the clinic app. The body is plain text, and each mentions id is a member of the clinic app.
DELETE /treatment-plans/{id}/comments/{comment} treatment-plans:delete Delete one comment of one treatment-plans of the clinic app.
GET /treatment-plans/{id}/files treatment-plans:read List the files of one treatment-plans of the clinic app, newest first. The answer gives the metadata and the REST download path, not the file content.
POST /treatment-plans/{id}/files treatment-plans:write Add one file to one treatment-plans of the clinic app.
GET /treatment-plans/{id}/files/{file} treatment-plans:read Download one file of one treatment-plans of the clinic app. The answer is the file content as an attachment, not JSON.
DELETE /treatment-plans/{id}/files/{file} treatment-plans:delete Delete one file of one treatment-plans of the clinic app.

Each record has comments and files. Post a comment with body (plain text, at most 5000 characters) and mentions (a list of user ids of active members of the app, at most 20). Upload one file in the multipart field file, at most 10 MB. The download is an attachment. The scope of the resource applies: read to list and download, write to post and upload, delete to delete.

Fields

Field Type Required on create Note
id uuid No Read only.
title string, max 255 Yes
patient_id uuid Yes
provider_id uuid Yes
status enum: draft, presented, accepted, in_progress, completed, declined No Can be null.
total decimal string No Read only.
presented_on date No Can be null.
notes string No Can be null.
created_at date-time No Read only.
updated_at date-time No Read only.

Filters

Filter Type Example
status Exact filter[status]=draft
patient_id Exact filter[patient_id]=019a0000-0000-7000-8000-000000000000
provider_id Exact filter[provider_id]=019a0000-0000-7000-8000-000000000000

Sorts and search

Sort by title, total, created_at. Search matches title.

Examples

List the treatment-plans of the clinic app.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/treatment-plans?sort=-title"
Get one treatment-plans of the clinic app by its id.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/treatment-plans/$ID"
Create one treatment-plans in the clinic app.
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"title":"Example","patient_id":"019a0000-0000-7000-8000-000000000000","provider_id":"019a0000-0000-7000-8000-000000000000"}' "https://demo.velosyd.com/clinic/api/v1/treatment-plans"
Change the given fields of one treatment-plans of the clinic app.
curl -X PATCH -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"title":"Example"}' "https://demo.velosyd.com/clinic/api/v1/treatment-plans/$ID"
Delete one treatment-plans of the clinic app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/treatment-plans/$ID"
List the comments of one treatment-plans of the clinic app, newest first.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/treatment-plans/$ID/comments"
Add a comment to one treatment-plans of the clinic app. The body is plain text, and each mentions id is a member of the clinic app.
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"body":"Example"}' "https://demo.velosyd.com/clinic/api/v1/treatment-plans/$ID/comments"
Delete one comment of one treatment-plans of the clinic app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/treatment-plans/$ID/comments/$COMMENT"
List the files of one treatment-plans of the clinic app, newest first. The answer gives the metadata and the REST download path, not the file content.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/treatment-plans/$ID/files"
Add one file to one treatment-plans of the clinic app.
curl -X POST -H "Authorization: Bearer $TOKEN" -F "file=@report.pdf" "https://demo.velosyd.com/clinic/api/v1/treatment-plans/$ID/files"
Download one file of one treatment-plans of the clinic app. The answer is the file content as an attachment, not JSON.
curl -OJ -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/treatment-plans/$ID/files/$FILE"
Delete one file of one treatment-plans of the clinic app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/clinic/api/v1/treatment-plans/$ID/files/$FILE"