Change Case Status
POST
/api/v1/cases/:caseIdOpens, closes, or reopens a case using the CHANGE_CASE_STATUS action.
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
Path Parameters
caseIdstringrequiredThe unique identifier (UUID) of the case.
Headers
cv-api-keystringrequiredYour unique API key for authentication.
Content-TypestringrequiredMust be application/json.
Example:
application/jsonRequest Body
actionstringrequiredAction to perform. Must be `CHANGE_CASE_STATUS`.
Values:CHANGE_CASE_STATUS
statusstringrequiredThe target status for the case.
Values:OPENCLOSEREOPEN
reasonstringoptionalOptional reason for closing the case. Only applicable when `status` is `CLOSE`. Stored as the archive note.
Status Behaviour
status | Allowed when | Effect |
|---|---|---|
OPEN | Case is ASSIGNED, ABANDONED, or already OPEN | Reverts the case status to OPEN. If the case was ABANDONED, auto-assignment is triggered. |
CLOSE | Case is not archived | Archives the case, cancels all pending jobs, and stores the optional reason as an archive note. |
REOPEN | Case is archived | Unarchives the case and clears the archive reason and note. This is the only action allowed on a closed (archived) case. |
Validation Rules
- status: Required. Must be one of
OPEN,CLOSE, orREOPEN. - OPEN on archived case: Returns
400— useREOPENto unarchive first. - CLOSE / OPEN / REOPEN on another org's case: Returns
401.
Examples
- cURL — OPEN
- cURL — CLOSE
- cURL — REOPEN
- JavaScript
- Python
curl --location '<BASE_URL>/api/v1/cases/:caseId' \
--header 'cv-api-key: <redacted>' \
--header 'Content-Type: application/json' \
--data-raw '{
"action": "CHANGE_CASE_STATUS",
"status": "OPEN"
}'
curl --location '<BASE_URL>/api/v1/cases/:caseId' \
--header 'cv-api-key: <redacted>' \
--header 'Content-Type: application/json' \
--data-raw '{
"action": "CHANGE_CASE_STATUS",
"status": "CLOSE",
"reason": "Patient requested closure"
}'
curl --location '<BASE_URL>/api/v1/cases/:caseId' \
--header 'cv-api-key: <redacted>' \
--header 'Content-Type: application/json' \
--data-raw '{
"action": "CHANGE_CASE_STATUS",
"status": "REOPEN"
}'
const caseId = 'YOUR_CASE_ID';
const response = await fetch(
`https://api.care360-next.carevalidate.com/api/v1/cases/${caseId}`,
{
method: 'POST',
headers: {
'cv-api-key': 'YOUR_SECRET_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
action: 'CHANGE_CASE_STATUS',
status: 'CLOSE',
reason: 'Patient requested closure',
}),
}
);
const data = await response.json();
console.log(data);
import requests
case_id = "YOUR_CASE_ID"
url = f"https://api.care360-next.carevalidate.com/api/v1/cases/{case_id}"
headers = {
"cv-api-key": "YOUR_SECRET_KEY",
"Content-Type": "application/json",
}
payload = {
"action": "CHANGE_CASE_STATUS",
"status": "CLOSE",
"reason": "Patient requested closure",
}
response = requests.post(url, headers=headers, json=payload)
data = response.json()
print(data)
Responses
▶200Case OpenedReturned when the case is successfully opened.
{
"status": 200,
"success": true,
"message": "Case opened successfully"
}
▶200Case ClosedReturned when the case is successfully closed.
{
"status": 200,
"success": true,
"message": "Case closed successfully"
}
▶200Case ReopenedReturned when the case is successfully reopened.
{
"status": 200,
"success": true,
"message": "Case reopened successfully"
}
▶400Case Already ClosedReturned when trying to OPEN or CLOSE an already archived case.
{
"status": 400,
"success": false,
"message": "Invalid request",
"error": "Case has been closed"
}
▶400Invalid StatusReturned when the status value is not one of OPEN, CLOSE, or REOPEN.
{
"status": 400,
"success": false,
"message": "Invalid request",
"error": "Invalid status value"
}
▶400Case Not FoundReturned when no case exists with the provided caseId.
{
"status": 400,
"success": false,
"message": "Invalid request",
"error": "No Case found for provided details!"
}
▶401Permission DeniedReturned when the case belongs to a different organization.
{
"status": 401,
"success": false,
"message": "Permission denied",
"error": "Permission denied"
}
Try It Out
Try itAPI Playground
▶