Skip to main content

Network

The Network module allows you to create and manage medical networks. Networks group medical providers together and can be associated with insurance policies to define which providers are eligible to serve members under a given plan.

Base URL

https://api.{client_namespace}.najeeb.ai/v4.0/health

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

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.

API Endpoints

Create Network

POST /network/create

Create a new medical network.

Request Headers

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

Request Body Parameters

ParameterTypeRequiredDescriptionAccepted Values
name *stringYesThe name of the network. Must be unique.String, 1-255 characters
is_vipbooleanNoWhether this network is designated as VIP.true, false (default: false)

Response

Success Response (201 Created)
{
"internal_id": 1,
"name": "City General Hospital Network",
"is_vip": false,
"code": 201,
"message": "Network created successfully"
}
Response Fields
FieldTypeDescription
internal_idintegerThe unique identifier of the created network
namestringThe name of the network
is_vipbooleanVIP status of the network
codeintegerHTTP status code (201)
messagestringHuman-readable success message

Error Responses

Error Response Structure
{
"ErrorCode": "string",
"message": "string",
"details": ["string"]
}
Error Codes
Error CodeHTTP StatusDescription
E_BAD_REQUEST_400400Request validation failed -- the request body is malformed or missing required fields
401 Unauthorized401Missing or invalid access-key
E_CONFLICT_409409A network with the same name already exists
Example Error Responses

Bad Request:

{
"ErrorCode": "E_BAD_REQUEST_400",
"message": "Bad request",
"details": [
"name must be a string",
"name should not be empty"
]
}

Unauthorized:

{
"ErrorCode": "API key is required",
"message": "Unauthorized",
"details": []
}

Conflict:

{
"ErrorCode": "E_CONFLICT_409",
"message": "A network with this name already exists",
"details": []
}

Code Examples

curl -X POST "https://api.{client_namespace}.najeeb.ai/v4.0/health/network/create" \
-H "access-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "City General Hospital Network",
"is_vip": false
}'

Update Network

PATCH /network/update/:id

Update an existing network by its ID. You can modify the network name, VIP status, or both.

important

At least one field (name or is_vip) must be provided in the request body.

Request Headers

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

Path Parameters

ParameterTypeRequiredDescriptionAccepted Values
id *integerYesThe unique identifier of the networkPositive integer

Request Body Parameters

ParameterTypeRequiredDescriptionAccepted Values
namestringNoThe updated name of the network. Must be unique.String, 1-255 characters
is_vipbooleanNoThe updated VIP status of the network.true, false

Response

Success Response (200 OK)
{
"id": 1,
"name": "Updated Network Name",
"is_vip": true,
"code": 200,
"message": "Network updated successfully"
}
Response Fields
FieldTypeDescription
idintegerThe unique identifier of the network
namestringThe updated name of the network
is_vipbooleanThe updated VIP status of the network
codeintegerHTTP status code (200)
messagestringHuman-readable success message

Error Responses

Error Response Structure
{
"ErrorCode": "string",
"message": "string",
"details": ["string"]
}
Error Codes
Error CodeHTTP StatusDescription
E_BAD_REQUEST_400400Request validation failed -- the request body is malformed or contains invalid data
401 Unauthorized401Missing or invalid access-key
E_NOT_FOUND_404404No network exists with the specified id
E_CONFLICT_409409A network with the same name already exists
Example Error Responses

Bad Request:

{
"ErrorCode": "E_BAD_REQUEST_400",
"message": "Bad request",
"details": [
"At least one field (name or is_vip) must be provided"
]
}

Unauthorized:

{
"ErrorCode": "API key is required",
"message": "Unauthorized",
"details": []
}

Not Found:

{
"ErrorCode": "E_NOT_FOUND_404",
"message": "Network not found",
"details": []
}

Conflict:

{
"ErrorCode": "E_CONFLICT_409",
"message": "A network with this name already exists",
"details": []
}

Code Examples

curl -X PATCH "https://api.{client_namespace}.najeeb.ai/v4.0/health/network/update/1" \
-H "access-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Updated Network Name",
"is_vip": true
}'

Find All Networks

GET /network/find-all

Retrieve a paginated list of networks with optional filtering by name and VIP status.

Request Headers

HeaderTypeRequiredDescription
access-keystringYesAPI key for authentication

Query Parameters

ParameterTypeRequiredDescriptionAccepted Values
namestringNoFilter by network name (case-insensitive partial match).String
is_vipbooleanNoFilter by VIP status.true, false
limit *numberYesNumber of records per page.Integer, 1-100 (default: 10)
skip *numberYesNumber of records to skip (offset).Integer, minimum 0 (default: 0)

Response

Success Response (200 OK)
{
"total_count": 25,
"code": 200,
"message": "Networks found successfully",
"data": [
{
"id": 1,
"name": "City General Hospital Network",
"is_vip": false
},
{
"id": 2,
"name": "Premium Care VIP Network",
"is_vip": true
}
]
}
Response Fields
FieldTypeDescription
total_countintegerTotal number of networks matching the filters
codeintegerHTTP status code (200)
messagestringHuman-readable success message
dataarrayArray of network objects
data[].idintegerThe unique identifier of the network
data[].namestringThe name of the network
data[].is_vipbooleanVIP status of the network

Error Responses

Error Response Structure
{
"ErrorCode": "string",
"message": "string",
"details": ["string"]
}
Error Codes
Error CodeHTTP StatusDescription
E_BAD_REQUEST_400400Request validation failed -- invalid query parameters (e.g., limit out of range)
401 Unauthorized401Missing or invalid access-key
Example Error Responses

Bad Request:

{
"ErrorCode": "E_BAD_REQUEST_400",
"message": "Bad request",
"details": [
"limit must not be greater than 100",
"skip must not be less than 0"
]
}

Unauthorized:

{
"ErrorCode": "API key is required",
"message": "Unauthorized",
"details": []
}

Code Examples

# Fetch the first page of all networks
curl -X GET "https://api.{client_namespace}.najeeb.ai/v4.0/health/network/find-all?limit=10&skip=0" \
-H "access-key: YOUR_API_KEY"

# Filter by name and VIP status
curl -X GET "https://api.{client_namespace}.najeeb.ai/v4.0/health/network/find-all?name=city&is_vip=false&limit=10&skip=0" \
-H "access-key: YOUR_API_KEY"