Skip to main content

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 TypeExample URL
POST{{url_base}}/PostAddMaterialMaintenance
Examplehttp://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddMaterialMaintenance"

Input Parameters

ParameterTypeRequiredDescription
BranchNoString(25)YesExternal code of the branch
MaterialNoString(25)YesExternal code of the material
MaterialMovementTypeNoString(25)YesExternal code of the movement type
WarehouseNoString(25)YesExternal code of the warehouse
CostCenterNoString(25)NoExternal code of the material cost center
SupplierNoString(25)NoExternal code of the supplier
SupplierLotNoString(50)NoSupplier lot of the material
InternalLotNoString(50)NoInternal lot of the material
UnitMeasurementString(25)NoMaterial unit of measurement abbreviation
ProductionDateDataHoraYesProduction date
ExpirationDateDataHoraYesExpiration date
MaintenanceDateDataHoraYesMaintenance date and time
QtyFloatYesMaterial quantity
NotesString(2000)NoNotes

Return

ParameterTypeRequiredDescription
WebServiceReturnWebServiceReturnYesStandard 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

CodeMessage
MAM‑001The material "[value sent in request]" controls Supplier Lot and the "SupplierLotNo" parameter was not provided. Operation not allowed!
MAM‑002The material "[value sent in request]" controls Lot and the "LotNo" parameter was not provided. Operation not allowed!
MAM‑003The relationship between the material and the warehouse does not exist!
MAM‑004The "SupplierNo" and "SupplierLotNo" parameters must be provided!
MAM‑005Current balance insufficient to post the informed quantity!