Material Subcategory
The PostAddMaterialSubcategory endpoint is responsible for registering a new material subcategory in the MIMS system. This registration can be viewed on screen CAD006.
How to register a material subcategory
HTTP POST Request
| Request Type | Example URL |
|---|---|
| POST | {{url_base}}/PostAddMaterialSubcategory |
| Example | http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddMaterialSubcategory" |
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| MaterialSubcategoryNo | String(25) | Yes | External code of the Material Subcategory |
| Name | String(40) | Yes | Material Subcategory 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 |
| MaterialSubcategoryCode | Integer | Yes | Internal Material Subcategory code generated in the MIMS system |
Request Example
curl --location 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddMaterialSubcategory"' \
--header 'Content-Type: application/json' \
--data '{
"MaterialSubcategoryNo": "SUBCAT123",
"Name": "Subcategoria Exemplo",
"OverwriteIfExists": true
}'
Response Example
{
"WebServiceReturn": {
"Status": "wrsSuccess",
"ErrorCode": "",
"Message": "",
"Actor": "",
"ReturnQuestion": null
},
"MaterialSubcategoryCode": 9
}
🐞 Possible Errors
| Code | Message |
|---|---|
| AMS‑001 | The provided External Material Subcategory Code parameter (MaterialSubcategoryNo) already exists! |