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 Type | Example URL |
|---|---|
| POST | {{url_base}}/PostAddMaterialReceiving |
| Example | http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddMaterialReceiving" |
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ReceivingNo | String(25) | Yes | Order code in ERP |
| BranchNo | String(25) | Yes | External code of the branch |
| ReceivingDate | DataHora | Yes | Material receiving date |
| SupplierNo | String(25) | Yes | External code of the supplier |
| DocumentNo | String(20) | Yes | Receiving document number |
| DocumentTypeNo | String(5) | No | Material receiving document type abbreviation |
| PurchaseOrderNo | String(10) | No | Purchase order code in ERP |
| Notes | String(2000) | No | Order notes |
| ItemList | AddMaterialReceivingItemList | Yes | List of material receiving items |
📝 AddMaterialReceivingItemList Object
The AddMaterialReceivingItemList object represents the list of material receiving items.
Input Parameters
Parameter Type Required Description MaterialNo String(25) Yes External code of the material WarehouseNo String(25) No External code of the material receiving warehouse CostCenterNo String(25) No External code of the material cost center Qty Float Yes Material quantity UnitValue Float Yes Material unit value DiscountValue Float No Material discount value SupplierLotNo String(50) No Supplier lot of the material LotNo String(50) No Material lot
Return
| Parameter | Type | Required | Description |
|---|---|---|---|
| WebServiceReturn | WebServiceReturn | Yes | Standard WebService response information in method execution |
| ReceivingCode | Integer | Yes | Internal 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
| Code | Message |
|---|---|
| AMR‑001 | The provided External Material Receiving Code parameter (ReceivingNo) already exists! |
| AMR‑002 | External Supplier Code parameter (SupplierNo) belongs to a supplier that is not of type "Supplier". Operation not allowed! |
| AMR‑003 | Material "[value sent in request]" provided at index [[index code]] does not have a default Warehouse. Operation not allowed! |
| AMR‑004 | Material "[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‑005 | Material "[value sent in request]" provided at index [[index code]] controls Lot Number and the Lot (LotNo) parameter was not provided. Operation not allowed! |
| AMR‑006 | Material movement operation not configured in the database. Operation not allowed! |