JSON Material Lot Import Document (MLID)

A JSON material lot import document (MLID) contains all the details of a material lot. The MLID constitutes the body of the HTTP POST request of the ERP Import service, which posts the material to Plant Applications.

Schema versions 4, 3, and 2 are supported in an MLID.

Sometimes, an MLID includes receiver data (represented by "description": "Receiver" in the MLID). The material lot that contains receiver data is considered a receiver. All the remaining material lots in a message are linked to the receiver using genealogy. You can perform inspection on receivers using the Receiving Inspection application in Plant Applications Web Client.

The following conditions apply when you send an MLID:
  • A message can contain only one receiver. However, it is not mandatory to include a receiver in a message.
  • A single unit cannot contain duplicate lot identifiers.
  • The units of measure provided for each material lot in the message must match the units of measure for one of the units in the corresponding inventory line in Plant Applications (which is the default value of the inventory line property). If it does not match or if multiple units have the same units of measure, an error occurs. In addition, for a material lot that does not represent a receiver, this unit must contain the same OrgCode that you will provide in the MLID. To find out the OrgCode, check the OrgCode value in the ExtendedInfo property of the unit in Plant Applications Administrator. If, however, you do not provide the OrgCode, the validation will not happen.

JSON MLID Schema Version 4

Using schema version 4, you can update the status, quantity, and properties of a material lot.
Note: The following sample contains two material lots in which the second one is a receiver.
{
  "schemaVersion": 4,
  "materialLot": [
    {
      "lotIdentifier": "BKC100",
      "productName": "Bike Cassette",
      "quantity": 100,
      "unitOfMeasure": "EA",
      "status": "Open",
      "description": "",
      "propertyValues": [
        {
          "propertyName": "Integer-Property-Name",
          "propertyValue": "12"
        },
        {
          "propertyName": "Float-Property-Name",
          "propertyValue": "12.132"
        },
        {
          "propertyName": "String-Property-Name",
          "propertyValue": "ValidStringValue"
        },
        {
          "propertyName": "String-Property-Name-NULL",
          "propertyValue": ""
        },
        {
          "propertyName": "DateTime-Property-Name",
          "propertyValue": "2019-02-14T14:34:22.666Z"
        }
      ]
    },
    {
      "lotIdentifier": "SLC50",
      "productName": "Speed Light Chain",
      "quantity": 10000,
      "unitOfMeasure": "cm",
      "status": "XYZ",
      "description": "Receiver",
      "propertyValues": [
        {
          "propertyName": "Array-String-Property-Name",
          "propertyValue": "[\"ValidFirstString\", \"ValidSecondString\"]"
        },
        {
          "propertyName": "Array-DateTime-Property-Name",
          "propertyValue": "[\"2019-02-14T14:34:22.666Z\", \"2020-02-14T14:34:22.666Z\"]"
        }
      ]
    }
  ]
}

JSON MLID Schema Versions 2 and 3

  • Schema version 3: You can import material lots and OSP details - providing the status is not mandatory.
  • Schema version 2: You can import material lots and OSP details - providing the status is mandatory.

JSON MLID Using Schema Version 3

{
  "schemaVersion": 3,
  "materialLot": [
    {
      "lotIdentifier": "BKC100",
      "productName": "Bike Cassette",
      "quantity": 100,
      "unitOfMeasure": "EA",
      "description": "",
      "propertyValues": [
        {
          "propertyName": "Integer-Property-Name",
          "propertyValue": "12"
        },
        {
          "propertyName": "Float-Property-Name",
          "propertyValue": "12.132"
        },
        {
          "propertyName": "String-Property-Name",
          "propertyValue": "ValidStringValue"
        },
        {
          "propertyName": "Empty-String-Property-Name",
          "propertyValue": ""
        },
        {
          "propertyName": "DateTime-Property-Name",
          "propertyValue": "2019-02-14T14:34:22.666Z"
        }
      ]
    },
    {
      "lotIdentifier": "SLC50",
      "productName": "Speed Light Chain",
      "quantity": 10000,
      "unitOfMeasure": "cm",
      "description": "Receiver",
      "propertyValues": [
        {
          "propertyName": "Array-String-Property-Name",
          "propertyValue": "[\"ValidFirstString\", \"ValidSecondString\"]"
        },
        {
          "propertyName": "Array-DateTime-Property-Name",
          "propertyValue": "[\"2019-02-14T14:34:22.666Z\", \"2020-02-14T14:34:22.666Z\"]"
        }
      ]
    }
  ]
}

JSON MILD Using Schema Version 2

{
  "schemaVersion": 2,
  "materialLot": [
    {
      "lotIdentifier": "BKC100",
      "productName": "Bike Cassette",
      "quantity": 100,
      "unitOfMeasure": "EA",
      "status": "Open",
      "description": "",
      "propertyValues": [
        {
          "propertyName": "Integer-Property-Name",
          "propertyValue": "12"
        },
        {
          "propertyName": "Float-Property-Name",
          "propertyValue": "12.132"
        },
        {
          "propertyName": "String-Property-Name",
          "propertyValue": "ValidStringValue"
        },
        {
          "propertyName": "String-Property-Name-NULL",
          "propertyValue": ""
        },
        {
          "propertyName": "DateTime-Property-Name",
          "propertyValue": "2019-02-14T14:34:22.666Z"
        }
      ]
    },
    {
      "lotIdentifier": "SLC50",
      "productName": "Speed Light Chain",
      "quantity": 10000,
      "unitOfMeasure": "cm",
      "status": "Open",
      "description": "Receiver",
      "propertyValues": [
        {
          "propertyName": "Array-String-Property-Name",
          "propertyValue": "[\"ValidFirstString\", \"ValidSecondString\"]"
        },
        {
          "propertyName": "Array-DateTime-Property-Name",
          "propertyValue": "[\"2019-02-14T14:34:22.666Z\", \"2020-02-14T14:34:22.666Z\"]"
        }
      ]
    }
  ]
}