Inventory snapshot
nutrab2b.planning.inventory_reported.v2 · Inventory & planning
- Purpose
- Available, allocated, quarantined stock per lot with expiry, by location.
- When to send
- Scheduled (daily) or on change.
- Sender → receiver
- Supplier / warehouse → Buyer
- Expected responses
- none
- Equivalent standards
- X12: 846 · EDIFACT: INVRPT · SAP: MB52 extract
- Scenarios using it
- -
Fields and mappings
| Field | Type | Req | Description | Code list / format | EDI / GS1 / SAP mapping |
|---|---|---|---|---|---|
| as_of | datetime | yes | Snapshot time | ||
| location_gln | string | yes | Location | ^\d{13}$ | |
| items | array<object> | yes | Stock | ||
| item_id | string | yes | Item | ||
| hs_code | string | yes | HS | ^\d{4}(\.\d{2}){1,2}$|^\d{6,10}$ | |
| lot_number | string | yes | Lot | ||
| available | object | yes | Available | ||
| value | number | yes | Quantity | ||
| uom | string | yes | Unit of measure | uom | |
| allocated | object | Allocated | |||
| value | number | yes | Quantity | ||
| uom | string | yes | Unit of measure | uom | |
| quarantine | object | Quarantine | |||
| value | number | yes | Quantity | ||
| uom | string | yes | Unit of measure | uom | |
| expiry_date | date | yes | Expiry |
Business rules
- NB-R007 Expiry before manufacture, expiry date must be after manufacture date.
Example
{
"specversion": "2.0",
"id": "evt-inventory-INVENTORY-1",
"type": "nutrab2b.planning.inventory_reported.v2",
"source": "urn:gln:4012345000009:erp",
"subject": "INVENTORY",
"time": "2026-11-02T09:00:00Z",
"datacontenttype": "application/json",
"dataschema": "https://nutrab2b.org/schemas/2.0/INVENTORY.json",
"sender": {
"gln": "4012345000009"
},
"receiver": {
"gln": "0614141000012"
},
"correlationid": "CONV-RFQ-1001",
"idempotencykey": "INVENTORY:INVENTORY:1",
"sequence": 1,
"env": "test",
"data": {
"as_of": "2026-10-31T09:00:00Z",
"location_gln": "4012345000016",
"items": [
{
"item_id": "ASH-KSM-5",
"hs_code": "1302.19",
"lot_number": "ASH-26-119",
"available": {
"value": 1200,
"uom": "KGM"
},
"allocated": {
"value": 500,
"uom": "KGM"
},
"expiry_date": "2029-10-31"
}
]
}
}Mapping checklist
- Every required field populated from your system of record
- Coded fields mapped to the Bodylia OpenB2B code lists
- GLN, GTIN and SSCC check digits validated
- Rules above pass in the validator
- Idempotency key and per-subject sequence generated
- Expected responses, including rejections, handled
