Get Latest Case ID
GET
/api/v1/customer-latest-case-idRetrieves the most recent case ID for a customer, identified by email address or phone number.
CV-Api-Key
Production
https://api.care360-next.carevalidate.com/api/v1/customer-latest-case-idStaging
https://api-staging.care360-next.carevalidate.com/api/v1/customer-latest-case-idHeaders
CV-Api-KeystringrequiredOrganization's secret API key for authentication.
Content-TypestringoptionalShould be application/json.
Example:
application/jsonQuery Parameters
emailstringoptionalCustomer's email address.
phoneNumberstringoptionalCustomer's phone number.
Request Examples
- cURL
- JavaScript
- Python
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"
const params = new URLSearchParams({
email: 'patient@carevalidate.com',
});
const response = await fetch(
`https://api.care360-next.carevalidate.com/api/v1/customer-latest-case-id?${params}`,
{
method: 'GET',
headers: {
'Content-Type': 'application/json',
'CV-Api-Key': 'YOUR_SECRET_KEY',
},
}
);
const data = await response.json();
console.log(data);
import requests
url = "https://api.care360-next.carevalidate.com/api/v1/customer-latest-case-id"
headers = {
"Content-Type": "application/json",
"CV-Api-Key": "YOUR_SECRET_KEY",
}
params = {
"email": "patient@carevalidate.com",
}
response = requests.get(url, headers=headers, params=params)
data = response.json()
print(data)
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
Try itAPI Playground
▶