Invoice
nutrab2b.finance.invoiced.v2 · Finance
- Purpose
- Commercial invoice with lines, tax and charges; must reconcile with PO and receipt (three-way match).
- When to send
- Goods shipped/received per terms.
- Sender → receiver
- Supplier → Buyer
- Expected responses
- ACK, REMITTANCE
- Equivalent standards
- X12: 810 · EDIFACT: INVOIC · GS1: Invoice · SAP: INVOIC IDoc / MIRO
- Scenarios using it
- Full order-to-cash · Three-way match failures · Short receipt settled with credit note · Invoice totals do not add up
Fields and mappings
| Field | Type | Req | Description | Code list / format | EDI / GS1 / SAP mapping |
|---|---|---|---|---|---|
| invoice_number | string | yes | Invoice number | ||
| invoice_type | string | yes | Type | invoice_type | |
| invoice_date | date | yes | Date | ||
| po_number | string | yes | PO | ||
| asn_id | string | Shipment | |||
| currency | string | yes | Currency | currency | |
| payment_terms | string | yes | Terms | payment_terms | |
| due_date | date | Due date | |||
| lines | array<object> | yes | Invoice lines | ||
| line_no | integer | yes | Line | ||
| po_line_no | integer | yes | PO lineNB-R012 NB-R014 | ||
| item_id | string | yes | Item | ||
| quantity | object | yes | Invoiced quantity | ||
| value | number | yes | Quantity | ||
| uom | string | yes | Unit of measure | uom | |
| unit_price | number | yes | Unit priceNB-R011 NB-R012 | ||
| line_amount | number | yes | quantity × unit priceNB-R001 | ||
| tax_category | string | Tax category | tax_category | ||
| tax_rate_pct | number | Tax rate % | |||
| charges | array<object> | Freight, insurance, discounts (negative) | |||
| type | string | yes | freight | insurance | discount | other | ^(freight|insurance|discount|other)$ | |
| amount | number | yes | Amount | ||
| tax_total | number | yes | Total taxNB-R001 | ||
| total | number | yes | Grand total = Σ lines + charges + taxNB-R001 NB-R011 |
Business rules
- NB-R001 Totals mismatch, line totals, tax and charges do not add up to document total.
- NB-R011 Currency precision, amount has more decimals than the currency's ISO 4217 minor units.
- NB-R012 Three-way match failure, invoice quantity or price differs from PO and receipt beyond tolerance.
- NB-R014 Line reference unknown, response, ship notice or invoice line refers to a PO line that does not exist.
Example
{
"specversion": "2.0",
"id": "evt-invoice-PO-55012-1",
"type": "nutrab2b.finance.invoiced.v2",
"source": "urn:gln:4012345000009:erp",
"subject": "PO-55012",
"time": "2026-11-02T09:00:00Z",
"datacontenttype": "application/json",
"dataschema": "https://nutrab2b.org/schemas/2.0/INVOICE.json",
"sender": {
"gln": "4012345000009"
},
"receiver": {
"gln": "0614141000012"
},
"correlationid": "CONV-RFQ-1001",
"idempotencykey": "INVOICE:PO-55012:1",
"sequence": 1,
"env": "test",
"data": {
"invoice_number": "INV-9001",
"invoice_type": "380",
"invoice_date": "2026-12-03",
"po_number": "PO-55012",
"asn_id": "ASN-9001",
"currency": "USD",
"payment_terms": "NET30",
"due_date": "2027-01-02",
"lines": [
{
"line_no": 1,
"po_line_no": 1,
"item_id": "ASH-KSM-5",
"quantity": {
"value": 500,
"uom": "KGM"
},
"unit_price": 58,
"line_amount": 29000,
"tax_category": "Z",
"tax_rate_pct": 0
}
],
"charges": [
{
"type": "freight",
"amount": 1250
}
],
"tax_total": 0,
"total": 30250
}
}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
