Create Patient Plan
curl --request POST \
--url https://app.silnahealth.com/api/public/v1/patient-plans/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"member_number": "<string>",
"payor_entity_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"plan_order_number": 123,
"group_number": null,
"medicaid_id": null,
"start_date": null,
"end_date": null,
"insurance_type": null,
"source_id": null,
"insurance_card_file_id": null,
"insurance_card_back_file_id": null,
"conflict_behavior": "RAISE_ERROR"
}
'import requests
url = "https://app.silnahealth.com/api/public/v1/patient-plans/"
payload = {
"member_number": "<string>",
"payor_entity_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"plan_order_number": 123,
"group_number": None,
"medicaid_id": None,
"start_date": None,
"end_date": None,
"insurance_type": None,
"source_id": None,
"insurance_card_file_id": None,
"insurance_card_back_file_id": None,
"conflict_behavior": "RAISE_ERROR"
}
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({
member_number: '<string>',
payor_entity_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
patient_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
plan_order_number: 123,
group_number: null,
medicaid_id: null,
start_date: null,
end_date: null,
insurance_type: null,
source_id: null,
insurance_card_file_id: null,
insurance_card_back_file_id: null,
conflict_behavior: 'RAISE_ERROR'
})
};
fetch('https://app.silnahealth.com/api/public/v1/patient-plans/', 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://app.silnahealth.com/api/public/v1/patient-plans/",
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([
'member_number' => '<string>',
'payor_entity_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'patient_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'plan_order_number' => 123,
'group_number' => null,
'medicaid_id' => null,
'start_date' => null,
'end_date' => null,
'insurance_type' => null,
'source_id' => null,
'insurance_card_file_id' => null,
'insurance_card_back_file_id' => null,
'conflict_behavior' => 'RAISE_ERROR'
]),
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://app.silnahealth.com/api/public/v1/patient-plans/"
payload := strings.NewReader("{\n \"member_number\": \"<string>\",\n \"payor_entity_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"patient_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"plan_order_number\": 123,\n \"group_number\": null,\n \"medicaid_id\": null,\n \"start_date\": null,\n \"end_date\": null,\n \"insurance_type\": null,\n \"source_id\": null,\n \"insurance_card_file_id\": null,\n \"insurance_card_back_file_id\": null,\n \"conflict_behavior\": \"RAISE_ERROR\"\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://app.silnahealth.com/api/public/v1/patient-plans/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"member_number\": \"<string>\",\n \"payor_entity_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"patient_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"plan_order_number\": 123,\n \"group_number\": null,\n \"medicaid_id\": null,\n \"start_date\": null,\n \"end_date\": null,\n \"insurance_type\": null,\n \"source_id\": null,\n \"insurance_card_file_id\": null,\n \"insurance_card_back_file_id\": null,\n \"conflict_behavior\": \"RAISE_ERROR\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.silnahealth.com/api/public/v1/patient-plans/")
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 \"member_number\": \"<string>\",\n \"payor_entity_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"patient_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"plan_order_number\": 123,\n \"group_number\": null,\n \"medicaid_id\": null,\n \"start_date\": null,\n \"end_date\": null,\n \"insurance_type\": null,\n \"source_id\": null,\n \"insurance_card_file_id\": null,\n \"insurance_card_back_file_id\": null,\n \"conflict_behavior\": \"RAISE_ERROR\"\n}"
response = http.request(request)
puts response.read_body{
"patient_plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"message": "<string>"
}{
"message": "<string>",
"type": "AUTH_INVALID_REQUEST_HEADER"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Plans
Create Patient Plan
POST
/
public
/
v1
/
patient-plans
/
Create Patient Plan
curl --request POST \
--url https://app.silnahealth.com/api/public/v1/patient-plans/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"member_number": "<string>",
"payor_entity_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"plan_order_number": 123,
"group_number": null,
"medicaid_id": null,
"start_date": null,
"end_date": null,
"insurance_type": null,
"source_id": null,
"insurance_card_file_id": null,
"insurance_card_back_file_id": null,
"conflict_behavior": "RAISE_ERROR"
}
'import requests
url = "https://app.silnahealth.com/api/public/v1/patient-plans/"
payload = {
"member_number": "<string>",
"payor_entity_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"plan_order_number": 123,
"group_number": None,
"medicaid_id": None,
"start_date": None,
"end_date": None,
"insurance_type": None,
"source_id": None,
"insurance_card_file_id": None,
"insurance_card_back_file_id": None,
"conflict_behavior": "RAISE_ERROR"
}
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({
member_number: '<string>',
payor_entity_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
patient_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
plan_order_number: 123,
group_number: null,
medicaid_id: null,
start_date: null,
end_date: null,
insurance_type: null,
source_id: null,
insurance_card_file_id: null,
insurance_card_back_file_id: null,
conflict_behavior: 'RAISE_ERROR'
})
};
fetch('https://app.silnahealth.com/api/public/v1/patient-plans/', 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://app.silnahealth.com/api/public/v1/patient-plans/",
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([
'member_number' => '<string>',
'payor_entity_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'patient_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'plan_order_number' => 123,
'group_number' => null,
'medicaid_id' => null,
'start_date' => null,
'end_date' => null,
'insurance_type' => null,
'source_id' => null,
'insurance_card_file_id' => null,
'insurance_card_back_file_id' => null,
'conflict_behavior' => 'RAISE_ERROR'
]),
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://app.silnahealth.com/api/public/v1/patient-plans/"
payload := strings.NewReader("{\n \"member_number\": \"<string>\",\n \"payor_entity_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"patient_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"plan_order_number\": 123,\n \"group_number\": null,\n \"medicaid_id\": null,\n \"start_date\": null,\n \"end_date\": null,\n \"insurance_type\": null,\n \"source_id\": null,\n \"insurance_card_file_id\": null,\n \"insurance_card_back_file_id\": null,\n \"conflict_behavior\": \"RAISE_ERROR\"\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://app.silnahealth.com/api/public/v1/patient-plans/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"member_number\": \"<string>\",\n \"payor_entity_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"patient_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"plan_order_number\": 123,\n \"group_number\": null,\n \"medicaid_id\": null,\n \"start_date\": null,\n \"end_date\": null,\n \"insurance_type\": null,\n \"source_id\": null,\n \"insurance_card_file_id\": null,\n \"insurance_card_back_file_id\": null,\n \"conflict_behavior\": \"RAISE_ERROR\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.silnahealth.com/api/public/v1/patient-plans/")
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 \"member_number\": \"<string>\",\n \"payor_entity_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"patient_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"plan_order_number\": 123,\n \"group_number\": null,\n \"medicaid_id\": null,\n \"start_date\": null,\n \"end_date\": null,\n \"insurance_type\": null,\n \"source_id\": null,\n \"insurance_card_file_id\": null,\n \"insurance_card_back_file_id\": null,\n \"conflict_behavior\": \"RAISE_ERROR\"\n}"
response = http.request(request)
puts response.read_body{
"patient_plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"message": "<string>"
}{
"message": "<string>",
"type": "AUTH_INVALID_REQUEST_HEADER"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}How to get the payor_entity_id
Use the Get Payors API.Handling Conflicts
Using theconflict_behavior field allows you to configure how existing plans are handled when a patient plan already
exists at the specified plan_order_number.
- The default is
RAISE_ERRORand will return a Conflict Error (http status of 409) BUMP_ONEwill move the existing plan at the specified order to the next order number. For example, if you create a new primary plan (order 1) and a primary plan already exists, the existing plan will be moved to secondary (order 2). Note that this will fail with a Conflict Error (409) if the next order number is also occupied.
Medicaid ID
A plan can carry the patient’s state Medicaid ID inmedicaid_id. It is optional and must be 2-80 characters.
medicaid_id is only allowed when insurance_type is MEDICAID.
A request that fails the insurance type validation will receive a 400 response, and no plan is created.
Create Patient Plan With Insurance Card
If you want to create a patient plan with an insurance card, you will need to do the following steps:- Upload the front of the insurance card to the File Upload API and get the
file_idfrom the response. - Upload the back of the insurance card to the File Upload API and get the
file_idfrom the response. - Make a post request to this api with the
file_idsreturned from 1 and 2 as theinsurance_card_file_idandinsurance_card_back_file_id, respectively.
Authorizations
Body
application/json
How to handle a conflict when a patient plan already exists at the specified plan_order_number. RAISE_ERROR (default) will return a 409 Conflict error. BUMP_ONE will move the existing plan at the specified order to the next order number (e.g., primary becomes secondary).
Available options:
RAISE_ERROR, BUMP_ONE