{ "openapi": "3.0.0", "info": { "version": "5.4.3", "title": "Administration API", "description": "This is the api specifications for all things related to account administration.", "contact": { "name": "ChilliPharm", "url": "https://www.chillipharm.com" }, "license": { "name": "UNLICENSED", "url": "https://www.chillipharm.com" } }, "servers": [ { "url": "http://chillipharm.test:3000/api/v1", "description": "Local development" }, { "url": "https://qa.chillipharm.dev/api/v1", "description": "QA" }, { "url": "https://chillipharm-staging.com/api/v1", "description": "Staging" }, { "url": "https://chillipharm-uat.com/api/v1", "description": "UAT" }, { "url": "https://www.chillipharm.com/api/v1", "description": "Production" } ], "tags": [ { "name": "Chapter Definitions", "description": "Endpoints for chapter definitions" }, { "name": "Form Templates", "description": "Endpoints for form templates" }, { "name": "Roles", "description": "Endpoints for roles" }, { "name": "Study Arms", "description": "Endpoints for study arms" }, { "name": "Study Procedure Task Definitions", "description": "Endpoints for study procedure task definitions" }, { "name": "Trial Configurations", "description": "Endpoints for trial configurations" }, { "name": "Trial Containers", "description": "Endpoints for trial containers" }, { "name": "Workflow Definitions", "description": "Endpoints for workflow definitions" } ], "paths": { "/accounts/{account_id}/administration/chapter_definitions": { "get": { "summary": "Get all chapter definitions for account", "description": "Get all chapter definitions for account", "operationId": "getChapterDefinitions", "tags": [ "Chapter Definitions" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "type": "string", "example": "1" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChapterDefinitionsWithPositions" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "post": { "summary": "Create a chapter definition for account", "description": "Create a chapter definition for account", "operationId": "createChapterDefinition", "tags": [ "Chapter Definitions" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "type": "string", "example": "1" } } ], "requestBody": { "description": "Chapter definition object", "content": { "application/json": { "schema": { "type": "object", "description": "Chapter definition object", "properties": { "name": { "type": "string", "description": "The name of chapter definition", "example": "pre" }, "color": { "type": "string", "description": "The color of chapter definition", "example": "#ccc" }, "authenticity_token": { "$ref": "#/components/schemas/AuthenticityToken" } }, "additionalProperties": false, "required": [ "name", "color", "authenticity_token" ] } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChapterDefinitionWithPosition" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/accounts/{account_id}/administration/chapter_definitions/{chapter_definition_id}": { "get": { "summary": "Get a chapter definition for account", "description": "Get a chapter definition for account", "operationId": "getChapterDefinition", "tags": [ "Chapter Definitions" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "type": "string", "example": "1" } }, { "name": "chapter_definition_id", "in": "path", "description": "The chapter definition id", "required": true, "schema": { "type": "string", "example": "1" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChapterDefinitionWithPosition" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "put": { "summary": "Update a chapter definition for account", "description": "Update a chapter definition for account", "operationId": "updateChapterDefinition", "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "tags": [ "Chapter Definitions" ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "type": "string", "example": "1" } }, { "name": "chapter_definition_id", "in": "path", "description": "The chapter definition id", "required": true, "schema": { "type": "string", "example": "1" } } ], "requestBody": { "description": "Chapter definition object", "content": { "application/json": { "schema": { "type": "object", "description": "Chapter definition object", "properties": { "name": { "type": "string", "description": "The name of chapter definition", "example": "pre" }, "color": { "type": "string", "description": "The color of chapter definition", "example": "#ccc" }, "authenticity_token": { "$ref": "#/components/schemas/AuthenticityToken" } }, "additionalProperties": false, "required": [ "name", "color", "authenticity_token" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChapterDefinitionWithPosition" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "delete": { "summary": "Delete a chapter definition for account", "description": "Delete a chapter definition for account", "operationId": "deleteChapterDefinition", "tags": [ "Chapter Definitions" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "type": "string", "example": "1" } }, { "name": "chapter_definition_id", "in": "path", "description": "The chapter definition id", "required": true, "schema": { "type": "string", "example": "1" } } ], "requestBody": { "description": "Authenticity token", "content": { "application/json": { "schema": { "type": "object", "description": "Authenticity token", "properties": { "authenticity_token": { "$ref": "#/components/schemas/AuthenticityToken" } }, "additionalProperties": false, "required": [ "authenticity_token" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChapterDefinition" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/accounts/{account_id}/administration/chapter_definitions/update_positions": { "post": { "summary": "Update chapter definitions positions for account", "description": "Update chapter definitions positions for account", "operationId": "updateChapterDefinitionsPositions", "tags": [ "Chapter Definitions" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "type": "string", "example": "1" } } ], "requestBody": { "description": "Chapter definitions positions object", "content": { "application/json": { "schema": { "type": "object", "description": "Chapter definitions positions object", "properties": { "chapter_definitions": { "type": "array", "description": "Chapter definitions positions", "items": { "type": "object", "properties": { "id": { "type": "number", "description": "The id of chapter definition", "example": 1 }, "position": { "type": "number", "description": "The position of chapter definition", "example": 1 } }, "required": [ "id", "position" ] } }, "authenticity_token": { "$ref": "#/components/schemas/AuthenticityToken" } }, "additionalProperties": false, "required": [ "chapter_definitions", "authenticity_token" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChapterDefinitionsWithPositions" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/accounts/{account_id}/administration/form_templates": { "get": { "summary": "Get all form templates for account", "description": "Get all form templates for account", "operationId": "getFormTemplates", "tags": [ "Form Templates" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "type": "string", "example": "1" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "default_form_template": { "type": "object", "description": "Default form template", "properties": { "active": { "type": "boolean", "description": "The active status of default form template", "example": true }, "trial_containers": { "type": "array", "items": { "$ref": "#/components/schemas/TrialContainer" } }, "versions": { "type": "array", "items": { "$ref": "#/components/schemas/FormTemplateVersion" } } } }, "form_templates": { "type": "array", "description": "Form templates", "items": { "$ref": "#/components/schemas/FormTemplate" } } } } } } }, "400": { "$ref": "#/components/responses/LegacyBadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "post": { "summary": "Create a form template for account", "description": "Create a form template for account", "operationId": "createFormTemplate", "tags": [ "Form Templates" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "type": "string", "example": "1" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "authenticity_token": { "$ref": "#/components/schemas/AuthenticityToken" }, "formTemplateData": { "$ref": "#/components/schemas/FormTemplateBodyData" } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FormTemplate" } } } }, "400": { "$ref": "#/components/responses/LegacyBadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/accounts/{account_id}/administration/form_templates/{form_template_id}": { "put": { "summary": "Update a form template for account", "description": "Update a form template for account", "operationId": "updateFormTemplate", "tags": [ "Form Templates" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "type": "string", "example": "1" } }, { "name": "form_template_id", "in": "path", "description": "The form template id", "required": true, "schema": { "type": "string", "example": "1" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "authenticity_token": { "$ref": "#/components/schemas/AuthenticityToken" }, "formTemplateData": { "$ref": "#/components/schemas/FormTemplateBodyData" }, "reason_for_change": { "type": "string", "description": "The reason for change of form template version", "example": "Version 1" } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FormTemplate" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/accounts/{account_id}/administration/form_templates/{form_template_id}/active": { "put": { "summary": "Set active form template for account", "description": "Set active form template for account", "operationId": "updateFormTemplateActive", "tags": [ "Form Templates" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "type": "string", "example": "1" } }, { "name": "form_template_id", "in": "path", "description": "The form template id", "required": true, "schema": { "type": "string", "example": "1" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "authenticity_token": { "$ref": "#/components/schemas/AuthenticityToken" }, "formTemplateData": { "type": "object", "properties": { "active": { "type": "boolean", "description": "The active status of form template", "example": true }, "reason_for_change": { "type": "string", "description": "The reason for change of form template version", "example": "Version 1" } } } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FormTemplate" } } } }, "400": { "$ref": "#/components/responses/LegacyBadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/accounts/{account_id}/administration/form_templates/{form_template_id}/duplicate": { "post": { "summary": "Duplicate a form template for account", "description": "Duplicate a form template for account", "operationId": "duplicateFormTemplate", "tags": [ "Form Templates" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "example": "1", "type": "string" } }, { "name": "form_template_id", "in": "path", "description": "The form template id", "required": true, "schema": { "example": "1", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "authenticity_token": { "$ref": "#/components/schemas/AuthenticityToken" } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FormTemplate" } } } }, "400": { "$ref": "#/components/responses/LegacyBadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/accounts/{account_id}/administration/form_templates/{form_template_id}/trial_containers": { "post": { "summary": "Add trial containers to form template", "description": "Add trial containers to form template", "operationId": "updateFormTemplateTrialContainers", "tags": [ "Form Templates" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "type": "string", "example": "1" } }, { "name": "form_template_id", "in": "path", "description": "The form template id", "required": true, "schema": { "type": "string", "example": "1" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "authenticity_token": { "$ref": "#/components/schemas/AuthenticityToken" }, "formTemplateData": { "type": "object", "properties": { "trialContainers": { "type": "array", "items": { "type": "integer", "example": 1 } } } } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FormTemplate" } } } }, "400": { "$ref": "#/components/responses/LegacyBadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/accounts/{account_id}/administration/form_templates/{form_template_id}/workflow_definitions": { "put": { "summary": "Update workflow definitions for form template", "description": "Update workflow definitions for form template", "operationId": "updateFormTemplateWorkflowDefinitions", "tags": [ "Form Templates" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "example": "1", "type": "string" } }, { "name": "form_template_id", "in": "path", "description": "The form template id", "required": true, "schema": { "example": "1", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "authenticity_token": { "$ref": "#/components/schemas/AuthenticityToken" }, "formTemplateData": { "type": "object", "properties": { "workflow_definition_id": { "type": "integer", "description": "The workflow definition id of form template", "example": 1 } } }, "reason_for_change": { "type": "string", "description": "The reason for change of form template version", "example": "Version 1" } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FormTemplate" } } } }, "400": { "$ref": "#/components/responses/LegacyBadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/accounts/{account_id}/administration/form_templates/{form_template_id}/download_json": { "get": { "summary": "Download JSON for form template", "description": "Download JSON representation of the form template", "operationId": "downloadFormTemplateJson", "tags": [ "Form Templates" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "example": "1", "type": "string" } }, { "name": "form_template_id", "in": "path", "description": "The form template id", "required": true, "schema": { "example": "1", "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary", "example": "data" } } } }, "400": { "$ref": "#/components/responses/LegacyBadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/accounts/{account_id}/administration/roles": { "get": { "summary": "Get all roles for account", "description": "Get all roles for account", "operationId": "getRoles", "tags": [ "Roles" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "type": "string", "example": "1" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "description": "Roles", "items": { "$ref": "#/components/schemas/Role" } } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/accounts/{account_id}/administration/study_arms": { "get": { "summary": "Get all study arms for account", "description": "Get all study arms for account", "operationId": "getStudyArms", "tags": [ "Study Arms" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "type": "string", "example": "1" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "description": "Study arms", "items": { "$ref": "#/components/schemas/StudyArmWithTrialConfigurations" } } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "post": { "summary": "Create a study arm", "description": "Create a study arm", "operationId": "createStudyArm", "tags": [ "Study Arms" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "type": "string", "example": "1" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "description": "Create study arm object", "properties": { "authenticity_token": { "$ref": "#/components/schemas/AuthenticityToken" }, "display_name": { "type": "string", "description": "The display name of study arm", "example": "Post-Treatment Monitoring Arm" } }, "required": [ "authenticity_token", "display_name" ], "additionalProperties": false } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StudyArmWithTrialConfigurations" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/accounts/{account_id}/administration/study_arms/{study_arm_id}": { "put": { "summary": "Update a study arm", "description": "Update a study arm", "operationId": "updateStudyArm", "tags": [ "Study Arms" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "type": "string", "example": "1" } }, { "name": "study_arm_id", "in": "path", "description": "The study arm id", "required": true, "schema": { "type": "string", "example": "1" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "description": "Update study arm object", "properties": { "authenticity_token": { "$ref": "#/components/schemas/AuthenticityToken" }, "display_name": { "type": "string", "description": "The display name of study arm", "example": "Post-Treatment Monitoring Arm" }, "reason_for_change": { "type": "string", "description": "The reason for change of study arm", "example": "Mistake" } }, "required": [ "authenticity_token", "display_name" ], "additionalProperties": false } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StudyArmWithTrialConfigurations" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "delete": { "summary": "Delete a study arm", "description": "Delete a study arm", "operationId": "deleteStudyArm", "tags": [ "Study Arms" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "type": "string", "example": "1" } }, { "name": "study_arm_id", "in": "path", "description": "The study arm id", "required": true, "schema": { "type": "string", "example": "1" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "description": "Delete study arm object", "properties": { "authenticity_token": { "$ref": "#/components/schemas/AuthenticityToken" } }, "required": [ "authenticity_token" ], "additionalProperties": false } } } }, "responses": { "204": { "description": "No Content" }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/accounts/{account_id}/administration/study_procedure_task_definitions": { "get": { "summary": "Get all study procedure task definitions", "description": "Get all study procedure task definitions", "operationId": "getStudyProcedureTaskDefinitions", "tags": [ "Study Procedure Task Definitions" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "type": "string", "example": "1" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "description": "Study procedure task definitions", "items": { "$ref": "#/components/schemas/StudyProcedureTaskDefinition" } } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "post": { "summary": "Create a study procedure task definition", "description": "Create a study procedure task definition", "operationId": "createStudyProcedureTaskDefinition", "tags": [ "Study Procedure Task Definitions" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "type": "string", "example": "1" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "description": "Create study procedure task definition object", "properties": { "authenticity_token": { "$ref": "#/components/schemas/AuthenticityToken" }, "display_name": { "type": "string", "description": "The display name of study procedure task definition", "example": "Please complete something first" }, "role_ids": { "type": "array", "description": "The role ids of study procedure task definition", "items": { "type": "number", "example": 1 } } }, "required": [ "authenticity_token", "display_name" ], "additionalProperties": false } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StudyProcedureTaskDefinition" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/accounts/{account_id}/administration/study_procedure_task_definitions/{study_procedure_task_definition_id}": { "put": { "summary": "Update a study procedure task definition", "description": "Update a study procedure task definition", "operationId": "updateStudyProcedureTaskDefinition", "tags": [ "Study Procedure Task Definitions" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "type": "string", "example": "1" } }, { "name": "study_procedure_task_definition_id", "in": "path", "description": "The study procedure task definition id", "required": true, "schema": { "type": "string", "example": "1" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "description": "Update study procedure task definition object", "properties": { "authenticity_token": { "$ref": "#/components/schemas/AuthenticityToken" }, "display_name": { "type": "string", "description": "The display name of study procedure task definition", "example": "Please complete something first" }, "role_ids": { "type": "array", "description": "The role ids of study procedure task definition", "items": { "type": "number", "example": 1 } } }, "required": [ "authenticity_token", "display_name", "role_ids" ], "additionalProperties": false } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StudyProcedureTaskDefinition" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "delete": { "summary": "Delete a study procedure task definition", "description": "Delete a study procedure task definition", "operationId": "deleteStudyProcedureTaskDefinition", "tags": [ "Study Procedure Task Definitions" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "type": "string", "example": "1" } }, { "name": "study_procedure_task_definition_id", "in": "path", "description": "The study procedure task definition id", "required": true, "schema": { "type": "string", "example": "1" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "description": "Delete study procedure task definition object", "properties": { "authenticity_token": { "$ref": "#/components/schemas/AuthenticityToken" } }, "required": [ "authenticity_token" ], "additionalProperties": false } } } }, "responses": { "204": { "description": "No Content" }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/accounts/{account_id}/administration/study_procedure_task_definitions/{study_procedure_task_definition_id}/enabled": { "put": { "summary": "Update enable status of a study procedure task definition", "description": "Update enable status of a study procedure task definition", "operationId": "setEnabledStudyProcedureTaskDefinition", "tags": [ "Study Procedure Task Definitions" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "type": "string", "example": "1" } }, { "name": "study_procedure_task_definition_id", "in": "path", "description": "The study procedure task definition id", "required": true, "schema": { "type": "string", "example": "1" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "description": "Update study procedure task definition object", "properties": { "authenticity_token": { "$ref": "#/components/schemas/AuthenticityToken" }, "enabled": { "type": "boolean", "description": "The enable status of study procedure task definition", "example": true } }, "required": [ "authenticity_token", "enabled" ], "additionalProperties": false } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StudyProcedureTaskDefinition" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/accounts/{account_id}/administration/trial_configurations": { "get": { "summary": "Get all trial configurations for account", "description": "Get all trial configurations for account", "operationId": "getTrialConfigurations", "tags": [ "Trial Configurations" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "example": "1", "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TrialConfiguration" } } } } }, "400": { "$ref": "#/components/responses/LegacyBadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "post": { "summary": "Create a trial configuration for account", "description": "Create a trial configuration for account", "operationId": "createTrialConfiguration", "tags": [ "Trial Configurations" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "example": "1", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "authenticity_token": { "$ref": "#/components/schemas/AuthenticityToken" }, "issue_date": { "type": "string", "description": "The issue date of trial configuration", "example": "2024-06-12" }, "name": { "type": "string", "description": "The name of trial configuration", "example": "Ghost Trial Configuration" } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TrialConfiguration" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/accounts/{account_id}/administration/trial_configurations/{trial_configuration_id}": { "get": { "summary": "Get a trial configuration for account", "description": "Get a trial configuration for account", "operationId": "getTrialConfiguration", "tags": [ "Trial Configurations" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "example": "1", "type": "string" } }, { "name": "trial_configuration_id", "in": "path", "description": "The trial configuration id", "required": true, "schema": { "example": "1", "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TrialConfiguration" } } } }, "400": { "$ref": "#/components/responses/LegacyBadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "put": { "summary": "Update a trial configuration for account", "description": "Update a trial configuration for account", "operationId": "updateTrialConfiguration", "tags": [ "Trial Configurations" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "example": "1", "type": "string" } }, { "name": "trial_configuration_id", "in": "path", "description": "The trial configuration id", "required": true, "schema": { "example": "1", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "authenticity_token": { "$ref": "#/components/schemas/AuthenticityToken" }, "issue_date": { "type": "string", "description": "The issue date of trial configuration", "example": "2024-06-12" }, "name": { "type": "string", "description": "The name of trial configuration", "example": "Ghost Trial Configuration" } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TrialConfiguration" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "delete": { "summary": "Delete a trial configuration for account", "description": "Delete a trial configuration for account", "operationId": "deleteTrialConfiguration", "tags": [ "Trial Configurations" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "example": "1", "type": "string" } }, { "name": "trial_configuration_id", "in": "path", "description": "The trial configuration id", "required": true, "schema": { "example": "1", "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TrialConfiguration" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/accounts/{account_id}/administration/trial_configurations/{trial_configuration_id}/duplicate": { "post": { "summary": "Duplicate a trial configuration for account", "description": "Duplicate a trial configuration for account", "operationId": "duplicateTrialConfiguration", "tags": [ "Trial Configurations" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "example": "1", "type": "string" } }, { "name": "trial_configuration_id", "in": "path", "description": "The trial configuration id", "required": true, "schema": { "example": "1", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "authenticity_token": { "$ref": "#/components/schemas/AuthenticityToken" } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TrialConfiguration" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/accounts/{account_id}/administration/trial_configurations/{trial_configuration_id}/study_event_definitions": { "post": { "summary": "Create a study event definition for trial configuration", "description": "Create a study event definition for trial configuration", "operationId": "createStudyEventDefinition", "tags": [ "Trial Configurations" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "type": "string", "example": "1" } }, { "name": "trial_configuration_id", "in": "path", "description": "The trial configuration id", "required": true, "schema": { "type": "string", "example": "1" } } ], "requestBody": { "description": "Study event definition object", "content": { "application/json": { "schema": { "type": "object", "description": "Study event definition object", "properties": { "authenticity_token": { "$ref": "#/components/schemas/AuthenticityToken" }, "display_name": { "type": "string", "description": "The display name of study event definition", "example": "Study Event Definition" }, "identifier": { "type": "string", "description": "The identifier of study event definition", "example": "SPD" }, "position": { "type": "integer", "description": "The position of study event definition", "example": 1 }, "study_arm_id": { "type": "string", "description": "The study arm id of study event definition", "example": "1" } }, "additionalProperties": false, "required": [ "authenticity_token", "display_name", "identifier" ] } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TrialConfiguration" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/accounts/{account_id}/administration/trial_configurations/{trial_configuration_id}/study_event_definitions/{study_event_definition_id}": { "put": { "summary": "Update a study event definition for trial configuration", "description": "Update a study event definition for trial configuration", "operationId": "updateStudyEventDefinition", "tags": [ "Trial Configurations" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "type": "string", "example": "1" } }, { "name": "trial_configuration_id", "in": "path", "description": "The trial configuration id", "required": true, "schema": { "type": "string", "example": "1" } }, { "name": "study_event_definition_id", "in": "path", "description": "The study event definition id", "required": true, "schema": { "type": "string", "example": "1" } } ], "requestBody": { "description": "Study event definition object", "content": { "application/json": { "schema": { "type": "object", "description": "Study event definition object", "properties": { "authenticity_token": { "$ref": "#/components/schemas/AuthenticityToken" }, "display_name": { "type": "string", "description": "The display name of study event definition", "example": "Study event Definition" }, "identifier": { "type": "string", "description": "The identifier of study event definition", "example": "SPD" }, "position": { "type": "integer", "description": "The position of study event definition", "example": 1 }, "study_arm_id": { "type": "string", "description": "The study arm id of study event definition", "example": "1" } }, "additionalProperties": false, "required": [ "authenticity_token", "display_name", "identifier", "position" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TrialConfiguration" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "delete": { "summary": "Delete a study event definition for trial configuration", "description": "Delete a study event definition for trial configuration", "operationId": "deleteStudyEventDefinition", "tags": [ "Trial Configurations" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "type": "string", "example": "1" } }, { "name": "trial_configuration_id", "in": "path", "description": "The trial configuration id", "required": true, "schema": { "type": "string", "example": "1" } }, { "name": "study_event_definition_id", "in": "path", "description": "The study event definition id", "required": true, "schema": { "type": "string", "example": "1" } } ], "requestBody": { "description": "Study event definition object", "content": { "application/json": { "schema": { "type": "object", "description": "Study event definition object", "properties": { "authenticity_token": { "$ref": "#/components/schemas/AuthenticityToken" } }, "additionalProperties": false, "required": [ "authenticity_token" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TrialConfiguration" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/accounts/{account_id}/administration/trial_configurations/{trial_configuration_id}/study_event_procedures": { "post": { "summary": "Create a study event procedure for trial configuration", "description": "Create a study event procedure for trial configuration", "operationId": "createStudyEventProcedure", "tags": [ "Trial Configurations" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "type": "string", "example": "1" } }, { "name": "trial_configuration_id", "in": "path", "description": "The trial configuration id", "required": true, "schema": { "type": "string", "example": "1" } } ], "requestBody": { "description": "study event procedure object", "content": { "application/json": { "schema": { "type": "object", "description": "study event procedure object", "properties": { "authenticity_token": { "$ref": "#/components/schemas/AuthenticityToken" }, "study_event_definition_id": { "type": "string", "description": "The study event definition id of study event procedure", "example": "1" }, "study_procedure_definition_id": { "type": "string", "description": "The study procedure definition id of study event procedure", "example": "1" } }, "additionalProperties": false, "required": [ "authenticity_token", "study_event_definition_id", "study_procedure_definition_id" ] } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "description": "Trial configuration object", "properties": { "data": { "$ref": "#/components/schemas/TrialConfiguration" }, "id": { "type": "integer", "description": "The id of study event procedure", "example": 1 } } } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/accounts/{account_id}/administration/trial_configurations/{trial_configuration_id}/study_event_procedures/{study_event_procedure_id}": { "delete": { "summary": "Delete a study event procedure for trial configuration", "description": "Delete a study event procedure for trial configuration", "operationId": "deleteStudyEventProcedure", "tags": [ "Trial Configurations" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "type": "string", "example": "1" } }, { "name": "trial_configuration_id", "in": "path", "description": "The trial configuration id", "required": true, "schema": { "type": "string", "example": "1" } }, { "name": "study_event_procedure_id", "in": "path", "description": "The study event procedure id", "required": true, "schema": { "type": "string", "example": "1" } } ], "requestBody": { "description": "study event procedure object", "content": { "application/json": { "schema": { "type": "object", "description": "study event procedure object", "properties": { "authenticity_token": { "$ref": "#/components/schemas/AuthenticityToken" } }, "additionalProperties": false, "required": [ "authenticity_token" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "description": "Trial configuration object", "properties": { "data": { "$ref": "#/components/schemas/TrialConfiguration" } } } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/accounts/{account_id}/administration/trial_configurations/{trial_configuration_id}/study_procedure_definitions": { "post": { "summary": "Create a study procedure definition for trial configuration", "description": "Create a study procedure definition for trial configuration", "operationId": "createStudyProcedureDefinition", "tags": [ "Trial Configurations" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "type": "string", "example": "1" } }, { "name": "trial_configuration_id", "in": "path", "description": "The trial configuration id", "required": true, "schema": { "type": "string", "example": "1" } } ], "requestBody": { "description": "Study procedure definition object", "content": { "application/json": { "schema": { "type": "object", "description": "Study procedure definition object", "properties": { "authenticity_token": { "$ref": "#/components/schemas/AuthenticityToken" }, "display_name": { "type": "string", "description": "The display name of study procedure definition", "example": "Study Procedure Definition" }, "identifier": { "type": "string", "description": "The identifier of study procedure definition", "example": "SPD" }, "position": { "type": "integer", "description": "The position of study procedure definition", "example": 1 }, "required_form_templates": { "type": "integer", "description": "The required form templates of study procedure definition", "example": 1 } }, "additionalProperties": false, "required": [ "authenticity_token", "display_name", "identifier" ] } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TrialConfiguration" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/accounts/{account_id}/administration/trial_configurations/{trial_configuration_id}/study_procedure_definitions/{study_procedure_definition_id}": { "put": { "summary": "Update a study procedure definition for trial configuration", "description": "Update a study procedure definition for trial configuration", "operationId": "updateStudyProcedureDefinition", "tags": [ "Trial Configurations" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "type": "string", "example": "1" } }, { "name": "trial_configuration_id", "in": "path", "description": "The trial configuration id", "required": true, "schema": { "type": "string", "example": "1" } }, { "name": "study_procedure_definition_id", "in": "path", "description": "The study procedure definition id", "required": true, "schema": { "type": "string", "example": "1" } } ], "requestBody": { "description": "Study procedure definition object", "content": { "application/json": { "schema": { "type": "object", "description": "Study procedure definition object", "properties": { "authenticity_token": { "$ref": "#/components/schemas/AuthenticityToken" }, "display_name": { "type": "string", "description": "The display name of study procedure definition", "example": "Study Procedure Definition" }, "identifier": { "type": "string", "description": "The identifier of study procedure definition", "example": "SPD" }, "position": { "type": "integer", "description": "The position of study procedure definition", "example": 1 }, "required_form_templates": { "type": "integer", "description": "The required form templates of study procedure definition", "example": 1 } }, "additionalProperties": false, "required": [ "authenticity_token", "display_name", "identifier", "position" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TrialConfiguration" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "delete": { "summary": "Delete a study procedure definition for trial configuration", "description": "Delete a study procedure definition for trial configuration", "operationId": "deleteStudyProcedureDefinition", "tags": [ "Trial Configurations" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "type": "string", "example": "1" } }, { "name": "trial_configuration_id", "in": "path", "description": "The trial configuration id", "required": true, "schema": { "type": "string", "example": "1" } }, { "name": "study_procedure_definition_id", "in": "path", "description": "The study procedure definition id", "required": true, "schema": { "type": "string", "example": "1" } } ], "requestBody": { "description": "Study procedure definition object", "content": { "application/json": { "schema": { "type": "object", "description": "Study procedure definition object", "properties": { "authenticity_token": { "$ref": "#/components/schemas/AuthenticityToken" } }, "additionalProperties": false, "required": [ "authenticity_token" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TrialConfiguration" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/accounts/{account_id}/administration/trial_configurations/{trial_configuration_id}/update_sites": { "put": { "summary": "Update sites for trial configuration", "description": "Update sites for trial configuration", "operationId": "updateTrialConfigurationSites", "tags": [ "Trial Configurations" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "example": "1", "type": "string" } }, { "name": "trial_configuration_id", "in": "path", "description": "The trial configuration id", "required": true, "schema": { "example": "1", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "authenticity_token": { "$ref": "#/components/schemas/AuthenticityToken" }, "sites": { "type": "array", "items": { "type": "integer", "example": 1 } } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Site" } } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/accounts/{account_id}/administration/subject_requirements": { "get": { "summary": "Get subject requirements for account", "description": "Get subject requirements for account", "operationId": "getSubjectRequirements", "tags": [ "Subject Requirements" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "type": "string", "example": "1" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubjectRequirements" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } }, "post": { "summary": "Update subject requirements for account", "description": "Update subject requirements for account", "operationId": "updateSubjectRequirements", "tags": [ "Subject Requirements" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "type": "string", "example": "1" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "include_site_prefix": { "type": "boolean", "example": true }, "characters": { "type": "array", "items": { "$ref": "#/components/schemas/StudySubjectNumberCharacter" } }, "authenticity_token": { "$ref": "#/components/schemas/AuthenticityToken" } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubjectRequirements" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/accounts/{account_id}/administration/trial_containers": { "get": { "summary": "Get all trial containers for account", "description": "Get all trial containers for account", "operationId": "getTrialContainers", "tags": [ "Trial Containers" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "example": "1", "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TrialContainerBasic" } } } } }, "400": { "$ref": "#/components/responses/LegacyBadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } }, "/accounts/{account_id}/administration/workflow_definitions": { "get": { "summary": "Get all workflow definitions for account", "description": "Get all workflow definitions for account", "operationId": "getWorkflowDefinitions", "tags": [ "Workflow Definitions" ], "security": [ { "userSessionKey": [], "chillipharmSession": [] } ], "parameters": [ { "name": "account_id", "in": "path", "description": "The account id", "required": true, "schema": { "example": "1", "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/WorkflowDefinition" } } } } }, "400": { "$ref": "#/components/responses/LegacyBadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } } }, "components": { "securitySchemes": { "userSessionKey": { "type": "apiKey", "in": "cookie", "name": "user_session_key", "description": "User session key cookie" }, "chillipharmSession": { "type": "apiKey", "in": "cookie", "name": "_chillipharm_session", "description": "ChilliPharm session cookie" } }, "schemas": { "AuthenticityToken": { "description": "The authenticity token", "type": "string", "example": "valid_token" }, "ChapterDefinition": { "description": "A chapter definition", "type": "object", "properties": { "id": { "type": "number", "description": "The id of chapter definition", "example": 1 }, "name": { "type": "string", "description": "The name of chapter definition", "example": "pre" }, "color": { "type": "string", "description": "The color of chapter definition", "example": "#ccc" } }, "additionalProperties": false, "required": [ "id", "name", "color" ] }, "ChapterDefinitionsWithPositions": { "description": "A list of chapter definitions with positions", "type": "array", "items": { "$ref": "#/components/schemas/ChapterDefinitionWithPosition" } }, "ChapterDefinitionsWithPosition": { "$ref": "#/components/schemas/ChapterDefinitionWithPosition" }, "Error": { "description": "An error", "type": "object", "properties": { "message": { "type": "string", "description": "The error message", "example": "Bad request. Missing or invalid input parameters." }, "fields": { "type": "object", "description": "The error fields", "properties": { "^.*$": { "type": "array", "items": { "type": "string" }, "example": { "name": [ "can't be blank" ] } } } } } }, "FormTemplate": { "description": "A form template", "type": "object", "properties": { "active": { "type": "boolean", "description": "The active status of form template", "example": true }, "created_at": { "type": "string", "description": "The created at of form template", "example": "2020-01-01T00:00:00.000Z" }, "description": { "type": "string", "description": "The description of form template", "example": "Test" }, "id": { "type": "number", "description": "The id of form template", "example": 1 }, "number_of_forms": { "type": "number", "description": "The number of forms of form template", "example": 1 }, "title": { "type": "string", "description": "The title of form template", "example": "Test" }, "trial_containers": { "type": "array", "description": "The trial containers of form template", "items": { "$ref": "#/components/schemas/TrialContainer" } }, "version_number": { "type": "number", "description": "The version number of form template", "example": 1 }, "versions": { "type": "array", "items": { "$ref": "#/components/schemas/FormTemplateVersion" } }, "workflow_definition_id": { "type": "number", "description": "The workflow definition id of form template", "example": 1 }, "workflow_definition_name": { "type": "string", "description": "The workflow definition name of form template", "example": "Test" } } }, "FormTemplateBodyData": { "type": "object", "description": "Form template body data object", "properties": { "created_by": { "type": "object", "description": "The created by of form template version", "properties": { "id": { "type": "number", "description": "The id of created by", "example": 1 }, "email": { "type": "string", "description": "The email of created by", "example": "test@chillipharm.com" } } }, "description": { "type": "string", "description": "The description of form template", "example": "Test" }, "fields": { "type": "array", "description": "The fields of form template version", "items": { "$ref": "#/components/schemas/FormTemplateVersionField" } }, "reason_for_change": { "type": "string", "description": "The reason for change of form template version", "example": "Version 1" }, "title": { "type": "string", "description": "The title of form template version", "example": "Version 1" }, "version_number": { "type": "number", "description": "The version number of form template", "example": 1 } } }, "FormTemplateVersion": { "description": "A form template version", "type": "object", "properties": { "id": { "type": "number", "description": "The id of form template version", "example": 1 }, "version_number": { "type": "number", "description": "The version number of form template version", "example": 1 }, "title": { "type": "string", "description": "The title of form template version", "example": "Version 1" }, "description": { "type": "string", "description": "The description of form template version", "example": "Version 1" }, "reason_for_change": { "type": "string", "description": "The reason for change of form template version", "example": "Version 1" }, "created_at": { "type": "string", "description": "The created at of form template version", "example": "2020-01-01T00:00:00.000Z" }, "fields": { "type": "array", "description": "The fields of form template version", "items": { "$ref": "#/components/schemas/FormTemplateVersionField" } }, "created_by": { "type": "object", "description": "The created by of form template version", "properties": { "id": { "type": "number", "description": "The id of created by", "example": 1 }, "email": { "type": "string", "description": "The email of created by", "example": "test@chillipharm.com" } } } }, "additionalProperties": false, "required": [ "version_number", "title", "description", "reason_for_change", "fields", "created_by" ] }, "FormTemplateVersionField": { "description": "A form template version field", "type": "object", "properties": { "id": { "type": "string", "description": "The id of form template version field", "example": "ee8e24-1ca4-ee06-04ed-285b4b02ed70" }, "title": { "type": "string", "description": "The title of form template version field", "example": "Test 1" }, "field_type": { "type": "string", "description": "The field type of form template version field", "example": "single_line" }, "input_guidance": { "type": "string", "description": "The input guidance of form template version field", "example": "" }, "position": { "type": "number", "description": "The position of form template version field", "example": 1 }, "enabled": { "type": "boolean", "description": "The enabled status of form template version field", "example": true }, "validations": { "$ref": "#/components/schemas/FormTemplateVersionFieldValidations" }, "options": { "type": "array", "description": "The options of form template version field", "items": { "type": "string", "example": "Option 1" } }, "persisted": { "type": "boolean", "description": "The persisted status of form template version field", "example": true }, "other_enabled": { "type": "boolean", "description": "The other enabled status of form template version field", "example": false }, "other_field": { "type": "string", "description": "The other field of form template version field", "example": "Other" } }, "additionalProperties": false, "required": [ "title", "field_type", "position", "enabled", "validations", "options", "other_enabled", "other_field" ] }, "FormTemplateVersionFieldValidations": { "description": "A form template version field validations", "type": "object", "properties": { "required": { "type": "boolean", "description": "The required status of form template version field validations", "example": true }, "input_format": { "type": "string", "description": "The input format of form template version field validations", "example": "email", "nullable": true }, "character_limit": { "type": "number", "description": "The character limit of form template version field validations", "example": 100, "nullable": true }, "character_restriction": { "type": "string", "description": "The character restriction of form template version field validations", "example": "letters", "nullable": true }, "date_restriction": { "type": "string", "description": "The date restriction of form template version field validations", "example": "not_past_date", "nullable": true } }, "additionalProperties": false, "required": [ "required" ] }, "LegacyError": { "description": "A legacy error", "type": "object", "properties": { "error": { "type": "string", "description": "The error message", "example": "Bad request. Missing or invalid input parameters." } }, "additionalProperties": false, "required": [ "error" ] }, "Role": { "description": "A role", "type": "object", "properties": { "id": { "type": "number", "description": "The id of role", "example": 1 }, "name": { "type": "string", "description": "The name of role", "example": "Guest" } }, "required": [ "id", "name" ], "additionalProperties": false }, "Site": { "description": "A site", "type": "object", "properties": { "country": { "type": "string", "description": "The country of site", "example": "United Kingdom" }, "go_live_date": { "type": "string", "description": "The go live date of site", "example": "2024-06-10" }, "id": { "type": "number", "description": "The id of site", "example": 7 }, "identifier": { "type": "string", "description": "The identifier of site", "example": "BEACONHILL" }, "name": { "type": "string", "description": "The name of site", "example": "Beacon Hill Medical Center" }, "trial_configuration": { "type": "object", "description": "The trial configuration of site", "properties": { "id": { "type": "number", "description": "The id of trial configuration", "example": 2 }, "published": { "type": "boolean", "description": "The published status of trial configuration", "example": true }, "name": { "type": "string", "description": "The name of trial configuration", "example": "Alpha Trial Configuration" } }, "nullable": true } } }, "StudyArm": { "description": "A study arm", "type": "object", "properties": { "display_name": { "type": "string", "description": "The display name of study arm", "example": "Post-Treatment Monitoring Arm" }, "id": { "type": "number", "description": "The id of study arm", "example": 1 } }, "required": [ "display_name", "id" ], "additionalProperties": false }, "StudyArmWithTrialConfigurations": { "description": "A study arm", "allOf": [ { "$ref": "#/components/schemas/StudyArm" }, { "type": "object", "properties": { "trial_configurations": { "type": "array", "description": "The trial configurations associated with study arm", "items": { "type": "object", "description": "The trial configuration", "properties": { "id": { "type": "number", "description": "The id of trial configuration", "example": 1 }, "name": { "type": "string", "description": "The name of trial configuration", "example": "My Trial Configuration" } }, "required": [ "id", "name" ], "additionalProperties": false } } }, "required": [ "trial_configurations" ], "additionalProperties": false } ] }, "StudyEventDefinition": { "description": "A study event definition", "type": "object", "properties": { "display_name": { "type": "string", "description": "The display name of study event definition", "example": "Day 1" }, "id": { "type": "number", "description": "The id of study event definition", "example": 1 }, "identifier": { "type": "string", "description": "The identifier of study event definition", "example": "DAY1" }, "position": { "type": "number", "description": "The position of study event definition", "example": 1 }, "study_arm": { "anyOf": [ { "$ref": "#/components/schemas/StudyArm" }, { "type": "object", "nullable": true } ] }, "study_events_exist": { "type": "boolean", "description": "The indicator whether study events exist", "example": false } }, "additionalProperties": false, "required": [ "display_name", "id", "identifier", "position", "study_events_exist" ] }, "StudyEventProcedure": { "description": "A study event procedure", "type": "object", "properties": { "id": { "type": "number", "description": "The id of study event procedure", "example": 1 }, "study_event_definition_id": { "type": "number", "description": "The study event definition id of study event procedure", "example": 1 }, "study_procedure_definition_id": { "type": "number", "description": "The study procedure definition id of study event procedure", "example": 1 } } }, "StudyProcedureDefinition": { "description": "A study procedure definition", "type": "object", "properties": { "display_name": { "type": "string", "description": "The display name of study procedure definition", "example": "Six Minute Walk Test" }, "id": { "type": "number", "description": "The id of study procedure definition", "example": 1 }, "identifier": { "type": "string", "description": "The identifier of study procedure definition", "example": "SIXWALK" }, "position": { "type": "number", "description": "The position of study procedure definition", "example": 1 }, "required_form_templates": { "type": "array", "description": "The required form templates of study procedure definition", "items": { "type": "object", "description": "The required form templates of study procedure definition", "properties": { "id": { "type": "number", "description": "The id of form template", "example": 1 }, "title": { "type": "string", "description": "The title of form template", "example": "Patient Assessment 1" }, "version_number": { "type": "number", "description": "The version number of form template", "example": 1 }, "workflow_definition_name": { "type": "string", "description": "The workflow definition name of form template", "example": "Standard Workflow" } }, "required": [ "id", "title", "version_number", "workflow_definition_name" ], "additionalProperties": false } }, "study_procedures_exist": { "type": "boolean", "description": "The indicator whether study procedures exist", "example": false } }, "additionalProperties": false, "required": [ "display_name", "id", "identifier", "position", "study_procedures_exist" ] }, "StudyProcedureRoleDefinition": { "description": "A study procedure role definition", "type": "object", "properties": { "id": { "type": "number", "description": "The id of study procedure role definition", "example": 1 }, "notify": { "type": "boolean", "description": "The notify status of study procedure role definition", "example": false }, "role": { "$ref": "#/components/schemas/Role" } } }, "StudyProcedureTaskDefinition": { "description": "A study procedure task definition", "type": "object", "properties": { "display_name": { "type": "string", "description": "The display name of study procedure task definition", "example": "Please complete something first" }, "enabled": { "type": "boolean", "description": "The enabled status of study procedure task definition", "example": true }, "id": { "type": "number", "description": "The id of study procedure task definition", "example": 1 }, "roles": { "type": "array", "description": "The role ids of study procedure task definition", "items": { "$ref": "#/components/schemas/Role" } }, "study_procedure_tasks_exist": { "type": "boolean", "description": "The usage status of study procedure task definition", "example": false } }, "required": [ "display_name", "enabled", "id", "roles", "study_procedure_tasks_exist" ], "additionalProperties": false }, "TrialConfiguration": { "description": "A trial configuration", "type": "object", "properties": { "created_at": { "type": "string", "description": "The created at of trial configuration", "example": "2024-06-12T14:19:40.127Z" }, "id": { "type": "number", "description": "The id of trial configuration", "example": 1 }, "issue_date": { "type": "string", "description": "The issue date of trial configuration", "example": "2024-06-12" }, "name": { "type": "string", "description": "The name of trial configuration", "example": "Ghost Trial Configuration copy (1)" }, "published": { "type": "boolean", "description": "The published status of trial configuration", "example": false }, "study_event_display_name": { "type": "object", "description": "The study event display name of trial configuration", "properties": { "singular": { "type": "string", "description": "The singular of study event display name", "example": "visit" }, "plural": { "type": "string", "description": "The plural of study event display name", "example": "visits" } } }, "study_events_persisted": { "type": "boolean", "description": "The study events persisted status of trial configuration", "example": false }, "study_procedure_display_name": { "type": "object", "description": "The study procedure display name of trial configuration", "properties": { "singular": { "type": "string", "description": "The singular of study procedure display name", "example": "assessment" }, "plural": { "type": "string", "description": "The plural of study procedure display name", "example": "assessments" } } }, "study_procedure_role_definitions": { "type": "array", "description": "The study procedure role definitions of trial configuration", "items": { "$ref": "#/components/schemas/StudyProcedureRoleDefinition" } }, "table": { "type": "object", "properties": { "study_event_definitions": { "type": "array", "description": "The study event definitions of trial configuration", "items": { "$ref": "#/components/schemas/StudyEventDefinition" } }, "study_event_procedures": { "type": "array", "description": "The study event procedures of trial configuration", "items": { "$ref": "#/components/schemas/StudyEventProcedure" } }, "study_procedure_definitions": { "type": "array", "description": "The study procedure definitions of trial configuration", "items": { "$ref": "#/components/schemas/StudyProcedureDefinition" } } } }, "version_number": { "type": "number", "description": "The version number of trial configuration", "example": 1 } } }, "TrialConfigurationShort": { "description": "A trial configuration", "type": "object", "properties": { "id": { "type": "number", "description": "The id of trial configuration", "example": 1 }, "name": { "type": "string", "description": "The name of trial configuration", "example": "My Trial Configuration" }, "number_of_study_procedures": { "type": "number", "description": "The number of study procedures in the trial configuration", "example": 2 }, "study_event_display_name": { "type": "object", "description": "The study event display name of trial configuration", "properties": { "plural": { "type": "string", "description": "The plural of study event display name", "example": "visits" }, "singular": { "type": "string", "description": "The singular of study event display name", "example": "visit" } } }, "study_procedure_display_name": { "type": "object", "description": "The study procedure display name of trial configuration", "properties": { "plural": { "type": "string", "description": "The plural of study procedure display name", "example": "assessments" }, "singular": { "type": "string", "description": "The singular of study procedure display name", "example": "assessment" } } } }, "required": [ "id", "name", "number_of_study_procedures", "study_event_display_name", "study_procedure_display_name" ], "additionalProperties": false }, "TrialContainer": { "description": "A trial container", "type": "object", "properties": { "id": { "type": "number", "description": "The id of trial container", "example": 1 }, "name": { "type": "string", "description": "The name of trial container", "example": "pre" }, "identifier": { "type": "string", "description": "The identifier of trial container", "example": "pre" }, "number": { "type": "string", "description": "The number of trial container", "example": "PRE1" }, "type": { "type": "string", "description": "The type of trial container", "example": "Library" }, "country": { "type": "string", "description": "The country of trial container", "example": "UK" }, "trial_configuration": { "$ref": "#/components/schemas/TrialConfigurationShort" } }, "required": [ "id", "name", "type", "country" ], "additionalProperties": false }, "TrialContainerBasic": { "description": "A basic trial container", "type": "object", "properties": { "id": { "type": "number", "description": "The id of trial container", "example": 1 }, "name": { "type": "string", "description": "The name of trial container", "example": "pre" }, "type": { "type": "string", "description": "The type of trial container", "example": "Library" } }, "required": [ "id", "name", "type" ], "additionalProperties": false }, "WorkflowDefinition": { "description": "A workflow definition", "type": "object", "properties": { "id": { "type": "number", "description": "The id of workflow definition", "example": 1 }, "name": { "type": "string", "description": "The name of workflow definition", "example": "Standard Workflow" }, "description": { "type": "string", "description": "The description of workflow definition", "example": "No signature required" }, "with_signature": { "type": "boolean", "description": "The with signature status of workflow definition", "example": false } } }, "ChapterDefinitionWithPosition": { "description": "A chapter definition with position", "type": "object", "properties": { "id": { "type": "number", "description": "The id of chapter definition", "example": 1 }, "name": { "type": "string", "description": "The name of chapter definition", "example": "pre" }, "color": { "type": "string", "description": "The color of chapter definition", "example": "#ccc" }, "position": { "type": "number", "description": "The position of chapter definition", "example": 1 } }, "additionalProperties": false, "required": [ "id", "name", "color", "position" ] }, "StudySubjectNumberCharacter": { "description": "Subject requirements character for an account", "type": "object", "properties": { "character_type": { "type": "string", "description": "Character type", "example": "A" } }, "required": [ "character_type" ], "additionalProperties": false }, "SubjectRequirements": { "description": "Subject requirements for an account", "type": "object", "properties": { "include_site_prefix": { "type": "boolean", "description": "Include site prefix", "example": true }, "characters": { "type": "array", "description": "The characters for subject number", "items": { "$ref": "#/components/schemas/StudySubjectNumberCharacter" } } }, "required": [ "include_site_prefix", "characters" ], "additionalProperties": false } }, "responses": { "BadRequest": { "description": "Bad request. Missing or invalid input parameters.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "Unauthorized": { "description": "Unauthorized. Missing or invalid authentication credentials.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "Forbidden": { "description": "Forbidden. Insufficient permissions to perform the operation.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "NotFound": { "description": "Not found. The requested resource was not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "InternalServerError": { "description": "Internal server error. Please contact support.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "Conflict": { "description": "Conflict. The request could not be completed due to a conflict with the current state of the resource.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "LegacyBadRequest": { "description": "Bad request. Missing or invalid input parameters.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LegacyError" } } } } } } }