Put Policies
curl --request PUT \
--url https://sandbox.elationemr.com/api/2.0/patients/{patient_id}/policies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"patient_dob": "2023-12-25",
"patient_first_name": "<string>",
"patient_last_name": "<string>",
"address": "<string>",
"carrier_id": 123,
"carrier_name": "<string>",
"city": "<string>",
"copay": "<string>",
"county_code": "<string>",
"deductible": "<string>",
"end_date": "2023-12-25",
"extension": "<string>",
"group_id": "<string>",
"id": 123,
"insured_person_address": "<string>",
"insured_person_city": "<string>",
"insured_person_dob": "2023-12-25",
"insured_person_first_name": "<string>",
"insured_person_id": "<string>",
"insured_person_last_name": "<string>",
"insured_person_sex_at_birth": "<string>",
"insured_person_ssn": "<string>",
"insured_person_state": "<string>",
"insured_person_zip": "<string>",
"medicare_secondary_code": "<string>",
"member_id": "<string>",
"phone": "<string>",
"plan_id": 123,
"plan_name": "<string>",
"practice_id": 123,
"rank": 123,
"relationship_to_insured": "self",
"start_date": "2023-12-25",
"state": "<string>",
"suite": "<string>",
"vendor_company_id": 123,
"vendor_external_id": "<string>",
"zip": "<string>"
}
]
'import requests
url = "https://sandbox.elationemr.com/api/2.0/patients/{patient_id}/policies"
payload = [
{
"patient_dob": "2023-12-25",
"patient_first_name": "<string>",
"patient_last_name": "<string>",
"address": "<string>",
"carrier_id": 123,
"carrier_name": "<string>",
"city": "<string>",
"copay": "<string>",
"county_code": "<string>",
"deductible": "<string>",
"end_date": "2023-12-25",
"extension": "<string>",
"group_id": "<string>",
"id": 123,
"insured_person_address": "<string>",
"insured_person_city": "<string>",
"insured_person_dob": "2023-12-25",
"insured_person_first_name": "<string>",
"insured_person_id": "<string>",
"insured_person_last_name": "<string>",
"insured_person_sex_at_birth": "<string>",
"insured_person_ssn": "<string>",
"insured_person_state": "<string>",
"insured_person_zip": "<string>",
"medicare_secondary_code": "<string>",
"member_id": "<string>",
"phone": "<string>",
"plan_id": 123,
"plan_name": "<string>",
"practice_id": 123,
"rank": 123,
"relationship_to_insured": "self",
"start_date": "2023-12-25",
"state": "<string>",
"suite": "<string>",
"vendor_company_id": 123,
"vendor_external_id": "<string>",
"zip": "<string>"
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
patient_dob: '2023-12-25',
patient_first_name: '<string>',
patient_last_name: '<string>',
address: '<string>',
carrier_id: 123,
carrier_name: '<string>',
city: '<string>',
copay: '<string>',
county_code: '<string>',
deductible: '<string>',
end_date: '2023-12-25',
extension: '<string>',
group_id: '<string>',
id: 123,
insured_person_address: '<string>',
insured_person_city: '<string>',
insured_person_dob: '2023-12-25',
insured_person_first_name: '<string>',
insured_person_id: '<string>',
insured_person_last_name: '<string>',
insured_person_sex_at_birth: '<string>',
insured_person_ssn: '<string>',
insured_person_state: '<string>',
insured_person_zip: '<string>',
medicare_secondary_code: '<string>',
member_id: '<string>',
phone: '<string>',
plan_id: 123,
plan_name: '<string>',
practice_id: 123,
rank: 123,
relationship_to_insured: 'self',
start_date: '2023-12-25',
state: '<string>',
suite: '<string>',
vendor_company_id: 123,
vendor_external_id: '<string>',
zip: '<string>'
}
])
};
fetch('https://sandbox.elationemr.com/api/2.0/patients/{patient_id}/policies', 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://sandbox.elationemr.com/api/2.0/patients/{patient_id}/policies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
[
'patient_dob' => '2023-12-25',
'patient_first_name' => '<string>',
'patient_last_name' => '<string>',
'address' => '<string>',
'carrier_id' => 123,
'carrier_name' => '<string>',
'city' => '<string>',
'copay' => '<string>',
'county_code' => '<string>',
'deductible' => '<string>',
'end_date' => '2023-12-25',
'extension' => '<string>',
'group_id' => '<string>',
'id' => 123,
'insured_person_address' => '<string>',
'insured_person_city' => '<string>',
'insured_person_dob' => '2023-12-25',
'insured_person_first_name' => '<string>',
'insured_person_id' => '<string>',
'insured_person_last_name' => '<string>',
'insured_person_sex_at_birth' => '<string>',
'insured_person_ssn' => '<string>',
'insured_person_state' => '<string>',
'insured_person_zip' => '<string>',
'medicare_secondary_code' => '<string>',
'member_id' => '<string>',
'phone' => '<string>',
'plan_id' => 123,
'plan_name' => '<string>',
'practice_id' => 123,
'rank' => 123,
'relationship_to_insured' => 'self',
'start_date' => '2023-12-25',
'state' => '<string>',
'suite' => '<string>',
'vendor_company_id' => 123,
'vendor_external_id' => '<string>',
'zip' => '<string>'
]
]),
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://sandbox.elationemr.com/api/2.0/patients/{patient_id}/policies"
payload := strings.NewReader("[\n {\n \"patient_dob\": \"2023-12-25\",\n \"patient_first_name\": \"<string>\",\n \"patient_last_name\": \"<string>\",\n \"address\": \"<string>\",\n \"carrier_id\": 123,\n \"carrier_name\": \"<string>\",\n \"city\": \"<string>\",\n \"copay\": \"<string>\",\n \"county_code\": \"<string>\",\n \"deductible\": \"<string>\",\n \"end_date\": \"2023-12-25\",\n \"extension\": \"<string>\",\n \"group_id\": \"<string>\",\n \"id\": 123,\n \"insured_person_address\": \"<string>\",\n \"insured_person_city\": \"<string>\",\n \"insured_person_dob\": \"2023-12-25\",\n \"insured_person_first_name\": \"<string>\",\n \"insured_person_id\": \"<string>\",\n \"insured_person_last_name\": \"<string>\",\n \"insured_person_sex_at_birth\": \"<string>\",\n \"insured_person_ssn\": \"<string>\",\n \"insured_person_state\": \"<string>\",\n \"insured_person_zip\": \"<string>\",\n \"medicare_secondary_code\": \"<string>\",\n \"member_id\": \"<string>\",\n \"phone\": \"<string>\",\n \"plan_id\": 123,\n \"plan_name\": \"<string>\",\n \"practice_id\": 123,\n \"rank\": 123,\n \"relationship_to_insured\": \"self\",\n \"start_date\": \"2023-12-25\",\n \"state\": \"<string>\",\n \"suite\": \"<string>\",\n \"vendor_company_id\": 123,\n \"vendor_external_id\": \"<string>\",\n \"zip\": \"<string>\"\n }\n]")
req, _ := http.NewRequest("PUT", 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.put("https://sandbox.elationemr.com/api/2.0/patients/{patient_id}/policies")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"patient_dob\": \"2023-12-25\",\n \"patient_first_name\": \"<string>\",\n \"patient_last_name\": \"<string>\",\n \"address\": \"<string>\",\n \"carrier_id\": 123,\n \"carrier_name\": \"<string>\",\n \"city\": \"<string>\",\n \"copay\": \"<string>\",\n \"county_code\": \"<string>\",\n \"deductible\": \"<string>\",\n \"end_date\": \"2023-12-25\",\n \"extension\": \"<string>\",\n \"group_id\": \"<string>\",\n \"id\": 123,\n \"insured_person_address\": \"<string>\",\n \"insured_person_city\": \"<string>\",\n \"insured_person_dob\": \"2023-12-25\",\n \"insured_person_first_name\": \"<string>\",\n \"insured_person_id\": \"<string>\",\n \"insured_person_last_name\": \"<string>\",\n \"insured_person_sex_at_birth\": \"<string>\",\n \"insured_person_ssn\": \"<string>\",\n \"insured_person_state\": \"<string>\",\n \"insured_person_zip\": \"<string>\",\n \"medicare_secondary_code\": \"<string>\",\n \"member_id\": \"<string>\",\n \"phone\": \"<string>\",\n \"plan_id\": 123,\n \"plan_name\": \"<string>\",\n \"practice_id\": 123,\n \"rank\": 123,\n \"relationship_to_insured\": \"self\",\n \"start_date\": \"2023-12-25\",\n \"state\": \"<string>\",\n \"suite\": \"<string>\",\n \"vendor_company_id\": 123,\n \"vendor_external_id\": \"<string>\",\n \"zip\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.elationemr.com/api/2.0/patients/{patient_id}/policies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"patient_dob\": \"2023-12-25\",\n \"patient_first_name\": \"<string>\",\n \"patient_last_name\": \"<string>\",\n \"address\": \"<string>\",\n \"carrier_id\": 123,\n \"carrier_name\": \"<string>\",\n \"city\": \"<string>\",\n \"copay\": \"<string>\",\n \"county_code\": \"<string>\",\n \"deductible\": \"<string>\",\n \"end_date\": \"2023-12-25\",\n \"extension\": \"<string>\",\n \"group_id\": \"<string>\",\n \"id\": 123,\n \"insured_person_address\": \"<string>\",\n \"insured_person_city\": \"<string>\",\n \"insured_person_dob\": \"2023-12-25\",\n \"insured_person_first_name\": \"<string>\",\n \"insured_person_id\": \"<string>\",\n \"insured_person_last_name\": \"<string>\",\n \"insured_person_sex_at_birth\": \"<string>\",\n \"insured_person_ssn\": \"<string>\",\n \"insured_person_state\": \"<string>\",\n \"insured_person_zip\": \"<string>\",\n \"medicare_secondary_code\": \"<string>\",\n \"member_id\": \"<string>\",\n \"phone\": \"<string>\",\n \"plan_id\": 123,\n \"plan_name\": \"<string>\",\n \"practice_id\": 123,\n \"rank\": 123,\n \"relationship_to_insured\": \"self\",\n \"start_date\": \"2023-12-25\",\n \"state\": \"<string>\",\n \"suite\": \"<string>\",\n \"vendor_company_id\": 123,\n \"vendor_external_id\": \"<string>\",\n \"zip\": \"<string>\"\n }\n]"
response = http.request(request)
puts response.read_body{
"results": [
{
"hippospace": "<string>",
"id": 123,
"patient_dob": "2023-12-25",
"patient_first_name": "<string>",
"patient_id": 123,
"patient_last_name": "<string>",
"practice_id": 123,
"status": "active",
"address": "<string>",
"back_image_path": "<string>",
"can_check_eligibility": false,
"carrier_id": 123,
"carrier_name": "<string>",
"city": "<string>",
"copay": "<string>",
"county_code": "<string>",
"deductible": "<string>",
"end_date": "2023-12-25",
"extension": "<string>",
"front_image_path": "<string>",
"group_id": "<string>",
"insured_person_address": "<string>",
"insured_person_city": "<string>",
"insured_person_dob": "2023-12-25",
"insured_person_first_name": "<string>",
"insured_person_id": "<string>",
"insured_person_last_name": "<string>",
"insured_person_sex_at_birth": "<string>",
"insured_person_ssn": "<string>",
"insured_person_state": "<string>",
"insured_person_zip": "<string>",
"is_legacy_insurance": false,
"medicare_secondary_code": "<string>",
"member_id": "<string>",
"payment_program": "medicare_part_b",
"phone": "<string>",
"plan_id": 123,
"plan_name": "<string>",
"rank": 123,
"relationship_to_insured": "self",
"start_date": "2023-12-25",
"state": "<string>",
"suite": "<string>",
"vendor_company_id": 123,
"vendor_external_id": "<string>",
"zip": "<string>"
}
],
"current_page_num": 123,
"next_page_url": "<string>",
"page_first_item_num": 123,
"page_last_item_num": 123,
"previous_page_url": "<string>",
"total_item_count": 123,
"total_page_count": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Patient's date of birth
Patient's first name
70Patient's last name
70Carrier street address
200Insurance carrier identifier
Name of the insurance carrier
200Carrier city
50Copay amount
19^-?\d{1,8}(\.\d{1,10})?$|^$Carrier county code
10Deductible amount
19^-?\d{1,8}(\.\d{1,10})?$|^$Policy end date
Carrier phone extension
6Group identifier
50Policy ID. If provided, updates the existing policy. If omitted, creates a new policy with a generated ID.
Insured person's street address
200Insured person's city
50Insured person's date of birth
Insured person's first name
200Insured person's identifier
50Insured person's last name
200Insured person's sex at birth
1Insured person's SSN
11Insured person's state code
2Insured person's ZIP code
10Medicare secondary code
5Member identifier
50Insurance payment program type
medicare_part_b, medicare_advantage, medicaid, commercial_hmsa, commercial_sfhp, commercial_other, workers_compensation Carrier phone number
20Insurance plan identifier
Name of the insurance plan
200Practice the policy belongs to. Must be one of the practices your API credentials are authorized for, or the request is rejected. If omitted and id refers to an existing policy, that policy's current practice is preserved; if omitted and id is absent or doesn't match an existing policy (i.e. this creates a new policy), the first practice associated with your credentials is used, as on create. If your credentials are authorized for more than one practice, always specify this field explicitly — which practice is 'first' is not something you control and is not guaranteed to stay the same over time.
Policy rank (1=primary, 2=secondary, 3=tertiary)
Relationship of the patient to the insured person
self, child, spouse, other Policy start date
Carrier state code
2Current status of the policy
active, inactive Carrier suite/unit number
40For internal use only
For internal use only
100Carrier ZIP code
10Response
Successful Response
Was this page helpful?
curl --request PUT \
--url https://sandbox.elationemr.com/api/2.0/patients/{patient_id}/policies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"patient_dob": "2023-12-25",
"patient_first_name": "<string>",
"patient_last_name": "<string>",
"address": "<string>",
"carrier_id": 123,
"carrier_name": "<string>",
"city": "<string>",
"copay": "<string>",
"county_code": "<string>",
"deductible": "<string>",
"end_date": "2023-12-25",
"extension": "<string>",
"group_id": "<string>",
"id": 123,
"insured_person_address": "<string>",
"insured_person_city": "<string>",
"insured_person_dob": "2023-12-25",
"insured_person_first_name": "<string>",
"insured_person_id": "<string>",
"insured_person_last_name": "<string>",
"insured_person_sex_at_birth": "<string>",
"insured_person_ssn": "<string>",
"insured_person_state": "<string>",
"insured_person_zip": "<string>",
"medicare_secondary_code": "<string>",
"member_id": "<string>",
"phone": "<string>",
"plan_id": 123,
"plan_name": "<string>",
"practice_id": 123,
"rank": 123,
"relationship_to_insured": "self",
"start_date": "2023-12-25",
"state": "<string>",
"suite": "<string>",
"vendor_company_id": 123,
"vendor_external_id": "<string>",
"zip": "<string>"
}
]
'import requests
url = "https://sandbox.elationemr.com/api/2.0/patients/{patient_id}/policies"
payload = [
{
"patient_dob": "2023-12-25",
"patient_first_name": "<string>",
"patient_last_name": "<string>",
"address": "<string>",
"carrier_id": 123,
"carrier_name": "<string>",
"city": "<string>",
"copay": "<string>",
"county_code": "<string>",
"deductible": "<string>",
"end_date": "2023-12-25",
"extension": "<string>",
"group_id": "<string>",
"id": 123,
"insured_person_address": "<string>",
"insured_person_city": "<string>",
"insured_person_dob": "2023-12-25",
"insured_person_first_name": "<string>",
"insured_person_id": "<string>",
"insured_person_last_name": "<string>",
"insured_person_sex_at_birth": "<string>",
"insured_person_ssn": "<string>",
"insured_person_state": "<string>",
"insured_person_zip": "<string>",
"medicare_secondary_code": "<string>",
"member_id": "<string>",
"phone": "<string>",
"plan_id": 123,
"plan_name": "<string>",
"practice_id": 123,
"rank": 123,
"relationship_to_insured": "self",
"start_date": "2023-12-25",
"state": "<string>",
"suite": "<string>",
"vendor_company_id": 123,
"vendor_external_id": "<string>",
"zip": "<string>"
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
patient_dob: '2023-12-25',
patient_first_name: '<string>',
patient_last_name: '<string>',
address: '<string>',
carrier_id: 123,
carrier_name: '<string>',
city: '<string>',
copay: '<string>',
county_code: '<string>',
deductible: '<string>',
end_date: '2023-12-25',
extension: '<string>',
group_id: '<string>',
id: 123,
insured_person_address: '<string>',
insured_person_city: '<string>',
insured_person_dob: '2023-12-25',
insured_person_first_name: '<string>',
insured_person_id: '<string>',
insured_person_last_name: '<string>',
insured_person_sex_at_birth: '<string>',
insured_person_ssn: '<string>',
insured_person_state: '<string>',
insured_person_zip: '<string>',
medicare_secondary_code: '<string>',
member_id: '<string>',
phone: '<string>',
plan_id: 123,
plan_name: '<string>',
practice_id: 123,
rank: 123,
relationship_to_insured: 'self',
start_date: '2023-12-25',
state: '<string>',
suite: '<string>',
vendor_company_id: 123,
vendor_external_id: '<string>',
zip: '<string>'
}
])
};
fetch('https://sandbox.elationemr.com/api/2.0/patients/{patient_id}/policies', 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://sandbox.elationemr.com/api/2.0/patients/{patient_id}/policies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
[
'patient_dob' => '2023-12-25',
'patient_first_name' => '<string>',
'patient_last_name' => '<string>',
'address' => '<string>',
'carrier_id' => 123,
'carrier_name' => '<string>',
'city' => '<string>',
'copay' => '<string>',
'county_code' => '<string>',
'deductible' => '<string>',
'end_date' => '2023-12-25',
'extension' => '<string>',
'group_id' => '<string>',
'id' => 123,
'insured_person_address' => '<string>',
'insured_person_city' => '<string>',
'insured_person_dob' => '2023-12-25',
'insured_person_first_name' => '<string>',
'insured_person_id' => '<string>',
'insured_person_last_name' => '<string>',
'insured_person_sex_at_birth' => '<string>',
'insured_person_ssn' => '<string>',
'insured_person_state' => '<string>',
'insured_person_zip' => '<string>',
'medicare_secondary_code' => '<string>',
'member_id' => '<string>',
'phone' => '<string>',
'plan_id' => 123,
'plan_name' => '<string>',
'practice_id' => 123,
'rank' => 123,
'relationship_to_insured' => 'self',
'start_date' => '2023-12-25',
'state' => '<string>',
'suite' => '<string>',
'vendor_company_id' => 123,
'vendor_external_id' => '<string>',
'zip' => '<string>'
]
]),
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://sandbox.elationemr.com/api/2.0/patients/{patient_id}/policies"
payload := strings.NewReader("[\n {\n \"patient_dob\": \"2023-12-25\",\n \"patient_first_name\": \"<string>\",\n \"patient_last_name\": \"<string>\",\n \"address\": \"<string>\",\n \"carrier_id\": 123,\n \"carrier_name\": \"<string>\",\n \"city\": \"<string>\",\n \"copay\": \"<string>\",\n \"county_code\": \"<string>\",\n \"deductible\": \"<string>\",\n \"end_date\": \"2023-12-25\",\n \"extension\": \"<string>\",\n \"group_id\": \"<string>\",\n \"id\": 123,\n \"insured_person_address\": \"<string>\",\n \"insured_person_city\": \"<string>\",\n \"insured_person_dob\": \"2023-12-25\",\n \"insured_person_first_name\": \"<string>\",\n \"insured_person_id\": \"<string>\",\n \"insured_person_last_name\": \"<string>\",\n \"insured_person_sex_at_birth\": \"<string>\",\n \"insured_person_ssn\": \"<string>\",\n \"insured_person_state\": \"<string>\",\n \"insured_person_zip\": \"<string>\",\n \"medicare_secondary_code\": \"<string>\",\n \"member_id\": \"<string>\",\n \"phone\": \"<string>\",\n \"plan_id\": 123,\n \"plan_name\": \"<string>\",\n \"practice_id\": 123,\n \"rank\": 123,\n \"relationship_to_insured\": \"self\",\n \"start_date\": \"2023-12-25\",\n \"state\": \"<string>\",\n \"suite\": \"<string>\",\n \"vendor_company_id\": 123,\n \"vendor_external_id\": \"<string>\",\n \"zip\": \"<string>\"\n }\n]")
req, _ := http.NewRequest("PUT", 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.put("https://sandbox.elationemr.com/api/2.0/patients/{patient_id}/policies")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"patient_dob\": \"2023-12-25\",\n \"patient_first_name\": \"<string>\",\n \"patient_last_name\": \"<string>\",\n \"address\": \"<string>\",\n \"carrier_id\": 123,\n \"carrier_name\": \"<string>\",\n \"city\": \"<string>\",\n \"copay\": \"<string>\",\n \"county_code\": \"<string>\",\n \"deductible\": \"<string>\",\n \"end_date\": \"2023-12-25\",\n \"extension\": \"<string>\",\n \"group_id\": \"<string>\",\n \"id\": 123,\n \"insured_person_address\": \"<string>\",\n \"insured_person_city\": \"<string>\",\n \"insured_person_dob\": \"2023-12-25\",\n \"insured_person_first_name\": \"<string>\",\n \"insured_person_id\": \"<string>\",\n \"insured_person_last_name\": \"<string>\",\n \"insured_person_sex_at_birth\": \"<string>\",\n \"insured_person_ssn\": \"<string>\",\n \"insured_person_state\": \"<string>\",\n \"insured_person_zip\": \"<string>\",\n \"medicare_secondary_code\": \"<string>\",\n \"member_id\": \"<string>\",\n \"phone\": \"<string>\",\n \"plan_id\": 123,\n \"plan_name\": \"<string>\",\n \"practice_id\": 123,\n \"rank\": 123,\n \"relationship_to_insured\": \"self\",\n \"start_date\": \"2023-12-25\",\n \"state\": \"<string>\",\n \"suite\": \"<string>\",\n \"vendor_company_id\": 123,\n \"vendor_external_id\": \"<string>\",\n \"zip\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.elationemr.com/api/2.0/patients/{patient_id}/policies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"patient_dob\": \"2023-12-25\",\n \"patient_first_name\": \"<string>\",\n \"patient_last_name\": \"<string>\",\n \"address\": \"<string>\",\n \"carrier_id\": 123,\n \"carrier_name\": \"<string>\",\n \"city\": \"<string>\",\n \"copay\": \"<string>\",\n \"county_code\": \"<string>\",\n \"deductible\": \"<string>\",\n \"end_date\": \"2023-12-25\",\n \"extension\": \"<string>\",\n \"group_id\": \"<string>\",\n \"id\": 123,\n \"insured_person_address\": \"<string>\",\n \"insured_person_city\": \"<string>\",\n \"insured_person_dob\": \"2023-12-25\",\n \"insured_person_first_name\": \"<string>\",\n \"insured_person_id\": \"<string>\",\n \"insured_person_last_name\": \"<string>\",\n \"insured_person_sex_at_birth\": \"<string>\",\n \"insured_person_ssn\": \"<string>\",\n \"insured_person_state\": \"<string>\",\n \"insured_person_zip\": \"<string>\",\n \"medicare_secondary_code\": \"<string>\",\n \"member_id\": \"<string>\",\n \"phone\": \"<string>\",\n \"plan_id\": 123,\n \"plan_name\": \"<string>\",\n \"practice_id\": 123,\n \"rank\": 123,\n \"relationship_to_insured\": \"self\",\n \"start_date\": \"2023-12-25\",\n \"state\": \"<string>\",\n \"suite\": \"<string>\",\n \"vendor_company_id\": 123,\n \"vendor_external_id\": \"<string>\",\n \"zip\": \"<string>\"\n }\n]"
response = http.request(request)
puts response.read_body{
"results": [
{
"hippospace": "<string>",
"id": 123,
"patient_dob": "2023-12-25",
"patient_first_name": "<string>",
"patient_id": 123,
"patient_last_name": "<string>",
"practice_id": 123,
"status": "active",
"address": "<string>",
"back_image_path": "<string>",
"can_check_eligibility": false,
"carrier_id": 123,
"carrier_name": "<string>",
"city": "<string>",
"copay": "<string>",
"county_code": "<string>",
"deductible": "<string>",
"end_date": "2023-12-25",
"extension": "<string>",
"front_image_path": "<string>",
"group_id": "<string>",
"insured_person_address": "<string>",
"insured_person_city": "<string>",
"insured_person_dob": "2023-12-25",
"insured_person_first_name": "<string>",
"insured_person_id": "<string>",
"insured_person_last_name": "<string>",
"insured_person_sex_at_birth": "<string>",
"insured_person_ssn": "<string>",
"insured_person_state": "<string>",
"insured_person_zip": "<string>",
"is_legacy_insurance": false,
"medicare_secondary_code": "<string>",
"member_id": "<string>",
"payment_program": "medicare_part_b",
"phone": "<string>",
"plan_id": 123,
"plan_name": "<string>",
"rank": 123,
"relationship_to_insured": "self",
"start_date": "2023-12-25",
"state": "<string>",
"suite": "<string>",
"vendor_company_id": 123,
"vendor_external_id": "<string>",
"zip": "<string>"
}
],
"current_page_num": 123,
"next_page_url": "<string>",
"page_first_item_num": 123,
"page_last_item_num": 123,
"previous_page_url": "<string>",
"total_item_count": 123,
"total_page_count": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}