Skip to main content

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

Input Parameters​

ParameterTypeRequiredDescription
MaterialSubcategoryNoString(25)YesExternal code of the Material Subcategory
NameString(40)YesMaterial Subcategory description
OverwriteIfExistsBooleanNoFlag indicating that data should be overwritten if the record already exists

Return​

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

CodeMessage
AMS‑001The provided External Material Subcategory Code parameter (MaterialSubcategoryNo) already exists!