{"slug":"edi","domain":"documents","title":"An EDI interchange, as rows","summary":"X12 as CSV: the 820 remittance and the 812 adjustment, with the reason code on every line.","help":"edi: an X12 interchange, as rows.\n\nUSAGE\n  edi [--json] FILE\n\nWHAT IT READS\n  820  the remittance advice — what was PAID against each invoice (RMR) and\n       what was TAKEN BACK and under which reason code (ADX). Both are in one\n       table because a list of deductions that cannot be reconciled to the\n       payment is a list nobody can act on.\n  812  the credit/debit adjustment — the chargeback document itself, one row\n       per CDD, carrying whether it was a debit or a credit.\n\nRETURNS\n  CSV on stdout, so it foots with `csv` or `awk` like any other table.\n  `--json` gives every segment as it stands, which is what to use for a\n  transaction set this does not model.\n\nIT DOES NOT SAY WHAT A REASON CODE MEANS\n  The code is printed, never translated. What a retailer's code means is the\n  `deduction-reason-codes` skill's work, and it reports the ones it cannot map\n  rather than guessing — a meaning invented here would end up under a number in\n  a dispute sent to a deduction desk.\n\nSEPARATORS\n  Read from the ISA segment, not assumed. A file punctuated with `|` is\n  ordinary and reads correctly.","example_command":"edi /dropbox/ap/unfi-820-2026-09.edi","example_output":"kind,trace,payment_total,payment_date,reference,amount,invoice_amount,reason_code\npayment,0012345678,14820.55,2026-09-02,INV-88213,9310.00,9310.00,\nadjustment,0012345678,14820.55,2026-09-02,INV-88213,412.80,,59","cost_class":"cached-read","tier":"free","price_per_1k_calls":0,"price_is_from":false,"status":"available","commands":["edi"],"default_enabled":true,"first_seen":"2026-09-14T11:40:15.558796Z","enabled":false}
