EDI ANSI X12 Version 4010 Help

Not sure if this is the appropriate forum… I’m new to the ANSI X12 spec and need to develop a solution to generate and parse EDI documents using the ANSI X12 Version 4010 spec in PHP. I know how to program in PHP, my issue is knowing the format of the various EDI documents (850 Purchase Order, 810 Invoices, 855 Order Acknowledgments, etc.). I’ve searched through Google but haven’t found much useful information. Most results are companies offering EDI solutions, or PDF documents pertaining to the health care industry. My project has nothing to do with health care.

Can anyone point me in the proper direction? Is there no free resource available which explains the format of the various EDI documents (850 Purchase Order, 810 Invoices, 855 Order Acknowledgments, etc.)?