Pagination

All top-level list endpoints can be paginated. They return a meta tag that contains all pagination data.

Example Request

curl "https://api-us-snd.fullscript.io/api/clinic/patients?page[number]=2&page[size]=20" \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Example Response

{
  "patients": [
    {...}
  ],
  "meta": {
    "current_page": 2,
    "next_page": null,
    "prev_page": 1,
    "total_pages": 2,
    "total_count": 40
  }
}

Request IDs

All API requests sent will respond with an X-Request-Id in its response header. This value uniquely identifies each request. If you are having trouble with a particular request please provide the X-Request-Id identifier for the fastest possible resolution.

Example

'x-request-id: 06ded6a2-cb35-43e7-9f83-a4b705e3e588'

Versioning

The API version you use controls the behaviour of the API. The first time you register to use Fullscript's API you will be assigned the latest version.

The current version for Fullscript's API is Version 2. If we ever make a breaking change to the API we will release a new dated patch_version with the new behaviour. We do this to avoid breaking any of your code. It's up to you to upgrade if / when you want to.

The latest patch_version is 2020-02-14.

Backwards compatible changes

The Fullscript API considers the following changes to be backwards compatible (ie. non-breaking changes).

  • Adding new API resources
  • Adding new optional request parameters to an existing resource
  • Adding new keys/attributes to existing API responses
  • Changing the order of parameters in an existing API response
  • Changing the format or length of IDs or strings

Clinic

This endpoints retrieves information about the clinic provided from the X-FS-Clinic-Key.

Retrieve a clinic

This endpoints retrieves information about the clinic provided from the X-FS-Clinic-Key.

Arguments

No arguments...

GET

curl "https://api-us-snd.fullscript.io/api/clinic" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

clinic

id

string

Unique identifier of the clinic.

name

string

Name of the clinic.

patient_count

number

Number of patients that belong to the clinic.

practitioner_count

number

Number of practitioners that belong to the clinic.

discount

number

Discount level of the clinic. This discount (in percentage) is the global discount level of the clinic that will be applied to all patient orders (in addition to any patient-level discount).

dispensary_url

string

Patient-facing dispensary url.

integration_id

string

Unique identifier for the clinic's integration.

integration_activated_at

string

Moment in time when a clinic's integration is considered active. This happens on the very first request made using a valid X-FS-Clinic-Key.

margin_type

string

The clinic's effective margin type. It could be one of the following: variable for margin clinics or never for never margin clinics.

Example response

