إنتقل إلى المحتوى الرئيسي

Member (Patient)

The Member module provides endpoints for registering and managing members (patients) within the Najeeb system. Members represent the insured individuals who receive healthcare services. Each member must be associated with a Policy to be eligible for pre-authorization and claims processing.

Base URL

https://api.{client_namespace}.najeeb.ai/v4.0/health
معلومات

Replace {client_namespace} with your organization's assigned namespace provided during onboarding.

Authentication

All API requests are authenticated using an API key passed in a dedicated header:

access-key: YOUR_API_KEY

For access key provisioning, please contact Najeeb support.

Create Member

Register a new member (patient) in the Najeeb system.

POST /member/create

Request Headers

HeaderTypeRequiredDescription
access-keystringYesAPI key for authentication
Content-TypestringYesMust be application/json

Request Body Parameters

ParameterTypeRequiredDescriptionAccepted Values
member_id *stringYesUnique identifier for the memberAlphanumeric string, 1-255 characters
national_id *stringYesNational ID of the memberAlphanumeric string, 1-255 characters
gender *stringYesGender of the memberEnum: MALE, FEMALE
marital_status *stringYesMarital status of the memberEnum: SINGLE, MARRIED, ENGAGED, UNKNOWN, WIDOWED, DIVORCED, SEPARATED
date_of_birth *stringYesDate of birth of the memberISO 8601 format: YYYY-MM-DDTHH:mm:ss.sssZ
namestringNoFull name of the memberString, 1-255 characters
cardstringNoInsurance card numberString, 1-255 characters
emailstringNoEmail address of the memberValid email format, max 255 characters
relationstringNoRelation to the primary subscriberEnum: SELF, FATHER, MOTHER, SON, DAUGHTER, SISTER, HUSBAND, WIFE, WIFE_WITHOUT_MATERNITY, MOTHER_MB, SENIOR_EMPLOYEE, FEMALE_EMPLOYEE_WITH_MAT, CHILD, SPOUSE, EMPLOYEE, OTHER
passportstringNoPassport numberString, 1-255 characters
visit_visa_numberstringNoVisit visa numberString, 1-255 characters
phone_numberstringNoPhone number of the memberString, 1-255 characters
addressstringNoResidential addressString, 1-255 characters
nationalitystringNoNationality of the memberString, 1-255 characters

Response

Success Response (201 Created)

{
"member_id": "12345",
"name": "Alaa",
"code": 201,
"message": "Created successfully"
}
Response Fields
FieldTypeDescription
member_idstringThe unique identifier of the created member
namestringThe full name of the member
codenumberHTTP status code (201)
messagestringSuccess message

Error Responses

Error Response Structure

{
"ErrorCode": "string",
"message": "string",
"details": ["string"]
}

Error Codes

Error CodeHTTP StatusDescription
VALIDATION_ERROR400Request validation failed — see the details array for field-level errors
UNAUTHORIZED401Missing or invalid access-key
CONFLICT409A member with the same identifier already exists
Example Error Responses

Bad Request:

{
"ErrorCode": "VALIDATION_ERROR",
"message": "Validation failed",
"details": ["member_id is required", "gender must be one of: MALE, FEMALE"]
}

Unauthorized:

{
"ErrorCode": "UNAUTHORIZED",
"message": "Invalid or missing API key",
"details": []
}

Conflict:

{
"ErrorCode": "CONFLICT",
"message": "Patient already exists",
"details": ["A member with member_id '12345' already exists"]
}

Code Examples

curl -X POST "https://api.{client_namespace}.najeeb.ai/v4.0/health/member/create" \
-H "access-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"member_id": "12345",
"national_id": "1234567890",
"gender": "MALE",
"marital_status": "SINGLE",
"date_of_birth": "1990-05-20T00:00:00.000Z",
"name": "Alaa",
"card": "CARD-001",
"email": "alaa@example.com",
"relation": "SELF",
"phone_number": "+966500000000",
"address": "Riyadh, KSA",
"nationality": "SA"
}'

Update Member

