Skip to main content
Python
import requests

url = 'https://api.simplex.sh/pa_fax_get_form'
headers = {
    'Authorization': 'Bearer your_api_key_here'
}
params = {
    'bin': '003858',
    'pcn': 'A4',
    'group': 'RXINN01',
    'state': 'CA',
    'drug_name': 'wegovy'
}

response = requests.get(url, headers=headers, params=params)
result = response.json()
print(f"Payer: {result['routing']['pbm_name']} ({result['routing']['plan_type']})")
print(f"PA fax: {result['routing']['pa_fax']}")
print(f"Recommended rail: {result['submission_plan']['recommended_rail']}")
for form in result['forms']:
    print(f"  [{form['bucket']}] {form['form_id']}: {form['form_name']}{form['form_url']}")
{
  "matched": true,
  "routing": {
    "pbm_name": "<string>",
    "plan_name_or_group": "<string>",
    "plan_type": "Commercial",
    "line_of_business": "<string>",
    "help_desk_phone": "<string>",
    "pa_phone": "<string>",
    "pa_fax": "<string>",
    "pa_portal_url": "<string>",
    "payer_sheet_url": "<string>",
    "confidence": "exact",
    "ambiguous_candidates": [
      "<string>"
    ],
    "formulary_id": "<string>",
    "plan_contract_id": "<string>",
    "product_line": "",
    "notes": "<string>"
  },
  "submission_plan": {
    "recommended_rail": "availity_essentials",
    "rationale": "<string>",
    "availity_essentials": {
      "supported": true,
      "payer_id": "<string>",
      "payer_name": "<string>",
      "enrollment": "",
      "states": [
        "<string>"
      ],
      "transaction_codes": [
        "<string>"
      ],
      "notes": "<string>"
    },
    "fax": {
      "supported": true,
      "fax_number": "<string>",
      "coversheet_template": "<string>",
      "notes": "<string>"
    },
    "handoff": {
      "supported": true,
      "packet_template_id": "<string>",
      "target_audience": "<string>",
      "instructions": "<string>"
    }
  },
  "funding_status": {
    "status": "fully_insured",
    "confidence": "high",
    "rationale": "<string>",
    "matched_signals": [
      "<string>"
    ]
  },
  "forms": [
    {
      "form_id": "<string>",
      "form_name": "<string>",
      "form_url": "<string>",
      "issuer": "<string>",
      "local_pdf_path": "<string>",
      "file_type": "PDF",
      "scope": "<string>",
      "applicable_states": [
        "<string>"
      ],
      "applicable_lobs": [
        "<string>"
      ],
      "requires_login": true,
      "statutory_basis": "<string>",
      "citation_url": "<string>",
      "mandate_strength": "absolute",
      "bucket": "federal",
      "rank_rationale": "<string>",
      "caveats": [
        "<string>"
      ],
      "notes": "<string>"
    }
  ],
  "input_bin": "<string>",
  "input_pcn": "<string>",
  "input_state": "<string>",
  "benefit": {
    "drug_name": "<string>",
    "ndc": "<string>",
    "hcpcs_crosswalk": [
      "<string>"
    ],
    "benefit_type": "pharmacy",
    "rationale": "<string>"
  },
  "um_delegation": {
    "vendor_name": "<string>",
    "service_category": "<string>",
    "submission_endpoint": "<string>",
    "confidence": "confirmed"
  },
  "requires_eligibility_verification": true,
  "plan_warnings": [
    "<string>"
  ]
}
Returns the prior authorization fax form that matches the patient’s plan. All parameters are optional, but providing more of them — bin, pcn, group, and state — produces a more accurate match.
At least one identifier should be supplied. bin alone is often enough for common plans, but payers with multiple form variants may require pcn, group, or state to disambiguate.

Authorizations

X-API-Key
string
header
required

Simplex API Key

Query Parameters

bin
string

Pharmacy BIN (Bank Identification Number) from the patient's insurance card (e.g. "003858"). Optional, but strongly improves resolver accuracy.

pcn
string

Processor Control Number from the patient's insurance card (e.g. "A4"). Optional, but tiebreaks plans that share a BIN.

group
string

NCPDP Group ID / group number from the patient's insurance card (e.g. "RXINN01"). Used as a tiebreaker when (BIN, PCN) hits multiple lines of business.

state
string

Two-letter state code where the prescription will be filled (e.g. "CA"). Required for state-mandated form variants and for Medicaid FFS routing.

drug_name
string

Drug brand or generic name (e.g. "wegovy", "semaglutide"). Optional — refines benefit classification (pharmacy vs medical) and form ranking.

ndc
string

11-digit NDC. Optional — used for CMS Part B pharmacy/medical crosswalk.

Response

200 - application/json

Get fax form response

Resolver output. Carries routing context (who the payer is), benefit classification, the ranked form list, the recommended submission rail, and funding status.

matched
boolean
required

Whether the BIN resolved to a known payer row. False when routing.confidence is none.

routing
object
required

Who the payer is for the supplied (BIN, PCN, state) tuple. Populated from the trust-ordered merge of PBM payer sheets, the CMS Part D BIN/PCN extract, and state Medicaid FFS sheets.

submission_plan
object
required

Per-rail submission plan. The recommended_rail points to the preferred transmission channel for this payer.

funding_status
object
required

Whether the plan is fully insured (state PA-form mandates apply), self-funded under ERISA (state mandates preempted), or government.

forms
object[]
required

Ranked list of applicable PA forms. The first entry is the recommended form.

input_bin
string
input_pcn
string
input_state
string
benefit
object

Classification of whether the drug is adjudicated under the pharmacy or medical benefit.

um_delegation
object

Utilization-management delegation — when the payer routes PA to a third-party UM vendor (EviCore, Carelon, Magellan, …). Only populated for medical-benefit routes.

requires_eligibility_verification
boolean

True when funding is unknown and state-mandated form selection depends on it. Verify eligibility before submitting.

plan_warnings
string[]

Non-fatal warnings about this plan (e.g. known coverage quirks, carve-outs).