This invoice example is the response to the order example shown the Purchase Order page.
"ODF Supplier" is sending an invoice to "ODF Buyer" for two items described in this invoice and in the related purchase order transaction.

🚧

Update sender and receiver to test

If you want to use this example within your own test transaction, make sure you edit the sender (ODF_SUPPLIER) and receiver (ODF_BUYER) ISA IDs.

Invoice Example Transaction

{
    "type": {
        "name": "810_INVOICE"
    },
    "stream": "test",
        "sender": {
        "isaId": "string"
    },
    "receiver": {
        "isaId": "string"
    },
    "message": {
  "transactionSets": [
    {
      "transactionSetHeader": [
        {
          "transactionSetIdentifierCode": "810",
          "transactionSetControlNumber": "0001"
        }
      ],
      "beginningSegmentForInvoice": [
        {
          "date": "20200912",
          "invoiceNumber": "INV8793280",
          "purchaseOrderNumber": "PO123456789",
          "transactionSetPurposeCode": "00"
        }
      ],
      "N1_loop": [
        {
          "partyIdentification": [
            {
              "entityIdentifierCode": "RI",
              "name": "ODF SUPPLIER DISTRIBUTION CENTER",
              "identificationCodeQualifier": "1",
              "identificationCode": "123456789"
            }
          ]
        },
        {
          "partyIdentification": [
            {
              "entityIdentifierCode": "BT",
              "name": "ODF BUYER HQ"
            }
          ],
          "partyLocation": [
            {
              "addressInformation": "1119 BUSH STREET"
            }
          ],
          "geographicLocation": [
            {
              "cityName": "SAN FRANCISCO",
              "stateOrProvinceCode": "CA",
              "postalCode": "94101"
            }
          ]
        }
      ],
      "termsOfSaleDeferredTermsOfSale": [
        {
          "termsTypeCode": "01",
          "termsBasisDateCode": "3",
          "termsNetDays": "30",
          "description": "Net 30 days"
        }
      ],
      "dateTimeReference": [
        {
          "dateTimeQualifier": "002",
          "date": "20200910"
        },
        {
          "dateTimeQualifier": "010",
          "date": "20200905"
        }
      ],
      "IT1_loop": [
        {
          "baselineItemDataInvoice": [
            {
              "assignedIdentification": "1",
              "quantityInvoiced": "48",
              "unitOrBasisForMeasurementCode": "CA",
              "unitPrice": "26.25",
              "productServiceIDQualifier": "UP",
              "productServiceID": "711719100246"
            }
          ],
          "PID_loop": [
            {
              "productItemDescription": [
                {
                  "itemDescriptionTypeCode": "F",
                  "description": "SUNGLASSES VERMILLION (E16249)"
                }
              ]
            }
          ]
        },
        {
          "baselineItemDataInvoice": [
            {
              "assignedIdentification": "2",
              "quantityInvoiced": "120",
              "unitOrBasisForMeasurementCode": "CA",
              "unitPrice": "27.45",
              "productServiceIDQualifier": "UP",
              "productServiceID": "611719100245"
            }
          ],
          "PID_loop": [
            {
              "productItemDescription": [
                {
                  "itemDescriptionTypeCode": "F",
                  "description": "SUNGLASSES YELLOW (F8C729)"
                }
              ]
            }
          ]
        }
      ],
      "totalMonetaryValueSummary": [
        {
          "amount": "455400"
        }
      ],
      "transactionTotals": [
        {
          "numberOfLineItems": "2"
        }
      ],
      "transactionSetTrailer": [
        {
          "numberOfIncludedSegments": "16",
          "transactionSetControlNumber": "0001"
        }
      ]
    }
  ]
}
}
ISA*00*          *00*          *ZZ*ODF_SUPPLIER   *ZZ*ODF_BUYER      *200912*0803*U*00401*001234322*0*T*>~
GS*IN*ODF_SUPPLIER*ODF_BUYER*20200912*0803*1234322*X*004010~
ST*810*0001~
BIG*20200912*INV8793280**PO123456789****00~
N1*RI*ODF SUPPLIER DISTRIBUTION CENTER*1*123456789~
N1*BT*ODF BUYER HQ~
N3*1119 BUSH STREET~
N4*SAN FRANCISCO*CA*94101~
ITD*01*3*****30*****Net 30 days
DTM*002*20200910~
DTM*010*20200905~
IT1*1*48*CA*26.25**UP*711719100246~
PID*F****SUNGLASSES VERMILLION (E16249)~
IT1*2*120*CA*27.45**UP*611719100245~
PID*F****SUNGLASSES YELLOW (F8C729)~
TDS*455400~
CTT*2~
SE*16*0001~
GE*1*1234322~
IEA*1*001234322~

