JSON models in Supplyit



Address

{
    "ID": number
    "Address1": string,
    "City": string,
    "Zip": string,
    "Phone": "string,
    "Fax": string,
    "Email": string,
    "State": string
}


Contact

{
    "ID": number,
    "Name": string,
    "Code": string,
    "Alias": string,
    "ContactType": ContactTypes,
    "ContactGroup": string,
    "Address": { Address },
    "IsActive": boolean,
    "ContactLocation": { Location }
}


Inventory

{
    "Location": { Location },
    "InventoryStatus": InventoryStatuses,
    "InventoryDate": Date,
    "InventoryItems": [
        { InventoryItem } 
    ],
    "ID": number,
    "ModelVersion": ModelVersion
}


InventoryItem

{
    "Product":{ Product },
    "LotCode": string,
    "UnitsInventoried":number,
    "ID": number
}


Invoice

{
    "InvoiceDate": Date,
    "SupplierLocation": { Location },
    "CustomerLocation": { Location },
    "Location": { Location },
    "Contact" : { Contact },
    "InvoiceTotal": number,
    "InvoiceItems": [
       { InvoiceItem }
    ],
    "ID": number,
    "ModelVersion": ModelVersion
}


InvoiceItem

An invoice item for an order:
{
    "OrderID": number,
    "InvoiceItemType": "OrderItem",
    "InvoiceItemValue": number,
    "ID": number
}

An invoice item for an adjustment:
{
    "InvoiceItemType": "Adjustment",
    "InvoiceItemValue": number,
    "InvoiceItemDescription": string,
    "ID": number
}

Invoice item for a note:
{
    "InvoiceItemType": "Note",
    "InvoiceItemDescription": string,
    "ID": number
}


Location

{
    "ID": number,
    "Name": string,
    "Code": string,
    /* Extended properties */
    "LocationKey": GUID,
    "LocationDescription": string,
    "LocationStatus": LocationStatus,
    "GroupName": string,
    "Address": { Address },
}


Order

{
    "Location": {
       Location
    },
    "Contact": {
        Contact
    },
    "Shift": {
       Shift
    },
    "OrderItems": [
       OrderItem
    ],
    "OrderDate": Date,
    "OrderStatus": OrderStatuses,
    "OrderPrice": number,
    "OrderNotes": string,
    "ID": number,
    "Code": string,
    "ModelVersion": ModelVersion
    "OrderViewType": OrderViewTypes,
    "ExcludeFromForecasting": Boolean
}


OrderItem

{
    "Product": {
       Product
    },
    "UnitsOrdered": number,
    "StartingOrder": number,
    "RelatedAdjustment": number,
    "CustomerCorrection": number,
    "CustomerAdjustment": number,
    "SupplierAdjustment": number,
    "SupplierCorrection": number,
    "UnitsInvoiced": number,
    "UnitPrice": number,
    "ID": number
}


OrderTemplate

{
    "Location": {
        Location
    },
    "Contact": {
        Contact
    },
    "OrderViewType": OrderViewTypes,
    "Shift": {
        Shift
    },
    "OrderTemplateItems":[
        OrderTemplateItem
    ],
    "ID" : number,
    "ModelVersion": ModelVersion,
    "GenerationLeadTime" : Timespan,
    "IsLocked" : boolean
}


OrderTemplateItem

{
    "Product": {
        Product
    },
    "StartDate": Date | null,
    "EndDate": Date | null,
    "IsForecasted": Boolean,
    "SundayQuantity": number,
    "MondayQuantity": number,
    "TuesdayQuantity": number,
    "WednesdayQuantity": number,
    "ThursdayQuantity": number,
    "FridayQuantity": number,
    "SaturdayQuantity": number,
    "WasteMinimum": number
    "WasteFactor": number,
    "SundaySpan": number,
    "MondaySpan": number,
    "TuesdaySpan": number,
    "WednesdaySpan": number,
    "ThursdaySpan": number,
    "FridaySpan": number,
    "SaturdaySpan": number,
    "CalculatorStrategy": string,
    "ID": number
    },
}


