curl --request POST \
--url https://api.clinikehr.com/v1/clinics/{clinic_id}/insurance/claims \
--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",
"service_date_from": "2023-11-07T05:31:56Z",
"items": [
{
"description": "<string>",
"unit_price": 1,
"item_type": "service",
"tariff_code": "<string>",
"quantity": 1,
"service_date": "2023-11-07T05:31:56Z"
}
],
"enrollee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"claim_type": "outpatient",
"service_date_to": "2023-11-07T05:31:56Z",
"admission_date": "2023-11-07T05:31:56Z",
"discharge_date": "2023-11-07T05:31:56Z",
"pa_code": "<string>",
"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',
service_date_from: '2023-11-07T05:31:56Z',
items: [
{
description: '<string>',
unit_price: 1,
item_type: 'service',
tariff_code: '<string>',
quantity: 1,
service_date: '2023-11-07T05:31:56Z'
}
],
enrollee_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
claim_type: 'outpatient',
service_date_to: '2023-11-07T05:31:56Z',
admission_date: '2023-11-07T05:31:56Z',
discharge_date: '2023-11-07T05:31:56Z',
pa_code: '<string>',
diagnoses: [{icd_code: '<string>', name: '<string>', is_primary: true}]
})
};
fetch('https://api.clinikehr.com/v1/clinics/{clinic_id}/insurance/claims', 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/claims"
payload = {
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"insurance_company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"service_date_from": "2023-11-07T05:31:56Z",
"items": [
{
"description": "<string>",
"unit_price": 1,
"item_type": "service",
"tariff_code": "<string>",
"quantity": 1,
"service_date": "2023-11-07T05:31:56Z"
}
],
"enrollee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"claim_type": "outpatient",
"service_date_to": "2023-11-07T05:31:56Z",
"admission_date": "2023-11-07T05:31:56Z",
"discharge_date": "2023-11-07T05:31:56Z",
"pa_code": "<string>",
"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",
"claim_number": "<string>",
"insurance_company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"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",
"pre_auth_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"pa_code": "<string>",
"claim_type": "outpatient",
"hmo_status": "PENDING",
"currency": "<string>",
"amount_billed": 123,
"amount_approved": 123,
"paid_amount": 123,
"written_off_amount": 123,
"patient_responsibility": 123,
"service_date_from": "2023-11-07T05:31:56Z",
"service_date_to": "2023-11-07T05:31:56Z",
"admission_date": "2023-11-07T05:31:56Z",
"discharge_date": "2023-11-07T05:31:56Z",
"is_floating": true,
"submitted_at": "2023-11-07T05:31:56Z",
"vetted_at": "2023-11-07T05:31:56Z",
"approved_at": "2023-11-07T05:31:56Z",
"paid_at": "2023-11-07T05:31:56Z",
"denial_reason": "<string>",
"denial_code": "<string>",
"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>",
"service_date": "2023-11-07T05:31:56Z",
"qty_billed": 123,
"unit_price_billed": 123,
"sub_total_billed": 123,
"qty_approved": 123,
"unit_price_approved": 123,
"sub_total_approved": 123,
"hmo_item_status": "PENDING",
"denial_reason": "<string>",
"comments": [
"<string>"
],
"benefit_label": "<string>"
}
],
"diagnoses": [
{
"icd_code": "<string>",
"name": "<string>",
"is_primary": true
}
],
"documents": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"document_type": "<string>",
"file_name": "<string>",
"mime_type": "<string>",
"file_size": 123,
"document_date": "2023-11-07T05:31:56Z",
"description": "<string>"
}
]
},
"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>"
}
]
}Submit an insurance claim
Permission: insurance.claims:submit
Submit a claim to one of the clinic’s insurers.
For a clinic-owned key, or an organization with NO insurer link (a developer). An organization linked to an insurer is refused (role_required): an insurer does not submit claims to itself. The claim is saved as submitted, answers 201 with the claim and its lines, and carries no money. The Idempotency-Key header is REQUIRED - a retry with the same key returns the original claim, never a second one.
curl --request POST \
--url https://api.clinikehr.com/v1/clinics/{clinic_id}/insurance/claims \
--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",
"service_date_from": "2023-11-07T05:31:56Z",
"items": [
{
"description": "<string>",
"unit_price": 1,
"item_type": "service",
"tariff_code": "<string>",
"quantity": 1,
"service_date": "2023-11-07T05:31:56Z"
}
],
"enrollee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"claim_type": "outpatient",
"service_date_to": "2023-11-07T05:31:56Z",
"admission_date": "2023-11-07T05:31:56Z",
"discharge_date": "2023-11-07T05:31:56Z",
"pa_code": "<string>",
"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',
service_date_from: '2023-11-07T05:31:56Z',
items: [
{
description: '<string>',
unit_price: 1,
item_type: 'service',
tariff_code: '<string>',
quantity: 1,
service_date: '2023-11-07T05:31:56Z'
}
],
enrollee_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
claim_type: 'outpatient',
service_date_to: '2023-11-07T05:31:56Z',
admission_date: '2023-11-07T05:31:56Z',
discharge_date: '2023-11-07T05:31:56Z',
pa_code: '<string>',
diagnoses: [{icd_code: '<string>', name: '<string>', is_primary: true}]
})
};
fetch('https://api.clinikehr.com/v1/clinics/{clinic_id}/insurance/claims', 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/claims"
payload = {
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"insurance_company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"service_date_from": "2023-11-07T05:31:56Z",
"items": [
{
"description": "<string>",
"unit_price": 1,
"item_type": "service",
"tariff_code": "<string>",
"quantity": 1,
"service_date": "2023-11-07T05:31:56Z"
}
],
"enrollee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"claim_type": "outpatient",
"service_date_to": "2023-11-07T05:31:56Z",
"admission_date": "2023-11-07T05:31:56Z",
"discharge_date": "2023-11-07T05:31:56Z",
"pa_code": "<string>",
"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",
"claim_number": "<string>",
"insurance_company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"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",
"pre_auth_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"pa_code": "<string>",
"claim_type": "outpatient",
"hmo_status": "PENDING",
"currency": "<string>",
"amount_billed": 123,
"amount_approved": 123,
"paid_amount": 123,
"written_off_amount": 123,
"patient_responsibility": 123,
"service_date_from": "2023-11-07T05:31:56Z",
"service_date_to": "2023-11-07T05:31:56Z",
"admission_date": "2023-11-07T05:31:56Z",
"discharge_date": "2023-11-07T05:31:56Z",
"is_floating": true,
"submitted_at": "2023-11-07T05:31:56Z",
"vetted_at": "2023-11-07T05:31:56Z",
"approved_at": "2023-11-07T05:31:56Z",
"paid_at": "2023-11-07T05:31:56Z",
"denial_reason": "<string>",
"denial_code": "<string>",
"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>",
"service_date": "2023-11-07T05:31:56Z",
"qty_billed": 123,
"unit_price_billed": 123,
"sub_total_billed": 123,
"qty_approved": 123,
"unit_price_approved": 123,
"sub_total_approved": 123,
"hmo_item_status": "PENDING",
"denial_reason": "<string>",
"comments": [
"<string>"
],
"benefit_label": "<string>"
}
],
"diagnoses": [
{
"icd_code": "<string>",
"name": "<string>",
"is_primary": true
}
],
"documents": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"document_type": "<string>",
"file_name": "<string>",
"mime_type": "<string>",
"file_size": 123,
"document_date": "2023-11-07T05:31:56Z",
"description": "<string>"
}
]
},
"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 claim to submit to one of the clinic's insurers for a patient. It is saved as submitted with no money on it. patient_id must be a patient your organization is linked to (a clinic-owned key may use any of its clinic's patients). There is no field for a paid or written-off amount; sending one is refused as an unknown field.
1 - 200 elementsShow child attributes
Show child attributes
Must be an enrollee of that patient with that insurer.
outpatient, inpatient, emergency, pharmacy, lab, radiology, dental, optical, other 10020Show child attributes
Show child attributes
Response
Created - submitted, with its lines and no money recorded.
A claim the clinic submitted to an insurer. status is the clinic-side lifecycle (submitted, approved, partially_approved, denied, partially_paid, paid, ...); hmo_status is the insurer's verdict (PENDING, APPROVED, PARTIALLY_APPROVED, REJECTED). paid_amount and written_off_amount are what the CLINIC has recorded - no API call changes them. items, diagnoses and documents are on the single-claim read only. The clinic's notes and internal analysis are never exposed.
Show child attributes
Show child attributes
Present and true when this Idempotency-Key was already used and the original answer is returned.