Skip to main content

Material Receiving

The PostAddMaterialReceiving endpoint is responsible for registering a new material receiving in the MIMS system and can be consulted on PRO202.


HTTP POST Request

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

Input Parameters

ParameterTypeRequiredDescription
ReceivingNoString(25)YesOrder code in ERP
BranchNoString(25)YesExternal code of the branch
ReceivingDateDataHoraYesMaterial receiving date
SupplierNoString(25)YesExternal code of the supplier
DocumentNoString(20)YesReceiving document number
DocumentTypeNoString(5)NoMaterial receiving document type abbreviation
PurchaseOrderNoString(10)NoPurchase order code in ERP
NotesString(2000)NoOrder notes
ItemListAddMaterialReceivingItemListYesList of material receiving items

📝 AddMaterialReceivingItemList Object

The AddMaterialReceivingItemList object represents the list of material receiving items.

Input Parameters

ParameterTypeRequiredDescription
MaterialNoString(25)YesExternal code of the material
WarehouseNoString(25)NoExternal code of the material receiving warehouse
CostCenterNoString(25)NoExternal code of the material cost center
QtyFloatYesMaterial quantity
UnitValueFloatYesMaterial unit value
DiscountValueFloatNoMaterial discount value
SupplierLotNoString(50)NoSupplier lot of the material
LotNoString(50)NoMaterial lot

Return

ParameterTypeRequiredDescription
WebServiceReturnWebServiceReturnYesStandard WebService response information in method execution
ReceivingCodeIntegerYesInternal material receiving code generated in the MIMS system

Request Example

curl --location --request POST 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddMaterialReceiving"' \
--header 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{
"ReceivingNo": "REC002",
"BranchNo": "101",
"ReceivingDate": "2025-02-07T14:30:00Z",
"SupplierNo": "F12345",
"DocumentNo": "DOC987654",
"DocumentTypeNo": "NF",
"PurchaseOrderNo": "PO456789",
"Notes": "Entrada de materiais para reposição.",
"ItemList": [
{
"MaterialNo": "1076",
"WarehouseNo": "1000101",
"CostCenterNo": "",
"Qty": 10,
"UnitValue": 15.50,
"DiscountValue": 1.50,
"SupplierLotNo": "SL20250207",
"LotNo": "L20250207"
}
]
}'

Response Example

{
"WebServiceReturn": {
"Status": "wrsSuccess",
"ErrorCode": "",
"Message": "",
"Actor": "",
"ReturnQuestion": null
},
"ReceivingCode": 12345
}

🐞 Possible Errors

CodeMessage
AMR‑001The provided External Material Receiving Code parameter (ReceivingNo) already exists!
AMR‑002External Supplier Code parameter (SupplierNo) belongs to a supplier that is not of type "Supplier". Operation not allowed!
AMR‑003Material "[value sent in request]" provided at index [[index code]] does not have a default Warehouse. Operation not allowed!
AMR‑004Material "[value sent in request]" provided at index [[index code]] controls Supplier Lot Number and the Supplier Lot (SupplierLotNo) parameter was not provided. Operation not allowed!
AMR‑005Material "[value sent in request]" provided at index [[index code]] controls Lot Number and the Lot (LotNo) parameter was not provided. Operation not allowed!
AMR‑006Material movement operation not configured in the database. Operation not allowed!