Product

{
    "Location": { Location },
    "ID": number,
    "Name": string,
    "Code": string,
    "CatalogName": string (min length: 3),
    "CatalogCode": string,
    "CategoryName": string (min length: 3),
    "CategoryCode": string,
    "DepartmentName": string (min length: 3),
    "DepartmentCode": string,
    "IsActive": Boolean,
    "IsSupplied":Boolean,
    "IsPrepItem": boolean | null,
    "IsDiscrete": Boolean,
    "IsPurchased": Boolean,
    "IsWasted": boolean,
    "RestockLevel": number | null,
    "ParLevel": number | null,
    "ProductionLeadTime": Timespan,
    "ShelfLife": Timespan,
    "UnitOfMeasurement": string,
    "PLU": string,
    "SKU": string,
    "UPC": string,
    "CostStrategy": ProductCostStrategies,
    "PrintEnabled": boolean,
    "PrintName": string,
    "PrintPrice": string,
    "PrinterLabelName": string,
    "PrinterLabelCode": string,
    "Weight": number,
    "WeightUnitName": string,
    "Volume": number,
    "VolumeUnitName": string,
    "ForecastSettingName: string,
    "PrintMultiplierType": PrintMultiplierTypes
}


ProductPricing

Default pricing:
{
    "Location": { Location },
    "Product": { Product  },
    "Contact": { Contact } | null,
    "OrderViewType": OrderViewTypes,
    "StartDate": Date,
    "EndDate": Date | null,
    "UnitPrice": number,
    "ID": number
}

Note: default pricing will have a null contact


ProductRecipe

{
    "Location": { Location },
    "Product": { Product },
    "Ingredients": [ { ProductRecipeIngredient } ],
    "BatchSpecification": string,
    "ExcludeFromProductionResults": boolean,
    "IsGeneric": boolean,
    "IsBatchDependent": boolean,
    "Yield": number,
    "ID": number,
    "ModelVersion": string
}


ProductRecipeIngredient

{
    "Product": { Product },
    "Quantity": number,
    "Weight": number [typically 1],
    "Unit": string,
    "ID": number
}


Shift

{
    "ID": number,
    "Name": string
}


Waste

    {
    "Location": {  Location },
    "WasteStatus": WasteStatuses,
    "WasteDate": Date",
    "Shift": { Shift },
    "WasteItems": [
       { WasteItem }
    ],
    "ID": number,
    "ModelVersion": ModelVersion
}


WasteItem

{
    "Product": {
       Product
    },
    "UnitsWasted": number,
    "ID": number
}



Additional data types

ContactTypes

    Customer  | Supplier


Date

    YYYY-MM-DDTHH:MM:SS
    ISO 8601 date format, e.g. 2016-01-11T00:00:00 for January 11, 2016 at 11:00AM UTC


GUID

    A 128-bit globally unique identifier with groups separated by hyphens
    example: 57f71699-91ec-67b1-8312-e6c235d5a4336


InventoryStatuses

    Open | Closed


InvoiceItemTypes

    OrderItem | Adjustment | Note


LocationStatuses

    Active | Inactive


ModelStates

    Unchanged | ToBeEdited | ToBeDeleted


ModelVersion

    (Base64 representation of a byte[] representing a timestamp)
    e.g. AAAAAAAVF1o=
    This field can typically be left off unless row versioning is desired


OrderViewTypes

    SalesOrder | PurchaseOrder | WorkOrder | RequisitionOrder


OrderStatuses

    Open | Processed | Closed | Invoiced


Timespan

   dd.hh:mm
   Example: 01.10:30 for 1 day, 10 hours, and 30 minutes



WasteStatuses

    Open | Closed


ProductCostStrategies

Manual = 1, MostRecentPurchasePrice = 2, CostOfComponents = 3


PrintMultiplierTypes

"ByProduct", "ByServingsPerProduct"

Did you find it helpful? Yes No

Can you please tell us how we can improve this article?