X12 segment reference
AK2 — Transaction Set Response Header
X12 AK2 in 997 acknowledgements: ties acceptance or rejection to a specific ST control number from your outbound document.
AK2 segment facts
- AK202 must match the ST02 control number you assigned when posting the original outbound document.
- Multiple AK2 loops can appear in one 997 when a functional group carried several transaction sets.
- API status polling and webhooks key off AK2/ST correlation to mark individual documents accepted or rejected.
What the AK2 segment does
AK2 loops inside a 997 for each transaction set acknowledged. AK201 is the transaction set ID; AK202 matches your ST02.
Loop: Once per acknowledged transaction set
Common transaction sets: 997
Key elements
| Element | Name | Description |
|---|---|---|
| AK201 | Transaction set ID | 850, 856, 810, etc. |
| AK202 | Transaction set control number | Echoes ST02 from the original document. |
Example AK2 segment
AK2*850*0001~
Parse and validate samples with the free EDI validator or send JSON via the JSON→X12 mapping guide.
Related reference
FAQ
Frequently asked questions
Find the AK2 loop for your ST02, then read AK5 and AK4 segments for segment/element-level error codes.