Material Category
The PostAddMaterialCategory endpoint is responsible for registering a new material category in the MIMS system. This registration can be viewed on screen CAD005.
How to register a material category
HTTP POST Request
| Request Type | Example URL |
|---|---|
| POST | {{url_base}}/PostAddMaterialCategory |
| Example | http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddMaterialCategory" |
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| MaterialCategoryNo | String(25) | Yes | External code of the material category |
| Name | String(40) | Yes | Material category description |
| OverwriteIfExists | Boolean | No | Flag indicating that data should be overwritten if the record already exists |
Return
| Parameter | Type | Required | Description |
|---|---|---|---|
| WebServiceReturn | WebServiceReturn | Yes | Standard WebService response information in method execution |
| MaterialCategoryCode | Integer | Yes | Internal Material Category code generated in the MIMS system |
Request Example
curl --location 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddMaterialCategory"' \
--header 'Content-Type: application/json' \
--data '{
"MaterialCategoryNo": "CAT123",
"Name": "Categoria Exemplo",
"OverwriteIfExists": true
}'
Response Example
{
"WebServiceReturn": {
"Status": "wrsSuccess",
"ErrorCode": "",
"Message": "",
"Actor": "",
"ReturnQuestion": null
},
"MaterialCategoryCode": 41
}
🐞 Possible Errors
| Code | Message |
|---|---|
| ACM‑001 | The provided External Material Category Code parameter (MaterialCategoryNo) already exists! |