Skip to main content
Python
import requests
import json

url = 'https://api.simplex.sh/pa_fax_fill_form'
headers = {
    'Authorization': 'Bearer your_api_key_here'
}

patient = {
    'name': 'Michael Chen',
    'dob': '1985-03-14',
    'id': 'WLR482913057',
    'address': '4200 Cedar Springs Rd',
    'city': 'Dallas',
    'state': 'TX',
    'zip': '75201',
    'home_phone': '214-555-0173',
    'gender': 'M'
}
prescriber = {
    'name': 'Ravi Patel',
    'npi': '1528074691',
    'address': '8700 Beverly Blvd Ste 310',
    'city': 'Los Angeles',
    'state': 'CA',
    'zip': '90048',
    'office_phone': '310-555-0142',
    'fax': '310-555-0143',
    'contact_person': 'Lisa Nguyen'
}
drug_info = {
    'medication_strength': 'Ozempic 1 mg/dose',
    'directions_frequency': 'Inject 1 mg subcutaneously once weekly',
    'expected_length_therapy': '12 months',
    'qty': 2,
    'day_supply': 28,
    'icd10_diagnosis': 'E11.9',
    'route_of_administration': 'Subcutaneous',
    'expedited_urgent_review': False
}
clinical_questions = [
    {'question_id': 'cont_therapy_q1', 'answer': 'Yes'},
    {'question_id': 'cont_therapy_q3', 'answer': '4 months'},
    {'question_id': 'fda_approved_indication', 'answer': 'Yes'}
]

data = {
    'form_id': 'aetna_pa_rx_2024_v3',
    'patient': json.dumps(patient),
    'prescriber': json.dumps(prescriber),
    'drug_info': json.dumps(drug_info),
    'clinical_questions': json.dumps(clinical_questions)
}
files = [
    ('documents', ('chart_notes.pdf', open('chart_notes.pdf', 'rb'), 'application/pdf')),
    ('documents', ('labs.pdf', open('labs.pdf', 'rb'), 'application/pdf'))
]

response = requests.post(url, headers=headers, data=data, files=files)
result = response.json()
print(f"Form UUID: {result['form_uuid']}")
print(f"Preview PDF: {result['signed_url']}")
{
  "succeeded": true,
  "form_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "signed_url": "<string>",
  "expires_at": "2023-11-07T05:31:56Z"
}
Fills a prior authorization fax form with patient, prescriber, drug, and clinical-question data. Returns a form_uuid and a signed URL to preview the filled PDF. Review the PDF first, then call Submit Form with the form_uuid to transmit.
clinical_questions is an array of {question_id, answer} pairs. Use Get Clinical Questions to retrieve the required question_ids and expected answer types for the patient’s diagnosis and plan.
documents accepts optional file uploads — chart notes, lab results, or any supporting documentation the payer requires. Files are appended to the fax.

Authorizations

X-API-Key
string
header
required

Simplex API Key

Body

multipart/form-data
form_id
string
required

Identifier of the form to fill, as returned by the Get Form endpoint (e.g. "aetna_pa_rx_2024_v3").

patient
object
required

Patient demographics written to the fax form. Supplied as a JSON string in the patient multipart field.

prescriber
object
required

Prescriber information written to the fax form. Supplied as a JSON string in the prescriber multipart field.

drug_info
object
required

Requested drug details written to the fax form. Supplied as a JSON string in the drug_info multipart field.

clinical_questions
object[]

Answers to the form's clinical questions. Use Get Clinical Questions to retrieve the question_id values for the patient's diagnosis and plan; the answer format must match the question's expected type (boolean → "Yes"/"No", free text → string, etc.).

documents
file[]

Optional supporting documents (chart notes, lab results, imaging) to append to the fax.

Response

200 - application/json

Fill fax form response

succeeded
boolean
required

Whether the form was filled successfully.

form_uuid
string<uuid>
required

UUID of the filled form. Pass this to Submit Form to transmit and to Check Status to track.

signed_url
string<url>
required

Time-limited signed URL to preview the filled PDF. Use this to review the form before submitting.

expires_at
string<date-time>

When the signed URL expires.