Skip to main content

Get Latest Case ID

GET/api/v1/customer-latest-case-id

Retrieves the most recent case ID for a customer, identified by email address or phone number.

CV-Api-Key
Productionhttps://api.care360-next.carevalidate.com/api/v1/customer-latest-case-id
Staginghttps://api-staging.care360-next.carevalidate.com/api/v1/customer-latest-case-id

Headers

CV-Api-Keystringrequired

Organization's secret API key for authentication.

Content-Typestringoptional

Should be application/json.

Example: application/json

Query Parameters

emailstringoptional

Customer's email address.

phoneNumberstringoptional

Customer's phone number.

Request Examples

curl "https://api.care360-next.carevalidate.com/api/v1/customer-latest-case-id?email=patient%40carevalidate.com" \
-H "Content-Type: application/json" \
-H "CV-Api-Key: YOUR_SECRET_KEY"

Responses

200SuccessLatest case ID retrieved successfully.
{
"status": 200,
"success": true,
"case": {
"id": "e1e3f5c1-6f12-4e0d-a442-7a9ff31319da"
}
}
400Missing Email
{
"status": 400,
"success": false,
"message": "Invalid case data",
"error": "Email id not provided!",
"code": "CASE_ERROR"
}
400Missing API Key
{
"status": 400,
"success": false,
"message": "Invalid case data",
"error": "Secret key not provided!",
"code": "CASE_ERROR"
}
400Invalid API Key
{
"status": 400,
"success": false,
"message": "Invalid case data",
"error": "Organization with [CV-Api-Key-Hash] not found!",
"code": "CASE_ERROR"
}
400No Case Found
{
"status": 400,
"success": false,
"message": "Invalid case data",
"error": "No Case found for provided details!",
"code": "CASE_ERROR"
}

Try It Out