Purchase order
nutrab2b.order.created.v2 · Ordering
- Purpose
- Firm order with lines, quantities, prices, ship-to, Incoterm, requested dates and quality requirements.
- When to send
- Buyer commits to buy.
- Sender → receiver
- Buyer → Supplier
- Expected responses
- PO_RESPONSE, ACK
- Equivalent standards
- X12: 850 · EDIFACT: ORDERS · GS1: Order (GS1 XML 3.x) · SAP: ORDERS05 IDoc / ME21N
- Scenarios using it
- Full order-to-cash · PO rejected below MOQ · Partial acceptance with back-order · PO response must answer every line · Quantity change after acknowledgement · Cancel race after shipment · Split shipment, two lots · Over-shipment beyond tolerance · Multi-pallet, multi-lot SSCC hierarchy · Failed CoA blocks shipment · Out-of-spec lot ships under deviation · Hold blocks shipment until release · Organic certificate expired before shipment · Remaining shelf life too short · Cold-chain excursion · HS 2028: supplements move to 2107.10 · Incoterm vs transport mode conflict · Duplicate delivery (idempotency) · Out-of-order events are parked and released · Dropped event, gap detected, replay · Tampered, mis-signed and replayed messages · Schema version mismatch · Poison message to dead-letter queue · Three-way match failures · Short receipt settled with credit note
Fields and mappings
| Field | Type | Req | Description | Code list / format | EDI / GS1 / SAP mapping |
|---|---|---|---|---|---|
| po_number | string | yes | PO number, unique per buyer | x12: BEG03 edifact: BGM 1004 sap: EBELN | |
| order_date | date | yes | Order dateNB-R015 | x12: BEG05 edifact: DTM+137 | |
| contract_id | string | Blanket / contract released against | |||
| quote_id | string | Quote accepted | |||
| incoterm | string | yes | Incoterm 2020NB-R006 | incoterm | x12: FOB / ITD edifact: TOD |
| incoterm_place | string | Named place | |||
| transport_mode | string | yes | Planned transport modeNB-R006 | transport_mode | x12: TD504 edifact: TDT 8067 |
| payment_terms | string | yes | Payment terms | payment_terms | |
| ship_to | object | yes | Deliver to | ||
| gln | string | yes | Location GLN | ^\d{13}$ | x12: N1 ST/SF N104 edifact: NAD+ST/SF |
| name | string | Name | |||
| address | object | Postal address | |||
| lines | array<string> | Street lines | |||
| city | string | City | |||
| postal_code | string | Postal code | |||
| region | string | State / province (ISO 3166-2 subdivision) | |||
| country | string | yes | Country | country | |
| bill_to | object | Invoice to | |||
| gln | string | yes | Location GLN | ^\d{13}$ | x12: N1 ST/SF N104 edifact: NAD+ST/SF |
| name | string | Name | |||
| address | object | Postal address | |||
| lines | array<string> | Street lines | |||
| city | string | City | |||
| postal_code | string | Postal code | |||
| region | string | State / province (ISO 3166-2 subdivision) | |||
| country | string | yes | Country | country | |
| lines | array<object> | yes | Order lines | ||
| line_no | integer | yes | Line number, unique in document | x12: PO101 edifact: LIN 1082 sap: EBELP | |
| item_id | string | yes | Buyer's or seller's item number | x12: PO107 (BP/VP) edifact: PIA sap: MATNR | |
| gtin | string | GS1 GTIN of the traded item | ^(\d{8}|\d{12,14})$ | x12: PO107 (UK) edifact: LIN C212 (SRV) gs1: gtin | |
| ingredient | string | NutraB2B ingredient master code | ingredient | ||
| description | string | yes | Item description | x12: PID05 edifact: IMD | |
| hs_code | string | yes | HS 6-digit (or national) classificationNB-R005 NB-R017 | ^\d{4}(\.\d{2}){1,2}$|^\d{6,10}$ | x12: PO107 (HS) edifact: PIA+5 C212 (HS) |
| national_code | string | National tariff line for the destination country (8–10 digits)NB-R005 | ^\d{8,10}$ | ||
| grade | string | Grade / pharmacopoeia | grade | ||
| form | string | Product form | product_form | ||
| standardisation | object | Extract standardisation | |||
| type | string | yes | Notation | standardisation | |
| marker | string | Marker compound | |||
| min_pct | number | Minimum % | |||
| max_pct | number | Maximum % | |||
| ratio | string | Drug-extract ratio e.g. 10:1 | ^\d+(\.\d+)?(-\d+(\.\d+)?)?:1$ | ||
| method | string | Assay method | method | ||
| certifications | array<string> | Required certifications | |||
| quantity | object | yes | Ordered quantity | ||
| value | number | yes | Quantity | ||
| uom | string | yes | Unit of measure | uom | |
| unit_price | object | yes | Price per unit of measure | ||
| amount | number | yes | Amount in major units, decimals ≤ currency minor unitsNB-R011 | ||
| currency | string | yes | Currency | currency | |
| requested_delivery | date | Requested delivery dateNB-R015 | |||
| min_shelf_life_days | integer | Minimum remaining shelf life at deliveryNB-R008 | |||
| over_ship_tolerance_pct | number | Allowed over-shipment %NB-R002 | |||
| quality_agreement_ref | string | Quality agreement | |||
| required_docs | array<string> | Documents required with shipment (doc_type codes) | |||
| notes | string | Free text (avoid structured data here) |
Business rules
- NB-R005 HS / national code mismatch, national tariff code does not start with the HS code, or is not a national line for the destination.
- NB-R006 Incoterm vs transport mode, sea-only Incoterm (FAS/FOB/CFR/CIF) used with non-sea mode.
- NB-R011 Currency precision, amount has more decimals than the currency's ISO 4217 minor units.
- NB-R015 Date order, dates are in the wrong order (e.g. delivery before order).
- NB-R017 HS 2028 reclassification, from 2028-01-01, dietary supplements in measured doses classify in 2107.10, not 2106.90.
Example
{
"specversion": "2.0",
"id": "evt-po-PO-55012-1",
"type": "nutrab2b.order.created.v2",
"source": "urn:gln:0614141000012:erp",
"subject": "PO-55012",
"time": "2026-11-02T09:00:00Z",
"datacontenttype": "application/json",
"dataschema": "https://nutrab2b.org/schemas/2.0/PO.json",
"sender": {
"gln": "0614141000012"
},
"receiver": {
"gln": "4012345000009"
},
"correlationid": "CONV-RFQ-1001",
"idempotencykey": "PO:PO-55012:1",
"sequence": 1,
"env": "test",
"data": {
"po_number": "PO-55012",
"order_date": "2026-11-02",
"quote_id": "Q-77",
"incoterm": "FCA",
"incoterm_place": "Bengaluru airport",
"transport_mode": "4",
"payment_terms": "NET30",
"ship_to": {
"gln": "0614141000012",
"name": "NutraBrand DC Reno",
"address": {
"city": "Reno",
"region": "US-NV",
"country": "US"
}
},
"lines": [
{
"line_no": 1,
"item_id": "ASH-KSM-5",
"ingredient": "ASHWAGANDHA",
"description": "Ashwagandha root extract 5%",
"hs_code": "1302.19",
"national_code": "1302194000",
"grade": "USP_DSC",
"form": "EXTRACT_DRY",
"quantity": {
"value": 500,
"uom": "KGM"
},
"unit_price": {
"amount": 58,
"currency": "USD"
},
"requested_delivery": "2026-12-10",
"min_shelf_life_days": 540,
"over_ship_tolerance_pct": 2
}
],
"required_docs": [
"COA",
"COO",
"ORGANIC_TC"
]
}
}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