BIG Beginning Segment For Invoice

"beginningSegmentForInvoice": [
        {
          "date": "20200912",
          "invoiceNumber": "INV8793280",
          "purchaseOrderNumber": "PO123456789",
          "transactionSetPurposeCode": "00"
        }
      ]
BIG*20200912*INV8793280**PO123456789****00~
JSON ElementX12 ElementValueDescription
dateBIG0120200912Invoice date
invoiceNumberBIG02INV8793280Invoice number of this transaction
purchaseOrderNumberBIG04PO123456789The purchase order number related to this invoice.
transactionSetPurposeCodeBIG0800The purpose code of the transaction. 00 means original.

N1 Loop

The N1 loop identifies addresses.

In this invoice, the N1 loop describes two addresses for this invoice:

  • The remittance address: This address is used by "ODF Supplier" to receive payments. It is defined by its DUNS Number "123456789". The recipient is "ODF BUYER DISTRIBUTION CENTER".

  • The billing address: The billing address is "1119 Bush Street, San Francisco, CA 94101". The recipient is "ODF Buyer HQ". This address is the same address described in the purchase invoice.

Each of these addresses are included in one iteration of the N1 loop. The N1 loop is composed of one or several segments:

  • Party Identification (N1)
  • Party Location (N3)
  • Geographic Location (N4)
"N1_loop": [
        {
          "partyIdentification": [
            {
              "entityIdentifierCode": "RI",
              "name": "ODF SUPPLIER DISTRIBUTION CENTER",
              "identificationCodeQualifier": "1",
              "identificationCode": "123456789"
            }
          ]
        },
        {
          "partyIdentification": [
            {
              "entityIdentifierCode": "BT",
              "name": "ODF BUYER HQ"
            }
          ],
          "partyLocation": [
            {
              "addressInformation": "1119 BUSH STREET"
            }
          ],
          "geographicLocation": [
            {
              "cityName": "SAN FRANCISCO",
              "stateOrProvinceCode": "CA",
              "postalCode": "94101"
            }
          ]
        }
      ]
N1*RI*ODF BUYER SUPPLIER CENTER*1*123456789~      ⇠ 1st iteration of the N1 loop
N1*BT*ODF BUYER HQ~                                               ⇡
N3*1119 BUSH STREET~                                2nd iteration of the N1 loop
N4*SAN FRANCISCO*CA*94101~                                        ⇣

N1 Party Identification

The party identification provides the type of contact and the contact name.

The remittance contact is "ODF BUYER DISTRIBUTION CENTER" and is identified by its DUNS Number "123456789".

"partyIdentification": [
            {
              "entityIdentifierCode": "RI",
              "name": "ODF SUPPLIER DISTRIBUTION CENTER",
              "identificationCodeQualifier": "1",
              "identificationCode": "123456789"
            }
          ]
N1*RI*ODF SUPPLIER DISTRIBUTION CENTER*1*123456789~
JSON ElementX12 ElementValueDescription
entityIdentifierCodeN101RIThis specifies the type of address given in the name (N102) element.

RI means "Remit To".
Other qualifiers can be used by buyers, such as ST (Ship To) or BT (Bill To).
entityIdentifierN102ODF SUPPLIER DISTRIBUTION CENTERThis field is the name of the address.

