DevToolCase
Sign in Sign in

EDIFACT INVRPT: the inventory report message

The EDIFACT INVRPT inventory report: stock levels per product and location, its segments, qualifiers and an annotated EANCOM D96A example.

Where INVRPT fits in the exchanges

What is the INVRPT message for?

INVRPT, the inventory report, gives stock levels: per item and per location, the quantity on hand, damaged, reserved, or the movements of a period. A retailer sends it to its supplier so that the supplier can plan its production and its deliveries, or replenish the stores itself (vendor managed inventory), turning the report into orders (ORDERS) or deliveries.

A logistics provider also sends it to the owner of the goods it stores. Each item (LIN) carries as many quantities (QTY) as needed, each with its location (LOC) and its date (DTM).

Sender: Buyer. Recipient: Supplier.

Structure of the INVRPT message

Its main segments, in the order of the D.96A directory. M means mandatory and C conditional, followed by the maximum number of repetitions; for the first segment of a segment group (SG), they apply to the whole group. Rarely used segments are left out.

SegmentGroupStatusWhat it carries
UNH Message header—M 1Message header: the message reference and its type, INVRPT:D:96A:UN.
BGM Beginning of message—M 1Document type (35 inventory report) and report number.
DTM Date/time/period—M 10Report date, date of the stock figures.
RFF ReferenceSG1C 10References: previous report, contract.
NAD Name and addressSG2C 20Parties: who reports, to whom, the warehouse.
LIN Line itemSG9C 9999Item: its GTIN.
PIA Additional product idSG9C 10Other item numbers.
QTY QuantitySG9 › SG11C 9999A quantity of the item: actual stock, damaged, reserved…
INV Inventory management related detailsSG9 › SG11C 1Movement in or out of the inventory, and its reason.
LOC Place/location identificationSG9 › SG11C 5Where this quantity is.
DTM Date/time/periodSG9 › SG11C 5Date of the quantity.
UNT Message trailer—M 1Message trailer: number of segments and message reference.

Codes worth knowing

SegmentData elementCodeMeaning
BGM100135Inventory report
DTM2005366Date of the inventory report
QTY6063145Actual stock: on hand, undamaged, available
QTY6063124Damaged goods
QTY6063170Allocated quantity: reserved
QTY6063156Inventory movement quantity
INV45011Movement out of inventory
INV45012Movement into inventory
LOC322718Warehouse

Example of INVRPT message

UNA:+.? '
UNB+UNOC:3+5412345000013:14+8712345000011:14+261125:0600+STK0001'
UNH+1+INVRPT:D:96A:UN'
BGM+35+STK20261125+9'
DTM+137:20261125:102'
DTM+366:20261124:102'
NAD+BY+5412345000013::9'
NAD+SU+8712345000011::9'
LIN+1++8712345100018:EN'
QTY+145:320'
LOC+18+5412345000020::9'
QTY+124:4'
LOC+18+5412345000020::9'
LIN+2++8712345100025:EN'
QTY+145:96'
LOC+18+5412345000020::9'
UNT+15+1'
UNZ+1+STK0001'
Convert it to JSON

The example, segment by segment

SegmentMeaning
BGM+35+STK20261125+9Inventory report (35) STK20261125.
DTM+366:20261124:102Stock figures of 24 November 2026.
QTY+145:320Item 1: 320 units in stock and available (145)…
LOC+18+5412345000020::9…in this warehouse (18), identified by its GLN.
QTY+124:44 more units, damaged (124), in the same warehouse.
UNT+15+1End of the message: the number of segments from UNH to UNT included, then the reference given in UNH.

Related messages

In the ANSI X12 standard, used mostly in North America, the equivalent of INVRPT is the 846 transaction set (Inventory Inquiry/Advice), which you can read with the X12 viewer.

Add this browser’s favorites to your account?

This browser has 0 favorites that your account does not have:

Either way, this browser keeps its favorites: you find them again after signing out.