Invoice Releases
INV · invoice.schema.json · Versioned JSON Schema artifacts for this document. The latest version is expanded by default; older versions stay collapsed for quick inspection and download.
1.0.12Latest/edi/contracts/releases/1.0.12/schemas/invoice.schema.json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://docs.datashift.com.au/edi/contracts/releases/1.0.12/schemas/invoice.schema.json",
"title": "Invoice (INV) Canonical Schema",
"description": "Public canonical Invoice contract used to request payment for goods or services supplied against purchase orders and shipments.",
"version": "1.0.12",
"type": "object",
"required": [
"docType",
"correlationId",
"timestamp",
"metadata",
"data"
],
"properties": {
"docType": {
"const": "INV",
"x-datashift-managed": true,
"x-datashift-system": true,
"description": "Canonical document type. For invoices this value is INV.",
"x-order": 1
},
"correlationId": {
"type": "string",
"format": "uuid",
"x-datashift-managed": true,
"x-datashift-system": true,
"description": "Stable UUID used to trace this invoice through order, shipment, and payment workflows.",
"x-order": 2
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "UTC timestamp indicating when DataShift created the canonical invoice.",
"x-datashift-managed": true,
"x-datashift-system": true,
"x-order": 3
},
"metadata": {
"type": "object",
"description": "Public source metadata retained for integration troubleshooting.",
"required": [
"sourceLanguage",
"sourceVersion",
"userAgent"
],
"properties": {
"sourceLanguage": {
"type": "string",
"enum": [
"json",
"cxml"
],
"x-order": 1
},
"sourceVersion": {
"const": "1.0.12",
"description": "Canonical schema version used to create this document",
"x-order": 2
},
"payloadId": {
"type": "string",
"description": "Original cXML payload ID",
"x-order": 3
},
"userAgent": {
"const": "DataShift Edge v1",
"description": "DataShift Edge version that generated the canonical document",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 4
},
"data": {
"type": "object",
"required": [
"invoiceNumber",
"poNumber",
"invoiceDate",
"purpose",
"supplier",
"billTo",
"lineItems",
"invoiceSummary"
],
"properties": {
"invoiceNumber": {
"type": "string",
"description": "Supplier-generated invoice number.",
"x-order": 1
},
"poNumber": {
"type": "string",
"description": "Primary purchase order number this invoice bills against.",
"x-order": 2
},
"invoiceDate": {
"type": "string",
"oneOf": [
{
"format": "date"
},
{
"format": "date-time"
}
],
"description": "Date and time the supplier issued the invoice.",
"x-order": 3
},
"dueDate": {
"type": "string",
"oneOf": [
{
"format": "date"
},
{
"format": "date-time"
}
],
"description": "Payment due date.",
"x-order": 4
},
"purpose": {
"type": "string",
"enum": [
"standard",
"creditMemo",
"debitMemo",
"lineLevelCreditMemo",
"lineLevelDebitMemo"
],
"default": "standard",
"description": "Invoice business purpose.",
"x-enum-descriptions": {
"standard": "Standard invoice requesting payment.",
"creditMemo": "Document reducing a previously invoiced amount.",
"debitMemo": "Document increasing a previously invoiced amount.",
"lineLevelCreditMemo": "Line-level credit against a previous invoice.",
"lineLevelDebitMemo": "Line-level debit against a previous invoice."
},
"x-order": 5
},
"operation": {
"type": "string",
"enum": [
"new",
"update",
"delete"
],
"default": "new",
"description": "Whether this creates, updates, or deletes an invoice",
"x-order": 6
},
"invoiceOrigin": {
"type": "string",
"enum": [
"supplier",
"buyer"
],
"description": "Whether invoice was originated by supplier or buyer (ERS)",
"x-order": 7
},
"isInformationOnly": {
"type": "boolean",
"default": false,
"description": "If true, invoice is for information only and no action required",
"x-order": 8
},
"isERS": {
"type": "boolean",
"default": false,
"description": "Evaluated Receipt Settlement invoice",
"x-order": 9
},
"documentReference": {
"type": "object",
"description": "Reference to previous invoice (for credit/debit memos or cancellations)",
"properties": {
"invoiceId": {
"type": "string",
"x-order": 1
},
"invoiceDate": {
"type": "string",
"oneOf": [
{
"format": "date"
},
{
"format": "date-time"
}
],
"x-order": 2
},
"documentId": {
"type": "string",
"x-order": 3
},
"payloadId": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 10
},
"poReferences": {
"type": "array",
"description": "Purchase orders being invoiced.",
"items": {
"type": "object",
"required": [
"poNumber"
],
"properties": {
"poNumber": {
"type": "string",
"x-order": 1
},
"poVersion": {
"type": "string",
"x-order": 2
},
"documentId": {
"type": "string",
"x-order": 3
},
"payloadId": {
"type": "string",
"x-order": 4
},
"orderDate": {
"type": "string",
"oneOf": [
{
"format": "date"
},
{
"format": "date-time"
}
],
"x-order": 5
}
},
"additionalProperties": false
},
"x-order": 11
},
"asnReference": {
"type": "object",
"description": "Shipment notice reference when invoicing against a dispatched shipment.",
"properties": {
"shipmentId": {
"type": "string",
"x-order": 1
},
"shipmentDate": {
"type": "string",
"oneOf": [
{
"format": "date"
},
{
"format": "date-time"
}
],
"x-order": 2
},
"documentId": {
"type": "string",
"x-order": 3
},
"payloadId": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 12
},
"supplier": {
"title": "Party Definition",
"description": "Supplier or seller issuing the invoice.",
"type": "object",
"properties": {
"id": {
"type": "string",
"x-order": 1
},
"name": {
"type": "string",
"x-order": 2
},
"taxRegistrations": {
"type": "object",
"description": "Australian tax registrations for the party",
"required": [
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"ABN"
],
"x-order": 1
},
"value": {
"type": "string",
"x-order": 2
}
},
"additionalProperties": false,
"x-order": 3
},
"contact": {
"type": "object",
"properties": {
"name": {
"type": "string",
"x-order": 1
},
"phone": {
"type": "string",
"x-order": 2
},
"email": {
"type": "string",
"anyOf": [
{
"format": "email"
},
{
"const": ""
}
],
"x-order": 3
},
"role": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 4
},
"address": {
"title": "Address Definition",
"description": "Standard address structure for DataShift canonical documents",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false,
"x-order": 5
}
},
"required": [
"id",
"name"
],
"additionalProperties": false,
"x-order": 13
},
"billTo": {
"title": "Address Definition",
"description": "Buyer billing party.",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false,
"x-order": 14
},
"soldTo": {
"allOf": [
{
"title": "Address Definition",
"description": "Standard address structure for DataShift canonical documents",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false
}
],
"description": "Sold-to party (may differ from bill-to)",
"x-order": 15
},
"shipTo": {
"title": "Address Definition",
"description": "Standard address structure for DataShift canonical documents",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false,
"x-order": 16
},
"remitTo": {
"type": "object",
"description": "Address where payment should be sent",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
},
"bankDetails": {
"type": "object",
"properties": {
"bankName": {
"type": "string",
"x-order": 1
},
"accountName": {
"type": "string",
"x-order": 2
},
"accountNumber": {
"type": "string",
"x-order": 3
},
"bsb": {
"type": "string",
"x-order": 4
},
"swift": {
"type": "string",
"x-order": 5
},
"iban": {
"type": "string",
"x-order": 6
}
},
"additionalProperties": false,
"x-order": 9
}
},
"additionalProperties": false,
"x-order": 17
},
"shipping": {
"type": "object",
"description": "Commercial freight charges and instructions for the invoice.",
"properties": {
"amount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 1
},
"currency": {
"title": "Currency Enumeration",
"description": "ISO 4217 currency codes supported by DataShift canonical schemas",
"type": "string",
"enum": [
"AUD"
],
"x-order": 2
},
"carrier": {
"type": "string",
"x-order": 3
},
"route": {
"type": "string",
"x-order": 4
},
"shippingInstructions": {
"type": "string",
"x-order": 5
},
"buyerAcctNumber": {
"type": "string",
"x-order": 6
},
"incoTerms": {
"type": "string",
"enum": [
"cfr",
"cif",
"cip",
"cpt",
"daf",
"dap",
"ddp",
"ddu",
"dpu",
"deq",
"des",
"exw",
"fas",
"fca",
"fob"
],
"x-order": 7
}
},
"additionalProperties": false,
"x-order": 18
},
"shipmentDetails": {
"type": "object",
"description": "Actual dispatch and tracking information for the invoiced goods",
"properties": {
"carrier": {
"type": "string",
"x-order": 1
},
"trackingNumber": {
"type": "string",
"x-order": 2
},
"shippingDate": {
"type": "string",
"oneOf": [
{
"format": "date"
},
{
"format": "date-time"
}
],
"x-order": 3
}
},
"additionalProperties": false,
"x-order": 19
},
"paymentTerms": {
"type": "object",
"description": "Payment terms and conditions",
"properties": {
"description": {
"type": "string",
"description": "Human-readable payment terms (e.g., 'Net 30', '2/10 Net 30')",
"x-order": 1
},
"netDays": {
"type": "integer",
"description": "Number of days until payment is due",
"x-order": 2
},
"discountTerms": {
"type": "array",
"description": "Early payment discount tiers",
"items": {
"type": "object",
"properties": {
"discountPercent": {
"type": "number",
"multipleOf": 0.01,
"description": "Discount percentage (e.g., 2 for 2%)",
"x-order": 1
},
"discountDays": {
"type": "integer",
"description": "Days within which discount applies",
"x-order": 2
},
"discountDueDate": {
"type": "string",
"format": "date",
"description": "Specific date by which discount applies",
"x-order": 3
}
},
"additionalProperties": false
},
"x-order": 3
}
},
"additionalProperties": false,
"x-order": 20
},
"contacts": {
"type": "array",
"description": "Contact information for various roles",
"items": {
"type": "object",
"required": [
"role"
],
"properties": {
"role": {
"type": "string",
"enum": [
"issuerOfInvoice",
"soldTo",
"billTo",
"remitTo",
"shipFrom",
"shipTo"
],
"x-order": 1
},
"name": {
"type": "string",
"x-order": 2
},
"email": {
"type": "string",
"anyOf": [
{
"format": "email"
},
{
"const": ""
}
],
"x-order": 3
},
"phone": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false
},
"x-order": 21
},
"comments": {
"type": "string",
"maxLength": 2000,
"description": "Invoice-level comments or notes",
"x-order": 22
},
"lineItems": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": [
"invoiceLineNumber",
"quantity",
"unitPrice",
"subtotal",
"currency"
],
"properties": {
"invoiceLineNumber": {
"type": "integer",
"description": "Supplier's line number for this invoice line.",
"x-order": 1
},
"uniqueLineKey": {
"type": "string",
"description": "DataShift-managed stable line key from the original purchase order.",
"x-datashift-managed": true,
"x-datashift-system": true,
"x-order": 2
},
"poLineReference": {
"type": "integer",
"description": "Line number from the purchase order being invoiced.",
"x-order": 3
},
"asnLineReference": {
"type": "integer",
"description": "Line number from the ship notice",
"x-order": 4
},
"supplierItemId": {
"type": "string",
"description": "Supplier's part/item number",
"x-order": 5
},
"buyerItemId": {
"type": "string",
"description": "Buyer's part/item number",
"x-order": 6
},
"description": {
"type": "string",
"description": "Item description",
"x-order": 7
},
"quantity": {
"type": "number",
"multipleOf": 0.01,
"description": "Quantity invoiced.",
"x-order": 8
},
"unitOfMeasure": {
"title": "REC20 Unit of Measure Codes",
"description": "UN/ECE Recommendation 20 unit of measure codes for DataShift canonical documents",
"type": "string",
"enum": [
"AY",
"BG",
"BL",
"BR",
"BLL",
"E2",
"BO",
"BX",
"BJ",
"BE",
"KA",
"CA",
"CG",
"CT",
"CQ",
"CS",
"CMT",
"CL",
"CH",
"MTQ",
"CY",
"DAY",
"DC",
"DZN",
"DR",
"EA",
"FOT",
"GRM",
"HUR",
"CEN",
"INH",
"JR",
"KGM",
"KMT",
"KT",
"LN",
"LK",
"LTR",
"MTR",
"TNE",
"MLT",
"MMT",
"MON",
"PK",
"PD",
"PL",
"PR",
"D97",
"C62",
"PG",
"LBR",
"RL",
"RO",
"SA",
"SE",
"SET",
"ST",
"SO",
"MTK",
"U3",
"MIL",
"TU",
"WEE"
],
"x-order": 9
},
"unitPrice": {
"description": "Integer unit price at ISO 4217 minor-unit scale + 2 (e.g. AUD, exponent 2 -> 1/10000: 5.2185 -> 52185). Carries sub-minor precision; not rounded to minor units.",
"type": "integer",
"x-datashift-money": "rate",
"x-order": 10
},
"subtotal": {
"description": "Line subtotal before tax and adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 11
},
"taxAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 12
},
"taxRate": {
"type": "number",
"multipleOf": 0.01,
"description": "Tax rate as percentage (e.g., 10 for 10%)",
"x-order": 13
},
"discountAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 14
},
"shippingAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 15
},
"grossAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 16
},
"netAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 17
},
"currency": {
"title": "Currency Enumeration",
"description": "ISO 4217 currency code for this line.",
"type": "string",
"enum": [
"AUD"
],
"x-order": 18
},
"manufacturerPartId": {
"type": "string",
"description": "Manufacturer's part number",
"x-order": 19
},
"manufacturerName": {
"type": "string",
"description": "Manufacturer name",
"x-order": 20
},
"countryOfOrigin": {
"type": "string",
"enum": [
"AU"
],
"description": "Country where item was manufactured",
"x-order": 21
},
"serialNumbers": {
"type": "array",
"items": {
"type": "string"
},
"description": "Serial numbers for serialized items",
"x-order": 22
},
"batchId": {
"type": "string",
"description": "Lot/batch ID",
"x-order": 23
},
"classification": {
"type": "array",
"description": "Product classification codes",
"items": {
"type": "object",
"properties": {
"domain": {
"type": "string",
"enum": [
"UNSPSC",
"HS",
"commodity"
],
"description": "Classification scheme",
"x-order": 1
},
"code": {
"type": "string",
"x-order": 2
}
},
"additionalProperties": false
},
"x-order": 24
},
"comments": {
"type": "string",
"maxLength": 500,
"description": "Line-level comments",
"x-order": 25
}
},
"additionalProperties": false
},
"description": "Invoice lines. DataShift manages uniqueLineKey correlation back to PO and ASN lines where needed.",
"x-order": 23
},
"invoiceSummary": {
"type": "object",
"required": [
"taxAmount",
"dueAmount",
"currency"
],
"description": "Invoice totals, tax, discounts, and amount due.",
"properties": {
"shippingAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 1
},
"specialHandlingAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 2
},
"taxAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 3
},
"taxBreakdown": {
"type": "array",
"description": "Tax breakdown by type/jurisdiction",
"items": {
"type": "object",
"properties": {
"taxType": {
"type": "string",
"enum": [
"GST",
"VAT",
"salesTax",
"excise",
"other"
],
"description": "Type of tax",
"x-order": 1
},
"taxRate": {
"type": "number",
"multipleOf": 0.01,
"description": "Tax rate as percentage",
"x-order": 2
},
"taxableAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 3
},
"taxAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 4
},
"jurisdiction": {
"type": "string",
"description": "Tax jurisdiction (e.g., state, country)",
"x-order": 5
},
"description": {
"type": "string",
"x-order": 6
}
},
"additionalProperties": false
},
"x-order": 4
},
"discountAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 5
},
"grossAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 6
},
"netAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 7
},
"depositAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 8
},
"dueAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 9
},
"currency": {
"title": "Currency Enumeration",
"description": "ISO 4217 currency codes supported by DataShift canonical schemas",
"type": "string",
"enum": [
"AUD"
],
"x-order": 10
}
},
"additionalProperties": false,
"x-order": 24
},
"extrinsics": {
"type": "object",
"description": "Partner-specific extension fields that are not part of the canonical core contract.",
"additionalProperties": {
"x-additionalPropertiesName": "extensionField",
"description": "Partner-specific extension value."
},
"x-order": 25
}
},
"additionalProperties": false,
"description": "Business payload for the invoice.",
"x-order": 5
}
},
"additionalProperties": false,
"examples": [
{
"docType": "INV",
"correlationId": "43e7580b-e592-46bb-a3d0-dbf8997758d9",
"timestamp": "2026-05-16T04:00:00Z",
"metadata": {
"sourceLanguage": "cxml",
"sourceVersion": "1.0.12",
"payloadId": "inv-example-10001",
"userAgent": "DataShift Edge v1"
},
"data": {
"invoiceNumber": "INV-10001",
"poNumber": "PO-10001",
"invoiceDate": "2026-05-16T04:00:00Z",
"dueDate": "2026-06-15T00:00:00Z",
"purpose": "standard",
"poReferences": [
{
"poNumber": "PO-10001",
"poVersion": "1"
}
],
"supplier": {
"id": "SUPPLIER-AU",
"name": "Example Supplier Pty Ltd",
"taxRegistrations": {
"type": "ABN",
"value": "98765432109"
},
"address": {
"addressee": "Example Supplier Pty Ltd",
"street1": "20 Supplier Street",
"city": "Adelaide",
"state": "SA",
"postalCode": "5000",
"country": "AU"
}
},
"billTo": {
"addressee": "Example Buyer Accounts",
"street1": "1 Market Street",
"city": "Sydney",
"state": "NSW",
"postalCode": "2000",
"country": "AU"
},
"lineItems": [
{
"invoiceLineNumber": 1,
"uniqueLineKey": "PO-10001-1",
"poLineReference": 1,
"supplierItemId": "SUP-001",
"buyerItemId": "BUY-001",
"description": "Example product",
"quantity": 10,
"unitOfMeasure": "EA",
"unitPrice": 1500000,
"subtotal": 150000,
"taxAmount": 15000,
"currency": "AUD"
}
],
"invoiceSummary": {
"taxAmount": 15000,
"grossAmount": 165000,
"netAmount": 165000,
"dueAmount": 165000,
"currency": "AUD"
},
"extrinsics": {
"accountsReference": "AP-10001"
}
}
}
]
}1.0.11/edi/contracts/releases/1.0.11/schemas/invoice.schema.json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://docs.datashift.com.au/edi/contracts/releases/1.0.11/schemas/invoice.schema.json",
"title": "Invoice (INV) Canonical Schema",
"description": "Public canonical Invoice contract used to request payment for goods or services supplied against purchase orders and shipments.",
"version": "1.0.11",
"type": "object",
"required": [
"docType",
"correlationId",
"timestamp",
"metadata",
"data"
],
"properties": {
"docType": {
"const": "INV",
"x-datashift-managed": true,
"x-datashift-system": true,
"description": "Canonical document type. For invoices this value is INV.",
"x-order": 1
},
"correlationId": {
"type": "string",
"format": "uuid",
"x-datashift-managed": true,
"x-datashift-system": true,
"description": "Stable UUID used to trace this invoice through order, shipment, and payment workflows.",
"x-order": 2
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "UTC timestamp indicating when DataShift created the canonical invoice.",
"x-datashift-managed": true,
"x-datashift-system": true,
"x-order": 3
},
"metadata": {
"type": "object",
"description": "Public source metadata retained for integration troubleshooting.",
"required": [
"sourceLanguage",
"sourceVersion",
"userAgent"
],
"properties": {
"sourceLanguage": {
"type": "string",
"enum": [
"json",
"cxml"
],
"x-order": 1
},
"sourceVersion": {
"const": "1.0.11",
"description": "Canonical schema version used to create this document",
"x-order": 2
},
"payloadId": {
"type": "string",
"description": "Original cXML payload ID",
"x-order": 3
},
"userAgent": {
"const": "DataShift Edge v1",
"description": "DataShift Edge version that generated the canonical document",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 4
},
"data": {
"type": "object",
"required": [
"invoiceNumber",
"poNumber",
"invoiceDate",
"purpose",
"supplier",
"billTo",
"lineItems",
"invoiceSummary"
],
"properties": {
"invoiceNumber": {
"type": "string",
"description": "Supplier-generated invoice number.",
"x-order": 1
},
"poNumber": {
"type": "string",
"description": "Primary purchase order number this invoice bills against.",
"x-order": 2
},
"invoiceDate": {
"type": "string",
"format": "date-time",
"description": "Date and time the supplier issued the invoice.",
"x-order": 3
},
"dueDate": {
"type": "string",
"format": "date-time",
"description": "Payment due date.",
"x-order": 4
},
"purpose": {
"type": "string",
"enum": [
"standard",
"creditMemo",
"debitMemo",
"lineLevelCreditMemo",
"lineLevelDebitMemo"
],
"default": "standard",
"description": "Invoice business purpose.",
"x-enum-descriptions": {
"standard": "Standard invoice requesting payment.",
"creditMemo": "Document reducing a previously invoiced amount.",
"debitMemo": "Document increasing a previously invoiced amount.",
"lineLevelCreditMemo": "Line-level credit against a previous invoice.",
"lineLevelDebitMemo": "Line-level debit against a previous invoice."
},
"x-order": 5
},
"operation": {
"type": "string",
"enum": [
"new",
"update",
"delete"
],
"default": "new",
"description": "Whether this creates, updates, or deletes an invoice",
"x-order": 6
},
"invoiceOrigin": {
"type": "string",
"enum": [
"supplier",
"buyer"
],
"description": "Whether invoice was originated by supplier or buyer (ERS)",
"x-order": 7
},
"isInformationOnly": {
"type": "boolean",
"default": false,
"description": "If true, invoice is for information only and no action required",
"x-order": 8
},
"isERS": {
"type": "boolean",
"default": false,
"description": "Evaluated Receipt Settlement invoice",
"x-order": 9
},
"documentReference": {
"type": "object",
"description": "Reference to previous invoice (for credit/debit memos or cancellations)",
"properties": {
"invoiceId": {
"type": "string",
"x-order": 1
},
"invoiceDate": {
"type": "string",
"format": "date-time",
"x-order": 2
},
"documentId": {
"type": "string",
"x-order": 3
},
"payloadId": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 10
},
"poReferences": {
"type": "array",
"description": "Purchase orders being invoiced.",
"items": {
"type": "object",
"required": [
"poNumber"
],
"properties": {
"poNumber": {
"type": "string",
"x-order": 1
},
"poVersion": {
"type": "string",
"x-order": 2
},
"documentId": {
"type": "string",
"x-order": 3
},
"payloadId": {
"type": "string",
"x-order": 4
},
"orderDate": {
"type": "string",
"format": "date-time",
"x-order": 5
}
},
"additionalProperties": false
},
"x-order": 11
},
"asnReference": {
"type": "object",
"description": "Shipment notice reference when invoicing against a dispatched shipment.",
"properties": {
"shipmentId": {
"type": "string",
"x-order": 1
},
"shipmentDate": {
"type": "string",
"format": "date-time",
"x-order": 2
},
"documentId": {
"type": "string",
"x-order": 3
},
"payloadId": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 12
},
"supplier": {
"title": "Party Definition",
"description": "Supplier or seller issuing the invoice.",
"type": "object",
"properties": {
"id": {
"type": "string",
"x-order": 1
},
"name": {
"type": "string",
"x-order": 2
},
"taxRegistrations": {
"type": "object",
"description": "Australian tax registrations for the party",
"required": [
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"ABN"
],
"x-order": 1
},
"value": {
"type": "string",
"x-order": 2
}
},
"additionalProperties": false,
"x-order": 3
},
"contact": {
"type": "object",
"properties": {
"name": {
"type": "string",
"x-order": 1
},
"phone": {
"type": "string",
"x-order": 2
},
"email": {
"type": "string",
"anyOf": [
{
"format": "email"
},
{
"const": ""
}
],
"x-order": 3
},
"role": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 4
},
"address": {
"title": "Address Definition",
"description": "Standard address structure for DataShift canonical documents",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false,
"x-order": 5
}
},
"required": [
"id",
"name"
],
"additionalProperties": false,
"x-order": 13
},
"billTo": {
"title": "Address Definition",
"description": "Buyer billing party.",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false,
"x-order": 14
},
"soldTo": {
"allOf": [
{
"title": "Address Definition",
"description": "Standard address structure for DataShift canonical documents",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false
}
],
"description": "Sold-to party (may differ from bill-to)",
"x-order": 15
},
"shipTo": {
"title": "Address Definition",
"description": "Standard address structure for DataShift canonical documents",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false,
"x-order": 16
},
"remitTo": {
"type": "object",
"description": "Address where payment should be sent",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
},
"bankDetails": {
"type": "object",
"properties": {
"bankName": {
"type": "string",
"x-order": 1
},
"accountName": {
"type": "string",
"x-order": 2
},
"accountNumber": {
"type": "string",
"x-order": 3
},
"bsb": {
"type": "string",
"x-order": 4
},
"swift": {
"type": "string",
"x-order": 5
},
"iban": {
"type": "string",
"x-order": 6
}
},
"additionalProperties": false,
"x-order": 9
}
},
"additionalProperties": false,
"x-order": 17
},
"shipping": {
"type": "object",
"description": "Commercial freight charges and instructions for the invoice.",
"properties": {
"amount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 1
},
"currency": {
"title": "Currency Enumeration",
"description": "ISO 4217 currency codes supported by DataShift canonical schemas",
"type": "string",
"enum": [
"AUD"
],
"x-order": 2
},
"carrier": {
"type": "string",
"x-order": 3
},
"route": {
"type": "string",
"x-order": 4
},
"shippingInstructions": {
"type": "string",
"x-order": 5
},
"buyerAcctNumber": {
"type": "string",
"x-order": 6
},
"incoTerms": {
"type": "string",
"enum": [
"cfr",
"cif",
"cip",
"cpt",
"daf",
"dap",
"ddp",
"ddu",
"dpu",
"deq",
"des",
"exw",
"fas",
"fca",
"fob"
],
"x-order": 7
}
},
"additionalProperties": false,
"x-order": 18
},
"shipmentDetails": {
"type": "object",
"description": "Actual dispatch and tracking information for the invoiced goods",
"properties": {
"carrier": {
"type": "string",
"x-order": 1
},
"trackingNumber": {
"type": "string",
"x-order": 2
},
"shippingDate": {
"type": "string",
"format": "date-time",
"x-order": 3
}
},
"additionalProperties": false,
"x-order": 19
},
"paymentTerms": {
"type": "object",
"description": "Payment terms and conditions",
"properties": {
"description": {
"type": "string",
"description": "Human-readable payment terms (e.g., 'Net 30', '2/10 Net 30')",
"x-order": 1
},
"netDays": {
"type": "integer",
"description": "Number of days until payment is due",
"x-order": 2
},
"discountTerms": {
"type": "array",
"description": "Early payment discount tiers",
"items": {
"type": "object",
"properties": {
"discountPercent": {
"type": "number",
"multipleOf": 0.01,
"description": "Discount percentage (e.g., 2 for 2%)",
"x-order": 1
},
"discountDays": {
"type": "integer",
"description": "Days within which discount applies",
"x-order": 2
},
"discountDueDate": {
"type": "string",
"format": "date",
"description": "Specific date by which discount applies",
"x-order": 3
}
},
"additionalProperties": false
},
"x-order": 3
}
},
"additionalProperties": false,
"x-order": 20
},
"contacts": {
"type": "array",
"description": "Contact information for various roles",
"items": {
"type": "object",
"required": [
"role"
],
"properties": {
"role": {
"type": "string",
"enum": [
"issuerOfInvoice",
"soldTo",
"billTo",
"remitTo",
"shipFrom",
"shipTo"
],
"x-order": 1
},
"name": {
"type": "string",
"x-order": 2
},
"email": {
"type": "string",
"anyOf": [
{
"format": "email"
},
{
"const": ""
}
],
"x-order": 3
},
"phone": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false
},
"x-order": 21
},
"comments": {
"type": "string",
"maxLength": 2000,
"description": "Invoice-level comments or notes",
"x-order": 22
},
"lineItems": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": [
"invoiceLineNumber",
"quantity",
"unitPrice",
"subtotal",
"currency"
],
"properties": {
"invoiceLineNumber": {
"type": "integer",
"description": "Supplier's line number for this invoice line.",
"x-order": 1
},
"uniqueLineKey": {
"type": "string",
"description": "DataShift-managed stable line key from the original purchase order.",
"x-datashift-managed": true,
"x-datashift-system": true,
"x-order": 2
},
"poLineReference": {
"type": "integer",
"description": "Line number from the purchase order being invoiced.",
"x-order": 3
},
"asnLineReference": {
"type": "integer",
"description": "Line number from the ship notice",
"x-order": 4
},
"supplierItemId": {
"type": "string",
"description": "Supplier's part/item number",
"x-order": 5
},
"buyerItemId": {
"type": "string",
"description": "Buyer's part/item number",
"x-order": 6
},
"description": {
"type": "string",
"description": "Item description",
"x-order": 7
},
"quantity": {
"type": "number",
"multipleOf": 0.01,
"description": "Quantity invoiced.",
"x-order": 8
},
"unitOfMeasure": {
"title": "REC20 Unit of Measure Codes",
"description": "UN/ECE Recommendation 20 unit of measure codes for DataShift canonical documents",
"type": "string",
"enum": [
"AY",
"BG",
"BL",
"BR",
"BLL",
"E2",
"BO",
"BX",
"BJ",
"BE",
"KA",
"CA",
"CG",
"CT",
"CQ",
"CS",
"CMT",
"CL",
"CH",
"MTQ",
"CY",
"DAY",
"DC",
"DZN",
"DR",
"EA",
"FOT",
"GRM",
"HUR",
"CEN",
"INH",
"JR",
"KGM",
"KMT",
"KT",
"LN",
"LK",
"LTR",
"MTR",
"TNE",
"MLT",
"MMT",
"MON",
"PK",
"PD",
"PL",
"PR",
"D97",
"C62",
"PG",
"LBR",
"RL",
"RO",
"SA",
"SE",
"SET",
"ST",
"SO",
"MTK",
"U3",
"MIL",
"TU",
"WEE"
],
"x-order": 9
},
"unitPrice": {
"description": "Integer unit price at ISO 4217 minor-unit scale + 2 (e.g. AUD, exponent 2 -> 1/10000: 5.2185 -> 52185). Carries sub-minor precision; not rounded to minor units.",
"type": "integer",
"x-datashift-money": "rate",
"x-order": 10
},
"subtotal": {
"description": "Line subtotal before tax and adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 11
},
"taxAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 12
},
"taxRate": {
"type": "number",
"multipleOf": 0.01,
"description": "Tax rate as percentage (e.g., 10 for 10%)",
"x-order": 13
},
"discountAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 14
},
"shippingAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 15
},
"grossAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 16
},
"netAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 17
},
"currency": {
"title": "Currency Enumeration",
"description": "ISO 4217 currency code for this line.",
"type": "string",
"enum": [
"AUD"
],
"x-order": 18
},
"manufacturerPartId": {
"type": "string",
"description": "Manufacturer's part number",
"x-order": 19
},
"manufacturerName": {
"type": "string",
"description": "Manufacturer name",
"x-order": 20
},
"countryOfOrigin": {
"type": "string",
"enum": [
"AU"
],
"description": "Country where item was manufactured",
"x-order": 21
},
"serialNumbers": {
"type": "array",
"items": {
"type": "string"
},
"description": "Serial numbers for serialized items",
"x-order": 22
},
"batchId": {
"type": "string",
"description": "Lot/batch ID",
"x-order": 23
},
"classification": {
"type": "array",
"description": "Product classification codes",
"items": {
"type": "object",
"properties": {
"domain": {
"type": "string",
"enum": [
"UNSPSC",
"HS",
"commodity"
],
"description": "Classification scheme",
"x-order": 1
},
"code": {
"type": "string",
"x-order": 2
}
},
"additionalProperties": false
},
"x-order": 24
},
"comments": {
"type": "string",
"maxLength": 500,
"description": "Line-level comments",
"x-order": 25
}
},
"additionalProperties": false
},
"description": "Invoice lines. DataShift manages uniqueLineKey correlation back to PO and ASN lines where needed.",
"x-order": 23
},
"invoiceSummary": {
"type": "object",
"required": [
"taxAmount",
"dueAmount",
"currency"
],
"description": "Invoice totals, tax, discounts, and amount due.",
"properties": {
"shippingAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 1
},
"specialHandlingAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 2
},
"taxAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 3
},
"taxBreakdown": {
"type": "array",
"description": "Tax breakdown by type/jurisdiction",
"items": {
"type": "object",
"properties": {
"taxType": {
"type": "string",
"enum": [
"GST",
"VAT",
"salesTax",
"excise",
"other"
],
"description": "Type of tax",
"x-order": 1
},
"taxRate": {
"type": "number",
"multipleOf": 0.01,
"description": "Tax rate as percentage",
"x-order": 2
},
"taxableAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 3
},
"taxAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 4
},
"jurisdiction": {
"type": "string",
"description": "Tax jurisdiction (e.g., state, country)",
"x-order": 5
},
"description": {
"type": "string",
"x-order": 6
}
},
"additionalProperties": false
},
"x-order": 4
},
"discountAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 5
},
"grossAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 6
},
"netAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 7
},
"depositAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 8
},
"dueAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 9
},
"currency": {
"title": "Currency Enumeration",
"description": "ISO 4217 currency codes supported by DataShift canonical schemas",
"type": "string",
"enum": [
"AUD"
],
"x-order": 10
}
},
"additionalProperties": false,
"x-order": 24
},
"extrinsics": {
"type": "object",
"description": "Partner-specific extension fields that are not part of the canonical core contract.",
"additionalProperties": {
"x-additionalPropertiesName": "extensionField",
"description": "Partner-specific extension value."
},
"x-order": 25
}
},
"additionalProperties": false,
"description": "Business payload for the invoice.",
"x-order": 5
}
},
"additionalProperties": false,
"examples": [
{
"docType": "INV",
"correlationId": "43e7580b-e592-46bb-a3d0-dbf8997758d9",
"timestamp": "2026-05-16T04:00:00Z",
"metadata": {
"sourceLanguage": "cxml",
"sourceVersion": "1.0.11",
"payloadId": "inv-example-10001",
"userAgent": "DataShift Edge v1"
},
"data": {
"invoiceNumber": "INV-10001",
"poNumber": "PO-10001",
"invoiceDate": "2026-05-16T04:00:00Z",
"dueDate": "2026-06-15T00:00:00Z",
"purpose": "standard",
"poReferences": [
{
"poNumber": "PO-10001",
"poVersion": "1"
}
],
"supplier": {
"id": "SUPPLIER-AU",
"name": "Example Supplier Pty Ltd",
"taxRegistrations": {
"type": "ABN",
"value": "98765432109"
},
"address": {
"addressee": "Example Supplier Pty Ltd",
"street1": "20 Supplier Street",
"city": "Adelaide",
"state": "SA",
"postalCode": "5000",
"country": "AU"
}
},
"billTo": {
"addressee": "Example Buyer Accounts",
"street1": "1 Market Street",
"city": "Sydney",
"state": "NSW",
"postalCode": "2000",
"country": "AU"
},
"lineItems": [
{
"invoiceLineNumber": 1,
"uniqueLineKey": "PO-10001-1",
"poLineReference": 1,
"supplierItemId": "SUP-001",
"buyerItemId": "BUY-001",
"description": "Example product",
"quantity": 10,
"unitOfMeasure": "EA",
"unitPrice": 1500000,
"subtotal": 150000,
"taxAmount": 15000,
"currency": "AUD"
}
],
"invoiceSummary": {
"taxAmount": 15000,
"grossAmount": 165000,
"netAmount": 165000,
"dueAmount": 165000,
"currency": "AUD"
},
"extrinsics": {
"accountsReference": "AP-10001"
}
}
}
]
}1.0.10/edi/contracts/releases/1.0.10/schemas/invoice.schema.json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://docs.datashift.com.au/edi/contracts/releases/1.0.10/schemas/invoice.schema.json",
"title": "Invoice (INV) Canonical Schema",
"description": "Public canonical Invoice contract used to request payment for goods or services supplied against purchase orders and shipments.",
"version": "1.0.10",
"type": "object",
"required": [
"docType",
"correlationId",
"timestamp",
"metadata",
"data"
],
"properties": {
"docType": {
"const": "INV",
"x-datashift-managed": true,
"x-datashift-system": true,
"description": "Canonical document type. For invoices this value is INV.",
"x-order": 1
},
"correlationId": {
"type": "string",
"format": "uuid",
"x-datashift-managed": true,
"x-datashift-system": true,
"description": "Stable UUID used to trace this invoice through order, shipment, and payment workflows.",
"x-order": 2
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "UTC timestamp indicating when DataShift created the canonical invoice.",
"x-datashift-managed": true,
"x-datashift-system": true,
"x-order": 3
},
"metadata": {
"type": "object",
"description": "Public source metadata retained for integration troubleshooting.",
"required": [
"sourceLanguage",
"sourceVersion",
"userAgent"
],
"properties": {
"sourceLanguage": {
"type": "string",
"enum": [
"json",
"cxml"
],
"x-order": 1
},
"sourceVersion": {
"const": "1.0.10",
"description": "Canonical schema version used to create this document",
"x-order": 2
},
"payloadId": {
"type": "string",
"description": "Original cXML payload ID",
"x-order": 3
},
"userAgent": {
"const": "DataShift Edge v1",
"description": "DataShift Edge version that generated the canonical document",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 4
},
"data": {
"type": "object",
"required": [
"invoiceNumber",
"poNumber",
"invoiceDate",
"purpose",
"supplier",
"billTo",
"lineItems",
"invoiceSummary"
],
"properties": {
"invoiceNumber": {
"type": "string",
"description": "Supplier-generated invoice number.",
"x-order": 1
},
"poNumber": {
"type": "string",
"description": "Primary purchase order number this invoice bills against.",
"x-order": 2
},
"invoiceDate": {
"type": "string",
"format": "date-time",
"description": "Date and time the supplier issued the invoice.",
"x-order": 3
},
"dueDate": {
"type": "string",
"format": "date-time",
"description": "Payment due date.",
"x-order": 4
},
"purpose": {
"type": "string",
"enum": [
"standard",
"creditMemo",
"debitMemo",
"lineLevelCreditMemo",
"lineLevelDebitMemo"
],
"default": "standard",
"description": "Invoice business purpose.",
"x-enum-descriptions": {
"standard": "Standard invoice requesting payment.",
"creditMemo": "Document reducing a previously invoiced amount.",
"debitMemo": "Document increasing a previously invoiced amount.",
"lineLevelCreditMemo": "Line-level credit against a previous invoice.",
"lineLevelDebitMemo": "Line-level debit against a previous invoice."
},
"x-order": 5
},
"operation": {
"type": "string",
"enum": [
"new",
"update",
"delete"
],
"default": "new",
"description": "Whether this creates, updates, or deletes an invoice",
"x-order": 6
},
"invoiceOrigin": {
"type": "string",
"enum": [
"supplier",
"buyer"
],
"description": "Whether invoice was originated by supplier or buyer (ERS)",
"x-order": 7
},
"isInformationOnly": {
"type": "boolean",
"default": false,
"description": "If true, invoice is for information only and no action required",
"x-order": 8
},
"isERS": {
"type": "boolean",
"default": false,
"description": "Evaluated Receipt Settlement invoice",
"x-order": 9
},
"documentReference": {
"type": "object",
"description": "Reference to previous invoice (for credit/debit memos or cancellations)",
"properties": {
"invoiceId": {
"type": "string",
"x-order": 1
},
"invoiceDate": {
"type": "string",
"format": "date-time",
"x-order": 2
},
"documentId": {
"type": "string",
"x-order": 3
},
"payloadId": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 10
},
"poReferences": {
"type": "array",
"description": "Purchase orders being invoiced.",
"items": {
"type": "object",
"required": [
"poNumber"
],
"properties": {
"poNumber": {
"type": "string",
"x-order": 1
},
"poVersion": {
"type": "string",
"x-order": 2
},
"documentId": {
"type": "string",
"x-order": 3
},
"payloadId": {
"type": "string",
"x-order": 4
},
"orderDate": {
"type": "string",
"format": "date-time",
"x-order": 5
}
},
"additionalProperties": false
},
"x-order": 11
},
"asnReference": {
"type": "object",
"description": "Shipment notice reference when invoicing against a dispatched shipment.",
"properties": {
"shipmentId": {
"type": "string",
"x-order": 1
},
"shipmentDate": {
"type": "string",
"format": "date-time",
"x-order": 2
},
"documentId": {
"type": "string",
"x-order": 3
},
"payloadId": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 12
},
"supplier": {
"title": "Party Definition",
"description": "Supplier or seller issuing the invoice.",
"type": "object",
"properties": {
"id": {
"type": "string",
"x-order": 1
},
"name": {
"type": "string",
"x-order": 2
},
"taxRegistrations": {
"type": "object",
"description": "Australian tax registrations for the party",
"required": [
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"ABN"
],
"x-order": 1
},
"value": {
"type": "string",
"x-order": 2
}
},
"additionalProperties": false,
"x-order": 3
},
"contact": {
"type": "object",
"properties": {
"name": {
"type": "string",
"x-order": 1
},
"phone": {
"type": "string",
"x-order": 2
},
"email": {
"type": "string",
"anyOf": [
{
"format": "email"
},
{
"const": ""
}
],
"x-order": 3
},
"role": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 4
},
"address": {
"title": "Address Definition",
"description": "Standard address structure for DataShift canonical documents",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false,
"x-order": 5
}
},
"required": [
"id",
"name"
],
"additionalProperties": false,
"x-order": 13
},
"billTo": {
"title": "Address Definition",
"description": "Buyer billing party.",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false,
"x-order": 14
},
"soldTo": {
"allOf": [
{
"title": "Address Definition",
"description": "Standard address structure for DataShift canonical documents",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false
}
],
"description": "Sold-to party (may differ from bill-to)",
"x-order": 15
},
"shipTo": {
"title": "Address Definition",
"description": "Standard address structure for DataShift canonical documents",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false,
"x-order": 16
},
"remitTo": {
"type": "object",
"description": "Address where payment should be sent",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
},
"bankDetails": {
"type": "object",
"properties": {
"bankName": {
"type": "string",
"x-order": 1
},
"accountName": {
"type": "string",
"x-order": 2
},
"accountNumber": {
"type": "string",
"x-order": 3
},
"bsb": {
"type": "string",
"x-order": 4
},
"swift": {
"type": "string",
"x-order": 5
},
"iban": {
"type": "string",
"x-order": 6
}
},
"additionalProperties": false,
"x-order": 9
}
},
"additionalProperties": false,
"x-order": 17
},
"shipping": {
"type": "object",
"description": "Commercial freight charges and instructions for the invoice.",
"properties": {
"amount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 1
},
"currency": {
"title": "Currency Enumeration",
"description": "ISO 4217 currency codes supported by DataShift canonical schemas",
"type": "string",
"enum": [
"AUD"
],
"x-order": 2
},
"carrier": {
"type": "string",
"x-order": 3
},
"route": {
"type": "string",
"x-order": 4
},
"shippingInstructions": {
"type": "string",
"x-order": 5
},
"buyerAcctNumber": {
"type": "string",
"x-order": 6
},
"incoTerms": {
"type": "string",
"enum": [
"cfr",
"cif",
"cip",
"cpt",
"daf",
"dap",
"ddp",
"ddu",
"dpu",
"deq",
"des",
"exw",
"fas",
"fca",
"fob"
],
"x-order": 7
}
},
"additionalProperties": false,
"x-order": 18
},
"shipmentDetails": {
"type": "object",
"description": "Actual dispatch and tracking information for the invoiced goods",
"properties": {
"carrier": {
"type": "string",
"x-order": 1
},
"trackingNumber": {
"type": "string",
"x-order": 2
},
"shippingDate": {
"type": "string",
"format": "date-time",
"x-order": 3
}
},
"additionalProperties": false,
"x-order": 19
},
"paymentTerms": {
"type": "object",
"description": "Payment terms and conditions",
"properties": {
"description": {
"type": "string",
"description": "Human-readable payment terms (e.g., 'Net 30', '2/10 Net 30')",
"x-order": 1
},
"netDays": {
"type": "integer",
"description": "Number of days until payment is due",
"x-order": 2
},
"discountTerms": {
"type": "array",
"description": "Early payment discount tiers",
"items": {
"type": "object",
"properties": {
"discountPercent": {
"type": "number",
"multipleOf": 0.01,
"description": "Discount percentage (e.g., 2 for 2%)",
"x-order": 1
},
"discountDays": {
"type": "integer",
"description": "Days within which discount applies",
"x-order": 2
},
"discountDueDate": {
"type": "string",
"format": "date",
"description": "Specific date by which discount applies",
"x-order": 3
}
},
"additionalProperties": false
},
"x-order": 3
}
},
"additionalProperties": false,
"x-order": 20
},
"contacts": {
"type": "array",
"description": "Contact information for various roles",
"items": {
"type": "object",
"required": [
"role"
],
"properties": {
"role": {
"type": "string",
"enum": [
"issuerOfInvoice",
"soldTo",
"billTo",
"remitTo",
"shipFrom",
"shipTo"
],
"x-order": 1
},
"name": {
"type": "string",
"x-order": 2
},
"email": {
"type": "string",
"anyOf": [
{
"format": "email"
},
{
"const": ""
}
],
"x-order": 3
},
"phone": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false
},
"x-order": 21
},
"comments": {
"type": "string",
"maxLength": 2000,
"description": "Invoice-level comments or notes",
"x-order": 22
},
"lineItems": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": [
"invoiceLineNumber",
"quantity",
"unitPrice",
"subtotal",
"currency"
],
"properties": {
"invoiceLineNumber": {
"type": "integer",
"description": "Supplier's line number for this invoice line.",
"x-order": 1
},
"uniqueLineKey": {
"type": "string",
"description": "DataShift-managed stable line key from the original purchase order.",
"x-datashift-managed": true,
"x-datashift-system": true,
"x-order": 2
},
"poLineReference": {
"type": "integer",
"description": "Line number from the purchase order being invoiced.",
"x-order": 3
},
"asnLineReference": {
"type": "integer",
"description": "Line number from the ship notice",
"x-order": 4
},
"supplierItemId": {
"type": "string",
"description": "Supplier's part/item number",
"x-order": 5
},
"buyerItemId": {
"type": "string",
"description": "Buyer's part/item number",
"x-order": 6
},
"description": {
"type": "string",
"description": "Item description",
"x-order": 7
},
"quantity": {
"type": "number",
"multipleOf": 0.01,
"description": "Quantity invoiced.",
"x-order": 8
},
"unitOfMeasure": {
"title": "REC20 Unit of Measure Codes",
"description": "UN/ECE Recommendation 20 unit of measure codes for DataShift canonical documents",
"type": "string",
"enum": [
"AY",
"BG",
"BL",
"BR",
"BLL",
"E2",
"BO",
"BX",
"BJ",
"BE",
"KA",
"CA",
"CG",
"CT",
"CQ",
"CS",
"CMT",
"CL",
"CH",
"MTQ",
"CY",
"DAY",
"DC",
"DZN",
"DR",
"EA",
"FOT",
"GRM",
"HUR",
"CEN",
"INH",
"JR",
"KGM",
"KMT",
"KT",
"LN",
"LK",
"LTR",
"MTR",
"TNE",
"MLT",
"MMT",
"MON",
"PK",
"PD",
"PL",
"PR",
"D97",
"C62",
"PG",
"LBR",
"RL",
"RO",
"SA",
"SE",
"SET",
"ST",
"SO",
"MTK",
"U3",
"MIL",
"TU",
"WEE"
],
"x-order": 9
},
"unitPrice": {
"description": "Integer unit price at ISO 4217 minor-unit scale + 2 (e.g. AUD, exponent 2 -> 1/10000: 5.2185 -> 52185). Carries sub-minor precision; not rounded to minor units.",
"type": "integer",
"x-datashift-money": "rate",
"x-order": 10
},
"subtotal": {
"description": "Line subtotal before tax and adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 11
},
"taxAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 12
},
"taxRate": {
"type": "number",
"multipleOf": 0.01,
"description": "Tax rate as percentage (e.g., 10 for 10%)",
"x-order": 13
},
"discountAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 14
},
"shippingAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 15
},
"grossAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 16
},
"netAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 17
},
"currency": {
"title": "Currency Enumeration",
"description": "ISO 4217 currency code for this line.",
"type": "string",
"enum": [
"AUD"
],
"x-order": 18
},
"manufacturerPartId": {
"type": "string",
"description": "Manufacturer's part number",
"x-order": 19
},
"manufacturerName": {
"type": "string",
"description": "Manufacturer name",
"x-order": 20
},
"countryOfOrigin": {
"type": "string",
"enum": [
"AU"
],
"description": "Country where item was manufactured",
"x-order": 21
},
"serialNumbers": {
"type": "array",
"items": {
"type": "string"
},
"description": "Serial numbers for serialized items",
"x-order": 22
},
"batchId": {
"type": "string",
"description": "Lot/batch ID",
"x-order": 23
},
"classification": {
"type": "array",
"description": "Product classification codes",
"items": {
"type": "object",
"properties": {
"domain": {
"type": "string",
"enum": [
"UNSPSC",
"HS",
"commodity"
],
"description": "Classification scheme",
"x-order": 1
},
"code": {
"type": "string",
"x-order": 2
}
},
"additionalProperties": false
},
"x-order": 24
},
"comments": {
"type": "string",
"maxLength": 500,
"description": "Line-level comments",
"x-order": 25
}
},
"additionalProperties": false
},
"description": "Invoice lines. DataShift manages uniqueLineKey correlation back to PO and ASN lines where needed.",
"x-order": 23
},
"invoiceSummary": {
"type": "object",
"required": [
"taxAmount",
"dueAmount",
"currency"
],
"description": "Invoice totals, tax, discounts, and amount due.",
"properties": {
"shippingAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 1
},
"specialHandlingAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 2
},
"taxAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 3
},
"taxBreakdown": {
"type": "array",
"description": "Tax breakdown by type/jurisdiction",
"items": {
"type": "object",
"properties": {
"taxType": {
"type": "string",
"enum": [
"GST",
"VAT",
"salesTax",
"excise",
"other"
],
"description": "Type of tax",
"x-order": 1
},
"taxRate": {
"type": "number",
"multipleOf": 0.01,
"description": "Tax rate as percentage",
"x-order": 2
},
"taxableAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 3
},
"taxAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 4
},
"jurisdiction": {
"type": "string",
"description": "Tax jurisdiction (e.g., state, country)",
"x-order": 5
},
"description": {
"type": "string",
"x-order": 6
}
},
"additionalProperties": false
},
"x-order": 4
},
"discountAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 5
},
"grossAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 6
},
"netAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 7
},
"depositAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 8
},
"dueAmount": {
"description": "Integer amount in ISO 4217 minor units (e.g. AUD in cents, exponent 2: 561.02 -> 56102). Negative for credits or adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 9
},
"currency": {
"title": "Currency Enumeration",
"description": "ISO 4217 currency codes supported by DataShift canonical schemas",
"type": "string",
"enum": [
"AUD"
],
"x-order": 10
}
},
"additionalProperties": false,
"x-order": 24
},
"extrinsics": {
"type": "object",
"description": "Partner-specific extension fields that are not part of the canonical core contract.",
"additionalProperties": {
"x-additionalPropertiesName": "extensionField",
"description": "Partner-specific extension value."
},
"x-order": 25
}
},
"additionalProperties": false,
"description": "Business payload for the invoice.",
"x-order": 5
}
},
"additionalProperties": false,
"examples": [
{
"docType": "INV",
"correlationId": "43e7580b-e592-46bb-a3d0-dbf8997758d9",
"timestamp": "2026-05-16T04:00:00Z",
"metadata": {
"sourceLanguage": "cxml",
"sourceVersion": "1.0.10",
"payloadId": "inv-example-10001",
"userAgent": "DataShift Edge v1"
},
"data": {
"invoiceNumber": "INV-10001",
"poNumber": "PO-10001",
"invoiceDate": "2026-05-16T04:00:00Z",
"dueDate": "2026-06-15T00:00:00Z",
"purpose": "standard",
"poReferences": [
{
"poNumber": "PO-10001",
"poVersion": "1"
}
],
"supplier": {
"id": "SUPPLIER-AU",
"name": "Example Supplier Pty Ltd",
"taxRegistrations": {
"type": "ABN",
"value": "98765432109"
},
"address": {
"addressee": "Example Supplier Pty Ltd",
"street1": "20 Supplier Street",
"city": "Adelaide",
"state": "SA",
"postalCode": "5000",
"country": "AU"
}
},
"billTo": {
"addressee": "Example Buyer Accounts",
"street1": "1 Market Street",
"city": "Sydney",
"state": "NSW",
"postalCode": "2000",
"country": "AU"
},
"lineItems": [
{
"invoiceLineNumber": 1,
"uniqueLineKey": "PO-10001-1",
"poLineReference": 1,
"supplierItemId": "SUP-001",
"buyerItemId": "BUY-001",
"description": "Example product",
"quantity": 12,
"unitOfMeasure": "EA",
"unitPrice": 250000,
"subtotal": 30000,
"taxAmount": 3000,
"currency": "AUD"
}
],
"invoiceSummary": {
"taxAmount": 3000,
"grossAmount": 33000,
"netAmount": 33000,
"dueAmount": 33000,
"currency": "AUD"
},
"extrinsics": {
"accountsReference": "AP-10001"
}
}
}
]
}1.0.9/edi/contracts/releases/1.0.9/schemas/invoice.schema.json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://docs.datashift.com.au/edi/contracts/releases/1.0.9/schemas/invoice.schema.json",
"title": "Invoice (INV) Canonical Schema",
"description": "Public canonical Invoice contract used to request payment for goods or services supplied against purchase orders and shipments.",
"version": "1.0.9",
"type": "object",
"required": [
"docType",
"correlationId",
"timestamp",
"metadata",
"data"
],
"properties": {
"docType": {
"const": "INV",
"x-datashift-managed": true,
"x-datashift-system": true,
"description": "Canonical document type. For invoices this value is INV.",
"x-order": 1
},
"correlationId": {
"type": "string",
"format": "uuid",
"x-datashift-managed": true,
"x-datashift-system": true,
"description": "Stable UUID used to trace this invoice through order, shipment, and payment workflows.",
"x-order": 2
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "UTC timestamp indicating when DataShift created the canonical invoice.",
"x-datashift-managed": true,
"x-datashift-system": true,
"x-order": 3
},
"metadata": {
"type": "object",
"description": "Public source metadata retained for integration troubleshooting.",
"required": [
"sourceLanguage",
"sourceVersion",
"userAgent"
],
"properties": {
"sourceLanguage": {
"type": "string",
"enum": [
"json",
"cxml"
],
"x-order": 1
},
"sourceVersion": {
"const": "1.0.9",
"description": "Canonical schema version used to create this document",
"x-order": 2
},
"payloadId": {
"type": "string",
"description": "Original cXML payload ID",
"x-order": 3
},
"userAgent": {
"const": "DataShift Edge v1",
"description": "DataShift Edge version that generated the canonical document",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 4
},
"data": {
"type": "object",
"required": [
"invoiceNumber",
"poNumber",
"invoiceDate",
"purpose",
"supplier",
"billTo",
"lineItems",
"invoiceSummary"
],
"properties": {
"invoiceNumber": {
"type": "string",
"description": "Supplier-generated invoice number.",
"x-order": 1
},
"poNumber": {
"type": "string",
"description": "Primary purchase order number this invoice bills against.",
"x-order": 2
},
"invoiceDate": {
"type": "string",
"format": "date-time",
"description": "Date and time the supplier issued the invoice.",
"x-order": 3
},
"dueDate": {
"type": "string",
"format": "date-time",
"description": "Payment due date.",
"x-order": 4
},
"purpose": {
"type": "string",
"enum": [
"standard",
"creditMemo",
"debitMemo",
"lineLevelCreditMemo",
"lineLevelDebitMemo"
],
"default": "standard",
"description": "Invoice business purpose.",
"x-enum-descriptions": {
"standard": "Standard invoice requesting payment.",
"creditMemo": "Document reducing a previously invoiced amount.",
"debitMemo": "Document increasing a previously invoiced amount.",
"lineLevelCreditMemo": "Line-level credit against a previous invoice.",
"lineLevelDebitMemo": "Line-level debit against a previous invoice."
},
"x-order": 5
},
"operation": {
"type": "string",
"enum": [
"new",
"update",
"delete"
],
"default": "new",
"description": "Whether this creates, updates, or deletes an invoice",
"x-order": 6
},
"invoiceOrigin": {
"type": "string",
"enum": [
"supplier",
"buyer"
],
"description": "Whether invoice was originated by supplier or buyer (ERS)",
"x-order": 7
},
"isInformationOnly": {
"type": "boolean",
"default": false,
"description": "If true, invoice is for information only and no action required",
"x-order": 8
},
"isERS": {
"type": "boolean",
"default": false,
"description": "Evaluated Receipt Settlement invoice",
"x-order": 9
},
"documentReference": {
"type": "object",
"description": "Reference to previous invoice (for credit/debit memos or cancellations)",
"properties": {
"invoiceId": {
"type": "string",
"x-order": 1
},
"invoiceDate": {
"type": "string",
"format": "date-time",
"x-order": 2
},
"documentId": {
"type": "string",
"x-order": 3
},
"payloadId": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 10
},
"poReferences": {
"type": "array",
"description": "Purchase orders being invoiced.",
"items": {
"type": "object",
"required": [
"poNumber"
],
"properties": {
"poNumber": {
"type": "string",
"x-order": 1
},
"poVersion": {
"type": "string",
"x-order": 2
},
"documentId": {
"type": "string",
"x-order": 3
},
"payloadId": {
"type": "string",
"x-order": 4
},
"orderDate": {
"type": "string",
"format": "date-time",
"x-order": 5
}
},
"additionalProperties": false
},
"x-order": 11
},
"asnReference": {
"type": "object",
"description": "Shipment notice reference when invoicing against a dispatched shipment.",
"properties": {
"shipmentId": {
"type": "string",
"x-order": 1
},
"shipmentDate": {
"type": "string",
"format": "date-time",
"x-order": 2
},
"documentId": {
"type": "string",
"x-order": 3
},
"payloadId": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 12
},
"supplier": {
"title": "Party Definition",
"description": "Supplier or seller issuing the invoice.",
"type": "object",
"properties": {
"id": {
"type": "string",
"x-order": 1
},
"name": {
"type": "string",
"x-order": 2
},
"taxRegistrations": {
"type": "object",
"description": "Australian tax registrations for the party",
"required": [
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"ABN"
],
"x-order": 1
},
"value": {
"type": "string",
"x-order": 2
}
},
"additionalProperties": false,
"x-order": 3
},
"contact": {
"type": "object",
"properties": {
"name": {
"type": "string",
"x-order": 1
},
"phone": {
"type": "string",
"x-order": 2
},
"email": {
"type": "string",
"anyOf": [
{
"format": "email"
},
{
"const": ""
}
],
"x-order": 3
},
"role": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 4
},
"address": {
"title": "Address Definition",
"description": "Standard address structure for DataShift canonical documents",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false,
"x-order": 5
}
},
"required": [
"id",
"name"
],
"additionalProperties": false,
"x-order": 13
},
"billTo": {
"title": "Address Definition",
"description": "Buyer billing party.",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false,
"x-order": 14
},
"soldTo": {
"allOf": [
{
"title": "Address Definition",
"description": "Standard address structure for DataShift canonical documents",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false
}
],
"description": "Sold-to party (may differ from bill-to)",
"x-order": 15
},
"shipTo": {
"title": "Address Definition",
"description": "Standard address structure for DataShift canonical documents",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false,
"x-order": 16
},
"remitTo": {
"type": "object",
"description": "Address where payment should be sent",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
},
"bankDetails": {
"type": "object",
"properties": {
"bankName": {
"type": "string",
"x-order": 1
},
"accountName": {
"type": "string",
"x-order": 2
},
"accountNumber": {
"type": "string",
"x-order": 3
},
"bsb": {
"type": "string",
"x-order": 4
},
"swift": {
"type": "string",
"x-order": 5
},
"iban": {
"type": "string",
"x-order": 6
}
},
"additionalProperties": false,
"x-order": 9
}
},
"additionalProperties": false,
"x-order": 17
},
"shipping": {
"type": "object",
"description": "Commercial freight charges and instructions for the invoice.",
"properties": {
"amount": {
"description": "Settled monetary amount as an integer in ISO 4217 minor units. The minor-unit exponent is resolved from the in-scope `currency` via the DataShift currency registry (e.g. AUD has exponent 2 -> cents: 561.02 is encoded 56102; JPY exponent 0; KWD exponent 3). Negative values represent adjustments or credits. Never a fractional/decimal value.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 1
},
"currency": {
"title": "Currency Enumeration",
"description": "ISO 4217 currency codes supported by DataShift canonical schemas",
"type": "string",
"enum": [
"AUD"
],
"x-order": 2
},
"carrier": {
"type": "string",
"x-order": 3
},
"route": {
"type": "string",
"x-order": 4
},
"shippingInstructions": {
"type": "string",
"x-order": 5
},
"buyerAcctNumber": {
"type": "string",
"x-order": 6
},
"incoTerms": {
"type": "string",
"enum": [
"cfr",
"cif",
"cip",
"cpt",
"daf",
"dap",
"ddp",
"ddu",
"dpu",
"deq",
"des",
"exw",
"fas",
"fca",
"fob"
],
"x-order": 7
}
},
"additionalProperties": false,
"x-order": 18
},
"shipmentDetails": {
"type": "object",
"description": "Actual dispatch and tracking information for the invoiced goods",
"properties": {
"carrier": {
"type": "string",
"x-order": 1
},
"trackingNumber": {
"type": "string",
"x-order": 2
},
"shippingDate": {
"type": "string",
"format": "date-time",
"x-order": 3
}
},
"additionalProperties": false,
"x-order": 19
},
"paymentTerms": {
"type": "object",
"description": "Payment terms and conditions",
"properties": {
"description": {
"type": "string",
"description": "Human-readable payment terms (e.g., 'Net 30', '2/10 Net 30')",
"x-order": 1
},
"netDays": {
"type": "integer",
"description": "Number of days until payment is due",
"x-order": 2
},
"discountTerms": {
"type": "array",
"description": "Early payment discount tiers",
"items": {
"type": "object",
"properties": {
"discountPercent": {
"type": "number",
"multipleOf": 0.01,
"description": "Discount percentage (e.g., 2 for 2%)",
"x-order": 1
},
"discountDays": {
"type": "integer",
"description": "Days within which discount applies",
"x-order": 2
},
"discountDueDate": {
"type": "string",
"format": "date",
"description": "Specific date by which discount applies",
"x-order": 3
}
},
"additionalProperties": false
},
"x-order": 3
}
},
"additionalProperties": false,
"x-order": 20
},
"contacts": {
"type": "array",
"description": "Contact information for various roles",
"items": {
"type": "object",
"required": [
"role"
],
"properties": {
"role": {
"type": "string",
"enum": [
"issuerOfInvoice",
"soldTo",
"billTo",
"remitTo",
"shipFrom",
"shipTo"
],
"x-order": 1
},
"name": {
"type": "string",
"x-order": 2
},
"email": {
"type": "string",
"anyOf": [
{
"format": "email"
},
{
"const": ""
}
],
"x-order": 3
},
"phone": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false
},
"x-order": 21
},
"comments": {
"type": "string",
"maxLength": 2000,
"description": "Invoice-level comments or notes",
"x-order": 22
},
"lineItems": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": [
"invoiceLineNumber",
"quantity",
"unitPrice",
"subtotal",
"currency"
],
"properties": {
"invoiceLineNumber": {
"type": "integer",
"description": "Supplier's line number for this invoice line.",
"x-order": 1
},
"uniqueLineKey": {
"type": "string",
"description": "DataShift-managed stable line key from the original purchase order.",
"x-datashift-managed": true,
"x-datashift-system": true,
"x-order": 2
},
"poLineReference": {
"type": "integer",
"description": "Line number from the purchase order being invoiced.",
"x-order": 3
},
"asnLineReference": {
"type": "integer",
"description": "Line number from the ship notice",
"x-order": 4
},
"supplierItemId": {
"type": "string",
"description": "Supplier's part/item number",
"x-order": 5
},
"buyerItemId": {
"type": "string",
"description": "Buyer's part/item number",
"x-order": 6
},
"description": {
"type": "string",
"description": "Item description",
"x-order": 7
},
"quantity": {
"type": "number",
"multipleOf": 0.01,
"description": "Quantity invoiced.",
"x-order": 8
},
"unitOfMeasure": {
"title": "REC20 Unit of Measure Codes",
"description": "UN/ECE Recommendation 20 unit of measure codes for DataShift canonical documents",
"type": "string",
"enum": [
"AY",
"BG",
"BL",
"BR",
"BLL",
"E2",
"BO",
"BX",
"BJ",
"BE",
"KA",
"CA",
"CG",
"CT",
"CQ",
"CS",
"CMT",
"CL",
"CH",
"MTQ",
"CY",
"DAY",
"DC",
"DZN",
"DR",
"EA",
"FOT",
"GRM",
"HUR",
"CEN",
"INH",
"JR",
"KGM",
"KMT",
"KT",
"LN",
"LK",
"LTR",
"MTR",
"TNE",
"MLT",
"MMT",
"MON",
"PK",
"PD",
"PL",
"PR",
"D97",
"C62",
"PG",
"LBR",
"RL",
"RO",
"SA",
"SE",
"SET",
"ST",
"SO",
"MTK",
"U3",
"MIL",
"TU",
"WEE"
],
"x-order": 9
},
"unitPrice": {
"description": "Unit price",
"type": "integer",
"x-datashift-money": "rate",
"x-order": 10
},
"subtotal": {
"description": "Line subtotal before tax and adjustments.",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 11
},
"taxAmount": {
"description": "Tax amount for this line",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 12
},
"taxRate": {
"type": "number",
"multipleOf": 0.01,
"description": "Tax rate as percentage (e.g., 10 for 10%)",
"x-order": 13
},
"discountAmount": {
"description": "Discount amount for this line",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 14
},
"shippingAmount": {
"description": "Shipping charge for this line",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 15
},
"grossAmount": {
"description": "Subtotal + tax + shipping before discounts",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 16
},
"netAmount": {
"description": "Gross amount minus discounts",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 17
},
"currency": {
"title": "Currency Enumeration",
"description": "ISO 4217 currency code for this line.",
"type": "string",
"enum": [
"AUD"
],
"x-order": 18
},
"manufacturerPartId": {
"type": "string",
"description": "Manufacturer's part number",
"x-order": 19
},
"manufacturerName": {
"type": "string",
"description": "Manufacturer name",
"x-order": 20
},
"countryOfOrigin": {
"type": "string",
"enum": [
"AU"
],
"description": "Country where item was manufactured",
"x-order": 21
},
"serialNumbers": {
"type": "array",
"items": {
"type": "string"
},
"description": "Serial numbers for serialized items",
"x-order": 22
},
"batchId": {
"type": "string",
"description": "Lot/batch ID",
"x-order": 23
},
"classification": {
"type": "array",
"description": "Product classification codes",
"items": {
"type": "object",
"properties": {
"domain": {
"type": "string",
"enum": [
"UNSPSC",
"HS",
"commodity"
],
"description": "Classification scheme",
"x-order": 1
},
"code": {
"type": "string",
"x-order": 2
}
},
"additionalProperties": false
},
"x-order": 24
},
"comments": {
"type": "string",
"maxLength": 500,
"description": "Line-level comments",
"x-order": 25
}
},
"additionalProperties": false
},
"description": "Invoice lines. DataShift manages uniqueLineKey correlation back to PO and ASN lines where needed.",
"x-order": 23
},
"invoiceSummary": {
"type": "object",
"required": [
"taxAmount",
"dueAmount",
"currency"
],
"description": "Invoice totals, tax, discounts, and amount due.",
"properties": {
"shippingAmount": {
"description": "Total shipping charges",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 1
},
"specialHandlingAmount": {
"description": "Special handling charges",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 2
},
"taxAmount": {
"description": "Total tax amount",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 3
},
"taxBreakdown": {
"type": "array",
"description": "Tax breakdown by type/jurisdiction",
"items": {
"type": "object",
"properties": {
"taxType": {
"type": "string",
"enum": [
"GST",
"VAT",
"salesTax",
"excise",
"other"
],
"description": "Type of tax",
"x-order": 1
},
"taxRate": {
"type": "number",
"multipleOf": 0.01,
"description": "Tax rate as percentage",
"x-order": 2
},
"taxableAmount": {
"description": "Amount subject to this tax",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 3
},
"taxAmount": {
"description": "Calculated tax amount",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 4
},
"jurisdiction": {
"type": "string",
"description": "Tax jurisdiction (e.g., state, country)",
"x-order": 5
},
"description": {
"type": "string",
"x-order": 6
}
},
"additionalProperties": false
},
"x-order": 4
},
"discountAmount": {
"description": "Total discount amount",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 5
},
"grossAmount": {
"description": "Subtotal + tax + shipping + handling before discounts",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 6
},
"netAmount": {
"description": "Gross amount minus discounts",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 7
},
"depositAmount": {
"description": "Prepayment/deposit already received",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 8
},
"dueAmount": {
"description": "Amount due (net - deposits)",
"type": "integer",
"x-datashift-money": "minor",
"x-order": 9
},
"currency": {
"title": "Currency Enumeration",
"description": "ISO 4217 currency codes supported by DataShift canonical schemas",
"type": "string",
"enum": [
"AUD"
],
"x-order": 10
}
},
"additionalProperties": false,
"x-order": 24
},
"extrinsics": {
"type": "object",
"description": "Partner-specific extension fields that are not part of the canonical core contract.",
"additionalProperties": {
"x-additionalPropertiesName": "extensionField",
"description": "Partner-specific extension value."
},
"x-order": 25
}
},
"additionalProperties": false,
"description": "Business payload for the invoice.",
"x-order": 5
}
},
"additionalProperties": false,
"examples": [
{
"docType": "INV",
"correlationId": "43e7580b-e592-46bb-a3d0-dbf8997758d9",
"timestamp": "2026-05-16T04:00:00Z",
"metadata": {
"sourceLanguage": "cxml",
"sourceVersion": "1.0.9",
"payloadId": "inv-example-10001",
"userAgent": "DataShift Edge v1"
},
"data": {
"invoiceNumber": "INV-10001",
"poNumber": "PO-10001",
"invoiceDate": "2026-05-16T04:00:00Z",
"dueDate": "2026-06-15T00:00:00Z",
"purpose": "standard",
"poReferences": [
{
"poNumber": "PO-10001",
"poVersion": "1"
}
],
"supplier": {
"id": "SUPPLIER-AU",
"name": "Example Supplier Pty Ltd",
"taxRegistrations": {
"type": "ABN",
"value": "98765432109"
},
"address": {
"addressee": "Example Supplier Pty Ltd",
"street1": "20 Supplier Street",
"city": "Adelaide",
"state": "SA",
"postalCode": "5000",
"country": "AU"
}
},
"billTo": {
"addressee": "Example Buyer Accounts",
"street1": "1 Market Street",
"city": "Sydney",
"state": "NSW",
"postalCode": "2000",
"country": "AU"
},
"lineItems": [
{
"invoiceLineNumber": 1,
"uniqueLineKey": "PO-10001-1",
"poLineReference": 1,
"supplierItemId": "SUP-001",
"buyerItemId": "BUY-001",
"description": "Example product",
"quantity": 12,
"unitOfMeasure": "EA",
"unitPrice": 250000,
"subtotal": 30000,
"taxAmount": 3000,
"currency": "AUD"
}
],
"invoiceSummary": {
"taxAmount": 3000,
"grossAmount": 33000,
"netAmount": 33000,
"dueAmount": 33000,
"currency": "AUD"
},
"extrinsics": {
"accountsReference": "AP-10001"
}
}
}
]
}1.0.8/edi/contracts/releases/1.0.8/schemas/invoice.schema.json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://docs.datashift.com.au/edi/contracts/releases/1.0.8/schemas/invoice.schema.json",
"title": "Invoice (INV) Canonical Schema",
"description": "Public canonical Invoice contract used to request payment for goods or services supplied against purchase orders and shipments.",
"version": "1.0.8",
"type": "object",
"required": [
"docType",
"correlationId",
"timestamp",
"metadata",
"data"
],
"properties": {
"docType": {
"const": "INV",
"x-datashift-managed": true,
"x-datashift-system": true,
"description": "Canonical document type. For invoices this value is INV.",
"x-order": 1
},
"correlationId": {
"type": "string",
"format": "uuid",
"x-datashift-managed": true,
"x-datashift-system": true,
"description": "Stable UUID used to trace this invoice through order, shipment, and payment workflows.",
"x-order": 2
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "UTC timestamp indicating when DataShift created the canonical invoice.",
"x-datashift-managed": true,
"x-datashift-system": true,
"x-order": 3
},
"metadata": {
"type": "object",
"description": "Public source metadata retained for integration troubleshooting.",
"required": [
"sourceLanguage",
"sourceVersion",
"userAgent"
],
"properties": {
"sourceLanguage": {
"type": "string",
"enum": [
"json",
"cxml"
],
"x-order": 1
},
"sourceVersion": {
"const": "1.0.8",
"description": "Canonical schema version used to create this document",
"x-order": 2
},
"payloadId": {
"type": "string",
"description": "Original cXML payload ID",
"x-order": 3
},
"userAgent": {
"const": "DataShift Edge v1",
"description": "DataShift Edge version that generated the canonical document",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 4
},
"data": {
"type": "object",
"required": [
"invoiceNumber",
"poNumber",
"invoiceDate",
"purpose",
"supplier",
"billTo",
"lineItems",
"invoiceSummary"
],
"properties": {
"invoiceNumber": {
"type": "string",
"description": "Supplier-generated invoice number.",
"x-order": 1
},
"poNumber": {
"type": "string",
"description": "Primary purchase order number this invoice bills against.",
"x-order": 2
},
"invoiceDate": {
"type": "string",
"format": "date-time",
"description": "Date and time the supplier issued the invoice.",
"x-order": 3
},
"dueDate": {
"type": "string",
"format": "date-time",
"description": "Payment due date.",
"x-order": 4
},
"purpose": {
"type": "string",
"enum": [
"standard",
"creditMemo",
"debitMemo",
"lineLevelCreditMemo",
"lineLevelDebitMemo"
],
"default": "standard",
"description": "Invoice business purpose.",
"x-enum-descriptions": {
"standard": "Standard invoice requesting payment.",
"creditMemo": "Document reducing a previously invoiced amount.",
"debitMemo": "Document increasing a previously invoiced amount.",
"lineLevelCreditMemo": "Line-level credit against a previous invoice.",
"lineLevelDebitMemo": "Line-level debit against a previous invoice."
},
"x-order": 5
},
"operation": {
"type": "string",
"enum": [
"new",
"update",
"delete"
],
"default": "new",
"description": "Whether this creates, updates, or deletes an invoice",
"x-order": 6
},
"invoiceOrigin": {
"type": "string",
"enum": [
"supplier",
"buyer"
],
"description": "Whether invoice was originated by supplier or buyer (ERS)",
"x-order": 7
},
"isInformationOnly": {
"type": "boolean",
"default": false,
"description": "If true, invoice is for information only and no action required",
"x-order": 8
},
"isERS": {
"type": "boolean",
"default": false,
"description": "Evaluated Receipt Settlement invoice",
"x-order": 9
},
"documentReference": {
"type": "object",
"description": "Reference to previous invoice (for credit/debit memos or cancellations)",
"properties": {
"invoiceId": {
"type": "string",
"x-order": 1
},
"invoiceDate": {
"type": "string",
"format": "date-time",
"x-order": 2
},
"documentId": {
"type": "string",
"x-order": 3
},
"payloadId": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 10
},
"poReferences": {
"type": "array",
"description": "Purchase orders being invoiced.",
"items": {
"type": "object",
"required": [
"poNumber"
],
"properties": {
"poNumber": {
"type": "string",
"x-order": 1
},
"poVersion": {
"type": "string",
"x-order": 2
},
"documentId": {
"type": "string",
"x-order": 3
},
"payloadId": {
"type": "string",
"x-order": 4
},
"orderDate": {
"type": "string",
"format": "date-time",
"x-order": 5
}
},
"additionalProperties": false
},
"x-order": 11
},
"asnReference": {
"type": "object",
"description": "Shipment notice reference when invoicing against a dispatched shipment.",
"properties": {
"shipmentId": {
"type": "string",
"x-order": 1
},
"shipmentDate": {
"type": "string",
"format": "date-time",
"x-order": 2
},
"documentId": {
"type": "string",
"x-order": 3
},
"payloadId": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 12
},
"supplier": {
"title": "Party Definition",
"description": "Supplier or seller issuing the invoice.",
"type": "object",
"properties": {
"id": {
"type": "string",
"x-order": 1
},
"name": {
"type": "string",
"x-order": 2
},
"taxRegistrations": {
"type": "object",
"description": "Australian tax registrations for the party",
"required": [
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"ABN"
],
"x-order": 1
},
"value": {
"type": "string",
"x-order": 2
}
},
"additionalProperties": false,
"x-order": 3
},
"contact": {
"type": "object",
"properties": {
"name": {
"type": "string",
"x-order": 1
},
"phone": {
"type": "string",
"x-order": 2
},
"email": {
"type": "string",
"anyOf": [
{
"format": "email"
},
{
"const": ""
}
],
"x-order": 3
},
"role": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 4
},
"address": {
"title": "Address Definition",
"description": "Standard address structure for DataShift canonical documents",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false,
"x-order": 5
}
},
"required": [
"id",
"name"
],
"additionalProperties": false,
"x-order": 13
},
"billTo": {
"title": "Address Definition",
"description": "Buyer billing party.",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false,
"x-order": 14
},
"soldTo": {
"allOf": [
{
"title": "Address Definition",
"description": "Standard address structure for DataShift canonical documents",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false
}
],
"description": "Sold-to party (may differ from bill-to)",
"x-order": 15
},
"shipTo": {
"title": "Address Definition",
"description": "Standard address structure for DataShift canonical documents",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false,
"x-order": 16
},
"remitTo": {
"type": "object",
"description": "Address where payment should be sent",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
},
"bankDetails": {
"type": "object",
"properties": {
"bankName": {
"type": "string",
"x-order": 1
},
"accountName": {
"type": "string",
"x-order": 2
},
"accountNumber": {
"type": "string",
"x-order": 3
},
"bsb": {
"type": "string",
"x-order": 4
},
"swift": {
"type": "string",
"x-order": 5
},
"iban": {
"type": "string",
"x-order": 6
}
},
"additionalProperties": false,
"x-order": 9
}
},
"additionalProperties": false,
"x-order": 17
},
"shipping": {
"type": "object",
"description": "Commercial freight charges and instructions for the invoice.",
"properties": {
"amount": {
"type": "number",
"multipleOf": 0.01,
"x-order": 1
},
"currency": {
"title": "Currency Enumeration",
"description": "ISO 4217 currency codes supported by DataShift canonical schemas",
"type": "string",
"enum": [
"AUD"
],
"x-order": 2
},
"carrier": {
"type": "string",
"x-order": 3
},
"route": {
"type": "string",
"x-order": 4
},
"shippingInstructions": {
"type": "string",
"x-order": 5
},
"buyerAcctNumber": {
"type": "string",
"x-order": 6
},
"incoTerms": {
"type": "string",
"enum": [
"cfr",
"cif",
"cip",
"cpt",
"daf",
"dap",
"ddp",
"ddu",
"dpu",
"deq",
"des",
"exw",
"fas",
"fca",
"fob"
],
"x-order": 7
}
},
"additionalProperties": false,
"x-order": 18
},
"shipmentDetails": {
"type": "object",
"description": "Actual dispatch and tracking information for the invoiced goods",
"properties": {
"carrier": {
"type": "string",
"x-order": 1
},
"trackingNumber": {
"type": "string",
"x-order": 2
},
"shippingDate": {
"type": "string",
"format": "date-time",
"x-order": 3
}
},
"additionalProperties": false,
"x-order": 19
},
"paymentTerms": {
"type": "object",
"description": "Payment terms and conditions",
"properties": {
"description": {
"type": "string",
"description": "Human-readable payment terms (e.g., 'Net 30', '2/10 Net 30')",
"x-order": 1
},
"netDays": {
"type": "integer",
"description": "Number of days until payment is due",
"x-order": 2
},
"discountTerms": {
"type": "array",
"description": "Early payment discount tiers",
"items": {
"type": "object",
"properties": {
"discountPercent": {
"type": "number",
"multipleOf": 0.01,
"description": "Discount percentage (e.g., 2 for 2%)",
"x-order": 1
},
"discountDays": {
"type": "integer",
"description": "Days within which discount applies",
"x-order": 2
},
"discountDueDate": {
"type": "string",
"format": "date",
"description": "Specific date by which discount applies",
"x-order": 3
}
},
"additionalProperties": false
},
"x-order": 3
}
},
"additionalProperties": false,
"x-order": 20
},
"contacts": {
"type": "array",
"description": "Contact information for various roles",
"items": {
"type": "object",
"required": [
"role"
],
"properties": {
"role": {
"type": "string",
"enum": [
"issuerOfInvoice",
"soldTo",
"billTo",
"remitTo",
"shipFrom",
"shipTo"
],
"x-order": 1
},
"name": {
"type": "string",
"x-order": 2
},
"email": {
"type": "string",
"anyOf": [
{
"format": "email"
},
{
"const": ""
}
],
"x-order": 3
},
"phone": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false
},
"x-order": 21
},
"comments": {
"type": "string",
"maxLength": 2000,
"description": "Invoice-level comments or notes",
"x-order": 22
},
"lineItems": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": [
"invoiceLineNumber",
"quantity",
"unitPrice",
"subtotal",
"currency"
],
"properties": {
"invoiceLineNumber": {
"type": "integer",
"description": "Supplier's line number for this invoice line.",
"x-order": 1
},
"uniqueLineKey": {
"type": "string",
"description": "DataShift-managed stable line key from the original purchase order.",
"x-datashift-managed": true,
"x-datashift-system": true,
"x-order": 2
},
"poLineReference": {
"type": "integer",
"description": "Line number from the purchase order being invoiced.",
"x-order": 3
},
"asnLineReference": {
"type": "integer",
"description": "Line number from the ship notice",
"x-order": 4
},
"supplierItemId": {
"type": "string",
"description": "Supplier's part/item number",
"x-order": 5
},
"buyerItemId": {
"type": "string",
"description": "Buyer's part/item number",
"x-order": 6
},
"description": {
"type": "string",
"description": "Item description",
"x-order": 7
},
"quantity": {
"type": "number",
"multipleOf": 0.01,
"description": "Quantity invoiced.",
"x-order": 8
},
"unitOfMeasure": {
"title": "REC20 Unit of Measure Codes",
"description": "UN/ECE Recommendation 20 unit of measure codes for DataShift canonical documents",
"type": "string",
"enum": [
"AY",
"BG",
"BL",
"BR",
"BLL",
"E2",
"BO",
"BX",
"BJ",
"BE",
"KA",
"CA",
"CG",
"CT",
"CQ",
"CS",
"CMT",
"CL",
"CH",
"MTQ",
"CY",
"DAY",
"DC",
"DZN",
"DR",
"EA",
"FOT",
"GRM",
"HUR",
"CEN",
"INH",
"JR",
"KGM",
"KMT",
"KT",
"LN",
"LK",
"LTR",
"MTR",
"TNE",
"MLT",
"MMT",
"MON",
"PK",
"PD",
"PL",
"PR",
"D97",
"C62",
"PG",
"LBR",
"RL",
"RO",
"SA",
"SE",
"SET",
"ST",
"SO",
"MTK",
"U3",
"MIL",
"TU",
"WEE"
],
"x-order": 9
},
"unitPrice": {
"type": "number",
"multipleOf": 0.0001,
"description": "Unit price",
"x-order": 10
},
"subtotal": {
"type": "number",
"multipleOf": 0.01,
"description": "Line subtotal before tax and adjustments.",
"x-order": 11
},
"taxAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Tax amount for this line",
"x-order": 12
},
"taxRate": {
"type": "number",
"multipleOf": 0.01,
"description": "Tax rate as percentage (e.g., 10 for 10%)",
"x-order": 13
},
"discountAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Discount amount for this line",
"x-order": 14
},
"shippingAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Shipping charge for this line",
"x-order": 15
},
"grossAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Subtotal + tax + shipping before discounts",
"x-order": 16
},
"netAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Gross amount minus discounts",
"x-order": 17
},
"currency": {
"title": "Currency Enumeration",
"description": "ISO 4217 currency code for this line.",
"type": "string",
"enum": [
"AUD"
],
"x-order": 18
},
"manufacturerPartId": {
"type": "string",
"description": "Manufacturer's part number",
"x-order": 19
},
"manufacturerName": {
"type": "string",
"description": "Manufacturer name",
"x-order": 20
},
"countryOfOrigin": {
"type": "string",
"enum": [
"AU"
],
"description": "Country where item was manufactured",
"x-order": 21
},
"serialNumbers": {
"type": "array",
"items": {
"type": "string"
},
"description": "Serial numbers for serialized items",
"x-order": 22
},
"batchId": {
"type": "string",
"description": "Lot/batch ID",
"x-order": 23
},
"classification": {
"type": "array",
"description": "Product classification codes",
"items": {
"type": "object",
"properties": {
"domain": {
"type": "string",
"enum": [
"UNSPSC",
"HS",
"commodity"
],
"description": "Classification scheme",
"x-order": 1
},
"code": {
"type": "string",
"x-order": 2
}
},
"additionalProperties": false
},
"x-order": 24
},
"comments": {
"type": "string",
"maxLength": 500,
"description": "Line-level comments",
"x-order": 25
}
},
"additionalProperties": false
},
"description": "Invoice lines. DataShift manages uniqueLineKey correlation back to PO and ASN lines where needed.",
"x-order": 23
},
"invoiceSummary": {
"type": "object",
"required": [
"taxAmount",
"dueAmount",
"currency"
],
"description": "Invoice totals, tax, discounts, and amount due.",
"properties": {
"shippingAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Total shipping charges",
"x-order": 1
},
"specialHandlingAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Special handling charges",
"x-order": 2
},
"taxAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Total tax amount",
"x-order": 3
},
"taxBreakdown": {
"type": "array",
"description": "Tax breakdown by type/jurisdiction",
"items": {
"type": "object",
"properties": {
"taxType": {
"type": "string",
"enum": [
"GST",
"VAT",
"salesTax",
"excise",
"other"
],
"description": "Type of tax",
"x-order": 1
},
"taxRate": {
"type": "number",
"multipleOf": 0.01,
"description": "Tax rate as percentage",
"x-order": 2
},
"taxableAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Amount subject to this tax",
"x-order": 3
},
"taxAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Calculated tax amount",
"x-order": 4
},
"jurisdiction": {
"type": "string",
"description": "Tax jurisdiction (e.g., state, country)",
"x-order": 5
},
"description": {
"type": "string",
"x-order": 6
}
},
"additionalProperties": false
},
"x-order": 4
},
"discountAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Total discount amount",
"x-order": 5
},
"grossAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Subtotal + tax + shipping + handling before discounts",
"x-order": 6
},
"netAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Gross amount minus discounts",
"x-order": 7
},
"depositAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Prepayment/deposit already received",
"x-order": 8
},
"dueAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Amount due (net - deposits)",
"x-order": 9
},
"currency": {
"title": "Currency Enumeration",
"description": "ISO 4217 currency codes supported by DataShift canonical schemas",
"type": "string",
"enum": [
"AUD"
],
"x-order": 10
}
},
"additionalProperties": false,
"x-order": 24
},
"extrinsics": {
"type": "object",
"description": "Partner-specific extension fields that are not part of the canonical core contract.",
"additionalProperties": {
"x-additionalPropertiesName": "extensionField",
"description": "Partner-specific extension value."
},
"x-order": 25
}
},
"additionalProperties": false,
"description": "Business payload for the invoice.",
"x-order": 5
}
},
"additionalProperties": false,
"examples": [
{
"docType": "INV",
"correlationId": "43e7580b-e592-46bb-a3d0-dbf8997758d9",
"timestamp": "2026-05-16T04:00:00Z",
"metadata": {
"sourceLanguage": "cxml",
"sourceVersion": "1.0.8",
"payloadId": "inv-example-10001",
"userAgent": "DataShift Edge v1"
},
"data": {
"invoiceNumber": "INV-10001",
"poNumber": "PO-10001",
"invoiceDate": "2026-05-16T04:00:00Z",
"dueDate": "2026-06-15T00:00:00Z",
"purpose": "standard",
"poReferences": [
{
"poNumber": "PO-10001",
"poVersion": "1"
}
],
"supplier": {
"id": "SUPPLIER-AU",
"name": "Example Supplier Pty Ltd",
"taxRegistrations": {
"type": "ABN",
"value": "98765432109"
},
"address": {
"addressee": "Example Supplier Pty Ltd",
"street1": "20 Supplier Street",
"city": "Adelaide",
"state": "SA",
"postalCode": "5000",
"country": "AU"
}
},
"billTo": {
"addressee": "Example Buyer Accounts",
"street1": "1 Market Street",
"city": "Sydney",
"state": "NSW",
"postalCode": "2000",
"country": "AU"
},
"lineItems": [
{
"invoiceLineNumber": 1,
"uniqueLineKey": "PO-10001-1",
"poLineReference": 1,
"supplierItemId": "SUP-001",
"buyerItemId": "BUY-001",
"description": "Example product",
"quantity": 12,
"unitOfMeasure": "EA",
"unitPrice": 25,
"subtotal": 300,
"taxAmount": 30,
"currency": "AUD"
}
],
"invoiceSummary": {
"taxAmount": 30,
"grossAmount": 330,
"netAmount": 330,
"dueAmount": 330,
"currency": "AUD"
},
"extrinsics": {
"accountsReference": "AP-10001"
}
}
}
]
}1.0.7/edi/contracts/releases/1.0.7/schemas/invoice.schema.json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://docs.datashift.com.au/edi/contracts/releases/1.0.7/schemas/invoice.schema.json",
"title": "Invoice (INV) Canonical Schema",
"description": "Public canonical Invoice contract used to request payment for goods or services supplied against purchase orders and shipments.",
"version": "1.0.7",
"type": "object",
"required": [
"docType",
"correlationId",
"timestamp",
"metadata",
"data"
],
"properties": {
"docType": {
"const": "INV",
"x-datashift-managed": true,
"x-datashift-system": true,
"description": "Canonical document type. For invoices this value is INV.",
"x-order": 1
},
"correlationId": {
"type": "string",
"format": "uuid",
"x-datashift-managed": true,
"x-datashift-system": true,
"description": "Stable UUID used to trace this invoice through order, shipment, and payment workflows.",
"x-order": 2
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "UTC timestamp indicating when DataShift created the canonical invoice.",
"x-datashift-managed": true,
"x-datashift-system": true,
"x-order": 3
},
"metadata": {
"type": "object",
"description": "Public source metadata retained for integration troubleshooting.",
"required": [
"sourceLanguage",
"sourceVersion",
"userAgent"
],
"properties": {
"sourceLanguage": {
"type": "string",
"enum": [
"json",
"cxml"
],
"x-order": 1
},
"sourceVersion": {
"type": "string",
"x-order": 2
},
"payloadId": {
"type": "string",
"description": "Original cXML payload ID",
"x-order": 3
},
"userAgent": {
"type": "string",
"description": "System that generated the document",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 4
},
"data": {
"type": "object",
"required": [
"invoiceNumber",
"poNumber",
"invoiceDate",
"purpose",
"supplier",
"billTo",
"lineItems",
"invoiceSummary"
],
"properties": {
"invoiceNumber": {
"type": "string",
"description": "Supplier-generated invoice number.",
"x-order": 1
},
"poNumber": {
"type": "string",
"description": "Primary purchase order number this invoice bills against.",
"x-order": 2
},
"invoiceDate": {
"type": "string",
"format": "date-time",
"description": "Date and time the supplier issued the invoice.",
"x-order": 3
},
"dueDate": {
"type": "string",
"format": "date-time",
"description": "Payment due date.",
"x-order": 4
},
"purpose": {
"type": "string",
"enum": [
"standard",
"creditMemo",
"debitMemo",
"lineLevelCreditMemo",
"lineLevelDebitMemo"
],
"default": "standard",
"description": "Invoice business purpose.",
"x-enum-descriptions": {
"standard": "Standard invoice requesting payment.",
"creditMemo": "Document reducing a previously invoiced amount.",
"debitMemo": "Document increasing a previously invoiced amount.",
"lineLevelCreditMemo": "Line-level credit against a previous invoice.",
"lineLevelDebitMemo": "Line-level debit against a previous invoice."
},
"x-order": 5
},
"operation": {
"type": "string",
"enum": [
"new",
"update",
"delete"
],
"default": "new",
"description": "Whether this creates, updates, or deletes an invoice",
"x-order": 6
},
"invoiceOrigin": {
"type": "string",
"enum": [
"supplier",
"buyer"
],
"description": "Whether invoice was originated by supplier or buyer (ERS)",
"x-order": 7
},
"isInformationOnly": {
"type": "boolean",
"default": false,
"description": "If true, invoice is for information only and no action required",
"x-order": 8
},
"isERS": {
"type": "boolean",
"default": false,
"description": "Evaluated Receipt Settlement invoice",
"x-order": 9
},
"documentReference": {
"type": "object",
"description": "Reference to previous invoice (for credit/debit memos or cancellations)",
"properties": {
"invoiceId": {
"type": "string",
"x-order": 1
},
"invoiceDate": {
"type": "string",
"format": "date-time",
"x-order": 2
},
"documentId": {
"type": "string",
"x-order": 3
},
"payloadId": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 10
},
"poReferences": {
"type": "array",
"description": "Purchase orders being invoiced.",
"items": {
"type": "object",
"required": [
"poNumber"
],
"properties": {
"poNumber": {
"type": "string",
"x-order": 1
},
"poVersion": {
"type": "string",
"x-order": 2
},
"documentId": {
"type": "string",
"x-order": 3
},
"payloadId": {
"type": "string",
"x-order": 4
},
"orderDate": {
"type": "string",
"format": "date-time",
"x-order": 5
}
},
"additionalProperties": false
},
"x-order": 11
},
"asnReference": {
"type": "object",
"description": "Shipment notice reference when invoicing against a dispatched shipment.",
"properties": {
"shipmentId": {
"type": "string",
"x-order": 1
},
"shipmentDate": {
"type": "string",
"format": "date-time",
"x-order": 2
},
"documentId": {
"type": "string",
"x-order": 3
},
"payloadId": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 12
},
"supplier": {
"title": "Party Definition",
"description": "Supplier or seller issuing the invoice.",
"type": "object",
"properties": {
"id": {
"type": "string",
"x-order": 1
},
"name": {
"type": "string",
"x-order": 2
},
"taxRegistrations": {
"type": "object",
"description": "Australian tax registrations for the party",
"required": [
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"ABN"
],
"x-order": 1
},
"value": {
"type": "string",
"x-order": 2
}
},
"additionalProperties": false,
"x-order": 3
},
"contact": {
"type": "object",
"properties": {
"name": {
"type": "string",
"x-order": 1
},
"phone": {
"type": "string",
"x-order": 2
},
"email": {
"type": "string",
"anyOf": [
{
"format": "email"
},
{
"const": ""
}
],
"x-order": 3
},
"role": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 4
},
"address": {
"title": "Address Definition",
"description": "Standard address structure for DataShift canonical documents",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false,
"x-order": 5
}
},
"required": [
"id",
"name"
],
"additionalProperties": false,
"x-order": 13
},
"billTo": {
"title": "Address Definition",
"description": "Buyer billing party.",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false,
"x-order": 14
},
"soldTo": {
"allOf": [
{
"title": "Address Definition",
"description": "Standard address structure for DataShift canonical documents",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false
}
],
"description": "Sold-to party (may differ from bill-to)",
"x-order": 15
},
"shipTo": {
"title": "Address Definition",
"description": "Standard address structure for DataShift canonical documents",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false,
"x-order": 16
},
"remitTo": {
"type": "object",
"description": "Address where payment should be sent",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
},
"bankDetails": {
"type": "object",
"properties": {
"bankName": {
"type": "string",
"x-order": 1
},
"accountName": {
"type": "string",
"x-order": 2
},
"accountNumber": {
"type": "string",
"x-order": 3
},
"bsb": {
"type": "string",
"x-order": 4
},
"swift": {
"type": "string",
"x-order": 5
},
"iban": {
"type": "string",
"x-order": 6
}
},
"additionalProperties": false,
"x-order": 9
}
},
"additionalProperties": false,
"x-order": 17
},
"shipping": {
"type": "object",
"description": "Commercial freight charges and instructions for the invoice.",
"properties": {
"amount": {
"type": "number",
"multipleOf": 0.01,
"x-order": 1
},
"currency": {
"title": "Currency Enumeration",
"description": "ISO 4217 currency codes supported by DataShift canonical schemas",
"type": "string",
"enum": [
"AUD"
],
"x-order": 2
},
"carrier": {
"type": "string",
"x-order": 3
},
"route": {
"type": "string",
"x-order": 4
},
"shippingInstructions": {
"type": "string",
"x-order": 5
},
"buyerAcctNumber": {
"type": "string",
"x-order": 6
},
"incoTerms": {
"type": "string",
"enum": [
"cfr",
"cif",
"cip",
"cpt",
"daf",
"dap",
"ddp",
"ddu",
"dpu",
"deq",
"des",
"exw",
"fas",
"fca",
"fob"
],
"x-order": 7
}
},
"additionalProperties": false,
"x-order": 18
},
"shipmentDetails": {
"type": "object",
"description": "Actual dispatch and tracking information for the invoiced goods",
"properties": {
"carrier": {
"type": "string",
"x-order": 1
},
"trackingNumber": {
"type": "string",
"x-order": 2
},
"shippingDate": {
"type": "string",
"format": "date-time",
"x-order": 3
}
},
"additionalProperties": false,
"x-order": 19
},
"paymentTerms": {
"type": "object",
"description": "Payment terms and conditions",
"properties": {
"description": {
"type": "string",
"description": "Human-readable payment terms (e.g., 'Net 30', '2/10 Net 30')",
"x-order": 1
},
"netDays": {
"type": "integer",
"description": "Number of days until payment is due",
"x-order": 2
},
"discountTerms": {
"type": "array",
"description": "Early payment discount tiers",
"items": {
"type": "object",
"properties": {
"discountPercent": {
"type": "number",
"multipleOf": 0.01,
"description": "Discount percentage (e.g., 2 for 2%)",
"x-order": 1
},
"discountDays": {
"type": "integer",
"description": "Days within which discount applies",
"x-order": 2
},
"discountDueDate": {
"type": "string",
"format": "date",
"description": "Specific date by which discount applies",
"x-order": 3
}
},
"additionalProperties": false
},
"x-order": 3
}
},
"additionalProperties": false,
"x-order": 20
},
"contacts": {
"type": "array",
"description": "Contact information for various roles",
"items": {
"type": "object",
"required": [
"role"
],
"properties": {
"role": {
"type": "string",
"enum": [
"issuerOfInvoice",
"soldTo",
"billTo",
"remitTo",
"shipFrom",
"shipTo"
],
"x-order": 1
},
"name": {
"type": "string",
"x-order": 2
},
"email": {
"type": "string",
"anyOf": [
{
"format": "email"
},
{
"const": ""
}
],
"x-order": 3
},
"phone": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false
},
"x-order": 21
},
"comments": {
"type": "string",
"maxLength": 2000,
"description": "Invoice-level comments or notes",
"x-order": 22
},
"lineItems": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": [
"invoiceLineNumber",
"quantity",
"unitPrice",
"subtotal",
"currency"
],
"properties": {
"invoiceLineNumber": {
"type": "integer",
"description": "Supplier's line number for this invoice line.",
"x-order": 1
},
"uniqueLineKey": {
"type": "string",
"description": "DataShift-managed stable line key from the original purchase order.",
"x-datashift-managed": true,
"x-datashift-system": true,
"x-order": 2
},
"poLineReference": {
"type": "integer",
"description": "Line number from the purchase order being invoiced.",
"x-order": 3
},
"asnLineReference": {
"type": "integer",
"description": "Line number from the ship notice",
"x-order": 4
},
"supplierItemId": {
"type": "string",
"description": "Supplier's part/item number",
"x-order": 5
},
"buyerItemId": {
"type": "string",
"description": "Buyer's part/item number",
"x-order": 6
},
"description": {
"type": "string",
"description": "Item description",
"x-order": 7
},
"quantity": {
"type": "number",
"multipleOf": 0.01,
"description": "Quantity invoiced.",
"x-order": 8
},
"unitOfMeasure": {
"title": "REC20 Unit of Measure Codes",
"description": "UN/ECE Recommendation 20 unit of measure codes for DataShift canonical documents",
"type": "string",
"enum": [
"AY",
"BG",
"BL",
"BR",
"BLL",
"E2",
"BO",
"BX",
"BJ",
"BE",
"KA",
"CA",
"CG",
"CT",
"CQ",
"CS",
"CMT",
"CL",
"CH",
"MTQ",
"CY",
"DAY",
"DC",
"DZN",
"DR",
"EA",
"FOT",
"GRM",
"HUR",
"CEN",
"INH",
"JR",
"KGM",
"KMT",
"KT",
"LN",
"LK",
"LTR",
"MTR",
"TNE",
"MLT",
"MMT",
"MON",
"PK",
"PD",
"PL",
"PR",
"D97",
"C62",
"PG",
"LBR",
"RL",
"RO",
"SA",
"SE",
"SET",
"ST",
"SO",
"MTK",
"U3",
"MIL",
"TU",
"WEE"
],
"x-order": 9
},
"unitPrice": {
"type": "number",
"multipleOf": 0.0001,
"description": "Unit price",
"x-order": 10
},
"subtotal": {
"type": "number",
"multipleOf": 0.01,
"description": "Line subtotal before tax and adjustments.",
"x-order": 11
},
"taxAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Tax amount for this line",
"x-order": 12
},
"taxRate": {
"type": "number",
"multipleOf": 0.01,
"description": "Tax rate as percentage (e.g., 10 for 10%)",
"x-order": 13
},
"discountAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Discount amount for this line",
"x-order": 14
},
"shippingAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Shipping charge for this line",
"x-order": 15
},
"grossAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Subtotal + tax + shipping before discounts",
"x-order": 16
},
"netAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Gross amount minus discounts",
"x-order": 17
},
"currency": {
"title": "Currency Enumeration",
"description": "ISO 4217 currency code for this line.",
"type": "string",
"enum": [
"AUD"
],
"x-order": 18
},
"manufacturerPartId": {
"type": "string",
"description": "Manufacturer's part number",
"x-order": 19
},
"manufacturerName": {
"type": "string",
"description": "Manufacturer name",
"x-order": 20
},
"countryOfOrigin": {
"type": "string",
"enum": [
"AU"
],
"description": "Country where item was manufactured",
"x-order": 21
},
"serialNumbers": {
"type": "array",
"items": {
"type": "string"
},
"description": "Serial numbers for serialized items",
"x-order": 22
},
"batchId": {
"type": "string",
"description": "Lot/batch ID",
"x-order": 23
},
"classification": {
"type": "array",
"description": "Product classification codes",
"items": {
"type": "object",
"properties": {
"domain": {
"type": "string",
"enum": [
"UNSPSC",
"HS",
"commodity"
],
"description": "Classification scheme",
"x-order": 1
},
"code": {
"type": "string",
"x-order": 2
}
},
"additionalProperties": false
},
"x-order": 24
},
"comments": {
"type": "string",
"maxLength": 500,
"description": "Line-level comments",
"x-order": 25
}
},
"additionalProperties": false
},
"description": "Invoice lines. DataShift manages uniqueLineKey correlation back to PO and ASN lines where needed.",
"x-order": 23
},
"invoiceSummary": {
"type": "object",
"required": [
"subtotal",
"taxAmount",
"dueAmount",
"currency"
],
"description": "Invoice totals, tax, discounts, and amount due.",
"properties": {
"subtotal": {
"type": "number",
"multipleOf": 0.01,
"description": "Sum of all line subtotals",
"x-order": 1
},
"shippingAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Total shipping charges",
"x-order": 2
},
"specialHandlingAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Special handling charges",
"x-order": 3
},
"taxAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Total tax amount",
"x-order": 4
},
"taxBreakdown": {
"type": "array",
"description": "Tax breakdown by type/jurisdiction",
"items": {
"type": "object",
"properties": {
"taxType": {
"type": "string",
"enum": [
"GST",
"VAT",
"salesTax",
"excise",
"other"
],
"description": "Type of tax",
"x-order": 1
},
"taxRate": {
"type": "number",
"multipleOf": 0.01,
"description": "Tax rate as percentage",
"x-order": 2
},
"taxableAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Amount subject to this tax",
"x-order": 3
},
"taxAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Calculated tax amount",
"x-order": 4
},
"jurisdiction": {
"type": "string",
"description": "Tax jurisdiction (e.g., state, country)",
"x-order": 5
},
"description": {
"type": "string",
"x-order": 6
}
},
"additionalProperties": false
},
"x-order": 5
},
"discountAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Total discount amount",
"x-order": 6
},
"grossAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Subtotal + tax + shipping + handling before discounts",
"x-order": 7
},
"netAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Gross amount minus discounts",
"x-order": 8
},
"depositAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Prepayment/deposit already received",
"x-order": 9
},
"dueAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Amount due (net - deposits)",
"x-order": 10
},
"currency": {
"title": "Currency Enumeration",
"description": "ISO 4217 currency codes supported by DataShift canonical schemas",
"type": "string",
"enum": [
"AUD"
],
"x-order": 11
}
},
"additionalProperties": false,
"x-order": 24
},
"extrinsics": {
"type": "object",
"description": "Partner-specific extension fields that are not part of the canonical core contract.",
"additionalProperties": {
"x-additionalPropertiesName": "extensionField",
"description": "Partner-specific extension value."
},
"x-order": 25
}
},
"additionalProperties": false,
"description": "Business payload for the invoice.",
"x-order": 5
}
},
"additionalProperties": false,
"examples": [
{
"docType": "INV",
"correlationId": "43e7580b-e592-46bb-a3d0-dbf8997758d9",
"timestamp": "2026-05-16T04:00:00Z",
"metadata": {
"sourceLanguage": "cxml",
"sourceVersion": "1.2.067",
"payloadId": "inv-example-10001",
"userAgent": "Example Supplier Gateway"
},
"data": {
"invoiceNumber": "INV-10001",
"poNumber": "PO-10001",
"invoiceDate": "2026-05-16T04:00:00Z",
"dueDate": "2026-06-15T00:00:00Z",
"purpose": "standard",
"poReferences": [
{
"poNumber": "PO-10001",
"poVersion": "1"
}
],
"supplier": {
"id": "SUPPLIER-AU",
"name": "Example Supplier Pty Ltd",
"taxRegistrations": {
"type": "ABN",
"value": "98765432109"
},
"address": {
"addressee": "Example Supplier Pty Ltd",
"street1": "20 Supplier Street",
"city": "Adelaide",
"state": "SA",
"postalCode": "5000",
"country": "AU"
}
},
"billTo": {
"addressee": "Example Buyer Accounts",
"street1": "1 Market Street",
"city": "Sydney",
"state": "NSW",
"postalCode": "2000",
"country": "AU"
},
"lineItems": [
{
"invoiceLineNumber": 1,
"uniqueLineKey": "PO-10001-1",
"poLineReference": 1,
"supplierItemId": "SUP-001",
"buyerItemId": "BUY-001",
"description": "Example product",
"quantity": 12,
"unitOfMeasure": "EA",
"unitPrice": 25,
"subtotal": 300,
"taxAmount": 30,
"currency": "AUD"
}
],
"invoiceSummary": {
"subtotal": 300,
"taxAmount": 30,
"grossAmount": 330,
"netAmount": 330,
"dueAmount": 330,
"currency": "AUD"
},
"extrinsics": {
"accountsReference": "AP-10001"
}
}
}
]
}1.0.6/edi/contracts/releases/1.0.6/schemas/invoice.schema.json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://docs.datashift.com.au/edi/contracts/releases/1.0.6/schemas/invoice.schema.json",
"title": "Invoice (INV) Canonical Schema",
"description": "Public canonical Invoice contract used to request payment for goods or services supplied against purchase orders and shipments.",
"version": "1.0.6",
"type": "object",
"required": [
"docType",
"correlationId",
"timestamp",
"metadata",
"data"
],
"properties": {
"docType": {
"const": "INV",
"x-datashift-managed": true,
"x-datashift-system": true,
"description": "Canonical document type. For invoices this value is INV.",
"x-order": 1
},
"correlationId": {
"type": "string",
"format": "uuid",
"x-datashift-managed": true,
"x-datashift-system": true,
"description": "Stable UUID used to trace this invoice through order, shipment, and payment workflows.",
"x-order": 2
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "UTC timestamp indicating when DataShift created the canonical invoice.",
"x-datashift-managed": true,
"x-datashift-system": true,
"x-order": 3
},
"metadata": {
"type": "object",
"description": "Public source metadata retained for integration troubleshooting.",
"required": [
"sourceLanguage",
"sourceVersion",
"userAgent"
],
"properties": {
"sourceLanguage": {
"type": "string",
"enum": [
"json",
"cxml"
],
"x-order": 1
},
"sourceVersion": {
"type": "string",
"x-order": 2
},
"payloadId": {
"type": "string",
"description": "Original cXML payload ID",
"x-order": 3
},
"userAgent": {
"type": "string",
"description": "System that generated the document",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 4
},
"data": {
"type": "object",
"required": [
"invoiceNumber",
"poNumber",
"invoiceDate",
"purpose",
"supplier",
"billTo",
"lineItems",
"invoiceSummary"
],
"properties": {
"invoiceNumber": {
"type": "string",
"description": "Supplier-generated invoice number.",
"x-order": 1
},
"poNumber": {
"type": "string",
"description": "Primary purchase order number this invoice bills against.",
"x-order": 2
},
"invoiceDate": {
"type": "string",
"format": "date-time",
"description": "Date and time the supplier issued the invoice.",
"x-order": 3
},
"dueDate": {
"type": "string",
"format": "date-time",
"description": "Payment due date.",
"x-order": 4
},
"purpose": {
"type": "string",
"enum": [
"standard",
"creditMemo",
"debitMemo",
"lineLevelCreditMemo",
"lineLevelDebitMemo"
],
"default": "standard",
"description": "Invoice business purpose.",
"x-enum-descriptions": {
"standard": "Standard invoice requesting payment.",
"creditMemo": "Document reducing a previously invoiced amount.",
"debitMemo": "Document increasing a previously invoiced amount.",
"lineLevelCreditMemo": "Line-level credit against a previous invoice.",
"lineLevelDebitMemo": "Line-level debit against a previous invoice."
},
"x-order": 5
},
"operation": {
"type": "string",
"enum": [
"new",
"update",
"delete"
],
"default": "new",
"description": "Whether this creates, updates, or deletes an invoice",
"x-order": 6
},
"invoiceOrigin": {
"type": "string",
"enum": [
"supplier",
"buyer"
],
"description": "Whether invoice was originated by supplier or buyer (ERS)",
"x-order": 7
},
"isInformationOnly": {
"type": "boolean",
"default": false,
"description": "If true, invoice is for information only and no action required",
"x-order": 8
},
"isERS": {
"type": "boolean",
"default": false,
"description": "Evaluated Receipt Settlement invoice",
"x-order": 9
},
"documentReference": {
"type": "object",
"description": "Reference to previous invoice (for credit/debit memos or cancellations)",
"properties": {
"invoiceId": {
"type": "string",
"x-order": 1
},
"invoiceDate": {
"type": "string",
"format": "date-time",
"x-order": 2
},
"documentId": {
"type": "string",
"x-order": 3
},
"payloadId": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 10
},
"poReferences": {
"type": "array",
"description": "Purchase orders being invoiced.",
"items": {
"type": "object",
"required": [
"poNumber"
],
"properties": {
"poNumber": {
"type": "string",
"x-order": 1
},
"poVersion": {
"type": "string",
"x-order": 2
},
"documentId": {
"type": "string",
"x-order": 3
},
"payloadId": {
"type": "string",
"x-order": 4
},
"orderDate": {
"type": "string",
"format": "date-time",
"x-order": 5
}
},
"additionalProperties": false
},
"x-order": 11
},
"asnReference": {
"type": "object",
"description": "Shipment notice reference when invoicing against a dispatched shipment.",
"properties": {
"shipmentId": {
"type": "string",
"x-order": 1
},
"shipmentDate": {
"type": "string",
"format": "date-time",
"x-order": 2
},
"documentId": {
"type": "string",
"x-order": 3
},
"payloadId": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 12
},
"supplier": {
"title": "Party Definition",
"description": "Supplier or seller issuing the invoice.",
"type": "object",
"properties": {
"id": {
"type": "string",
"x-order": 1
},
"name": {
"type": "string",
"x-order": 2
},
"taxRegistrations": {
"type": "object",
"description": "Australian tax registrations for the party",
"required": [
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"ABN"
],
"x-order": 1
},
"value": {
"type": "string",
"x-order": 2
}
},
"additionalProperties": false,
"x-order": 3
},
"contact": {
"type": "object",
"properties": {
"name": {
"type": "string",
"x-order": 1
},
"phone": {
"type": "string",
"x-order": 2
},
"email": {
"type": "string",
"anyOf": [
{
"format": "email"
},
{
"const": ""
}
],
"x-order": 3
},
"role": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 4
},
"address": {
"title": "Address Definition",
"description": "Standard address structure for DataShift canonical documents",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"addressee",
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false,
"x-order": 5
}
},
"required": [
"id",
"name"
],
"additionalProperties": false,
"x-order": 13
},
"billTo": {
"title": "Address Definition",
"description": "Buyer billing party.",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"addressee",
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false,
"x-order": 14
},
"soldTo": {
"allOf": [
{
"title": "Address Definition",
"description": "Standard address structure for DataShift canonical documents",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"addressee",
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false
}
],
"description": "Sold-to party (may differ from bill-to)",
"x-order": 15
},
"shipTo": {
"title": "Address Definition",
"description": "Standard address structure for DataShift canonical documents",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"addressee",
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false,
"x-order": 16
},
"remitTo": {
"type": "object",
"description": "Address where payment should be sent",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
},
"bankDetails": {
"type": "object",
"properties": {
"bankName": {
"type": "string",
"x-order": 1
},
"accountName": {
"type": "string",
"x-order": 2
},
"accountNumber": {
"type": "string",
"x-order": 3
},
"bsb": {
"type": "string",
"x-order": 4
},
"swift": {
"type": "string",
"x-order": 5
},
"iban": {
"type": "string",
"x-order": 6
}
},
"additionalProperties": false,
"x-order": 9
}
},
"additionalProperties": false,
"x-order": 17
},
"shipping": {
"type": "object",
"description": "Commercial freight charges and instructions for the invoice.",
"properties": {
"amount": {
"type": "number",
"multipleOf": 0.01,
"x-order": 1
},
"currency": {
"title": "Currency Enumeration",
"description": "ISO 4217 currency codes supported by DataShift canonical schemas",
"type": "string",
"enum": [
"AUD"
],
"x-order": 2
},
"carrier": {
"type": "string",
"x-order": 3
},
"route": {
"type": "string",
"x-order": 4
},
"shippingInstructions": {
"type": "string",
"x-order": 5
},
"buyerAcctNumber": {
"type": "string",
"x-order": 6
},
"incoTerms": {
"type": "string",
"enum": [
"cfr",
"cif",
"cip",
"cpt",
"daf",
"dap",
"ddp",
"ddu",
"dpu",
"deq",
"des",
"exw",
"fas",
"fca",
"fob"
],
"x-order": 7
}
},
"additionalProperties": false,
"x-order": 18
},
"shipmentDetails": {
"type": "object",
"description": "Actual dispatch and tracking information for the invoiced goods",
"properties": {
"carrier": {
"type": "string",
"x-order": 1
},
"trackingNumber": {
"type": "string",
"x-order": 2
},
"shippingDate": {
"type": "string",
"format": "date-time",
"x-order": 3
}
},
"additionalProperties": false,
"x-order": 19
},
"paymentTerms": {
"type": "object",
"description": "Payment terms and conditions",
"properties": {
"description": {
"type": "string",
"description": "Human-readable payment terms (e.g., 'Net 30', '2/10 Net 30')",
"x-order": 1
},
"netDays": {
"type": "integer",
"description": "Number of days until payment is due",
"x-order": 2
},
"discountTerms": {
"type": "array",
"description": "Early payment discount tiers",
"items": {
"type": "object",
"properties": {
"discountPercent": {
"type": "number",
"multipleOf": 0.01,
"description": "Discount percentage (e.g., 2 for 2%)",
"x-order": 1
},
"discountDays": {
"type": "integer",
"description": "Days within which discount applies",
"x-order": 2
},
"discountDueDate": {
"type": "string",
"format": "date",
"description": "Specific date by which discount applies",
"x-order": 3
}
},
"additionalProperties": false
},
"x-order": 3
}
},
"additionalProperties": false,
"x-order": 20
},
"contacts": {
"type": "array",
"description": "Contact information for various roles",
"items": {
"type": "object",
"required": [
"role"
],
"properties": {
"role": {
"type": "string",
"enum": [
"issuerOfInvoice",
"soldTo",
"billTo",
"remitTo",
"shipFrom",
"shipTo"
],
"x-order": 1
},
"name": {
"type": "string",
"x-order": 2
},
"email": {
"type": "string",
"anyOf": [
{
"format": "email"
},
{
"const": ""
}
],
"x-order": 3
},
"phone": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false
},
"x-order": 21
},
"comments": {
"type": "string",
"maxLength": 2000,
"description": "Invoice-level comments or notes",
"x-order": 22
},
"lineItems": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": [
"invoiceLineNumber",
"quantity",
"unitPrice",
"subtotal",
"currency"
],
"properties": {
"invoiceLineNumber": {
"type": "integer",
"description": "Supplier's line number for this invoice line.",
"x-order": 1
},
"uniqueLineKey": {
"type": "string",
"description": "DataShift-managed stable line key from the original purchase order.",
"x-datashift-managed": true,
"x-datashift-system": true,
"x-order": 2
},
"poLineReference": {
"type": "integer",
"description": "Line number from the purchase order being invoiced.",
"x-order": 3
},
"asnLineReference": {
"type": "integer",
"description": "Line number from the ship notice",
"x-order": 4
},
"supplierItemId": {
"type": "string",
"description": "Supplier's part/item number",
"x-order": 5
},
"buyerItemId": {
"type": "string",
"description": "Buyer's part/item number",
"x-order": 6
},
"description": {
"type": "string",
"description": "Item description",
"x-order": 7
},
"quantity": {
"type": "number",
"multipleOf": 0.01,
"description": "Quantity invoiced.",
"x-order": 8
},
"unitOfMeasure": {
"title": "REC20 Unit of Measure Codes",
"description": "UN/ECE Recommendation 20 unit of measure codes for DataShift canonical documents",
"type": "string",
"enum": [
"AY",
"BG",
"BL",
"BR",
"BLL",
"E2",
"BO",
"BX",
"BJ",
"BE",
"KA",
"CA",
"CG",
"CT",
"CQ",
"CS",
"CMT",
"CL",
"CH",
"MTQ",
"CY",
"DAY",
"DC",
"DZN",
"DR",
"EA",
"FOT",
"GRM",
"HUR",
"CEN",
"INH",
"JR",
"KGM",
"KMT",
"KT",
"LN",
"LK",
"LTR",
"MTR",
"TNE",
"MLT",
"MMT",
"MON",
"PK",
"PD",
"PL",
"PR",
"D97",
"C62",
"PG",
"LBR",
"RL",
"RO",
"SA",
"SE",
"SET",
"ST",
"SO",
"MTK",
"U3",
"MIL",
"TU",
"WEE"
],
"x-order": 9
},
"unitPrice": {
"type": "number",
"multipleOf": 0.0001,
"description": "Unit price",
"x-order": 10
},
"subtotal": {
"type": "number",
"multipleOf": 0.01,
"description": "Line subtotal before tax and adjustments.",
"x-order": 11
},
"taxAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Tax amount for this line",
"x-order": 12
},
"taxRate": {
"type": "number",
"multipleOf": 0.01,
"description": "Tax rate as percentage (e.g., 10 for 10%)",
"x-order": 13
},
"discountAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Discount amount for this line",
"x-order": 14
},
"shippingAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Shipping charge for this line",
"x-order": 15
},
"grossAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Subtotal + tax + shipping before discounts",
"x-order": 16
},
"netAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Gross amount minus discounts",
"x-order": 17
},
"currency": {
"title": "Currency Enumeration",
"description": "ISO 4217 currency code for this line.",
"type": "string",
"enum": [
"AUD"
],
"x-order": 18
},
"manufacturerPartId": {
"type": "string",
"description": "Manufacturer's part number",
"x-order": 19
},
"manufacturerName": {
"type": "string",
"description": "Manufacturer name",
"x-order": 20
},
"countryOfOrigin": {
"type": "string",
"enum": [
"AU"
],
"description": "Country where item was manufactured",
"x-order": 21
},
"serialNumbers": {
"type": "array",
"items": {
"type": "string"
},
"description": "Serial numbers for serialized items",
"x-order": 22
},
"batchId": {
"type": "string",
"description": "Lot/batch ID",
"x-order": 23
},
"classification": {
"type": "array",
"description": "Product classification codes",
"items": {
"type": "object",
"properties": {
"domain": {
"type": "string",
"enum": [
"UNSPSC",
"HS",
"commodity"
],
"description": "Classification scheme",
"x-order": 1
},
"code": {
"type": "string",
"x-order": 2
}
},
"additionalProperties": false
},
"x-order": 24
},
"comments": {
"type": "string",
"maxLength": 500,
"description": "Line-level comments",
"x-order": 25
}
},
"additionalProperties": false
},
"description": "Invoice lines. DataShift manages uniqueLineKey correlation back to PO and ASN lines where needed.",
"x-order": 23
},
"invoiceSummary": {
"type": "object",
"required": [
"subtotal",
"taxAmount",
"dueAmount",
"currency"
],
"description": "Invoice totals, tax, discounts, and amount due.",
"properties": {
"subtotal": {
"type": "number",
"multipleOf": 0.01,
"description": "Sum of all line subtotals",
"x-order": 1
},
"shippingAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Total shipping charges",
"x-order": 2
},
"specialHandlingAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Special handling charges",
"x-order": 3
},
"taxAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Total tax amount",
"x-order": 4
},
"taxBreakdown": {
"type": "array",
"description": "Tax breakdown by type/jurisdiction",
"items": {
"type": "object",
"properties": {
"taxType": {
"type": "string",
"enum": [
"GST",
"VAT",
"salesTax",
"excise",
"other"
],
"description": "Type of tax",
"x-order": 1
},
"taxRate": {
"type": "number",
"multipleOf": 0.01,
"description": "Tax rate as percentage",
"x-order": 2
},
"taxableAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Amount subject to this tax",
"x-order": 3
},
"taxAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Calculated tax amount",
"x-order": 4
},
"jurisdiction": {
"type": "string",
"description": "Tax jurisdiction (e.g., state, country)",
"x-order": 5
},
"description": {
"type": "string",
"x-order": 6
}
},
"additionalProperties": false
},
"x-order": 5
},
"discountAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Total discount amount",
"x-order": 6
},
"grossAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Subtotal + tax + shipping + handling before discounts",
"x-order": 7
},
"netAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Gross amount minus discounts",
"x-order": 8
},
"depositAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Prepayment/deposit already received",
"x-order": 9
},
"dueAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Amount due (net - deposits)",
"x-order": 10
},
"currency": {
"title": "Currency Enumeration",
"description": "ISO 4217 currency codes supported by DataShift canonical schemas",
"type": "string",
"enum": [
"AUD"
],
"x-order": 11
}
},
"additionalProperties": false,
"x-order": 24
},
"extrinsics": {
"type": "object",
"description": "Partner-specific extension fields that are not part of the canonical core contract.",
"additionalProperties": {
"x-additionalPropertiesName": "extensionField",
"description": "Partner-specific extension value."
},
"x-order": 25
}
},
"additionalProperties": false,
"description": "Business payload for the invoice.",
"x-order": 5
}
},
"additionalProperties": false,
"examples": [
{
"docType": "INV",
"correlationId": "43e7580b-e592-46bb-a3d0-dbf8997758d9",
"timestamp": "2026-05-16T04:00:00Z",
"metadata": {
"sourceLanguage": "cxml",
"sourceVersion": "1.2.067",
"payloadId": "inv-example-10001",
"userAgent": "Example Supplier Gateway"
},
"data": {
"invoiceNumber": "INV-10001",
"poNumber": "PO-10001",
"invoiceDate": "2026-05-16T04:00:00Z",
"dueDate": "2026-06-15T00:00:00Z",
"purpose": "standard",
"poReferences": [
{
"poNumber": "PO-10001",
"poVersion": "1"
}
],
"supplier": {
"id": "SUPPLIER-AU",
"name": "Example Supplier Pty Ltd",
"taxRegistrations": {
"type": "ABN",
"value": "98765432109"
},
"address": {
"addressee": "Example Supplier Pty Ltd",
"street1": "20 Supplier Street",
"city": "Adelaide",
"state": "SA",
"postalCode": "5000",
"country": "AU"
}
},
"billTo": {
"addressee": "Example Buyer Accounts",
"street1": "1 Market Street",
"city": "Sydney",
"state": "NSW",
"postalCode": "2000",
"country": "AU"
},
"lineItems": [
{
"invoiceLineNumber": 1,
"uniqueLineKey": "PO-10001-1",
"poLineReference": 1,
"supplierItemId": "SUP-001",
"buyerItemId": "BUY-001",
"description": "Example product",
"quantity": 12,
"unitOfMeasure": "EA",
"unitPrice": 25,
"subtotal": 300,
"taxAmount": 30,
"currency": "AUD"
}
],
"invoiceSummary": {
"subtotal": 300,
"taxAmount": 30,
"grossAmount": 330,
"netAmount": 330,
"dueAmount": 330,
"currency": "AUD"
},
"extrinsics": {
"accountsReference": "AP-10001"
}
}
}
]
}1.0.5/edi/contracts/releases/1.0.5/schemas/invoice.schema.json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://docs.datashift.com.au/edi/contracts/releases/1.0.5/schemas/invoice.schema.json",
"title": "Invoice (INV) Canonical Schema",
"description": "Public canonical Invoice contract used to request payment for goods or services supplied against purchase orders and shipments.",
"version": "1.0.5",
"type": "object",
"required": [
"docType",
"correlationId",
"timestamp",
"metadata",
"data"
],
"properties": {
"docType": {
"const": "INV",
"x-datashift-managed": true,
"x-datashift-system": true,
"description": "Canonical document type. For invoices this value is INV.",
"x-order": 1
},
"correlationId": {
"type": "string",
"format": "uuid",
"x-datashift-managed": true,
"x-datashift-system": true,
"description": "Stable UUID used to trace this invoice through order, shipment, and payment workflows.",
"x-order": 2
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "UTC timestamp indicating when DataShift created the canonical invoice.",
"x-datashift-managed": true,
"x-datashift-system": true,
"x-order": 3
},
"metadata": {
"type": "object",
"description": "Public source metadata retained for integration troubleshooting.",
"required": [
"sourceLanguage",
"sourceVersion",
"userAgent"
],
"properties": {
"sourceLanguage": {
"type": "string",
"enum": [
"json",
"cxml"
],
"x-order": 1
},
"sourceVersion": {
"type": "string",
"x-order": 2
},
"payloadId": {
"type": "string",
"description": "Original cXML payload ID",
"x-order": 3
},
"userAgent": {
"type": "string",
"description": "System that generated the document",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 4
},
"data": {
"type": "object",
"required": [
"invoiceNumber",
"poNumber",
"invoiceDate",
"purpose",
"supplier",
"billTo",
"lineItems",
"invoiceSummary"
],
"properties": {
"invoiceNumber": {
"type": "string",
"description": "Supplier-generated invoice number.",
"x-order": 1
},
"poNumber": {
"type": "string",
"description": "Primary purchase order number this invoice bills against.",
"x-order": 2
},
"invoiceDate": {
"type": "string",
"format": "date-time",
"description": "Date and time the supplier issued the invoice.",
"x-order": 3
},
"dueDate": {
"type": "string",
"format": "date-time",
"description": "Payment due date.",
"x-order": 4
},
"purpose": {
"type": "string",
"enum": [
"standard",
"creditMemo",
"debitMemo",
"lineLevelCreditMemo",
"lineLevelDebitMemo"
],
"default": "standard",
"description": "Invoice business purpose.",
"x-enum-descriptions": {
"standard": "Standard invoice requesting payment.",
"creditMemo": "Document reducing a previously invoiced amount.",
"debitMemo": "Document increasing a previously invoiced amount.",
"lineLevelCreditMemo": "Line-level credit against a previous invoice.",
"lineLevelDebitMemo": "Line-level debit against a previous invoice."
},
"x-order": 5
},
"operation": {
"type": "string",
"enum": [
"new",
"update",
"delete"
],
"default": "new",
"description": "Whether this creates, updates, or deletes an invoice",
"x-order": 6
},
"invoiceOrigin": {
"type": "string",
"enum": [
"supplier",
"buyer"
],
"description": "Whether invoice was originated by supplier or buyer (ERS)",
"x-order": 7
},
"isInformationOnly": {
"type": "boolean",
"default": false,
"description": "If true, invoice is for information only and no action required",
"x-order": 8
},
"isERS": {
"type": "boolean",
"default": false,
"description": "Evaluated Receipt Settlement invoice",
"x-order": 9
},
"documentReference": {
"type": "object",
"description": "Reference to previous invoice (for credit/debit memos or cancellations)",
"properties": {
"invoiceId": {
"type": "string",
"x-order": 1
},
"invoiceDate": {
"type": "string",
"format": "date-time",
"x-order": 2
},
"documentId": {
"type": "string",
"x-order": 3
},
"payloadId": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 10
},
"poReferences": {
"type": "array",
"description": "Purchase orders being invoiced.",
"items": {
"type": "object",
"required": [
"poNumber"
],
"properties": {
"poNumber": {
"type": "string",
"x-order": 1
},
"poVersion": {
"type": "string",
"x-order": 2
},
"documentId": {
"type": "string",
"x-order": 3
},
"payloadId": {
"type": "string",
"x-order": 4
},
"orderDate": {
"type": "string",
"format": "date-time",
"x-order": 5
}
},
"additionalProperties": false
},
"x-order": 11
},
"asnReference": {
"type": "object",
"description": "Shipment notice reference when invoicing against a dispatched shipment.",
"properties": {
"shipmentId": {
"type": "string",
"x-order": 1
},
"shipmentDate": {
"type": "string",
"format": "date-time",
"x-order": 2
},
"documentId": {
"type": "string",
"x-order": 3
},
"payloadId": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 12
},
"supplier": {
"title": "Party Definition",
"description": "Supplier or seller issuing the invoice.",
"type": "object",
"properties": {
"id": {
"type": "string",
"x-order": 1
},
"name": {
"type": "string",
"x-order": 2
},
"taxRegistrations": {
"type": "array",
"description": "Australian tax registrations for the party",
"items": {
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"ABN"
],
"x-order": 1
},
"value": {
"type": "string",
"x-order": 2
}
},
"additionalProperties": false
},
"x-order": 3
},
"contact": {
"type": "object",
"properties": {
"name": {
"type": "string",
"x-order": 1
},
"phone": {
"type": "string",
"x-order": 2
},
"email": {
"type": "string",
"format": "email",
"x-order": 3
},
"role": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 4
},
"address": {
"title": "Address Definition",
"description": "Standard address structure for DataShift canonical documents",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"addressee",
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false,
"x-order": 5
}
},
"required": [
"id",
"name"
],
"additionalProperties": false,
"x-order": 13
},
"billTo": {
"title": "Address Definition",
"description": "Buyer billing party.",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"addressee",
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false,
"x-order": 14
},
"soldTo": {
"allOf": [
{
"title": "Address Definition",
"description": "Standard address structure for DataShift canonical documents",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"addressee",
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false
}
],
"description": "Sold-to party (may differ from bill-to)",
"x-order": 15
},
"shipTo": {
"title": "Address Definition",
"description": "Standard address structure for DataShift canonical documents",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"addressee",
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false,
"x-order": 16
},
"remitTo": {
"type": "object",
"description": "Address where payment should be sent",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
},
"bankDetails": {
"type": "object",
"properties": {
"bankName": {
"type": "string",
"x-order": 1
},
"accountName": {
"type": "string",
"x-order": 2
},
"accountNumber": {
"type": "string",
"x-order": 3
},
"bsb": {
"type": "string",
"x-order": 4
},
"swift": {
"type": "string",
"x-order": 5
},
"iban": {
"type": "string",
"x-order": 6
}
},
"additionalProperties": false,
"x-order": 9
}
},
"additionalProperties": false,
"x-order": 17
},
"shipping": {
"type": "object",
"description": "Commercial freight charges and instructions for the invoice.",
"properties": {
"amount": {
"type": "number",
"multipleOf": 0.01,
"x-order": 1
},
"currency": {
"title": "Currency Enumeration",
"description": "ISO 4217 currency codes supported by DataShift canonical schemas",
"type": "string",
"enum": [
"AUD"
],
"x-order": 2
},
"carrier": {
"type": "string",
"x-order": 3
},
"route": {
"type": "string",
"x-order": 4
},
"shippingInstructions": {
"type": "string",
"x-order": 5
},
"buyerAcctNumber": {
"type": "string",
"x-order": 6
},
"incoTerms": {
"type": "string",
"enum": [
"cfr",
"cif",
"cip",
"cpt",
"daf",
"dap",
"ddp",
"ddu",
"dpu",
"deq",
"des",
"exw",
"fas",
"fca",
"fob"
],
"x-order": 7
}
},
"additionalProperties": false,
"x-order": 18
},
"shipmentDetails": {
"type": "object",
"description": "Actual dispatch and tracking information for the invoiced goods",
"properties": {
"carrier": {
"type": "string",
"x-order": 1
},
"trackingNumber": {
"type": "string",
"x-order": 2
},
"shippingDate": {
"type": "string",
"format": "date-time",
"x-order": 3
}
},
"additionalProperties": false,
"x-order": 19
},
"paymentTerms": {
"type": "object",
"description": "Payment terms and conditions",
"properties": {
"description": {
"type": "string",
"description": "Human-readable payment terms (e.g., 'Net 30', '2/10 Net 30')",
"x-order": 1
},
"netDays": {
"type": "integer",
"description": "Number of days until payment is due",
"x-order": 2
},
"discountTerms": {
"type": "array",
"description": "Early payment discount tiers",
"items": {
"type": "object",
"properties": {
"discountPercent": {
"type": "number",
"multipleOf": 0.01,
"description": "Discount percentage (e.g., 2 for 2%)",
"x-order": 1
},
"discountDays": {
"type": "integer",
"description": "Days within which discount applies",
"x-order": 2
},
"discountDueDate": {
"type": "string",
"format": "date",
"description": "Specific date by which discount applies",
"x-order": 3
}
},
"additionalProperties": false
},
"x-order": 3
}
},
"additionalProperties": false,
"x-order": 20
},
"contacts": {
"type": "array",
"description": "Contact information for various roles",
"items": {
"type": "object",
"required": [
"role"
],
"properties": {
"role": {
"type": "string",
"enum": [
"issuerOfInvoice",
"soldTo",
"billTo",
"remitTo",
"shipFrom",
"shipTo"
],
"x-order": 1
},
"name": {
"type": "string",
"x-order": 2
},
"email": {
"type": "string",
"format": "email",
"x-order": 3
},
"phone": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false
},
"x-order": 21
},
"comments": {
"type": "string",
"maxLength": 2000,
"description": "Invoice-level comments or notes",
"x-order": 22
},
"lineItems": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": [
"invoiceLineNumber",
"quantity",
"unitPrice",
"subtotal",
"currency"
],
"properties": {
"invoiceLineNumber": {
"type": "integer",
"description": "Supplier's line number for this invoice line.",
"x-order": 1
},
"uniqueLineKey": {
"type": "string",
"description": "DataShift-managed stable line key from the original purchase order.",
"x-datashift-managed": true,
"x-datashift-system": true,
"x-order": 2
},
"poLineReference": {
"type": "integer",
"description": "Line number from the purchase order being invoiced.",
"x-order": 3
},
"asnLineReference": {
"type": "integer",
"description": "Line number from the ship notice",
"x-order": 4
},
"supplierItemId": {
"type": "string",
"description": "Supplier's part/item number",
"x-order": 5
},
"buyerItemId": {
"type": "string",
"description": "Buyer's part/item number",
"x-order": 6
},
"description": {
"type": "string",
"description": "Item description",
"x-order": 7
},
"quantity": {
"type": "number",
"multipleOf": 0.01,
"description": "Quantity invoiced.",
"x-order": 8
},
"unitOfMeasure": {
"title": "REC20 Unit of Measure Codes",
"description": "UN/ECE Recommendation 20 unit of measure codes for DataShift canonical documents",
"type": "string",
"enum": [
"AY",
"BG",
"BL",
"BR",
"BLL",
"E2",
"BO",
"BX",
"BJ",
"BE",
"KA",
"CA",
"CG",
"CT",
"CQ",
"CS",
"CMT",
"CL",
"CH",
"MTQ",
"CY",
"DAY",
"DC",
"DZN",
"DR",
"EA",
"FOT",
"GRM",
"HUR",
"CEN",
"INH",
"JR",
"KGM",
"KMT",
"KT",
"LN",
"LK",
"LTR",
"MTR",
"TNE",
"MLT",
"MMT",
"MON",
"PK",
"PD",
"PL",
"PR",
"D97",
"C62",
"PG",
"LBR",
"RL",
"RO",
"SA",
"SE",
"SET",
"ST",
"SO",
"MTK",
"U3",
"MIL",
"TU",
"WEE"
],
"x-order": 9
},
"unitPrice": {
"type": "number",
"multipleOf": 0.0001,
"description": "Unit price",
"x-order": 10
},
"subtotal": {
"type": "number",
"multipleOf": 0.01,
"description": "Line subtotal before tax and adjustments.",
"x-order": 11
},
"taxAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Tax amount for this line",
"x-order": 12
},
"taxRate": {
"type": "number",
"multipleOf": 0.01,
"description": "Tax rate as percentage (e.g., 10 for 10%)",
"x-order": 13
},
"discountAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Discount amount for this line",
"x-order": 14
},
"shippingAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Shipping charge for this line",
"x-order": 15
},
"grossAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Subtotal + tax + shipping before discounts",
"x-order": 16
},
"netAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Gross amount minus discounts",
"x-order": 17
},
"currency": {
"title": "Currency Enumeration",
"description": "ISO 4217 currency code for this line.",
"type": "string",
"enum": [
"AUD"
],
"x-order": 18
},
"manufacturerPartId": {
"type": "string",
"description": "Manufacturer's part number",
"x-order": 19
},
"manufacturerName": {
"type": "string",
"description": "Manufacturer name",
"x-order": 20
},
"countryOfOrigin": {
"type": "string",
"enum": [
"AU"
],
"description": "Country where item was manufactured",
"x-order": 21
},
"serialNumbers": {
"type": "array",
"items": {
"type": "string"
},
"description": "Serial numbers for serialized items",
"x-order": 22
},
"batchId": {
"type": "string",
"description": "Lot/batch ID",
"x-order": 23
},
"classification": {
"type": "array",
"description": "Product classification codes",
"items": {
"type": "object",
"properties": {
"domain": {
"type": "string",
"enum": [
"UNSPSC",
"HS",
"commodity"
],
"description": "Classification scheme",
"x-order": 1
},
"code": {
"type": "string",
"x-order": 2
}
},
"additionalProperties": false
},
"x-order": 24
},
"comments": {
"type": "string",
"maxLength": 500,
"description": "Line-level comments",
"x-order": 25
}
},
"additionalProperties": false
},
"description": "Invoice lines. DataShift manages uniqueLineKey correlation back to PO and ASN lines where needed.",
"x-order": 23
},
"invoiceSummary": {
"type": "object",
"required": [
"subtotal",
"taxAmount",
"dueAmount",
"currency"
],
"description": "Invoice totals, tax, discounts, and amount due.",
"properties": {
"subtotal": {
"type": "number",
"multipleOf": 0.01,
"description": "Sum of all line subtotals",
"x-order": 1
},
"shippingAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Total shipping charges",
"x-order": 2
},
"specialHandlingAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Special handling charges",
"x-order": 3
},
"taxAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Total tax amount",
"x-order": 4
},
"taxBreakdown": {
"type": "array",
"description": "Tax breakdown by type/jurisdiction",
"items": {
"type": "object",
"properties": {
"taxType": {
"type": "string",
"enum": [
"GST",
"VAT",
"salesTax",
"excise",
"other"
],
"description": "Type of tax",
"x-order": 1
},
"taxRate": {
"type": "number",
"multipleOf": 0.01,
"description": "Tax rate as percentage",
"x-order": 2
},
"taxableAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Amount subject to this tax",
"x-order": 3
},
"taxAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Calculated tax amount",
"x-order": 4
},
"jurisdiction": {
"type": "string",
"description": "Tax jurisdiction (e.g., state, country)",
"x-order": 5
},
"description": {
"type": "string",
"x-order": 6
}
},
"additionalProperties": false
},
"x-order": 5
},
"discountAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Total discount amount",
"x-order": 6
},
"grossAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Subtotal + tax + shipping + handling before discounts",
"x-order": 7
},
"netAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Gross amount minus discounts",
"x-order": 8
},
"depositAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Prepayment/deposit already received",
"x-order": 9
},
"dueAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Amount due (net - deposits)",
"x-order": 10
},
"currency": {
"title": "Currency Enumeration",
"description": "ISO 4217 currency codes supported by DataShift canonical schemas",
"type": "string",
"enum": [
"AUD"
],
"x-order": 11
}
},
"additionalProperties": false,
"x-order": 24
},
"extrinsics": {
"type": "object",
"description": "Partner-specific extension fields that are not part of the canonical core contract.",
"additionalProperties": {
"x-additionalPropertiesName": "extensionField",
"description": "Partner-specific extension value."
},
"x-order": 25
}
},
"additionalProperties": false,
"description": "Business payload for the invoice.",
"x-order": 5
}
},
"additionalProperties": false,
"examples": [
{
"docType": "INV",
"correlationId": "43e7580b-e592-46bb-a3d0-dbf8997758d9",
"timestamp": "2026-05-16T04:00:00Z",
"metadata": {
"sourceLanguage": "cxml",
"sourceVersion": "1.2.067",
"payloadId": "inv-example-10001",
"userAgent": "Example Supplier Gateway"
},
"data": {
"invoiceNumber": "INV-10001",
"poNumber": "PO-10001",
"invoiceDate": "2026-05-16T04:00:00Z",
"dueDate": "2026-06-15T00:00:00Z",
"purpose": "standard",
"poReferences": [
{
"poNumber": "PO-10001",
"poVersion": "1"
}
],
"supplier": {
"id": "SUPPLIER-AU",
"name": "Example Supplier Pty Ltd",
"taxRegistrations": [
{
"type": "ABN",
"value": "98765432109"
}
],
"address": {
"addressee": "Example Supplier Pty Ltd",
"street1": "20 Supplier Street",
"city": "Adelaide",
"state": "SA",
"postalCode": "5000",
"country": "AU"
}
},
"billTo": {
"addressee": "Example Buyer Accounts",
"street1": "1 Market Street",
"city": "Sydney",
"state": "NSW",
"postalCode": "2000",
"country": "AU"
},
"lineItems": [
{
"invoiceLineNumber": 1,
"uniqueLineKey": "PO-10001-1",
"poLineReference": 1,
"supplierItemId": "SUP-001",
"buyerItemId": "BUY-001",
"description": "Example product",
"quantity": 12,
"unitOfMeasure": "EA",
"unitPrice": 25,
"subtotal": 300,
"taxAmount": 30,
"currency": "AUD"
}
],
"invoiceSummary": {
"subtotal": 300,
"taxAmount": 30,
"grossAmount": 330,
"netAmount": 330,
"dueAmount": 330,
"currency": "AUD"
},
"extrinsics": {
"accountsReference": "AP-10001"
}
}
}
]
}1.0.4/edi/contracts/releases/1.0.4/schemas/invoice.schema.json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://docs.datashift.com.au/edi/contracts/releases/1.0.4/schemas/invoice.schema.json",
"title": "Invoice (INV) Canonical Schema",
"description": "Public canonical Invoice contract used to request payment for goods or services supplied against purchase orders and shipments.",
"version": "1.0.4",
"type": "object",
"required": [
"docType",
"correlationId",
"timestamp",
"metadata",
"data"
],
"properties": {
"docType": {
"const": "INV",
"x-datashift-managed": true,
"x-datashift-system": true,
"description": "Canonical document type. For invoices this value is INV.",
"x-order": 1
},
"correlationId": {
"type": "string",
"format": "uuid",
"x-datashift-managed": true,
"x-datashift-system": true,
"description": "Stable UUID used to trace this invoice through order, shipment, and payment workflows.",
"x-order": 2
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "UTC timestamp indicating when DataShift created the canonical invoice.",
"x-datashift-managed": true,
"x-datashift-system": true,
"x-order": 3
},
"metadata": {
"type": "object",
"description": "Public source metadata retained for integration troubleshooting.",
"required": [
"sourceLanguage",
"sourceVersion",
"userAgent"
],
"properties": {
"sourceLanguage": {
"type": "string",
"enum": [
"json",
"cxml"
],
"x-order": 1
},
"sourceVersion": {
"type": "string",
"x-order": 2
},
"payloadId": {
"type": "string",
"description": "Original cXML payload ID",
"x-order": 3
},
"userAgent": {
"type": "string",
"description": "System that generated the document",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 4
},
"data": {
"type": "object",
"required": [
"invoiceNumber",
"poNumber",
"invoiceDate",
"purpose",
"supplier",
"billTo",
"lineItems",
"invoiceSummary"
],
"properties": {
"invoiceNumber": {
"type": "string",
"description": "Supplier-generated invoice number.",
"x-order": 1
},
"poNumber": {
"type": "string",
"description": "Primary purchase order number this invoice bills against.",
"x-order": 2
},
"invoiceDate": {
"type": "string",
"format": "date-time",
"description": "Date and time the supplier issued the invoice.",
"x-order": 3
},
"dueDate": {
"type": "string",
"format": "date-time",
"description": "Payment due date.",
"x-order": 4
},
"purpose": {
"type": "string",
"enum": [
"standard",
"creditMemo",
"debitMemo",
"lineLevelCreditMemo",
"lineLevelDebitMemo"
],
"default": "standard",
"description": "Invoice business purpose.",
"x-enum-descriptions": {
"standard": "Standard invoice requesting payment.",
"creditMemo": "Document reducing a previously invoiced amount.",
"debitMemo": "Document increasing a previously invoiced amount.",
"lineLevelCreditMemo": "Line-level credit against a previous invoice.",
"lineLevelDebitMemo": "Line-level debit against a previous invoice."
},
"x-order": 5
},
"operation": {
"type": "string",
"enum": [
"new",
"update",
"delete"
],
"default": "new",
"description": "Whether this creates, updates, or deletes an invoice",
"x-order": 6
},
"invoiceOrigin": {
"type": "string",
"enum": [
"supplier",
"buyer"
],
"description": "Whether invoice was originated by supplier or buyer (ERS)",
"x-order": 7
},
"isInformationOnly": {
"type": "boolean",
"default": false,
"description": "If true, invoice is for information only and no action required",
"x-order": 8
},
"isERS": {
"type": "boolean",
"default": false,
"description": "Evaluated Receipt Settlement invoice",
"x-order": 9
},
"documentReference": {
"type": "object",
"description": "Reference to previous invoice (for credit/debit memos or cancellations)",
"properties": {
"invoiceId": {
"type": "string",
"x-order": 1
},
"invoiceDate": {
"type": "string",
"format": "date-time",
"x-order": 2
},
"documentId": {
"type": "string",
"x-order": 3
},
"payloadId": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 10
},
"poReferences": {
"type": "array",
"description": "Purchase orders being invoiced.",
"items": {
"type": "object",
"required": [
"poNumber"
],
"properties": {
"poNumber": {
"type": "string",
"x-order": 1
},
"poVersion": {
"type": "string",
"x-order": 2
},
"documentId": {
"type": "string",
"x-order": 3
},
"payloadId": {
"type": "string",
"x-order": 4
},
"orderDate": {
"type": "string",
"format": "date-time",
"x-order": 5
}
},
"additionalProperties": false
},
"x-order": 11
},
"asnReference": {
"type": "object",
"description": "Shipment notice reference when invoicing against a dispatched shipment.",
"properties": {
"shipmentId": {
"type": "string",
"x-order": 1
},
"shipmentDate": {
"type": "string",
"format": "date-time",
"x-order": 2
},
"documentId": {
"type": "string",
"x-order": 3
},
"payloadId": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 12
},
"supplier": {
"title": "Party Definition",
"description": "Supplier or seller issuing the invoice.",
"type": "object",
"properties": {
"id": {
"type": "string",
"x-order": 1
},
"name": {
"type": "string",
"x-order": 2
},
"taxRegistrations": {
"type": "array",
"description": "Australian tax registrations for the party",
"items": {
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"ABN"
],
"x-order": 1
},
"value": {
"type": "string",
"x-order": 2
}
},
"additionalProperties": false
},
"x-order": 3
},
"contact": {
"type": "object",
"properties": {
"name": {
"type": "string",
"x-order": 1
},
"phone": {
"type": "string",
"x-order": 2
},
"email": {
"type": "string",
"format": "email",
"x-order": 3
},
"role": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 4
},
"address": {
"$ref": "./address.def.json",
"x-order": 5
}
},
"required": [
"id",
"name"
],
"additionalProperties": false,
"x-order": 13
},
"billTo": {
"title": "Address Definition",
"description": "Buyer billing party.",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"addressee",
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false,
"x-order": 14
},
"soldTo": {
"allOf": [
{
"title": "Address Definition",
"description": "Standard address structure for DataShift canonical documents",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"addressee",
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false
}
],
"description": "Sold-to party (may differ from bill-to)",
"x-order": 15
},
"shipTo": {
"title": "Address Definition",
"description": "Standard address structure for DataShift canonical documents",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"addressee",
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false,
"x-order": 16
},
"remitTo": {
"type": "object",
"description": "Address where payment should be sent",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
},
"bankDetails": {
"type": "object",
"properties": {
"bankName": {
"type": "string",
"x-order": 1
},
"accountName": {
"type": "string",
"x-order": 2
},
"accountNumber": {
"type": "string",
"x-order": 3
},
"bsb": {
"type": "string",
"x-order": 4
},
"swift": {
"type": "string",
"x-order": 5
},
"iban": {
"type": "string",
"x-order": 6
}
},
"additionalProperties": false,
"x-order": 9
}
},
"additionalProperties": false,
"x-order": 17
},
"shipping": {
"type": "object",
"description": "Commercial freight charges and instructions for the invoice.",
"properties": {
"amount": {
"type": "number",
"multipleOf": 0.01,
"x-order": 1
},
"currency": {
"title": "Currency Enumeration",
"description": "ISO 4217 currency codes supported by DataShift canonical schemas",
"type": "string",
"enum": [
"AUD"
],
"x-order": 2
},
"carrier": {
"type": "string",
"x-order": 3
},
"route": {
"type": "string",
"x-order": 4
},
"shippingInstructions": {
"type": "string",
"x-order": 5
},
"buyerAcctNumber": {
"type": "string",
"x-order": 6
},
"incoTerms": {
"type": "string",
"enum": [
"cfr",
"cif",
"cip",
"cpt",
"daf",
"dap",
"ddp",
"ddu",
"dpu",
"deq",
"des",
"exw",
"fas",
"fca",
"fob"
],
"x-order": 7
}
},
"additionalProperties": false,
"x-order": 18
},
"shipmentDetails": {
"type": "object",
"description": "Actual dispatch and tracking information for the invoiced goods",
"properties": {
"carrier": {
"type": "string",
"x-order": 1
},
"trackingNumber": {
"type": "string",
"x-order": 2
},
"shippingDate": {
"type": "string",
"format": "date-time",
"x-order": 3
}
},
"additionalProperties": false,
"x-order": 19
},
"paymentTerms": {
"type": "object",
"description": "Payment terms and conditions",
"properties": {
"description": {
"type": "string",
"description": "Human-readable payment terms (e.g., 'Net 30', '2/10 Net 30')",
"x-order": 1
},
"netDays": {
"type": "integer",
"description": "Number of days until payment is due",
"x-order": 2
},
"discountTerms": {
"type": "array",
"description": "Early payment discount tiers",
"items": {
"type": "object",
"properties": {
"discountPercent": {
"type": "number",
"multipleOf": 0.01,
"description": "Discount percentage (e.g., 2 for 2%)",
"x-order": 1
},
"discountDays": {
"type": "integer",
"description": "Days within which discount applies",
"x-order": 2
},
"discountDueDate": {
"type": "string",
"format": "date",
"description": "Specific date by which discount applies",
"x-order": 3
}
},
"additionalProperties": false
},
"x-order": 3
}
},
"additionalProperties": false,
"x-order": 20
},
"contacts": {
"type": "array",
"description": "Contact information for various roles",
"items": {
"type": "object",
"required": [
"role"
],
"properties": {
"role": {
"type": "string",
"enum": [
"issuerOfInvoice",
"soldTo",
"billTo",
"remitTo",
"shipFrom",
"shipTo"
],
"x-order": 1
},
"name": {
"type": "string",
"x-order": 2
},
"email": {
"type": "string",
"format": "email",
"x-order": 3
},
"phone": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false
},
"x-order": 21
},
"comments": {
"type": "string",
"maxLength": 2000,
"description": "Invoice-level comments or notes",
"x-order": 22
},
"lineItems": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": [
"invoiceLineNumber",
"quantity",
"unitPrice",
"subtotal",
"currency"
],
"properties": {
"invoiceLineNumber": {
"type": "integer",
"description": "Supplier's line number for this invoice line.",
"x-order": 1
},
"uniqueLineKey": {
"type": "string",
"description": "DataShift-managed stable line key from the original purchase order.",
"x-datashift-managed": true,
"x-datashift-system": true,
"x-order": 2
},
"poLineReference": {
"type": "integer",
"description": "Line number from the purchase order being invoiced.",
"x-order": 3
},
"asnLineReference": {
"type": "integer",
"description": "Line number from the ship notice",
"x-order": 4
},
"supplierItemId": {
"type": "string",
"description": "Supplier's part/item number",
"x-order": 5
},
"buyerItemId": {
"type": "string",
"description": "Buyer's part/item number",
"x-order": 6
},
"description": {
"type": "string",
"description": "Item description",
"x-order": 7
},
"quantity": {
"type": "number",
"multipleOf": 0.01,
"description": "Quantity invoiced.",
"x-order": 8
},
"unitOfMeasure": {
"title": "REC20 Unit of Measure Codes",
"description": "UN/ECE Recommendation 20 unit of measure codes for DataShift canonical documents",
"type": "string",
"enum": [
"AY",
"BG",
"BL",
"BR",
"BLL",
"E2",
"BO",
"BX",
"BJ",
"BE",
"KA",
"CA",
"CG",
"CT",
"CQ",
"CS",
"CMT",
"CL",
"CH",
"MTQ",
"CY",
"DAY",
"DC",
"DZN",
"DR",
"EA",
"FOT",
"GRM",
"HUR",
"CEN",
"INH",
"JR",
"KGM",
"KMT",
"KT",
"LN",
"LK",
"LTR",
"MTR",
"TNE",
"MLT",
"MMT",
"MON",
"PK",
"PD",
"PL",
"PR",
"D97",
"C62",
"PG",
"LBR",
"RL",
"RO",
"SA",
"SE",
"SET",
"ST",
"SO",
"MTK",
"U3",
"MIL",
"TU",
"WEE"
],
"x-order": 9
},
"unitPrice": {
"type": "number",
"multipleOf": 0.0001,
"description": "Unit price",
"x-order": 10
},
"subtotal": {
"type": "number",
"multipleOf": 0.01,
"description": "Line subtotal before tax and adjustments.",
"x-order": 11
},
"taxAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Tax amount for this line",
"x-order": 12
},
"taxRate": {
"type": "number",
"multipleOf": 0.01,
"description": "Tax rate as percentage (e.g., 10 for 10%)",
"x-order": 13
},
"discountAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Discount amount for this line",
"x-order": 14
},
"shippingAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Shipping charge for this line",
"x-order": 15
},
"grossAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Subtotal + tax + shipping before discounts",
"x-order": 16
},
"netAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Gross amount minus discounts",
"x-order": 17
},
"currency": {
"title": "Currency Enumeration",
"description": "ISO 4217 currency code for this line.",
"type": "string",
"enum": [
"AUD"
],
"x-order": 18
},
"manufacturerPartId": {
"type": "string",
"description": "Manufacturer's part number",
"x-order": 19
},
"manufacturerName": {
"type": "string",
"description": "Manufacturer name",
"x-order": 20
},
"countryOfOrigin": {
"type": "string",
"enum": [
"AU"
],
"description": "Country where item was manufactured",
"x-order": 21
},
"serialNumbers": {
"type": "array",
"items": {
"type": "string"
},
"description": "Serial numbers for serialized items",
"x-order": 22
},
"batchId": {
"type": "string",
"description": "Lot/batch ID",
"x-order": 23
},
"classification": {
"type": "array",
"description": "Product classification codes",
"items": {
"type": "object",
"properties": {
"domain": {
"type": "string",
"enum": [
"UNSPSC",
"HS",
"commodity"
],
"description": "Classification scheme",
"x-order": 1
},
"code": {
"type": "string",
"x-order": 2
}
},
"additionalProperties": false
},
"x-order": 24
},
"comments": {
"type": "string",
"maxLength": 500,
"description": "Line-level comments",
"x-order": 25
}
},
"additionalProperties": false
},
"description": "Invoice lines. DataShift manages uniqueLineKey correlation back to PO and ASN lines where needed.",
"x-order": 23
},
"invoiceSummary": {
"type": "object",
"required": [
"subtotal",
"taxAmount",
"dueAmount",
"currency"
],
"description": "Invoice totals, tax, discounts, and amount due.",
"properties": {
"subtotal": {
"type": "number",
"multipleOf": 0.01,
"description": "Sum of all line subtotals",
"x-order": 1
},
"shippingAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Total shipping charges",
"x-order": 2
},
"specialHandlingAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Special handling charges",
"x-order": 3
},
"taxAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Total tax amount",
"x-order": 4
},
"taxBreakdown": {
"type": "array",
"description": "Tax breakdown by type/jurisdiction",
"items": {
"type": "object",
"properties": {
"taxType": {
"type": "string",
"enum": [
"GST",
"VAT",
"salesTax",
"excise",
"other"
],
"description": "Type of tax",
"x-order": 1
},
"taxRate": {
"type": "number",
"multipleOf": 0.01,
"description": "Tax rate as percentage",
"x-order": 2
},
"taxableAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Amount subject to this tax",
"x-order": 3
},
"taxAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Calculated tax amount",
"x-order": 4
},
"jurisdiction": {
"type": "string",
"description": "Tax jurisdiction (e.g., state, country)",
"x-order": 5
},
"description": {
"type": "string",
"x-order": 6
}
},
"additionalProperties": false
},
"x-order": 5
},
"discountAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Total discount amount",
"x-order": 6
},
"grossAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Subtotal + tax + shipping + handling before discounts",
"x-order": 7
},
"netAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Gross amount minus discounts",
"x-order": 8
},
"depositAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Prepayment/deposit already received",
"x-order": 9
},
"dueAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Amount due (net - deposits)",
"x-order": 10
},
"currency": {
"title": "Currency Enumeration",
"description": "ISO 4217 currency codes supported by DataShift canonical schemas",
"type": "string",
"enum": [
"AUD"
],
"x-order": 11
}
},
"additionalProperties": false,
"x-order": 24
},
"extrinsics": {
"type": "object",
"description": "Partner-specific extension fields that are not part of the canonical core contract.",
"additionalProperties": {
"x-additionalPropertiesName": "extensionField",
"description": "Partner-specific extension value."
},
"x-order": 25
}
},
"additionalProperties": false,
"description": "Business payload for the invoice.",
"x-order": 5
}
},
"additionalProperties": false,
"examples": [
{
"docType": "INV",
"correlationId": "43e7580b-e592-46bb-a3d0-dbf8997758d9",
"timestamp": "2026-05-16T04:00:00Z",
"metadata": {
"sourceLanguage": "cxml",
"sourceVersion": "1.2.067",
"payloadId": "inv-example-10001",
"userAgent": "Example Supplier Gateway"
},
"data": {
"invoiceNumber": "INV-10001",
"poNumber": "PO-10001",
"invoiceDate": "2026-05-16T04:00:00Z",
"dueDate": "2026-06-15T00:00:00Z",
"purpose": "standard",
"poReferences": [
{
"poNumber": "PO-10001",
"poVersion": "1"
}
],
"supplier": {
"id": "SUPPLIER-AU",
"name": "Example Supplier Pty Ltd",
"taxRegistrations": [
{
"type": "ABN",
"value": "98765432109"
}
],
"address": {
"addressee": "Example Supplier Pty Ltd",
"street1": "20 Supplier Street",
"city": "Adelaide",
"state": "SA",
"postalCode": "5000",
"country": "AU"
}
},
"billTo": {
"addressee": "Example Buyer Accounts",
"street1": "1 Market Street",
"city": "Sydney",
"state": "NSW",
"postalCode": "2000",
"country": "AU"
},
"lineItems": [
{
"invoiceLineNumber": 1,
"uniqueLineKey": "PO-10001-1",
"poLineReference": 1,
"supplierItemId": "SUP-001",
"buyerItemId": "BUY-001",
"description": "Example product",
"quantity": 12,
"unitOfMeasure": "EA",
"unitPrice": 25,
"subtotal": 300,
"taxAmount": 30,
"currency": "AUD"
}
],
"invoiceSummary": {
"subtotal": 300,
"taxAmount": 30,
"grossAmount": 330,
"netAmount": 330,
"dueAmount": 330,
"currency": "AUD"
},
"extrinsics": {
"accountsReference": "AP-10001"
}
}
}
]
}1.0.3/edi/contracts/releases/1.0.3/schemas/invoice.schema.json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://docs.datashift.com.au/edi/contracts/releases/1.0.3/schemas/invoice.schema.json",
"title": "Invoice (INV) Canonical Schema",
"description": "Public canonical Invoice contract used to request payment for goods or services supplied against purchase orders and shipments.",
"version": "1.0.3",
"type": "object",
"required": [
"docType",
"correlationId",
"timestamp",
"metadata",
"data"
],
"properties": {
"docType": {
"const": "INV",
"x-datashift-managed": true,
"x-datashift-system": true,
"description": "Canonical document type. For invoices this value is INV.",
"x-order": 1
},
"correlationId": {
"type": "string",
"format": "uuid",
"x-datashift-managed": true,
"x-datashift-system": true,
"description": "Stable UUID used to trace this invoice through order, shipment, and payment workflows.",
"x-order": 2
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "UTC timestamp indicating when DataShift created the canonical invoice.",
"x-datashift-managed": true,
"x-datashift-system": true,
"x-order": 3
},
"metadata": {
"type": "object",
"description": "Public source metadata retained for integration troubleshooting.",
"required": [
"sourceLanguage",
"sourceVersion",
"userAgent"
],
"properties": {
"sourceLanguage": {
"type": "string",
"enum": [
"json",
"cxml"
],
"x-order": 1
},
"sourceVersion": {
"type": "string",
"x-order": 2
},
"payloadId": {
"type": "string",
"description": "Original cXML payload ID",
"x-order": 3
},
"userAgent": {
"type": "string",
"description": "System that generated the document",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 4
},
"data": {
"type": "object",
"required": [
"invoiceNumber",
"poNumber",
"invoiceDate",
"purpose",
"supplier",
"billTo",
"lineItems",
"invoiceSummary"
],
"properties": {
"invoiceNumber": {
"type": "string",
"description": "Supplier-generated invoice number.",
"x-order": 1
},
"poNumber": {
"type": "string",
"description": "Primary purchase order number this invoice bills against.",
"x-order": 2
},
"invoiceDate": {
"type": "string",
"format": "date-time",
"description": "Date and time the supplier issued the invoice.",
"x-order": 3
},
"dueDate": {
"type": "string",
"format": "date-time",
"description": "Payment due date.",
"x-order": 4
},
"purpose": {
"type": "string",
"enum": [
"standard",
"creditMemo",
"debitMemo",
"lineLevelCreditMemo",
"lineLevelDebitMemo"
],
"default": "standard",
"description": "Invoice business purpose.",
"x-enum-descriptions": {
"standard": "Standard invoice requesting payment.",
"creditMemo": "Document reducing a previously invoiced amount.",
"debitMemo": "Document increasing a previously invoiced amount.",
"lineLevelCreditMemo": "Line-level credit against a previous invoice.",
"lineLevelDebitMemo": "Line-level debit against a previous invoice."
},
"x-order": 5
},
"operation": {
"type": "string",
"enum": [
"new",
"update",
"delete"
],
"default": "new",
"description": "Whether this creates, updates, or deletes an invoice",
"x-order": 6
},
"invoiceOrigin": {
"type": "string",
"enum": [
"supplier",
"buyer"
],
"description": "Whether invoice was originated by supplier or buyer (ERS)",
"x-order": 7
},
"isInformationOnly": {
"type": "boolean",
"default": false,
"description": "If true, invoice is for information only and no action required",
"x-order": 8
},
"isERS": {
"type": "boolean",
"default": false,
"description": "Evaluated Receipt Settlement invoice",
"x-order": 9
},
"documentReference": {
"type": "object",
"description": "Reference to previous invoice (for credit/debit memos or cancellations)",
"properties": {
"invoiceId": {
"type": "string",
"x-order": 1
},
"invoiceDate": {
"type": "string",
"format": "date-time",
"x-order": 2
},
"documentId": {
"type": "string",
"x-order": 3
},
"payloadId": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 10
},
"poReferences": {
"type": "array",
"description": "Purchase orders being invoiced.",
"items": {
"type": "object",
"required": [
"poNumber"
],
"properties": {
"poNumber": {
"type": "string",
"x-order": 1
},
"poVersion": {
"type": "string",
"x-order": 2
},
"documentId": {
"type": "string",
"x-order": 3
},
"payloadId": {
"type": "string",
"x-order": 4
},
"orderDate": {
"type": "string",
"format": "date-time",
"x-order": 5
}
},
"additionalProperties": false
},
"x-order": 11
},
"asnReference": {
"type": "object",
"description": "Shipment notice reference when invoicing against a dispatched shipment.",
"properties": {
"shipmentId": {
"type": "string",
"x-order": 1
},
"shipmentDate": {
"type": "string",
"format": "date-time",
"x-order": 2
},
"documentId": {
"type": "string",
"x-order": 3
},
"payloadId": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 12
},
"supplier": {
"title": "Party Definition",
"description": "Supplier or seller issuing the invoice.",
"type": "object",
"properties": {
"id": {
"type": "string",
"x-order": 1
},
"name": {
"type": "string",
"x-order": 2
},
"taxRegistrations": {
"type": "array",
"description": "Australian tax registrations for the party",
"items": {
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"ABN"
],
"x-order": 1
},
"value": {
"type": "string",
"x-order": 2
}
},
"additionalProperties": false
},
"x-order": 3
},
"contact": {
"type": "object",
"properties": {
"name": {
"type": "string",
"x-order": 1
},
"phone": {
"type": "string",
"x-order": 2
},
"email": {
"type": "string",
"format": "email",
"x-order": 3
},
"role": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 4
},
"address": {
"$ref": "./address.def.json",
"x-order": 5
}
},
"required": [
"id",
"name"
],
"additionalProperties": false,
"x-order": 13
},
"billTo": {
"title": "Address Definition",
"description": "Buyer billing party.",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"addressee",
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false,
"x-order": 14
},
"soldTo": {
"allOf": [
{
"title": "Address Definition",
"description": "Standard address structure for DataShift canonical documents",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"addressee",
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false
}
],
"description": "Sold-to party (may differ from bill-to)",
"x-order": 15
},
"shipTo": {
"title": "Address Definition",
"description": "Standard address structure for DataShift canonical documents",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
}
},
"required": [
"addressee",
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false,
"x-order": 16
},
"remitTo": {
"type": "object",
"description": "Address where payment should be sent",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"enum": [
"AU"
],
"x-order": 8
},
"bankDetails": {
"type": "object",
"properties": {
"bankName": {
"type": "string",
"x-order": 1
},
"accountName": {
"type": "string",
"x-order": 2
},
"accountNumber": {
"type": "string",
"x-order": 3
},
"bsb": {
"type": "string",
"x-order": 4
},
"swift": {
"type": "string",
"x-order": 5
},
"iban": {
"type": "string",
"x-order": 6
}
},
"additionalProperties": false,
"x-order": 9
}
},
"additionalProperties": false,
"x-order": 17
},
"shipping": {
"type": "object",
"description": "Commercial freight charges and instructions for the invoice.",
"properties": {
"amount": {
"type": "number",
"multipleOf": 0.01,
"x-order": 1
},
"currency": {
"title": "Currency Enumeration",
"description": "ISO 4217 currency codes supported by DataShift canonical schemas",
"type": "string",
"enum": [
"AUD"
],
"x-order": 2
},
"carrier": {
"type": "string",
"x-order": 3
},
"route": {
"type": "string",
"x-order": 4
},
"shippingInstructions": {
"type": "string",
"x-order": 5
},
"buyerAcctNumber": {
"type": "string",
"x-order": 6
},
"incoTerms": {
"type": "string",
"enum": [
"cfr",
"cif",
"cip",
"cpt",
"daf",
"dap",
"ddp",
"ddu",
"dpu",
"deq",
"des",
"exw",
"fas",
"fca",
"fob"
],
"x-order": 7
}
},
"additionalProperties": false,
"x-order": 18
},
"shipmentDetails": {
"type": "object",
"description": "Actual dispatch and tracking information for the invoiced goods",
"properties": {
"carrier": {
"type": "string",
"x-order": 1
},
"trackingNumber": {
"type": "string",
"x-order": 2
},
"shippingDate": {
"type": "string",
"format": "date-time",
"x-order": 3
}
},
"additionalProperties": false,
"x-order": 19
},
"paymentTerms": {
"type": "object",
"description": "Payment terms and conditions",
"properties": {
"description": {
"type": "string",
"description": "Human-readable payment terms (e.g., 'Net 30', '2/10 Net 30')",
"x-order": 1
},
"netDays": {
"type": "integer",
"description": "Number of days until payment is due",
"x-order": 2
},
"discountTerms": {
"type": "array",
"description": "Early payment discount tiers",
"items": {
"type": "object",
"properties": {
"discountPercent": {
"type": "number",
"multipleOf": 0.01,
"description": "Discount percentage (e.g., 2 for 2%)",
"x-order": 1
},
"discountDays": {
"type": "integer",
"description": "Days within which discount applies",
"x-order": 2
},
"discountDueDate": {
"type": "string",
"format": "date",
"description": "Specific date by which discount applies",
"x-order": 3
}
},
"additionalProperties": false
},
"x-order": 3
}
},
"additionalProperties": false,
"x-order": 20
},
"contacts": {
"type": "array",
"description": "Contact information for various roles",
"items": {
"type": "object",
"required": [
"role"
],
"properties": {
"role": {
"type": "string",
"enum": [
"issuerOfInvoice",
"soldTo",
"billTo",
"remitTo",
"shipFrom",
"shipTo"
],
"x-order": 1
},
"name": {
"type": "string",
"x-order": 2
},
"email": {
"type": "string",
"format": "email",
"x-order": 3
},
"phone": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false
},
"x-order": 21
},
"comments": {
"type": "string",
"maxLength": 2000,
"description": "Invoice-level comments or notes",
"x-order": 22
},
"lineItems": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": [
"invoiceLineNumber",
"quantity",
"unitPrice",
"subtotal",
"currency"
],
"properties": {
"invoiceLineNumber": {
"type": "integer",
"description": "Supplier's line number for this invoice line.",
"x-order": 1
},
"uniqueLineKey": {
"type": "string",
"description": "DataShift-managed stable line key from the original purchase order.",
"x-datashift-managed": true,
"x-datashift-system": true,
"x-order": 2
},
"poLineReference": {
"type": "integer",
"description": "Line number from the purchase order being invoiced.",
"x-order": 3
},
"asnLineReference": {
"type": "integer",
"description": "Line number from the ship notice",
"x-order": 4
},
"supplierItemId": {
"type": "string",
"description": "Supplier's part/item number",
"x-order": 5
},
"buyerItemId": {
"type": "string",
"description": "Buyer's part/item number",
"x-order": 6
},
"description": {
"type": "string",
"description": "Item description",
"x-order": 7
},
"quantity": {
"type": "number",
"multipleOf": 0.01,
"description": "Quantity invoiced.",
"x-order": 8
},
"unitOfMeasure": {
"title": "REC20 Unit of Measure Codes",
"description": "UN/ECE Recommendation 20 unit of measure codes for DataShift canonical documents",
"type": "string",
"enum": [
"AY",
"BG",
"BL",
"BR",
"BLL",
"E2",
"BO",
"BX",
"BJ",
"BE",
"KA",
"CA",
"CG",
"CT",
"CQ",
"CS",
"CMT",
"CL",
"CH",
"MTQ",
"CY",
"DAY",
"DC",
"DZN",
"DR",
"EA",
"FOT",
"GRM",
"HUR",
"CEN",
"INH",
"JR",
"KGM",
"KMT",
"KT",
"LN",
"LK",
"LTR",
"MTR",
"TNE",
"MLT",
"MMT",
"MON",
"PK",
"PD",
"PL",
"PR",
"D97",
"C62",
"PG",
"LBR",
"RL",
"RO",
"SA",
"SE",
"SET",
"ST",
"SO",
"MTK",
"U3",
"MIL",
"TU",
"WEE"
],
"x-order": 9
},
"unitPrice": {
"type": "number",
"multipleOf": 0.0001,
"description": "Unit price",
"x-order": 10
},
"subtotal": {
"type": "number",
"multipleOf": 0.01,
"description": "Line subtotal before tax and adjustments.",
"x-order": 11
},
"taxAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Tax amount for this line",
"x-order": 12
},
"taxRate": {
"type": "number",
"multipleOf": 0.01,
"description": "Tax rate as percentage (e.g., 10 for 10%)",
"x-order": 13
},
"discountAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Discount amount for this line",
"x-order": 14
},
"shippingAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Shipping charge for this line",
"x-order": 15
},
"grossAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Subtotal + tax + shipping before discounts",
"x-order": 16
},
"netAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Gross amount minus discounts",
"x-order": 17
},
"currency": {
"title": "Currency Enumeration",
"description": "ISO 4217 currency code for this line.",
"type": "string",
"enum": [
"AUD"
],
"x-order": 18
},
"manufacturerPartId": {
"type": "string",
"description": "Manufacturer's part number",
"x-order": 19
},
"manufacturerName": {
"type": "string",
"description": "Manufacturer name",
"x-order": 20
},
"countryOfOrigin": {
"type": "string",
"enum": [
"AU"
],
"description": "Country where item was manufactured",
"x-order": 21
},
"serialNumbers": {
"type": "array",
"items": {
"type": "string"
},
"description": "Serial numbers for serialized items",
"x-order": 22
},
"batchId": {
"type": "string",
"description": "Lot/batch ID",
"x-order": 23
},
"classification": {
"type": "array",
"description": "Product classification codes",
"items": {
"type": "object",
"properties": {
"domain": {
"type": "string",
"enum": [
"UNSPSC",
"HS",
"commodity"
],
"description": "Classification scheme",
"x-order": 1
},
"code": {
"type": "string",
"x-order": 2
}
},
"additionalProperties": false
},
"x-order": 24
},
"comments": {
"type": "string",
"maxLength": 500,
"description": "Line-level comments",
"x-order": 25
}
},
"additionalProperties": false
},
"description": "Invoice lines. DataShift manages uniqueLineKey correlation back to PO and ASN lines where needed.",
"x-order": 23
},
"invoiceSummary": {
"type": "object",
"required": [
"subtotal",
"taxAmount",
"dueAmount",
"currency"
],
"description": "Invoice totals, tax, discounts, and amount due.",
"properties": {
"subtotal": {
"type": "number",
"multipleOf": 0.01,
"description": "Sum of all line subtotals",
"x-order": 1
},
"shippingAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Total shipping charges",
"x-order": 2
},
"specialHandlingAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Special handling charges",
"x-order": 3
},
"taxAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Total tax amount",
"x-order": 4
},
"taxBreakdown": {
"type": "array",
"description": "Tax breakdown by type/jurisdiction",
"items": {
"type": "object",
"properties": {
"taxType": {
"type": "string",
"enum": [
"GST",
"VAT",
"salesTax",
"excise",
"other"
],
"description": "Type of tax",
"x-order": 1
},
"taxRate": {
"type": "number",
"multipleOf": 0.01,
"description": "Tax rate as percentage",
"x-order": 2
},
"taxableAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Amount subject to this tax",
"x-order": 3
},
"taxAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Calculated tax amount",
"x-order": 4
},
"jurisdiction": {
"type": "string",
"description": "Tax jurisdiction (e.g., state, country)",
"x-order": 5
},
"description": {
"type": "string",
"x-order": 6
}
},
"additionalProperties": false
},
"x-order": 5
},
"discountAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Total discount amount",
"x-order": 6
},
"grossAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Subtotal + tax + shipping + handling before discounts",
"x-order": 7
},
"netAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Gross amount minus discounts",
"x-order": 8
},
"depositAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Prepayment/deposit already received",
"x-order": 9
},
"dueAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Amount due (net - deposits)",
"x-order": 10
},
"currency": {
"title": "Currency Enumeration",
"description": "ISO 4217 currency codes supported by DataShift canonical schemas",
"type": "string",
"enum": [
"AUD"
],
"x-order": 11
}
},
"additionalProperties": false,
"x-order": 24
},
"extrinsics": {
"type": "object",
"description": "Partner-specific extension fields that are not part of the canonical core contract.",
"additionalProperties": {
"x-additionalPropertiesName": "extensionField",
"description": "Partner-specific extension value."
},
"x-order": 25
}
},
"additionalProperties": false,
"description": "Business payload for the invoice.",
"x-order": 5
}
},
"additionalProperties": false,
"examples": [
{
"docType": "INV",
"correlationId": "43e7580b-e592-46bb-a3d0-dbf8997758d9",
"timestamp": "2026-05-16T04:00:00Z",
"metadata": {
"sourceLanguage": "cxml",
"sourceVersion": "1.2.067",
"payloadId": "inv-example-10001",
"userAgent": "Example Supplier Gateway"
},
"data": {
"invoiceNumber": "INV-10001",
"poNumber": "PO-10001",
"invoiceDate": "2026-05-16T04:00:00Z",
"dueDate": "2026-06-15T00:00:00Z",
"purpose": "standard",
"poReferences": [
{
"poNumber": "PO-10001",
"poVersion": "1"
}
],
"supplier": {
"id": "SUPPLIER-AU",
"name": "Example Supplier Pty Ltd",
"taxRegistrations": [
{
"type": "ABN",
"value": "98765432109"
}
],
"address": {
"addressee": "Example Supplier Pty Ltd",
"street1": "20 Supplier Street",
"city": "Adelaide",
"state": "SA",
"postalCode": "5000",
"country": "AU"
}
},
"billTo": {
"addressee": "Example Buyer Accounts",
"street1": "1 Market Street",
"city": "Sydney",
"state": "NSW",
"postalCode": "2000",
"country": "AU"
},
"lineItems": [
{
"invoiceLineNumber": 1,
"uniqueLineKey": "PO-10001-1",
"poLineReference": 1,
"supplierItemId": "SUP-001",
"buyerItemId": "BUY-001",
"description": "Example product",
"quantity": 12,
"unitOfMeasure": "EA",
"unitPrice": 25,
"subtotal": 300,
"taxAmount": 30,
"currency": "AUD"
}
],
"invoiceSummary": {
"subtotal": 300,
"taxAmount": 30,
"grossAmount": 330,
"netAmount": 330,
"dueAmount": 330,
"currency": "AUD"
},
"extrinsics": {
"accountsReference": "AP-10001"
}
}
}
]
}1.0.2/edi/contracts/releases/1.0.2/schemas/invoice.schema.json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://docs.datashift.com.au/edi/contracts/releases/1.0.2/schemas/invoice.schema.json",
"title": "Invoice (INV) Canonical Schema",
"description": "Public canonical Invoice contract used to request payment for goods or services supplied against purchase orders and shipments.",
"version": "1.0.2",
"type": "object",
"required": [
"docType",
"correlationId",
"timestamp",
"metadata",
"data"
],
"properties": {
"docType": {
"type": "string",
"const": "INV",
"description": "Canonical document type. For invoices this value is INV.",
"x-order": 1
},
"correlationId": {
"type": "string",
"format": "uuid",
"x-datashift-managed": true,
"x-datashift-system": true,
"description": "Stable UUID used to trace this invoice through order, shipment, and payment workflows.",
"x-order": 2
},
"timestamp": {
"type": "string",
"format": "date-time",
"x-datashift-managed": true,
"x-datashift-system": true,
"description": "UTC timestamp indicating when DataShift created the canonical invoice.",
"x-order": 3
},
"metadata": {
"type": "object",
"description": "Public source metadata retained for integration troubleshooting.",
"required": [
"sourceLanguage",
"sourceVersion",
"userAgent"
],
"properties": {
"sourceLanguage": {
"type": "string",
"enum": [
"json",
"cxml"
],
"x-order": 1
},
"sourceVersion": {
"type": "string",
"x-order": 2
},
"payloadId": {
"type": "string",
"description": "Original cXML payload ID",
"x-order": 3
},
"userAgent": {
"type": "string",
"description": "System that generated the document",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 4
},
"data": {
"type": "object",
"required": [
"invoiceNumber",
"poNumber",
"invoiceDate",
"purpose",
"supplier",
"billTo",
"lineItems",
"invoiceSummary"
],
"properties": {
"invoiceNumber": {
"type": "string",
"description": "Supplier-generated invoice number.",
"x-order": 1
},
"poNumber": {
"type": "string",
"description": "Primary purchase order number this invoice bills against.",
"x-order": 2
},
"invoiceDate": {
"type": "string",
"format": "date-time",
"description": "Date and time the supplier issued the invoice.",
"x-order": 3
},
"dueDate": {
"type": "string",
"format": "date-time",
"description": "Payment due date.",
"x-order": 4
},
"purpose": {
"type": "string",
"enum": [
"standard",
"creditMemo",
"debitMemo",
"lineLevelCreditMemo",
"lineLevelDebitMemo"
],
"default": "standard",
"description": "Invoice business purpose.",
"x-enum-descriptions": {
"standard": "Standard invoice requesting payment.",
"creditMemo": "Document reducing a previously invoiced amount.",
"debitMemo": "Document increasing a previously invoiced amount.",
"lineLevelCreditMemo": "Line-level credit against a previous invoice.",
"lineLevelDebitMemo": "Line-level debit against a previous invoice."
},
"x-order": 5
},
"operation": {
"type": "string",
"enum": [
"new",
"delete"
],
"default": "new",
"description": "Whether this creates a new invoice or cancels an existing one",
"x-order": 6
},
"invoiceOrigin": {
"type": "string",
"enum": [
"supplier",
"buyer"
],
"description": "Whether invoice was originated by supplier or buyer (ERS)",
"x-order": 7
},
"isInformationOnly": {
"type": "boolean",
"default": false,
"description": "If true, invoice is for information only and no action required",
"x-order": 8
},
"isERS": {
"type": "boolean",
"default": false,
"description": "Evaluated Receipt Settlement invoice",
"x-order": 9
},
"documentReference": {
"type": "object",
"description": "Reference to previous invoice (for credit/debit memos or cancellations)",
"properties": {
"invoiceId": {
"type": "string",
"x-order": 1
},
"invoiceDate": {
"type": "string",
"format": "date-time",
"x-order": 2
},
"documentId": {
"type": "string",
"x-order": 3
},
"payloadId": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 10
},
"poReferences": {
"type": "array",
"description": "Purchase orders being invoiced.",
"items": {
"type": "object",
"required": [
"poNumber"
],
"properties": {
"poNumber": {
"type": "string",
"x-order": 1
},
"poVersion": {
"type": "string",
"x-order": 2
},
"documentId": {
"type": "string",
"x-order": 3
},
"payloadId": {
"type": "string",
"x-order": 4
},
"orderDate": {
"type": "string",
"format": "date-time",
"x-order": 5
}
},
"additionalProperties": false
},
"x-order": 11
},
"asnReference": {
"type": "object",
"description": "Shipment notice reference when invoicing against a dispatched shipment.",
"properties": {
"shipmentId": {
"type": "string",
"x-order": 1
},
"shipmentDate": {
"type": "string",
"format": "date-time",
"x-order": 2
},
"documentId": {
"type": "string",
"x-order": 3
},
"payloadId": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false,
"x-order": 12
},
"supplier": {
"type": "object",
"description": "Supplier or seller issuing the invoice.",
"properties": {
"id": {
"type": "string",
"x-order": 1
},
"name": {
"type": "string",
"x-order": 2
},
"addressee": {
"type": "string",
"x-order": 3
},
"street1": {
"type": "string",
"x-order": 4
},
"street2": {
"type": "string",
"x-order": 5
},
"city": {
"type": "string",
"x-order": 6
},
"state": {
"type": "string",
"x-order": 7
},
"postalCode": {
"type": "string",
"x-order": 8
},
"country": {
"type": "string",
"x-order": 9
},
"taxRegistrations": {
"type": "array",
"description": "Tax registration numbers (VAT, ABN, GST, etc.)",
"items": {
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"VAT",
"ABN",
"GST",
"TIN",
"EIN",
"NZBN",
"ACN"
],
"description": "Type of tax registration",
"x-order": 1
},
"value": {
"type": "string",
"x-order": 2
}
},
"additionalProperties": false
},
"x-order": 10
}
},
"additionalProperties": false,
"x-order": 13
},
"billTo": {
"title": "Address Definition",
"description": "Buyer billing party.",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"x-order": 8
}
},
"required": [
"addressId",
"addressee",
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false,
"x-order": 14
},
"soldTo": {
"allOf": [
{
"title": "Address Definition",
"description": "Standard address structure for DataShift canonical documents",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"x-order": 8
}
},
"required": [
"addressId",
"addressee",
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false
}
],
"description": "Sold-to party (may differ from bill-to)",
"x-order": 15
},
"shipTo": {
"title": "Address Definition",
"description": "Standard address structure for DataShift canonical documents",
"type": "object",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"x-order": 8
}
},
"required": [
"addressId",
"addressee",
"street1",
"city",
"state",
"postalCode",
"country"
],
"additionalProperties": false,
"x-order": 16
},
"remitTo": {
"type": "object",
"description": "Address where payment should be sent",
"properties": {
"addressId": {
"type": "string",
"x-order": 1
},
"addressee": {
"type": "string",
"x-order": 2
},
"street1": {
"type": "string",
"x-order": 3
},
"street2": {
"type": "string",
"x-order": 4
},
"city": {
"type": "string",
"x-order": 5
},
"state": {
"type": "string",
"x-order": 6
},
"postalCode": {
"type": "string",
"x-order": 7
},
"country": {
"type": "string",
"x-order": 8
},
"bankDetails": {
"type": "object",
"properties": {
"bankName": {
"type": "string",
"x-order": 1
},
"accountName": {
"type": "string",
"x-order": 2
},
"accountNumber": {
"type": "string",
"x-order": 3
},
"bsb": {
"type": "string",
"x-order": 4
},
"swift": {
"type": "string",
"x-order": 5
},
"iban": {
"type": "string",
"x-order": 6
}
},
"additionalProperties": false,
"x-order": 9
}
},
"additionalProperties": false,
"x-order": 17
},
"shippingDetails": {
"type": "object",
"description": "Shipping information for the invoiced goods",
"properties": {
"carrier": {
"type": "string",
"x-order": 1
},
"trackingNumber": {
"type": "string",
"x-order": 2
},
"shippingDate": {
"type": "string",
"format": "date-time",
"x-order": 3
}
},
"additionalProperties": false,
"x-order": 18
},
"paymentTerms": {
"type": "object",
"description": "Payment terms and conditions",
"properties": {
"description": {
"type": "string",
"description": "Human-readable payment terms (e.g., 'Net 30', '2/10 Net 30')",
"x-order": 1
},
"netDays": {
"type": "integer",
"description": "Number of days until payment is due",
"x-order": 2
},
"discountTerms": {
"type": "array",
"description": "Early payment discount tiers",
"items": {
"type": "object",
"properties": {
"discountPercent": {
"type": "number",
"multipleOf": 0.01,
"description": "Discount percentage (e.g., 2 for 2%)",
"x-order": 1
},
"discountDays": {
"type": "integer",
"description": "Days within which discount applies",
"x-order": 2
},
"discountDueDate": {
"type": "string",
"format": "date",
"description": "Specific date by which discount applies",
"x-order": 3
}
},
"additionalProperties": false
},
"x-order": 3
}
},
"additionalProperties": false,
"x-order": 19
},
"contacts": {
"type": "array",
"description": "Contact information for various roles",
"items": {
"type": "object",
"required": [
"role"
],
"properties": {
"role": {
"type": "string",
"enum": [
"issuerOfInvoice",
"soldTo",
"billTo",
"remitTo",
"shipFrom",
"shipTo"
],
"x-order": 1
},
"name": {
"type": "string",
"x-order": 2
},
"email": {
"type": "string",
"format": "email",
"x-order": 3
},
"phone": {
"type": "string",
"x-order": 4
}
},
"additionalProperties": false
},
"x-order": 20
},
"comments": {
"type": "string",
"maxLength": 2000,
"description": "Invoice-level comments or notes",
"x-order": 21
},
"lineItems": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": [
"invoiceLineNumber",
"quantity",
"unitPrice",
"subtotal",
"currency"
],
"properties": {
"invoiceLineNumber": {
"type": "integer",
"description": "Supplier's line number for this invoice line.",
"x-order": 1
},
"uniqueLineKey": {
"type": "string",
"description": "DataShift-managed stable line key from the original purchase order.",
"x-datashift-managed": true,
"x-order": 2
},
"poLineReference": {
"type": "integer",
"description": "Line number from the purchase order being invoiced.",
"x-order": 3
},
"asnLineReference": {
"type": "integer",
"description": "Line number from the ship notice",
"x-order": 4
},
"supplierItemId": {
"type": "string",
"description": "Supplier's part/item number",
"x-order": 5
},
"buyerItemId": {
"type": "string",
"description": "Buyer's part/item number",
"x-order": 6
},
"description": {
"type": "string",
"description": "Item description",
"x-order": 7
},
"quantity": {
"type": "number",
"multipleOf": 0.01,
"description": "Quantity invoiced.",
"x-order": 8
},
"unitOfMeasure": {
"title": "REC20 Unit of Measure Codes",
"description": "UN/ECE Recommendation 20 unit of measure codes for DataShift canonical documents",
"type": "string",
"enum": [
"AY",
"BG",
"BL",
"BR",
"BLL",
"E2",
"BO",
"BX",
"BJ",
"BE",
"KA",
"CA",
"CG",
"CT",
"CQ",
"CS",
"CMT",
"CL",
"CH",
"MTQ",
"CY",
"DAY",
"DC",
"DZN",
"DR",
"EA",
"FOT",
"GRM",
"HUR",
"CEN",
"INH",
"JR",
"KGM",
"KMT",
"KT",
"LN",
"LK",
"LTR",
"MTR",
"TNE",
"MLT",
"MMT",
"MON",
"PK",
"PD",
"PL",
"PR",
"D97",
"C62",
"PG",
"LBR",
"RL",
"RO",
"SA",
"SE",
"SET",
"ST",
"SO",
"MTK",
"U3",
"MIL",
"TU",
"WEE"
],
"x-order": 9
},
"unitPrice": {
"type": "number",
"multipleOf": 0.0001,
"description": "Unit price",
"x-order": 10
},
"subtotal": {
"type": "number",
"multipleOf": 0.01,
"description": "Line subtotal before tax and adjustments.",
"x-order": 11
},
"taxAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Tax amount for this line",
"x-order": 12
},
"taxRate": {
"type": "number",
"multipleOf": 0.01,
"description": "Tax rate as percentage (e.g., 10 for 10%)",
"x-order": 13
},
"discountAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Discount amount for this line",
"x-order": 14
},
"shippingAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Shipping charge for this line",
"x-order": 15
},
"grossAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Subtotal + tax + shipping before discounts",
"x-order": 16
},
"netAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Gross amount minus discounts",
"x-order": 17
},
"currency": {
"title": "Currency Enumeration",
"description": "ISO 4217 currency code for this line.",
"type": "string",
"enum": [
"AUD"
],
"x-order": 18
},
"manufacturerPartId": {
"type": "string",
"description": "Manufacturer's part number",
"x-order": 19
},
"manufacturerName": {
"type": "string",
"description": "Manufacturer name",
"x-order": 20
},
"countryOfOrigin": {
"type": "string",
"description": "Country where item was manufactured",
"x-order": 21
},
"serialNumbers": {
"type": "array",
"items": {
"type": "string"
},
"description": "Serial numbers for serialized items",
"x-order": 22
},
"batchId": {
"type": "string",
"description": "Lot/batch ID",
"x-order": 23
},
"classification": {
"type": "array",
"description": "Product classification codes",
"items": {
"type": "object",
"properties": {
"domain": {
"type": "string",
"enum": [
"UNSPSC",
"HS",
"commodity"
],
"description": "Classification scheme",
"x-order": 1
},
"code": {
"type": "string",
"x-order": 2
}
},
"additionalProperties": false
},
"x-order": 24
},
"comments": {
"type": "string",
"maxLength": 500,
"description": "Line-level comments",
"x-order": 25
}
},
"additionalProperties": false
},
"description": "Invoice lines. DataShift manages uniqueLineKey correlation back to PO and ASN lines where needed.",
"x-order": 22
},
"invoiceSummary": {
"type": "object",
"required": [
"subtotal",
"taxAmount",
"dueAmount",
"currency"
],
"description": "Invoice totals, tax, discounts, and amount due.",
"properties": {
"subtotal": {
"type": "number",
"multipleOf": 0.01,
"description": "Sum of all line subtotals",
"x-order": 1
},
"shippingAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Total shipping charges",
"x-order": 2
},
"specialHandlingAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Special handling charges",
"x-order": 3
},
"taxAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Total tax amount",
"x-order": 4
},
"taxBreakdown": {
"type": "array",
"description": "Tax breakdown by type/jurisdiction",
"items": {
"type": "object",
"properties": {
"taxType": {
"type": "string",
"enum": [
"GST",
"VAT",
"salesTax",
"excise",
"other"
],
"description": "Type of tax",
"x-order": 1
},
"taxRate": {
"type": "number",
"multipleOf": 0.01,
"description": "Tax rate as percentage",
"x-order": 2
},
"taxableAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Amount subject to this tax",
"x-order": 3
},
"taxAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Calculated tax amount",
"x-order": 4
},
"jurisdiction": {
"type": "string",
"description": "Tax jurisdiction (e.g., state, country)",
"x-order": 5
},
"description": {
"type": "string",
"x-order": 6
}
},
"additionalProperties": false
},
"x-order": 5
},
"discountAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Total discount amount",
"x-order": 6
},
"grossAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Subtotal + tax + shipping + handling before discounts",
"x-order": 7
},
"netAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Gross amount minus discounts",
"x-order": 8
},
"depositAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Prepayment/deposit already received",
"x-order": 9
},
"dueAmount": {
"type": "number",
"multipleOf": 0.01,
"description": "Amount due (net - deposits)",
"x-order": 10
},
"currency": {
"title": "Currency Enumeration",
"description": "ISO 4217 currency codes supported by DataShift canonical schemas",
"type": "string",
"enum": [
"AUD"
],
"x-order": 11
}
},
"additionalProperties": false,
"x-order": 23
},
"extrinsics": {
"type": "object",
"description": "Partner-specific extension fields that are not part of the canonical core contract.",
"additionalProperties": {
"x-additionalPropertiesName": "extensionField",
"description": "Partner-specific extension value."
},
"x-order": 24
}
},
"additionalProperties": false,
"description": "Business payload for the invoice.",
"x-order": 5
}
},
"additionalProperties": false,
"examples": [
{
"docType": "INV",
"correlationId": "43e7580b-e592-46bb-a3d0-dbf8997758d9",
"timestamp": "2026-05-16T04:00:00Z",
"metadata": {
"sourceLanguage": "cxml",
"sourceVersion": "1.2.067",
"payloadId": "inv-example-10001",
"userAgent": "Example Supplier Gateway"
},
"data": {
"invoiceNumber": "INV-10001",
"poNumber": "PO-10001",
"invoiceDate": "2026-05-16T04:00:00Z",
"dueDate": "2026-06-15T00:00:00Z",
"purpose": "standard",
"poReferences": [
{
"poNumber": "PO-10001",
"poVersion": "1"
}
],
"supplier": {
"id": "SUPPLIER-AU",
"name": "Example Supplier Pty Ltd",
"street1": "20 Supplier Street",
"city": "Adelaide",
"state": "SA",
"postalCode": "5000",
"country": "AU"
},
"billTo": {
"name": "Example Buyer Accounts"
},
"lineItems": [
{
"invoiceLineNumber": 1,
"uniqueLineKey": "PO-10001-1",
"poLineReference": 1,
"supplierItemId": "SUP-001",
"buyerItemId": "BUY-001",
"description": "Example product",
"quantity": 12,
"unitOfMeasure": "EA",
"unitPrice": 25,
"subtotal": 300,
"taxAmount": 30,
"currency": "AUD"
}
],
"invoiceSummary": {
"subtotal": 300,
"taxAmount": 30,
"grossAmount": 330,
"netAmount": 330,
"dueAmount": 330,
"currency": "AUD"
},
"extrinsics": {
"accountsReference": "AP-10001"
}
}
}
]
}1.0.0/edi/contracts/releases/1.0.0/schemas/invoice.schema.json
This historical schema is listed in the channel manifest, but its preview could not be loaded.