ODF SUPPLIER DISTRIBUTION CENTER is associated with the qualifier RI and is the contact to send the payments to for the items on this invoice.
identificationCodeQualifierN1031This specifies the type of identifier code given in the the name (N104) element.

1 is the qualifier for the DUNS code.

Other qualifiers can be used by buyers, such as 92 ("Assigned by Buyer or Buyer's Agent") or 91 ("Assigned by Seller or Seller's Agent").
identificationCodeN104123456789This field contains the code.

The DUNS Number of "ODF SUPPLIER DISTRIBUTION CENTER" is "123456789".

N3 Party Location

The party location provides the address for the contact defined in the previous segment (Party Identification or N1 segment).

  • The address of the billing contact is "1119 Bush Street".
  • The remittance contact has no party location as it's pre-defined with an identification code.
"partyLocation": [
            {
              "addressInformation": "1119 BUSH STREET"
            }
          ]
N3*1119 BUSH STREET~
JSON ElementX12 ElementValueDescription
addressInformationN3011119 BUSH STREETThis is address line 1 containing the address number and street.

N4 Geographic Location

The geographic location provides the city and country information for the contact defined in the previous segment (Party Identification or N1 segment).

  • The billing contact is in San Francisco, California 94101.
  • The remittance contact has no geographic location as it's pre-defined with an identification code.
"geographicLocation": [
            {
              "cityName": "SAN FRANCISCO",
              "stateOrProvinceCode": "CA",
              "postalCode": "94101"
            }
          ]
N4*SAN FRANCISCO*CA*94101~
JSON ElementX12 ElementValueDescription
cityNameN401SAN FRANCISCOThis field identifies the city.
stateOrProvinceCodeN402CAThis field identifies the state.

The billing address is in California.
postalCodeN40394101This field identifies the postal code.

ITD Terms of Sale/Deferred Terms of Sale

The Terms of Sale/Deferred Terms of Sale segment provides information about potential discounts and defines when the payment of the invoice is due.

In this example, ODF Buyer has 30 days after the invoice date to pay ODF Supplier for the 2 items ordered, delivered and invoiced.

"termsOfSaleDeferredTermsOfSale": [
        {
          "termsTypeCode": "01",
          "termsBasisDateCode": "3",
          "termsNetDays": "30",
          "description": "NET 30 DAYS"
        }
      ]
ITD*01*3*****30*****Net 30 days
JSON ElementX12 ElementValueDescription
termsTypeCodeITD0101This specifies the type of payment terms.

01 means "Basic".
Other qualifiers can be used by buyers, such as 02 (End of Month) or 03 (Fixed Date).
termsBasisDateCodeITD023This specifies the type of date used as the start of the the payment terms period.

3 means "Invoice date".

Other qualifiers can be used by buyers, such as 1 (Ship Date) or 2 (Delivery Date).
termsNetDaysITD0730This is the net number of days for the payment terms.

30 is the number of days until the total invoice amount is due.

ODF Buyer have 30 days after the invoice date to pay ODF Supplier.
descriptionITD12NET 30 DAYSThis field is a description of the payment terms.

ODF Buyer has 30 days after the invoice date to pay the total net amount on this invoice to ODF Supplier.

DTM Date/Time Reference

The Date/Time Reference (DTM) segment provides information on the important dates related to this invoice.

In this example, "ODF Buyer" is requesting all the products within this invoice to be:

  • delivered by September 10th, 2020.
  • shipped by September 5th, 2020.

The dates should match the dates in the purchase order.

"dateTimeReference": [
        {
          "dateTimeQualifier": "002",
          "date": "20200910"
        },
        {
          "dateTimeQualifier": "010",
          "date": "20200905"
        }
      ]
DTM*002*20200910~         ⇠ 1st iteration of the DTM segment
DTM*010*20200905~         ⇠ 2nd iteration of the DTM segment
JSON ElementX12 ElementValueDescription
dateTimeQualifierDTM01002This qualifier defines the type of date given in the the date (DTM02) element.

