Adding a New Material (POST)

To create a material, a value for "name" is required in the body of the request. Other material body params are optional. A unique ID for the material will be generated automatically.

Try creating a new material with the following body. If you use alternate lookup codes for materials, you can optionally add some with a line like this:

"codes": ["SampleCode1", "SampleCode2"]
{
    "name": "Sample Material",
    "reOrderPoint": 10,
    "Info1": "This material is for testing."
}

Your response will look a bit like this (without the "codes" array if you didn't add that in):

{
    "material": {
        "name": "Sample Material",
        "codes": [
            "SampleCode2",
            "SampleCode1"
        ],
        "Info2": null,
        "Info1": "example",
        "currentQuantity": 0.0,
        "weightPerUnit": null,
        "canOrderPoint": null,
        "unitOfMeasure": null,
        "Info3": null,
        "expectedQuantity": 0.0,
        "blockReason": null,
        "pickQuantity": 0.0,
        "netQuantity": 0.0,
        "currentValue": 0.0,
        "reOrderPoint": 10.0,
        "materialPropertyId": "F687AB5F-E6F6-48A2-B748-10CE0A6E2C29",
        "isBlocked": 0,
        "Info4": null,
        "putQuantity": 0.0,
        "creationDate": "2022-03-17T19:15:16.067000",
        "id": "EBD286D1-4D5A-41C3-B24A-E62FC1008E57",
        "valuePerUnit": 1.5,
        "Info5": null
    }
}

Copy the ID of the material you just created to use in the next few sections.