JSON models in Supplyit

Modified on: 2018-07-06 13:32:47 -0400



Address

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


Catalog

{
  "Name": string,
  "Code": string
}


CatalogItem

{
    "Name": string,
    "Code": string,
    "ID": number,
    "ShelfLife": Timespan
}


Contact

{
    "ID": number,
    "Name": string,
    "Alias": null,
    "ContactType": ContactTypes,
    "ContactGroup": null,
    "Address": { Address },
    "IsActive": true,
    "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 },
    "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

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


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
}


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,
    "ID": number
    },
}


Product

{
    "Location": {
       Location
    },
    "CatalogItem": {
       CatalogItem
    },
    "ID": number
    "Name": string,
    "Code": string,
    "CategoryName": string,
    "DepartmentName": string,
    "CatalogName": string,
    "IsActive": Boolean,
    "IsSupplied":Boolean,
    "RestockLevel": number | null,
    "ParLevel": number | null,
    "ProductionLeadTime": Timespan,
    "IsDiscrete": Boolean,
    "IsPurchased": Boolean,
    "UnitOfMeasurement": string
}


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


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



Did you find it helpful? Yes No

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