Reference·AK9 Segment·AK901
X12 999 Reference

Testing X12 999 AK901: What Functional Group Acknowledge Code Actually Needs to Handle

Jul 27, 2026 · 4 min read
AK9*A →

Most 999 test fixtures only ever produce A or R, so code paths built to handle E and P — the two outcomes that mean "some things worked and some didn't" — often go live having never been exercised once.

Quick answer

AK901 is the first element of the AK9 segment in an X12 999 — a single-letter code stating whether the receiver accepted, accepted with errors, rejected, or partially accepted the functional group as a whole.

Valid code values

A
Accepted — every transaction set in the group passed validation
E
Accepted, But Errors Were Noted — the group was accepted despite some non-fatal issues flagged elsewhere in the 999
R
Rejected — the functional group as a whole was rejected
P
Partially Accepted, At Least One Transaction Set Was Rejected — a mixed outcome — some transaction sets in the group passed, at least one did not

Example

Synthetic example Generated by Synthibase
AK9*A*1*1*1

AK901 is A here, a clean full acceptance of a single-transaction group. Synthetic test data.

Where this trips people up

A binary "accepted vs not accepted" switch statement built around A and R silently mishandles both E and P as failures, or worse, as successes. E means the group is usable but something in it deserves a look; P means part of the group needs to be resubmitted while the rest should not be. Neither maps cleanly onto pass/fail, and code that forces them into that shape ends up either burying real errors or triggering unnecessary full resubmissions.

X12 999 AK9 Segment Guide: Fields, Format, and Testing Gotchas
EDI 999 vs 997: What's the Difference and Why It Matters
EDI Rejection Codes: Complete List and How to Fix Them
Test all four acknowledge codes, not just A and R
Synthibase generates synthetic 999 responses spanning A, E, R, and P, so partial-acceptance and accepted-with-errors handling gets tested before a mixed-outcome functional group shows up for the first time in production.
Start free trial →
This page is written independently by Synthibase for testing and informational purposes. It is not an official publication of HL7 International or X12/Washington Publishing Company, and is not a substitute for reviewing the official standard or your trading partner's companion guide. See our Terms of Service for full legal terms.