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 Type | Example URL |
|---|---|
| POST | {{url_base}}/PostAddMaterialClassfication |
| Example | http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddMaterialClassfication" |
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| MaterialClassficationNo | String(25) | Yes | External code of the classification |
| Name | String(40) | Yes | Classification description |
| MaterialClassficationType | MaterialClassficationType | No | Enumerator with possible values for classification type: mcMaterial (Material) or mcService (Service) |
| 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 |
| MaterialClassficationCode | Integer | Yes | Internal 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
| Code | Message |
|---|---|
| AMC‑001 | The provided External Material Classification Code parameter (MaterialClassficationNo) already exists! |