BestRx APIs
Contact Us
  1. Realtime Data Feed Specification
  • 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. Realtime Data Feed Specification

E-Prescription Notification Callback

INFO
Used to send data to the TPP’s external environment whenever an e-prescription is received in BestRx.

Root Fields#

Field NameTypeNotes
APIKeystringOptional field that can be used for authentication purposes. It’s up to the receiving partner whether this field will be required or not.
ExternalIDstringThe Message ID of the e-prescription message
PharmacyReceivedDatedateDate/time the pharmacy received the e-prescription message
PrescriberSentDatedateDate/time the prescriber sent the e-prescription message
WrittenDatedateWritten date of the prescription
EffectivedatedateEffective date of the prescription
NotesstringNotes from the prescriber
PharmacyobjectInformation about the pharmacy. Please see the Pharmacy section for more info.
PatientobjectInformation about the patient. Please see the Patient section for more info.
PrescriberobjectInformation about the prescriber. Please see the Prescriber section for more info.
MedicationobjectInformation about the medication prescribed. Please see the Medication section for more info.
ERxMessagestringBase64 encoded string of the raw XML data received for the e-prescription message

Pharmacy#

Field NameTypeNotes
NamestringName of the pharmacy
NPIstringNPI of the pharmacy
NCPDPstringNCPDP of the pharmacy
DEAstringDEA of the pharmacy
AddressobjectAddress of the pharmacy. Please see the Address section for more info.
PhonestringPhone number of the pharmacy (no dashes)
FaxstringFax number of the pharmacy (no dashes)
WebsitestringWebsite of the pharmacy
DispenseMethodstringDispense method

Patient#

Field NameTypeNotes
FirstNamestringPatient first name
LastNamestringPatient last name
MiddleNamestringPatient middle name
DOBdatePatient Date of Birth (formatted YYYY-MM-DD)
GenderstringPatient Gender (M/F/N) **N=Non-Binary
CellNumberstringPatient cell phone number
AddressobjectAddress of the patient. Please see the Address section for more info.
InsurancearrayInsurance info for the patient. Please see the Insurance section for more info.

Prescriber#

Field NameTypeNotes
NPIstringPrescriber’s NPI number
DEAstringPrescriber’s DEA number
FirstNamestringPrescriber first name
LastNamestringPrescriber last name
AddressobjectAddress of the prescriber. Please see the Address section for more info.
SpecialtystringPrescriber’s specialty
OfficePhonestringPhone Number (no dashes)

Medication#

Field NameTypeNotes
DrugNamestringName of the medication prescribed
DrugNDCstringNDC of the medication prescribed (no dashes). Pharmacy does not have to dispense this exact NDC, they can dispense an equivalent if needed.
QuantitydecimalQuantity prescriber per fill
QuantityUnitstringUnit of measure for the quantity
DaysSupplyintegerDays that each fill is intended to last
RefillsintegerNumber of refills authorized for the prescription
DirectionsstringSIG directions on how to take the medication
DeliveryMethodstring
AllowSubstitutionstring“True” or “False” indicating if the brand can be substituted for a generic

Address#

Field NameTypeNotes
Address1string
Address2string
Citystring
Statestring2 char state abbreviation (ex. IL)
ZipstringNo dashes

Insurance#

Field NameTypeNotes
MemberIDstringPatient’s Cardholder ID Number
GroupstringPatient’s Group Number
BINstringInsurance BIN
PCNstringInsurance PCN
SEQNOstringNumber indicating sequence of insurance (ex: “1” or “2”)

Example#

{
  "APIKey": "5ce9ec4c8a3d5255d790cc11d6a778ec9e5aa1fb",
  "ExternalID": "EMA1f73e89ea90b4bbaa004879ed3639b1e",
  "PharmacyReceivedDate": "2020-10-28T14:34:54.000Z",
  "PrescriberSentDate": "2020-10-28T14:31:17.000Z",
  "WrittenDate": "2020-10-28T00:00:00.000Z",
  "Effectivedate": "2020-10-28T00:00:00.000Z",
  "Notes": "Suggested Packaging: 100.0 Grams can.",
  "Pharmacy": {
    "Name": "BestRx Pharmacy",
    "NPI": "1234567890",
    "NCPDP": "1234567",
    "DEA": "BR1234563",
    "Address": {
      "Address1": "1200 Jorie Blvd",
      "Address2": "Suite 310",
      "City": "Oak Brook",
      "State": "IL",
      "ZipCode": "60523"
    },
    "Phone": "6308939210",
    "Fax": "6303393171",
    "Website": "www.bestrx.com",
    "DispenseMethod": "P,D,S"
  },
  "Patient": {
    "FirstName": "Elizabeth",
    "LastName": "Harmon",
    "MiddleName": "",
    "DOB": "1983-02-07",
    "Gender": "F",
    "CellNumber": "3125554897",
    "Address": {
      "Address1": "920 N Dearborn",
      "Address2": "Apt 2107",
      "City": "Chicago",
      "State": "IL",
      "ZipCode": "60654"
    },
    "Insurance": [
      {
        "MemberID": "888877776666",
        "Group": "RX4444444",
        "BIN": "123456",
        "PCN": "ABC123",
        "SEQNO": "1"
      },
      {
        "MemberID": "222233334444",
        "Group": "22221111",
        "BIN": "610280",
        "PCN": "",
        "SEQNO": "2"
      }                 
   ]
  },
  "Prescriber": {
    "NPI": "9876543210",
    "DEA": "BB1234563",
    "FirstName": "Vasily",
    "LastName": "Borgov",
    "Address": {
      "Address1": "115 Medical Center Ln",
      "Address2": "Second Floor",
      "City": "Chicago",
      "State": "IL",
      "ZipCode": "60612"
    },
    "Specialty": "",
    "OfficePhone": "7732229999"
  },
  "Medication": {
    "DrugName": "Clobetasol 0.05 % topical foam",
    "DrugNDC": "00378816701",
    "Quantity": 1.0,
    "QuantityUnit": "Container",
    "DaysSupply": 30,
    "Refills": 2,
    "Directions": "Apply to the aa of the scalp bid x 1 month",
    "DeliveryMethod": "",
    "AllowSubstitution": "True"
  }
  "ERxMessage": <base64-encoded-message>
}
Modified at 2024-05-15 23:11:04
Previous
Patient Update Callback
Next
Prescription Update Callback