Add Products to Case
POST
/api/v1/cases/:caseId/productsAttaches one or more products to an existing case. Supports an optional top-level payment that covers all products in the request, or per-product payment references. Each product can also include an optional intake form and subscription configuration.
cv-api-key
Production
https://api.care360-next.carevalidate.com/api/v1/cases/:caseId/productsStaging
https://api-staging.care360-next.carevalidate.com/api/v1/cases/:caseId/productsParameters
Headers
cv-api-keystringrequiredYour unique API key for authentication.
Content-TypestringrequiredMust be application/json.
Example:
application/jsonPath Parameters
caseIdstring (UUID)requiredUnique identifier of the case to add products to
Request Body
paymentobjectoptionalOptional top-level payment covering all products in this request. A single payment can cover one or more products. When provided, this takes precedence over any product-level `payment` fields — the top-level `providerReference` is used for processing and any product-level `providerReference` is ignored.
Show 4 child properties
amountnumberrequiredPayment amount
currencystringrequiredISO 4217 currency code
Example:
USDdescriptionstringoptionalPayment description
providerReferenceobjectoptionalPayment gateway reference
Show 2 child properties
typestringrequiredPayment reference type
Values:SETUP_INTENTPAYMENT_INTENT
idstringrequiredGateway reference ID (e.g. Stripe PaymentIntent or SetupIntent ID)
productsarrayrequiredProducts to attach to the case. Each case can include one or more products. When a top-level `payment` is provided, it is linked to all products in this array.
Show 5 child properties
idstring (UUID)requiredOrganization product ID
visitTypestringoptionalVisit type for this product
Values:ASYNC_TEXT_EMAILSYNC_IN_PERSONSYNC_PHONESYNC_VIDEO
formobjectoptionalHealthcare intake form (see Form section below)
Show 3 child properties
titlestringoptionalForm title
descriptionstringoptionalForm description
questionsarrayoptionalArray of form questions
paymentobjectoptionalOptional payment scoped to this individual product. If a top-level `payment` is also provided, the top-level takes precedence and this field's `providerReference` is ignored.
Show 3 child properties
amountnumberoptionalPayment amount for this product
descriptionstringoptionalPayment description for this product
providerReferenceobjectoptionalPayment gateway reference for this product. Only used when no top-level `payment` is present.
Show 2 child properties
typestringrequiredPayment reference type
Values:PAYMENT_INTENT
idstringrequiredGateway reference ID (e.g. Stripe PaymentIntent ID)
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)
Values:dayweekmonthyear
intervalCountintegeroptionalPositive integer for interval count (e.g. 1, 2, 3, 6, 12)
Form Question Fields
Question Object
questionstringrequiredQuestion text
answerstringrequiredUser response
typestringrequiredQuestion type
Values:TEXTSINGLESELECTMULTISELECT
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 (no payment)
- cURL (single payment, multi-product)
- cURL (per-product payments)
- JavaScript
- Python
curl -X POST "https://api.care360-next.carevalidate.com/api/v1/cases/550e8400-e29b-41d4-a716-446655440000/products" \
-H "cv-api-key: <redacted>" \
-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"
]
}
]
}
}
]
}'
curl -X POST "https://api.care360-next.carevalidate.com/api/v1/cases/550e8400-e29b-41d4-a716-446655440000/products" \
-H "cv-api-key: <redacted>" \
-H "Content-Type: application/json" \
-d '{
"payment": {
"amount": 79.98,
"currency": "USD",
"description": "Bundle upsell",
"providerReference": {
"type": "PAYMENT_INTENT",
"id": "pi_3Qx1AbGkkQS2eXzh1Kj9mN2c"
}
},
"products": [
{ "id": "8dff2c47-b2ab-42d8-9af0-4c4dbca8b4b6" },
{ "id": "621527f5-3877-48b3-b27f-df395a5308bb" }
]
}'
curl -X POST "https://api.care360-next.carevalidate.com/api/v1/cases/550e8400-e29b-41d4-a716-446655440000/products" \
-H "cv-api-key: <redacted>" \
-H "Content-Type: application/json" \
-d '{
"products": [
{
"id": "8dff2c47-b2ab-42d8-9af0-4c4dbca8b4b6",
"payment": {
"amount": 49.99,
"currency": "USD",
"description": "Product A charge",
"providerReference": {
"type": "PAYMENT_INTENT",
"id": "pi_3Qx1AbGkkQS2eXzh1Kj9mN2c"
}
}
},
{
"id": "621527f5-3877-48b3-b27f-df395a5308bb",
"payment": {
"amount": 29.99,
"currency": "USD",
"description": "Product B charge",
"providerReference": {
"type": "PAYMENT_INTENT",
"id": "pi_3Qx1CdGkkQS2eXzh0Pq7rT8w"
}
}
}
]
}'
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: {
"cv-api-key": "YOUR_SECRET_KEY",
"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={
"cv-api-key": "YOUR_SECRET_KEY",
"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
Try itAPI Playground
▶API Version: v2.2