X12 message converter

X12 message converter is in beta. API may change!

Aidbox includes /x12/parse and /x12/generate endpoints to allow the conversion of X12 messages. Both support four types of X12 messages: 835, 837, 270, and 271.

Parsing a message

To parse a message, use /x12/parse endpoint.

POST /x12/parse
content-type: text/plain
accept: application/json

ISA*00*          *00*          *ZZ*ABCPAYER       *ZZ*ABCPAYER       *190827*0212*^*00501*191511902*0*P*:~
GS*HP*ABCD*ABCD*20190827*123456*12345678*X*005010X221A1~
ST*835*112233~
BPR*I*1100*C*ACH*CCP*01*888999777*DA*24681012*1935665544**01*111333555*DA*144444*20190316~
TRN*1*71700666555*1935665544~
DTM*405*20190314~
N1*PR*RUSHMORE LIFE~
N3*10 SOUTH AVENUET~
N4*RAPID CITY*SD*55111~
PER*BL*JOHN WAYNE*TE*8005551212*EX*123~
N1*PE*ACME MEDICAL CENTER*XX*5544667733~
REF*TJ*777667755~
LX*1~
CLP*5554555444*1*800*500*300*12*94060555410000*11*1~
NM1*QC*1*BUDD*WILLIAM****MI*33344555510~
AMT*AU*800~
SVC*HC:99211*800*500~
DTM*472*20190301~
CAS*PR*1*300~
AMT*B6*800~
CLP*8765432112*1*1200*600*600*12*9407779923000*11*1~
NM1*QC*1*SETTLE*SUSAN****MI*44455666610~
AMT*AU*1200~
SVC*HC:93555*1200*600~
DTM*472*20190310~
CAS*PR*1*600~
AMT*B6*1200~
SE*26*112233~
GE*1*12345678~
GS*HP*ABCD*ABCD*20190827*123456*12345678*X*005010X221A1~
ST*837*20002813*005010X222A1~
BHT*0019*00*20002813*20200728*151613*CH~
NM1*41*2*HCSIS CHC SPLIT PHASE 1*****46*545746153~
PER*IC*IT SUPERVISOR*TE*7174255377~
NM1*40*2*DEPARTMENT OF HUMAN SERVICES*****46*445314156~
HL*1**20*1~
NM1*85*2*HCSIS CHC SPLIT PHASE 1~
N3*1006 HEMLOCK DR~
N4*HARRISBURG*PA*171103595~
REF*EI*000021698~
HL*2*1*22*0~
SBR*P*18*******MC~
NM1*IL*1*PTSURNAME*PTNAME****MI*123456~
N3*33 LONG ISLAND PARK~
N4*NEW YORK CITY*NY*10001~
DMG*D8*19991122*U~
NM1*PR*2*DEPARTMENT OF HUMAN SERVICES*****PI*1700393030~
N3*555 MAIN STREET~
N4*HARRISBURG*PA*171069022~
REF*G2*3004658650007~
CLM*16.31*32***12:B:1*Y*A*Y*Y*P~
HI*ABK:A0100~
LX*1~
SV1*HC:W1724*32*UN*32***1~
PWK*03*AA~
PWK*04*BM~
DTP*472*D8*20200312~
LX*2~
SV1*HC:W1721*31*UN*3***1~
DTP*472*D8*20200312~
REF*6R*31~
SE*32*20002813~
GE*1*12345678~
IEA*2*191511902~

This example contains two groups: the first has 835 message, and the other one contains 837 message. Parser supports multiple groups and transaction sets in the document.

Generating a message

/x12/generate endpoint allows the generating X12 messages from the JSON data obtained from the /x12/parse operation. Pass the message field's content from the parsing result to /x12/generate to get your message back almost unchanged.

Keep in mind that the generator disregards the provided segment count value in favor of the one it computes itself.

POST /x12/generate
content-type: application/json

{
  "isa": {
   "security_info": "          ",
   "date": "190827",
   "receiver_type": "ZZ",
   "security_qual": "00",
   "time": "0212",
   "sender_id": "ABCPAYER       ",
   "mode": "P",
   "ds": ":",
   "auth_info": "          ",