Health Declaration
Submit health declarations for members. Health declarations capture medical history statements and disclosures that are linked to a specific Member, policy holder, and insurance policy.
Base URL:
https://api.{client_namespace}.najeeb.ai/v4.0/health/health-declarations
Create Health Declaration
POST /create
Submit a health declaration for a member. The system validates that the referenced member, policy holder, and insurance policy all exist before creating the declaration.
Request Body
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
member_id * | string | Yes | 1-255 chars | UUID of the member (patient) this declaration belongs to |
erp_ph_id * | string | Yes | 1-255 chars | ERP code of the policy holder |
policy_no * | string | Yes | 1-255 chars | Policy number of the insurance policy |
health_declaration_caption | string | No | 1-4096 chars | Primary caption or question text of the declaration |
health_declaration_caption2 | string | No | 1-4096 chars | Secondary caption or question text |
health_declaration_type * | string | Yes | 1-16 chars | Type or category of the health declaration |
health_declaration_value | string | No | 1-16 chars | The member's response or value for the declaration |
Request Example
- cURL
- JavaScript
- Python
curl -X POST \
"https://api.{client_namespace}.najeeb.ai/v4.0/health/health-declarations/create" \
-H "access-key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"member_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"erp_ph_id": "PH-001",
"policy_no": "POL-2025-00123",
"health_declaration_caption": "Do you have any pre-existing medical conditions?",
"health_declaration_caption2": "هل لديك أي حالات طبية سابقة؟",
"health_declaration_type": "BOOLEAN",
"health_declaration_value": "YES"
}'
const response = await fetch(
"https://api.{client_namespace}.najeeb.ai/v4.0/health/health-declarations/create",
{
method: "POST",
headers: {
"access-key": "your-api-key-here",
"Content-Type": "application/json",
},
body: JSON.stringify({
member_id: "f47ac10b-58cc-4372-a567-0e02b2c3d479",
erp_ph_id: "PH-001",
policy_no: "POL-2025-00123",
health_declaration_caption: "Do you have any pre-existing medical conditions?",
health_declaration_caption2: "هل لديك أي حالات طبية سابقة؟",
health_declaration_type: "BOOLEAN",
health_declaration_value: "YES",
}),
}
);
const data = await response.json();
console.log(data);
import requests
url = "https://api.{client_namespace}.najeeb.ai/v4.0/health/health-declarations/create"
payload = {
"member_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"erp_ph_id": "PH-001",
"policy_no": "POL-2025-00123",
"health_declaration_caption": "Do you have any pre-existing medical conditions?",
"health_declaration_caption2": "هل لديك أي حالات طبية سابقة؟",
"health_declaration_type": "BOOLEAN",
"health_declaration_value": "YES",
}
headers = {
"access-key": "your-api-key-here",
"Content-Type": "application/json",
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
Response
201 Created
{
"health_declaration_internal_id": 42,
"code": 201,
"message": "Health declaration created successfully"
}
Error Responses
| Status | Description |
|---|---|
| 400 | Bad Request - Invalid or missing required fields. Check the details array for specifics |
| 401 | Unauthorized - Missing or invalid access-key header |
| 404 | Not Found - Member, policy holder, or insurance policy not found |