Skip to main content

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 TypeExample URL
POST{{url_base}}/PostAddMaterialCategory
Examplehttp://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddMaterialCategory"

Input Parameters​

ParameterTypeRequiredDescription
MaterialCategoryNoString(25)YesExternal code of the material category
NameString(40)YesMaterial category description
OverwriteIfExistsBooleanNoFlag indicating that data should be overwritten if the record already exists

Return​

ParameterTypeRequiredDescription
WebServiceReturnWebServiceReturnYesStandard WebService response information in method execution
MaterialCategoryCodeIntegerYesInternal 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​

CodeMessage
ACM‑001The provided External Material Category Code parameter (MaterialCategoryNo) already exists!