JSON Schema File

ID

https://standards.namm.org/schema/2020.1/invoice.json

Title

Invoice

Description

JSON Schema version of NAMM Invoice 2009.2

Diagram

Drilldown into /properties/InvoiceDetail Drilldown into /properties/InvoiceSummary Drilldown into /properties/InvoiceHeader Drilldown into /definitions/VersionJSON Schema Diagram of /

Value

Object

Properties

Property Name Type Description
Version number Version (common.json)
InvoiceHeader object InvoiceHeader (invoice.json)
InvoiceSummary object InvoiceSummary (invoice.json)
InvoiceDetail object InvoiceDetail (invoice.json)

Source

{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "https://standards.namm.org/schema/2020.1/invoice.json",
    "type": "object",
    "title": "Invoice",
    "description": "JSON Schema version of NAMM Invoice 2009.2",
    "additionalProperties": false,
    "properties": {
        "Version": {
            "$ref": "https://standards.namm.org/schema/2020.1/common.json#/definitions/Version"
        },
        "InvoiceHeader": {
            "type": "object",
            "additionalProperties": {
                "not": {}
            },
            "properties": {
                "Id": {
                    "type": "string",
                    "description": "Document ID",
                    "maxLength": 50
                },
                "Timestamp": {
                    "type": "string",
                    "description": "Date/time stamp for this document",
                    "format": "date-time"
                },
                "SoldTo": {
                    "type": "object",
                    "additionalProperties": {
                        "not": {}
                    },
                    "properties": {
                        "PartyId": {
                            "type": "string",
                            "description": "Buyer GLN/NAMM ID",
                            "maxLength": 25
                        },
                        "Name": {
                            "type": "string",
                            "description": "Buyer company name",
                            "maxLength": 35
                        }
                    },
                    "required": [
                        "PartyId"
                    ]
                },
                "InvoiceId": {
                    "type": "string",
                    "description": "Vendor invoice number",
                    "maxLength": 32
                },
                "InvoiceType": {
                    "type": "string",
                    "description": "Invoice type",
                    "enum": [
                        "C",
                        "D"
                    ]
                },
                "Supplier": {
                    "$ref": "https://standards.namm.org/schema/2020.1/common.json#/definitions/Party"
                },
                "RemitTo": {
                    "$ref": "https://standards.namm.org/schema/2020.1/common.json#/definitions/Party"
                },
                "BillTo": {
                    "$ref": "https://standards.namm.org/schema/2020.1/common.json#/definitions/Party"
                },
                "ShipTo": {
                    "$ref": "https://standards.namm.org/schema/2020.1/common.json#/definitions/Party"
                },
                "CurrencyCode": {
                    "$ref": "https://standards.namm.org/schema/2020.1/common.json#/definitions/CurrencyCode"
                },
                "TermsCode": {
                    "$ref": "https://standards.namm.org/schema/2020.1/common.json#/definitions/TermsCode"
                },
                "TermsDays": {
                    "type": "integer",
                    "description": "Number of days for payment"
                },
                "TermsDate": {
                    "type": "string",
                    "description": "Date payment is due"
                },
                "TermsPercent": {
                    "type": "number",
                    "description": "Percentage terms"
                },
                "TermsPercentDays": {
                    "type": "integer",
                    "description": "Number of days for percentage terms"
                },
                "ShipInstructions": {
                    "type": "string",
                    "description": "Shipping instructions",
                    "maxLength": 250
                },
                "TranspCode": {
                    "$ref": "https://standards.namm.org/schema/2020.1/common.json#/definitions/TranspCode"
                },
                "TranspDesc": {
                    "type": "string",
                    "description": "Transport description",
                    "maxLength": 50
                },
                "TranspCarrier": {
                    "type": "string",
                    "description": "Transport carrier name",
                    "maxLength": 15
                },
                "TranspTime": {
                    "type": "integer",
                    "description": "Expected transport time"
                },
                "TranspTerms": {
                    "type": "string",
                    "description": "Transport terms"
                },
                "IncoTermsCode": {
                    "$ref": "https://standards.namm.org/schema/2020.1/common.json#/definitions/IncoTermsCode"
                },
                "IncoTermsDesc": {
                    "type": "string",
                    "maxLength": 35
                },
                "InvoiceDate": {
                    "type": "string",
                    "description": "Invoice date",
                    "format": "date"
                },
                "InvoiceDueDate": {
                    "type": "string",
                    "description": "Date payment is due",
                    "format": "date"
                },
                "BuyerName": {
                    "type": "string",
                    "description": "Buyer company name",
                    "maxLength": 35
                },
                "SalesRep": {
                    "type": "string",
                    "description": "Supplier sales representative name",
                    "maxLength": 35
                },
                "Comments": {
                    "type": "string",
                    "maxLength": 250
                }
            },
            "required": [
                "Id",
                "Timestamp",
                "SoldTo",
                "InvoiceId",
                "InvoiceType",
                "Supplier",
                "RemitTo",
                "BillTo",
                "ShipTo",
                "TermsCode",
                "InvoiceDate",
                "InvoiceDueDate"
            ]
        },
        "InvoiceSummary": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "TotalItemLines": {
                    "type": "integer",
                    "description": "Invoice number of item lines"
                },
                "TotalItemQty": {
                    "type": "integer",
                    "description": "Invoice item quantity"
                },
                "LineTotal": {
                    "type": "number",
                    "description": "Value of all item lines"
                },
                "FreightTotal": {
                    "type": "number",
                    "description": "Freight total amount"
                },
                "SalesTax": {
                    "type": "number",
                    "description": "Sales tax amount"
                },
                "MiscCharge": {
                    "type": "number",
                    "description": "Miscellaneous charges"
                },
                "InvoiceTotal": {
                    "type": "number",
                    "description": "Total invoice amount"
                }
            },
            "required": [
                "TotalItemLines",
                "TotalItemQty",
                "LineTotal",
                "FreightTotal",
                "SalesTax",
                "MiscCharge",
                "InvoiceTotal"
            ]
        },
        "InvoiceDetail": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "Items": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                        "Item": {
                            "type": "array",
                            "minItems": 1,
                            "items": {
                                "type": "object",
                                "additionalProperties": {
                                    "not": {}
                                },
                                "properties": {
                                    "BuyerOrderId": {
                                        "type": "string",
                                        "description": "Buyer order ID",
                                        "maxLength": 25
                                    },
                                    "SupplierOrderId": {
                                        "type": "string",
                                        "description": "Supplier order ID",
                                        "maxLength": 25
                                    },
                                    "InvoiceLineNbr": {
                                        "type": "integer",
                                        "description": "Invoice item line number"
                                    },
                                    "POLineNbr": {
                                        "type": "integer",
                                        "description": "Purchase Order line number"
                                    },
                                    "BuyerItemId": {
                                        "type": "string",
                                        "description": "Buyer item ID",
                                        "maxLength": 25
                                    },
                                    "Qty": {
                                        "type": "number"
                                    },
                                    "QtyUOM": {
                                        "$ref": "common.json#/definitions/QtyUOM"
                                    },
                                    "UCValue": {
                                        "type": "number",
                                        "description": "Unit cost"
                                    },
                                    "UCCurrencyCode": {
                                        "$ref": "https://standards.namm.org/schema/2020.1/common.json#/definitions/CurrencyCode"
                                    },
                                    "ExtendedCostValue": {
                                        "type": "number",
                                        "description": "Extended cost"
                                    },
                                    "ExtendedCurrencyCode": {
                                        "$ref": "https://standards.namm.org/schema/2020.1/common.json#/definitions/CurrencyCode"
                                    },
                                    "RetailValue": {
                                        "type": "number",
                                        "description": "Unit retail value"
                                    },
                                    "RetailCurrencyCode": {
                                        "$ref": "common.json#/definitions/CurrencyCode"
                                    },
                                    "SupplierItemId": {
                                        "type": "string",
                                        "description": "Supplier item ID",
                                        "maxLength": 25
                                    },
                                    "SupplierItemDesc": {
                                        "type": "string",
                                        "description": "Supplier item description",
                                        "maxLength": 50
                                    },
                                    "PackListNbr": {
                                        "type": "string",
                                        "description": "Packing list number",
                                        "maxLength": 25
                                    },
                                    "ShipmentIds": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "description": "Shipment ID"
                                        }
                                    },
                                    "DateShipped": {
                                        "type": "string",
                                        "description": "Date of shipment",
                                        "format": "date"
                                    },
                                    "BarCodeId": {
                                        "type": "string",
                                        "description": "Digital barcode representation",
                                        "maxLength": 14
                                    },
                                    "BarCodeType": {
                                        "$ref": "https://standards.namm.org/schema/2020.1/common.json#/definitions/BarCodeType"
                                    }
                                },
                                "required": [
                                    "BuyerOrderId",
                                    "SupplierOrderId",
                                    "InvoiceLineNbr",
                                    "POLineNbr",
                                    "BuyerItemId",
                                    "Qty",
                                    "QtyUOM",
                                    "UCValue",
                                    "UCCurrencyCode",
                                    "ExtendedCostValue",
                                    "ExtendedCurrencyCode",
                                    "SupplierItemId",
                                    "SupplierItemDesc",
                                    "ShipmentIds",
                                    "DateShipped",
                                    "BarCodeId",
                                    "BarCodeType"
                                ]
                            }
                        }
                    }
                }
            },
            "required": [
                "Items"
            ]
        }
    },
    "required": []
}
https://standards.namm.org/schema/2020.1/invoice.json (1:2)
Documentation for Invoice
Generated using Liquid Studio 2019 - Data Designer Edition 17.1.14.9682