Update an existing member's information. Only the fields provided in the request body will be updated; all other fields remain unchanged.

PATCH /:member_id

Request Headers

HeaderTypeRequiredDescription
access-keystringYesAPI key for authentication
Content-TypestringYesMust be application/json

Path Parameters

ParameterTypeRequiredDescriptionAccepted Values
member_id *stringYesThe unique identifier of the member to updateAlphanumeric string, 1-255 characters

Request Body Parameters

All fields are optional. Only include the fields you want to update.

ParameterTypeRequiredDescriptionAccepted Values
member_idstringNoUnique identifier for the memberAlphanumeric string, 1-255 characters
national_idstringNoNational ID of the memberAlphanumeric string, 1-255 characters
genderstringNoGender of the memberEnum: MALE, FEMALE
marital_statusstringNoMarital status of the memberEnum: SINGLE, MARRIED, ENGAGED, UNKNOWN, WIDOWED, DIVORCED, SEPARATED
date_of_birthstringNoDate of birth of the memberISO 8601 format: YYYY-MM-DDTHH:mm:ss.sssZ
namestringNoFull name of the memberString, 1-255 characters
cardstringNoInsurance card numberString, 1-255 characters
emailstringNoEmail address of the memberValid email format, max 255 characters
relationstringNoRelation to the primary subscriberEnum: SELF, FATHER, MOTHER, SON, DAUGHTER, SISTER, HUSBAND, WIFE, WIFE_WITHOUT_MATERNITY, MOTHER_MB, SENIOR_EMPLOYEE, FEMALE_EMPLOYEE_WITH_MAT, CHILD, SPOUSE, EMPLOYEE, OTHER
passportstringNoPassport numberString, 1-255 characters
visit_visa_numberstringNoVisit visa numberString, 1-255 characters
phone_numberstringNoPhone number of the memberString, 1-255 characters
addressstringNoResidential addressString, 1-255 characters
nationalitystringNoNationality of the memberString, 1-255 characters

Response

Success Response (200 OK)

{
"member_id": "12345",
"national_id": "1234567890",
"gender": "MALE",
"marital_status": "MARRIED",
"date_of_birth": "1990-05-20T00:00:00.000Z",
"name": "Alaa Updated",
"card": "CARD-001",
"email": "alaa.updated@example.com",
"relation": "SELF",
"phone_number": "+966511111111",
"address": "Riyadh, KSA",
"nationality": "SA",
"code": 200,
"message": "Updated successfully"
}
Response Fields
FieldTypeDescription
member_idstringThe unique identifier of the member
national_idstringNational ID of the member
genderstringGender of the member
marital_statusstringMarital status of the member
date_of_birthstringDate of birth in ISO 8601 format
namestringFull name of the member
cardstringInsurance card number
emailstringEmail address of the member
relationstringRelation to the primary subscriber
phone_numberstringPhone number of the member
addressstringResidential address
nationalitystringNationality of the member
codenumberHTTP status code (200)
messagestringSuccess message

Error Responses

Error Response Structure

{
"ErrorCode": "string",
"message": "string",
"details": ["string"]
}

Error Codes

Error CodeHTTP StatusDescription
VALIDATION_ERROR400Request validation failed — see the details array for field-level errors
UNAUTHORIZED401Missing or invalid access-key
NOT_FOUND404No member found with the specified member_id
Example Error Responses

Bad Request:

{
"ErrorCode": "VALIDATION_ERROR",
"message": "Validation failed",
"details": ["gender must be one of: MALE, FEMALE"]
}

Unauthorized:

{
"ErrorCode": "UNAUTHORIZED",
"message": "Invalid or missing API key",
"details": []
}

Not Found:

{
"ErrorCode": "NOT_FOUND",
"message": "Member not found",
"details": ["No member found with member_id '99999'"]
}

Code Examples

curl -X PATCH "https://api.{client_namespace}.najeeb.ai/v4.0/health/member/12345" \
-H "access-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Alaa Updated",
"email": "alaa.updated@example.com",
"phone_number": "+966511111111",
"marital_status": "MARRIED"
}'