BestRx APIs
Contact Us
  1. Patient API
  • Introduction - BestRx APIs
  • Patient API
    • Overview
    • Error Codes
    • Add Patient
      POST
    • Update Patient
      POST
    • Get Patient
      POST
    • Submit Charge Account Payment
      POST
  • Drug API
    • Overview
    • Error Codes
    • Get Drug Information
      POST
  • Prescription API
    • Overview
    • Error Codes
    • Submit Rx Transfer Request
      POST
    • Return to Stock
      POST
    • Save Rx Signature
      POST
  • Refill API
    • Overview
    • Error Codes
    • GetPatientProfile
      POST
    • Send Refill Request
      POST
  • BestPOS API
    • Overview
    • Error Codes
    • Create POS Transaction
      POST
    • Get POS Transaction Status
      POST
    • Get Item Details
      POST
  • Delivery/Shipping Provider API
    • Overview
    • Error Codes
    • Address Validation
    • Create Order
    • Update Order Status
    • Cancel Order
  • Realtime Data Feed Specification
    • Overview
    • Patient Update Callback
    • E-Prescription Notification Callback
    • Prescription Update Callback
  1. Patient API

Update Patient

POST
https://dataservice.bestrxconnect.com/patient/updatepatient
INFO
This endpoint is used to update an existing patient in the BestRx System.

Request

