Secondary Material
The PostAddMaterialMaintenance endpoint is responsible for registering secondary material maintenance in the MIMS system and can be consulted on screen PRO155.
How to register a secondary material
HTTP POST Request
| Request Type | Example URL |
|---|---|
| POST | {{url_base}}/PostAddMaterialMaintenance |
| Example | http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddMaterialMaintenance" |
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| BranchNo | String(25) | Yes | External code of the branch |
| MaterialNo | String(25) | Yes | External code of the material |
| MaterialMovementTypeNo | String(25) | Yes | External code of the movement type |
| WarehouseNo | String(25) | Yes | External code of the warehouse |
| CostCenterNo | String(25) | No | External code of the material cost center |
| SupplierNo | String(25) | No | External code of the supplier |
| SupplierLotNo | String(50) | No | Supplier lot of the material |
| InternalLotNo | String(50) | No | Internal lot of the material |
| UnitMeasurement | String(25) | No | Material unit of measurement abbreviation |
| ProductionDate | DataHora | Yes | Production date |
| ExpirationDate | DataHora | Yes | Expiration date |
| MaintenanceDate | DataHora | Yes | Maintenance date and time |
| Qty | Float | Yes | Material quantity |
| Notes | String(2000) | No | Notes |
Return
| Parameter | Type | Required | Description |
|---|---|---|---|
| WebServiceReturn | WebServiceReturn | Yes | Standard WebService response information in method execution |
Request Example
curl --location 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddMaterialMaintenance"' \
--header 'Content-Type: application/json' \
--data '{
"BranchNo": "101",
"MaterialNo": "100175",
"MaterialMovementTypeNo": "A16",
"WarehouseNo": "1000101",
"CostCenterNo": "101305001",
"SupplierNo": "100817",
"SupplierLotNo": "SL-2025-000789",
"InternalLotNo": "IL-2025-000456",
"UnitMeasurement": "KG",
"ProductionDate": "2025-03-15T08:30:00",
"ExpirationDate": "2026-03-15T23:59:59",
"MaintenanceDate": "2025-03-15T09:00:00",
"Qty": 1250.75,
"Notes": "Inspecionado e aprovado."
}'
Response Example
{
"WebServiceReturn": {
"Status": "wrsSuccess",
"ErrorCode": "",
"Message": "",
"Actor": "",
"ReturnQuestion": null
}
}
🐞 Possible Errors
| Code | Message |
|---|---|
| MAM‑001 | The material "[value sent in request]" controls Supplier Lot and the "SupplierLotNo" parameter was not provided. Operation not allowed! |
| MAM‑002 | The material "[value sent in request]" controls Lot and the "LotNo" parameter was not provided. Operation not allowed! |
| MAM‑003 | The relationship between the material and the warehouse does not exist! |
| MAM‑004 | The "SupplierNo" and "SupplierLotNo" parameters must be provided! |
| MAM‑005 | Current balance insufficient to post the informed quantity! |