Skip to main content
Python
import requests

url = 'https://api.simplex.sh/pa_submit_covermymeds'
headers = {
    'X-API-Key': 'your_api_key_here',
    'Content-Type': 'application/json'
}
data = {
    'credential_name': 'my_covermymeds_creds',
    'type': 'pharmacy',
    'drug_id': '221271',
    'diagnosis_code': 'E11.9',
    'diagnosis_name': 'Type 2 diabetes mellitus without complications',
    'plan': 'Aetna',
    'state': 'CA',
    'patient': {
        'first_name': 'Michael',
        'last_name': 'Chen',
        'dob': '03/14/1985',
        'sex': 'm',
        'zip_code': '75201',
        'state': 'TX',
        'street': '4200 Cedar Springs Rd',
        'city': 'Dallas',
        'phone': '214-555-0173'
    },
    'provider': {
        'npi': '1528074691',
        'first_name': 'Ravi',
        'last_name': 'Patel',
        'address1': '8700 Beverly Blvd Ste 310',
        'city': 'Los Angeles',
        'state': 'CA',
        'zip': '90048',
        'phone': '310-555-0142',
        'fax': '310-555-0143'
    },
    'prescription': {
        'quantity': '1',
        'days_supply': '30'
    }
}

response = requests.post(url, headers=headers, json=data)
result = response.json()
print(f"PA created: {result['success']}")
print(f"PA ID: {result['pa_id']}")
print(f"Status: {result['status']}")
{
  "success": true,
  "pa_id": "<string>",
  "status": "submitted",
  "result_pdf": "<string>"
}

Pre-submission workflow

Before submitting, resolve all identifiers using the pre-submission endpoints:
  1. Search Drugs — resolve the drug into an exact DDID
  2. Search ICD Codes — resolve the diagnosis into an exact ICD-10 code
Submitting with unresolved or incorrect identifiers will result in a rejection. Always use the search endpoints to obtain exact values first.

Authorizations

X-API-Key
string
header
required

Simplex API Key

Body

application/json
credential_name
string
required

The name of the stored credential to authenticate with the portal. Create one via the Create Credential endpoint.

type
enum<string>
required

The type of prior authorization.

Available options:
pharmacy,
medical,
dental
drug_id
string
required

Exact Drug DDID (e.g. "221271"). Obtained from the search_drugs endpoint.

diagnosis_code
string
required

Exact ICD-10 code (e.g. "E11.9"). Obtained from the search_icd_codes endpoint.

diagnosis_name
string
required

Full ICD-10 description (e.g. "Type 2 diabetes mellitus without complications").

plan
string
required

Insurance plan name (e.g. "Aetna").

state
string
required

Two-letter state code (e.g. "CA").

patient
object
required

Patient information.

provider
object
required

Prescribing provider information.

prescription
object

Prescription details.

Response

200 - application/json

Submit prior auth response

success
boolean
required

Whether the prior authorization was created successfully.

pa_id
string
required

Unique identifier for the created prior authorization request.

status
enum<string>
required

Current status of the prior authorization.

Available options:
submitted,
approved,
pended,
denied,
cancelled
result_pdf
string

Signed URL to download the PA determination letter as a PDF. Link expires after 1 hour.