Skip to main content
The X12 simulator stands in for a clearinghouse like Change Healthcare or Availity. It accepts X12 EDI transactions and returns the paired X12 response, covering the core eligibility, claim status, and prior-auth transaction set. The verification engine scores outbound X12 responses with x12-response criteria. Supported transaction pairs:
  • 270/271 — eligibility inquiry and response
  • 276/277 — claim status inquiry and response
  • 278 — prior authorization request and response

How your agent connects

The X12 clearinghouse exposes a structured HTTP surface at the direct-service endpoint. Your agent submits a request body and receives the simulated clearinghouse response. During playground authoring, call /sandboxes/{sandbox_id}/clearinghouse/* with an organization API key.
Today only the 270/271 eligibility pair is wired on the HTTP surface. The 276/277 (claim status) and 278 (prior auth) pairs are listed above for completeness but are not yet callable; check the API reference for the current shipped endpoints. The run-scoped /v1/benchmark-runs/{id}/clearinghouse/* surface is not exposed today; drive X12 interactions via the direct /sandboxes/{id}/clearinghouse/* routes during playground authoring.

Endpoints

MethodEndpointDescription
POST/sandboxes/{sandbox_id}/clearinghouse/eligibility270 eligibility inquiry; returns a 271-style response
See Check eligibility for the full request/response shape.

Driving the rollout

Submit a 270 eligibility inquiry (direct-service path):
curl -X POST "https://api.verial.ai/sandboxes/$SANDBOX_ID/clearinghouse/eligibility" \
  -H "Authorization: Bearer $VERIAL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "patient_id": "patient-123"
  }'
The response contains a parsed 271 structure (active coverage, copay, deductible, service type benefits) that your agent can act on.

Configuration

The X12 simulator uses configured payer behavior (which members are active, which services are covered) from the linked dataset. At create time you supply a name and optional payer metadata:
curl -X POST https://api.verial.ai/simulators \
  -H "Authorization: Bearer $VERIAL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "Clearinghouse",
    "name": "Regional X12 Clearinghouse",
    "config": {
      "payers": ["BlueCross", "Aetna"]
    }
  }'

Verification

The x12-response check parses the simulated X12 response (271, 277, or 278) and asserts on segment values by path. Use it to confirm the clearinghouse returned the expected coverage, status, or decision.
{
  "label": "Eligibility 271 returned active coverage",
  "weight": 1.0,
  "assertion": {
    "assert": "x12-response",
    "transaction": "271",
    "fields": [
      { "path": "EB.1", "expected": "1" },
      { "path": "EB.3", "expected": "30" }
    ]
  }
}
See the Criteria concept page for the full spec.

Next Steps

Web Portal

Pair X12 with a payer portal simulator for full prior-auth workflows.

Criteria

Full reference for x12-response assertions.

Clearinghouse API reference

Direct-access eligibility endpoint for authoring.

Simulators overview

Lifecycle, provisioning, and configuration patterns.