{
  "clinic": {
    "id": "xx7x357x-9x36-xxxx-x553-7x3xx398xxx",
    "name": "Dr. Example's Clinic",
    "patient_count": 0,
    "practitioner_count": 1,
    "discount": 0,
    "dispensary_url": "https://api-us-snd.fullscript.io/login/drexamplesclinic",
    "integration_id": "x1x0196x-5615-4874-xxx4-48x459180x09",
    "integration_activated_at": "2018-10-10T04:00:00.000Z",
    "margin_type": "variable"
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `clinic:read` scoped enabled."
}

Staff

The staff object contains a record of all available staff members that belong to a clinic. The API allows you to create and update staff members. It also allows you to list all staff and find individual staff members.

List all staff

This resource allows you to list all of a clinic's staff.

Arguments

No arguments...

GET

curl "https://api-us-snd.fullscript.io/api/clinic/staff" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

staff

id

string

Unique identifier of the staff member.

first_name

string

First name of the staff member.

last_name

string

Last name of the staff member.

email

string

Unique email of the staff member. Staff emails in Fullscript are unique.

metadata

object

Metadata that has been attached to the staff member.

id

string

Your system's unique staff identifier.

meta

current_page

number

The current page number of the API response.

next_page

number

Then next page number (if available).

prev_page

number

The previous page number (if available).

total_pages

number

Total number of pages that are available in the API response.

total_count

number

Total number of records available in the resource.

Example response

{
  "staff": [
    {
      "id": "xxx00xx-000-xxxx-xxx1-xxx111x0x0x",
      "first_name": "Example",
      "last_name": "Staff",
      "email": "staff@example.com",
      "metadata": {
        "id": "9999-9999-9999"
      }
    },
    {
      "id": "xxx11xx-111-xxxx-xxx0-xxx000x1x1x",
      "first_name": "Other",
      "last_name": "Staff",
      "email": "other.staff@example.com",
      "metadata": {
        "id": null
      }
    }
  ],
  "meta": {
    "current_page": 1,
    "next_page": null,
    "prev_page": null,
    "total_pages": 1,
    "total_count": 2
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `clinic:read` scoped enabled."
}

Create a staff member

Creates a new staff member

Arguments

email

string

REQUIRED

Unique Email for the staff member

first_name

string

REQUIRED

Staff member's first name

last_name

string

REQUIRED

Staff member's last name

metadata

object

Metadata to be attached to the staff member.

id

string

Your system's unique staff identifier.

POST

curl -X 'POST' "https://api-us-snd.fullscript.io/api/clinic/staff" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX' \ 
  -d $'{
  "email": "string",
  "first_name": "string",
  "last_name": "string",
  "metadata": {
    "id": "string"
  }
}'

Responses

201

Created

staff

id

string

Unique identifier of the staff member.

first_name

string

First name of the staff member.

last_name

string

Last name of the staff member.

email

string

Unique email of the staff member. Staff emails in Fullscript are unique.

metadata

object

Metadata that has been attached to the staff member.

id

string

Your system's unique staff identifier.

Example response

{
  "staff": {
    "id": "xx9598xx-x765-xxxx-81x8-846050x15x85",
    "first_name": "Example",
    "last_name": "Staff",
    "email": "example_staff@example.com",
    "metadata": {
      "id": "xx9598xx-x765-xxxx-81x8-846050x15x85"
    }
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method."
}
422

Unprocessable Entity

error

string

Error description.

Example response - 422

{
  "error": "[\"Last name can't be blank\"]"
}

Retrieve a staff member

Retrieves an existing staff member. You need to supply the unique ID for the staff member.

Arguments

id

string

REQUIRED

Unique ID for the staff member

GET

curl "https://api-us-snd.fullscript.io/api/clinic/staff/{id}" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

staff

id

string

Unique identifier of the staff member.

first_name

string

First name of the staff member.

last_name

string

Last name of the staff member.

email

string

Unique email of the staff member. Staff emails in Fullscript are unique.

metadata

object

Metadata that has been attached to the staff member.

id

string

Your system's unique staff identifier.

Example response

{
  "staff": {
    "id": "xxx00xx-000-xxxx-xxx1-xxx111x0x0x",
    "first_name": "Example",
    "last_name": "Staff",
    "email": "staff@example.com",
    "metadata": {
      "id": "9999-9999-9999"
    }
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method."
}
404

Not Found

error

string

Error description.

Example response - 404

{
  "error": "staff's ID is missing or invalid"
}

Update a staff member

Updates a specific staff member with the attributes that you pass in. Parameters not provided will remain unchanged.

Arguments

id

string

REQUIRED

Unique Identifier for the staff member

email

string

Unique Email for the staff member

first_name

string

Staff member's first name

last_name

string

Staff member's last name

metadata

object

Metadata to be attached to the staff member.

id

string

Your system's unique staff identifier.

PATCH

curl -X 'PATCH' "https://api-us-snd.fullscript.io/api/clinic/staff/{id}" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX' \ 
  -d $'{
  "email": "string",
  "first_name": "string",
  "last_name": "string",
  "metadata": {
    "id": "string"
  }
}'

Responses

200

OK

staff

id

string

Unique identifier of the staff member.

first_name

string

First name of the staff member.

last_name

string

Last name of the staff member.

email

string

Unique email of the staff member. Staff emails in Fullscript are unique.

metadata

object

Metadata that has been attached to the staff member.

id

string

Your system's unique staff identifier.

Example response

{
  "staff": {
    "id": "xxx00xx-000-xxxx-xxx1-xxx111x0x0x",
    "first_name": "Updated",
    "last_name": "Name",
    "email": "updatedemail@example.com",
    "metadata": {
      "id": "1234"
    }
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method."
}
404

Not Found

error

string

Error description.

Example response - 404

{
  "error": "staff's ID is missing or invalid"
}
422

Unprocessable Entity

error

string

Error description.

Example response - 422

{
  "error": "[\"Email has already been taken\"]"
}

Practitioners

The practitioner object contains a record of all available practitioners that belong to a clinic. The API allows you to create and update practitioners. It also allows you to list all practitioners and find individual practitioners.

List all practitioners

This resource allows you to list all of a clinic's practitioners.

Arguments

No arguments...

GET

curl "https://api-us-snd.fullscript.io/api/clinic/practitioners" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

practitioners

id

string

Unique identifier of the practitioner.

practitioner_type_id

string

Unique Identifier for the Practitioner's Type

first_name

string

First name of the practitioner.

last_name

string

Last name of the practitioner.

email

string

Unique email of the practitioner. Practitioner emails in Fullscript are unique.

invite_accepted

boolean

Whether or not the practitioner has accepted their user invite and has a valid user account.

metadata

object

Metadata that has been attached to the practitioner.

id

string

Your system's unique practitioner identifier.

meta

current_page

number

The current page number of the API response.

next_page

number

Then next page number (if available).

prev_page

number

The previous page number (if available).

total_pages

number

Total number of pages that are available in the API response.

total_count

number

Total number of records available in the resource.

Example response

{
  "practitioners": [
    {
      "id": "8xx00x67-9684-4679-8x79-xx5fxx12327x",
      "first_name": "Doctor",
      "last_name": "Example",
      "email": "the_doctor@example.com",
      "practitioner_type_id": "xx55x681-5340-425x-x212-4954xxx92x7x",
      "invite_accepted": true,
      "metadata": {
        "id": "9999-9999-9999"
      }
    },
    {
      "id": "x1x0196x-5615-4874-xxx4-48x459180x09",
      "first_name": "Example",
      "last_name": "Practitioner",
      "email": "practitioner@example.com",
      "practitioner_type_id": "xx55x681-5340-425x-x212-4954xxx92x7x",
      "invite_accepted": true,
      "metadata": {
        "id": null
      }
    }
  ],
  "meta": {
    "current_page": 1,
    "next_page": null,
    "prev_page": null,
    "total_pages": 1,
    "total_count": 2
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `clinic:read` scoped enabled."
}

Create a practitioner

Creates a new practitioner

Arguments

practitioner_type_id

string

REQUIRED

Unique Identifier for the Practitioner's Type

email

string

REQUIRED

Unique Email for the Practitioner

first_name

string

REQUIRED

Practitioner's first name

last_name

string

REQUIRED

Practitioner's last name

metadata

object

Metadata to be attached to the practitioner.

id

string

Your system's unique practitioner identifier.

POST

curl -X 'POST' "https://api-us-snd.fullscript.io/api/clinic/practitioners" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX' \ 
  -d $'{
  "practitioner_type_id": "string",
  "email": "string",
  "first_name": "string",
  "last_name": "string",
  "metadata": {
    "id": "string"
  }
}'

Responses

201

Created

practitioner

id

string

Unique identifier of the practitioner.

practitioner_type_id

string

Unique Identifier for the Practitioner's Type

first_name

string

First name of the practitioner.

last_name

string

Last name of the practitioner.

email

string

Unique email of the practitioner. Practitioner emails in Fullscript are unique.

invite_accepted

boolean

Whether or not the practitioner has accepted their user invite and has a valid user account.

metadata

object

Metadata that has been attached to the practitioner.

id

string

Your system's unique practitioner identifier.

Example response

{
  "practitioner": {
    "id": "xx9598xx-x765-xxxx-81x8-847050x15x85",
    "first_name": "Another",
    "last_name": "Doctor",
    "email": "another_doctor@example.com",
    "practitioner_type_id": "xx55x681-5340-425x-x212-4954xxx92x7x",
    "invite_accepted": false,
    "metadata": {
      "id": "123"
    }
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `clinic:write` scoped enabled."
}
404

Not Found

error

string

Error description.

Example response - 404

{
  "error": "practitioner's type ID is missing or invalid"
}

Retrieve a practitioner

Retrieves an existing practitioner. You need to supply the unique ID for the practitioner.

Arguments

id

string

REQUIRED

Unique ID for the Practitioner

GET

curl "https://api-us-snd.fullscript.io/api/clinic/practitioners/{id}" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

practitioner

id

string

Unique identifier of the practitioner.

practitioner_type_id

string

Unique Identifier for the Practitioner's Type

first_name

string

First name of the practitioner.

last_name

string

Last name of the practitioner.

email

string

Unique email of the practitioner. Practitioner emails in Fullscript are unique.

invite_accepted

boolean

Whether or not the practitioner has accepted their user invite and has a valid user account.

metadata

object

Metadata that has been attached to the practitioner.

id

string

Your system's unique practitioner identifier.

Example response

{
  "practitioner": {
    "id": "8xx00x67-9684-4679-8x79-xx5fxx12327x",
    "first_name": "Doctor",
    "last_name": "Example",
    "email": "the_doctor@example.com",
    "practitioner_type_id": "xx55x681-5340-425x-x212-4954xxx92x7x",
    "invite_accepted": true,
    "metadata": {
      "id": "9999-9999-9999"
    }
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `clinic:read` scoped enabled."
}
404

Not Found

error

string

Error description.

Example response - 404

{
  "error": "practitioner's ID is missing or invalid"
}

Update a practitioner

Updates a specific practitioner with the attributes that you pass in. Parameters not provided will remain unchanged.

Arguments

id

string

REQUIRED

Unique Identifier for the Practitioner

email

string

Unique Email for the Practitioner

first_name

string

Practitioner's first name

last_name

string

Practitioner's last name

metadata

object

Metadata to be attached to the practitioner.

id

string

Your system's unique practitioner identifier.

PATCH

curl -X 'PATCH' "https://api-us-snd.fullscript.io/api/clinic/practitioners/{id}" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX' \ 
  -d $'{
  "email": "string",
  "first_name": "string",
  "last_name": "string",
  "metadata": {
    "id": "string"
  }
}'

Responses

200

OK

practitioner

id

string

Unique identifier of the practitioner.

practitioner_type_id

string

Unique Identifier for the Practitioner's Type

first_name

string

First name of the practitioner.

last_name

string

Last name of the practitioner.

email

string

Unique email of the practitioner. Practitioner emails in Fullscript are unique.

invite_accepted

boolean

Whether or not the practitioner has accepted their user invite and has a valid user account.

metadata

object

Metadata that has been attached to the practitioner.

id

string

Your system's unique practitioner identifier.

Example response

{
  "practitioner": {
    "id": "8xx00x67-9684-4679-8x79-xx5fxx12327x",
    "first_name": "Doctor",
    "last_name": "Smith",
    "email": "dr_smith99@example.com",
    "practitioner_type_id": "xx55x681-5340-425x-x212-4954xxx92x7x",
    "invite_accepted": true,
    "metadata": {
      "id": "123"
    }
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `clinic:write` scoped enabled."
}
404

Not Found

error

string

Error description.

Example response - 404

{
  "error": "practitioner's ID is missing or invalid"
}

Practitioner Types

The practitioner type object contains details for all the practitioner types available. The API allows you to list all practitioner types.

List all practitioner types

This resource allows you to list all practitioner types.

Arguments

No arguments...

GET

curl "https://api-us-snd.fullscript.io/api/catalog/practitioner_types" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

practitioner_types

id

string

Unique identifier of the practitioner type.

code

string

Short code for the practitioner type.

description

string

Description for the practitioner type.

meta

current_page

number

The current page number of the API response.

next_page

number

Then next page number (if available).

prev_page

number

The previous page number (if available).

total_pages

number

Total number of pages that are available in the API response.

total_count

number

Total number of records available in the resource.

Example response

{
  "practitioner_types": [
    {
      "id": "xx55x681-5340-425x-x212-4954xxx92x7x",
      "code": "ND",
      "description": "Naturopathic Doctor"
    }
  ],
  "meta": {
    "current_page": 1,
    "next_page": null,
    "prev_page": null,
    "total_pages": 1,
    "total_count": 1
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `catalog:read` scope enabled."
}

Protocols

The protocol object contains a record of all treatment plan protocols made by, shared with a practitioner or created by Fullscript. Protocols use a treatment plan as a template that can be re-used when writing prescriptions. Protocols were previously known as templates.

List all Fullscript protocols

The Fullscript protocol object contains a list of all treatment plan protocols that have been created by Fullscript.

Arguments

sort_by

string

Accepts a name argument.

order_by

string

Can take an argument of ASC or DESC.

GET

curl "https://api-us-snd.fullscript.io/api/clinic/fullscript_protocols" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

protocols

id

string

Unique identifier of the protocol.

name

string

Name of the protocol.

current_state

string

The state of the protocol, can be draft, active or cancelled.

ownership_type

string

Specifies whether the protocol was created by, shared with the practitioner or created by Fullscript. This can be one of the following strings: owned, shared or fullscript.

meta

current_page

number

The current page number of the API response.

next_page

number

Then next page number (if available).

prev_page

number

The previous page number (if available).

total_pages

number

Total number of pages that are available in the API response.

total_count

number

Total number of records available in the resource.

Example response

{
  "protocols": [
    {
      "id": "2x28xx67-x5xx-408x-8820-x5x00x617148",
      "name": "Cold and Flu Season",
      "current_state": "active",
      "ownership_type": "fullscript"
    }
  ],
  "meta": {
    "current_page": 1,
    "next_page": null,
    "prev_page": null,
    "total_pages": 1,
    "total_count": 1
  }
}

List all practitioner protocols

The practitioner protocol object contains a record of all treatment plan protocols that belong to a practitioner.

Arguments

practitioner_id

string

REQUIRED

Unique ID for the Practitioner

current_state

string

Takes an argument of active, draft or cancelled to return active, draft or cancelled protocols.

sort_by

string

Accepts one of the following arguments: name or current_state.

order_by

string

Ordering defaults to ASC and can take an argument of ASC or DESC.

ownership_type

string

Takes an argument of owned, shared or all to return only protocols created by the practitioner, only protocols shared with the practitioner, or both protocols created by and shared with the practitioner, respectively. If this argument is not included, only protocols created by the practitioner are returned.

GET

curl "https://api-us-snd.fullscript.io/api/clinic/practitioners/{practitioner_id}/protocols" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

protocols

id

string

Unique identifier of the protocol.

name

string

Name of the protocol.

current_state

string

The state of the protocol, can be draft, active or cancelled.

ownership_type

string

Specifies whether the protocol was created by, shared with the practitioner or created by Fullscript. This can be one of the following strings: owned, shared or fullscript.

meta

current_page

number

The current page number of the API response.

next_page

number

Then next page number (if available).

prev_page

number

The previous page number (if available).

total_pages

number

Total number of pages that are available in the API response.

total_count

number

Total number of records available in the resource.

Example response

{
  "protocols": [
    {
      "id": "2x28xx67-x5xx-408x-8820-x5x00x617148",
      "name": "Cold and Flu Season",
      "current_state": "active",
      "ownership_type": "owned"
    }
  ],
  "meta": {
    "current_page": 1,
    "next_page": null,
    "prev_page": null,
    "total_pages": 1,
    "total_count": 1
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `clinic:read` scoped enabled."
}
404

Not Found

error

string

Error description.

Example response - 404

{
  "error": "Practitioner ID is missing or invalid."
}
422

Unprocessable Entity

error

string

Error description.

Example response - 422

{
  "error": "ownership_type must be one of `owned`, `shared`, or `all`"
}

Retrieve a protocol

Retrieves an existing protocol.

Arguments

id

string

REQUIRED

Unique identifier of the protocol.

GET

curl "https://api-us-snd.fullscript.io/api/clinic/protocols/{id}" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

protocol

id

string

Unique identifier of the protocol.

name

string

Name of the protocol.

current_state

string

The state of the protocol, can be draft, active or cancelled.

practitioner

object

Practitioner who created the protocol.

id

string

Unique identifier of the practitioner.

personal_message

string

A personal message that a practitioner can attach to the protocol.

recommendations

array

Rx plan for a product.

variant_id

string

Unique ID for the Variant.

quantity_recommended

integer

Quantity (number of units) of variant to recommend.

refill

boolean

Send refill reminders?

dosage_amount

string

The dose to take. Expects numbers but can include a range or a fraction (e.g. 1, or 1-2, or 1/2 are all valid).

dosage_frequency

string

The frequency with which to take the dose. This can be any of the following strings: once per day, twice per day, three times per day, four times per day, every morning, or every night.

dosage_duration

string

The period for which to take the dose. This can be the number of days (e.g. 120 for 4 months) or it can be any of the following strings: as needed, until symptoms resolve, or ongoing.

dosage_permutations

string

Extra instructions for taking dose (e.g. With meals).

dosage_format

string

Format of the recommended dose. This can be any of the following strings: capsule, chewable, gel, liquid, lozenge, packet, pellet, powder, strip, suppository, or tablet.

Example response

{
  "protocol": {
    "id": "2x28xx67-x5xx-408x-8820-x5x00x617148",
    "name": "Cold and Flu Season",
    "current_state": "active",
    "practitioner": {
      "id": "8xx00x67-9684-4679-8x79-xx5fxx12327x"
    },
    "personal_message": "Take with a meal. Not on an empty stomach.",
    "recommendations": [
      {
        "variant_id": "xx2688x2-4303-4278-xx73-x7083x6146x1",
        "refill": false,
        "dosage_amount": "4",
        "dosage_frequency": "three times per day",
        "dosage_duration": null,
        "dosage_permutations": "with food",
        "dosage_format": "capsule",
        "quantity_recommended": 1
      }
    ]
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `clinic:read` scoped enabled."
}
404

Not Found

error

string

Error description.

Example response - 404

{
  "error": "Protocol ID is missing or invalid."
}

Templates

The template object contains a record of all treatment plan templates made by a practitioner. Templates use a treatment plan as a template that can be re-used when writing prescriptions. Templates are soon being deprecated and replaced with protocols.

List all practitioner templates

The practitioner template object contains a record of all treatment plan templates that belong to a practitioner.

Arguments

practitioner_id

string

REQUIRED

Unique ID for the Practitioner

GET

curl "https://api-us-snd.fullscript.io/api/clinic/practitioners/{practitioner_id}/templates" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

templates

id

string

Unique identifier of the template.

name

string

Name of the template.

current_state

string

The state of the template, can be draft, active or cancelled.

meta

current_page

number

The current page number of the API response.

next_page

number

Then next page number (if available).

prev_page

number

The previous page number (if available).

total_pages

number

Total number of pages that are available in the API response.

total_count

number

Total number of records available in the resource.

Example response

{
  "templates": [
    {
      "id": "2x28xx67-x5xx-408x-8820-x5x00x617148",
      "name": "Cold and Flu Season",
      "current_state": "active"
    }
  ],
  "meta": {
    "current_page": 1,
    "next_page": null,
    "prev_page": null,
    "total_pages": 1,
    "total_count": 1
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `clinic:read` scoped enabled."
}
404

Not Found

error

string

Error description.

Example response - 404

{
  "error": "Practitioner ID is missing or invalid."
}

Retrieve a template

Retrieves an existing template.

Arguments

id

string

REQUIRED

Unique identifier of the Template.

GET

curl "https://api-us-snd.fullscript.io/api/clinic/templates/{id}" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

template

id

string

Unique identifier of the template.

name

string

Name of the template.

current_state

string

The state of the template, can be draft, active or cancelled.

practitioner_id

string

Unique identifier of the practitioner who made the template.

personal_message

string

A personal message that a practitioner can attach to the template.

recommendations

array

Rx plan for a product.

variant_id

string

Unique ID for the Variant.

quantity_recommended

integer

Quantity (number of units) of variant to recommend.

refill

boolean

Send refill reminders?

dosage_amount

string

The dose to take. Expects numbers but can include a range or a fraction (e.g. 1, or 1-2, or 1/2 are all valid).

dosage_frequency

string

The frequency with which to take the dose. This can be any of the following strings: once per day, twice per day, three times per day, four times per day, every morning, or every night.

dosage_duration

string

The period for which to take the dose. This can be the number of days (e.g. 120 for 4 months) or it can be any of the following strings: as needed, until symptoms resolve, or ongoing.

dosage_permutations

string

Extra instructions for taking dose (e.g. With meals).

dosage_format

string

Format of the recommended dose. This can be any of the following strings: capsule, chewable, gel, liquid, lozenge, packet, pellet, powder, strip, suppository, or tablet.

Example response

{
  "template": {
    "id": "2x28xx67-x5xx-408x-8820-x5x00x617148",
    "name": "Cold and Flu Season",
    "current_state": "active",
    "practitioner_id": "8xx00x67-9684-4679-8x79-xx5fxx12327x",
    "personal_message": "Take with a meal. Not on an empty stomach.",
    "recommendations": [
      {
        "variant_id": "xx2688x2-4303-4278-xx73-x7083x6146x1",
        "refill": false,
        "dosage_amount": "4",
        "dosage_frequency": "three times per day",
        "dosage_duration": null,
        "dosage_permutations": "with food",
        "dosage_format": "capsule",
        "quantity_recommended": 1
      }
    ]
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `clinic:read` scoped enabled."
}
404

Not Found

error

string

Error description.

Example response - 404

{
  "error": "Template ID is missing or invalid."
}

Metadata

Metadata allows you to update specific objects in Fullscript with an ID of your choosing. Currently we support updating Patient, Practitioner, Staff, and TreatmentPlan objects with metadata.

Metadata is useful for storing identifiers from your system into Fullscript — making it easier to link up users from your system into ours. For example, you could use metadata to attach your system's user ID to a Practitioner or Patient. Then using the metadata endpoint you can retrieve that same object using the ID's from your system.

Find objects

To look up objects by your system's identifier. The object type and ID can be provided to filter results.

Arguments

id

string

Your system's identifier.

type

object

The type of object. Can be one of patient, practitioner, staff, or treatment_plan.

GET

curl "https://api-us-snd.fullscript.io/api/clinic/metadata" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

metadata

id

string

Your system's identifier.

type

string

The type of object. Can be one of patient, practitioner, staff, or treatment_plan.

data

object

The object from the Fullscript system will be populated here.

meta

current_page

number

The current page number of the API response.

next_page

number

Then next page number (if available).

prev_page

number

The previous page number (if available).

total_pages

number

Total number of pages that are available in the API response.

total_count

number

Total number of records available in the resource.

Example response

{
  "metadata": [
    {
      "id": "9999-9999-9999",
      "type": "patient",
      "data": {
        "id": "x1x0196x-5615-4874-xxe4-48x459180x09",
        "first_name": "Example",
        "last_name": "Patient",
        "email": "patient@example.com",
        "archived": false,
        "date_of_birth": null,
        "gender": null,
        "discount": 0,
        "total_discount": 0,
        "mobile_number": null,
        "text_message_notification": true,
        "metadata": {
          "id": "9999-9999-9999"
        }
      }
    }
  ],
  "meta": {
    "current_page": 1,
    "next_page": null,
    "prev_page": null,
    "total_pages": 1,
    "total_count": 1
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `catalog:read` scope enabled."
}

Patients

The patient object contains a record of all available patients that belong to a clinic. The API allows you to create and update patients. It also allows you to list all patients and find individual patients.

List all patients

This resource allows you to list all of a clinic's patients.

Arguments

No arguments...

GET

curl "https://api-us-snd.fullscript.io/api/clinic/patients" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

patients

id

string

Unique identifier of the patient.

first_name

string

First name of the patient.

last_name

string

Last name of the patient.

email

string

Unique email of the patient.

archived

boolean

If true, patient is no longer active and can not sign in to Fullscript.

meta

current_page

number

The current page number of the API response.

next_page

number

Then next page number (if available).

prev_page

number

The previous page number (if available).

total_pages

number

Total number of pages that are available in the API response.

total_count

number

Total number of records available in the resource.

Example response

{
  "patients": [
    {
      "id": "x1x0196x-5615-4874-xxe4-48x459180x09",
      "first_name": "Example",
      "last_name": "Patient",
      "email": "patient@example.com",
      "archived": false
    }
  ],
  "meta": {
    "current_page": 1,
    "next_page": null,
    "prev_page": null,
    "total_pages": 1,
    "total_count": 1
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `patients:read` scope enabled."
}

Create a patient

Creates a new patient

Arguments

email

string

REQUIRED

Unique Email for the Patient

first_name

string

REQUIRED

Patient's first name

last_name

string

REQUIRED

Patient's last name

date_of_birth

string

Patient's date of birth in the format yyyy-mm-dd

gender

string

Gender of the patient. Valid options are 'male', 'female', or 'x'.

mobile_number

string

Patient's mobile number in the format +12223334444

send_welcome_email

string

Sends a welcome email to the patient upon successful creation. Defaults to true.

discount

string

Patient discount level (in percentage). This discount does not include the clinic discount. Defaults to 0.

metadata

object

Metadata to be attached to the patient.

id

string

Your system's unique patient identifier.

POST

curl -X 'POST' "https://api-us-snd.fullscript.io/api/clinic/patients" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX' \ 
  -d $'{
  "email": "string",
  "first_name": "string",
  "last_name": "string",
  "date_of_birth": "string",
  "gender": "string",
  "mobile_number": "string",
  "send_welcome_email": "string",
  "discount": "string",
  "metadata": {
    "id": "string"
  }
}'

Responses

201

Created

patient

id

string

Unique identifier of the patient.

first_name

string

First name of the patient.

last_name

string

Last name of the patient.

email

string

Unique email of the patient.

archived

boolean

If true, patient is no longer active and can not sign in to Fullscript.

date_of_birth

string

Date of birth of the patient in the format yyyy-mm-dd.

gender

string

Gender of the patient. Valid options are 'male', 'female', or 'x'.

discount

number

Patient discount level (in percentage). This discount does not include the clinic discount. This discount, in addition to any clinic discount, will be applied to all of the patient's orders.

total_discount

number

Total patient discount level (in percentage). This discount includes the clinic discount and the patient discount. This discount is applied to all of the patient's orders.

mobile_number

string

Valid phone number for a patient.

text_message_notification

boolean

true or false of whether the patient has elected to receive text message notifications from Fullscript.

metadata

object

Metadata that has been attached to the patient.

id

string

Your system's unique patient identifier.

Example response

{
  "patient": {
    "id": "x1x0196x-5615-4874-xxe4-48x459180x09",
    "first_name": "Example",
    "last_name": "Patient",
    "email": "example_patient@fullscript.com",
    "archived": false,
    "date_of_birth": "1977-01-12",
    "gender": "female",
    "discount": 10,
    "total_discount": 10,
    "mobile_number": "+12223334444",
    "text_message_notification": true,
    "metadata": {
      "id": "9999-9999-9999"
    }
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `patients:write` scoped enabled."
}
422

Unprocessable Entity

error

string

Error description.

Example response - 422

{
  "error": "[\"Last name can't be blank\"]"
}

Retrieve a patient

Retrieves an existing patient. You need to supply the unique ID for the patient.

Arguments

id

string

REQUIRED

Unique ID for the Patient

GET

curl "https://api-us-snd.fullscript.io/api/clinic/patients/{id}" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

patient

id

string

Unique identifier of the patient.

first_name

string

First name of the patient.

last_name

string

Last name of the patient.

email

string

Unique email of the patient.

archived

boolean

If true, patient is no longer active and can not sign in to Fullscript.

date_of_birth

string

Date of birth of the patient in the format yyyy-mm-dd.

gender

string

Gender of the patient. Valid options are 'male', 'female', or 'x'.

discount

number

Patient discount level (in percentage). This discount does not include the clinic discount. This discount, in addition to any clinic discount, will be applied to all of the patient's orders.

total_discount

number

Total patient discount level (in percentage). This discount includes the clinic discount and the patient discount. This discount is applied to all of the patient's orders.

mobile_number

string

Valid phone number for a patient.

text_message_notification

boolean

true or false of whether the patient has elected to receive text message notifications from Fullscript.

metadata

object

Metadata that has been attached to the patient.

id

string

Your system's unique patient identifier.

Example response

{
  "patient": {
    "id": "x1x0196x-5615-4874-xxe4-48x459180x09",
    "first_name": "Example",
    "last_name": "Patient",
    "email": "patient@example.com",
    "archived": false,
    "date_of_birth": null,
    "gender": "female",
    "discount": 0,
    "total_discount": 0,
    "mobile_number": null,
    "text_message_notification": true,
    "metadata": {
      "id": "9999-9999-9999"
    }
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `patients:read` scope enabled."
}
404

Not Found

error

string

Error description.

Example response - 404

{
  "error": "patient's ID is missing or invalid"
}

Update a patient

Updates a specific patient with the attributes that you pass in. Parameters not provided will remain unchanged.

Arguments

id

string

REQUIRED

Unique ID for the Patient

email

string

Unique Email for the Patient

first_name

string

Patient's first name

last_name

string

Patient's last name

date_of_birth

string

Patient's date of birth in the format yyyy-mm-dd

gender

string

Gender of the patient. Valid options are 'male', 'female', or 'x'.

mobile_number

string

Patient's mobile number in the format +12223334444

discount

string

Patient discount level (in percentage). This discount does not include the clinic discount. Defaults to 0.

metadata

object

Metadata to be attached to the patient.

id

string

Your system's unique patient identifier.

PATCH

curl -X 'PATCH' "https://api-us-snd.fullscript.io/api/clinic/patients/{id}" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX' \ 
  -d $'{
  "email": "string",
  "first_name": "string",
  "last_name": "string",
  "date_of_birth": "string",
  "gender": "string",
  "mobile_number": "string",
  "discount": "string",
  "metadata": {
    "id": "string"
  }
}'

Responses

200

OK

patient

id

string

Unique identifier of the patient.

first_name

string

First name of the patient.

last_name

string

Last name of the patient.

email

string

Unique email of the patient.

archived

boolean

If true, patient is no longer active and can not sign in to Fullscript.

date_of_birth

string

Date of birth of the patient in the format yyyy-mm-dd.

gender

string

Gender of the patient. Valid options are 'male', 'female', or 'x'.

discount

number

Patient discount level (in percentage). This discount does not include the clinic discount. This discount, in addition to any clinic discount, will be applied to all of the patient's orders.

total_discount

number

Total patient discount level (in percentage). This discount includes the clinic discount and the patient discount. This discount is applied to all of the patient's orders.

mobile_number

string

Valid phone number for a patient.

text_message_notification

boolean

true or false of whether the patient has elected to receive text message notifications from Fullscript.

metadata

object

Metadata that has been attached to the patient.

id

string

Your system's unique patient identifier.

Example response

{
  "patient": {
    "id": "x1x0196x-5615-4874-xxe4-48x459180x09",
    "first_name": "Ben",
    "last_name": "Peters",
    "email": "patient@example.com",
    "archived": false,
    "date_of_birth": null,
    "gender": "female",
    "discount": 0,
    "total_discount": 0,
    "mobile_number": null,
    "text_message_notification": true,
    "metadata": {
      "id": "9999-9999-9999"
    }
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `patients:write` scoped enabled."
}
404

Not Found

error

string

Error description.

Example response - 404

{
  "error": "patient's ID is missing or invalid"
}
422

Unprocessable Entity

error

string

Error description.

Example response - 422

{
  "error": "[\"Discount must be less than or equal to 35\"]"
}

Search for patients

This resource allows you to search for patients by first_name, last_name, or by email.

Arguments

query

string

Search for patients matching a query string.

GET

curl "https://api-us-snd.fullscript.io/api/clinic/search/patients" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

patients

id

string

Unique identifier of the patient.

first_name

string

First name of the patient.

last_name

string

Last name of the patient.

email

string

Unique email of the patient.

archived

boolean

If true, patient is no longer active and can not sign in to Fullscript.

meta

current_page

number

The current page number of the API response.

next_page

number

Then next page number (if available).

prev_page

number

The previous page number (if available).

total_pages

number

Total number of pages that are available in the API response.

total_count

number

Total number of records available in the resource.

Example response

{
  "patients": [
    {
      "id": "x1x0196x-5615-4874-xxe4-48x459180x09",
      "first_name": "Example",
      "last_name": "Patient",
      "email": "patient@example.com",
      "archived": false
    }
  ],
  "meta": {
    "current_page": 1,
    "next_page": null,
    "prev_page": null,
    "total_pages": 1,
    "total_count": 1
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `patients:read` scope enabled."
}

Address

The address object contains a record of all addresses that a patient has made. In this API you can look up the address on an individual patient.

List All Patient Addresses

The address object contains a record of all addresses that belong to a patient.

Arguments

patient_id

string

REQUIRED

Unique ID for the patient.

GET

curl "https://api-us-snd.fullscript.io/api/clinic/patients/{patient_id}/addresses" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

addresses

id

string

Unique identifier of the address.

address1

string

Street Address of the address.

address2

string

Apartment/Floor/Suite or Building # of the address.

zipcode

string

Zipcode (US) or Postal Code (Canada) of the address.

city

string

City of the address.

state

string

State (US) or Province (Canada) of the address.

country

string

The country of the address.

meta

current_page

number

The current page number of the API response.

next_page

number

Then next page number (if available).

prev_page

number

The previous page number (if available).

total_pages

number

Total number of pages that are available in the API response.

total_count

number

Total number of records available in the resource.

Example response

{
  "addresses": [
    {
      "id": "c7323855-3e77-4829-b1ec-83cd14e09ea2",
      "address1": "8445 E. Hartford Dr.",
      "address2": null,
      "zipcode": "85255",
      "city": "Scottsdale",
      "state": "AZ",
      "country": "US"
    }
  ],
  "meta": {
    "current_page": 1,
    "next_page": null,
    "prev_page": null,
    "total_pages": 1,
    "total_count": 1
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `patients:read` scope enabled."
}
404

Not Found

error

string

Error description.

Example response - 404

{
  "error": "Patient ID is missing or invalid."
}

Orders

The order object contains a record of all completed or refunded orders that a patient has made.

List all orders

This resource returns all orders for the clinic and can be filtered by the following attributes.

Arguments

patient_id

string

Filter orders by patient_id.

treatment_plan_id

string

Filter orders by treatment_plan_id.

completed_at

string

Filter orders by completed_at. The date must be formatted as follows yyyy-mm-dd.

  • less than: Return orders where the completed_at date is less than. <yyyy-mm-dd.
  • greater than: Return orders where the completed_at date is greater than. >yyyy-mm-dd.
  • within a range: Return orders where the completed_at date is with in a range. yyyy-mm-dd..yyyy-mm-dd.
order_number

string

Filter orders by order_number.

sort_by

string

Accepts one of the following arguments: patient_id, treatment_plan_id, completed_at and order_number.

order_by

string

Ordering defaults to ASC and can take an argument of ASC or DESC.

GET

curl "https://api-us-snd.fullscript.io/api/clinic/orders" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

orders

id

string

Unique identifier of the order.

order_number

string

Public order ID.

completed_at

string

Timestamp for when the order was completed.

treatment_plan_ids

array

Unique identifiers for the order's treatment plans.

variant_ids

array

Unique identifiers for the order's variants.

patient_id

string

Unique identifier for the order's patient.

meta

current_page

number

The current page number of the API response.

next_page

number

Then next page number (if available).

prev_page

number

The previous page number (if available).

total_pages

number

Total number of pages that are available in the API response.

total_count

number

Total number of records available in the resource.

Example response

{
  "orders": [
    {
      "id": "391xx4xx-67x5-44x2-8x2x-8886x20x083x",
      "order_number": "R000000000",
      "completed_at": "2018-03-02T13:26:02.000-05:00",
      "treatment_plan_ids": [
        "xx45x0xx-x840-41xx-9922-98xx6001507x"
      ],
      "variant_ids": [
        "xx2688x2-4303-4278-xx73-x7083x6146x1"
      ],
      "patient_id": "x1x0196x-5615-4874-xxe4-48x459180x09"
    }
  ],
  "meta": {
    "current_page": 1,
    "next_page": null,
    "prev_page": null,
    "total_pages": 1,
    "total_count": 1
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `patients:order_history` scoped enabled."
}

Retrieve an Order

Retrieves an existing Order.

Arguments

id

string

REQUIRED

Unique identifier of the Order.

GET

curl "https://api-us-snd.fullscript.io/api/clinic/orders/{id}" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

order

id

string

Unique identifier of the order.

order_number

string

Public order ID.

completed_at

string

Timestamp for when the order was completed.

treatment_plan_ids

array

Unique identifiers for the order's treatment plans.

patient_id

string

Unique identifier for the order's patient.

item_total

string

Current total amount of an order before taxes / shipping costs but including any patient or clinic discounts (if applied).

msrp_total

string

Current total amount of an order before taxes / shipping costs.

payment_total

string

Current total amount of an order including any taxes, shipping costs, and refunds.

line_items

array

Individual line items on an order.

variant_id

string

Unique ID for the variant.

quantity

integer

Quantity of the variant.

Example response

{
  "order": {
    "id": "391xx4xx-67x5-44x2-8x2x-8886x20x083x",
    "order_number": "R000000000",
    "completed_at": "2018-03-02T13:26:02.000-05:00",
    "treatment_plan_ids": [
      "xx45x0xx-x840-41xx-9922-98xx6001507x"
    ],
    "patient_id": "x1x0196x-5615-4874-xxe4-48x459180x09",
    "item_total": "59.97",
    "msrp_total": "59.97",
    "payment_total": "64.96",
    "line_items": [
      {
        "variant_id": "xx2688x2-4303-4278-xx73-x7083x6146x1",
        "quantity": 3
      }
    ]
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `patients:order_history` scoped enabled."
}
404

Not Found

error

string

Error description.

Example response - 404

{
  "error": "Order ID is missing or invalid."
}

List all patient orders

The patient order object contains a record of all completed or refunded orders that belong to a patient.

Arguments

patient_id

string

REQUIRED

Unique ID for the Patient

GET

curl "https://api-us-snd.fullscript.io/api/clinic/patients/{patient_id}/orders" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

orders

id

string

Unique identifier of the order.

order_number

string

Public order ID.

completed_at

string

Timestamp for when the order was completed.

treatment_plan_ids

array

Unique identifiers for the order's treatment plans.

variant_ids

array

Unique identifiers for the order's variants.

meta

current_page

number

The current page number of the API response.

next_page

number

Then next page number (if available).

prev_page

number

The previous page number (if available).

total_pages

number

Total number of pages that are available in the API response.

total_count

number

Total number of records available in the resource.

Example response

{
  "orders": [
    {
      "id": "391xx4xx-67x5-44x2-8x2x-8886x20x083x",
      "order_number": "R000000000",
      "completed_at": "2018-03-02T13:26:02.000-05:00",
      "treatment_plan_ids": [
        "xx45x0xx-x840-41xx-9922-98xx6001507x"
      ],
      "variant_ids": [
        "xx2688x2-4303-4278-xx73-x7083x6146x1"
      ]
    }
  ],
  "meta": {
    "current_page": 1,
    "next_page": null,
    "prev_page": null,
    "total_pages": 1,
    "total_count": 1
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `patients:order_history` scoped enabled."
}

Treatment Plans

The treatment plan object is the way for practitioners create prescriptions in Fullscript. The API allows you to create treatment plans. It also allows you to list all treatment plans that belong to a patient and find individual treatment plans.

Activate a treatment plan

Activates a draft Treatment Plan for a patient.

Arguments

treatment_plan_id

string

REQUIRED

Unique ID for the Treatment plan.

PATCH

curl -X 'PATCH' "https://api-us-snd.fullscript.io/api/clinic/treatment_plans/{treatment_plan_id}/activate" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

treatment_plan

id

string

Unique ID for the treatment plan.

patient

object

Patient whom the treatment plan belongs to.

id

string

Unique ID for the Patient.

practitioner

object

Practitioner who created the treatment plan.

id

string

Unique identifier of the practitioner.

state

string

The state of the treatment plan. It has 3 possible values draft, active or cancelled.

available_at

string

The date when the treatment plan was sent to the patient either through an email or text message.

created_at

string

Timestamp (in utc) when the Treatment Plan was created.

updated_at

string

Timestamp (in utc) when the Treatment Plan was updated.

invitation_url

string

Fullscript url for a patient to view their treatment plan.

personal_message

string

A personal message that a practitioner can attach to the treatment plan.

recommendations

array

Rx plan for a product.

variant_id

string

Unique ID for the Variant.

units_to_purchase

integer

Quantity (number of units) of variant to recommend.

refill

boolean

Send refill reminders?

dosage

object

Dosage information for the for the recommednation.

amount

string

The dose to take. Expects numbers but can include a range or a fraction (e.g. 1, or 1-2, or 1/2 are all valid).

frequency

string

The frequency with which to take the dose. This can be any of the following strings: once per day, twice per day, three times per day, four times per day, every morning, or every night.

duration

string

The period for which to take the dose. This can be the number of days (e.g. 120 for 4 months) or it can be any of the following strings: as needed, until symptoms resolve, or ongoing.

additional_info

string

Extra instructions for taking dose (e.g. With meals).

format

string

Format of the recommended dose. This can be any of the following strings: capsule, chewable, gel, liquid, lozenge, packet, pellet, drops, powder, strip, suppository, or tablet.

metadata

object

Metadata that has been attached to the treatment_plan.

id

string

Your system's unique treatment_plan identifier.

Example response

{
  "treatment_plan": {
    "id": "xx45x0xx-x840-41xx-9922-98xx6001507x",
    "state": "active",
    "patient": {
      "id": "x1x0196x-5615-4874-xxe4-48x459180x09"
    },
    "practitioner": {
      "id": "x1x0196x-5615-4874-xxx4-48x459180x09"
    },
    "available_at": "2018-03-02",
    "created_at": "2020-01-01T05:00:00.000Z",
    "updated_at": "2020-01-01T05:00:00.000Z",
    "invitation_url": "https://fullscript.io/welcome/drexample/999999xxxxx",
    "recommendations": [
      {
        "variant_id": "xx2688x2-4303-4278-xx73-x7083x6146x1",
        "refill": false,
        "units_to_purchase": 10,
        "dosage": {
          "amount": "1-2",
          "frequency": "once per day",
          "duration": null,
          "format": "capsule",
          "additional_info": "with food"
        }
      }
    ],
    "personal_message": null,
    "metadata": {
      "id": null
    }
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `clinic:write` scoped enabled."
}
404

Not Found

error

string

Error description.

Example response - 404

{
  "error": "TreatmentPlan ID is missing or invalid."
}
422

Unprocessable Entity

error

string

Error description.

Example response - 422

{
  "error": "It's not possible to activate a active treatment_plan. Please ensure your treatment_plan is a draft."
}

Cancel a treatment plan

Cancels an active Treatment Plan for a patient.

Arguments

treatment_plan_id

string

REQUIRED

Unique ID for the Treatment plan.

PATCH

curl -X 'PATCH' "https://api-us-snd.fullscript.io/api/clinic/treatment_plans/{treatment_plan_id}/cancel" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

treatment_plan

id

string

Unique ID for the treatment plan.

patient

object

Patient whom the treatment plan belongs to.

id

string

Unique ID for the Patient.

practitioner

object

Practitioner who created the treatment plan.

id

string

Unique identifier of the practitioner.

state

string

The state of the treatment plan. It has 3 possible values draft, active or cancelled.

available_at

string

The date when the treatment plan was sent to the patient either through an email or text message.

created_at

string

Timestamp (in utc) when the Treatment Plan was created.

updated_at

string

Timestamp (in utc) when the Treatment Plan was updated.

invitation_url

string

Fullscript url for a patient to view their treatment plan.

personal_message

string

A personal message that a practitioner can attach to the treatment plan.

recommendations

array

Rx plan for a product.

variant_id

string

Unique ID for the Variant.

units_to_purchase

integer

Quantity (number of units) of variant to recommend.

refill

boolean

Send refill reminders?

dosage

object

Dosage information for the for the recommednation.

amount

string

The dose to take. Expects numbers but can include a range or a fraction (e.g. 1, or 1-2, or 1/2 are all valid).

frequency

string

The frequency with which to take the dose. This can be any of the following strings: once per day, twice per day, three times per day, four times per day, every morning, or every night.

duration

string

The period for which to take the dose. This can be the number of days (e.g. 120 for 4 months) or it can be any of the following strings: as needed, until symptoms resolve, or ongoing.

additional_info

string

Extra instructions for taking dose (e.g. With meals).

format

string

Format of the recommended dose. This can be any of the following strings: capsule, chewable, gel, liquid, lozenge, packet, pellet, drops, powder, strip, suppository, or tablet.

metadata

object

Metadata that has been attached to the treatment_plan.

id

string

Your system's unique treatment_plan identifier.

Example response

{
  "treatment_plan": {
    "id": "xx45x0xx-x840-41xx-9922-98xx6001507x",
    "state": "cancelled",
    "patient": {
      "id": "x1x0196x-5615-4874-xxe4-48x459180x09"
    },
    "practitioner": {
      "id": "x1x0196x-5615-4874-xxx4-48x459180x09"
    },
    "available_at": "2018-03-02",
    "created_at": "2020-01-01T05:00:00.000Z",
    "updated_at": "2020-01-01T05:00:00.000Z",
    "invitation_url": "https://fullscript.io/welcome/drexample/999999xxxxx",
    "recommendations": [],
    "personal_message": null,
    "metadata": {
      "id": null
    }
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `clinic:write` scoped enabled."
}
404

Not Found

error

string

Error description.

Example response - 404

{
  "error": "TreatmentPlan ID is missing or invalid."
}
422

Unprocessable Entity

error

string

Error description.

Example response - 422

{
  "error": "It's not possible to update a cancelled treatment_plan."
}

List all patient treatment plans

This resource allows you to list all of a patient's treatment plans.

Arguments

patient_id

string

REQUIRED

Unique ID for the Patient

sort_by

string

Accepts one of the following arguments: created_at or updated_at.

order_by

string

Ordering defaults to ASC and can take an argument of ASC or DESC.

GET

curl "https://api-us-snd.fullscript.io/api/clinic/patients/{patient_id}/treatment_plans" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

treatment_plans

id

string

Unique ID for the treatment plan.

state

string

The state of the treatment plan. It has 3 possible values draft, active or cancelled.

patient

object

Patient whom the treatment plan belongs to.

id

string

Unique ID for the Patient.

practitioner

object

Practitioner who created the treatment plan.

id

string

Unique identifier of the practitioner.

available_at

string

The date when the treatment plan was sent to the patient either through an email or text message.

created_at

string

Timestamp (in utc) when the Treatment Plan was created.

updated_at

string

Timestamp (in utc) when the Treatment Plan was updated.

meta

current_page

number

The current page number of the API response.

next_page

number

Then next page number (if available).

prev_page

number

The previous page number (if available).

total_pages

number

Total number of pages that are available in the API response.

total_count

number

Total number of records available in the resource.

Example response

{
  "treatment_plans": [
    {
      "id": "xx45x0xx-x840-41xx-9922-98xx6001507x",
      "state": "active",
      "patient": {
        "id": "x1x0196x-5615-4874-xxe4-48x459180x09"
      },
      "practitioner": {
        "id": "x1x0196x-5615-4874-xxx4-48x459180x09"
      },
      "available_at": "2018-03-02",
      "created_at": "2020-01-01T05:00:00.000Z",
      "updated_at": "2020-01-01T05:00:00.000Z"
    },
    {
      "id": "x1x01x6x-5615-4874-xxx4-48x459180x09",
      "state": "active",
      "patient": {
        "id": "x1x0196x-5615-4874-xxe4-48x459180x09"
      },
      "practitioner": {
        "id": "x1x0196x-5615-4874-xxx4-48x459180x09"
      },
      "available_at": "2020-01-01",
      "created_at": "2020-01-01T05:00:00.000Z",
      "updated_at": "2020-01-01T05:00:00.000Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "next_page": null,
    "prev_page": null,
    "total_pages": 1,
    "total_count": 2
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `patients:read` scope enabled or must have `patients:treatment_plan_history` scope enabled."
}
404

Not Found

error

string

Error description.

Example response - 404

{
  "error": "patient_id is missing or invalid"
}

Create a patient treatment plan

Creates a new Treatment Plan for a patient.

Arguments

patient_id

string

REQUIRED

Unique ID for the Patient.

practitioner_id

string

Unique practitioner ID. Required if the current access token's resource owner type is Staff or Clinic. Otherwise defaults to the practitioner who owns the token, but can be specified to create the plan on behalf of a different practitioner.

personal_message

string

A personal message that a practitioner can attach to the treatment plan.

state

string

The state of the treatment plan. Takes an option of draft or active. Defaults to active if null. The value draft allows to create a draft treatment plan. The value active or null creates an active treatment plan.

recommendations

array

REQUIRED

Rx plan for a product.

variant_id

string

REQUIRED

Unique ID for the Variant.

units_to_purchase

string

REQUIRED

Quantity (number of units) of variant to recommend.

refill

string

Send refill reminders?

dosage

object

Dosage information for the for the recommednation.

amount

string

The dose to take. Expects numbers but can include a range or a fraction (e.g. 1, or 1-2, or 1/2 are all valid).

frequency

string

The frequency with which to take the dose. This can be any of the following strings: once per day, twice per day, three times per day, four times per day, every morning, or every night.

duration

string

The period for which to take the dose. This can be the number of days (e.g. 120 for 4 months) or it can be any of the following strings: as needed, until symptoms resolve, or ongoing.

additional_info

string

Extra instructions for taking dose (e.g. With meals).

format

string

Format of the recommended dose. This can be any of the following strings: capsule, chewable, gel, liquid, lozenge, packet, pellet, drops, powder, strip, suppository, or tablet.

metadata

object

Metadata to be attached to the treatment_plan.

id

string

Your system's unique treatment_plan identifier.

POST

curl -X 'POST' "https://api-us-snd.fullscript.io/api/clinic/patients/{patient_id}/treatment_plans" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX' \ 
  -d $'{
  "practitioner_id": "string",
  "personal_message": "string",
  "state": "string",
  "recommendations": [
    {
      "variant_id": "string",
      "units_to_purchase": "string",
      "refill": "string",
      "dosage": {
        "amount": "string",
        "frequency": "string",
        "duration": "string",
        "additional_info": "string",
        "format": "string"
      }
    }
  ],
  "metadata": {
    "id": "string"
  }
}'

Responses

201

Created

treatment_plan

id

string

Unique ID for the treatment plan.

patient

object

Patient whom the treatment plan belongs to.

id

string

Unique ID for the Patient.

practitioner

object

Practitioner who created the treatment plan.

id

string

Unique identifier of the practitioner.

state

string

The state of the treatment plan. It has 3 possible values draft, active or cancelled.

available_at

string

The date when the treatment plan was sent to the patient either through an email or text message.

created_at

string

Timestamp (in utc) when the Treatment Plan was created.

updated_at

string

Timestamp (in utc) when the Treatment Plan was updated.

invitation_url

string

Fullscript url for a patient to view their treatment plan.

personal_message

string

A personal message that a practitioner can attach to the treatment plan.

recommendations

array

Rx plan for a product.

variant_id

string

Unique ID for the Variant.

units_to_purchase

integer

Quantity (number of units) of variant to recommend.

refill

boolean

Send refill reminders?

dosage

object

Dosage information for the for the recommednation.

amount

string

The dose to take. Expects numbers but can include a range or a fraction (e.g. 1, or 1-2, or 1/2 are all valid).

frequency

string

The frequency with which to take the dose. This can be any of the following strings: once per day, twice per day, three times per day, four times per day, every morning, or every night.

duration

string

The period for which to take the dose. This can be the number of days (e.g. 120 for 4 months) or it can be any of the following strings: as needed, until symptoms resolve, or ongoing.

additional_info

string

Extra instructions for taking dose (e.g. With meals).

format

string

Format of the recommended dose. This can be any of the following strings: capsule, chewable, gel, liquid, lozenge, packet, pellet, drops, powder, strip, suppository, or tablet.

metadata

object

Metadata that has been attached to the treatment_plan.

id

string

Your system's unique treatment_plan identifier.

Example response

{
  "treatment_plan": {
    "id": "70x0x171-xxxx-4xx8-xxx6-79391x5xx8xx",
    "state": "active",
    "patient": {
      "id": "x1x0196x-5615-4874-xxe4-48x459180x09"
    },
    "practitioner": {
      "id": "x1x0196x-5615-4874-xxx4-48x459180x09"
    },
    "available_at": "2018-04-11",
    "created_at": "2020-01-01T05:00:00.000Z",
    "updated_at": "2020-01-01T05:00:00.000Z",
    "invitation_url": "https://fullscript.io/welcome/drexample/999999xxxxx",
    "recommendations": [
      {
        "variant_id": "xx2688x2-4303-4278-xx73-x7083x6146x1",
        "refill": true,
        "units_to_purchase": 1,
        "dosage": {
          "amount": "1-2",
          "frequency": "once per day",
          "duration": "as needed",
          "format": "capsule",
          "additional_info": "with food"
        }
      }
    ],
    "personal_message": "Take with a meal. Not on an empty stomach. Try to take this at the same time every day for best results.",
    "metadata": {
      "id": "123"
    }
  }
}
422

Unprocessable Entity

error

string

Error description.

Example response - 422

{
  "error": "Unable to create a treatment plan without any recommendations"
}

Retrieve a treatment plan

Retrieves an existing treatment plan. You need to supply the unique ID for the treatment plan.

Arguments

id

string

REQUIRED

Unique ID for the Treatment Plan

GET

curl "https://api-us-snd.fullscript.io/api/clinic/treatment_plans/{id}" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

treatment_plan

id

string

Unique ID for the treatment plan.

patient

object

Patient whom the treatment plan belongs to.

id

string

Unique ID for the Patient.

practitioner

object

Practitioner who created the treatment plan.

id

string

Unique identifier of the practitioner.

state

string

The state of the treatment plan. It has 3 possible values draft, active or cancelled.

available_at

string

The date when the treatment plan was sent to the patient either through an email or text message.

created_at

string

Timestamp (in utc) when the Treatment Plan was created.

updated_at

string

Timestamp (in utc) when the Treatment Plan was updated.

invitation_url

string

Fullscript url for a patient to view their treatment plan.

personal_message

string

A personal message that a practitioner can attach to the treatment plan.

recommendations

array

Rx plan for a product.

variant_id

string

Unique ID for the Variant.

units_to_purchase

integer

Quantity (number of units) of variant to recommend.

refill

boolean

Send refill reminders?

dosage

object

Dosage information for the for the recommednation.

amount

string

The dose to take. Expects numbers but can include a range or a fraction (e.g. 1, or 1-2, or 1/2 are all valid).

frequency

string

The frequency with which to take the dose. This can be any of the following strings: once per day, twice per day, three times per day, four times per day, every morning, or every night.

duration

string

The period for which to take the dose. This can be the number of days (e.g. 120 for 4 months) or it can be any of the following strings: as needed, until symptoms resolve, or ongoing.

additional_info

string

Extra instructions for taking dose (e.g. With meals).

format

string

Format of the recommended dose. This can be any of the following strings: capsule, chewable, gel, liquid, lozenge, packet, pellet, drops, powder, strip, suppository, or tablet.

metadata

object

Metadata that has been attached to the treatment_plan.

id

string

Your system's unique treatment_plan identifier.

Example response

{
  "treatment_plan": {
    "id": "xx45x0xx-x840-41xx-9922-98xx6001507x",
    "state": "active",
    "patient": {
      "id": "x1x0196x-5615-4874-xxe4-48x459180x09"
    },
    "practitioner": {
      "id": "x1x0196x-5615-4874-xxx4-48x459180x09"
    },
    "available_at": "2018-03-02",
    "created_at": "2020-01-01T05:00:00.000Z",
    "updated_at": "2020-01-01T05:00:00.000Z",
    "invitation_url": "https://fullscript.io/welcome/drexample/999999xxxxx",
    "recommendations": [
      {
        "variant_id": "xx2688x2-4303-4278-xx73-x7083x6146x1",
        "refill": false,
        "units_to_purchase": 10,
        "dosage": {
          "amount": "1-2",
          "frequency": "once per day",
          "duration": null,
          "format": "capsule",
          "additional_info": "with food"
        }
      }
    ],
    "personal_message": null,
    "metadata": {
      "id": "9999-9999-9999"
    }
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `patients:treatment_plan_history` scoped enabled."
}
404

Not Found

error

string

Error description.

Example response - 404

{
  "error": "TreatmentPlan ID is missing or invalid."
}

Update a treatment plan

Updates a Treatment Plan for a patient.

Arguments

id

string

REQUIRED

Unique ID for the Treatment plan.

personal_message

string

A personal message that a practitioner can attach to the treatment plan.

recommendations

array

REQUIRED

Rx plan for a product.

variant_id

string

REQUIRED

Unique ID for the Variant.

units_to_purchase

string

REQUIRED

Quantity (number of units) of variant to recommend.

refill

string

Send refill reminders?

dosage

object

Dosage information for the for the recommednation.

amount

string

The dose to take. Expects numbers but can include a range or a fraction (e.g. 1, or 1-2, or 1/2 are all valid).

frequency

string

The frequency with which to take the dose. This can be any of the following strings: once per day, twice per day, three times per day, four times per day, every morning, or every night.

duration

string

The period for which to take the dose. This can be the number of days (e.g. 120 for 4 months) or it can be any of the following strings: as needed, until symptoms resolve, or ongoing.

additional_info

string

Extra instructions for taking dose (e.g. With meals).

format

string

Format of the recommended dose. This can be any of the following strings: capsule, chewable, gel, liquid, lozenge, packet, pellet, drops, powder, strip, suppository, or tablet.

metadata

object

Metadata to be attached to the treatment_plan.

id

string

Your system's unique treatment_plan identifier.

PATCH

curl -X 'PATCH' "https://api-us-snd.fullscript.io/api/clinic/treatment_plans/{id}" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX' \ 
  -d $'{
  "personal_message": "string",
  "recommendations": [
    {
      "variant_id": "string",
      "units_to_purchase": "string",
      "refill": "string",
      "dosage": {
        "amount": "string",
        "frequency": "string",
        "duration": "string",
        "additional_info": "string",
        "format": "string"
      }
    }
  ],
  "metadata": {
    "id": "string"
  }
}'

Responses

200

OK

treatment_plan

id

string

Unique ID for the treatment plan.

patient

object

Patient whom the treatment plan belongs to.

id

string

Unique ID for the Patient.

practitioner

object

Practitioner who created the treatment plan.

id

string

Unique identifier of the practitioner.

state

string

The state of the treatment plan. It has 3 possible values draft, active or cancelled.

available_at

string

The date when the treatment plan was sent to the patient either through an email or text message.

created_at

string

Timestamp (in utc) when the Treatment Plan was created.

updated_at

string

Timestamp (in utc) when the Treatment Plan was updated.

invitation_url

string

Fullscript url for a patient to view their treatment plan.

personal_message

string

A personal message that a practitioner can attach to the treatment plan.

recommendations

array

Rx plan for a product.

variant_id

string

Unique ID for the Variant.

units_to_purchase

integer

Quantity (number of units) of variant to recommend.

refill

boolean

Send refill reminders?

dosage

object

Dosage information for the for the recommednation.

amount

string

The dose to take. Expects numbers but can include a range or a fraction (e.g. 1, or 1-2, or 1/2 are all valid).

frequency

string

The frequency with which to take the dose. This can be any of the following strings: once per day, twice per day, three times per day, four times per day, every morning, or every night.

duration

string

The period for which to take the dose. This can be the number of days (e.g. 120 for 4 months) or it can be any of the following strings: as needed, until symptoms resolve, or ongoing.

additional_info

string

Extra instructions for taking dose (e.g. With meals).

format

string

Format of the recommended dose. This can be any of the following strings: capsule, chewable, gel, liquid, lozenge, packet, pellet, drops, powder, strip, suppository, or tablet.

metadata

object

Metadata that has been attached to the treatment_plan.

id

string

Your system's unique treatment_plan identifier.

Example response

{
  "treatment_plan": {
    "id": "xx45x0xx-x840-41xx-9922-98xx6001507x",
    "state": "active",
    "patient": {
      "id": "x1x0196x-5615-4874-xxe4-48x459180x09"
    },
    "practitioner": {
      "id": "x1x0196x-5615-4874-xxx4-48x459180x09"
    },
    "available_at": "2018-03-02",
    "created_at": "2020-01-01T05:00:00.000Z",
    "updated_at": "2020-01-01T05:00:00.000Z",
    "invitation_url": "https://fullscript.io/welcome/drexample/999999xxxxx",
    "recommendations": [
      {
        "variant_id": "xx2688x2-4303-4278-xx73-x7083x6146x1",
        "refill": false,
        "units_to_purchase": 1,
        "dosage": {
          "amount": "1-2",
          "frequency": "once per day",
          "duration": "as needed",
          "format": "capsule",
          "additional_info": "with food"
        }
      }
    ],
    "personal_message": "Take with a meal. Not on an empty stomach.",
    "metadata": {
      "id": "9999-9999-9999"
    }
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `clinic:write` scoped enabled."
}
422

Unprocessable Entity

error

string

Error description.

Example response - 422

{
  "error": "It's not possible to update a cancelled treatment_plan."
}

Create an in-office checkout

The in_office_checkout object takes a treatment_plan. It uses the patient from the treatment_plan to:

a) clear out anything in the patient's cart.

b) populate the patient's cart with the treatment plan.

c) return a url on Fullscript so that a practitioner can fullfill an in-office checkout.

Arguments

treatment_plan_id

string

REQUIRED

Unique ID for the Treatment Plan

POST

curl -X 'POST' "https://api-us-snd.fullscript.io/api/clinic/treatment_plans/{treatment_plan_id}/in_office_checkout" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

201

Created

in_office_checkout

url

string

The URL a practitioner can fullfill an in-office checkout.

Example response

{
  "in_office_checkout": {
    "url": "https://fullscript.io/o/patients/11/checkout"
  }
}
404

Not Found

error

string

Error description.

Example response - 404

{
  "error": "TreatmentPlan ID is missing or invalid"
}
422

Unprocessable Entity

error

string

Error description.

Example response - 422

{
  "error": "Unable to create an in-office checkout. Some restrictions apply preventing you from purchasing Vitamin C."
}

Dynamic link

Returns a redirect_url for a new treatment plan.

Arguments

No arguments...

GET

curl "https://api-us-snd.fullscript.io/api/clinic/dynamic_links/treatment_plans" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

redirect_url

Example response

{
  "redirect_url": "https://api-us-snd.fullscript.io/p/treatment_plans/new?client_id=83x92x21xx29x643xx9954x8x2xx651xxx87x66521x08x9x2x408x26x801x394"
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `catalog:read` scope enabled."
}

Returns a redirect_url for a draft treatment. It will optionally find or create a patient for use in the treatment plan.

You must have the patients:write OAuth scope if the request you make creates a patient. To access the endpoint you must also have the clinic:write OAuth scope.

Arguments

treatment_plan

object

REQUIRED

Treatment plan information for dynamic link.

practitioner_id

string

REQUIRED

Practitioner's id used to create the draft treatment_plan.

patient

object

Find or create a Patient.

email

string

Unique Email for the Patient.

first_name

string

Patient's first name.

last_name

string

Patient's last name.

date_of_birth

string

Patient's date of birth in the format yyyy-mm-dd.

gender

string

Gender of the patient. Valid options are 'male', 'female', or 'x'.

mobile_number

string

Patient's mobile number in the format +12223334444.

discount

string

Patient discount level (in percentage). This discount does not include the clinic discount. Defaults to 0.

send_welcome_email

string

Sends a welcome email upon successful patient creation and treatment plan creation. Defaults to true.

POST

curl -X 'POST' "https://api-us-snd.fullscript.io/api/clinic/dynamic_links/treatment_plans" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX' \ 
  -d $'{
  "treatment_plan": {
    "practitioner_id": "string"
  },
  "patient": {
    "email": "string",
    "first_name": "string",
    "last_name": "string",
    "date_of_birth": "string",
    "gender": "string",
    "mobile_number": "string",
    "discount": "string",
    "send_welcome_email": "string"
  }
}'

Responses

200

OK

dynamic_links

redirect_url

string

Absolute url for a treatment plan in fullscript.

treatment_plan

object

Treatment plan information for dynamic link.

id

string

Unique identifier of the treatment plan.

state

string

The state of the treatment plan. It will have a value of draft or active.

available_at

string

The date when the treatment plan was sent to the patient either through an email or text message.

patient

object

Patient information for dynamic_link.

id

string

Unique identifier of the patient.

first_name

string

First name of the patient.

last_name

string

Last name of the patient.

email

string

Unique email of the patient.

archived

boolean

If true, patient is no longer active and can not sign in to Fullscript.

date_of_birth

string

Patient's date of birth in the format yyyy-mm-dd.

gender

string

Gender of the patient. Valid options are 'male', 'female', or 'x'.

discount

number

Patient discount level (in percentage). This discount does not include the clinic discount. This discount, in addition to any clinic discount, will be applied to all of the patient's orders.

total_discount

number

Total patient discount level (in percentage). This discount includes the clinic discount and the patient discount. This discount is applied to all of the patient's orders.

mobile_number

string

Patient's mobile number in the format +12223334444.

text_message_notification

boolean

true or false of whether the patient has elected to receive text message notifications from Fullscript.

Example response

{
  "dynamic_links": {
    "redirect_url": "https://api-us-snd.fullscript.io/p/treatment_plans/101010/edit",
    "treatment_plan": {
      "id": "x1x01x6x-5615-4874-xxx4-48x459180x09",
      "state": "draft",
      "available_at": null
    },
    "patient": {
      "id": "x1x0196x-5615-4874-xxe4-48x459180x09",
      "first_name": "Example",
      "last_name": "Patient",
      "email": "johndoe@fakemail.com",
      "archived": false,
      "date_of_birth": null,
      "gender": null,
      "discount": 0,
      "total_discount": 0,
      "mobile_number": "",
      "text_message_notification": true
    }
  }
}
422

Unprocessable Entity

error

string

Error description.

Example response - 422

{
  "error": "param is missing or the value is empty: treatment_plan"
}

Returns a redirect_url for editing an existing treatment plan. The treatment plan provided must have a state of draft or active.

Arguments

id

string

REQUIRED

Unique ID for the Treatment Plan

GET

curl "https://api-us-snd.fullscript.io/api/clinic/dynamic_links/treatment_plans/{id}" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

dynamic_links

redirect_url

string

Absolute url for a treatment plan in fullscript.

treatment_plan

object

Treatment plan information for dynamic link.

id

string

Unique identifier of the treatment plan.

state

string

The state of the treatment plan. It will have a value of draft or active.

available_at

string

The date when the treatment plan was sent to the patient either through an email or text message.

patient

object

Patient information for dynamic_link.

id

string

Unique identifier of the patient.

first_name

string

First name of the patient.

last_name

string

Last name of the patient.

email

string

Unique email of the patient.

archived

boolean

If true, patient is no longer active and can not sign in to Fullscript.

date_of_birth

string

Patient's date of birth in the format yyyy-mm-dd.

gender

string

Gender of the patient. Valid options are 'male', 'female', or 'x'.

discount

number

Patient discount level (in percentage). This discount does not include the clinic discount. This discount, in addition to any clinic discount, will be applied to all of the patient's orders.

total_discount

number

Total patient discount level (in percentage). This discount includes the clinic discount and the patient discount. This discount is applied to all of the patient's orders.

mobile_number

string

Patient's mobile number in the format +12223334444.

text_message_notification

boolean

true or false of whether the patient has elected to receive text message notifications from Fullscript.

Example response

{
  "dynamic_links": {
    "redirect_url": "https://api-us-snd.fullscript.io/p/treatment_plans/101010/edit",
    "treatment_plan": {
      "id": "x1x01x6x-5615-4874-xxx4-48x459180x09",
      "state": "active",
      "available_at": "2019-10-16"
    },
    "patient": {
      "id": "x1x0196x-5615-4874-xxe4-48x459180x09",
      "first_name": "Example",
      "last_name": "Patient",
      "email": "patient@example.com",
      "archived": false,
      "date_of_birth": null,
      "gender": null,
      "discount": 0,
      "total_discount": 0,
      "mobile_number": "",
      "text_message_notification": true
    }
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `catalog:read` scope enabled."
}
404

Not Found

error

string

Error description.

Example response - 404

{
  "error": "TreatmentPlan ID is missing or invalid."
}

Products

The product object contains details for all products on the Fullscript platform. The API allows you to list all products and find individual products.

List all products

This resource allows you to list all products.

Arguments

No arguments...

GET

curl "https://api-us-snd.fullscript.io/api/catalog/products" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

products

id

string

Unique identifier of the product.

name

string

Name of the product.

brand

object

Brand information for the product.

id

string

Unique identifier of the brand.

name

string

Commercial name of the brand.

prefix

string

Unique prefix for the brand.

primary_variant

object

The primary variant for the product.

id

string

Unique identifier for the variant.

sku

string

Unique SKU for the variant used by Fullscript.

units

integer

Number of units in the variant (e.g. 90 capsules or 250 mL).

unit_of_measure

string

Units of measure (e.g. capsules).

upc

string

UPC, EAN-13, or scannable bar code.

msrp

string

The MSRP (suggested selling price) for the product. (e.g. 19.99)

supplier_sku

string

The Supplier SKU.

status

string

Returns the current status of the variant. (e.g. available, discontinued, backordered, unavailable, or vendor backorder)

availability

string

Returns the availability of the variant. (e.g. In Stock)

primary

boolean

Reveals whether the variant is the primary (main one used for display purposes) or not.

image_url_small

string

Thumbnail-sized image url of the variant.

image_url_medium

string

Medium-sized image url of the variant.

image_url_large

string

Large-sized image url of the variant.

variant_count

integer

The number of variants that exist for this product.

status

string

Status of the Product. Has 3 possible values. If any of the product variants are available, then status is available. If none of the product variants are available, but any 1 of the product variants is backordered then status is backordered. If none of the product variants are available or backordered then status is unavailable.

meta

current_page

number

The current page number of the API response.

next_page

number

Then next page number (if available).

prev_page

number

The previous page number (if available).

total_pages

number

Total number of pages that are available in the API response.

total_count

number

Total number of records available in the resource.

Example response

{
  "products": [
    {
      "id": "113741x6-224x-4xx8-xx5x-80629x155192",
      "name": "Vitamin C",
      "brand": {
        "id": "x0x50x8x-711x-43xx-85xx-5xx80365xxxx",
        "name": "BioBrand",
        "prefix": "BIO"
      },
      "primary_variant": {
        "id": "xx2688x2-4303-4278-xx73-x7083x6146x2",
        "sku": "819d1ab3abc0a21cffd798ec925ba50d",
        "primary": true,
        "units": null,
        "unit_of_measure": null,
        "availability": "n/a",
        "status": "unavailable",
        "upc": null,
        "msrp": "19.99",
        "supplier_sku": null,
        "image_url_small": "/assets/noimage/product.png",
        "image_url_medium": "/assets/noimage/product.png",
        "image_url_large": "/assets/noimage/product.png"
      },
      "variant_count": 1,
      "status": "unavailable"
    }
  ],
  "meta": {
    "current_page": 1,
    "next_page": null,
    "prev_page": null,
    "total_pages": 1,
    "total_count": 1
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `catalog:read` scope enabled."
}

Retrieve a product

Retrieves an existing product. If the practitioner has set custom dosage instructions for the product, the custom_dosage object is included in the response. Specify the pracitioner with practitioner_id (defaults to current practitioner, when applicable).

Arguments

id

string

REQUIRED

Unique identifier for the Product

practitioner_id

string

Unique Practitioner ID. Include to retrieve a specific practitioner's custom dosage instructions for the product. Defaults to the practitioner who owns current access token, if applicable (access token's resource owner type is Practitioner). Custom dosage is returned in the custom_dosage object.

GET

curl "https://api-us-snd.fullscript.io/api/catalog/products/{id}" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

product

id

string

Unique identifier of the product.

name

string

Name of the product.

description_html

string

HTML description of the product (if available).

brand

object

Brand information for the product.

id

string

Unique identifier of the brand.

name

string

Commercial name of the brand.

prefix

string

Unique prefix for the brand.

variants

array

All available variants for the product.

id

string

Unique identifier for the variant.

sku

string

Unique SKU for the variant used by Fullscript.

units

integer

Number of units in the variant (e.g. 90 capsules or 250 mL).

unit_of_measure

string

Units of measure (e.g. capsules).

upc

string

UPC, EAN-13, or scannable bar code.

msrp

string

The MSRP (suggested selling price) for the product. (e.g. 19.99)

supplier_sku

string

The Supplier SKU.

status

string

Returns the current status of the variant. (e.g. available, discontinued, backordered, unavailable, or vendor backorder)

availability

string

Returns the availability of the variant. (e.g. In Stock)

dosage

object

Dosage information for the product.

recommended_amount

string

The recommended dose to take in terms of the dosage format.

recommended_frequency

string

The recommended frequency with which to take the dose. This can be any of the following strings: once per day, twice per day, three times per day, four times per day, every morning, or every night.

recommended_duration

string

The recommended period for which to take the dose. This can be the number of days (e.g. 120 for 4 months) or it can be any of the following strings: as needed, until symptoms resolve, or ongoing.

format

string

Format of the dose. This can be any of the following strings: capsule, chewable, gel, liquid, lozenge, packet, pellet, drops, powder, strip, suppository, or tablet.

additional_info

string

Recommended instructions for taking a dose (e.g. With meals).

custom_dosage

object

Custom dosage information for the product, created by a specific practitioner. In the event that a custom dosage is not set for a product, custom_dosage will be null

recommended_amount

string

The recommended dose to take in terms of the dosage format.

recommended_frequency

string

The recommended frequency with which to take the dose. This can be any of the following strings: once per day, twice per day, three times per day, four times per day, every morning, or every night.

recommended_duration

string

The recommended period for which to take the dose. This can be the number of days (e.g. 120 for 4 months) or it can be any of the following strings: as needed, until symptoms resolve, or ongoing.

format

string

Format of the dose. This can be any of the following strings: capsule, chewable, gel, liquid, lozenge, packet, pellet, drops, powder, strip, suppository, or tablet.

additional_info

string

Recommended instructions for taking a dose (e.g. With meals).

Example response

{
  "product": {
    "id": "113741x6-224x-4xx8-xx5x-80629x155192",
    "name": "Vitamin C",
    "description_html": "Easy to swallow vitamin c capsules.",
    "brand": {
      "id": "x0x50x8x-711x-43xx-85xx-5xx80365xxxx",
      "name": "BioBrand",
      "prefix": "BIO"
    },
    "variants": [
      {
        "id": "xx2688x2-4303-4278-xx73-x7083x6146x1",
        "sku": "20xx9193488",
        "primary": true,
        "units": null,
        "unit_of_measure": null,
        "availability": "In Stock",
        "status": "available",
        "upc": null,
        "msrp": "19.99",
        "supplier_sku": null
      }
    ],
    "dosage": {
      "recommended_amount": "10-60",
      "recommended_frequency": "four times per day",
      "recommended_duration": "as needed",
      "format": "drop",
      "additional_info": "with meals"
    },
    "custom_dosage": null
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `catalog:read` scope enabled."
}
404

Not Found

error

string

Error description.

Example response - 404

{
  "error": "The Practitioner ID is invalid"
}

List similar products

This endpoint allows you to list similar products that have been curated by Fullscript's licensed health professionals. It is in order from most to least popular.

Arguments

product_id

string

REQUIRED

Unique identifier for the Product

GET

curl "https://api-us-snd.fullscript.io/api/catalog/products/{product_id}/similar" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

products

id

string

Unique identifier of the product.

name

string

Name of the product.

brand

object

Brand information for the product.

id

string

Unique identifier of the brand.

name

string

Commercial name of the brand.

prefix

string

Unique prefix for the brand.

primary_variant

object

The primary variant for the product.

id

string

Unique identifier for the variant.

sku

string

Unique SKU for the variant used by Fullscript.

units

integer

Number of units in the variant (e.g. 90 capsules or 250 mL).

unit_of_measure

string

Units of measure (e.g. capsules).

upc

string

UPC, EAN-13, or scannable bar code.

msrp

string

The MSRP (suggested selling price) for the product. (e.g. 19.99)

supplier_sku

string

The Supplier SKU.

status

string

Returns the current status of the variant. (e.g. available, discontinued, backordered, unavailable, or vendor backorder)

availability

string

Returns the availability of the variant. (e.g. In Stock)

primary

boolean

Reveals whether the variant is the primary (main one used for display purposes) or not.

image_url_small

string

Thumbnail-sized image url of the variant.

image_url_medium

string

Medium-sized image url of the variant.

image_url_large

string

Large-sized image url of the variant.

variant_count

integer

The number of variants that exist for this product.

status

string

Status of the Product. Has 3 possible values. If any of the product variants are available, then status is available. If none of the product variants are available, but any 1 of the product variants is backordered then status is backordered. If none of the product variants are available or backordered then status is unavailable.

meta

current_page

number

The current page number of the API response.

next_page

number

Then next page number (if available).

prev_page

number

The previous page number (if available).

total_pages

number

Total number of pages that are available in the API response.

total_count

number

Total number of records available in the resource.

Example response

{
  "products": [
    {
      "id": "x1x50x8x-711x-43xx-85xx-5xx80365xxxx",
      "name": "Vitamin C plus",
      "brand": {
        "id": "x0x50x8x-711x-43xx-85xx-5xx80365xxxx",
        "name": "BioBrand",
        "prefix": "BIO"
      },
      "primary_variant": {
        "id": "xx2688x2-4303-4278-xx73-x7083x6146x2",
        "sku": "819d1ab3abc0a21cffd798ec925ba50d",
        "primary": true,
        "units": null,
        "unit_of_measure": null,
        "availability": "n/a",
        "status": "unavailable",
        "upc": null,
        "msrp": "19.99",
        "supplier_sku": null,
        "image_url_small": "/assets/noimage/product.png",
        "image_url_medium": "/assets/noimage/product.png",
        "image_url_large": "/assets/noimage/product.png"
      },
      "variant_count": 1,
      "status": "unavailable"
    }
  ],
  "meta": {
    "current_page": 1,
    "next_page": null,
    "prev_page": null,
    "total_pages": 1,
    "total_count": 1
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `catalog:read` scope enabled."
}
404

Not Found

error

string

Error description.

Example response - 404

{
  "error": "The Product ID is either missing or invalid"
}

Categories

The category object contains a record of all categories from a clinic.

List all category products

This resource allows you to list all of a category's products.

Arguments

category_id

string

REQUIRED

Unique ID for the Category

GET

curl "https://api-us-snd.fullscript.io/api/clinic/categories/{category_id}/products" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

products

id

string

Unique identifier of the product.

name

string

Name of the product.

brand

object

Brand information for the product.

id

string

Unique identifier of the brand.

name

string

Commercial name of the brand.

prefix

string

Unique prefix for the brand.

primary_variant

object

The primary variant for the product.

id

string

Unique identifier for the variant.

sku

string

Unique SKU for the variant used by Fullscript.

units

integer

Number of units in the variant (e.g. 90 capsules or 250 mL).

unit_of_measure

string

Units of measure (e.g. capsules).

upc

string

UPC, EAN-13, or scannable bar code.

msrp

string

The MSRP (suggested selling price) for the product. (e.g. 19.99)

supplier_sku

string

The Supplier SKU.

status

string

Returns the current status of the variant. (e.g. available, discontinued, backordered, unavailable, or vendor backorder)

availability

string

Returns the availability of the variant. (e.g. In Stock)

primary

boolean

Reveals whether the variant is the primary (main one used for display purposes) or not.

image_url_small

string

Thumbnail-sized image url of the variant.

image_url_medium

string

Medium-sized image url of the variant.

image_url_large

string

Large-sized image url of the variant.

variant_count

integer

The number of variants that exist for this product.

status

string

Status of the Product. Has 3 possible values. If any of the product variants are available, then status is available. If none of the product variants are available, but any 1 of the product variants is backordered then status is backordered. If none of the product variants are available or backordered then status is unavailable.

meta

current_page

number

The current page number of the API response.

next_page

number

Then next page number (if available).

prev_page

number

The previous page number (if available).

total_pages

number

Total number of pages that are available in the API response.

total_count

number

Total number of records available in the resource.

Example response

{
  "products": [
    {
      "id": "113741x6-224x-4xx8-xx5x-80629x155192",
      "name": "Vitamin C",
      "brand": {
        "id": "x0x50x8x-711x-43xx-85xx-5xx80365xxxx",
        "name": "BioBrand",
        "prefix": "BIO"
      },
      "primary_variant": {
        "id": "xx2688x2-4303-4278-xx73-x7083x6146x1",
        "sku": "ABC",
        "primary": true,
        "units": null,
        "unit_of_measure": null,
        "availability": "n/a",
        "status": "unavailable",
        "upc": null,
        "msrp": "19.99",
        "supplier_sku": null,
        "image_url_small": "/assets/noimage/product.png",
        "image_url_medium": "/assets/noimage/product.png",
        "image_url_large": "/assets/noimage/product.png"
      },
      "variant_count": 1,
      "status": "unavailable"
    }
  ],
  "meta": {
    "current_page": 1,
    "next_page": null,
    "prev_page": null,
    "total_pages": 1,
    "total_count": 1
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `clinic:read` scoped enabled."
}
404

Not Found

error

string

Error description.

Example response - 404

{
  "error": "Category ID is missing or invalid."
}

Retrieve a Category

Retrieves an existing Category.

Arguments

id

string

REQUIRED

Unique identifier of the Category.

GET

curl "https://api-us-snd.fullscript.io/api/clinic/categories/{id}" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

category

id

string

Unique identifier of the category.

name

string

Name of the category.

product_count

integer

Number of products in a category.

Example response

{
  "category": {
    "id": "x3x0196x-5615-4874-xxx4-48x459180x09",
    "name": "Allergy Relief",
    "product_count": 1
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `clinic:read` scoped enabled."
}
404

Not Found

error

string

Error description.

Example response - 404

{
  "error": "Category ID is missing or invalid."
}

List all categories

This resource allows you to list all of a clinic's categories.

Arguments

No arguments...

GET

curl "https://api-us-snd.fullscript.io/api/clinic/categories" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

categories

id

string

Unique identifier of the category.

name

string

Name of the category.

meta

current_page

number

The current page number of the API response.

next_page

number

Then next page number (if available).

prev_page

number

The previous page number (if available).

total_pages

number

Total number of pages that are available in the API response.

total_count

number

Total number of records available in the resource.

Example response

{
  "categories": [
    {
      "id": "x3x0196x-5615-4874-xxx4-48x459180x09",
      "name": "Allergy Relief"
    }
  ],
  "meta": {
    "current_page": 1,
    "next_page": null,
    "prev_page": null,
    "total_pages": 1,
    "total_count": 1
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `clinic:read` scoped enabled."
}

Product search

Search for products

This resource allows you to search for products using Fullscript's elasticsearch implementation. This endpoint takes into consideration brand segmentation (not all clinics have access to all brands) and will only show products and brands that your clinic has available to them.

Note: Filter arguments that accept an array can be specified in the query string like this:
?allergen_ids[]=id_1&allergen_ids[]=id_2

Arguments

query

string

Search for products matching a query string.

allergen_ids

string

Provide an array of allergen ids to filter results.

brand_id

string

Search for products by brand_id.

ingredient_ids

string

Provide an array of ingredient ids to filter results.

supplement_type_ids

string

Provide an array of supplement type ids to filter results.

third_party_certification_ids

string

Provide an array of third party certification ids to filter results.

GET

curl "https://api-us-snd.fullscript.io/api/catalog/search/products" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

products

id

string

Unique identifier of the product.

name

string

Name of the product.

brand

object

Brand information for the product.

id

string

Unique identifier of the brand.

name

string

Commercial name of the brand.

prefix

string

Unique prefix for the brand.

primary_variant

object

The primary variant for the product.

id

string

Unique identifier for the variant.

sku

string

Unique SKU for the variant used by Fullscript.

units

integer

Number of units in the variant (e.g. 90 capsules or 250 mL).

unit_of_measure

string

Units of measure (e.g. capsules).

upc

string

UPC, EAN-13, or scannable bar code.

msrp

string

The MSRP (suggested selling price) for the product. (e.g. 19.99)

supplier_sku

string

The Supplier SKU.

status

string

Returns the current status of the variant. (e.g. available, discontinued, backordered, unavailable, or vendor backorder)

availability

string

Returns the availability of the variant. (e.g. In Stock)

primary

boolean

Reveals whether the variant is the primary (main one used for display purposes) or not.

image_url_small

string

Thumbnail-sized image url of the variant.

image_url_medium

string

Medium-sized image url of the variant.

image_url_large

string

Large-sized image url of the variant.

variant_count

integer

The number of variants that exist for this product.

status

string

Status of the Product. Has 3 possible values. If any of the product variants are available, then status is available. If none of the product variants are available, but any 1 of the product variants is backordered then status is backordered. If none of the product variants are available or backordered then status is unavailable.

meta

current_page

number

The current page number of the API response.

next_page

number

Then next page number (if available).

prev_page

number

The previous page number (if available).

total_pages

number

Total number of pages that are available in the API response.

total_count

number

Total number of records available in the resource.

Example response

{
  "products": [
    {
      "id": "113741x6-224x-4xx8-xx5x-80629x155192",
      "name": "Vitamin C",
      "brand": {
        "id": "x0x50x8x-711x-43xx-85xx-5xx80365xxxx",
        "name": "BioBrand",
        "prefix": "BIO"
      },
      "primary_variant": {
        "id": "xx2688x2-4303-4278-xx73-x7083x6146x2",
        "sku": "819d1ab3abc0a21cffd798ec925ba50d",
        "primary": true,
        "units": null,
        "unit_of_measure": null,
        "availability": "In Stock",
        "status": "available",
        "upc": null,
        "msrp": "19.99",
        "supplier_sku": null,
        "image_url_small": "/assets/noimage/product.png",
        "image_url_medium": "/assets/noimage/product.png",
        "image_url_large": "/assets/noimage/product.png"
      },
      "variant_count": 1,
      "status": "available"
    }
  ],
  "meta": {
    "current_page": 1,
    "next_page": null,
    "prev_page": null,
    "total_pages": 1,
    "total_count": 1
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `catalog:read` scope enabled."
}
404

Not Found

error

string

Error description.

Example response - 404

{
  "error": "Brand with uuid 'not_the_right_id' is either not found or this clinic does not have the necessary permissions to purchase from this brand."
}

Allergens

Attributes about a product as they relate specifically to ingredients known to cause allergic reactions / ingredients known to want to be avoided (e.g. 'Peanut free'). They are not attested by third parties.

The allergen object contains details for all allergens listed on the Fullscript platform. The API allows you to list all allergens and find individual allergens.

List all allergens

This resource allows you to list all allergens.

Arguments

No arguments...

GET

curl "https://api-us-snd.fullscript.io/api/catalog/allergens" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

allergens

id

string

Unique identifier of the allergen.

name

string

Name of the allergen.

meta

current_page

number

The current page number of the API response.

next_page

number

Then next page number (if available).

prev_page

number

The previous page number (if available).

total_pages

number

Total number of pages that are available in the API response.

total_count

number

Total number of records available in the resource.

Example response

{
  "allergens": [
    {
      "id": "x5x447x4-x904-4060-83xx-26x5xx9819x7",
      "name": "Sugar Free"
    }
  ],
  "meta": {
    "current_page": 1,
    "next_page": null,
    "prev_page": null,
    "total_pages": 1,
    "total_count": 1
  }
}

Retrieve an allergen

Retrieves details for an existing allergen.

Arguments

id

string

REQUIRED

Unique ID for the allergen

GET

curl "https://api-us-snd.fullscript.io/api/catalog/allergens/{id}" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

allergen

id

string

Unique identifier of the allergen.

name

string

Name of the allergen.

Example response

{
  "allergen": {
    "id": "x5x447x4-x904-4060-83xx-26x5xx9819x7",
    "name": "Sugar Free"
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `catalog:read` scope enabled."
}
404

Not Found

error

string

Error description.

Example response - 404

{
  "error": "The Allergen ID is either missing or invalid"
}

Brands

The brand object contains details for all brands on the Fullscript platform. The API allows you to list all brands and find individual brands.

List all brands

This resource allows you to list all brands.

Arguments

available

string

Takes an argument of true to return brands that have available products.

clinic_permitted

string

Takes an argument of true to return brands the current clinic has access to.

GET

curl "https://api-us-snd.fullscript.io/api/catalog/brands" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

brands

id

string

Unique identifier of the brand.

name

string

Commercial name of the brand.

status

string

The current state of a brand's products which return two possible values: available and unavailable. available means that this brand has some products that are in-stock and available to be ordered. unavailable means that this brand does not have any products in-stock. Note that this does not take into account product segmentation (where only certain practitioners have access to some brands) Please use the product search endpoint for tailored products that are available to your practitioner.

prefix

string

Unique prefix for the brand.

meta

current_page

number

The current page number of the API response.

next_page

number

Then next page number (if available).

prev_page

number

The previous page number (if available).

total_pages

number

Total number of pages that are available in the API response.

total_count

number

Total number of records available in the resource.

Example response

{
  "brands": [
    {
      "id": "x0x50x8x-711x-43xx-85xx-5xx80365xxxx",
      "name": "BioBrand",
      "prefix": "BIO",
      "status": "available"
    }
  ],
  "meta": {
    "current_page": 1,
    "next_page": null,
    "prev_page": null,
    "total_pages": 1,
    "total_count": 1
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `catalog:read` scope enabled."
}

Retrieve a brand

Retrieves details for an existing brand.

Arguments

id

string

REQUIRED

Unique ID for the Brand

GET

curl "https://api-us-snd.fullscript.io/api/catalog/brands/{id}" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

brand

id

string

Unique identifier of the brand.

name

string

Commercial name of the brand.

status

string

The current state of a brand's products which return two possible values: available and unavailable. available means that this brand has some products that are in-stock and available to be ordered. unavailable means that this brand does not have any products in-stock. Note that this does not take into account product segmentation (where only certain practitioners have access to some brands) Please use the product search endpoint for tailored products that are available to your practitioner.

prefix

string

Unique prefix for the brand.

Example response

{
  "brand": {
    "id": "x0x50x8x-711x-43xx-85xx-5xx80365xxxx",
    "name": "BioBrand",
    "prefix": "BIO",
    "status": "unavailable"
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `catalog:read` scope enabled."
}
404

Not Found

error

string

Error description.

Example response - 404

{
  "error": "Brand's ID is missing or invalid"
}

Ingredients

Supplement ingredients that make up the product (e.g. 'Curcumin').

The ingredient object contains details for all ingredients listed on the Fullscript platform. The API allows you to list all ingredients and find individual ingredients.

List all Ingredients

This resource allows you to list all ingredients.

Arguments

No arguments...

GET

curl "https://api-us-snd.fullscript.io/api/catalog/ingredients" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

ingredients

id

string

Unique identifier of the ingredient.

name

string

Name of the ingredient.

meta

current_page

number

The current page number of the API response.

next_page

number

Then next page number (if available).

prev_page

number

The previous page number (if available).

total_pages

number

Total number of pages that are available in the API response.

total_count

number

Total number of records available in the resource.

Example response

{
  "ingredients": [
    {
      "id": "x5x447x4-x904-4060-83xx-26x5xx9819x7",
      "name": "Vitamin A"
    }
  ],
  "meta": {
    "current_page": 1,
    "next_page": null,
    "prev_page": null,
    "total_pages": 1,
    "total_count": 1
  }
}

Retrieve an ingredient

Retrieves details for an existing ingredient.

Arguments

id

string

REQUIRED

Unique ID for the ingredient

GET

curl "https://api-us-snd.fullscript.io/api/catalog/ingredients/{id}" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

ingredient

id

string

Unique identifier of the ingredient.

name

string

Name of the ingredient.

Example response

{
  "ingredient": {
    "id": "x5x447x4-x904-4060-83xx-26x5xx9819x7",
    "name": "Vitamin A"
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `catalog:read` scope enabled."
}
404

Not Found

error

string

Error description.

Example response - 404

{
  "error": "The Ingredient ID is either missing or invalid"
}

Supplement Types

Groups of products based on similar attributes (e.g. 'Multivitamins').

The supplement type object contains details for all supplement types listed on the Fullscript platform. The API allows you to list all supplement types and find individual supplement types.

List all supplement types

This resource allows you to list all supplement types.

Arguments

No arguments...

GET

curl "https://api-us-snd.fullscript.io/api/catalog/supplement_types" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

supplement_types

id

string

Unique identifier of the supplement type.

name

string

Name of the supplement type.

meta

current_page

number

The current page number of the API response.

next_page

number

Then next page number (if available).

prev_page

number

The previous page number (if available).

total_pages

number

Total number of pages that are available in the API response.

total_count

number

Total number of records available in the resource.

Example response

{
  "supplement_types": [
    {
      "id": "x5x447x4-x904-4060-83xx-26x5xx9819x7",
      "name": "vitamins"
    }
  ],
  "meta": {
    "current_page": 1,
    "next_page": null,
    "prev_page": null,
    "total_pages": 1,
    "total_count": 1
  }
}

Retrieve a supplement type

Retrieves details for an existing supplement type.

Arguments

id

string

REQUIRED

Unique ID for the supplement type

GET

curl "https://api-us-snd.fullscript.io/api/catalog/supplement_types/{id}" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

supplement_type

id

string

Unique identifier of the supplement type.

name

string

Name of the supplement type.

Example response

{
  "supplement_type": {
    "id": "x5x447x4-x904-4060-83xx-26x5xx9819x7",
    "name": "vitamins"
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `catalog:read` scope enabled."
}
404

Not Found

error

string

Error description.

Example response - 404

{
  "error": "The Supplement Type ID is either missing or invalid"
}

Third Party Certifications

Third party certifications are product level filters that are assessed by a party external to the manufacturer (e.g. 'Certified Halal').

The third party certification object contains details for all third party certifications listed on the Fullscript platform. The API allows you to list all third party certifications and find individual third party certifications.

List all third party certifications

This resource allows you to list all third party certifications.

Arguments

No arguments...

GET

curl "https://api-us-snd.fullscript.io/api/catalog/third_party_certifications" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

third_party_certifications

id

string

Unique identifier of the third party certification.

name

string

Name of the third party certification.

meta

current_page

number

The current page number of the API response.

next_page

number

Then next page number (if available).

prev_page

number

The previous page number (if available).

total_pages

number

Total number of pages that are available in the API response.

total_count

number

Total number of records available in the resource.

Example response

{
  "third_party_certifications": [
    {
      "id": "x5x447x4-x904-4060-83xx-26x5xx9819x7",
      "name": "Certified Halal"
    }
  ],
  "meta": {
    "current_page": 1,
    "next_page": null,
    "prev_page": null,
    "total_pages": 1,
    "total_count": 1
  }
}

Retrieve a third party certification

Retrieves details for an existing third party certification.

Arguments

id

string

REQUIRED

Unique ID for the third party certification

GET

curl "https://api-us-snd.fullscript.io/api/catalog/third_party_certifications/{id}" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

third_party_certification

id

string

Unique identifier of the third party certification.

name

string

Name of the third party certification.

Example response

{
  "third_party_certification": {
    "id": "x5x447x4-x904-4060-83xx-26x5xx9819x7",
    "name": "Certified Halal"
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `catalog:read` scope enabled."
}
404

Not Found

error

string

Error description.

Example response - 404

{
  "error": "The Third Party Certification ID is either missing or invalid"
}

Variants

The variant object contains details about product variants. The API allows you to find individual variants.

Retrieve a variant

Retrieves an existing variant.

Arguments

id

string

REQUIRED

Unique identifier for the Variant.

GET

curl "https://api-us-snd.fullscript.io/api/catalog/variants/{id}" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

variant

id

string

Unique identifier for the variant.

sku

string

Unique SKU for the variant used by Fullscript.

units

integer

Number of units in the variant (e.g. 90 capsules or 250 mL).

unit_of_measure

string

Units of measure (e.g. capsules).

upc

string

UPC, EAN-13, or scannable bar code.

msrp

string

The MSRP (suggested selling price) for the product. (e.g. 19.99)

supplier_sku

string

The Supplier SKU.

status

string

Returns the current status of the variant. (e.g. available, discontinued, backordered, unavailable, or vendor backorder)

availability

string

Returns the availability of the variant. (e.g. In Stock)

primary

boolean

Reveals whether the variant is the primary (main one used for display purposes) or not.

image_url_small

string

Thumbnail-sized image url of the variant.

image_url_medium

string

Medium-sized image url of the variant.

image_url_large

string

Large-sized image url of the variant.

product

object

The variant's product.

id

string

Unique identifier of the product.

name

string

Name of the product.

brand

object

The variant's brand information.

id

string

Unique identifier of the brand.

name

string

Commercial name of the brand.

prefix

string

Unique prefix for the brand.

Example response

{
  "variant": {
    "id": "xx2688x2-4303-4278-xx73-x7083x6146x1",
    "sku": "819d1ab3abc0a21cffd798ec925ba50c",
    "primary": true,
    "units": null,
    "unit_of_measure": null,
    "availability": "In Stock",
    "status": "available",
    "upc": null,
    "msrp": "19.99",
    "supplier_sku": null,
    "image_url_small": "/assets/noimage/product.png",
    "image_url_medium": "/assets/noimage/product.png",
    "image_url_large": "/assets/noimage/product.png",
    "product": {
      "id": "113741x6-224x-4xx8-xx5x-80629x155192",
      "name": "Vitamin C",
      "brand": {
        "id": "x0x50x8x-711x-43xx-85xx-5xx80365xxxx",
        "name": "BioBrand",
        "prefix": "BIO"
      }
    }
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `catalog:read` scope enabled."
}
404

Not Found

error

string

Error description.

Example response - 404

{
  "error": "The Variant ID is either missing or invalid"
}

Webhooks

Webhooks allow your application to stay informed with what’s happening on Fullscript. You can subscribe to events and be notified when they happen. Let’s say one of your clinics updates a patient or creates a treatment plan; webhooks allow you to know about those events and take action if needed.

Using webhooks

You can register a single webhook URL through the API Dashboard and subscribe to multiple event types.

When the event occurs—say a treatment plan is created, a patient is updated, or a clinic key is revoked, etc.—Fullscript creates an Event. This Event contains all the relevant information about what just happened. It includes the event's type (ex: treatment_plan.created) and any relevant data to that event.

Once the event is created, Fullscript will send out a payload with the event data via an HTTP POST request to the webhook url that you defined in your account. Note that we only send events to a single endpoint per environment.

Setting up webhooks

Webhooks are configured through the API Dashboard. For each environment that you have setup, you can enter a URL to receive events. This should be a dedicated URL on your server that is setup to receive webhook notifications.

All urls need to use HTTPS. We will validate that your connection is secure and HIPAA compliant before sending any webhook data. For this to work, your server needs to be setup to support HTTPS with a valid certificate.

Responding to a webhook

To acknowledge that you received a webhook notification, your endpoint needs to respond with either a 200 or 201 HTTP status code. Any response codes outside of this range will tell us that the webhook has not been received and will be treated as a failure.

Your endpoint's body must also respond with your challenge token (available in the API Dashboard). This is a security measure to ensure that you own the url in question and it hasn't been hijacked. A successful response could look something like this:

HTTP 200 OK
Content-type: application/json
{ "challenge": "your-secret-challenge-token" }

We will attempt to deliver your webhooks up to 6 times with exponential back off. Webhooks cannot manually be retried, however you can make a query to the events endpoint to reconcile data in case of any missed events.

We will attempt to send event deliveries in order, however that is not a guarantee. We will also attempt to deliver webhooks within 30 minutes from when the event was created. In most cases however, this should be close to instantaneous.

The webhook deliveries endpoint has all the information you need to check how many times we’ve attempted to deliver an event, what the response received was, the status code, and other relevant information.

Time-outs

We set aggressive time-outs for webhook deliveries. If you have to do a bunch of complex logic with the event data, or need to make network requests, it’s possible that the delivery attempt will time-out before we receive a 2xx HTTP status code. To mitigate this, you may want to respond immediately with a 2xx HTTP status code, and then perform your complex logic afterwards.

Handling multiple clinics and integrations

Each event payload comes with both a clinic_id and an integration_id (if relevant). The clinic key is the unique identifier for the clinic. Any clinic events (patient, practitioner, treatment plan, etc.) will be scoped to that clinic through the clinic_id.

Because it's possible for clinics to have multiple integrations enabled, the exact same events will be sent for each integration that a clinic has enabled with you. To mitigate unwanted duplication of events, the integration has to be activated before any webhook events will be sent. This means that it’s been used as least once with a valid X-FS-Clinic-Key and the key has not been revoked. The integration_id allows you to scope events to the relevant integration that is enabled.

Both the clinic_id and integration_id can be retrieved through the API at the clinic endpoint.

Multiple failures

In some circumstances we will disable your endpoint and stop trying to deliver events to it. This can happen when: we receive a 410 HTTP status code or if the delivery attempts are consistently failing for more than 24 hours. In that case your webhook endpoint may be disabled and we will no longer send events to that url.

Re-enabling a disabled webhook can be done through the API Dashboard once you have resolved the issues.

You can see the status (both failed and successful delivery attempts) through the webhook deliveries endpoint.

Webhook versioning

Webhook events follow the same logic as our versioning scheme in the API and it respects the patch_version that you’re on.

Webhooks Security

Checking the Fullscript-Signature header

Fullscript sends a header in the webhook request that can be used in conjunction with your Webhook Secret Key to verify the payload. Here is an example of the header:

Fullscript-Signature: t=1591826856,v1=0c262932b0ac6b4952e2fe24fdf419313984a66f6f442e0b8ec4cb87f2a107ad

This represents the format: t=<timestamp>,v1=<signature>

The signature is generated using a hash-based message authentication code (HMAC) with SHA-256. This hash is generated using 3 things:

  • A UTC timestamp
  • The request_body (The POST message's JSON payload string)
  • Your Webhook Secret Key

The timestamp and request_body are combined to create the payload provided to the hash function. The Webhook Secret Key is used as the key. The same hash can be computed and compared to the signature to verify the request.

To recompute and compare the hash, follow these steps:

  • Extract the timestamp and signature from the header.
  • Create the payload by combining the timestamp and request_body with a single .

Example: payload = '1591826856.{"event":{...<more_json>}}'

  • Compute an HMAC with the SHA256 hash function. Use the Webhook Secret Key as the key. Use the payload string as the message.
  • Compare the result with the signature.
  • If they match, the request payload is legitimate.

Note: The timestamp is generated directly before we send the payload. It is included in the hash payload in order to help prevent replay attacks. We recommend using this to verify the age of a request with a reasonable tolerance. 5 minutes is usually a good default.

List All Webhook Deliveries

This endpoint lists all webhook_deliveries from the last 30 days.

Arguments

attempted_at

string

Filter by attempted_at date. The date must be formatted as follows yyyy-mm-dd.

  • less than: Return webhook deliveries where the attempted_at date is less than. <yyyy-mm-dd.
  • greater than: Return webhook deliveries where the attempted_at date is greater than. >yyyy-mm-dd.
  • within a range: Return webhook deliveries where the attempted_at date is within a range. yyyy-mm-dd..yyyy-mm-dd.
event_id

string

Filter webhook deliveries by event_id.

successfully_delivered

string

Filter webhook deliveries by whether they have been successfully delivered or not. Accepts a string of true or false

sort_by

string

Accepts one of the following arguments: event_id attempted_at.

order_by

string

Ordering defaults to ASC and can take an argument of ASC or DESC.

GET

curl "https://api-us-snd.fullscript.io/api/webhooks/deliveries" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

webhook_deliveries

id

string

Unique identifier of the delivery.

attempt_number

integer

Number of attempts that were made for this event.

attempted_at

string

Timestamp (in utc) when the delivery was attempted.

previous_attempt_at

string

Timestamp (in utc) when the previous delivery was attempted (if any).

next_attempt_at

string

Timestamp (in utc) when the next delivery attempt was scheduled (if any).

successfully_delivered

boolean

true or false of whether the event has been successfully delivered.

response_body

string

The response body that we received from your server.

response_header

string

The header that we received from your server.

response_status

integer

The http status code that we received from your server.

response_ip_address

string

The IP address that we received from your server.

response_errors

string

Any error messages that we received while attempting to deliver to your server.

event_payload

object

The event object.

id

string

Unique identifier of the event.

type

string

The event's type.

created_at

string

Timestamp (in utc) when the event was created.

clinic_id

string

Unique identifier of the event's clinic that this event belongs to.

integration_id

string

Unique identifier of the integration that this event is from (if relevant).

data

string

The event's payload.

meta

current_page

number

The current page number of the API response.

next_page

number

Then next page number (if available).

prev_page

number

The previous page number (if available).

total_pages

number

Total number of pages that are available in the API response.

total_count

number

Total number of records available in the resource.

Example response

{
  "webhook_deliveries": [
    {
      "id": "3x0x2147-6x82-49xx-9x59-621xx87x40x2",
      "attempt_number": 1,
      "attempted_at": "2018-10-16T04:01:00.000Z",
      "previous_attempt_at": null,
      "next_attempt_at": null,
      "successfully_delivered": false,
      "response_body": "{\"challenge\"=>\"my-secret-challenge-token\"}",
      "response_header": "{\"Content-type\"=>\"application/json\"}",
      "response_status": 200,
      "response_ip_address": "127.0.0.1",
      "response_errors": null,
      "event_payload": {
        "event": {
          "id": "x5xxxxx8-92x7-4xxx-9x0x-345x404x94x1",
          "type": "patient.updated",
          "created_at": "2018-10-16T04:00:00.000Z",
          "clinic_id": "xx7x357x-9x36-xxxx-x553-7x3xx398xxx",
          "data": {
            "patient": {
              "id": "x1x0196x-5615-4874-xxe4-48x459180x09",
              "first_name": "Example",
              "last_name": "Patient",
              "email": "patient@example.com",
              "date_of_birth": null,
              "gender": null,
              "discount": 0,
              "total_discount": 0,
              "mobile_number": null,
              "text_message_notification": true
            }
          },
          "integration_id": "x1x27xxx-x9x9-49x6-xx62-107x7x051874"
        }
      }
    }
  ],
  "meta": {
    "current_page": 1,
    "next_page": null,
    "prev_page": null,
    "total_pages": 1,
    "total_count": 1
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `catalog:read` scope enabled."
}

Events

Events allow your integration to stay informed with what’s happening on Fullscript. Let’s say one of your clinics updates a patient, or creates a treatment plan. In each case an Event will be created which allows you to take action if need be.

This Event has all of the relevant information about what just happened. It includes the event's type (say treatment_plan.created) and any relevant data to that event.

Note that we only keep a record of events for the past 30 days.

Also know that events are never created for actions made through the API. We assume that, since you initiated the event, you already know about it! 😀

List All ClinicKey Events

This endpoint lists all clinic_key events from the last 30 days.

  • A clinic_key.revoked event happens when a clinic revokes access to your integration.

  • A clinic_key.activated event happens when the first request is made through the API with a valid X-FS-Clinic-Key—activating the integration.

Arguments

created_at

string

Filter by created_at date. The date must be formatted as follows yyyy-mm-dd.

  • less than: Return events where the created_at date is less than. <yyyy-mm-dd.
  • greater than: Return events where the created_at date is greater than. >yyyy-mm-dd.
  • within a range: Return events where the created_at date is within a range. yyyy-mm-dd..yyyy-mm-dd.
event_type

string

Filter events by event_type.

sort_by

string

Accepts one of the following arguments: event_type created_at.

order_by

string

Ordering defaults to ASC and can take an argument of ASC or DESC.

GET

curl "https://api-us-snd.fullscript.io/api/events/clinic_keys" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

events

id

string

Unique identifier of the event.

type

string

The type of event that was created.

created_at

string

Timestamp (in utc) when the event was created.

clinic_id

string

Unique identifier of the clinic that this event is scoped to (if applicable).

meta

current_page

number

The current page number of the API response.

next_page

number

Then next page number (if available).

prev_page

number

The previous page number (if available).

total_pages

number

Total number of pages that are available in the API response.

total_count

number

Total number of records available in the resource.

Example response

{
  "events": [
    {
      "id": "3x302630-xx40-11x8-xxx3-186590xxx6b1",
      "type": "clinic_key.activated",
      "created_at": "2018-10-16T04:00:00.000Z",
      "clinic_id": "xx7x357x-9x36-xxxx-x553-7x3xx398xxx"
    }
  ],
  "meta": {
    "current_page": 1,
    "next_page": null,
    "prev_page": null,
    "total_pages": 1,
    "total_count": 1
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `clinic:read` scoped enabled."
}

Retrieve an Event

This endpoint retrieves details from an Event. Note that event's can only be retrieved if they were made within the last 30 days.

Arguments

id

string

REQUIRED

Unique identifier of the Event

GET

curl "https://api-us-snd.fullscript.io/api/events/{id}" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

event

id

string

Unique identifier of the event.

type

string

The type of event that was created.

created_at

string

Timestamp (in utc) when the event was created.

clinic_id

string

Unique identifier of the clinic that this event is scoped to (if applicable).

data

object

The data attribute holds all the information for the event's object (if applicable). For example, when retrieving a patient.created event, the data attribute will have a complete patient object nested inside.

Example response

{
  "event": {
    "id": "99x67086-x10x-11x8-8x83-186590xxx6x1",
    "type": "treatment_plan.created",
    "created_at": "2018-10-17T04:00:00.000Z",
    "clinic_id": "xx7x357x-9x36-xxxx-x553-7x3xx398xxx",
    "data": {
      "treatment_plan": {
        "id": "99x67086-x10x-11x8-8x83-186590xxx6x1",
        "state": "active",
        "patient": {
          "id": "99x67086-x10x-11x8-8x83-186590xxx6x1"
        },
        "practitioner": {
          "id": "99x67086-x10x-11x8-8x83-186590xxx6x1"
        },
        "available_at": "2018-10-16T04:00:00.000Z",
        "recommendations": [
          {
            "variant_id": "xx2688x2-4303-4278-xx73-x7083x6146x1",
            "refill": false,
            "units_to_purchase": 10,
            "dosage": {
              "recommended_amount": "1-2",
              "recommended_frequency": "once per day",
              "recommended_duration": null,
              "format": "capsule",
              "additional_info": "with food"
            }
          }
        ]
      }
    }
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `clinic:read` scoped enabled."
}
404

Not Found

error

string

Error description.

Example response - 404

{
  "error": "Event's ID is missing or invalid"
}

List All Order Events

This endpoint lists all order events from the last 30 days.

  • An order.placed event happens when an order has been placed.

Arguments

created_at

string

Filter by created_at date. The date must be formatted as follows yyyy-mm-dd.

  • less than: Return events where the created_at date is less than. <yyyy-mm-dd.
  • greater than: Return events where the created_at date is greater than. >yyyy-mm-dd.
  • within a range: Return events where the created_at date is within a range. yyyy-mm-dd..yyyy-mm-dd.
event_type

string

Filter events by event_type.

sort_by

string

Accepts one of the following arguments: event_type created_at.

order_by

string

Ordering defaults to ASC and can take an argument of ASC or DESC.

GET

curl "https://api-us-snd.fullscript.io/api/events/orders" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

events

id

string

Unique identifier of the event.

type

string

The type of event that was created.

created_at

string

Timestamp (in utc) when the event was created.

clinic_id

string

Unique identifier of the clinic that this event is scoped to (if applicable).

meta

current_page

number

The current page number of the API response.

next_page

number

Then next page number (if available).

prev_page

number

The previous page number (if available).

total_pages

number

Total number of pages that are available in the API response.

total_count

number

Total number of records available in the resource.

Example response

{
  "events": [
    {
      "id": "84562974-4x0x-1128-3x3x-1x86x5x836x2",
      "type": "order.placed",
      "created_at": "2018-10-16T04:00:00.000Z",
      "clinic_id": "xx7x357x-9x36-xxxx-x553-7x3xx398xxx"
    }
  ],
  "meta": {
    "current_page": 1,
    "next_page": null,
    "prev_page": null,
    "total_pages": 1,
    "total_count": 1
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `patients:order_history` scoped enabled."
}

List All Patient Events

This endpoint lists all patient events from the last 30 days.

  • A patient.created event happens when a patient is created.

  • A patient.updated event happens when a patient is updated.

Arguments

created_at

string

Filter by created_at date. The date must be formatted as follows yyyy-mm-dd.

  • less than: Return events where the created_at date is less than. <yyyy-mm-dd.
  • greater than: Return events where the created_at date is greater than. >yyyy-mm-dd.
  • within a range: Return events where the created_at date is within a range. yyyy-mm-dd..yyyy-mm-dd.
event_type

string

Filter events by event_type.

sort_by

string

Accepts one of the following arguments: event_type created_at.

order_by

string

Ordering defaults to ASC and can take an argument of ASC or DESC.

GET

curl "https://api-us-snd.fullscript.io/api/events/patients" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

events

id

string

Unique identifier of the event.

type

string

The type of event that was created.

created_at

string

Timestamp (in utc) when the event was created.

clinic_id

string

Unique identifier of the clinic that this event is scoped to (if applicable).

meta

current_page

number

The current page number of the API response.

next_page

number

Then next page number (if available).

prev_page

number

The previous page number (if available).

total_pages

number

Total number of pages that are available in the API response.

total_count

number

Total number of records available in the resource.

Example response

{
  "events": [
    {
      "id": "84562974-4x0x-1128-3x3x-1x86x5x836x2",
      "type": "patient.created",
      "created_at": "2018-10-16T04:00:00.000Z",
      "clinic_id": "xx7x357x-9x36-xxxx-x553-7x3xx398xxx"
    }
  ],
  "meta": {
    "current_page": 1,
    "next_page": null,
    "prev_page": null,
    "total_pages": 1,
    "total_count": 1
  }
}
403

Forbidden

error

string

Error description.

Example response - 403

{
  "error": "Must have `patients:read` scope enabled."
}

List All Product Events

This endpoint lists all product events from the last 30 days.

  • A product.created event happens when a product is created.

  • A product.updated event happens when a product or one of its variants is updated.

  • A product.description.updated event happens when a product's description is updated.

Arguments

created_at

string

Filter by created_at date. The date must be formatted as follows yyyy-mm-dd.

  • less than: Return events where the created_at date is less than. <yyyy-mm-dd.
  • greater than: Return events where the created_at date is greater than. >yyyy-mm-dd.
  • within a range: Return events where the created_at date is within a range. yyyy-mm-dd..yyyy-mm-dd.
event_type

string

Filter events by event_type.

sort_by

string

Accepts one of the following arguments: event_type created_at.

order_by

string

Ordering defaults to ASC and can take an argument of ASC or DESC.

GET

curl "https://api-us-snd.fullscript.io/api/events/products" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXX'

Responses

200

OK

events

id

string

Unique identifier of the event.

type

string

The type of event that was created.

created_at

string

Timestamp (in utc) when the event was created.

meta

current_page

number

The current page number of the API response.

next_page

number

Then next page number (if available).

prev_page

number

The previous page number (if available).

total_pages

number

Total number of pages that are available in the API response.

total_count

number

Total number of records available in the resource.

Example response

{
  "events": [
    {
      "id": "84562974-4x0x-1128-3x3x-1x86x5x836x2",
      "type": "product.created",
      "created_at": "2018-10-16T04:00:00.000Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "next_page": null,
    "prev_page": null,
    "total_pages": 1,
    "total_count": 1