Obtain trading partner credentials and the clearinghouse submission endpoint; confirm whether they accept X12 278 Request for Review and Response (005010X217) as a real-time or batch transaction
Build the ISA/GS envelope with your sender and receiver interchange IDs, then construct the 278 transaction set: begin with the HL loop hierarchy — the first HL loop is the subscriber level, followed by patient and then service event loops
Populate the STC, REF, DTP, NM1, and SV segments within the appropriate HL loops to describe the subscriber, patient, requesting provider, servicing provider, and the service being requested including diagnosis codes (HI segment) and procedure codes
Close the transaction with SE, GE, and IEA envelope trailers ensuring all segment counts and control numbers match their corresponding headers
Submit the X12 file via the clearinghouse's API (HTTPS POST with EDI payload or SFTP drop) using your API credentials (YOUR_TOKEN) and capture the synchronous 999 functional acknowledgment or batch acknowledgment
Poll for or receive the 278 response (Health Care Services Review — Response) and parse the AAA and HCR segments to determine whether authorization was approved, pended for medical review, or denied
Known gotchas
The 278 request and 278 response are separate transaction sets with different loop structures; do not assume the response mirrors the request layout — parse each independently against the X12 278 companion guide from your trading partner
Control numbers in ISA-13, GS-6, and ST-02 must be unique per submission and increment sequentially; reusing control numbers will cause the clearinghouse to reject the interchange
Payer-specific companion guides often restrict which service type codes and place-of-service codes are valid in a 278; validate against the payer's companion guide before building the transaction
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp