Add Products to Case
/api/v1/cases/:caseId/productsAttaches one or more products to an existing case. Each product can include an optional intake form and subscription configuration.
https://api.care360-next.carevalidate.com/api/v1/cases/:caseId/productshttps://api-staging.care360-next.carevalidate.com/api/v1/cases/:caseId/productsParameters
AuthorizationstringrequiredBearer token for authentication. Format: `Bearer <access_token>`
Content-TypestringrequiredMust be `application/json`
caseIdstring (UUID)requiredUnique identifier of the case to add products to
productsarrayrequiredProducts to attach to the case. Each case can include one or more products.
Show 4 child properties
idstring (UUID)requiredOrganization product ID
visitTypestringoptionalVisit type for this product
formobjectoptionalHealthcare intake form (see Form section below)
Show 3 child properties
titlestringoptionalForm title
descriptionstringoptionalForm description
questionsarrayoptionalArray of form questions
subscriptionobjectoptionalOptional subscription for this case product. Values are stored on the case product and returned in GET /api/v1/cases and in GraphQL.
Show 2 child properties
intervalstringoptionalSubscription interval (case-sensitive, lowercase)
intervalCountintegeroptionalPositive integer for interval count (e.g. 1, 2, 3, 6, 12)
Form Question Fields
questionstringrequiredQuestion text
answerstringrequiredUser response
typestringrequiredQuestion type
requiredbooleanoptionalWhether the question is mandatory
phibooleanoptionalPHI indicator. Questions marked with `true` are treated as Protected Health Information and stored per HIPAA compliance requirements.
optionsarrayoptionalSelectable options for SINGLESELECT and MULTISELECT question types
Examples
- cURL
- JavaScript
- Python
curl -X POST "https://api.care360-next.carevalidate.com/api/v1/cases/550e8400-e29b-41d4-a716-446655440000/products" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"products": [
{
"id": "8dff2c47-b2ab-42d8-9af0-4c4dbca8b4b6",
"visitType": "SYNC_VIDEO",
"subscription": {
"interval": "month",
"intervalCount": 3
}
},
{
"id": "621527f5-3877-48b3-b27f-df395a5308bb",
"form": {
"title": "Healthcare Intake Form",
"description": "Patient intake form for healthcare services",
"questions": [
{
"question": "How much do you weigh?",
"answer": "138 lbs",
"phi": true,
"type": "TEXT"
},
{
"question": "What are your weight loss goals?",
"answer": "Lose 1-20lbs for good",
"type": "SINGLESELECT",
"required": true,
"options": [
"Lose 1-20lbs for good",
"Lose 21-50lbs for good",
"Lose over 50 for good",
"Maintain my healthy weight"
]
}
]
}
}
]
}'
const caseId = "550e8400-e29b-41d4-a716-446655440000";
const response = await fetch(
`https://api.care360-next.carevalidate.com/api/v1/cases/${caseId}/products`,
{
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify({
products: [
{
id: "8dff2c47-b2ab-42d8-9af0-4c4dbca8b4b6",
visitType: "SYNC_VIDEO",
subscription: {
interval: "month",
intervalCount: 3,
},
},
{
id: "621527f5-3877-48b3-b27f-df395a5308bb",
form: {
title: "Healthcare Intake Form",
description: "Patient intake form for healthcare services",
questions: [
{
question: "How much do you weigh?",
answer: "138 lbs",
phi: true,
type: "TEXT",
},
{
question: "What are your weight loss goals?",
answer: "Lose 1-20lbs for good",
type: "SINGLESELECT",
required: true,
options: [
"Lose 1-20lbs for good",
"Lose 21-50lbs for good",
"Lose over 50 for good",
"Maintain my healthy weight",
],
},
],
},
},
],
}),
}
);
const data = await response.json();
console.log(data);
import requests
case_id = "550e8400-e29b-41d4-a716-446655440000"
response = requests.post(
f"https://api.care360-next.carevalidate.com/api/v1/cases/{case_id}/products",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json",
},
json={
"products": [
{
"id": "8dff2c47-b2ab-42d8-9af0-4c4dbca8b4b6",
"visitType": "SYNC_VIDEO",
"subscription": {
"interval": "month",
"intervalCount": 3,
},
},
{
"id": "621527f5-3877-48b3-b27f-df395a5308bb",
"form": {
"title": "Healthcare Intake Form",
"description": "Patient intake form for healthcare services",
"questions": [
{
"question": "How much do you weigh?",
"answer": "138 lbs",
"phi": True,
"type": "TEXT",
},
{
"question": "What are your weight loss goals?",
"answer": "Lose 1-20lbs for good",
"type": "SINGLESELECT",
"required": True,
"options": [
"Lose 1-20lbs for good",
"Lose 21-50lbs for good",
"Lose over 50 for good",
"Maintain my healthy weight",
],
},
],
},
},
],
},
)
print(response.json())
Responses
▶200SuccessProducts successfully attached to the case.
{
"success": true,
"data": {
"caseId": "550e8400-e29b-41d4-a716-446655440000"
}
}
▶400Bad RequestInvalid request body or parameters.
{
"success": false,
"message": "Invalid request"
}
▶401UnauthorizedMissing or invalid authentication token.
{
"success": false,
"message": "Unauthorized"
}
▶409ConflictCase conflict (e.g., duplicate product attachment).
{
"success": false,
"message": "Case conflict"
}
▶422Validation FailedRequest body failed validation rules.
{
"success": false,
"message": "Validation failed"
}
▶500Internal Server ErrorUnexpected server error.
{
"success": false,
"message": "Internal server error"
}
Try It Out
API Version: v2.2