Create Claim From Healthie CMS 1500
Creates a claim from a Healthie CMS 1500 file. This schema is based on the Healthie CMS 1500 schema that can be found here.
curl --request POST \
--url https://forecaster.cairhealth.com/api/claim/healthie/v1 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "12345",
"date_of_service": "2025-03-15",
"total_charge": "250.00",
"patient": {
"id": "P98765",
"first_name": "John",
"last_name": "Doe",
"name": "John Doe",
"gender": "male",
"dob": "1980-05-15",
"location": {
"city": "San Francisco",
"country": "USA",
"line1": "123 Main St",
"line2": "Apt 4B",
"state": "CA",
"zip": "94105"
},
"policies": [
{
"id": "POL123",
"group_num": "GRP456",
"name": "Premium Health Plan",
"holder_first": "John",
"holder_last": "Doe",
"holder_relationship": "self",
"insurance_plan": {
"payer_name": "Blue Cross",
"payer_id": "BCBS123",
"name_and_id": "Blue Cross (BCBS123)"
}
}
]
},
"billing_provider": {
"name": "Medical Group Inc",
"npi": "1234567890",
"tax_id": "12-3456789",
"location": {
"city": "San Francisco",
"country": "USA",
"line1": "456 Health Ave",
"state": "CA",
"zip": "94107"
}
},
"rendering_provider": {
"id": "DR12345",
"first_name": "Jane",
"last_name": "Smith",
"npi": "5432167890",
"name": "Jane Smith, MD"
},
"cpt_codes_cms1500s": [
{
"cpt_code": {
"code": "99213"
}
},
{
"cpt_code": {
"code": "85025"
}
}
],
"icd_codes_cms1500s": [
{
"icd_code": {
"code": "J20.9"
}
},
{
"icd_code": {
"code": "R50.9"
}
}
]
}
'import requests
url = "https://forecaster.cairhealth.com/api/claim/healthie/v1"
payload = {
"id": "12345",
"date_of_service": "2025-03-15",
"total_charge": "250.00",
"patient": {
"id": "P98765",
"first_name": "John",
"last_name": "Doe",
"name": "John Doe",
"gender": "male",
"dob": "1980-05-15",
"location": {
"city": "San Francisco",
"country": "USA",
"line1": "123 Main St",
"line2": "Apt 4B",
"state": "CA",
"zip": "94105"
},
"policies": [
{
"id": "POL123",
"group_num": "GRP456",
"name": "Premium Health Plan",
"holder_first": "John",
"holder_last": "Doe",
"holder_relationship": "self",
"insurance_plan": {
"payer_name": "Blue Cross",
"payer_id": "BCBS123",
"name_and_id": "Blue Cross (BCBS123)"
}
}
]
},
"billing_provider": {
"name": "Medical Group Inc",
"npi": "1234567890",
"tax_id": "12-3456789",
"location": {
"city": "San Francisco",
"country": "USA",
"line1": "456 Health Ave",
"state": "CA",
"zip": "94107"
}
},
"rendering_provider": {
"id": "DR12345",
"first_name": "Jane",
"last_name": "Smith",
"npi": "5432167890",
"name": "Jane Smith, MD"
},
"cpt_codes_cms1500s": [{ "cpt_code": { "code": "99213" } }, { "cpt_code": { "code": "85025" } }],
"icd_codes_cms1500s": [{ "icd_code": { "code": "J20.9" } }, { "icd_code": { "code": "R50.9" } }]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '12345',
date_of_service: '2025-03-15',
total_charge: '250.00',
patient: {
id: 'P98765',
first_name: 'John',
last_name: 'Doe',
name: 'John Doe',
gender: 'male',
dob: '1980-05-15',
location: {
city: 'San Francisco',
country: 'USA',
line1: '123 Main St',
line2: 'Apt 4B',
state: 'CA',
zip: '94105'
},
policies: [
{
id: 'POL123',
group_num: 'GRP456',
name: 'Premium Health Plan',
holder_first: 'John',
holder_last: 'Doe',
holder_relationship: 'self',
insurance_plan: {
payer_name: 'Blue Cross',
payer_id: 'BCBS123',
name_and_id: 'Blue Cross (BCBS123)'
}
}
]
},
billing_provider: {
name: 'Medical Group Inc',
npi: '1234567890',
tax_id: '12-3456789',
location: {
city: 'San Francisco',
country: 'USA',
line1: '456 Health Ave',
state: 'CA',
zip: '94107'
}
},
rendering_provider: {
id: 'DR12345',
first_name: 'Jane',
last_name: 'Smith',
npi: '5432167890',
name: 'Jane Smith, MD'
},
cpt_codes_cms1500s: [{cpt_code: {code: '99213'}}, {cpt_code: {code: '85025'}}],
icd_codes_cms1500s: [{icd_code: {code: 'J20.9'}}, {icd_code: {code: 'R50.9'}}]
})
};
fetch('https://forecaster.cairhealth.com/api/claim/healthie/v1', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://forecaster.cairhealth.com/api/claim/healthie/v1",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '12345',
'date_of_service' => '2025-03-15',
'total_charge' => '250.00',
'patient' => [
'id' => 'P98765',
'first_name' => 'John',
'last_name' => 'Doe',
'name' => 'John Doe',
'gender' => 'male',
'dob' => '1980-05-15',
'location' => [
'city' => 'San Francisco',
'country' => 'USA',
'line1' => '123 Main St',
'line2' => 'Apt 4B',
'state' => 'CA',
'zip' => '94105'
],
'policies' => [
[
'id' => 'POL123',
'group_num' => 'GRP456',
'name' => 'Premium Health Plan',
'holder_first' => 'John',
'holder_last' => 'Doe',
'holder_relationship' => 'self',
'insurance_plan' => [
'payer_name' => 'Blue Cross',
'payer_id' => 'BCBS123',
'name_and_id' => 'Blue Cross (BCBS123)'
]
]
]
],
'billing_provider' => [
'name' => 'Medical Group Inc',
'npi' => '1234567890',
'tax_id' => '12-3456789',
'location' => [
'city' => 'San Francisco',
'country' => 'USA',
'line1' => '456 Health Ave',
'state' => 'CA',
'zip' => '94107'
]
],
'rendering_provider' => [
'id' => 'DR12345',
'first_name' => 'Jane',
'last_name' => 'Smith',
'npi' => '5432167890',
'name' => 'Jane Smith, MD'
],
'cpt_codes_cms1500s' => [
[
'cpt_code' => [
'code' => '99213'
]
],
[
'cpt_code' => [
'code' => '85025'
]
]
],
'icd_codes_cms1500s' => [
[
'icd_code' => [
'code' => 'J20.9'
]
],
[
'icd_code' => [
'code' => 'R50.9'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://forecaster.cairhealth.com/api/claim/healthie/v1"
payload := strings.NewReader("{\n \"id\": \"12345\",\n \"date_of_service\": \"2025-03-15\",\n \"total_charge\": \"250.00\",\n \"patient\": {\n \"id\": \"P98765\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"name\": \"John Doe\",\n \"gender\": \"male\",\n \"dob\": \"1980-05-15\",\n \"location\": {\n \"city\": \"San Francisco\",\n \"country\": \"USA\",\n \"line1\": \"123 Main St\",\n \"line2\": \"Apt 4B\",\n \"state\": \"CA\",\n \"zip\": \"94105\"\n },\n \"policies\": [\n {\n \"id\": \"POL123\",\n \"group_num\": \"GRP456\",\n \"name\": \"Premium Health Plan\",\n \"holder_first\": \"John\",\n \"holder_last\": \"Doe\",\n \"holder_relationship\": \"self\",\n \"insurance_plan\": {\n \"payer_name\": \"Blue Cross\",\n \"payer_id\": \"BCBS123\",\n \"name_and_id\": \"Blue Cross (BCBS123)\"\n }\n }\n ]\n },\n \"billing_provider\": {\n \"name\": \"Medical Group Inc\",\n \"npi\": \"1234567890\",\n \"tax_id\": \"12-3456789\",\n \"location\": {\n \"city\": \"San Francisco\",\n \"country\": \"USA\",\n \"line1\": \"456 Health Ave\",\n \"state\": \"CA\",\n \"zip\": \"94107\"\n }\n },\n \"rendering_provider\": {\n \"id\": \"DR12345\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Smith\",\n \"npi\": \"5432167890\",\n \"name\": \"Jane Smith, MD\"\n },\n \"cpt_codes_cms1500s\": [\n {\n \"cpt_code\": {\n \"code\": \"99213\"\n }\n },\n {\n \"cpt_code\": {\n \"code\": \"85025\"\n }\n }\n ],\n \"icd_codes_cms1500s\": [\n {\n \"icd_code\": {\n \"code\": \"J20.9\"\n }\n },\n {\n \"icd_code\": {\n \"code\": \"R50.9\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://forecaster.cairhealth.com/api/claim/healthie/v1")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"12345\",\n \"date_of_service\": \"2025-03-15\",\n \"total_charge\": \"250.00\",\n \"patient\": {\n \"id\": \"P98765\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"name\": \"John Doe\",\n \"gender\": \"male\",\n \"dob\": \"1980-05-15\",\n \"location\": {\n \"city\": \"San Francisco\",\n \"country\": \"USA\",\n \"line1\": \"123 Main St\",\n \"line2\": \"Apt 4B\",\n \"state\": \"CA\",\n \"zip\": \"94105\"\n },\n \"policies\": [\n {\n \"id\": \"POL123\",\n \"group_num\": \"GRP456\",\n \"name\": \"Premium Health Plan\",\n \"holder_first\": \"John\",\n \"holder_last\": \"Doe\",\n \"holder_relationship\": \"self\",\n \"insurance_plan\": {\n \"payer_name\": \"Blue Cross\",\n \"payer_id\": \"BCBS123\",\n \"name_and_id\": \"Blue Cross (BCBS123)\"\n }\n }\n ]\n },\n \"billing_provider\": {\n \"name\": \"Medical Group Inc\",\n \"npi\": \"1234567890\",\n \"tax_id\": \"12-3456789\",\n \"location\": {\n \"city\": \"San Francisco\",\n \"country\": \"USA\",\n \"line1\": \"456 Health Ave\",\n \"state\": \"CA\",\n \"zip\": \"94107\"\n }\n },\n \"rendering_provider\": {\n \"id\": \"DR12345\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Smith\",\n \"npi\": \"5432167890\",\n \"name\": \"Jane Smith, MD\"\n },\n \"cpt_codes_cms1500s\": [\n {\n \"cpt_code\": {\n \"code\": \"99213\"\n }\n },\n {\n \"cpt_code\": {\n \"code\": \"85025\"\n }\n }\n ],\n \"icd_codes_cms1500s\": [\n {\n \"icd_code\": {\n \"code\": \"J20.9\"\n }\n },\n {\n \"icd_code\": {\n \"code\": \"R50.9\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://forecaster.cairhealth.com/api/claim/healthie/v1")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"12345\",\n \"date_of_service\": \"2025-03-15\",\n \"total_charge\": \"250.00\",\n \"patient\": {\n \"id\": \"P98765\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"name\": \"John Doe\",\n \"gender\": \"male\",\n \"dob\": \"1980-05-15\",\n \"location\": {\n \"city\": \"San Francisco\",\n \"country\": \"USA\",\n \"line1\": \"123 Main St\",\n \"line2\": \"Apt 4B\",\n \"state\": \"CA\",\n \"zip\": \"94105\"\n },\n \"policies\": [\n {\n \"id\": \"POL123\",\n \"group_num\": \"GRP456\",\n \"name\": \"Premium Health Plan\",\n \"holder_first\": \"John\",\n \"holder_last\": \"Doe\",\n \"holder_relationship\": \"self\",\n \"insurance_plan\": {\n \"payer_name\": \"Blue Cross\",\n \"payer_id\": \"BCBS123\",\n \"name_and_id\": \"Blue Cross (BCBS123)\"\n }\n }\n ]\n },\n \"billing_provider\": {\n \"name\": \"Medical Group Inc\",\n \"npi\": \"1234567890\",\n \"tax_id\": \"12-3456789\",\n \"location\": {\n \"city\": \"San Francisco\",\n \"country\": \"USA\",\n \"line1\": \"456 Health Ave\",\n \"state\": \"CA\",\n \"zip\": \"94107\"\n }\n },\n \"rendering_provider\": {\n \"id\": \"DR12345\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Smith\",\n \"npi\": \"5432167890\",\n \"name\": \"Jane Smith, MD\"\n },\n \"cpt_codes_cms1500s\": [\n {\n \"cpt_code\": {\n \"code\": \"99213\"\n }\n },\n {\n \"cpt_code\": {\n \"code\": \"85025\"\n }\n }\n ],\n \"icd_codes_cms1500s\": [\n {\n \"icd_code\": {\n \"code\": \"J20.9\"\n }\n },\n {\n \"icd_code\": {\n \"code\": \"R50.9\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Claim created successfully"
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "invalid",
"expression": [
"Cms1500.total_charge"
],
"details": {
"text": "Expected string, received number"
}
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "security",
"diagnostics": "Unauthorized access or invalid organization ID"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Optional ID of document references to associate with the claim. Can be specified multiple times. This id will be returned from the Create Claim Attachment endpoint.
Body
Healthie CMS 1500 claim data
Unique identifier for the CMS 1500 form
Date when the service was provided
Total charge amount for the claim
Information about the patient
Show child attributes
Show child attributes
Information about the billing provider
Show child attributes
Show child attributes
Information about the rendering provider
Show child attributes
Show child attributes
CPT codes associated with the claim
Show child attributes
Show child attributes
ICD diagnosis codes associated with the claim
Show child attributes
Show child attributes
Location of the service
Show child attributes
Show child attributes
curl --request POST \
--url https://forecaster.cairhealth.com/api/claim/healthie/v1 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "12345",
"date_of_service": "2025-03-15",
"total_charge": "250.00",
"patient": {
"id": "P98765",
"first_name": "John",
"last_name": "Doe",
"name": "John Doe",
"gender": "male",
"dob": "1980-05-15",
"location": {
"city": "San Francisco",
"country": "USA",
"line1": "123 Main St",
"line2": "Apt 4B",
"state": "CA",
"zip": "94105"
},
"policies": [
{
"id": "POL123",
"group_num": "GRP456",
"name": "Premium Health Plan",
"holder_first": "John",
"holder_last": "Doe",
"holder_relationship": "self",
"insurance_plan": {
"payer_name": "Blue Cross",
"payer_id": "BCBS123",
"name_and_id": "Blue Cross (BCBS123)"
}
}
]
},
"billing_provider": {
"name": "Medical Group Inc",
"npi": "1234567890",
"tax_id": "12-3456789",
"location": {
"city": "San Francisco",
"country": "USA",
"line1": "456 Health Ave",
"state": "CA",
"zip": "94107"
}
},
"rendering_provider": {
"id": "DR12345",
"first_name": "Jane",
"last_name": "Smith",
"npi": "5432167890",
"name": "Jane Smith, MD"
},
"cpt_codes_cms1500s": [
{
"cpt_code": {
"code": "99213"
}
},
{
"cpt_code": {
"code": "85025"
}
}
],
"icd_codes_cms1500s": [
{
"icd_code": {
"code": "J20.9"
}
},
{
"icd_code": {
"code": "R50.9"
}
}
]
}
'import requests
url = "https://forecaster.cairhealth.com/api/claim/healthie/v1"
payload = {
"id": "12345",
"date_of_service": "2025-03-15",
"total_charge": "250.00",
"patient": {
"id": "P98765",
"first_name": "John",
"last_name": "Doe",
"name": "John Doe",
"gender": "male",
"dob": "1980-05-15",
"location": {
"city": "San Francisco",
"country": "USA",
"line1": "123 Main St",
"line2": "Apt 4B",
"state": "CA",
"zip": "94105"
},
"policies": [
{
"id": "POL123",
"group_num": "GRP456",
"name": "Premium Health Plan",
"holder_first": "John",
"holder_last": "Doe",
"holder_relationship": "self",
"insurance_plan": {
"payer_name": "Blue Cross",
"payer_id": "BCBS123",
"name_and_id": "Blue Cross (BCBS123)"
}
}
]
},
"billing_provider": {
"name": "Medical Group Inc",
"npi": "1234567890",
"tax_id": "12-3456789",
"location": {
"city": "San Francisco",
"country": "USA",
"line1": "456 Health Ave",
"state": "CA",
"zip": "94107"
}
},
"rendering_provider": {
"id": "DR12345",
"first_name": "Jane",
"last_name": "Smith",
"npi": "5432167890",
"name": "Jane Smith, MD"
},
"cpt_codes_cms1500s": [{ "cpt_code": { "code": "99213" } }, { "cpt_code": { "code": "85025" } }],
"icd_codes_cms1500s": [{ "icd_code": { "code": "J20.9" } }, { "icd_code": { "code": "R50.9" } }]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '12345',
date_of_service: '2025-03-15',
total_charge: '250.00',
patient: {
id: 'P98765',
first_name: 'John',
last_name: 'Doe',
name: 'John Doe',
gender: 'male',
dob: '1980-05-15',
location: {
city: 'San Francisco',
country: 'USA',
line1: '123 Main St',
line2: 'Apt 4B',
state: 'CA',
zip: '94105'
},
policies: [
{
id: 'POL123',
group_num: 'GRP456',
name: 'Premium Health Plan',
holder_first: 'John',
holder_last: 'Doe',
holder_relationship: 'self',
insurance_plan: {
payer_name: 'Blue Cross',
payer_id: 'BCBS123',
name_and_id: 'Blue Cross (BCBS123)'
}
}
]
},
billing_provider: {
name: 'Medical Group Inc',
npi: '1234567890',
tax_id: '12-3456789',
location: {
city: 'San Francisco',
country: 'USA',
line1: '456 Health Ave',
state: 'CA',
zip: '94107'
}
},
rendering_provider: {
id: 'DR12345',
first_name: 'Jane',
last_name: 'Smith',
npi: '5432167890',
name: 'Jane Smith, MD'
},
cpt_codes_cms1500s: [{cpt_code: {code: '99213'}}, {cpt_code: {code: '85025'}}],
icd_codes_cms1500s: [{icd_code: {code: 'J20.9'}}, {icd_code: {code: 'R50.9'}}]
})
};
fetch('https://forecaster.cairhealth.com/api/claim/healthie/v1', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://forecaster.cairhealth.com/api/claim/healthie/v1",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '12345',
'date_of_service' => '2025-03-15',
'total_charge' => '250.00',
'patient' => [
'id' => 'P98765',
'first_name' => 'John',
'last_name' => 'Doe',
'name' => 'John Doe',
'gender' => 'male',
'dob' => '1980-05-15',
'location' => [
'city' => 'San Francisco',
'country' => 'USA',
'line1' => '123 Main St',
'line2' => 'Apt 4B',
'state' => 'CA',
'zip' => '94105'
],
'policies' => [
[
'id' => 'POL123',
'group_num' => 'GRP456',
'name' => 'Premium Health Plan',
'holder_first' => 'John',
'holder_last' => 'Doe',
'holder_relationship' => 'self',
'insurance_plan' => [
'payer_name' => 'Blue Cross',
'payer_id' => 'BCBS123',
'name_and_id' => 'Blue Cross (BCBS123)'
]
]
]
],
'billing_provider' => [
'name' => 'Medical Group Inc',
'npi' => '1234567890',
'tax_id' => '12-3456789',
'location' => [
'city' => 'San Francisco',
'country' => 'USA',
'line1' => '456 Health Ave',
'state' => 'CA',
'zip' => '94107'
]
],
'rendering_provider' => [
'id' => 'DR12345',
'first_name' => 'Jane',
'last_name' => 'Smith',
'npi' => '5432167890',
'name' => 'Jane Smith, MD'
],
'cpt_codes_cms1500s' => [
[
'cpt_code' => [
'code' => '99213'
]
],
[
'cpt_code' => [
'code' => '85025'
]
]
],
'icd_codes_cms1500s' => [
[
'icd_code' => [
'code' => 'J20.9'
]
],
[
'icd_code' => [
'code' => 'R50.9'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://forecaster.cairhealth.com/api/claim/healthie/v1"
payload := strings.NewReader("{\n \"id\": \"12345\",\n \"date_of_service\": \"2025-03-15\",\n \"total_charge\": \"250.00\",\n \"patient\": {\n \"id\": \"P98765\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"name\": \"John Doe\",\n \"gender\": \"male\",\n \"dob\": \"1980-05-15\",\n \"location\": {\n \"city\": \"San Francisco\",\n \"country\": \"USA\",\n \"line1\": \"123 Main St\",\n \"line2\": \"Apt 4B\",\n \"state\": \"CA\",\n \"zip\": \"94105\"\n },\n \"policies\": [\n {\n \"id\": \"POL123\",\n \"group_num\": \"GRP456\",\n \"name\": \"Premium Health Plan\",\n \"holder_first\": \"John\",\n \"holder_last\": \"Doe\",\n \"holder_relationship\": \"self\",\n \"insurance_plan\": {\n \"payer_name\": \"Blue Cross\",\n \"payer_id\": \"BCBS123\",\n \"name_and_id\": \"Blue Cross (BCBS123)\"\n }\n }\n ]\n },\n \"billing_provider\": {\n \"name\": \"Medical Group Inc\",\n \"npi\": \"1234567890\",\n \"tax_id\": \"12-3456789\",\n \"location\": {\n \"city\": \"San Francisco\",\n \"country\": \"USA\",\n \"line1\": \"456 Health Ave\",\n \"state\": \"CA\",\n \"zip\": \"94107\"\n }\n },\n \"rendering_provider\": {\n \"id\": \"DR12345\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Smith\",\n \"npi\": \"5432167890\",\n \"name\": \"Jane Smith, MD\"\n },\n \"cpt_codes_cms1500s\": [\n {\n \"cpt_code\": {\n \"code\": \"99213\"\n }\n },\n {\n \"cpt_code\": {\n \"code\": \"85025\"\n }\n }\n ],\n \"icd_codes_cms1500s\": [\n {\n \"icd_code\": {\n \"code\": \"J20.9\"\n }\n },\n {\n \"icd_code\": {\n \"code\": \"R50.9\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://forecaster.cairhealth.com/api/claim/healthie/v1")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"12345\",\n \"date_of_service\": \"2025-03-15\",\n \"total_charge\": \"250.00\",\n \"patient\": {\n \"id\": \"P98765\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"name\": \"John Doe\",\n \"gender\": \"male\",\n \"dob\": \"1980-05-15\",\n \"location\": {\n \"city\": \"San Francisco\",\n \"country\": \"USA\",\n \"line1\": \"123 Main St\",\n \"line2\": \"Apt 4B\",\n \"state\": \"CA\",\n \"zip\": \"94105\"\n },\n \"policies\": [\n {\n \"id\": \"POL123\",\n \"group_num\": \"GRP456\",\n \"name\": \"Premium Health Plan\",\n \"holder_first\": \"John\",\n \"holder_last\": \"Doe\",\n \"holder_relationship\": \"self\",\n \"insurance_plan\": {\n \"payer_name\": \"Blue Cross\",\n \"payer_id\": \"BCBS123\",\n \"name_and_id\": \"Blue Cross (BCBS123)\"\n }\n }\n ]\n },\n \"billing_provider\": {\n \"name\": \"Medical Group Inc\",\n \"npi\": \"1234567890\",\n \"tax_id\": \"12-3456789\",\n \"location\": {\n \"city\": \"San Francisco\",\n \"country\": \"USA\",\n \"line1\": \"456 Health Ave\",\n \"state\": \"CA\",\n \"zip\": \"94107\"\n }\n },\n \"rendering_provider\": {\n \"id\": \"DR12345\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Smith\",\n \"npi\": \"5432167890\",\n \"name\": \"Jane Smith, MD\"\n },\n \"cpt_codes_cms1500s\": [\n {\n \"cpt_code\": {\n \"code\": \"99213\"\n }\n },\n {\n \"cpt_code\": {\n \"code\": \"85025\"\n }\n }\n ],\n \"icd_codes_cms1500s\": [\n {\n \"icd_code\": {\n \"code\": \"J20.9\"\n }\n },\n {\n \"icd_code\": {\n \"code\": \"R50.9\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://forecaster.cairhealth.com/api/claim/healthie/v1")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"12345\",\n \"date_of_service\": \"2025-03-15\",\n \"total_charge\": \"250.00\",\n \"patient\": {\n \"id\": \"P98765\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"name\": \"John Doe\",\n \"gender\": \"male\",\n \"dob\": \"1980-05-15\",\n \"location\": {\n \"city\": \"San Francisco\",\n \"country\": \"USA\",\n \"line1\": \"123 Main St\",\n \"line2\": \"Apt 4B\",\n \"state\": \"CA\",\n \"zip\": \"94105\"\n },\n \"policies\": [\n {\n \"id\": \"POL123\",\n \"group_num\": \"GRP456\",\n \"name\": \"Premium Health Plan\",\n \"holder_first\": \"John\",\n \"holder_last\": \"Doe\",\n \"holder_relationship\": \"self\",\n \"insurance_plan\": {\n \"payer_name\": \"Blue Cross\",\n \"payer_id\": \"BCBS123\",\n \"name_and_id\": \"Blue Cross (BCBS123)\"\n }\n }\n ]\n },\n \"billing_provider\": {\n \"name\": \"Medical Group Inc\",\n \"npi\": \"1234567890\",\n \"tax_id\": \"12-3456789\",\n \"location\": {\n \"city\": \"San Francisco\",\n \"country\": \"USA\",\n \"line1\": \"456 Health Ave\",\n \"state\": \"CA\",\n \"zip\": \"94107\"\n }\n },\n \"rendering_provider\": {\n \"id\": \"DR12345\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Smith\",\n \"npi\": \"5432167890\",\n \"name\": \"Jane Smith, MD\"\n },\n \"cpt_codes_cms1500s\": [\n {\n \"cpt_code\": {\n \"code\": \"99213\"\n }\n },\n {\n \"cpt_code\": {\n \"code\": \"85025\"\n }\n }\n ],\n \"icd_codes_cms1500s\": [\n {\n \"icd_code\": {\n \"code\": \"J20.9\"\n }\n },\n {\n \"icd_code\": {\n \"code\": \"R50.9\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Claim created successfully"
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "invalid",
"expression": [
"Cms1500.total_charge"
],
"details": {
"text": "Expected string, received number"
}
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "security",
"diagnostics": "Unauthorized access or invalid organization ID"
}
]
}
