Overview

The Mural Link system is used to pay participants who are participating in clinical trials.

Note that Mural Link is a working title, and will be changed before launch.

Entities

The system consists of the following entities, whose roles and relationships are described below.

The hierachy is as follows:

Diagram

Client

The client is the company contracting with Mural Health. They are, or represent, a company such as pharmaceutical company, medical device manufacturer, or any other company that produces a product which is subject to clinical trial approval.

The client may also be a CRO, which has been engaged by the type of company described above.

Sponsor

The sponsor is the company that the client is working on behalf of. This may be the same company as the client, but will often be different because logistics are often handled by third parties such as CROs.

Contract

A contract is an agreement between the client and Mural Health. It covers one or more clinical trials. The client will provide funding to Mural Health, which will be used to distribute payments to the participants.

Clinical Trial

A clinical trial is a single phase of the process required to bring a product to market. Trial phases may each run for multiple years, so participants may receive regular payments for an extended period.

The trial is officially referred to via a protocol ID which is a unique identifier for the trial. However, they are most commonly referred to via marketing-friendly names.

Funding

Funding is the money provided to Mural Health to pay the participants. It is not used to pay Mural Health for its services. It is a fiduciary account. This means that Mural Health is authorized to distribute funds to the participants, but the money is still owned by the client.

Site

A site is a location where a clinical trial is conducted. These are usually private practices, hospitals, or universities.

A site may be participating in multiple trials, for multiple different clients and sponsors, simultaneously. A site may be working directly with Mural Health to manage the trials they are participating in, or they may be working under a CRO. It is possible that they can be doing both at the same time.

Site Coordinator

The site coordinator is an employee at the site who directly deals with the participant. They are frequently nurses or other medical staff. They will also be the users of the Mural Link system — registering and paying participants.

A site coordinator can work for multiple sites, although this is usually when there are multiple sites operating as part of the same business.

Participant

A participant is a person who is participating in a clinical trial. They will have a medical condition which is can potentially be treated by the product undergoing the trial.

Participants are often compensated financially for their time and travel. The amount paid to is strictly controlled by an Institutional Review Board (IRB) to ensure that participants are not coerced into participating against their best interests. Specifically, the amount paid, while it should be a fair amount, should not be high enough to encourage the individual to take inadvisable health risks.

Payment Schedule

For each site, there will be a payment schedule which describes each milestone, and how much a participant is to be paid. This is because the amouts will vary by geographic location, and by the type of trial. For example, participants in Los Angeles or New York may receive a higher amount than participants in the midwest. Also, trials involving surgery will pay significantly more than trials involving a pill or injection.

Table 1. Payment Schedule Example
Milestone Amount

Week 1

$100

Week 2

$75

Week 3

$75

Week 4

$75

Week 5

$75

Week 6

$75

Week 7

$75

Week 8

$150

Week 9

$150

Week 10

$200

These amounts will be programmed into the Mural Link system, so the site coordinator doesn’t have to keep track of amounts.

Each milestone can only be paid once. So if a participant is paid for the first two weeks, when they come for their third visit, the site coordinator will not see them available for payment. The site coordinator will only be able to pay them for the week three milestone.

Payment Methods

The participant will be able to select among multiple payment methods. They can have money deposited into their bank account, either by ACH or wire transfer, or directly onto their debit card.

Other payment options, such as Cash App, PayPal, Venmo, etc. will likely be added in the future.

Register

Any user can register an account with the system. However, they will not be able to do anything until they are assigned permissions.

Request

{
    "action": "register",
    "payload": {
        "email": "maricela.todd@example.com",
        "phone": "(212) 555-1212",
        "first_name": "Maricela",
        "last_name": "Todd",
        "password": "w?761)H&Ql4@",
        "address": {
            "street1": "1357 Shalton Dr",
            "street2": "",
            "city": "Denver",
            "state": "CO",
            "post_code": "80202"
        }
    }
}

Response

