Skip to main content

Material Classification

The PostAddMaterialClassfication endpoint is responsible for registering a new material classification in the MIMS system. The registration can be viewed on screen CAD018.


How to register a material classification

HTTP POST Request

Request TypeExample URL
POST{{url_base}}/PostAddMaterialClassfication
Examplehttp://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddMaterialClassfication"

Input Parameters

ParameterTypeRequiredDescription
MaterialClassficationNoString(25)YesExternal code of the classification
NameString(40)YesClassification description
MaterialClassficationTypeMaterialClassficationTypeNoEnumerator with possible values for classification type: mcMaterial (Material) or mcService (Service)
OverwriteIfExistsBooleanNoFlag indicating that data should be overwritten if the record already exists

Return

ParameterTypeRequiredDescription
WebServiceReturnWebServiceReturnYesStandard WebService response information in method execution
MaterialClassficationCodeIntegerYesInternal classification code generated in the MIMS system

Request Example

curl --location 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddMaterialClassfication"' \
--header 'Content-Type: application/json' \
--data '{
"MaterialClassficationNo": "CLAS123",
"Name": "Classificação Exemplo",
"MaterialClassficationType": "mcMaterial",
"OverwriteIfExists": true
}'

Response Example

{
"WebServiceReturn": {
"Status": "wrsSuccess",
"ErrorCode": "",
"Message": "",
"Actor": "",
"ReturnQuestion": null
},
"MaterialClassficationCode": 6
}

🐞 Possible Errors

CodeMessage
AMC‑001The provided External Material Classification Code parameter (MaterialClassficationNo) already exists!