curl --request POST \
--url https://api.clinikehr.com/v1/clinics/{clinic_id}/insurance/pre-authorizations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"insurance_company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"items": [
{
"description": "<string>",
"unit_cost": 1,
"item_type": "service",
"tariff_code": "<string>",
"quantity": 1,
"diagnosis": "<string>",
"icd_cpt_code": "<string>",
"medical_necessity": "<string>"
}
],
"enrollee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"priority_level": "routine",
"encounter_date": "2023-11-07T05:31:56Z",
"diagnoses": [
{
"icd_code": "<string>",
"name": "<string>",
"is_primary": true
}
]
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
patient_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
insurance_company_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
items: [
{
description: '<string>',
unit_cost: 1,
item_type: 'service',
tariff_code: '<string>',
quantity: 1,
diagnosis: '<string>',
icd_cpt_code: '<string>',
medical_necessity: '<string>'
}
],
enrollee_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
priority_level: 'routine',
encounter_date: '2023-11-07T05:31:56Z',
diagnoses: [{icd_code: '<string>', name: '<string>', is_primary: true}]
})
};
fetch('https://api.clinikehr.com/v1/clinics/{clinic_id}/insurance/pre-authorizations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.clinikehr.com/v1/clinics/{clinic_id}/insurance/pre-authorizations"
payload = {
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"insurance_company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"items": [
{
"description": "<string>",
"unit_cost": 1,
"item_type": "service",
"tariff_code": "<string>",
"quantity": 1,
"diagnosis": "<string>",
"icd_cpt_code": "<string>",
"medical_necessity": "<string>"
}
],
"enrollee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"priority_level": "routine",
"encounter_date": "2023-11-07T05:31:56Z",
"diagnoses": [
{
"icd_code": "<string>",
"name": "<string>",
"is_primary": True
}
]
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"request_number": "<string>",
"insurance_company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "draft",
"insurance_plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enrollee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"encounter_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"request_type": "service",
"priority_level": "routine",
"estimated_cost": 123,
"approved_amount": 123,
"pa_code": "<string>",
"pr_code": "<string>",
"is_approved": true,
"is_handled": true,
"handled_at": "2023-11-07T05:31:56Z",
"rejection_reason": "<string>",
"encounter_date": "2023-11-07T05:31:56Z",
"admission_start": "2023-11-07T05:31:56Z",
"admission_end": "2023-11-07T05:31:56Z",
"is_floating": true,
"submitted_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"item_type": "<string>",
"description": "<string>",
"tariff_code": "<string>",
"quantity": 123,
"unit_cost": 123,
"total_cost": 123,
"diagnosis": "<string>",
"icd_cpt_code": "<string>",
"medical_necessity": "<string>",
"approval_status": "<string>",
"is_approved": true,
"reject_reason": "<string>"
}
],
"diagnoses": [
{
"icd_code": "<string>",
"name": "<string>",
"is_primary": true
}
]
},
"idempotent_replay": true
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}Send a pre-authorization request
Permission: insurance.pa:submit
Send a pre-authorization request to one of the clinic’s insurers.
For a clinic-owned key, or an organization with NO insurer link. Saved as sent_for_authorization; answers 201 with the request. The Idempotency-Key header is REQUIRED.
curl --request POST \
--url https://api.clinikehr.com/v1/clinics/{clinic_id}/insurance/pre-authorizations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"insurance_company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"items": [
{
"description": "<string>",
"unit_cost": 1,
"item_type": "service",
"tariff_code": "<string>",
"quantity": 1,
"diagnosis": "<string>",
"icd_cpt_code": "<string>",
"medical_necessity": "<string>"
}
],
"enrollee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"priority_level": "routine",
"encounter_date": "2023-11-07T05:31:56Z",
"diagnoses": [
{
"icd_code": "<string>",
"name": "<string>",
"is_primary": true
}
]
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
patient_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
insurance_company_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
items: [
{
description: '<string>',
unit_cost: 1,
item_type: 'service',
tariff_code: '<string>',
quantity: 1,
diagnosis: '<string>',
icd_cpt_code: '<string>',
medical_necessity: '<string>'
}
],
enrollee_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
priority_level: 'routine',
encounter_date: '2023-11-07T05:31:56Z',
diagnoses: [{icd_code: '<string>', name: '<string>', is_primary: true}]
})
};
fetch('https://api.clinikehr.com/v1/clinics/{clinic_id}/insurance/pre-authorizations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.clinikehr.com/v1/clinics/{clinic_id}/insurance/pre-authorizations"
payload = {
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"insurance_company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"items": [
{
"description": "<string>",
"unit_cost": 1,
"item_type": "service",
"tariff_code": "<string>",
"quantity": 1,
"diagnosis": "<string>",
"icd_cpt_code": "<string>",
"medical_necessity": "<string>"
}
],
"enrollee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"priority_level": "routine",
"encounter_date": "2023-11-07T05:31:56Z",
"diagnoses": [
{
"icd_code": "<string>",
"name": "<string>",
"is_primary": True
}
]
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"request_number": "<string>",
"insurance_company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "draft",
"insurance_plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enrollee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"encounter_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"request_type": "service",
"priority_level": "routine",
"estimated_cost": 123,
"approved_amount": 123,
"pa_code": "<string>",
"pr_code": "<string>",
"is_approved": true,
"is_handled": true,
"handled_at": "2023-11-07T05:31:56Z",
"rejection_reason": "<string>",
"encounter_date": "2023-11-07T05:31:56Z",
"admission_start": "2023-11-07T05:31:56Z",
"admission_end": "2023-11-07T05:31:56Z",
"is_floating": true,
"submitted_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"item_type": "<string>",
"description": "<string>",
"tariff_code": "<string>",
"quantity": 123,
"unit_cost": 123,
"total_cost": 123,
"diagnosis": "<string>",
"icd_cpt_code": "<string>",
"medical_necessity": "<string>",
"approval_status": "<string>",
"is_approved": true,
"reject_reason": "<string>"
}
],
"diagnoses": [
{
"icd_code": "<string>",
"name": "<string>",
"is_primary": true
}
]
},
"idempotent_replay": true
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
A unique value you choose for this request, such as a UUID. Sending the same key again returns the first answer instead of doing the work twice, so a timed-out request is safe to retry. Reusing a key for a different request is refused with 409 idempotency_key_conflict, and retrying while the first request is still running with 409 idempotency_key_reused. See Retries and idempotency.
1Path Parameters
Body
A pre-authorization request to send to one of the clinic's insurers. It is saved as sent_for_authorization. patient_id must be a patient your organization is linked to.
service, procedure, medication, equipment, hospitalization, consultation, lab_test 1 - 200 elementsShow child attributes
Show child attributes
routine, urgent, emergency 20Show child attributes
Show child attributes
Response
Created - sent for authorization.
A pre-authorization request the clinic sent to an insurer. status is sent_for_authorization until the insurer decides, then approved or denied (with pa_code on approval). items and diagnoses are on the single read only.
Show child attributes
Show child attributes
Present and true when this Idempotency-Key was already used and the original answer is returned.