{
    "action": "register",
    "payload": {
        "uid": "2IC5kBW4Q9v6wcDjV5umwqU3dkv",
        "email": "maricela.todd@example.com",
        "first_name": "Maricela",
        "last_name": "Todd",
        "address": {
            "uid": "2IC5k5H52aDLYiOJUf0R5T2kM5x",
            "street1": "1357 Shalton Dr",
            "city": "Denver",
            "state": "CO",
            "post_code": "80202"
        },
        "phone": "(212) 555-1212",
        "email_verified": false,
        "sms_verified": false,
        "patient": {
            "address": {}
        },
        "caregiver": {
            "address": {},
            "patient": {
                "address": {}
            }
        },
        "email_enabled": true,
        "sms_enabled": true,
        "push_enabled": true
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kAQotMQHZutayd21KMT0N7r",
    "roles": [],
    "user_type": "external"
}

Log In

Logging in is required to take any action except registration. Upon successful login, the user will receive a session ID which much be used for all subsequent requests.

Request

{
    "action": "login",
    "payload": {
        "email": "admin@example.com",
        "password": "259otqjIbYNDeFd2rx5XNpNX4Si"
    }
}

Response

{
    "action": "login",
    "payload": {
        "session_id": "2IC5k6QUEwWEiFjVYADImY6a4Iq",
        "invalid_attempts": 0
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5k6vdMrCmsoQV7Zk1mZFuFnD",
    "roles": [],
    "user_type": "external"
}

keepalive

This call is used to determine whether the current session_id is still valid.

It also refreshes the session timeout.

Request

{
    "action": "keepalive",
    "session_id": "2IC5k6QUEwWEiFjVYADImY6a4Iq"
}

Response

{
    "action": "keepalive",
    "status_code": 200,
    "message": "session valid",
    "request_id": "2IC5k60XJsoWBhVQu3hiWKBV8vc",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Log Out

Expire the current session ID.

Request

{
    "action": "logout",
    "session_id": "2IC5k6QUEwWEiFjVYADImY6a4Iq"
}

Response

{
    "action": "logout",
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kA16CIOI5TnPzRl4bBNtbG4",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

ping

Simple test of server connectivity. ping does not require a valid session ID.

Request

{
    "action": "ping"
}

Response

{
    "action": "ping",
    "status_code": 200,
    "message": "pong",
    "request_id": "2IC5k96FcchfOif5w9F5SY8HIc6",
    "roles": [],
    "user_type": "external"
}

My Info

Retrieve the logged-in user’s information.

Request

{
    "action": "my_info",
    "session_id": "2IC5kHhX4mICF5n6Wj7ZMZbsMBG",
    "payload": {
        "token": ""
    }
}

Response

{
    "action": "my_info",
    "payload": {
        "uid": "2IC5kBo9N7DBOYbNY5xlTLXZNj5",
        "email": "delbert.melendez@example.com",
        "first_name": "Delbert",
        "last_name": "Melendez",
        "address": {
            "uid": "2IC5kHfJsz4qLuryFZ0qkzRjCqA",
            "street1": "1321 Lincoln Rd",
            "city": "Detroit",
            "state": "MI",
            "post_code": "48233"
        },
        "phone": "(212) 555-1212",
        "email_verified": false,
        "sms_verified": false,
        "patient": {
            "address": {}
        },
        "caregiver": {
            "address": {},
            "patient": {
                "address": {}
            }
        },
        "email_enabled": true,
        "sms_enabled": true,
        "push_enabled": true
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kIdA5tvmKqJBCfYX6GeLkt5",
    "roles": [],
    "user_type": "external"
}

Get user verification token

For admin use only.

Retrieve a user’s verification token for testing purposes.

Request

{
    "action": "get_user_verification_token",
    "session_id": "2IC5kFD6hqS1I0Beu0m18eAaQ2G",
    "payload": {
        "user_uid": "2IC5kBo9N7DBOYbNY5xlTLXZNj5"
    }
}

Response

{
    "action": "get_user_verification_token",
    "payload": "2IC5kHgI3IjdraXm9NyEyW95sQU",
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kDIGEnfKZ0Pw53nyZyraBWw",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Get Users

Look up registered users.

This is for use by admins only, and is used to grant permissions.

Request

{
    "action": "get_users",
    "session_id": "2IC5kH2Vq6gLzPWV25U8NgH26kP"
}

Response

{
    "action": "get_users",
    "payload": [
        {
            "uid": "2IC5kBW4Q9v6wcDjV5umwqU3dkv",
            "email": "maricela.todd@example.com",
            "first_name": "Maricela",
            "last_name": "Todd",
            "address": {
                "uid": "2IC5k5H52aDLYiOJUf0R5T2kM5x",
                "street1": "1357 Shalton Dr",
                "city": "Denver",
                "state": "CO",
                "post_code": "80202"
            },
            "phone": "(212) 555-1212",
            "email_verified": false,
            "sms_verified": false,
            "patient": {
                "address": {}
            },
            "caregiver": {
                "address": {},
                "patient": {
                    "address": {}
                }
            },
            "email_enabled": true,
            "sms_enabled": true,
            "push_enabled": true
        },
        {
            "uid": "2IC5k9DVtAiH9RJkjuRmSilhndX",
            "email": "dawn.kidd@example.com",
            "first_name": "Dawn",
            "last_name": "Kidd",
            "address": {
                "uid": "2IC5k7XCBw86wrNyude7EohuAHB",
                "street1": "808 Darly Rd",
                "city": "Miami",
                "state": "FL",
                "post_code": "33152"
            },
            "phone": "(212) 555-1212",
            "email_verified": false,
            "sms_verified": false,
            "patient": {
                "address": {}
            },
            "caregiver": {
                "address": {},
                "patient": {
                    "address": {}
                }
            },
            "email_enabled": true,
            "sms_enabled": true,
            "push_enabled": true
        },
        {
            "uid": "2IC5k7GbSgHfDdtIOLwnf7AP6zg",
            "email": "edgar.osborn@example.com",
            "first_name": "Edgar",
            "last_name": "Osborn",
            "address": {
                "uid": "2IC5k6zeR29hrSFBn9zw5tU4btP",
                "street1": "1185 Limetree Ln",
                "city": "Berkeley",
                "state": "CA",
                "post_code": "94704"
            },
            "phone": "(212) 555-1212",
            "email_verified": false,
            "sms_verified": false,
            "patient": {
                "address": {}
            },
            "caregiver": {
                "address": {},
                "patient": {
                    "address": {}
                }
            },
            "email_enabled": true,
            "sms_enabled": true,
            "push_enabled": true
        },
        {
            "uid": "2IC5kBo9N7DBOYbNY5xlTLXZNj5",
            "email": "delbert.melendez@example.com",
            "first_name": "Delbert",
            "last_name": "Melendez",
            "address": {
                "uid": "2IC5kHfJsz4qLuryFZ0qkzRjCqA",
                "street1": "1321 Lincoln Rd",
                "city": "Detroit",
                "state": "MI",
                "post_code": "48233"
            },
            "phone": "(212) 555-1212",
            "email_verified": false,
            "sms_verified": false,
            "patient": {
                "address": {}
            },
            "caregiver": {
                "address": {},
                "patient": {
                    "address": {}
                }
            },
            "email_enabled": true,
            "sms_enabled": true,
            "push_enabled": true
        }
    ],
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kFEaxU2jN1EMtfiq1Ogeqhl",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Update User

Request

{
    "action": "update_user",
    "session_id": "2IC5kEuagpZaog0ayo4WGbEyDQv",
    "payload": {
        "uid": "2IC5kCffEt9mfqeVAzJItiZQRMw",
        "email": "angelina.pope@example.com",
        "first_name": "Michael",
        "last_name": "Knight",
        "address": {
            "uid": "2IC5kFI1rScbNWVVnDSkalIFO9x",
            "street1": "1406 Beley Rd",
            "city": "Coward",
            "state": "SC",
            "post_code": "29530"
        },
        "phone": "(212) 555-1212",
        "email_verified": false,
        "sms_verified": false,
        "patient": {
            "address": {}
        },
        "caregiver": {
            "address": {},
            "patient": {
                "address": {}
            }
        },
        "email_enabled": true,
        "sms_enabled": true,
        "push_enabled": true,
        "password": "?gX+BCF,Uk6,"
    }
}

Response

{
    "action": "update_user",
    "payload": {
        "uid": "2IC5kCffEt9mfqeVAzJItiZQRMw",
        "email": "angelina.pope@example.com",
        "first_name": "Michael",
        "last_name": "Knight",
        "address": {
            "uid": "2IC5kFI1rScbNWVVnDSkalIFO9x",
            "street1": "1406 Beley Rd",
            "city": "Coward",
            "state": "SC",
            "post_code": "29530"
        },
        "phone": "(212) 555-1212",
        "email_verified": false,
        "sms_verified": false,
        "patient": {
            "address": {}
        },
        "caregiver": {
            "address": {},
            "patient": {
                "address": {}
            }
        },
        "email_enabled": true,
        "sms_enabled": true,
        "push_enabled": true
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kHcwZmyMmIwH8EjSssStaH3",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Update User Contact Preferences

Allow the user to opt into or out of receiving notifications via e-mail, SMS, or mobile push notifications.

Request

{
    "action": "update_user_contact_preferences",
    "session_id": "2IC5kJM2V7WgBdgMyPOzxUIJ9Z4",
    "payload": {
        "uid": "2IC5kGQXi3CiXx0M9u3HyCyAfIV",
        "email_enabled": false,
        "sms_enabled": false,
        "push_enabled": false
    }
}

Response

{
    "action": "update_user_contact_preferences",
    "payload": {
        "uid": "2IC5kGQXi3CiXx0M9u3HyCyAfIV",
        "email": "rupert.cline@example.com",
        "first_name": "Rupert",
        "last_name": "Cline",
        "address": {
            "uid": "2IC5kIJXHmogZXfuWVUMP4Fg8n1",
            "street1": "1998 Bryant Blvd",
            "city": "Plainfield",
            "state": "NJ",
            "post_code": "07061"
        },
        "phone": "(212) 555-1212",
        "email_verified": false,
        "sms_verified": false,
        "patient": {
            "address": {}
        },
        "caregiver": {
            "address": {},
            "patient": {
                "address": {}
            }
        },
        "email_enabled": false,
        "sms_enabled": false,
        "push_enabled": false
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kDSRLPGdMfW8NSDXKDQzOcs",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Password Rules

Get a list of rules for valid passwords.

Request

{
    "action": "password_rules"
}

Response

{
    "action": "password_rules",
    "payload": [
        "Password must be at least 8 characters long.",
        "Password must contain at least one digit.",
        "Password must contain at least one special character: !@#$%^&*()-_=+[]{}|;:'\",.<>/?`~",
        "Password must contain at least one letter (capital or lowercase.)"
    ],
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kGYZ5Kbfcfb8UIbtjwLepi7",
    "roles": [],
    "user_type": "external"
}

Get Clients

The get_clients call is required to get client IDs to be used when creating contracts.

This functionality is only available to admin users.

This requires the get_clients permission.

Request

{
    "action": "get_clients",
    "session_id": "2IC5kF3OXlPnoGeaFBIWRChJp2h"
}

Response

{
    "action": "get_clients",
    "payload": [],
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kHBglYRZp3X57l1j6LB8nug",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Create Client

A client represents a customer of the service. For now there’s nothing here but a name.

This functionality is only available to admin users.

Request

{
    "action": "create_client",
    "session_id": "2IC5kF3OXlPnoGeaFBIWRChJp2h",
    "payload": {
        "name": "Walton, Inc.",
        "sales_contact": "Marsha Dalton",
        "tax_id": "660057137",
        "contact_name": "Nora Manning",
        "contact_phone": "(254) 612-2177",
        "contact_email": "nora.manning@example.com",
        "address": {
            "street1": "1010 West Street Terr",
            "street2": "",
            "city": "Orlando",
            "state": "FL",
            "post_code": "32802"
        }
    }
}

Response

{
    "action": "create_client",
    "payload": {
        "uid": "2IC5kBlQX6teCOZzOsV4bGlTSuW",
        "name": "Walton, Inc.",
        "address": {
            "uid": "2IC5kE3N7sbkECCeVESs5hsen1X",
            "street1": "1010 West Street Terr",
            "city": "Orlando",
            "state": "FL",
            "post_code": "32802"
        }
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kD4h340pz9gALsirZ01FV5e",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Get Client

get_client is like get_clients, except it returns a single client by UID.

Requires permission view_clients.

Request

{
    "action": "get_client",
    "session_id": "2IC5kHnfEWcfEvM58jhAufsr5aD",
    "payload": {
        "uid": "2IC5kHiF3K8UIiPJXWrb9adaqfu"
    }
}

Response

{
    "action": "get_client",
    "payload": {
        "uid": "2IC5kHiF3K8UIiPJXWrb9adaqfu",
        "name": "Cochran, Inc.",
        "address": {
            "uid": "2IC5kEMBcB2fkj0okwGhMhlTU1z",
            "street1": "1545 Beley Rd",
            "city": "Ames",
            "state": "IA",
            "post_code": "50010"
        },
        "audit_history": [
            {
                "uid": "2IC5kIREgQZy40e4BJuPc7Fa2SI",
                "resource_uid": "2IC5kHiF3K8UIiPJXWrb9adaqfu",
                "user_uid": "admin",
                "changes": "created client"
            }
        ]
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kH4O8qcOVoDZBTYkBIcZWE7",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Edit Client

A client may be edited to fix a typo.

This functionality is only available to admin users.

Request

{
    "action": "edit_client",
    "session_id": "2IC5kHnfEWcfEvM58jhAufsr5aD",
    "payload": {
        "uid": "2IC5kHiF3K8UIiPJXWrb9adaqfu",
        "name": "f2cb456dc6f74bd08a84eacb6abcf860"
    }
}

Response

{
    "action": "edit_client",
    "payload": {
        "uid": "2IC5kHiF3K8UIiPJXWrb9adaqfu",
        "name": "f2cb456dc6f74bd08a84eacb6abcf860",
        "address": {
            "uid": "2IC5kEMBcB2fkj0okwGhMhlTU1z",
            "street1": "1545 Beley Rd",
            "city": "Ames",
            "state": "IA",
            "post_code": "50010"
        },
        "audit_history": [
            {
                "uid": "2IC5kIREgQZy40e4BJuPc7Fa2SI",
                "resource_uid": "2IC5kHiF3K8UIiPJXWrb9adaqfu",
                "user_uid": "admin",
                "changes": "created client"
            },
            {
                "uid": "2IC5kEm4mserexXAHl0xmsqi1A4",
                "resource_uid": "2IC5kHiF3K8UIiPJXWrb9adaqfu",
                "user_uid": "admin",
                "changes": "changed name from \"Cochran, Inc.\" to \"f2cb456dc6f74bd08a84eacb6abcf860\", changed address uid from \"2IC5kEMBcB2fkj0okwGhMhlTU1z\" to \"\""
            }
        ]
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kGf5qO7k547RGzz2s7FoPnM",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Search Clients

Search for a client by partial name.

Requires permission view_clients.

Request

{
    "action": "search_clients",
    "session_id": "2IC5kDXEa0q7pTqVdSP1T5Ydk2H",
    "payload": {
        "query": "Oscar"
    }
}

Response

{
    "action": "search_clients",
    "payload": [
        {
            "uid": "2IC5kBdCeTGyLpqYDD3vGNESsRt",
            "name": "Oscar the Grouch",
            "address": {}
        },
        {
            "uid": "2IC5kCbYVcbWr3aPA1KCeLlN3CM",
            "name": "Oscar Wilde",
            "address": {}
        }
    ],
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kHBto7IYU5iV6hJ7RIvF9F4",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Delete Client

A client can not be deleted if they have any contracts.

Request

{
    "action": "delete_client",
    "session_id": "2IC5kJMj3IuhSazkT6gs0Igeopj",
    "payload": {
        "client_uid": "2IC5kF3iGf2RsMd9aKMlUMU2ctz"
    }
}

Response

{
    "action": "delete_client",
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kEJMlknujXgofgxvzNlzCnM",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Create Contract

A contract will be created to be associated with one or more studies being conducted by the client.

This functionality is only available to admin users.

Request

{
    "action": "create_contract",
    "session_id": "2IC5kFqbKOoRt7nQiMPKJDVNq2t",
    "payload": {
        "client_uid": "2IC5kHOWhsMCt2oeFfyiJTMOjaW",
        "name": "Example Contract Brennan-4060",
        "client_signature_date": "2022-10-01",
        "contract_start_date": "2022-11-29",
        "contract_end_date": "2028-02-19",
        "total_contract_value": "301000",
        "currency": "USD"
    }
}

Response

{
    "action": "create_contract",
    "payload": {
        "uid": "2IC5kImnAH21er9JR5QqBu3kB0w",
        "client_uid": "2IC5kHOWhsMCt2oeFfyiJTMOjaW",
        "name": "Example Contract Brennan-4060",
        "total_contract_value": "$301,000.00",
        "currency": "USD",
        "client_signature_date": "2022-10-01T00:00:00Z",
        "contract_start_date": "2022-11-29T00:00:00Z",
        "contract_end_date": "2028-02-19T00:00:00Z",
        "client": {
            "uid": "",
            "name": "",
            "address": {}
        }
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kFfH8qQgYYzmAewc55uATzw",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Edit Contract

Contracts may be edited to correct typos.

This functionality is only available to admin users.

Request

{
    "action": "edit_contract",
    "session_id": "2IC5kCNbIvatJ9eh8VJ7p8H20Aj",
    "payload": {
        "uid": "2IC5kFFK71EzMFdXtyiEIqj0mLy",
        "name": "Example Contract 02"
    }
}

Response

{
    "action": "edit_contract",
    "payload": {
        "uid": "2IC5kFFK71EzMFdXtyiEIqj0mLy",
        "client_uid": "2IC5kIvQhelu652C4QrW0AALZom",
        "name": "Example Contract 02",
        "total_contract_value": "$447,000.00",
        "currency": "USD",
        "client_signature_date": "2022-11-18T00:00:00Z",
        "contract_start_date": "2022-11-29T00:00:00Z",
        "contract_end_date": "2027-08-24T00:00:00Z",
        "client": {
            "uid": "",
            "name": "",
            "address": {}
        }
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kEfYwQlqY6qAu5D70nJamRl",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Get Contracts

The get_contracts function returns all contracts, and must be used to get contract IDs to create studies.

This functionality is only available to admin users.

Requires permission view_contract.

Request

{
    "action": "get_contracts",
    "session_id": "2IC5kGLr7qMNp40Ls2NHQ55ZrTQ",
    "payload": {
        "client_uid": "2IC5kCdfigydqSYt2EnvNteUNW3"
    }
}

Response

{
    "action": "get_contracts",
    "payload": [
        {
            "uid": "2IC5kCETnHr7prremao83tBuCvx",
            "client_uid": "2IC5kCdfigydqSYt2EnvNteUNW3",
            "name": "Example Contract Simmons-3326",
            "total_contract_value": "$408,000.00",
            "currency": "USD",
            "client_signature_date": "2022-10-20T00:00:00Z",
            "contract_start_date": "2022-11-29T00:00:00Z",
            "contract_end_date": "2025-06-04T00:00:00Z",
            "client": {
                "uid": "",
                "name": "",
                "address": {}
            }
        }
    ],
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kHBpduNRNaG9OeOwS51qMRx",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Upload Contract

Upload a PDF of the contract. It accepts a base-64 encoded file.

Requires permission edit_contract.

Request

{
    "action": "upload_contract",
    "session_id": "2IC5kFPuWfv4orfAUrRDRfsGZKF",
    "payload": {
        "contract_uid": "2IC5kJ5jTXiwOv8DA4y2TzCOiow",
        "data": "JVBERi0xLjQKJf////8KMSAwIG9iago8PCAvVGl0bGUgKFN0cmlwZSBQYXlvdXRzKQovQXV0aG9yIChTaGF3biBNaWxvY2hpaykK<truncated>",
        "filename": "example.pdf",
        "client_signature_date": "2022-10-26",
        "contract_start_date": "2022-11-29",
        "contract_end_date": "2026-07-07",
        "total_contract_value": "307000",
        "currency": "USD"
    }
}

Response

{
    "action": "upload_contract",
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kIk4gaD77sZk1Z7W90GSKgz",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Get Contract

Get the details of a single contract.

Requires the permission view_contract.

Request

{
    "action": "get_contract",
    "session_id": "2IC5kFPuWfv4orfAUrRDRfsGZKF",
    "payload": {
        "contract_uid": "2IC5kJ5jTXiwOv8DA4y2TzCOiow"
    }
}

Response

{
    "action": "get_contract",
    "payload": {
        "uid": "2IC5kJ5jTXiwOv8DA4y2TzCOiow",
        "client_uid": "",
        "name": "Example Contract Dejesus-4567",
        "total_contract_value": "$405,000.00",
        "currency": "USD",
        "contract_start_date": "2022-11-29T00:00:00+00:00",
        "document_url": "http://api:6666/files/2IC5kEFktOd96HavvGWkTR8Tna4",
        "client": {
            "uid": "",
            "name": "",
            "address": {}
        }
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kIsaTITxTsigQAHFI8bKvpf",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Delete Contract

Delete a contract. A contract may not be deleted if it has already been funded.

Request

{
    "action": "delete_contract",
    "session_id": "2IC5kIhI6Q5SnscC5VulzYzrw2P",
    "payload": {
        "contract_uid": "2IC5kHoTQBY2eaTiXYaRdHSggsj"
    }
}

Response

{
    "action": "delete_contract",
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kDspSvG8iHGc9Mi4sernswk",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Get Funding

Get remaining funding for a contract.

Either the contract_uid or trial_uid can be used.

Request

{
    "action": "get_funding",
    "session_id": "2IC5kHGQJFxYiVLGq723loIIpCE",
    "payload": {
        "contract_uid": "2IC5kIRWqpFFAgPc89n1c4FpBjG",
        "trial_uid": ""
    }
}

Response

{
    "action": "get_funding",
    "payload": 0,
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kGjpxEacy4n5GwnuOb6vCUs",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Funding

Funding is added by Mural Health employees only. Sufficient funding is required for payments to be made to participants on behalf of the client.

This functionality is only available to admin users.

Requires the add_funding permission.

Request

{
    "action": "add_funding",
    "session_id": "2IC5kHGQJFxYiVLGq723loIIpCE",
    "payload": {
        "contract_uid": "2IC5kIRWqpFFAgPc89n1c4FpBjG",
        "amount": 111.11,
        "currency": "USD"
    }
}

Response

{
    "action": "add_funding",
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kJJRkj5Sg4sevCA9K9IIApQ",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Create Trial

A trial represents a clinical trial being conducted by the client.

This requires the create_trial permission.

Request

{
    "action": "create_trial",
    "session_id": "2IC5kHGQJFxYiVLGq723loIIpCE",
    "payload": {
        "contract_uid": "2IC5kIRWqpFFAgPc89n1c4FpBjG",
        "name": "Trial Benjamin-97",
        "protocol_id": "XK8922-67276"
    }
}

Response

{
    "action": "create_trial",
    "payload": {
        "uid": "2IC5kFDS2b6HLKvd6B2AkyeqdnS",
        "contract_uid": "2IC5kIRWqpFFAgPc89n1c4FpBjG",
        "name": "Trial Benjamin-97",
        "protocol_id": "XK8922-67276",
        "contract": {
            "uid": "",
            "client_uid": "",
            "name": "",
            "client": {
                "uid": "",
                "name": "",
                "address": {}
            }
        }
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kCOnhtFC4GWYc3kJVaFXqlz",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Edit Trial

Edit trial information.

This requires the edit_trial permission.

Request

{
    "action": "edit_trial",
    "session_id": "2IC5kH85KAiBMlnO0cTgV6HaOf0",
    "payload": {
        "uid": "2IC5kEDRLR5a7Nhk84qZ3GWODz3",
        "name": "Trial 02",
        "protocol_id": "potato"
    }
}

Response

{
    "action": "edit_trial",
    "payload": {
        "uid": "2IC5kEDRLR5a7Nhk84qZ3GWODz3",
        "contract_uid": "2IC5kEF4ryr9RtJWRW44zNS4zus",
        "name": "Trial 02",
        "protocol_id": "potato",
        "contract": {
            "uid": "",
            "client_uid": "",
            "name": "",
            "client": {
                "uid": "",
                "name": "",
                "address": {}
            }
        }
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kCdS5RAPCT8OfBafRGIUt1R",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Search Trials

Search for a trial by name or protocol ID.

Requires permission view_trials.

Request

{
    "action": "search_trials",
    "session_id": "2IC5kGb1cjFZZ6tgvbA1kILlH8V",
    "payload": {
        "query": "micro"
    }
}

Response

{
    "action": "search_trials",
    "payload": [
        {
            "uid": "2IC5kC7WRv0tEhdF9b4yZGgTuw9",
            "contract_uid": "2IC5kH2vdazYJpVQH4NR1KcmhFx",
            "name": "Potato Trial 43",
            "protocol_id": "microphone",
            "contract": {
                "uid": "",
                "client_uid": "",
                "name": "",
                "client": {
                    "uid": "",
                    "name": "",
                    "address": {}
                }
            }
        }
    ],
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kG89P58jni45hCG0yfmvEVQ",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Get Trials

Get all trials available to the user.

Request

{
    "action": "get_trials",
    "session_id": "2IC5kCT0nilpN2a69734gvKg6pk"
}

Response

{
    "action": "get_trials",
    "payload": [
        {
            "uid": "2IC5kFDS2b6HLKvd6B2AkyeqdnS",
            "contract_uid": "",
            "name": "Trial Benjamin-97",
            "protocol_id": "XK8922-67276",
            "contract": {
                "uid": "",
                "client_uid": "",
                "name": "",
                "client": {
                    "uid": "",
                    "name": "",
                    "address": {}
                }
            }
        },
        {
            "uid": "2IC5kGFtfDvhSnm9zUVdSmxhx3y",
            "contract_uid": "",
            "name": "Trial Aguirre-97",
            "protocol_id": "XK6893-44646",
            "contract": {
                "uid": "",
                "client_uid": "",
                "name": "",
                "client": {
                    "uid": "",
                    "name": "",
                    "address": {}
                }
            }
        },
        {
            "uid": "2IC5kEDRLR5a7Nhk84qZ3GWODz3",
            "contract_uid": "",
            "name": "Trial 02",
            "protocol_id": "potato",
            "contract": {
                "uid": "",
                "client_uid": "",
                "name": "",
                "client": {
                    "uid": "",
                    "name": "",
                    "address": {}
                }
            }
        },
        {
            "uid": "2IC5kC7WRv0tEhdF9b4yZGgTuw9",
            "contract_uid": "",
            "name": "Potato Trial 43",
            "protocol_id": "microphone",
            "contract": {
                "uid": "",
                "client_uid": "",
                "name": "",
                "client": {
                    "uid": "",
                    "name": "",
                    "address": {}
                }
            }
        },
        {
            "uid": "2IC5kIMqENEySwoGigVy5gxCLrQ",
            "contract_uid": "",
            "name": "Sasquash Hunt",
            "protocol_id": "telephone",
            "contract": {
                "uid": "",
                "client_uid": "",
                "name": "",
                "client": {
                    "uid": "",
                    "name": "",
                    "address": {}
                }
            }
        },
        {
            "uid": "2IC5kETnS6VwysbVkvGMHhgvy9m",
            "contract_uid": "",
            "name": "Trial Petty-89",
            "protocol_id": "XK6456-48233",
            "contract": {
                "uid": "",
                "client_uid": "",
                "name": "",
                "client": {
                    "uid": "",
                    "name": "",
                    "address": {}
                }
            }
        },
        {
            "uid": "2IC5kF0NiL4kleRKs5ezAs1LliU",
            "contract_uid": "",
            "name": "Trial Meyers-33",
            "protocol_id": "XK2942-33575",
            "contract": {
                "uid": "",
                "client_uid": "",
                "name": "",
                "client": {
                    "uid": "",
                    "name": "",
                    "address": {}
                }
            }
        },
        {
            "uid": "2IC5kBmbsHiORyeJxysZPk9oauY",
            "contract_uid": "",
            "name": "Trial Gilmore-81",
            "protocol_id": "XK8608-30601",
            "contract": {
                "uid": "",
                "client_uid": "",
                "name": "",
                "client": {
                    "uid": "",
                    "name": "",
                    "address": {}
                }
            }
        }
    ],
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kICGG32vFotKcTrJlti7F4r",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Get Trial

Get details about an individual trial.

Request

{
    "action": "get_trial",
    "session_id": "2IC5kG5O1Ev6ALQjs25M505aclY",
    "payload": {
        "trial_uid": "2IC5kEG4xYy0kZ3DGU86ZOEprfq"
    }
}

Response

{
    "action": "get_trial",
    "payload": {
        "uid": "2IC5kEG4xYy0kZ3DGU86ZOEprfq",
        "contract_uid": "2IC5kCGqSBxAkYIES5mRDOUK1e2",
        "name": "Trial Paul-36",
        "protocol_id": "XK8758-44646",
        "contract": {
            "uid": "",
            "client_uid": "",
            "name": "",
            "client": {
                "uid": "",
                "name": "",
                "address": {}
            }
        }
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kFD8StuNR3623uf6zHlcBcM",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Delete Trial

A trial may only be deleted if no participants are enrolled.

Request

{
    "action": "delete_trial",
    "session_id": "2IC5kCPGiil1KqXwXC72gdkjTul",
    "payload": {
        "trial_uid": "2IC5kIM8ku1ZcJE3Vr9chUe0yna"
    }
}

Response

{
    "action": "delete_trial",
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kCXgq2UL16QGK3OlcGAiZrh",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Grant

An admin may grant any permissions to any user.

A user who is allowed to grant permissions may only grant permissions they themselves have.

Based on the hierarchy described above, a user may be granted permissions at any level. For example, if a user is granted create_trial permissions to a contract, then they may create studies for that contract. However, if they’re granted create_trial permissions for a client, they may create studies for any contract for that client.

Requires permission grant, and the user must have the permissions being granted.

Request

{
    "action": "grant",
    "session_id": "2IC5kFleBER0dck36czrO4ltevk",
    "payload": {
        "resource_uid": "2IC5kHYHHfQvqSjLfxjAws8BAeq",
        "user_uid": "2IC5kGHVHQ8mecLOsQ37hZCZv1L",
        "permissions": [
            "view_trials",
            "create_trial",
            "approve_payments"
        ]
    }
}

Response

{
    "action": "grant",
    "status_code": 200,
    "message": "3 permissions granted, 0 errors: ",
    "request_id": "2IC5kCwDUn49HYLE6XDqlNlx6eI",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Get Permissions

This is an internal admin function used for testing.

Request

{
    "action": "get_permissions",
    "session_id": "2IC5kLcNTWe5f8fM7785K6XUUj5",
    "payload": {
        "user_uid": "2IC5kJhklyTyi7kcaQkXQYt03I4"
    }
}

Response

{
    "action": "get_permissions",
    "payload": {
        "create_trial": [
            {
                "uid": "2IC5kKkmDwyo1CjQjHQHawVTp9p",
                "description": "Example Contract Barnes-7434",
                "type": "contract"
            }
        ]
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kQY4EPZXC6wS1hoM8YRLGA5",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Copy Permissions

This action allows a user (such as as site coordinator) to be set up with permissions identical to than of an existing user.

Note that any existing permissions for the new user will remain, even if the user whose permissions are being copied does not have them.

This action requires the grant permission.

Request

{
    "action": "copy_permissions",
    "session_id": "2IC5kNmP1ybwky0NxY42RAepZCt",
    "payload": {
        "from_uid": "2IC5kOuFqiAB46ET8WzUOfeAu0B",
        "to_uid": "2IC5kKB4oVn5PtsQTd54whsIPGe"
    }
}

Response

{
    "action": "copy_permissions",
    "status_code": 200,
    "message": "1 of 1 permissions copied successfully",
    "request_id": "2IC5kLNMXCrpshsDTeX7mVqaAEg",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

List Permissions

View a list of all permissions in the system.

Not all permissions will be avaialble to the current user.

Request

{
    "action": "list_permissions",
    "session_id": "2IC5kLXrAwUV4G2TzvYG0MbFtIH"
}

Response

{
    "action": "list_permissions",
    "payload": [
        "add_milestone",
        "add_participant",
        "add_trial_site",
        "approve_payments",
        "approve_travel",
        "assign_role",
        "bulk_email",
        "create_appointment",
        "create_site",
        "create_trial",
        "delete_site",
        "delete_trial",
        "edit_contract",
        "edit_trial",
        "enroll",
        "get_document",
        "grant",
        "manual_payment",
        "messaging",
        "milestone_payment",
        "set_enrollment_status",
        "set_payment_type",
        "travel_payment",
        "update_participant",
        "upload_document",
        "view_clients",
        "view_contract",
        "view_enrollments",
        "view_participants",
        "view_payment_schedule",
        "view_payments",
        "view_reports",
        "view_sites",
        "view_trials"
    ],
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kKHs7BKpCqgAYEE3j0Ss3Sd",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Revoke

Revoke permissions from a user.

The user revoking the permission must have grant access and must also have the permission being revoked.

Request

{
    "action": "revoke",
    "session_id": "2IC5kLLXTfALc9mJhxLATtMHfql",
    "payload": {
        "resource_uid": "2IC5kKjN6cAV3tXOXIWAou4gfiS",
        "user_uid": "2IC5kMj20d2AEKJkOzV61LiPnr1",
        "permissions": [
            "approve_payments"
        ]
    }
}

Response

{
    "action": "revoke",
    "status_code": 200,
    "message": "1 permissions revoked, 0 errors: ",
    "request_id": "2IC5kK6JW8OVyOeu10DmOlw7QGw",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Get Sites

Get all sites from the system.

Requires permission view_sites.

Request

{
    "action": "get_sites",
    "session_id": "2IC5kP2M7MSrDa2TIZVlZ3vVqpo",
    "payload": {
        "contract_uid": "2IC5kOPAXDXirt4MHIRwnLz2IXe"
    }
}

Response

{
    "action": "get_sites",
    "payload": [],
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kKSQXlEftpznr25LwdEAFUi",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Create Site

A site is a location where clinical trials are conducted. This could be a private practice, hospital, or university.

The trial UID or contract UID is required to create a site. If the trial UID is sent, the trial/site association will be created automatically. Otherwise, a call must be made to add_trial_site to associate the site with the trial before subjects can be enrolled.

Request

{
    "action": "create_site",
    "session_id": "2IC5kP2M7MSrDa2TIZVlZ3vVqpo",
    "payload": {
        "name": "Johnson Clinic",
        "trial_uid": "",
        "client_uid": "2IC5kJhBaeDTwVyW4ROaL0Hs7mw"
    }
}

Response

{
    "action": "create_site",
    "payload": {
        "uid": "2IC5kKjdiTLsHFKrpPK3754xHrI",
        "name": "Johnson Clinic",
        "client_uid": "2IC5kJhBaeDTwVyW4ROaL0Hs7mw"
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kJnKnlJ7NkxJEPVM5x4baiW",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Edit Site

An admin or business partner can edit a site.

This feature is currently only available to an admin user.

Request

{
    "action": "edit_site",
    "session_id": "2IC5kPrAHmQltv4l0izFhK2OOm6",
    "payload": {
        "uid": "2IC5kQPG5dchM96kSCd91z8OQ8G",
        "name": "a6093f6051be4750a5bb266cf48d602b"
    }
}

Response

{
    "action": "edit_site",
    "payload": {
        "uid": "2IC5kQPG5dchM96kSCd91z8OQ8G",
        "name": "a6093f6051be4750a5bb266cf48d602b",
        "client_uid": "2IC5kNfOarTBiqfviXFbD3IKVCN"
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kPJeX1tzpAjR1iAHGIDA18E",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Get Site

Look up an individual site by its UID.

Requires permission view_sites.

Request

{
    "action": "get_site",
    "session_id": "2IC5kPrAHmQltv4l0izFhK2OOm6",
    "payload": {
        "uid": "2IC5kQPG5dchM96kSCd91z8OQ8G"
    }
}

Response

{
    "action": "get_site",
    "payload": {
        "uid": "2IC5kQPG5dchM96kSCd91z8OQ8G",
        "name": "a6093f6051be4750a5bb266cf48d602b"
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kMaYiLZrqFrUyn7mk7AbMCX",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Delete Site

Delete a site.

A site may not be deleted if it’s associated with one or more trials.

Request

{
    "action": "delete_site",
    "session_id": "2IC5kKBdjIS5uPL2fdAE8KWlaZI",
    "payload": {
        "site_uid": "2IC5kOK9NBcZYEOrMov1ZcgL5Fj"
    }
}

Response

{
    "action": "delete_site",
    "status_code": 200,
    "message": "site deleted",
    "request_id": "2IC5kK67qOkVydJgEfcTJWbY0Uw",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Add Trial Site

Associate a site with a clinical trial.

Requires permission add_trial_site.

Request

{
    "action": "add_trial_site",
    "session_id": "2IC5kKJUATFqPv5sTFGbqIdEry8",
    "payload": {
        "trial_uid": "2IC5kLdYiJ1aPXAglPYjfILKCee",
        "site_uid": "2IC5kNYOk93cLPeCHYNXxEo4mAe"
    }
}

Response

{
    "action": "add_trial_site",
    "payload": {
        "uid": "2IC5kO5Eygo6xGA5JnH0pRmSu3v",
        "site_uid": "2IC5kNYOk93cLPeCHYNXxEo4mAe",
        "trial_uid": "2IC5kLdYiJ1aPXAglPYjfILKCee",
        "site": {
            "uid": "",
            "name": ""
        },
        "trial": {
            "uid": "",
            "contract_uid": "",
            "name": "",
            "protocol_id": "",
            "contract": {
                "uid": "",
                "client_uid": "",
                "name": "",
                "client": {
                    "uid": "",
                    "name": "",
                    "address": {}
                }
            }
        }
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kNaAp44PxPYRbOEABxUlBLa",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Add Milestone

This function adds the payment details for a milestone. This is specific per milestone, per site, per clinical trial.

The optional effective_date parameter is used to set the effective date of the milestone payment. By default, the effective date is the time this milestone is added. This allows automatic updates to the payment schedule as the trial progresses.

For example, if milestone "Week 1" is added today, and another is added for "Week 1" with an effective date of next month, then all payments made for the next month will use the first amount, and payments starting next month will use the second amount.

Requires permission add_milestone.

Request

{
    "action": "add_milestone",
    "session_id": "2IC5kKJUATFqPv5sTFGbqIdEry8",
    "payload": {
        "milestone": "Week 2",
        "amount": 5,
        "currency": "USD",
        "trial_uid": "2IC5kLdYiJ1aPXAglPYjfILKCee",
        "site_uid": "2IC5kNYOk93cLPeCHYNXxEo4mAe",
        "sort_order": 1
    }
}

Response

{
    "action": "add_milestone",
    "payload": {
        "uid": "2IC5kKoEeDayU8YDKDO7dutl2S5",
        "trial_site_uid": "2IC5kO5Eygo6xGA5JnH0pRmSu3v",
        "effective_date": "2022-11-28T22:01:06.89856Z",
        "milestone": "Week 2",
        "amount": 5,
        "currency": "USD",
        "sort_order": 0,
        "site_uid": "2IC5kNYOk93cLPeCHYNXxEo4mAe",
        "trial_uid": "2IC5kLdYiJ1aPXAglPYjfILKCee"
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kONYGCoMhkbGATmVz2jMpSL",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Get Trial Sites

Retrieve all trial/site info by trial UID.

Request

{
    "action": "get_trial_sites",
    "session_id": "2IC5kOOG4Ejke3Cg9zfWlkKou4p",
    "payload": {
        "trial_uid": "2IC5kJZnWyvIJxbFREPQWqjJ10d"
    }
}

Response

{
    "action": "get_trial_sites",
    "payload": [
        {
            "uid": "2IC5kMpOQZkfgmwfPyU1kyh77B2",
            "site_uid": "2IC5kPV5JvpGxyP5gqFAhXomGY8",
            "trial_uid": "2IC5kJZnWyvIJxbFREPQWqjJ10d",
            "site": {
                "uid": "2IC5kPV5JvpGxyP5gqFAhXomGY8",
                "name": "Gilliam Clinic",
                "client_uid": "2IC5kJR2CABctKq9cOOSSLglB74"
            },
            "trial": {
                "uid": "2IC5kJZnWyvIJxbFREPQWqjJ10d",
                "contract_uid": "2IC5kRCYbNAZ1swaa1JLh96VFUT",
                "name": "Trial Strickland-46",
                "protocol_id": "XK4368-60507",
                "contract": {
                    "uid": "",
                    "client_uid": "",
                    "name": "",
                    "client": {
                        "uid": "",
                        "name": "",
                        "address": {}
                    }
                }
            }
        }
    ],
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kW8myF5xnxiQWk7muIYxnZ4",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Add Participant

Adds a participant and the participant’s association with a site. A participant can be associated with multiple studies for the same site.

Requires permission add_participant.

Request

{
    "action": "add_participant",
    "session_id": "2IC5kYkQzhKj0APj376DFJhkCTF",
    "payload": {
        "site_uid": "2IC5kYsH64ubQMMduEqaAlpXNkS",
        "first_name": "Malinda",
        "last_name": "Ware",
        "email": "Malinda.Ware@example.com",
        "dob": "1951-10-15",
        "phone": "(216) 394-5697",
        "email_enabled": true,
        "address": {
            "street1": "1273 Anton Dr",
            "street2": "",
            "city": "Addison",
            "state": "IL",
            "post_code": "60101"
        },
        "emergency_contact": "Joe Pesci",
        "emergency_phone": "(212) 555-1212"
    }
}

Response

{
    "action": "add_participant",
    "payload": {
        "uid": "2IC5kYlM9VaZVA9bP0DkmtAjpJ7",
        "email": "malinda.ware@example.com",
        "emergency_contact": "Joe Pesci",
        "emergency_phone": "(212) 555-1212",
        "enrollment_date": "2022-11-28",
        "first_name": "Malinda",
        "last_name": "Ware",
        "phone": "(216) 394-5697",
        "site_uid": "2IC5kYsH64ubQMMduEqaAlpXNkS",
        "time_zone": "America/New_York",
        "dob": "1951-10-15",
        "address": {
            "uid": "2IC5kUwS5OYoVuk1cHJyOym2kKw",
            "street1": "1273 Anton Dr",
            "city": "Addison",
            "state": "IL",
            "post_code": "60101"
        }
    },
    "status_code": 200,
    "message": "participant added",
    "request_id": "2IC5kUqlgMtHFPTxgrRSMMxNRwZ",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Search Participants

Search for a participant by partial name.

Requires permission view_participants.

Request

{
    "action": "search_participants",
    "session_id": "2IC5kWMdYRCJVZ7UBx7MxNhnant",
    "payload": {
        "query": "bill"
    }
}

Response

{
    "action": "search_participants",
    "payload": [
        {
            "uid": "2IC5kSPGfcUbJckV0CNG0yWsJsh",
            "first_name": "Bill",
            "last_name": "Hicks",
            "address": {}
        },
        {
            "uid": "2IC5kUW55K4Txf9GvDK61fm7zjA",
            "first_name": "William",
            "last_name": "Hickey",
            "address": {}
        }
    ],
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kT12DpIQVQv5OTgIxLWoe6c",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Enroll

Enroll a participant in a trial at a site.

Requires the enroll permission.

Request

{
    "action": "enroll",
    "session_id": "2IC5kRScQpGadqz6LYJUjLv1jWr",
    "payload": {
        "participant_uid": "2IC5kRGc57s5npJW48IUGRYLBRm",
        "trial_uid": "2IC5kRYyPijJWtwF16Hf9XocF2c",
        "site_uid": "2IC5kSR8vH5NLdSVK57Aw1A61FQ",
        "subject_id": "8747"
    }
}

Response

{
    "action": "enroll",
    "payload": {
        "uid": "2IC5kVhfKhPerpbnkyLcZynEtaK",
        "trial_uid": "2IC5kRYyPijJWtwF16Hf9XocF2c",
        "trial_site_uid": "2IC5kW5CYUapHPcpsW39gaVqQcC",
        "participant_uid": "2IC5kRGc57s5npJW48IUGRYLBRm",
        "patient_uid": "2IC5kRGc57s5npJW48IUGRYLBRm",
        "subject_id": "8747",
        "payment_type_uid": "",
        "status": "enrolled",
        "payment_address": {},
        "patient": {
            "address": {}
        },
        "trial_site": {
            "uid": "2IC5kW5CYUapHPcpsW39gaVqQcC",
            "site_uid": "2IC5kSR8vH5NLdSVK57Aw1A61FQ",
            "trial_uid": "2IC5kRYyPijJWtwF16Hf9XocF2c",
            "site": {
                "uid": "",
                "name": ""
            },
            "trial": {
                "uid": "",
                "contract_uid": "",
                "name": "",
                "protocol_id": "",
                "contract": {
                    "uid": "",
                    "client_uid": "",
                    "name": "",
                    "client": {
                        "uid": "",
                        "name": "",
                        "address": {}
                    }
                }
            }
        },
        "user_uid": "2IC5kYG0JCPlArbxk3ubpeLz337"
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kRKbvZkavfb6si2nuLNBSs1",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Get Participants

Get all participants visible to the current user.

Request

{
    "action": "get_participants",
    "session_id": "2IC5kRScQpGadqz6LYJUjLv1jWr",
    "payload": {
        "trial_uid": "2IC5kRYyPijJWtwF16Hf9XocF2c"
    }
}

Response

{
    "action": "get_participants",
    "payload": [
        {
            "uid": "2IC5kYlM9VaZVA9bP0DkmtAjpJ7",
            "email": "malinda.ware@example.com",
            "emergency_contact": "Joe Pesci",
            "emergency_phone": "(212) 555-1212",
            "enrollment_date": "2022-11-28",
            "first_name": "Malinda",
            "last_name": "Ware",
            "phone": "(216) 394-5697",
            "site_uid": "2IC5kYsH64ubQMMduEqaAlpXNkS",
            "time_zone": "America/New_York",
            "user_uid": "2IC5kTPPA1c3X9DTxwm5ho0Z5S7",
            "dob": "1951-10-15",
            "address": {
                "uid": "2IC5kUwS5OYoVuk1cHJyOym2kKw",
                "street1": "1273 Anton Dr",
                "city": "Addison",
                "state": "IL",
                "post_code": "60101"
            }
        },
        {
            "uid": "2IC5kSPGfcUbJckV0CNG0yWsJsh",
            "email": "bill.hicks@example.com",
            "emergency_contact": "Joe Pesci",
            "emergency_phone": "(212) 555-1212",
            "enrollment_date": "2022-11-28",
            "first_name": "Bill",
            "last_name": "Hicks",
            "phone": "(876) 338-9323",
            "site_uid": "2IC5kXwajujj0ePNh2mP7dkXgg9",
            "time_zone": "America/New_York",
            "dob": "1961-12-16",
            "address": {
                "uid": "2IC5kT1KQ9FVhCjKHQo3m5NWFT9",
                "street1": "715 Lowel Rd",
                "city": "Binghamton",
                "state": "NY",
                "post_code": "13902"
            }
        },
        {
            "uid": "2IC5kUW55K4Txf9GvDK61fm7zjA",
            "email": "william.hickey@example.com",
            "emergency_contact": "Joe Pesci",
            "emergency_phone": "(212) 555-1212",
            "enrollment_date": "2022-11-28",
            "first_name": "William",
            "last_name": "Hickey",
            "phone": "(847) 564-6619",
            "site_uid": "2IC5kXwajujj0ePNh2mP7dkXgg9",
            "time_zone": "America/New_York",
            "dob": "1973-01-05",
            "address": {
                "uid": "2IC5kTAB1F4S8U4mdTpMCayBXCs",
                "street1": "95 Third St",
                "city": "Erie",
                "state": "PA",
                "post_code": "16515"
            }
        },
        {
            "uid": "2IC5kVAJvroOVb3fOrCUYr24sNZ",
            "email": "george.carlin@example.com",
            "emergency_contact": "Joe Pesci",
            "emergency_phone": "(212) 555-1212",
            "enrollment_date": "2022-11-28",
            "first_name": "George",
            "last_name": "Carlin",
            "phone": "(664) 799-3831",
            "site_uid": "2IC5kXwajujj0ePNh2mP7dkXgg9",
            "time_zone": "America/New_York",
            "dob": "1958-06-15",
            "address": {
                "uid": "2IC5kSFHziOFzJ9kGMU54IEaxEM",
                "street1": "1697 Burnet Dr",
                "city": "Phoenix",
                "state": "AZ",
                "post_code": "85026"
            }
        }
    ],
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kXPg90bPwbuPDZEGgaYJLyt",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Get Enrolled

Get a list of participants enrolled in a trial at a site.

Requires permission view_enrollments.

Request

{
    "action": "get_enrolled",
    "session_id": "2IC5kWMd8W51fwKHsGvtSqaUkVH",
    "payload": {
        "trial_uid": "2IC5kVNMJdL4GEOVWEo8JCT2Ip7",
        "site_uid": "2IC5kYpFsLUuV9tr3sN0qmnqmAm"
    }
}

Response

{
    "action": "get_enrolled",
    "payload": [
        {
            "uid": "2IC5kVrfgAtMp4U8WSJ6IP3yKLw",
            "email": "bradly.vinson@example.com",
            "emergency_contact": "Joe Pesci",
            "emergency_phone": "(212) 555-1212",
            "enrollment_uid": "2IC5kWcjLHV2GjAwKL5jseJWlKs",
            "enrollment_date": "2022-11-28",
            "first_name": "Bradly",
            "last_name": "Vinson",
            "phone": "(812) 305-2885",
            "site_uid": "2IC5kYpFsLUuV9tr3sN0qmnqmAm",
            "time_zone": "America/New_York",
            "user_uid": "2IC5kTjPzXfpxfwoKNrOrimx2MV",
            "dob": "1962-12-25",
            "address": {
                "uid": "2IC5kYb1H7IA1yGD8LnWx8MyGD1",
                "street1": "1839 Genesse Blvd",
                "city": "Raleigh",
                "state": "NC",
                "post_code": "27611"
            },
            "enrollments": [
                {
                    "uid": "2IC5kWcjLHV2GjAwKL5jseJWlKs",
                    "subject_id": "7030",
                    "payment_type_uid": "",
                    "status": "enrolled",
                    "payment_address": {},
                    "patient": {
                        "address": {}
                    },
                    "trial_site": {
                        "site": {
                            "uid": "2IC5kYpFsLUuV9tr3sN0qmnqmAm",
                            "name": "Sparks Clinic"
                        },
                        "trial": {
                            "uid": "2IC5kVNMJdL4GEOVWEo8JCT2Ip7",
                            "contract_uid": "",
                            "name": "Trial Blankenship-46",
                            "protocol_id": "",
                            "contract": {
                                "uid": "",
                                "client_uid": "",
                                "name": "",
                                "client": {
                                    "uid": "",
                                    "name": "",
                                    "address": {}
                                }
                            }
                        },
                        "payment_schedules": [
                            {
                                "uid": "2IC5kWkzzOXEhTrdaDqfdqeFqX2",
                                "effective_date": "0001-01-01T00:00:00Z",
                                "milestone": "Week 2",
                                "amount": 5,
                                "currency": "USD",
                                "sort_order": 1
                            },
                            {
                                "uid": "2IC5kV8ba02bJ524m8sl0KODBll",
                                "effective_date": "0001-01-01T00:00:00Z",
                                "milestone": "Week 3",
                                "amount": 10,
                                "currency": "USD",
                                "sort_order": 2
                            },
                            {
                                "uid": "2IC5kWeWufXSF34Wl2EUbWythHZ",
                                "effective_date": "0001-01-01T00:00:00Z",
                                "milestone": "Week 4",
                                "amount": 15,
                                "currency": "USD",
                                "sort_order": 3
                            },
                            {
                                "uid": "2IC5kVMX9U16pqf1dAFudrqcUXw",
                                "effective_date": "0001-01-01T00:00:00Z",
                                "milestone": "Week 5",
                                "amount": 20,
                                "currency": "USD",
                                "sort_order": 4
                            },
                            {
                                "uid": "2IC5kSmxLglJ5qc7asdIEqBTViB",
                                "effective_date": "0001-01-01T00:00:00Z",
                                "milestone": "Week 6",
                                "amount": 25,
                                "currency": "USD",
                                "sort_order": 5
                            },
                            {
                                "uid": "2IC5kSrv9zda6kToZWTDuctPong",
                                "effective_date": "0001-01-01T00:00:00Z",
                                "milestone": "Week 7",
                                "amount": 30,
                                "currency": "USD",
                                "sort_order": 6
                            },
                            {
                                "uid": "2IC5kRErDVGLHGquy3sY2aITBGZ",
                                "effective_date": "0001-01-01T00:00:00Z",
                                "milestone": "Week 8",
                                "amount": 35,
                                "currency": "USD",
                                "sort_order": 7
                            },
                            {
                                "uid": "2IC5kYHoHHOzrSH08Hp574ct7v7",
                                "effective_date": "0001-01-01T00:00:00Z",
                                "milestone": "Week 9",
                                "amount": 40,
                                "currency": "USD",
                                "sort_order": 8
                            },
                            {
                                "uid": "2IC5kVIZ3k5lXasVJ5ReMsDZyoN",
                                "effective_date": "0001-01-01T00:00:00Z",
                                "milestone": "Week 10",
                                "amount": 45,
                                "currency": "USD",
                                "sort_order": 9
                            },
                            {
                                "uid": "2IC5kTwFmSLW1DQkjSNrW1GiVqg",
                                "effective_date": "0001-01-01T00:00:00Z",
                                "milestone": "Week 11",
                                "amount": 50,
                                "currency": "USD",
                                "sort_order": 10
                            }
                        ]
                    }
                }
            ]
        }
    ],
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kYgN4EKuFkOXxZ6f5dBbkfB",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Update Participant

Update a participant’s details.

Request

{
    "action": "update_participant",
    "session_id": "2IC5kSmjg6K3xF9zxTHUqMn4PAW",
    "payload": {
        "uid": "2IC5kUl0j94ouPUv7RyBmyTT17g",
        "email": "luke.flynn@example.com",
        "emergency_contact": "Dwayne \"The Rock\" Johnson",
        "emergency_phone": "212-666-6666",
        "enrollment_date": "2022-11-28",
        "first_name": "Throatwobbler",
        "last_name": "Mangrove",
        "phone": "(287) 786-4378",
        "site_uid": "2IC5kVUTUQW0cq33aGHigk84BDw",
        "time_zone": "America/New_York",
        "dob": "1965-01-03",
        "address": {
            "uid": "2IC5kSZONel5b5uU8bdX89Cn9Tc",
            "street1": "1243 New First Rd",
            "city": "Garland",
            "state": "TX",
            "post_code": "75040",
            "street2": "Apartment 3"
        }
    }
}

Response

{
    "action": "update_participant",
    "payload": {
        "uid": "2IC5kUl0j94ouPUv7RyBmyTT17g",
        "email": "luke.flynn@example.com",
        "emergency_contact": "Dwayne \"The Rock\" Johnson",
        "emergency_phone": "212-666-6666",
        "enrollment_date": "2022-11-28",
        "first_name": "Throatwobbler",
        "last_name": "Mangrove",
        "phone": "(287) 786-4378",
        "site_uid": "2IC5kVUTUQW0cq33aGHigk84BDw",
        "time_zone": "America/New_York",
        "user_uid": "2IC5kS9RB69ccpRHgKGphMGm6Cp",
        "dob": "1965-01-03",
        "address": {
            "uid": "2IC5kSZONel5b5uU8bdX89Cn9Tc",
            "street1": "1243 New First Rd",
            "street2": "Apartment 3",
            "city": "Garland",
            "state": "TX",
            "post_code": "75040"
        }
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kTOF27jfDzov2DyJJvwzjtO",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Get Enrollments

Retrieve all enrollments for a participant.

Requires permission view_participants.

Request

{
    "action": "get_enrollments",
    "session_id": "2IC5kSwIwp2OM18Trpe2brWko3v",
    "payload": {
        "participant_uid": "2IC5kYQceBhRtviYnJegKx6qA8m"
    }
}

Response

{
    "action": "get_enrollments",
    "payload": [
        {
            "uid": "2IC5kVdLCFj4oR1808RXra0YJrq",
            "trial_uid": "2IC5kS5eFryq19S0R5ybG4gSPY3",
            "trial_site_uid": "2IC5kUznrwbbaEUdE9zmJbaEMs1",
            "participant_uid": "2IC5kYQceBhRtviYnJegKx6qA8m",
            "patient_uid": "2IC5kYQceBhRtviYnJegKx6qA8m",
            "subject_id": "5630",
            "payment_type_uid": "",
            "status": "enrolled",
            "payment_address": {},
            "patient": {
                "address": {}
            },
            "trial_site": {
                "uid": "2IC5kUznrwbbaEUdE9zmJbaEMs1",
                "site_uid": "2IC5kUlCEp2PLPl4t0HFErpXyZX",
                "trial_uid": "2IC5kS5eFryq19S0R5ybG4gSPY3",
                "site": {
                    "uid": "",
                    "name": ""
                },
                "trial": {
                    "uid": "",
                    "contract_uid": "",
                    "name": "",
                    "protocol_id": "",
                    "contract": {
                        "uid": "",
                        "client_uid": "",
                        "name": "",
                        "client": {
                            "uid": "",
                            "name": "",
                            "address": {}
                        }
                    }
                }
            }
        }
    ],
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kRTfh8C6EWMgwWRJJsvZN1x",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Set Enrollment Status

The allowed values are enrolled, dropped, and completed.

Request

{
    "action": "set_enrollment_status",
    "session_id": "2IC5kSwIwp2OM18Trpe2brWko3v",
    "payload": {
        "status": "completed",
        "trial_uid": "2IC5kS5eFryq19S0R5ybG4gSPY3",
        "participant_uid": "2IC5kYQceBhRtviYnJegKx6qA8m"
    }
}

Response

{
    "action": "set_enrollment_status",
    "payload": {
        "uid": "2IC5kVdLCFj4oR1808RXra0YJrq",
        "trial_uid": "2IC5kS5eFryq19S0R5ybG4gSPY3",
        "trial_site_uid": "2IC5kUznrwbbaEUdE9zmJbaEMs1",
        "participant_uid": "2IC5kYQceBhRtviYnJegKx6qA8m",
        "patient_uid": "2IC5kYQceBhRtviYnJegKx6qA8m",
        "subject_id": "5630",
        "payment_type_uid": "",
        "status": "completed",
        "payment_address": {},
        "patient": {
            "address": {}
        },
        "trial_site": {
            "uid": "2IC5kUznrwbbaEUdE9zmJbaEMs1",
            "site_uid": "2IC5kUlCEp2PLPl4t0HFErpXyZX",
            "trial_uid": "2IC5kS5eFryq19S0R5ybG4gSPY3",
            "site": {
                "uid": "",
                "name": ""
            },
            "trial": {
                "uid": "",
                "contract_uid": "",
                "name": "",
                "protocol_id": "",
                "contract": {
                    "uid": "",
                    "client_uid": "",
                    "name": "",
                    "client": {
                        "uid": "",
                        "name": "",
                        "address": {}
                    }
                }
            }
        }
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kTsjquvebfO1mmQRof7xYlf",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Get Participant

Retrieve an individual participant’s info.

Request

{
    "action": "get_participant",
    "session_id": "2IC5kSOLV0HJ9HhQUKAh3KDnhud",
    "payload": {
        "participant_uid": "2IC5kY0ZC3Nm4ut9QvK0rSzhRVs"
    }
}

Response

{
    "action": "get_participant",
    "payload": {
        "uid": "2IC5kY0ZC3Nm4ut9QvK0rSzhRVs",
        "email": "katheryn.white@example.com",
        "emergency_contact": "Joe Pesci",
        "emergency_phone": "(212) 555-1212",
        "enrollment_date": "2022-11-28",
        "first_name": "Katheryn",
        "last_name": "White",
        "phone": "(227) 576-9848",
        "site_uid": "2IC5kSwmvNDo6buheqJBLCfefAd",
        "time_zone": "America/New_York",
        "user_uid": "2IC5kT9x7areBTkMlWFD87KYRPj",
        "dob": "1982-04-23",
        "address": {
            "uid": "2IC5kWonSbSYCthKOFudQo9EutY",
            "street1": "1746 Ashland St",
            "city": "Denver",
            "state": "CO",
            "post_code": "80202"
        }
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kTK9rNlGd2fMvycOsffGgc8",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Schedule Appointment

Schedule an appointment for a participant to return to the site for a follow-up visit. The enrollment_uid or participant_uid is required. If the participant is enrolled in multiple trials, the enrollment_uid is required.

The participant will automatically receive e-mail or SMS reminder notifications.

The date must be in YYYY-MM-DDTHH:MM:SS format, e.g. "2022-07-05T21:13:00".

Request

{
    "action": "schedule_appointment",
    "session_id": "2IC5kXnlWKXIwl2w6GGirCirSrF",
    "payload": {
        "participant_uid": "2IC5kTucL01qBn1oF41KRgmgKyS",
        "time": "2022-12-05T22:01:00",
        "description": "please bring your paperwork",
        "milestone": "Week 3"
    }
}

Response

{
    "action": "schedule_appointment",
    "payload": {
        "uid": "2IC5kbCr4Rw2QA2Z0UmQ18Z3sbf",
        "enrollment_uid": "2IC5kdrlZy1Va4Xon59kOpa2Fun",
        "description": "please bring your paperwork",
        "time": "2022-12-05T22:01:00",
        "patient_uid": "2IC5kTucL01qBn1oF41KRgmgKyS",
        "participant_uid": "2IC5kTucL01qBn1oF41KRgmgKyS",
        "milestone": "Week 3"
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kaOSy0zc0Gy9EdO9KwcI4rj",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Bulk E-mail

Send an e-mail message to all participants enrolled in a trial at a site.

Request

{
    "action": "bulk_email",
    "session_id": "2IC5ke62z6iYv7O2p1nXzv9ujkK",
    "payload": {
        "trial_uid": "2IC5kZ8x5QPuPY0BuBnlDwXLTzD",
        "site_uid": "2IC5kZPFtNjOdguboBxvAuUPqby",
        "subject": "Test Subject",
        "body": "Test Body"
    }
}

Response

{
    "action": "bulk_email",
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kb4dowJiWjhrVnrGqH9f4iM",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Get Payment Types

The participant has the option to select how they would like to receive their funds. This API call returns the available options.

Once an option is selected, the participant may have to enter additional information relevant to the payment type.

Request

{
    "action": "get_payment_types",
    "session_id": "2IC5keAfvg90NloRG417avzZgHG"
}

Response

{
    "action": "get_payment_types",
    "payload": {
        "payment_types": [
            {
                "uid": "2FJiHEcuV7SSq5adI88gSq5khAb",
                "name": "Bank Account",
                "description": "deposit to my bank account"
            },
            {
                "uid": "28LLr9EUm9f1G5S5yxoOJKNTDP0",
                "name": "PayPal",
                "description": "pay me via PayPal"
            },
            {
                "uid": "2CRrLEBYGVFEyNejc3s3G6Ub7Vm",
                "name": "Venmo",
                "description": "pay me via Venmo"
            },
            {
                "uid": "28LLqy3paByy5jcqpoU9wXuTiYo",
                "name": "check",
                "description": "check mailed to my home address"
            },
            {
                "uid": "28LLr8WY5tNSSIDtcjRSmWODmGW",
                "name": "debit",
                "description": "deposited to my debit card"
            }
        ]
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kf1mdBMZGZkulgAkNc2gQ7u",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Set Payment Type

Set the preferred payment type for the participant for the trial.

Requires set_payment_type permission.

Request

{
    "action": "set_payment_type",
    "session_id": "2IC5keAfvg90NloRG417avzZgHG",
    "payload": {
        "payment_type_uid": "28LLr9EUm9f1G5S5yxoOJKNTDP0",
        "trial_uid": "2IC5kg5y8hmCVleV14jvf9dDpZm",
        "participant_uid": "2IC5kesh3g1IlXyJ7eThpZYrGrM",
        "payment_email": "",
        "payment_phone": "",
        "payment_address": {}
    }
}

Response

{
    "action": "set_payment_type",
    "status_code": 401,
    "message": "you do not have permission to view information for this participant",
    "request_id": "2IC5kaWjVXZYHdBX6eSB0X8bzW2",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Get User by Participant UID

Look up the user used by a participant to log in.

Request

{
    "action": "get_user_by_participant_uid",
    "session_id": "2IC5keAfvg90NloRG417avzZgHG",
    "payload": {
        "participant_uid": "2IC5kesh3g1IlXyJ7eThpZYrGrM"
    }
}

Response

{
    "action": "get_user_by_participant_uid",
    "payload": {
        "uid": "2IC5kgUmLIMS4bzigBc8TMKxNx4",
        "email": "dwayne.cruz@example.com",
        "first_name": "Dwayne",
        "last_name": "Cruz",
        "address": {},
        "phone": "(226) 264-9346",
        "email_verified": false,
        "sms_verified": false,
        "patient": {
            "address": {}
        },
        "caregiver": {
            "address": {},
            "patient": {
                "address": {}
            }
        },
        "email_enabled": false,
        "sms_enabled": false,
        "push_enabled": false
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kd6hIaFCkjiI2aK4o1n9hFt",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Change User Password

This function allows an admin to change a user’s password for them.

This functionality is only available to an admin.

Request

{
    "action": "change_user_password",
    "session_id": "2IC5keAfvg90NloRG417avzZgHG",
    "payload": {
        "user_uid": "2IC5kgUmLIMS4bzigBc8TMKxNx4",
        "new_password": "monkey123"
    }
}

Response

{
    "action": "change_user_password",
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kbeXYE916VWKHVilteZCnCi",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Get Appointments

Get all appointments for a participant_uid. Add "past": true to to payload to get past appointments.

Request

{
    "action": "get_appointments",
    "session_id": "2IC5kaRKwt09zjPJl5lFHqnWaW3",
    "payload": {
        "participant_uid": "2IC5kjXLYzoTe2mDVpEkHEW2b6C",
        "past": false
    }
}

Response

{
    "action": "get_appointments",
    "payload": {
        "appointments": [
            {
                "uid": "2IC5kjGEcvqAZB8xVnawroxVi9l",
                "enrollment_uid": "2IC5kliYFf8dl4fovL6BiHs4XRI",
                "description": "this appointment is in the future",
                "time": "2022-12-05T22:01:00Z",
                "milestone": "Week 3"
            }
        ]
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5koaIyHnbIW4v1x86EWu24sE",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Caregiver Relationships

Provides the list of relationships between participant and caregiver to use in the relationship field of the caregiver.

Request

{
    "action": "caregiver_relationships",
    "session_id": "2IC5khNfpZgtf3pWyAIeo9gqMN6"
}

Response

{
    "action": "caregiver_relationships",
    "payload": [
        "parent",
        "guardian",
        "nurse"
    ],
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kjrUc7kIe1jsq2NBNuO0nKH",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Register Caregiver

A caregiver is a person who is allowed to act on behalf of a participant.

The participant may be a minor or unable to do some things for themselves for medical reasons.

Requires permission add_participant, because a caregiver is directly linked to the participant.

Request

{
    "action": "register_caregiver",
    "session_id": "2IC5khNfpZgtf3pWyAIeo9gqMN6",
    "payload": {
        "participant_uid": "2IC5kkeamLFAimyFXoMsXn6UGUy",
        "first_name": "Amy",
        "last_name": "Parrish",
        "relationship": "parent",
        "email": "Amy.Parrish@example.com",
        "address": {
            "street1": "1753 Shalton Dr",
            "street2": "",
            "city": "Passadena",
            "state": "CA",
            "post_code": "91109"
        }
    }
}

Response

{
    "action": "register_caregiver",
    "payload": {
        "uid": "2IC5klBfYafMIOh5MbcMDfyZd1D",
        "participant_uid": "2IC5kkeamLFAimyFXoMsXn6UGUy",
        "patient_uid": "2IC5kkeamLFAimyFXoMsXn6UGUy",
        "email": "amy.parrish@example.com",
        "first_name": "Amy",
        "last_name": "Parrish",
        "relationship": "parent",
        "address": {
            "uid": "2IC5klx8BAgR52Q8pfDTPw4dcVo",
            "street1": "1753 Shalton Dr",
            "city": "Passadena",
            "state": "CA",
            "post_code": "91109"
        },
        "patient": {
            "address": {}
        },
        "user_uid": "2IC5knavPC4HiiFg32vP0xQ0FKt"
    },
    "status_code": 200,
    "message": "caregiver added",
    "request_id": "2IC5koIaV6gHe23CgzxXeBOUgOT",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Get Caregivers

Get caregivers by their participant’s UID.

Request

{
    "action": "get_caregivers",
    "session_id": "2IC5khNfpZgtf3pWyAIeo9gqMN6",
    "payload": {
        "participant_uid": "2IC5kkeamLFAimyFXoMsXn6UGUy"
    }
}

Response

{
    "action": "get_caregivers",
    "payload": [
        {
            "uid": "2IC5klBfYafMIOh5MbcMDfyZd1D",
            "participant_uid": "2IC5kkeamLFAimyFXoMsXn6UGUy",
            "patient_uid": "2IC5kkeamLFAimyFXoMsXn6UGUy",
            "email": "amy.parrish@example.com",
            "first_name": "Amy",
            "last_name": "Parrish",
            "relationship": "parent",
            "address": {
                "uid": "2IC5klx8BAgR52Q8pfDTPw4dcVo",
                "street1": "1753 Shalton Dr",
                "city": "Passadena",
                "state": "CA",
                "post_code": "91109"
            },
            "patient": {
                "address": {}
            }
        }
    ],
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5khC83q7fzpFQ1axYyM22Upw",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Update Caregiver

Request

{
    "action": "update_caregiver",
    "session_id": "2IC5khEviLcn7TeBFEVkqzTkvfL",
    "payload": {
        "uid": "2IC5koRqYexNN7L65lHKWwIphMO",
        "participant_uid": "2IC5kiCXglxRGHGobvnVO2sNNp5",
        "patient_uid": "2IC5kiCXglxRGHGobvnVO2sNNp5",
        "email": "dallas.mendoza@example.com",
        "first_name": "Maude",
        "last_name": "Lebowski",
        "address": {
            "uid": "2IC5kjLIPVNETDZCYUgcOpbu8wE",
            "street1": "663 Lake Dr",
            "city": "Spokane",
            "state": "WA",
            "post_code": "99210"
        },
        "patient": {
            "address": {}
        },
        "user_uid": "2IC5kmoGyzpL2XDXAxrlICKcKid"
    }
}

Response

{
    "action": "update_caregiver",
    "payload": {
        "uid": "2IC5koRqYexNN7L65lHKWwIphMO",
        "participant_uid": "2IC5kiCXglxRGHGobvnVO2sNNp5",
        "patient_uid": "2IC5kiCXglxRGHGobvnVO2sNNp5",
        "email": "dallas.mendoza@example.com",
        "first_name": "Maude",
        "last_name": "Lebowski",
        "address": {
            "uid": "2IC5kjLIPVNETDZCYUgcOpbu8wE",
            "street1": "663 Lake Dr",
            "city": "Spokane",
            "state": "WA",
            "post_code": "99210"
        },
        "patient": {
            "address": {}
        }
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kjCShUQ3yhWAqH7Hz2pnIvo",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Get User by Caregiver UID

For testing purposes. Retrive the user by caregiver UID.

Request

{
    "action": "get_user_by_caregiver_uid",
    "session_id": "2IC5klB9CMC9V34oTDGojvwcHVr",
    "payload": {
        "caregiver_uid": "2IC5kgwphBN4obLerpaw5d6PypL"
    }
}

Response

{
    "action": "get_user_by_caregiver_uid",
    "payload": {
        "uid": "2IC5kjOHneyMVXVZ6cnPZZhWvVG",
        "email": "sydney.jefferson@example.com",
        "first_name": "Sydney",
        "last_name": "Jefferson",
        "address": {},
        "email_verified": false,
        "sms_verified": false,
        "patient": {
            "address": {}
        },
        "caregiver": {
            "address": {},
            "patient": {
                "address": {}
            }
        },
        "email_enabled": false,
        "sms_enabled": false,
        "push_enabled": false
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5khCbJ09AkcXGCIjpjk5tNmX",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Switch User

An admin user may log in as another user to troubleshoot using their settings.

Request

{
    "action": "switch_user",
    "session_id": "2IC5knmUkEScCAYRo0ZXZAOYUWf",
    "payload": {
        "uid": "2IC5knE82KNIxrMD6jEL0l3brma"
    }
}

Response

{
    "action": "switch_user",
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5khs6skOy179wlep7LfTMRbO",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Send Message

Send a message to other users.

Participants may always send and receive messages. Site coordinators need the messaging permission.

Request

{
    "action": "send_message",
    "session_id": "2IC5ktclTVMkLLysXYDJFMu1wtM",
    "payload": {
        "message": "hello",
        "enrollment_uid": "2IC5km2zVQpMKB0SkvDUO1vLxYL"
    }
}

Response

{
    "action": "send_message",
    "payload": {
        "uid": "2IC5kv1a6sn7crWRWJE9I7BQi10",
        "message": "hello",
        "enrollment_uid": "2IC5km2zVQpMKB0SkvDUO1vLxYL",
        "sender_uid": "2IC5kmd9qehTlgxIXNtDwRZTzYD",
        "sender_name": "Nichole Roman",
        "subject_id": "",
        "trial_name": "",
        "time_stamp": "2022-11-28T22:01:10Z"
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5ktXxL9esc2g5j0Qc0bVX02t",
    "roles": [
        "participant"
    ],
    "user_type": "external"
}

Get Messages

Get messages in the user’s inbox.

Participants may always send and receive messages. Site coordinators need the messaging permission.

Request

{
    "action": "get_messages",
    "session_id": "2IC5ktclTVMkLLysXYDJFMu1wtM"
}

Response

{
    "action": "get_messages",
    "payload": {
        "messages": [
            {
                "uid": "2IC5kv1a6sn7crWRWJE9I7BQi10",
                "message": "hello",
                "enrollment_uid": "2IC5km2zVQpMKB0SkvDUO1vLxYL",
                "sender_uid": "2IC5kmd9qehTlgxIXNtDwRZTzYD",
                "sender_name": "Nichole Roman",
                "subject_id": "1301",
                "trial_name": "",
                "time_stamp": "2022-11-28T22:01:10Z"
            }
        ]
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kqixG1bXiBILQS062iFpE3V",
    "roles": [
        "participant"
    ],
    "user_type": "external"
}

Change Password

Allow the user to change their password. Requiring them to enter their current password and to enter the new password twice is the responsibility of the API client.

If the user was just registered, their verification token may be passed as token in the payload instead of a session_id.

Request

{
    "action": "change_password",
    "session_id": "2IC5kr5t9PoxlsX2ifjHxGdLuoo",
    "payload": {
        "new_password": "my awesome new password"
    }
}

Response

{
    "action": "change_password",
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kuYHxq2Waw5TqMn7uynqzGN",
    "roles": [],
    "user_type": "external"
}

Request Password Reset

If a user has forgotten their password, they can request a reset token.

This reset token can be used with the reset_password API call.

Request

{
    "action": "request_password_reset",
    "payload": {
        "email": "eugene.stokes@example.com"
    }
}

Response

{
    "action": "request_password_reset",
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5l48kc2pC9S0fLIBZEXexElf",
    "roles": [],
    "user_type": "external"
}

Reset Tokens

This feature is for admin users only. It is used to test the password reset functionality.

Request

{
    "action": "reset_tokens",
    "session_id": "2IC5l2TrpeHr40Och6lUNJBQFR2"
}

Response

{
    "action": "reset_tokens",
    "payload": {
        "tokens": {
            "2IC5kxZkCLEk1CuoEL39UCe3nkq": "5190",
            "2IC5l1C83WaJB3PpaYE9lnoZZGL": "8017"
        }
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5l0zfTvlGOodX6zfWcZvzUq4",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Reset Password

Reset password using a token received via e-mail after calling the request_password_reset API action.

Request

{
    "action": "reset_password",
    "payload": {
        "email": "candy.fischer@example.com",
        "password": "monkey123",
        "token": "5190"
    }
}

Response

{
    "action": "reset_password",
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5l0yRECX5yVb9gETAdAGZkdP",
    "roles": [],
    "user_type": "external"
}

Get Payment Schedule

Retrieve a payment schedule for a trial/site combination.

Requires view_payment_schedule permission.

Request

{
    "action": "get_payment_schedule",
    "session_id": "2IC5l1sIOeFguIuCt2hfWYbl76L",
    "payload": {
        "trial_uid": "2IC5l0CWAxQHIO8psyjeR25asEJ",
        "site_uid": "2IC5kzDV6sjQxsJBTBrxNJpXj85",
        "enrollment_uid": ""
    }
}

Response

{
    "action": "get_payment_schedule",
    "payload": [
        {
            "uid": "2IC5l3NPed2LGfJeMBOW2fUsbwE",
            "trial_site_uid": "2IC5kzt33GqHqBtsHQeWVAZIyJM",
            "effective_date": "2022-11-28T22:01:11.619884Z",
            "milestone": "First Visit",
            "amount": 75,
            "currency": "USD",
            "sort_order": 0
        },
        {
            "uid": "2IC5l1cmt5v2FogVnJFxzuaQtA7",
            "trial_site_uid": "2IC5kzt33GqHqBtsHQeWVAZIyJM",
            "effective_date": "2022-11-28T22:01:11.532516Z",
            "milestone": "Week 2",
            "amount": 5,
            "currency": "USD",
            "sort_order": 1
        },
        {
            "uid": "2IC5l2qWpYcNYCQvWTHXARWaL4N",
            "trial_site_uid": "2IC5kzt33GqHqBtsHQeWVAZIyJM",
            "effective_date": "2022-11-28T22:01:11.53708Z",
            "milestone": "Week 3",
            "amount": 10,
            "currency": "USD",
            "sort_order": 2
        },
        {
            "uid": "2IC5kyuHUn43x7U47H1FlmvbcUE",
            "trial_site_uid": "2IC5kzt33GqHqBtsHQeWVAZIyJM",
            "effective_date": "2022-11-28T22:01:11.541347Z",
            "milestone": "Week 4",
            "amount": 15,
            "currency": "USD",
            "sort_order": 3
        },
        {
            "uid": "2IC5kyh01eL0HFdRXGIaxs6jOVZ",
            "trial_site_uid": "2IC5kzt33GqHqBtsHQeWVAZIyJM",
            "effective_date": "2022-11-28T22:01:11.545729Z",
            "milestone": "Week 5",
            "amount": 20,
            "currency": "USD",
            "sort_order": 4
        },
        {
            "uid": "2IC5kzJvnnvkMFZCegeaoJRAa6N",
            "trial_site_uid": "2IC5kzt33GqHqBtsHQeWVAZIyJM",
            "effective_date": "2022-11-28T22:01:11.55023Z",
            "milestone": "Week 6",
            "amount": 25,
            "currency": "USD",
            "sort_order": 5
        },
        {
            "uid": "2IC5kzHKNlNzN1WaNM1F4J5I5oc",
            "trial_site_uid": "2IC5kzt33GqHqBtsHQeWVAZIyJM",
            "effective_date": "2022-11-28T22:01:11.554423Z",
            "milestone": "Week 7",
            "amount": 30,
            "currency": "USD",
            "sort_order": 6
        },
        {
            "uid": "2IC5kyktryMrebZ0XZlKARY60aF",
            "trial_site_uid": "2IC5kzt33GqHqBtsHQeWVAZIyJM",
            "effective_date": "2022-11-28T22:01:11.558384Z",
            "milestone": "Week 8",
            "amount": 35,
            "currency": "USD",
            "sort_order": 7
        },
        {
            "uid": "2IC5l0GMexVbNlRVbVf5h0fMuhN",
            "trial_site_uid": "2IC5kzt33GqHqBtsHQeWVAZIyJM",
            "effective_date": "2022-11-28T22:01:11.562306Z",
            "milestone": "Week 9",
            "amount": 40,
            "currency": "USD",
            "sort_order": 8
        },
        {
            "uid": "2IC5kx2smEqh8be3ZxbWTujC5cq",
            "trial_site_uid": "2IC5kzt33GqHqBtsHQeWVAZIyJM",
            "effective_date": "2022-11-28T22:01:11.566399Z",
            "milestone": "Week 10",
            "amount": 45,
            "currency": "USD",
            "sort_order": 9
        },
        {
            "uid": "2IC5l3g7r3D012oIFxy1VlNA10X",
            "trial_site_uid": "2IC5kzt33GqHqBtsHQeWVAZIyJM",
            "effective_date": "2022-11-28T22:01:11.570847Z",
            "milestone": "Week 11",
            "amount": 50,
            "currency": "USD",
            "sort_order": 10
        }
    ],
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5l0c0pRvxBn5bD5ubWPf807W",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Milestone Payment

Pay a participant for a milestone visit. Generally, each milestone can only be paid once per participant. However, some studies may allow more than one, one a milestone-by-milestone basis.

Requires milestone_payment permission.

Request

{
    "action": "milestone_payment",
    "session_id": "2IC5l1sIOeFguIuCt2hfWYbl76L",
    "payload": {
        "participant_uid": "2IC5l1376faPjZgubrotsK9mGb5",
        "milestone_uid": "2IC5l3NPed2LGfJeMBOW2fUsbwE",
        "note": "test suite"
    }
}

Response

{
    "action": "milestone_payment",
    "payload": {
        "uid": "2IC5kyYQiFR0MQ90IpOabkLEp77",
        "enrollment_uid": "2IC5kwwV2EOM87Z1C8qyqzb4mnW",
        "payment_type": "milestone",
        "milestone_uid": "2IC5l3NPed2LGfJeMBOW2fUsbwE",
        "amount": 75,
        "currency": "USD",
        "note": "test suite",
        "status": "unclaimed",
        "created_by": "admin",
        "creator": {
            "uid": "",
            "email": "",
            "first_name": "",
            "last_name": "",
            "address": {},
            "email_verified": false,
            "sms_verified": false,
            "patient": {
                "address": {}
            },
            "caregiver": {
                "address": {},
                "patient": {
                    "address": {}
                }
            },
            "email_enabled": false,
            "sms_enabled": false,
            "push_enabled": false
        },
        "enrollment": {
            "payment_type_uid": "",
            "payment_address": {},
            "patient": {
                "address": {}
            },
            "trial_site": {
                "site": {
                    "uid": "",
                    "name": ""
                },
                "trial": {
                    "uid": "",
                    "contract_uid": "",
                    "name": "",
                    "protocol_id": "",
                    "contract": {
                        "uid": "",
                        "client_uid": "",
                        "name": "",
                        "client": {
                            "uid": "",
                            "name": "",
                            "address": {}
                        }
                    }
                }
            }
        },
        "milestone": {
            "uid": "",
            "effective_date": "0001-01-01T00:00:00Z",
            "milestone": "",
            "amount": 0,
            "currency": "",
            "sort_order": 0
        }
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5kwp3031qMnt6WMYAyXmxQ3n",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Assign Role

Assign a role to a user for a resource (trial, site, client, etc.). This will give them all the permissions assigned to that role for that resource. It will also add the role name to the user’s profile.

Request

{
    "action": "assign_role",
    "session_id": "2IC5l1sIOeFguIuCt2hfWYbl76L",
    "payload": {
        "role_name": "Site Coordinator",
        "resource_uid": "2IC5kzt33GqHqBtsHQeWVAZIyJM",
        "user_uid": "2IC5l1VYKcI9WysIJxfV6g85vzQ"
    }
}

Response

{
    "action": "assign_role",
    "status_code": 200,
    "message": "added 14 permissions; 0 errors",
    "request_id": "2IC5l0Si8oV0ZK82MumHjFN8D13",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Get Participant Payments

Look up payments already made to a participant.

Requires view_payments permission.

Request

{
    "action": "get_participant_payments",
    "session_id": "2IC5l1sIOeFguIuCt2hfWYbl76L",
    "payload": {
        "participant_uid": "2IC5l1376faPjZgubrotsK9mGb5",
        "trial_uid": "2IC5l0CWAxQHIO8psyjeR25asEJ"
    }
}

Response

{
    "action": "get_participant_payments",
    "payload": [
        {
            "uid": "2IC5kyYQiFR0MQ90IpOabkLEp77",
            "enrollment_uid": "2IC5kwwV2EOM87Z1C8qyqzb4mnW",
            "payment_type": "milestone",
            "milestone_uid": "2IC5l3NPed2LGfJeMBOW2fUsbwE",
            "amount": 75,
            "currency": "USD",
            "note": "test suite",
            "status": "unclaimed",
            "date": "2022-11-28",
            "created_by": "admin",
            "creator": {
                "uid": "",
                "email": "",
                "first_name": "",
                "last_name": "",
                "address": {},
                "email_verified": false,
                "sms_verified": false,
                "patient": {
                    "address": {}
                },
                "caregiver": {
                    "address": {},
                    "patient": {
                        "address": {}
                    }
                },
                "email_enabled": false,
                "sms_enabled": false,
                "push_enabled": false
            },
            "enrollment": {
                "uid": "2IC5kwwV2EOM87Z1C8qyqzb4mnW",
                "subject_id": "9848",
                "payment_type_uid": "",
                "status": "enrolled",
                "payment_address": {},
                "patient": {
                    "address": {}
                },
                "trial_site": {
                    "site": {
                        "uid": "",
                        "name": ""
                    },
                    "trial": {
                        "uid": "2IC5l0CWAxQHIO8psyjeR25asEJ",
                        "contract_uid": "",
                        "name": "Trial Cummings-34",
                        "protocol_id": "XK2542-45401",
                        "contract": {
                            "uid": "",
                            "client_uid": "",
                            "name": "",
                            "client": {
                                "uid": "",
                                "name": "",
                                "address": {}
                            }
                        }
                    }
                }
            },
            "created": "2022-11-28",
            "updated": "2022-11-28",
            "milestone": {
                "uid": "2IC5l3NPed2LGfJeMBOW2fUsbwE",
                "effective_date": "2022-11-28T22:01:11.619884Z",
                "milestone": "First Visit",
                "amount": 75,
                "currency": "USD",
                "sort_order": 0
            }
        }
    ],
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5l3wGY5Ty01lkLXzOMTmyCwg",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Mileage Payment

A mileage payment is a reimbursement mileage traveled.

Requires permission mileage_payment.

Request

{
    "action": "mileage_payment",
    "session_id": "2IC5l027vOUSltVMGbCpQnZG6vA",
    "payload": {
        "participant_uid": "2IC5l3YUnJEx6sQxJrXv032HzCX",
        "trial_uid": "2IC5kwa8RPyHjYtAcVb5SybbdfF",
        "amount": 225,
        "currency": "USD",
        "note": "test of mileage",
        "milestone": "Week 2"
    }
}

Response

{
    "action": "mileage_payment",
    "payload": {
        "uid": "2IC5lAl260joMJhpV0CKj5D0Lod",
        "enrollment_uid": "2IC5l1l6jhikImNFnClpalTM9a2",
        "payment_type": "mileage",
        "milestone_uid": "2IC5kx2foGoZjqzgRGqTCm2Al5G",
        "amount": 225,
        "currency": "USD",
        "note": "test of mileage",
        "status": "unclaimed",
        "created_by": "admin",
        "creator": {
            "uid": "",
            "email": "",
            "first_name": "",
            "last_name": "",
            "address": {},
            "email_verified": false,
            "sms_verified": false,
            "patient": {
                "address": {}
            },
            "caregiver": {
                "address": {},
                "patient": {
                    "address": {}
                }
            },
            "email_enabled": false,
            "sms_enabled": false,
            "push_enabled": false
        },
        "enrollment": {
            "payment_type_uid": "",
            "payment_address": {},
            "patient": {
                "address": {}
            },
            "trial_site": {
                "site": {
                    "uid": "",
                    "name": ""
                },
                "trial": {
                    "uid": "",
                    "contract_uid": "",
                    "name": "",
                    "protocol_id": "",
                    "contract": {
                        "uid": "",
                        "client_uid": "",
                        "name": "",
                        "client": {
                            "uid": "",
                            "name": "",
                            "address": {}
                        }
                    }
                }
            }
        },
        "milestone": {
            "uid": "",
            "effective_date": "0001-01-01T00:00:00Z",
            "milestone": "",
            "amount": 0,
            "currency": "",
            "sort_order": 0
        }
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5l4DH0WJ7qq9aCaN9LFS7sA5",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Trial Payment Report

Retrieve all payments for a clinical trial.

Requires view_reports permission.

Request

{
    "action": "trial_payment_report",
    "session_id": "2IC5l6NpPFJmlOHC3TWPBOTRluu",
    "payload": {
        "trial_uid": "2IC5l81OWMnFrtVF2g1R7CWivA0",
        "format": "csv"
    }
}

Response

{
    "action": "trial_payment_report",
    "payload": "http://api:6666/reports/2IC5l6XJoMwQvXWXBnfqs83gNgg",
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5l9d1OEEpkTAhjzhqCfIOobE",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Funding Report

Retrieve the funding status of a contract.

Request

{
    "action": "funding_report",
    "session_id": "2IC5l6q0tdI8AliUpYAi6f8uofW",
    "payload": {
        "contract_uid": "2IC5l6meIyqyuFsSAhA6FyBRRRp",
        "format": "xlsx"
    }
}

Response

{
    "action": "funding_report",
    "payload": "http://api:6666/reports/2IC5lDIZjWw6igiyaTZX7zQ6ny4",
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5lDnkeeL9Ti99C7j0KZdB0BA",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Get Unclaimed Payments

An API call made by a participant to view any unclaimed payments. They may then use the claim_payments API call to begin the payment transfer process.

Request

{
    "action": "get_unclaimed_payments",
    "session_id": "2IC5lEyEdIMdqUWA0vNMkLSVrdD",
    "payload": {
        "participant_uid": "2IC5lJ1TmXzX18SabDmfmhU6qHq"
    }
}

Response

{
    "action": "get_unclaimed_payments",
    "payload": {
        "payments": [
            {
                "uid": "2IC5lDjCWdQ1qYlLOrGKYJ5HYVk",
                "enrollment_uid": "2IC5lHa9HX2h7ciXhhktEqnJXfx",
                "payment_type": "milestone",
                "milestone_uid": "2IC5lHUsaxHfOXyyHj9cF5oSXJO",
                "amount": 75,
                "currency": "USD",
                "note": "test suite",
                "status": "unclaimed",
                "date": "2022-11-28",
                "created_by": "admin",
                "creator": {
                    "uid": "",
                    "email": "",
                    "first_name": "",
                    "last_name": "",
                    "address": {},
                    "email_verified": false,
                    "sms_verified": false,
                    "patient": {
                        "address": {}
                    },
                    "caregiver": {
                        "address": {},
                        "patient": {
                            "address": {}
                        }
                    },
                    "email_enabled": false,
                    "sms_enabled": false,
                    "push_enabled": false
                },
                "enrollment": {
                    "uid": "2IC5lHa9HX2h7ciXhhktEqnJXfx",
                    "subject_id": "9009",
                    "payment_type_uid": "",
                    "status": "enrolled",
                    "payment_address": {},
                    "patient": {
                        "address": {}
                    },
                    "trial_site": {
                        "site": {
                            "uid": "",
                            "name": ""
                        },
                        "trial": {
                            "uid": "2IC5lCw5Le0YfC23KY7CoOvqgGV",
                            "contract_uid": "",
                            "name": "Trial Whitaker-95",
                            "protocol_id": "XK7943-53511",
                            "contract": {
                                "uid": "",
                                "client_uid": "",
                                "name": "",
                                "client": {
                                    "uid": "",
                                    "name": "",
                                    "address": {}
                                }
                            }
                        }
                    }
                },
                "created": "2022-11-28",
                "updated": "2022-11-28",
                "milestone": {
                    "uid": "2IC5lHUsaxHfOXyyHj9cF5oSXJO",
                    "effective_date": "2022-11-28T22:01:13.425063Z",
                    "milestone": "First Visit",
                    "amount": 75,
                    "currency": "USD",
                    "sort_order": 0
                }
            }
        ]
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5lDvmQsCr7VmgLXOBswgNFxu",
    "roles": [
        "participant"
    ],
    "user_type": "external"
}

Claim Payments

The participant may claim all unclaimed participants, and this will initiate the transfer process.

Request

{
    "action": "claim_payments",
    "session_id": "2IC5lEyEdIMdqUWA0vNMkLSVrdD",
    "payload": {
        "participant_uid": "2IC5lJ1TmXzX18SabDmfmhU6qHq"
    }
}

Response

{
    "action": "claim_payments",
    "status_code": 200,
    "message": "1 payments claimed, 0 failed",
    "request_id": "2IC5lJJX68JdImVATgyA5j0AtP5",
    "roles": [
        "participant"
    ],
    "user_type": "external"
}

Reimbursement Request

Request a reimbursement for an expense you have incurred that is related to the trial.

Request

{
    "action": "reimbursement_request",
    "session_id": "2IC5lDpWJn7BPO24E3thwGbDM4P",
    "payload": {
        "participant_uid": "2IC5lEQX0jAfWVkacttxWnlpl0w",
        "trial_uid": "2IC5lC0kCh1rAHAYYfjZVEy11db",
        "amount": 53,
        "currency": "USD",
        "note": "meal reimbursement",
        "attachments": [
            "JVBERi0xLjQKJf////8KMSAwIG9iago8PCAvVGl0bGUgKFN0cmlwZSBQYXlvdXRzKQovQXV0aG9yIChTaGF3biBNaWxvY2hpaykK<truncated>"
        ],
        "category": "Airfare"
    }
}

Response

{
    "action": "reimbursement_request",
    "payload": {
        "uid": "2IC5lOxex2o27EWec84s56Z2wbx",
        "enrollment_uid": "2IC5lC0qSv6p2kFdRzMYd0VkX9B",
        "payment_type": "reimbursement",
        "amount": 53,
        "currency": "USD",
        "note": "meal reimbursement",
        "status": "pending",
        "created_by": "admin",
        "creator": {
            "uid": "",
            "email": "",
            "first_name": "",
            "last_name": "",
            "address": {},
            "email_verified": false,
            "sms_verified": false,
            "patient": {
                "address": {}
            },
            "caregiver": {
                "address": {},
                "patient": {
                    "address": {}
                }
            },
            "email_enabled": false,
            "sms_enabled": false,
            "push_enabled": false
        },
        "category": "Airfare",
        "enrollment": {
            "payment_type_uid": "",
            "payment_address": {},
            "patient": {
                "address": {}
            },
            "trial_site": {
                "site": {
                    "uid": "",
                    "name": ""
                },
                "trial": {
                    "uid": "",
                    "contract_uid": "",
                    "name": "",
                    "protocol_id": "",
                    "contract": {
                        "uid": "",
                        "client_uid": "",
                        "name": "",
                        "client": {
                            "uid": "",
                            "name": "",
                            "address": {}
                        }
                    }
                }
            }
        },
        "request_id": "269672874",
        "attachments": [
            ""
        ],
        "milestone": {
            "uid": "",
            "effective_date": "0001-01-01T00:00:00Z",
            "milestone": "",
            "amount": 0,
            "currency": "",
            "sort_order": 0
        }
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5lPSoj5vsQvQIDflZFf61ZZw",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Get Pending Reimbursements

Get all pending reimbursements for the participant specified by the participant_uid.

This will return any reimbursements that have been created but not yet approved.

Request

{
    "action": "get_pending_reimbursements",
    "session_id": "2IC5lDpWJn7BPO24E3thwGbDM4P",
    "payload": {
        "participant_uid": "2IC5lEQX0jAfWVkacttxWnlpl0w"
    }
}

Response

{
    "action": "get_pending_reimbursements",
    "payload": [
        {
            "uid": "2IC5lOxex2o27EWec84s56Z2wbx",
            "enrollment_uid": "2IC5lC0qSv6p2kFdRzMYd0VkX9B",
            "payment_type": "reimbursement",
            "amount": 53,
            "currency": "USD",
            "note": "meal reimbursement",
            "status": "pending",
            "date": "2022-11-28",
            "created_by": "admin",
            "creator": {
                "uid": "",
                "email": "",
                "first_name": "",
                "last_name": "",
                "address": {},
                "email_verified": false,
                "sms_verified": false,
                "patient": {
                    "address": {}
                },
                "caregiver": {
                    "address": {},
                    "patient": {
                        "address": {}
                    }
                },
                "email_enabled": false,
                "sms_enabled": false,
                "push_enabled": false
            },
            "category": "Airfare",
            "enrollment": {
                "uid": "2IC5lC0qSv6p2kFdRzMYd0VkX9B",
                "subject_id": "9988",
                "payment_type_uid": "",
                "status": "enrolled",
                "payment_address": {},
                "patient": {
                    "address": {}
                },
                "trial_site": {
                    "site": {
                        "uid": "",
                        "name": ""
                    },
                    "trial": {
                        "uid": "2IC5lC0kCh1rAHAYYfjZVEy11db",
                        "contract_uid": "",
                        "name": "Trial Morgan-35",
                        "protocol_id": "XK9529-24022",
                        "contract": {
                            "uid": "",
                            "client_uid": "",
                            "name": "",
                            "client": {
                                "uid": "",
                                "name": "",
                                "address": {}
                            }
                        }
                    }
                }
            },
            "request_id": "269672874",
            "created": "2022-11-28",
            "updated": "2022-11-28",
            "milestone": {
                "uid": "",
                "effective_date": "0001-01-01T00:00:00Z",
                "milestone": "",
                "amount": 0,
                "currency": "",
                "sort_order": 0
            }
        }
    ],
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5lQcyTTebvCTZwi2knZbm60B",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Get Pending Payments

Get all pending payments the site coordinator can see.

Request

{
    "action": "get_pending_payments",
    "session_id": "2IC5lDpWJn7BPO24E3thwGbDM4P",
    "payload": {
        "participant_uid": ""
    }
}

Response

{
    "action": "get_pending_payments",
    "payload": [
        {
            "uid": "2IC5lOxex2o27EWec84s56Z2wbx",
            "enrollment_uid": "",
            "payment_type": "reimbursement",
            "amount": 53,
            "currency": "USD",
            "note": "meal reimbursement",
            "status": "pending",
            "date": "2022-11-28",
            "created_by": "",
            "creator": {
                "uid": "",
                "email": "",
                "first_name": "",
                "last_name": "",
                "address": {},
                "email_verified": false,
                "sms_verified": false,
                "patient": {
                    "address": {}
                },
                "caregiver": {
                    "address": {},
                    "patient": {
                        "address": {}
                    }
                },
                "email_enabled": false,
                "sms_enabled": false,
                "push_enabled": false
            },
            "category": "Airfare",
            "enrollment": {
                "uid": "2IC5lC0qSv6p2kFdRzMYd0VkX9B",
                "subject_id": "9988",
                "payment_type_uid": "",
                "status": "enrolled",
                "payment_address": {},
                "patient": {
                    "address": {}
                },
                "trial_site": {
                    "uid": "2IC5lFGacvR72r8XZH3hhmKruGI",
                    "site": {
                        "uid": "2IC5lHrRQcwMYL3vmtcspiFQDnU",
                        "name": "Key Clinic"
                    },
                    "trial": {
                        "uid": "2IC5lC0kCh1rAHAYYfjZVEy11db",
                        "contract_uid": "",
                        "name": "Trial Morgan-35",
                        "protocol_id": "",
                        "contract": {
                            "uid": "",
                            "client_uid": "",
                            "name": "",
                            "client": {
                                "uid": "",
                                "name": "",
                                "address": {}
                            }
                        }
                    }
                }
            },
            "request_id": "269672874",
            "created": "2022-11-28",
            "updated": "2022-11-28",
            "milestone": {
                "uid": "",
                "effective_date": "0001-01-01T00:00:00Z",
                "milestone": "",
                "amount": 0,
                "currency": "",
                "sort_order": 0
            }
        }
    ],
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5lKL2FbwsfJrhA33o4QwcKoK",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Approve Payment

Approve a pending payment so the electronic payment can be processed.

Requires the permission approve_payments.

Request

{
    "action": "approve_payment",
    "session_id": "2IC5lDpWJn7BPO24E3thwGbDM4P",
    "payload": {
        "payment_uid": "2IC5lOxex2o27EWec84s56Z2wbx"
    }
}

Response

{
    "action": "approve_payment",
    "payload": {
        "uid": "2IC5lOxex2o27EWec84s56Z2wbx",
        "enrollment_uid": "2IC5lC0qSv6p2kFdRzMYd0VkX9B",
        "payment_type": "reimbursement",
        "amount": 53,
        "currency": "USD",
        "note": "meal reimbursement",
        "status": "unclaimed",
        "date": "2022-11-28",
        "created_by": "",
        "creator": {
            "uid": "",
            "email": "",
            "first_name": "",
            "last_name": "",
            "address": {},
            "email_verified": false,
            "sms_verified": false,
            "patient": {
                "address": {}
            },
            "caregiver": {
                "address": {},
                "patient": {
                    "address": {}
                }
            },
            "email_enabled": false,
            "sms_enabled": false,
            "push_enabled": false
        },
        "category": "Airfare",
        "enrollment": {
            "uid": "2IC5lC0qSv6p2kFdRzMYd0VkX9B",
            "subject_id": "9988",
            "payment_type_uid": "",
            "status": "enrolled",
            "payment_address": {},
            "patient": {
                "address": {}
            },
            "trial_site": {
                "site": {
                    "uid": "",
                    "name": ""
                },
                "trial": {
                    "uid": "",
                    "contract_uid": "",
                    "name": "",
                    "protocol_id": "",
                    "contract": {
                        "uid": "",
                        "client_uid": "",
                        "name": "",
                        "client": {
                            "uid": "",
                            "name": "",
                            "address": {}
                        }
                    }
                }
            }
        },
        "request_id": "269672874",
        "created": "2022-11-28",
        "milestone": {
            "uid": "",
            "effective_date": "0001-01-01T00:00:00Z",
            "milestone": "",
            "amount": 0,
            "currency": "",
            "sort_order": 0
        }
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5lQdNZVAScGHPL9KrGlHfDJh",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Get Categories

Get categories that are available for manual payments for this trial.

Request

{
    "action": "get_categories",
    "session_id": "2IC5lLD2VRYMGMHW3BVp94C1V2W",
    "payload": {
        "trial_uid": "2IC5lMITawMD1dBQNp5YmeMmY5I"
    }
}

Response

{
    "action": "get_categories",
    "payload": {
        "trial_uid": "",
        "categories": [
            "Airfare",
            "Hotel",
            "Meal",
            "Other",
            "Parking",
            "Tolls",
            "Transportation"
        ]
    },
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5lN4jDbN8YOP85bEqZa0bnUi",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Add Category

Add a category for manual payments to a trial.

If no categories are added, the default categories will be used for the trial. If any categories are added, the default categories will not be available.

Request

{
    "action": "add_category",
    "session_id": "2IC5lLD2VRYMGMHW3BVp94C1V2W",
    "payload": {
        "trial_uid": "2IC5lMITawMD1dBQNp5YmeMmY5I",
        "category": "applesauce"
    }
}

Response

{
    "action": "add_category",
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5lO9LywFVUd9MUnMwtreORYp",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Get Payable Visits

Retrieve a list of potential payments.

These payments are created when a milestone visit is completed and no payments have yet been generated.

These payments have not been created — they are only templates. The milestone_payment call may be made with these payments to create actual payments.

Request

{
    "action": "get_payable_visits",
    "session_id": "2IC5lOLqwWaZpv2dmd5cDrocYgB"
}

Response

{
    "action": "get_payable_visits",
    "payload": [],
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5lQyhWtybyAZyFRGwtgo8MuD",
    "roles": [
        "Site Coordinator"
    ],
    "user_type": "external"
}

Get Payments

Get all payments the site coordinator can see.

Request

{
    "action": "get_payments",
    "session_id": "2IC5lTxi7gmm58ECLWibLJ38a8C"
}

Response

{
    "action": "get_payments",
    "payload": [
        {
            "amount": 5,
            "created": "2022-11-28",
            "created_by": "liza.benton@example.com",
            "currency": "USD",
            "date": "2022-11-28",
            "enrollment_uid": "2IC5lLV0UqG7rpt8Sft26qhB577",
            "note": "test suite",
            "payment_type": "milestone",
            "status": "unclaimed",
            "uid": "2IC5lViIiOQNKBuRyt4wj41yuOb",
            "updated": "2022-11-28"
        },
        {
            "amount": 5,
            "created": "2022-11-28",
            "created_by": "liza.benton@example.com",
            "currency": "USD",
            "date": "2022-11-28",
            "enrollment_uid": "2IC5lNNJyj3XJ9Yb1TCR4DAYQMA",
            "note": "test suite",
            "payment_type": "milestone",
            "status": "unclaimed",
            "uid": "2IC5lT7Mpy3qEzNsLXbnGYELMhV",
            "updated": "2022-11-28"
        },
        {
            "amount": 5,
            "created": "2022-11-28",
            "created_by": "liza.benton@example.com",
            "currency": "USD",
            "date": "2022-11-28",
            "enrollment_uid": "2IC5lKMCztT6nWZ58ZlV7nJnSWB",
            "note": "test suite",
            "payment_type": "milestone",
            "status": "unclaimed",
            "uid": "2IC5lW0wCBnXCQ5kerCk3rQYPOx",
            "updated": "2022-11-28"
        },
        {
            "amount": 5,
            "created": "2022-11-28",
            "created_by": "liza.benton@example.com",
            "currency": "USD",
            "date": "2022-11-28",
            "enrollment_uid": "2IC5lQR1wsbjQyVA8rJgqUdBRBl",
            "note": "test suite",
            "payment_type": "milestone",
            "status": "unclaimed",
            "uid": "2IC5lSOAZcBTQND8KfJlNWMgbUh",
            "updated": "2022-11-28"
        },
        {
            "amount": 5,
            "created": "2022-11-28",
            "created_by": "liza.benton@example.com",
            "currency": "USD",
            "date": "2022-11-28",
            "enrollment_uid": "2IC5lOWYiHohwnPshwEa8dkNQHu",
            "note": "test suite",
            "payment_type": "milestone",
            "status": "unclaimed",
            "uid": "2IC5lTN4zPuHwf2QwtDy5TnHP7a",
            "updated": "2022-11-28"
        }
    ],
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5lXkG1KidIY3QLT7mSpGL01Y",
    "roles": [
        "Site Coordinator"
    ],
    "user_type": "external"
}

Get Recent Payments

Get the latest payment for each participant the Site Coordinator has permission to see.

Request

{
    "action": "get_recent_payments",
    "session_id": "2IC5lTxi7gmm58ECLWibLJ38a8C"
}

Response

{
    "action": "get_recent_payments",
    "payload": [
        {
            "uid": "2IC5lW0wCBnXCQ5kerCk3rQYPOx",
            "enrollment_uid": "2IC5lKMCztT6nWZ58ZlV7nJnSWB",
            "payment_type": "milestone",
            "amount": 5,
            "currency": "USD",
            "note": "test suite",
            "status": "unclaimed",
            "date": "2022-11-28",
            "created_by": "",
            "creator": {
                "uid": "2IC5lWOadu1eTNUzck9VuPovDun",
                "email": "liza.benton@example.com",
                "first_name": "Liza",
                "last_name": "Benton",
                "address": {},
                "phone": "(212) 555-1212",
                "email_verified": false,
                "sms_verified": false,
                "patient": {
                    "address": {}
                },
                "caregiver": {
                    "address": {},
                    "patient": {
                        "address": {}
                    }
                },
                "email_enabled": false,
                "sms_enabled": false,
                "push_enabled": false
            },
            "enrollment": {
                "uid": "2IC5lKMCztT6nWZ58ZlV7nJnSWB",
                "subject_id": "8709",
                "payment_type_uid": "",
                "status": "enrolled",
                "payment_address": {},
                "patient": {
                    "address": {}
                },
                "trial_site": {
                    "site": {
                        "uid": "",
                        "name": ""
                    },
                    "trial": {
                        "uid": "",
                        "contract_uid": "",
                        "name": "",
                        "protocol_id": "",
                        "contract": {
                            "uid": "",
                            "client_uid": "",
                            "name": "",
                            "client": {
                                "uid": "",
                                "name": "",
                                "address": {}
                            }
                        }
                    }
                }
            },
            "created": "2022-11-28",
            "milestone": {
                "uid": "2IC5lRTG3CtzK6aEhVJxjSLPXzz",
                "effective_date": "2022-11-28T22:01:14.678154Z",
                "milestone": "Week 2",
                "amount": 5,
                "currency": "USD",
                "sort_order": 1
            }
        },
        {
            "uid": "2IC5lViIiOQNKBuRyt4wj41yuOb",
            "enrollment_uid": "2IC5lLV0UqG7rpt8Sft26qhB577",
            "payment_type": "milestone",
            "amount": 5,
            "currency": "USD",
            "note": "test suite",
            "status": "unclaimed",
            "date": "2022-11-28",
            "created_by": "",
            "creator": {
                "uid": "2IC5lWOadu1eTNUzck9VuPovDun",
                "email": "liza.benton@example.com",
                "first_name": "Liza",
                "last_name": "Benton",
                "address": {},
                "phone": "(212) 555-1212",
                "email_verified": false,
                "sms_verified": false,
                "patient": {
                    "address": {}
                },
                "caregiver": {
                    "address": {},
                    "patient": {
                        "address": {}
                    }
                },
                "email_enabled": false,
                "sms_enabled": false,
                "push_enabled": false
            },
            "enrollment": {
                "uid": "2IC5lLV0UqG7rpt8Sft26qhB577",
                "subject_id": "3681",
                "payment_type_uid": "",
                "status": "enrolled",
                "payment_address": {},
                "patient": {
                    "address": {}
                },
                "trial_site": {
                    "site": {
                        "uid": "",
                        "name": ""
                    },
                    "trial": {
                        "uid": "",
                        "contract_uid": "",
                        "name": "",
                        "protocol_id": "",
                        "contract": {
                            "uid": "",
                            "client_uid": "",
                            "name": "",
                            "client": {
                                "uid": "",
                                "name": "",
                                "address": {}
                            }
                        }
                    }
                }
            },
            "created": "2022-11-28",
            "milestone": {
                "uid": "2IC5lRTG3CtzK6aEhVJxjSLPXzz",
                "effective_date": "2022-11-28T22:01:14.678154Z",
                "milestone": "Week 2",
                "amount": 5,
                "currency": "USD",
                "sort_order": 1
            }
        },
        {
            "uid": "2IC5lT7Mpy3qEzNsLXbnGYELMhV",
            "enrollment_uid": "2IC5lNNJyj3XJ9Yb1TCR4DAYQMA",
            "payment_type": "milestone",
            "amount": 5,
            "currency": "USD",
            "note": "test suite",
            "status": "unclaimed",
            "date": "2022-11-28",
            "created_by": "",
            "creator": {
                "uid": "2IC5lWOadu1eTNUzck9VuPovDun",
                "email": "liza.benton@example.com",
                "first_name": "Liza",
                "last_name": "Benton",
                "address": {},
                "phone": "(212) 555-1212",
                "email_verified": false,
                "sms_verified": false,
                "patient": {
                    "address": {}
                },
                "caregiver": {
                    "address": {},
                    "patient": {
                        "address": {}
                    }
                },
                "email_enabled": false,
                "sms_enabled": false,
                "push_enabled": false
            },
            "enrollment": {
                "uid": "2IC5lNNJyj3XJ9Yb1TCR4DAYQMA",
                "subject_id": "4595",
                "payment_type_uid": "",
                "status": "enrolled",
                "payment_address": {},
                "patient": {
                    "address": {}
                },
                "trial_site": {
                    "site": {
                        "uid": "",
                        "name": ""
                    },
                    "trial": {
                        "uid": "",
                        "contract_uid": "",
                        "name": "",
                        "protocol_id": "",
                        "contract": {
                            "uid": "",
                            "client_uid": "",
                            "name": "",
                            "client": {
                                "uid": "",
                                "name": "",
                                "address": {}
                            }
                        }
                    }
                }
            },
            "created": "2022-11-28",
            "milestone": {
                "uid": "2IC5lRTG3CtzK6aEhVJxjSLPXzz",
                "effective_date": "2022-11-28T22:01:14.678154Z",
                "milestone": "Week 2",
                "amount": 5,
                "currency": "USD",
                "sort_order": 1
            }
        },
        {
            "uid": "2IC5lTN4zPuHwf2QwtDy5TnHP7a",
            "enrollment_uid": "2IC5lOWYiHohwnPshwEa8dkNQHu",
            "payment_type": "milestone",
            "amount": 5,
            "currency": "USD",
            "note": "test suite",
            "status": "unclaimed",
            "date": "2022-11-28",
            "created_by": "",
            "creator": {
                "uid": "2IC5lWOadu1eTNUzck9VuPovDun",
                "email": "liza.benton@example.com",
                "first_name": "Liza",
                "last_name": "Benton",
                "address": {},
                "phone": "(212) 555-1212",
                "email_verified": false,
                "sms_verified": false,
                "patient": {
                    "address": {}
                },
                "caregiver": {
                    "address": {},
                    "patient": {
                        "address": {}
                    }
                },
                "email_enabled": false,
                "sms_enabled": false,
                "push_enabled": false
            },
            "enrollment": {
                "uid": "2IC5lOWYiHohwnPshwEa8dkNQHu",
                "subject_id": "1237",
                "payment_type_uid": "",
                "status": "enrolled",
                "payment_address": {},
                "patient": {
                    "address": {}
                },
                "trial_site": {
                    "site": {
                        "uid": "",
                        "name": ""
                    },
                    "trial": {
                        "uid": "",
                        "contract_uid": "",
                        "name": "",
                        "protocol_id": "",
                        "contract": {
                            "uid": "",
                            "client_uid": "",
                            "name": "",
                            "client": {
                                "uid": "",
                                "name": "",
                                "address": {}
                            }
                        }
                    }
                }
            },
            "created": "2022-11-28",
            "milestone": {
                "uid": "2IC5lRTG3CtzK6aEhVJxjSLPXzz",
                "effective_date": "2022-11-28T22:01:14.678154Z",
                "milestone": "Week 2",
                "amount": 5,
                "currency": "USD",
                "sort_order": 1
            }
        },
        {
            "uid": "2IC5lSOAZcBTQND8KfJlNWMgbUh",
            "enrollment_uid": "2IC5lQR1wsbjQyVA8rJgqUdBRBl",
            "payment_type": "milestone",
            "amount": 5,
            "currency": "USD",
            "note": "test suite",
            "status": "unclaimed",
            "date": "2022-11-28",
            "created_by": "",
            "creator": {
                "uid": "2IC5lWOadu1eTNUzck9VuPovDun",
                "email": "liza.benton@example.com",
                "first_name": "Liza",
                "last_name": "Benton",
                "address": {},
                "phone": "(212) 555-1212",
                "email_verified": false,
                "sms_verified": false,
                "patient": {
                    "address": {}
                },
                "caregiver": {
                    "address": {},
                    "patient": {
                        "address": {}
                    }
                },
                "email_enabled": false,
                "sms_enabled": false,
                "push_enabled": false
            },
            "enrollment": {
                "uid": "2IC5lQR1wsbjQyVA8rJgqUdBRBl",
                "subject_id": "1383",
                "payment_type_uid": "",
                "status": "enrolled",
                "payment_address": {},
                "patient": {
                    "address": {}
                },
                "trial_site": {
                    "site": {
                        "uid": "",
                        "name": ""
                    },
                    "trial": {
                        "uid": "",
                        "contract_uid": "",
                        "name": "",
                        "protocol_id": "",
                        "contract": {
                            "uid": "",
                            "client_uid": "",
                            "name": "",
                            "client": {
                                "uid": "",
                                "name": "",
                                "address": {}
                            }
                        }
                    }
                }
            },
            "created": "2022-11-28",
            "milestone": {
                "uid": "2IC5lRTG3CtzK6aEhVJxjSLPXzz",
                "effective_date": "2022-11-28T22:01:14.678154Z",
                "milestone": "Week 2",
                "amount": 5,
                "currency": "USD",
                "sort_order": 1
            }
        }
    ],
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5lT95Bz30H0fs5mSynd5ovjT",
    "roles": [
        "Site Coordinator"
    ],
    "user_type": "external"
}

Get Role Permissions

Retrieve the permissions associated with a role for a resource_uid.

This is an admin-only function.

Request

{
    "action": "get_role_permissions",
    "session_id": "2IC5lU4I7q1Gn2BAh6eS2hqWgZF",
    "payload": {
        "role_name": "Site Coordinator",
        "resource_uid": "2IC5lYfmdZqqjgEvs1cZwwHnApR"
    }
}

Response

{
    "action": "get_role_permissions",
    "payload": [
        "2CpTBNhegqS7wH09MDWAoYornXB",
        "2CpTBfIH6nQEcFe8jYWya6Tnuwq",
        "2CpTBwLCA9zhgvrODnwZnDODo9x",
        "2CpTBy0cFYuf0qpi8ebjmFl57wj",
        "2CpTByF0J2nQUNZIduuAIB87tYk",
        "2CpTBzHcRyNKe5nVj4r7OObBfjg",
        "2CpTBzhi3S4MJ7PweIqzfjOY0mS",
        "2CpTC0ox1aGagFuLYqnVAaozqF1",
        "2CpTC26zFDnCPsHYPJmBsfhKZGD",
        "2CpTCA9IIHFKyDiQHERx0E0YE4Q",
        "2CpTCD3M3zya9JsdaLjn7zKF5Sy",
        "2CpTCHGD5zwbxtmGEt8VMSms8IL",
        "2CpTCHU15pX8LueflUs0y0DNHQi",
        "2CpTCYP8SjEYSIEAFSYL0R9TyqB"
    ],
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5lRx6PIZlUEgcsCPsn7uf403",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Add Role Permissions

Add permissions to a role associated with a resource_uid.

This is an admin-only function.

Request

{
    "action": "add_role_permissions",
    "session_id": "2IC5lU4I7q1Gn2BAh6eS2hqWgZF",
    "payload": {
        "role_name": "monkey",
        "resource_uid": "2IC5lYfmdZqqjgEvs1cZwwHnApR",
        "permission_names": [
            "add_milestone"
        ]
    }
}

Response

{
    "action": "add_role_permissions",
    "status_code": 400,
    "message": "invalid role name",
    "request_id": "2IC5lZ9XopVFqCzsgECsmqhZyig",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Get Roles

Get all roles available in the system.

Request

{
    "action": "get_roles",
    "session_id": "2IC5lZJl7OuKFoEjiHOoIcKwQRV"
}

Response

{
    "action": "get_roles",
    "payload": [
        "Admin",
        "Approver",
        "Client Report viewer",
        "Mural Admin",
        "Mural Support",
        "Site Admin",
        "Site Coordinator"
    ],
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5lUyQAsWtrJjpSCqCulnwsHe",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Get Default Role Permissions

Get a list of permissions a role has by default. This template can be copied over to a specific resource, and modified (if necessary).

Request

{
    "action": "get_default_role_permissions",
    "session_id": "2IC5lTxya2b1zhIM4Rt8YNxfqz2",
    "payload": {
        "role_name": "Site Coordinator"
    }
}

Response

{
    "action": "get_default_role_permissions",
    "payload": [
        "add_participant",
        "create_appointment",
        "enroll",
        "manual_payment",
        "milestone_payment",
        "set_enrollment_status",
        "set_payment_type",
        "travel_payment",
        "update_participant",
        "view_enrollments",
        "view_participants",
        "view_payment_schedule",
        "view_payments",
        "view_trials"
    ],
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5lYTfOaji06U8hf8tLfdAqlC",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Get User Sites

Get all sites associated with a user through their permissions.

Request

{
    "action": "get_user_sites",
    "session_id": "2IC5lYgFpjC35Z99X9XLEygRJde",
    "payload": {
        "user_uid": "2IC5lS5HEy1DBDDdKKLHYOt7Oou"
    }
}

Response

{
    "action": "get_user_sites",
    "payload": [],
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5lSl2sLK9pZQlZCazYcYDFrY",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Get User Trials

Retrieve a list of all trials a user is associated with via their permissions.

Request

{
    "action": "get_user_trials",
    "payload": {
        "user_uid": "2IC5lS5HEy1DBDDdKKLHYOt7Oou"
    }
}

Response

{
    "action": "get_user_trials",
    "status_code": 401,
    "message": "you are not logged in",
    "request_id": "2IC5lXFASDJQOIWhdGzNb7ubraK",
    "roles": [],
    "user_type": "logged out"
}

Get Rateable Visits

Get a list of milestone payments for which a participant has not yet provided a rating.

Request

{
    "action": "get_rateable_visits",
    "session_id": "2IC5lagI5nRnDAE9yiZTqatneYf"
}

Response

{
    "action": "get_rateable_visits",
    "payload": [
        {
            "uid": "2IC5lSIbj1o0kRBQtnBsXdgZhcm",
            "enrollment_uid": "2IC5lSLZuypanDcIiQqqsRhj0VX",
            "payment_type": "milestone",
            "milestone_uid": "2IC5lXhkzrXAsWP0ngMKcVqxL5L",
            "amount": 75,
            "currency": "USD",
            "note": "test suite",
            "status": "claimed",
            "date": "2022-11-28",
            "created_by": "admin",
            "creator": {
                "uid": "",
                "email": "",
                "first_name": "",
                "last_name": "",
                "address": {},
                "email_verified": false,
                "sms_verified": false,
                "patient": {
                    "address": {}
                },
                "caregiver": {
                    "address": {},
                    "patient": {
                        "address": {}
                    }
                },
                "email_enabled": false,
                "sms_enabled": false,
                "push_enabled": false
            },
            "enrollment": {
                "uid": "2IC5lSLZuypanDcIiQqqsRhj0VX",
                "subject_id": "3533",
                "payment_type_uid": "",
                "status": "enrolled",
                "payment_address": {},
                "patient": {
                    "address": {}
                },
                "trial_site": {
                    "site": {
                        "uid": "",
                        "name": ""
                    },
                    "trial": {
                        "uid": "2IC5lUndNzfDT6rgkZDBtTP02Fv",
                        "contract_uid": "",
                        "name": "Trial Pacheco-31",
                        "protocol_id": "XK7309-53201",
                        "contract": {
                            "uid": "",
                            "client_uid": "",
                            "name": "",
                            "client": {
                                "uid": "",
                                "name": "",
                                "address": {}
                            }
                        }
                    }
                }
            },
            "created": "2022-11-28",
            "updated": "2022-11-28",
            "milestone": {
                "uid": "2IC5lXhkzrXAsWP0ngMKcVqxL5L",
                "effective_date": "2022-11-28T22:01:15.962823Z",
                "milestone": "First Visit",
                "amount": 75,
                "currency": "USD",
                "sort_order": 0
            }
        }
    ],
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5lZpqxaqJw6QDkEiwemo5kGN",
    "roles": [
        "participant"
    ],
    "user_type": "external"
}

Rate Visit

Allow a participant to rate their experience for each milestone visit.

Request

{
    "action": "rate_visit",
    "session_id": "2IC5lagI5nRnDAE9yiZTqatneYf",
    "payload": {
        "payment_uid": "2IC5lSIbj1o0kRBQtnBsXdgZhcm",
        "rating": 9,
        "note": "Great visit!"
    }
}

Response

{
    "action": "rate_visit",
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5ldBsYEtlHJH6NdHJR2Qf7KD",
    "roles": [
        "participant"
    ],
    "user_type": "external"
}

Ratings

Retrieve ratings.

Optional arguments:

  • start_date

  • end_date

  • trial_uid

  • participant_uid

Request

{
    "action": "ratings",
    "session_id": "2IC5leiShit0CzQGoVC3dUfTh4h",
    "payload": {}
}

Response

{
    "action": "ratings",
    "payload": [
        {
            "completed_visits": 1,
            "enrollment_uid": "2IC5lSLZuypanDcIiQqqsRhj0VX",
            "milestone": "First Visit",
            "rating": 9,
            "total_visits": 11,
            "uid": "2IC5lcg7hsFjwepjEF9EfJ4uWem"
        },
        {
            "completed_visits": 1,
            "enrollment_uid": "2IC5lZx93IcBDqOEJB188CkkLDV",
            "milestone": "First Visit",
            "rating": 9,
            "total_visits": 11,
            "uid": "2IC5lg6wimz9m5HfWULyLCDR7Pv"
        }
    ],
    "status_code": 200,
    "message": "OK",
    "request_id": "2IC5lbS9eC9IHR10ZBoVDoUlQ5b",
    "roles": [
        "admin"
    ],
    "user_type": "external"
}

Index