Skip to main content

Material Type

The PostAddMaterialType endpoint is responsible for registering a new material type in the MIMS system. This registration can be viewed on screen CAD004.


How to register a material type

HTTP POST Request

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

Input Parameters

ParameterTypeRequiredDescription
MaterialTypeNoString(25)YesExternal code of the material type
NameString(40)YesMaterial type name
OverwriteIfExistsBooleanNoFlag indicating that data should be overwritten if the record already exists

Return

ParameterTypeRequiredDescription
WebServiceReturnWebServiceReturnYesStandard WebService response information in method execution
MaterialTypeCodeIntegerYesInternal Material Type code generated in the MIMS system

Request Example

curl --location 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddMaterialType"' \
--header 'Content-Type: application/json' \
--data '{
"MaterialTypeNo": "12345",
"Name": "Tipo Exemplo",
"OverwriteIfExists": true
}'

Response Example

{
"WebServiceReturn": {
"Status": "wrsSuccess",
"ErrorCode": "",
"Message": "",
"Actor": "",
"ReturnQuestion": null
},
"MaterialTypeCode": 29
}

🐞 Possible Errors

CodeMessage
AMT‑001The provided External Material Type Code parameter (MaterialTypeNo) already exists!