Body Params application/json
unique_patient_id
integer 
required
Unique Patient ID (Patient Record Number)
Example:
123456
allow_duplicate
boolean 
optional
Allow to create duplicate patient or Not (Allowed Values: TRUE or FALSE)
Default:
false
relates_to_patient_id
integer  | null 
optional
Patient record number of an existing family member (head of house). Links patient to an existing patient (or family)
Example:
12345
last_name
string 
required
Patient Last Name
Example:
Kennedy
middle_name
string  | null 
optional
Patient Middle Name
Example:
Fitzgerald
first_name
string 
required
Patient First Name
Example:
John
name_prefix
string  | null 
optional
Patient Name Prefix
Example:
Mr
name_suffix
string  | null 
optional
Patient Name Suffix
Example:
Jr
dob
string 
required
Patient Date of Birth (YYYY-MM-DD or ISO 8601 Format)
Examples:
1917-05-291917-05-29T00:00:00
gender
enum<string> 
required
Patient Gender
Allowed values:
MF12
Example:
M
address1
string  | null 
optional
Patient Address1. Required fields for a valid adress are: 'address1', 'city', 'state' and 'zipcode'. Either provide details for all these 4 fields OR None.
Example:
1234, First Street
address2
string  | null 
optional
Patient Address2
Example:
Apt 107
city
string  | null 
optional
Patient City
Example:
OAK BROOK
state
string  | null 
optional
Patient State (2 Characters Only)
Example:
IL
Match pattern:
A-Za-z
county
string  | null 
optional
Patient County
Example:
Cook
zipcode
string  | null 
optional
Patient Zip Code (5 or 9 Digits without Hyphen '-')
Examples:
60523605231234
Match pattern:
0-9
country_code
string  | null 
optional
Patient Country Code
>= 2 characters<= 3 characters
Examples:
USUSA
Match pattern:
A-Za-z
home_phone
string  | null 
optional
Patient Home Phone
Example:
9876543210
Match pattern:
0-9
work_phone
string  | null 
optional
Patient Work Phone
Example:
9876543210
Match pattern:
0-9
cell_phone
string  | null 
optional
Patient Cell Phone
Example:
9876543210
Match pattern:
0-9
fax_number
string  | null 
optional
Patient Fax Number
Example:
9876543210
Match pattern:
0-9
family_email
string <email> | null 
optional
Patient Family Email
Example:
family@email.com
patient_email
string <email> | null 
optional
Patient Email
Example:
patient@email.com
marital_status
enum<string>  | enum<null> 
optional
Patient Marital Status
Allowed values:
SMWD
Example:
S
bill_last_name
string  | null 
optional
Patient Billing Last Name
Example:
Kennedy
bill_first_name
string  | null 
optional
Patient Billing First Name
Example:
John
bill_address_careof
string  | null 
optional
Care of (C/O) Name
Example:
John F. Kennedy
bill_address1
string  | null 
optional
Patient Billing Address1
Example:
3423, FIRST STREET
bill_address2
string  | null 
optional
Patient Billing Address2
Example:
Apt 107
bill_address_city
string  | null 
optional
Patient Billing Address City
Example:
OAK BROOK
bill_address_state
string  | null 
optional
Patient Billing Address State (2 Characters Only)
Example:
IL
Match pattern:
A-Za-z
bill_address_zipcode
string  | null 
optional
Patient Billing Address Zip Code (5 or 9 Digits without Hyphen '-')
Examples:
60523605231234
Match pattern:
0-9
bill_phone
string  | null 
optional
Patient Billing Phone
Example:
9876543210
Match pattern:
0-9
patient_id_qualifier
enum<string>  | enum<null> 
optional
Patient ID Qualifier (e.g., Driver's License)
Allowed values:
01020304050607080910111213141JEAUI99
Example:
01
patient_id
string  | null 
optional
Patient ID (e.g., Driver's License Number: P123-4567-8900)
Example:
P123-4567-8900
social_security_number
string  | null 
optional
Patient Social Security Number (without Hyphen '-')
>= 9 characters<= 9 characters
Example:
123456789
smoker
boolean  | null 
optional
Patient is Smoker or Not (Allowed Values: TRUE or FALSE)
loyalty_number
string  | null 
optional
Patient Loyalty Number
<= 20 characters
Example:
123456
residence_code
enum<string>  | enum<null> 
optional
Residence Code (e.g., 01- Home)
Allowed values:
00010203040506070809101112131415
Example:
01
dispense_by
enum<string>  | enum<null> 
optional
Dispense By (e.g., P - Pickup, D - Delivery, M - Mail)
Allowed values:
PDM
Example:
P
340B_patient
boolean 
optional
340B Patient or Not (Allowed Values: TRUE or FALSE)
Default:
false
is_pet
boolean 
optional
Patient is Pet or Not (Allowed Values: TRUE or FALSE)
Default:
false
pet_name
string  | null 
optional
Pet Name
patient_short_remark
string  | null 
optional
Patient Short Remark
<= 25 characters
Example:
Test Short Remark
patient_remark
string  | null 
optional
Patient Remark
<= 1000 characters
Example:
Patient Remark
family_remark
string  | null 
optional
Family Remark
<= 1000 characters
Example:
Family Remark
is_active
boolean 
optional
Patient is Active or Not (Allowed Values: TRUE or FALSE)
Default:
true
is_deceased
boolean 
optional
Patient is Deceased or Not (Allowed Values: TRUE or FALSE)
Default:
false
language
enum<string> 
optional
Patient Language
Allowed values:
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42EnglishSpanishArabicBengaliChineseHaitian_CreoleFrenchGujaratiHindiKoreanPolishRussianUrduVietnameseHebrewPersianBosnianItalianGreekGermanPortugueseTagalogJapaneseArmenianFarsiPashtoAmharicBurmeseNepaliRomanianSomaliSwahiliBurmese_SunsettingEOY2022Burmese_StartingJan2022ChineseSimplified_MandarinChineseTraditional_MandarinChineseTraditional_CantoneseHmongWhiteKarenKhmerLaoPortuguese_BrazilianYiddish
Default:
0
Example:
English
patient_race
enum<string> 
optional
Patient Race
Allowed values:
123456IndigenousAsianAfricanAmericanPacificIslanderWhiteOther
Example:
Indigenous
patient_ethnicity
enum<string> 
optional
Patient Ethnicity
Allowed values:
123HispanicNonHispanicUnknown
Example:
Hispanic
PharmacyNumber
string  | null 
required
Pharmacy NPI Number. Either 'PharmacyNumber' OR 'PharmacyNCPDP' is required.
Example:
1234567890
PharmacyNCPDP
string  | null 
required
Pharmacy NCPDP Number. Either 'PharmacyNumber' OR 'PharmacyNCPDP' is required.
Example:
1234567
Allergies
array [object {3}]  | null 
optional
Allergy Details
alg_qualifier
string  | null 
optional
Allergy Qualifier. Only MSKDC qualifier will be considered as valid qualifier for patient allergies.
Default:
MSKDC
Example:
MSKDC
alg_code
string  | null 
optional
Allergy Code
>= 5 characters
Example:
00032
alg_description
string  | null 
optional
Description of Allergy
Example:
Aloprim
insurance_plans
array [object {21}] 
optional
Insurance Plan Details
ins_bin
string 
optional
Insurance Bin Number
Example:
610084
ins_pcn
string  | null 
optional
Insurance PCN Number
Example:
DRTXPROD
ins_code
string  | null 
optional
Insurance Code (Insurance Name Abbreviation)
Example:
BCBSIL
ins_name
string  | null 
optional
Insurance Name
Example:
Blue Cross Blue Shield of Illinois
ins_address1
string  | null 
optional
Insurance Address1
Example:
1234 SOME STREET
ins_address2
string  | null 
optional
Insurance Address2
Example:
Suite 3
ins_city
string  | null 
optional
Insurance City
Example:
Chicago
ins_state
string  | null 
optional
Insurance State (2 Characters Only)
Example:
IL
Match pattern:
A-Za-z
ins_zipcode
string  | null 
optional
Insurance Zip Code (5 or 9 Digits without Hyphen '-')
Examples:
60523605231234
Match pattern:
0-9
ins_phone
string 
optional
Insurance Phone
Example:
1234567890
Match pattern:
0-9
ins_remark
string  | null 
optional
Insurance Remark
Example:
Insurance Test Remark
ins_fax_number
string 
optional
Insurance Fax Number
Example:
1234567890
Match pattern:
0-9
ins_alternate_phone
string 
optional
Insurance Alternate Phone Number
Example:
1234567890
Match pattern:
0-9
ins_email
string <email> | null 
optional
Insurance Email
Example:
insurance@email.com
ins_insurancegroupname
string  | null 
optional
Insurance Group Name
Example:
Test Group Name
ins_seq_no
integer 
optional
Insurance Sequence Number (Use Incremental Sequence Number while Adding Multiple Patient Insurances)
Default:
1
Example:
1
ins_cardholder_id
string 
optional
Insurance Card Holder ID
Example:
1234567890
ins_person_code
string  | null 
optional
Insurance Person Code
Example:
01
ins_relation_code
enum<string> 
optional
Insurance Relation Code
Allowed values:
12345678X
Default:
1
Example:
1
ins_group
string  | null 
optional
Insurance Group
Example:
DRS879
ins_is_primary
boolean 
optional
Insurance is Primary or Not (Allowed Values: TRUE or FALSE)
Example
{
    "unique_patient_id": 123456,
    "allow_duplicate": false,
    "relates_to_patient_id": 12345,
    "last_name": "Kennedy",
    "middle_name": "Fitzgerald",
    "first_name": "John",
    "name_prefix": "Mr",
    "name_suffix": "Jr",
    "dob": "1917-05-29",
    "gender": "M",
    "address1": "1234, First Street",
    "address2": "Apt 107",
    "city": "OAK BROOK",
    "state": "IL",
    "county": "Cook",
    "zipcode": "60523",
    "country_code": "USA",
    "home_phone": "9876543210",
    "work_phone": "9876543210",
    "cell_phone": "9876543210",
    "fax_number": "9876543210",
    "family_email": "family@email.com",
    "patient_email": "patient@email.com",
    "marital_status": "S",
    "bill_last_name": "Kennedy",
    "bill_first_name": "John",
    "bill_address_careof": "John F. Kennedy",
    "bill_address1": "3423, FIRST STREET",
    "bill_address2": "Apt 107",
    "bill_address_city": "OAK BROOK",
    "bill_address_state": "IL",
    "bill_address_zipcode": "605231234",
    "bill_phone": "9876543210",
    "patient_id_qualifier": "01",
    "patient_id": "P123-4567-8900",
    "social_security_number": "123456789",
    "smoker": true,
    "loyalty_number": "123456",
    "residence_code": "01",
    "dispense_by": "P",
    "340B_patient": true,
    "is_pet": false,
    "pet_name": "",
    "patient_short_remark": "Test Short Remark",
    "patient_remark": "Patient Remark",
    "family_remark": "Family Remark",
    "is_active": true,
    "is_deceased": false,
    "language": "English",
    "patient_race": "Indigenous",
    "patient_ethnicity": "Hispanic",
    "PharmacyNumber": "1234567890",
    "PharmacyNCPDP": "1234567",
    "Allergies": [
        {
            "alg_qualifier": "MSKDC",
            "alg_code": "00032",
            "alg_description": "Aloprim"
        }
    ],
    "insurance_plans": [
        {
            "ins_bin": "610084",
            "ins_pcn": "DRTXPROD",
            "ins_code": "BCBSIL",
            "ins_name": "Blue Cross Blue Shield of Illinois",
            "ins_address1": "1234 SOME STREET",
            "ins_address2": "Suite 3",
            "ins_city": "Chicago",
            "ins_state": "IL",
            "ins_zipcode": "605231234",
            "ins_phone": "1234567890",
            "ins_remark": "Insurance Test Remark",
            "ins_fax_number": "1234567890",
            "ins_alternate_phone": "1234567890",
            "ins_email": "insurance@email.com",
            "ins_insurancegroupname": "Test Group Name",
            "ins_seq_no": 1,
            "ins_cardholder_id": "1234567890",
            "ins_person_code": "01",
            "ins_relation_code": "1",
            "ins_group": "DRS879",
            "ins_is_primary": true
        }
    ]
}

Responses

🟢200OK
application/json
Body
Data
object 
required
insurance_plans
array [object {22}]  | null 
required
unique_patient_id
integer 
required
allow_duplicate
boolean 
required
relates_to_patient_id
integer  | null 
required
last_name
string 
required
middle_name
string 
required
first_name
string 
required
name_prefix
string 
required
name_suffix
string 
required
dob
string 
required
gender
integer 
required
address1
string 
required
address2
string 
required
city
string 
required
state
string 
required
county
null 
required
zipcode
string 
required
country_code
string 
required
home_phone
string 
required
work_phone
string 
required
cell_phone
string 
required
fax_number
string 
required
family_email
string 
required
patient_email
string 
required
marital_status
string  | null 
required
bill_last_name
string 
required
bill_first_name
string 
required
bill_address_careof
string 
required
bill_address1
string 
required
bill_address2
string 
required
bill_address_city
string 
required
bill_address_state
string 
required
bill_address_zipcode
string 
required
bill_phone
string 
required
patient_id_qualifier
string 
required
patient_id
string 
required
social_security_number
string 
required
smoker
boolean  | null 
required
loyalty_number
string 
required
residence_code
string 
required
dispense_by
string  | null 
required
340B_patient
boolean 
required
is_pet
boolean 
required
pet_name
string 
required
patient_short_remark
string 
required
patient_remark
string 
required
family_remark
string 
required
is_active
boolean 
required
is_deceased
boolean 
required
language
integer 
required
patient_race
integer 
required
patient_ethnicity
integer 
required
allergies
array [object {3}]  | null 
required
PharmacyNumber
string  | null 
required
PharmacyNCPDP
null 
required
IsValid
boolean 
required
Messages
array[string]
required
Example
{
    "Data": {
        "insurance_plans": [
            {
                "ins_bin": "610084",
                "ins_pcn": "DRTXPROD",
                "ins_code": "BCBSIL",
                "ins_name": "BLUE CROSS BLUE SHIELD OF ILLINOIS",
                "ins_address1": "1234 SOME STREET",
                "ins_address2": "SUITE 3",
                "ins_city": "CHICAGO",
                "ins_state": "IL",
                "ins_zipcode": "605231234",
                "ins_phone": "1234567890",
                "ins_remark": "Insurance Test Remark",
                "ins_fax_number": "1234567890",
                "ins_alternate_phone": "1234567890",
                "ins_email": "insurance@email.com",
                "ins_seq_no": 1,
                "ins_cardholder_id": "1234567890",
                "ins_person_code": "01",
                "ins_relation_code": "1",
                "ins_group": "DRS879",
                "ins_is_primary": true,
                "IsValid": true,
                "Messages": []
            }
        ],
        "unique_patient_id": 123456,
        "allow_duplicate": false,
        "relates_to_patient_id": 12345,
        "last_name": "KENNEDY",
        "middle_name": "FITZGERALD",
        "first_name": "JOHN",
        "name_prefix": "MR",
        "name_suffix": "JR",
        "dob": "1917-05-29T00:00:00",
        "gender": 1,
        "address1": "1234, FIRST STREET",
        "address2": "APT 107",
        "city": "OAK BROOK",
        "state": "IL",
        "county": null,
        "zipcode": "60523",
        "country_code": "US",
        "home_phone": "9876543210",
        "work_phone": "9876543210",
        "cell_phone": "9876543210",
        "fax_number": "9876543210",
        "family_email": "family@email.com",
        "patient_email": "patient@email.com",
        "marital_status": "S",
        "bill_last_name": "KENNEDY",
        "bill_first_name": "JOHN",
        "bill_address_careof": "JOHN F. KENNEDY",
        "bill_address1": "3423, FIRST STREET",
        "bill_address2": "APT 107",
        "bill_address_city": "OAK BROOK",
        "bill_address_state": "IL",
        "bill_address_zipcode": "605231234",
        "bill_phone": "9876543210",
        "patient_id_qualifier": "01",
        "patient_id": "P123-4567-8900",
        "social_security_number": "123456789",
        "smoker": true,
        "loyalty_number": "123456",
        "residence_code": "01",
        "dispense_by": "P",
        "340B_patient": true,
        "is_pet": false,
        "pet_name": "",
        "patient_short_remark": "Test Short Remark",
        "patient_remark": "Patient Remark",
        "family_remark": "Family Remark",
        "is_active": true,
        "is_deceased": false,
        "language": 0,
        "patient_race": 0,
        "patient_ethnicity": 0,
        "allergies": [
            {
                "alg_qualifier": "MSKDC",
                "alg_code": "00032",
                "alg_description": "Aloprim"
            }
        ],
        "PharmacyNumber": "1234567890",
        "PharmacyNCPDP": "1234567"
    },
    "IsValid": true,
    "Messages": []
}
🟠400Bad Request
Modified at 2024-07-25 19:45:09
Previous
Add Patient
Next
Get Patient