002 means "Delivery Requested". Other qualifiers could have been used, such as 106 (Required By) or 010 (Requested Ship).
dateDTM0220200910The items in the invoice is requested to be delivered by September 10th, 2020.

IT1 Loop

The IT1 loop describes the items being invoiced.

In this example, ODF Supplier is invoicing for two items to ODF Buyer:

  • 48 cases of vermillion sunglasses referenced with the UPC code "711719100246" at $26.25 per case.
  • 120 cases of yellow sunglasses referenced with the UPC code "611719100245" at $27.45 per case.

Each of these items are included in one iteration of the PO1 loop and are composed of one or several loops and segments:

  • Baseline Item Data (Invoice) (IT1)
  • PID Loop
"IT1_loop": [
        {        
          "baselineItemDataInvoice": [
            {
              "assignedIdentification": "1",
              "quantityInvoiced": "48",
              "unitOrBasisForMeasurementCode": "CA",
              "unitPrice": "26.25",
              "productServiceIDQualifier": "UP",
              "productServiceID": "711719100246"
            }
          ],
          "PID_loop": [
            {
              "productItemDescription": [
                {
                  "itemDescriptionTypeCode": "F",
                  "description": "SUNGLASSES VERMILLION (E16249)"
                }
              ]
            }
          ]
        },
        {        
          "baselineItemDataInvoice": [
            {
              "assignedIdentification": "2",
              "quantityInvoiced": "120",
              "unitOrBasisForMeasurementCode": "CA",
              "unitPrice": "27.45",
              "productServiceIDQualifier": "UP",
              "productServiceID": "611719100245"
            }
          ],
          "PID_loop": [
            {
              "productItemDescription": [
                {
                  "itemDescriptionTypeCode": "F",
                  "description": "SUNGLASSES YELLOW (F8C729)"
                }
              ]
            }
          ]
        }
      ]
IT1*1*48*CA*26.25**UP*711719100246~                   ⇡   1st iteration
PID*F****SUNGLASSES VERMILLION (E16249)~              ⇣   of the N1 loop
IT1*2*120*CA*27.45**UP*611719100245~                  ⇡   2nd iteration
PID*F****SUNGLASSES YELLOW (F8C729)~                  ⇣   of the N1 loop

IT1 Baseline Item Data (Invoice)

The baseline item data invoice segment provides qualitative and quantitative information on each item in the invoice.

For example, in the first iteration of the IT1 loop, ODF Supplier is billing ODF Buyer for 48 cases of the item referenced with the UPC code "711719100246" at $26.25 per case.

"baselineItemDataInvoice": [
            {
              "assignedIdentification": "1",
              "quantityInvoiced": "48",
              "unitOrBasisForMeasurementCode": "CA",
              "unitPrice": "26.25",
              "productServiceIDQualifier": "UP",
              "productServiceID": "711719100246"
            }
          ],
IT1*1*48*CA*26.25**UP*711719100246~
JSON ElementX12 ElementValueDescription
assignedIdentificationIT1011This element is the line item number.
quantityInvoicedIT10248This element is the total units invoiced.

This element is a quantity that corresponds with the unitOrBasisForMeasurementCode (IT103).

The buyer want to buy 48 cases of line #1.
unitOrBasisForMeasurementCodeIT103CAThis element is a unit of measurement that corresponds to the quantity (IT102).

The supplier is invoicing 48 cases of line #1.

CA means Case. Other codes can be used by buyers such as PR (Pair) or EA (Each).
unitPriceIT10326.25This element is the price of the item for the unit of measurement defined in the element unitOrBasisForMeasurementCode (IT103).

The item is $26.25 per case.
productServiceIDQualifierIT106UPThis qualifier describes the reference of the item given in the element productServiceID (IT107).

UP means U.P.C.
Other qualifiers can be used by suppliers.
productServiceIDIT107711719100246711719100246 is the UPC code of item #1.

PID Loop

The PID loop provides the description for items. The PID loop is a child of IT1.

