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 Type | Example URL |
|---|---|
| POST | {{url_base}}/PostAddMaterialGroup |
| Example | http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddMaterialGroup" |
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| MaterialGroupNo | String(25) | Yes | External code of the material group |
| Name | String(40) | Yes | Material group description |
| OverwriteIfExists | Boolean | No | Flag indicating that data should be overwritten if the record already exists |
Return
| Parameter | Type | Required | Description |
|---|---|---|---|
| WebServiceReturn | WebServiceReturn | Yes | Standard WebService response information in method execution |
| MaterialGroupCode | Integer | Yes | Internal 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
| Code | Message |
|---|---|
| AMG‑001 | The provided External Material Group Code parameter (MaterialGroupNo) already exists! |