Skip to main content

Material Group

The PostAddMaterialGroup endpoint is responsible for registering a new material group in the MIMS system. The registration can be consulted on screen CAD007.


How to register a material group

HTTP POST Request

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

Input Parameters

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

Return

ParameterTypeRequiredDescription
WebServiceReturnWebServiceReturnYesStandard WebService response information in method execution
MaterialGroupCodeIntegerYesInternal Material Group code generated in the MIMS system

Request Example

curl --location 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddMaterialGroup"' \
--header 'Content-Type: application/json' \
--data '{
"MaterialGroupNo": "12345",
"Name": "Grupo de Material Exemplo",
"OverwriteIfExists": true
}'

Response Example

{
"WebServiceReturn": {
"Status": "wrsSuccess",
"ErrorCode": "",
"Message": "",
"Actor": "",
"ReturnQuestion": null
},
"MaterialGroupCode": 5
}

🐞 Possible Errors

CodeMessage
AMG‑001The provided External Material Group Code parameter (MaterialGroupNo) already exists!