Moderated Recruits
To create a Recruit for a moderated study the sessionDetails parameter shall be provided.
Within the sessionDetails there are a few required fields:
availabilityUrl-- The URL that will provide the availability for scheduling. This will be a list of available times including the start and end times.availabilityStartAt-- A date when the availability for this Recruit starts, this will be shown to potential participants.availabilityEndAt-- A date when the availability for this Recruit ends, this will be shown to potential participants.sessionDuration-- How long a session will last (in minutes). This will be shown to potential participants.sessionsWebhookUrl-- A webhook URL that will be notified when a participant is scheduled, rescheduled, or canceled.
The shape for sessions and availability have similar structures and will have two attributes:
startAt-- An ISO8601 formatted time for the availability or session to startendAt-- An ISO8601 formatted time for the availability or session to end
Availability
The availabilityUrl shall return a payload with the form:
{
"data": [
{
"attributes": {
"startAt": "YYYY-MM-DDTHH:MM:SS-HH:MM",
"endAt": "YYYY-MM-DDTHH:MM:SS-HH:MM"
}
},
{
"attributes": {
"startAt": "YYYY-MM-DDTHH:MM:SS-HH:MM",
"endAt": "YYYY-MM-DDTHH:MM:SS-HH:MM"
}
}
]
}Session Webhook
When a participant is scheduled or rescheduled, a POST request will be made to sessionsWebhookUrl with the format:
{
"data": {
"id": "pp_ABC", // This is the id of the participant
"attributes": {
"startAt": "YYYY-MM-DDTHH:MM:SS-HH:MM",
"endAt": "YYYY-MM-DDTHH:MM:SS-HH:MM",
}
}
}The webhook shall respond with a payload with the format:
{ "sessionJoinUrl": "https://www.example.com" }The sessionJoinUrl represents the URL to send the participant for that session.
When a participant is canceled from a session, a DELETE request will be made to sessionsWebhookUrl with the format:
{
"data": {
"id": "pp_ABC" // This is the id of the participant
}
}