POST
/
api
/
optimizer-x12-denials
cURL
curl --request POST \
  --url https://forecaster.cairhealth.com/api/optimizer-x12-denials \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "edi": [
    "EDI_STRING_1",
    "EDI_STRING_2"
  ],
  "patientControlNumbers": [
    "PCN12345",
    "PCN67890"
  ]
}'
[
  {
    "id": "1234abcd-56ef-78gh-90ij-klmnopqrstuv",
    "patientControlNumber": "98765432",
    "apiStatus": "PROCESSING_EDI",
    "createdAt": "2025-04-07T19:00:00.000Z"
  },
  {
    "id": "5678wxyz-12ab-34cd-56ef-ghijklmnopqr",
    "patientControlNumber": "12345678",
    "apiStatus": "PROCESSING_EDI",
    "createdAt": "2025-04-07T20:00:00.000Z"
  }
]

Delivery

To receive results from this endpoint, you have two options: Webhooks or the Poll Optimizer Runs API.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

EDI data and patient control numbers for processing. Should contain all 837s and 835s, and patient control numbers for the claims to optimize.

edi
string[]
required

Array of EDI strings to be processed. Each string should be either a valid 837 or 835 EDI transaction, with the ISA headers included. The order of the edi strings does not matter, but the Cair Optimizer will only process 837s for which there exists a matching 835 somewhere else in the request.

patientControlNumbers
string[]

Array of patient control numbers. Optional, only use if you want to kick off the optimizer for only the claims with these PCNs

Response

Array of objects containing data of processed claims.

id
string

Unique identifier for the claim. The ID returned can be used to poll for results using the Poll Optimizer Results API. Output can also be configured to be sent through webhooks using Webhook Delivery.

patientControlNumber
string

Control number assigned to the patient. This is extracted from your EDI and is a unique identifier for the claim.

apiStatus
string

Status of the API processing for the claim. Typically at this point the response will be PROCESSING_EDI. Refer to API Status for possible values

createdAt
string<date-time>

Timestamp when the claim was created