Each of these descriptions are included in one iteration of the PID loop and are composed of one segment:

  • Product/Item Description (PID)
"PID_loop": [
            {
              "productItemDescription": [
                {
                  "itemDescriptionTypeCode": "F",
                  "description": "SUNGLASSES VERMILLION (E16249)"
                }
              ]
            }
          ]
PID*F****SUNGLASSES VERMILLION (E16249)~

PID Product/Item Description

The product/item description segment provides descriptive information of each item in the invoice.
In the first iteration of the IT1 loop, the supplier is billing the item described as "Sunglasses vermillion (E16249)".

"productItemDescription": [
                {
                  "itemDescriptionTypeCode": "F",
                  "description": "SUNGLASSES VERMILLION (E16249)"
                }
              ]
PID*F****SUNGLASSES VERMILLION (E16249)~
JSON ElementX12 ElementValueDescription
itemDescriptionTypeCodePID01FThis qualifier identifies the type of description the item given in the description (PID05) element.

F means "Free-Form".
Other qualifiers can be used by buyers.
descriptionPID05SUNGLASSES VERMILLION (E16249)SUNGLASSES VERMILLION (E16249) is the description of line #1.

TDS Total Monetary Amount

"totalMonetaryValueSummary": [
        {
          "amount": "455400"
        }
      ]
TDS*455400~
JSON ElementX12 ElementValueDescription
amountTDS01455400This element contains the total amount of all invoice lines added together.

The total amount of the invoice is 455400 cents, or $4,554. This is the sum of the unit prices of all the cases invoiced in the IT1 loops:
(48x$26.25) + (120x$27.45)

CTT Transaction Totals

The transaction totals segment provides a summary of the invoice: information about totals included in this invoice, such as the total amount of items or the total price of the invoice.

In this example, the invoice contains 2 line items, meaning the supplier is billing the buyers for 2 types of items described in the IT1 loop.

"transactionTotals": [
        {
          "numberOfLineItems": "2"
        }
      ]
CTT*2~
JSON ElementX12 ElementValueDescription
numberOfLineItemsCTT012This element contains the total count of lines in the transaction.

Invoice Structure

"interchangeControlHeader",              //Interchange Control Header (Optional for JSON)
  "functionalGroupHeader",               //Functional Group Header (Optional for JSON)
  "transactionSets"
      "transactionSetHeader",            //Transaction Set Header (Optional for JSON)
                                
      //Header level
      "beginningSegmentForInvoice",      //Beginning Segment for Invoice
    
      "N1_loop"                          //N1 Loop (2 iterations)
          "partyIdentification",         //Party Identification
          "partyLocation",               //Party Location
          "geographicLocation",          //Geographic Location
          
      "termsOfSaleDeferredTermsOfSale",  //Terms of Sale/Deferred Terms of Sale
      "dateTimeReference",               //Date/Time Reference (2 iterations)

       //Detail level
      "IT1_loop"                          //IT1 Loop (2 iterations)
          "baselineItemDataInvoice",      //Baseline Item Data (Invoice)
          "PID_loop"                      //PID Loop
              "productItemDescription"    //Product/Item Description
    
      //Summary level
      "totalMonetaryValueSummary"         //Total Monetary Value Summary
      "transactionTotals",                //Transaction Totals
    
      "transactionSetTrailer"             //Transaction Set Trailer
ISA //Interchange Control Header (Optional for JSON)
.GS //Functional Group Header (Optional for JSON)
.ST //Transaction Set Header (Optional for JSON)
..BIG //Beginning Segment for Invoice
..N1 //Name
...N3 //Address Information
...N4 //Geographic Location
...ITD //Terms of Sale/Deferred Terms of Sale 
..DTM //Date/Time Reference 
..IT1 //Baseline Item Data (Invoice)
...PID //Product/Item Description
..TDS //Total Monetary Value Summary
..CTT //Transaction Totals
..SE //Transaction Set Trailer
.GE //Function Group Trailer
IEA //Interchange Control Trailer