Skip to main content

Patient Add Form to Case

POST/api/v1/customer-dynamic-case-form

Submits an intake form with question responses to an existing case.

cv-api-key
Productionhttps://api.care360-next.carevalidate.com/api/v1/customer-dynamic-case-form
Staginghttps://api-staging.care360-next.carevalidate.com/api/v1/customer-dynamic-case-form

Parameters

Headers
cv-api-keystringrequired
Secret API key for authentication
Request Body (JSON)
keystringoptional
API key (if not provided in header)
caseIdstringrequired
The ID of the case to update
formTitlestringrequired
Title of the form
formDescriptionstringoptional
Description of the form
questionsarrayrequired
Array of question objects (see below)

Question Object

questionIdstringrequired
The ID of the question
questionstringrequired
The question text
typestringrequired
The type of the question (e.g., text, file, multiselect)
requiredbooleanoptional
Whether the question is required
answeranyrequired
The answer to the question
phibooleanoptional
Whether the question contains PHI
hintstringoptional
Hint text for the question
placeholderstringoptional
Placeholder text for the question
optionsarrayoptional
Options for select/multiselect questions

Notes

  • The cv-api-key can be provided either as a header or in the key field of the request body.
  • The questions array must contain at least one question object.
  • The response includes the caseId and the generated formResponseId for the submission.

Examples

curl -X POST "<BASE_URL>/api/v1/customer-dynamic-case-form" \
-H "cv-api-key: your-secret-key" \
-H "Content-Type: application/json" \
-d '{
"caseId": "abc123",
"formTitle": "Health Survey",
"formDescription": "Initial intake",
"questions": [
{ "questionId": "q1", "answer": "Yes" },
{ "questionId": "q2", "answer": 42 }
]
}'

Responses

200SuccessForm submitted successfully.
{
"status": 200,
"success": true,
"data": {
"caseId": "string",
"formResponseId": "string"
}
}
400Missing Required ParameterReturned when a required parameter (key, caseId, formTitle, or questions) is missing.
{
"status": 400,
"success": false,
"error": "The '<param>' param is required"
}
400Missing Question FieldReturned when a required field in a question is missing.
{
"status": 400,
"success": false,
"error": "The 'questions[<index>].<field>' field is required"
}
400Secret Key Not ProvidedReturned when the secret key is not provided.
{
"status": 400,
"success": false,
"error": "Secret key not provided!"
}
400Organization DisabledReturned when the partner organization is disabled.
{
"status": 400,
"success": false,
"error": "Partner organization is disabled"
}
400Invalid CaseReturned when the provided case is not valid for the organization.
{
"status": 400,
"success": false,
"error": "Provided case is not valid"
}
400Submission FailedReturned when the form cannot be submitted (no question responses).
{
"status": 400,
"success": false,
"error": "Case Form can't be Submitted."
}

Try It Out