Update Case Product
POST
/api/v1/cases/:caseIdUpdates the status of a product associated with a case. Currently supports closing a case product with an optional reason.
cv-api-key
Production
https://api.care360-next.carevalidate.com/api/v1/cases/:caseIdStaging
https://api-staging.care360-next.carevalidate.com/api/v1/cases/:caseIdParameters
Headers
cv-api-keystringrequiredAPI key used for organization-level authentication
Content-TypestringrequiredMust be `application/json`
Path Parameters
caseIdstring (UUID)requiredUnique identifier of the case
Example:
ec5e0d29-bf87-46b9-98e7-03848442fe53Request Body
actionstringrequiredMust be exactly `UPDATE_CASE_PRODUCT`
Values:UPDATE_CASE_PRODUCT
caseProductInputobjectrequiredObject containing the case product update details
Show 3 child properties
productIdstring (UUID)requiredUnique identifier of the product to update
statusstringrequiredNew status for the case product
Values:CLOSE
reasonstringoptionalReason for the status change. Required when status is CLOSE.
Examples
- cURL
- JavaScript
- Python
curl -X POST "https://api-staging.care360-next.carevalidate.com/api/v1/cases/ec5e0d29-bf87-46b9-98e7-03848442fe53" \
-H "cv-api-key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"action": "UPDATE_CASE_PRODUCT",
"caseProductInput": {
"productId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "CLOSE",
"reason": "Treatment completed"
}
}'
const caseId = "ec5e0d29-bf87-46b9-98e7-03848442fe53";
const response = await fetch(
`https://api.care360-next.carevalidate.com/api/v1/cases/${caseId}`,
{
method: "POST",
headers: {
"cv-api-key": "your-api-key-here",
"Content-Type": "application/json",
},
body: JSON.stringify({
action: "UPDATE_CASE_PRODUCT",
caseProductInput: {
productId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
status: "CLOSE",
reason: "Treatment completed",
},
}),
}
);
const data = await response.json();
console.log(data);
import requests
case_id = "ec5e0d29-bf87-46b9-98e7-03848442fe53"
response = requests.post(
f"https://api.care360-next.carevalidate.com/api/v1/cases/{case_id}",
headers={
"cv-api-key": "your-api-key-here",
"Content-Type": "application/json",
},
json={
"action": "UPDATE_CASE_PRODUCT",
"caseProductInput": {
"productId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "CLOSE",
"reason": "Treatment completed",
},
},
)
print(response.json())
Responses
▶200SuccessCase product updated successfully.
{
"status": 200,
"success": true,
"message": "Case product updated successfully",
"data": {
"success": true
}
}
▶400Bad RequestReturned when the case or product ID is invalid, the status string is invalid, or the API key is missing.
{
"status": 400,
"success": false,
"message": "Invalid request",
"error": "No Case found for provided details!",
"code": "VALIDATION_ERROR"
}
▶400Validation ErrorReturned when a field fails validation (e.g., invalid UUID format).
{
"status": 400,
"success": false,
"message": "Invalid request",
"error": "caseProductInput.productId, Product id must be a valid UUID",
"code": "VALIDATION_ERROR"
}
▶401UnauthorizedInvalid or missing API key, or organization not found.
{
"status": 401,
"success": false,
"message": "Unauthorized"
}
▶403ForbiddenCase does not belong to the organization, or permission denied.
{
"status": 403,
"success": false,
"message": "Forbidden"
}
Try It Out
Try itAPI Playground
▶info
Case Product Close activity notifications are sent via webhooks.