Full API for Prior Authorization
The Prior Authorization module provides endpoints for creating, retrieving, updating, and managing pre-authorization (pre-auth) requests. It serves as the core transactional interface for submitting healthcare service requests for adjudication by the Najeeb AI Engine.
This module handles the full lifecycle of a prior authorization: creation, status retrieval, bundle synchronization, status updates, reopening, and cancellation.
Base URL
https://api.{client_namespace}.najeeb.ai/v4.0/health
Authentication
All API requests are authenticated using an API key passed in a dedicated header:
For access key provisioning, please contact Najeeb support.
Replace {client_namespace} with your organization's assigned namespace.
Authentication
All endpoints require the access-key header for authentication. Requests must be made over HTTPS.
Header Type Required Description access-keystring Yes Your unique API key for authentication Content-Typestring Yes Must be application/json
Keep your API key confidential. Do not expose it in client-side code, public repositories, or insecure channels. If you suspect your key has been compromised, contact the Najeeb support team immediately to rotate it.
Endpoints
1. Update Prior Authorization
PATCH /approval-request/update/:transaction_id
Updates the status and item-level decisions of an existing prior authorization. This endpoint is used by reviewers to approve, partially approve, reject, or refer a prior authorization.
This API is essential for the Prior Authorization workflow. You must call this endpoint to update the authorization status so the service accepts it and records it in the transaction history. Without calling this API, the prior authorization will remain in a pending state and will not be reflected in the historical records.
Path Parameters
Parameter Type Required Description transaction_idstring Yes The unique transaction ID of the prior authorization
Request Body Parameters
Root Level Parameters
Parameter Type Required Description Accepted Values status * string Yes New status of the prior authorization Enum: ACCEPTED, PARTIALLY_ACCEPTED, REJECTED, REFERRED erp_reviewer_id * string Yes Username of the reviewer performing the update String approval_remarksstring No Remarks from the reviewer Free text refferal_remarksstring No Remarks for referral (applicable when status is REFERRED) Free text internal_referral_notesstring No Internal notes for referral Free text internal_notesstring No Internal notes Free text referral_cchi_codestring Conditional CCHI code for referral provider. Required when status is REFERRED Alphanumeric string referral_valid_daysnumber No Number of days the referral is valid Integer, 1-365 itemsarray No Array of item-level updates See Update Item Object
Update Item Object
Parameter Type Required Description Accepted Values statusstring No Item-level status Enum: ACCEPTED, REJECTED approved_quantitynumber No Approved quantity for the item Integer, minimum 0 approved_amountnumber No Approved amount for the item Decimal, minimum 0 erp_item_idstring No ERP item identifier Alphanumeric string reasonsarray No Array of rejection reason objects See below
When the status is set to REFERRED, the referral_cchi_code field is required. Omitting it will result in a 422 Unprocessable Entity error.
Example Request
curl -X PATCH "https://api.{client_namespace}.najeeb.ai/v4.0/health/approval-request/update/550e8400-e29b-41d4-a716-446655440000" \ -H "access-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "status": "PARTIALLY_ACCEPTED", "erp_reviewer_id": "reviewer.username", "approval_remarks": "Partially approved - adjusted quantities", "items": [ { "erp_item_id": "ITEM-001", "status": "ACCEPTED", "approved_quantity": 30, "approved_amount": 150.00 }, { "erp_item_id": "ITEM-002", "status": "REJECTED", "approved_quantity": 0, "reasons": [ { "code": "REJ-001", "message": "Service not covered under current benefit plan" } ] } ] }' const response = await fetch ( 'https://api.{client_namespace}.najeeb.ai/v4.0/health/approval-request/update/550e8400-e29b-41d4-a716-446655440000' , { method : 'PATCH' , headers : { 'access-key' : 'YOUR_API_KEY' , 'Content-Type' : 'application/json' , } , body : JSON . stringify ( { status : 'PARTIALLY_ACCEPTED' , erp_reviewer_id : 'reviewer.username' , approval_remarks : 'Partially approved - adjusted quantities' , items : [ { erp_item_id : 'ITEM-001' , status : 'ACCEPTED' , approved_quantity : 30 , approved_amount : 150.0 , } , { erp_item_id : 'ITEM-002' , status : 'REJECTED' , approved_quantity : 0 , reasons : [ { code : 'REJ-001' , message : 'Service not covered under current benefit plan' , } , ] , } , ] , } ) , } ) ; const result = await response . json ( ) ; console . log ( result ) ; import requests response = requests . patch ( 'https://api.{client_namespace}.najeeb.ai/v4.0/health/approval-request/update/550e8400-e29b-41d4-a716-446655440000' , headers = { 'access-key' : 'YOUR_API_KEY' , 'Content-Type' : 'application/json' , } , json = { 'status' : 'PARTIALLY_ACCEPTED' , 'erp_reviewer_id' : 'reviewer.username' , 'approval_remarks' : 'Partially approved - adjusted quantities' , 'items' : [ { 'erp_item_id' : 'ITEM-001' , 'status' : 'ACCEPTED' , 'approved_quantity' : 30 , 'approved_amount' : 150.00 , } , { 'erp_item_id' : 'ITEM-002' , 'status' : 'REJECTED' , 'approved_quantity' : 0 , 'reasons' : [ { 'code' : 'REJ-001' , 'message' : 'Service not covered under current benefit plan' , } , ] , } , ] , } , ) result = response . json ( ) print ( result )
Success Response (200 OK)
{ "message" : "Prior authorization updated successfully" }
Error Responses
HTTP Status Error Code Description 400E_BAD_REQUEST_400Request validation failed 404E_EPA_09Prior authorization not found 404E_EPA_10User not found for the given erp_reviewer_id 404E_EPA_11Item not found 404E_EPA_12Benefit not found for item 404E_EPA_13Sub-benefit not found for item 404E_EPA_14Rejection reason not found 422E_EPA_15Status transition not allowed 422E_EPA_16Referral CCHI code is required when status is REFERRED
2. Create Prior Authorization
API Endpoint
POST /approval-request/create
Creates a new prior authorization. The request is validated, processed by the Najeeb AI Engine, and an acknowledgement is returned synchronously.
For the full request payload, field definitions, and examples, see:
When Policy Sync Is Not Required
If your client does not need policy validation or synchronized policy/member data, use Prior Authorization / Lightweight . The Lightweight flow does not require syncing policy holders, policies, or members before submission.
3. Get One Prior Authorization
GET /approval-request/get-one/:transaction_id
Retrieves a single prior authorization by its transaction_id. Returns the full prior authorization details including status, items, and adjudication results.
Path Parameters
Parameter Type Required Description transaction_idstring Yes The unique transaction ID of the prior authorization
Example Request
curl -X GET "https://api.{client_namespace}.najeeb.ai/v4.0/health/approval-request/get-one/550e8400-e29b-41d4-a716-446655440000" \ -H "access-key: YOUR_API_KEY" \ -H "Content-Type: application/json" const response = await fetch ( 'https://api.{client_namespace}.najeeb.ai/v4.0/health/approval-request/get-one/550e8400-e29b-41d4-a716-446655440000' , { method : 'GET' , headers : { 'access-key' : 'YOUR_API_KEY' , 'Content-Type' : 'application/json' , } , } ) ; const result = await response . json ( ) ; console . log ( result ) ; import requests response = requests . get ( 'https://api.{client_namespace}.najeeb.ai/v4.0/health/approval-request/get-one/550e8400-e29b-41d4-a716-446655440000' , headers = { 'access-key' : 'YOUR_API_KEY' , 'Content-Type' : 'application/json' , } , ) result = response . json ( ) print ( result )
Success Response (200 OK)
Returns the full prior authorization object including all submitted fields, current status, item-level decisions, and processing metadata.
Error Responses
HTTP Status Error Code Description 404E_EPA_09Prior authorization not found for the given transaction_id
Example Error Response
{ "ErrorCode" : "E_EPA_09" , "message" : "Prior authorization not found" , "details" : [ ] }
4. Sync Bundle
PATCH /approval-request/bundle/sync/:transaction_id
Synchronizes an NPHIES response bundle with an existing prior authorization. Use this endpoint to update the prior authorization with the NPHIES response data after receiving a bundle from the NPHIES platform.
Path Parameters
Parameter Type Required Description transaction_idstring Yes The unique transaction ID of the prior authorization
Request Body Parameters
Parameter Type Required Description Accepted Values response_bundle_id * string Yes The NPHIES response bundle ID Alphanumeric string, max 255 characters response_bundle_status * string Yes Status of the NPHIES response bundle Enum: COMPLETED, PENDING, PROCESSING, REFERRED response_bundle_date * string Yes Date of the NPHIES response bundle ISO 8601 format: YYYY-MM-DDTHH:mm:ss.sssZ
Example Request
curl -X PATCH "https://api.{client_namespace}.najeeb.ai/v4.0/health/approval-request/bundle/sync/550e8400-e29b-41d4-a716-446655440000" \ -H "access-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "response_bundle_id": "BUNDLE-12345", "response_bundle_status": "COMPLETED", "response_bundle_date": "2025-02-15T12:00:00.000Z" }' const response = await fetch ( 'https://api.{client_namespace}.najeeb.ai/v4.0/health/approval-request/bundle/sync/550e8400-e29b-41d4-a716-446655440000' , { method : 'PATCH' , headers : { 'access-key' : 'YOUR_API_KEY' , 'Content-Type' : 'application/json' , } , body : JSON . stringify ( { response_bundle_id : 'BUNDLE-12345' , response_bundle_status : 'COMPLETED' , response_bundle_date : '2025-02-15T12:00:00.000Z' , } ) , } ) ; const result = await response . json ( ) ; console . log ( result ) ; import requests response = requests . patch ( 'https://api.{client_namespace}.najeeb.ai/v4.0/health/approval-request/bundle/sync/550e8400-e29b-41d4-a716-446655440000' , headers = { 'access-key' : 'YOUR_API_KEY' , 'Content-Type' : 'application/json' , } , json = { 'response_bundle_id' : 'BUNDLE-12345' , 'response_bundle_status' : 'COMPLETED' , 'response_bundle_date' : '2025-02-15T12:00:00.000Z' , } , ) result = response . json ( ) print ( result )
Success Response (200 OK)
{ "message" : "Bundle synced successfully" }
Error Responses
HTTP Status Error Code Description 400E_BAD_REQUEST_400Request validation failed 404E_EPA_09Prior authorization not found for the given transaction_id
5. Reopen Prior Authorization
PATCH /approval-request/reopen/:transaction_id
Reopens a previously processed prior authorization. This allows a prior authorization that has been completed (approved, rejected, etc.) to be sent back for reprocessing.
Path Parameters
Parameter Type Required Description transaction_idstring Yes The unique transaction ID of the prior authorization
Request Body Parameters
Parameter Type Required Description Accepted Values nphies_reopen_reason * string Yes Reason for reopening the prior authorization Enum: CORRECTION, ADJUDICATION, MISCALCULATION, BENEFIT, AUDIT, CANCEL, OTHER nphies_reopen_at * string Yes Date and time of the reopen action ISO 8601 format: YYYY-MM-DDTHH:mm:ss.sssZ username * string Yes Username of the user who reopened the request String
Example Request
curl -X PATCH "https://api.{client_namespace}.najeeb.ai/v4.0/health/approval-request/reopen/550e8400-e29b-41d4-a716-446655440000" \ -H "access-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "nphies_reopen_reason": "CORRECTION", "nphies_reopen_at": "2025-02-16T09:00:00.000Z", "username": "admin.user" }' const response = await fetch ( 'https://api.{client_namespace}.najeeb.ai/v4.0/health/approval-request/reopen/550e8400-e29b-41d4-a716-446655440000' , { method : 'PATCH' , headers : { 'access-key' : 'YOUR_API_KEY' , 'Content-Type' : 'application/json' , } , body : JSON . stringify ( { nphies_reopen_reason : 'CORRECTION' , nphies_reopen_at : '2025-02-16T09:00:00.000Z' , username : 'admin.user' , } ) , } ) ; const result = await response . json ( ) ; console . log ( result ) ; import requests response = requests . patch ( 'https://api.{client_namespace}.najeeb.ai/v4.0/health/approval-request/reopen/550e8400-e29b-41d4-a716-446655440000' , headers = { 'access-key' : 'YOUR_API_KEY' , 'Content-Type' : 'application/json' , } , json = { 'nphies_reopen_reason' : 'CORRECTION' , 'nphies_reopen_at' : '2025-02-16T09:00:00.000Z' , 'username' : 'admin.user' , } , ) result = response . json ( ) print ( result )
Success Response (200 OK)
{ "message" : "Prior authorization reopened successfully" }
Error Responses
HTTP Status Error Code Description 400E_BAD_REQUEST_400Request validation failed 404E_EPA_10User not found for the given username 404E_EPA_09Prior authorization not found for the given transaction_id
6. Cancel Prior Authorization
PATCH /approval-request/cancel/:transaction_id
Cancels a pre-authorization request. Once cancelled, the prior authorization cannot be processed further.
Path Parameters
Parameter Type Required Description transaction_idstring Yes The unique transaction ID of the prior authorization to cancel
Example Request
curl -X PATCH "https://api.{client_namespace}.najeeb.ai/v4.0/health/approval-request/cancel/550e8400-e29b-41d4-a716-446655440000" \ -H "access-key: YOUR_API_KEY" \ -H "Content-Type: application/json" const response = await fetch ( 'https://api.{client_namespace}.najeeb.ai/v4.0/health/approval-request/cancel/550e8400-e29b-41d4-a716-446655440000' , { method : 'PATCH' , headers : { 'access-key' : 'YOUR_API_KEY' , 'Content-Type' : 'application/json' , } , } ) ; const result = await response . json ( ) ; console . log ( result ) ; import requests response = requests . patch ( 'https://api.{client_namespace}.najeeb.ai/v4.0/health/approval-request/cancel/550e8400-e29b-41d4-a716-446655440000' , headers = { 'access-key' : 'YOUR_API_KEY' , 'Content-Type' : 'application/json' , } , ) result = response . json ( ) print ( result )
Success Response (200 OK)
{ "message" : "Pre auth cancelled successfully" }
Error Responses
HTTP Status Error Code Description 404E_EPA_09Prior authorization not found for the given transaction_id 409E_EPA_17Pre-authorization has already been cancelled
Enums Reference
Member Gender
Value Description MALEMale FEMALEFemale
Marital Status
Value Description SINGLESingle MARRIEDMarried ENGAGEDEngaged UNKNOWNUnknown WIDOWEDWidowed DIVORCEDDivorced SEPARATEDSeparated
Claim Type
Value Description INSTITUTIONALInstitutional services for inpatients PROFESSIONALProfessional services for outpatients PHARMACYPharmacy services DENTALDental services OPTICALOptical services
Claim Sub-Type
Value Description IN_PATIENTInpatient services OUT_PATIENTOutpatient services EMERGENCYEmergency services
Prior Authorization Status
Value Description ACCEPTEDFully approved PARTIALLY_ACCEPTEDPartially approved with item-level adjustments REJECTEDRejected REFERREDReferred to another provider or specialist
Advanced Prior Authorization Status
Value Description ACCEPTEDAdvanced prior authorization accepted REJECTEDAdvanced prior authorization rejected
Response Bundle Status
Value Description COMPLETEDBundle processing completed PENDINGBundle is pending processing PROCESSINGBundle is currently being processed REFERREDBundle has been referred
Diagnosis Type
Value Description primaryPrimary diagnosis secondarySecondary diagnosis
Member -- Managing patients and member records
Medical Provider -- Managing medical providers
Policy -- Policy management and benefit templates
Supporting Info -- Attaching supporting documents to prior authorizations
Communication -- Creating communications related to prior authorizations
Webhook -- Registering webhooks for event notifications