Skip to main content

Patient Get Case Id

Overview

The /api/v1/customer-latest-case-id endpoint retrieves the most recent case ID for a customer identified by their email address. This is a GET endpoint that requires API key authentication and is used to find the latest case submitted by a specific customer within an organization.

Endpoint Details

HTTP Method

GET

URL

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

Authentication

  • Required Header: CV-Api-Key

Request Parameters

Query Parameters

ParameterTypeRequiredDescription
emailstringYesCustomer's email address

Headers

HeaderTypeRequiredDescription
CV-Api-KeystringYesOrganization's secret API key for authentication
Content-TypestringNoShould be application/json

Response Format

Success Response (200 OK)

{
"status": 200,
"success": true,
"case": {
"id": "e1e3f5c1-6f12-4e0d-a442-7a9ff31319da"
}
}

Error Responses

Missing Email

{
"error": "Email id not provided!"
}

Invalid/Missing API Key

{
"error": "Secret key not provided!"
}

Invalid API Key

{
"error": "Organization with [CV-Api-Key-Hash] not found!"
}

No Case Found

{
"error": "No Case found for provided email!"
}

Example Usage

Production API Call

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"