- Installation & Setup
- Account & Settings
- Troubleshooting
- API Guides
Articles by Category
Creating & Updating Materials
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.
Body:
{
"name": "Sample Material",
"codes": ["SampleCode1", "SampleCode2"],
"reOrderPoint": 10,
"Info1": "example"
}
Response:
{
"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
}
}
Updating Material info and dynamic fields (POST)
To update a material, pass the material's ID and enter new values for any of the keys. If updating a dynamic field, pass your dynamic field name and value.
- "name" (must be unique)
- "codes" (alternate material lookup codes)
- "materialProperty" or "materialPropertyId"
- "weightPerUnit"
- "valuePerUnit"
- "unitOfMeasure"
- "reOrderPoint"
- "canOrderPoint"
- "blockReason"
- "isBlocked"
- "Info1"
- "Info2"
- "Info3"
- "Info4"
- "Info5"
A sample request looks like this:
curl -L
-X PUT '[Your IP]/api/materials/[ID]'
-H 'Content-Type: application/json'
-H 'Authorization: Bearer [Your JWT Access Token]'
--data-raw '{
"name": "Sample Material",
"info1": "another example",
"materialProperty" : "BASIC"
}'