# EDI X12 810 Electronic Commercial Invoice Parser
> High-performance 810 commercial invoice parser extracting line item charges, discounts, taxes, and payment terms into JSON.

- **Canonical URL:** https://stanzaapi.com/tools/x12-parser/transaction/810-invoice
- **Governing Standard:** ANSI ASC X12 Standards (005010) (Accredited Standards Committee X12 / HIPAA 5010)
- **Latency:** <3ms Edge
- **Privacy:** In-memory execution only (zero data stored or logged)

## Technical Overview & Governing Rules
The ANSI X12 810 Invoice transaction is used by suppliers to bill corporate customers for goods delivered or services rendered.

Parses BIG segments for invoice number, invoice date, and originating purchase order number.

Extracts IT1 line item detail, ITD terms of sale (discount days, net due dates), and TDS total monetary amount.

## Specification Matrix
| Segment | Description | Key Elements Extracted | Usage |
| --- | --- | --- | --- |
| BIG | Beginning Segment for Invoice | BIG01 (Invoice Date), BIG02 (Invoice #), BIG04 (PO #) | Invoice header |
| ITD | Terms of Discount/Payment | ITD01 (Terms Code: 01=Basic), ITD03 (Discount %), ITD05 (Discount Days), ITD07 (Net Days) | Payment terms |
| IT1 | Baseline Item Data (Invoice) | IT102 (Quantity Invoiced), IT103 (UOM), IT104 (Unit Price), IT107 (Product ID) | Line item billing |
| TDS | Total Monetary Value Summary | TDS01 (Total Gross Invoice Amount in Cents/Dollars) | Total invoice balance |

## Standard JSON Response Model
```json
{
  "transactionSet": "810",
  "invoiceNumber": "INV-2026-8812",
  "invoiceDate": "20260830",
  "purchaseOrderNumber": "PO-991823",
  "totalAmount": 6250,
  "terms": {
    "discountPercent": 2,
    "discountDays": 10,
    "netDays": 30
  },
  "lineItems": [
    {
      "lineNumber": "1",
      "quantity": 500,
      "unitPrice": 12.5,
      "total": 6250,
      "sku": "SKU-A99"
    }
  ]
}
```

## Frequently Asked Questions & Edge Cases
### Q: How are freight and handling charges handled in 810?
**A:** Allowance and charge loops (SAC/TXI) are parsed into separate credit/debit adjustment line items.
