Product Entrance Load
Product Entrance Load Registration
The PostAddProductEntrance endpoint is responsible for registering a third-party product entrance load in the MIMS system.
How to register a third-party product entrance load
HTTP POST Request
| Request Type | Example URL |
|---|---|
| POST | {{url_base}}/PostAddProductEntrance |
| Example | http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddProductEntrance" |
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| BranchNo | String(25) | Yes | External code in the branch |
| LoadNo | String(25) | Yes | External code of the load |
| LoadDate | DataHora | Yes | Load date |
| LoadMode | LoadMode | Yes | Enumerator with possible values for Loading Mode: ImPurchase (Purchase) or ImTransfer (Transfer) |
| TransporterNo | String(25) | Yes | External code of the transporter |
| DriverNo | String(25) | Yes | External code of the driver |
| LoadCreatedUserNo | String(25) | Yes | External code of the load creation user |
| VehiclePlateNo | String(8) | Yes | Vehicle plate |
| Notes | String(25) | No | Notes |
| ProductEntranceList | AddProductEntrance | Yes | List with load entrances |
📝 AddProductEntrance Object
The AddProductEntrance object represents a product entrance in the load.
Input Parameters
Parameter Type Required Description PurchaseOrderNo String(25) Yes External code of the purchase order in ERP PurchaseOrderDate DataHora Yes Entrance date/time SupplierNo String(25) Yes External code of the supplier DocumentNo String(25) No Document DocumentTypeNo DocumentType No Document type code DocumentDate DataHora No Document issue date/time EntranceOrderNo Integer No Entrance order number Notes String(25) No Notes ProductEntranceItemList AddProductEntranceItem Yes List with entrance products
📝 AddProductEntranceItem Object
The AddProductEntranceItem object represents a product entrance item.
Input Parameters
Parameter Type Required Description ProductNo String(25) Yes External code of the entrance product WarehouseNo String(25) Yes External code of the material entrance warehouse SupplierNo String(25) Yes External code of the supplier CostCenterNo String(25) No External code of the material cost center ProductSupplyContractNo String(25) No External code of the product supply contract Qty Float Yes Quantity of boxes Weight Float No Unit weight per box ProductionDate DataHora No Production date ExpirationDate DataHora No Expiration date SupplierLotNo String(50) Yes Supplier lot of the product UnitValue Float Yes Product unit value DiscountValue Float No Product discount value
Return
| Parameter | Type | Required | Description |
|---|---|---|---|
| WebServiceReturn | WebServiceReturn | Yes | Standard WebService response information in method execution |
| LoadProductEntranceCode | Integer | Yes | Internal product entrance load code generated in the MIMS system |
Request Example
POST http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/PostAddProductEntrance
Content-Type: application/json
{
"BranchNo": "BR001",
"LoadNo": "LOAD123",
"LoadDate": "2025-02-20T12:00:00Z",
"VehiclePlateNo": "ABC1234",
"LoadMode": "ImPurchase",
"TransporterNo": "TRANS001",
"DriverNo": "DRV001",
"LoadCreatedUserNo": "USER001",
"Notes": "Carga de produtos terceirizados",
"ProductEntranceList": [
{
"PurchaseOrderNo": "PO123",
"PurchaseOrderDate": "2025-02-20T10:00:00Z",
"SupplierNo": "SUP001",
"DocumentTypeNo": "Invoice",
"DocumentNo": "DOC123",
"DocumentDate": "2025-02-20T11:00:00Z",
"EntranceOrderNo": 1,
"Notes": "Entrada de produtos frescos",
"ProductEntranceItemList": [
{
"ProductNo": "PROD001",
"WarehouseNo": "WH001",
"SupplierNo": "SUP001",
"CostCenterNo": "CC001",
"ProductSupplyContractNo": "CONTRACT001",
"Qty": 100.0,
"Weight": 15.0,
"ProductionDate": "2025-02-20T09:00:00Z",
"ExpirationDate": "2025-08-20T23:59:59Z",
"SupplierLotNo": "LOT001",
"UnitValue": 25.50,
"DiscountValue": 2.50
}
]
}
]
}
Response Example
{
"WebServiceReturn": {
"Status": "wrsSuccess",
"ErrorCode": "",
"Message": "",
"Actor": "",
"ReturnQuestion": null
},
"LoadProductEntranceCode": 789
}
🐞 Possible Errors
| Code | Message |
|---|---|
| ALP‑001 | The provided External Product Entrance Load Code parameter (LoadProductEntranceNo) already exists! |
Product Entrance Load Deletion
The PostDeleteLoadProductEntrance endpoint deletes a third-party product entrance load.
How to delete a third-party product entrance load
HTTP POST Request
| Request Type | Example URL |
|---|---|
| POST | {{url_base}}/PostDeleteLoadProductEntrance |
| Example | http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostDeleteLoadProductEntrance" |
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| LoadNo | String(25) | Yes | External load code |
| BranchNo | String(25) | Yes | External branch code |
| ErrorIfNotFound | Boolean | No | Returns error if the informed load does not exist in the database |
Return
| Parameter | Type | Required | Description |
|---|---|---|---|
| WebServiceReturn | WebServiceReturn | Yes | Standard WebService response information on method execution |
Request Example
curl --location 'http://localhost:8080/datasnap/rest/RESTWebServiceMethods/"PostDeleteLoadProductEntrance"' \
--header 'Content-Type: application/json' \
--data '{
"BranchNo": "101",
"LoadNo": "1133",
"ErrorIfNotFound": true
}'
Response Example
{
"WebServiceReturn": {
"Status": "wrsSuccess",
"ErrorCode": "",
"Message": "",
"Actor": "",
"ReturnQuestion": null
}
}
🐞 Possible Errors
| Code | Message |
|---|---|
| DLP‑001 | The current status ("[current load status]") of "LoadNo" is not available for deletion. The load status must be "BQ" or "AB"! |
| DLP‑002 | The informed "LoadNo" was not found! |
| DLP‑003 | Deletion not allowed for the informed "LoadNo", as there are linked identifications. |
| DLP‑004 | Deletion not allowed for the informed "LoadNo", as there are linked pallets. |
Close Product Entrance Load
The PostFinishLoadProductEntrance endpoint changes the load status based on validations within the method.
How to change the load status
HTTP POST Request
| Request Type | Example URL |
|---|---|
| POST | {{url_base}}/PostFinishLoadProductEntrance |
| Example | http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostFinishLoadProductEntrance" |
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| LoadNo | String(25) | Yes | External load code |
| BranchNo | String(25) | Yes | External branch code |
| ErrorIfNotFound | Boolean | No | Returns error if the informed load does not exist in the database |
Return
| Parameter | Type | Required | Description |
|---|---|---|---|
| WebServiceReturn | WebServiceReturn | Yes | Standard WebService response information on method execution |
Request Example
curl --location 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostFinishLoadProductEntrance"' \
--header 'Content-Type: application/json' \
--data '{
"LoadNo": "LOAD123",
"BranchNo": "BR001",
"ErrorIfNotFound": true
}'
Response Example
{
"WebServiceReturn": {
"Status": "wrsSuccess",
"ErrorCode": "",
"Message": "",
"Actor": "",
"ReturnQuestion": null
}
}
🐞 Possible Errors
| Code | Message |
|---|---|
| FLP‑001 | The current status ("[current load status]") of the informed "LoadNo" is not allowed to change. The load status must be "FE" or "FD"! |