Skip to main content

Product Entrance Load


Product Entrance Load Registration​

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

Input Parameters​

ParameterTypeRequiredDescription
BranchNoString(25)YesExternal code in the branch
LoadNoString(25)YesExternal code of the load
LoadDateDataHoraYesLoad date
LoadModeLoadModeYesEnumerator with possible values for Loading Mode: ImPurchase (Purchase) or ImTransfer (Transfer)
TransporterNoString(25)YesExternal code of the transporter
DriverNoString(25)YesExternal code of the driver
LoadCreatedUserNoString(25)YesExternal code of the load creation user
VehiclePlateNoString(8)YesVehicle plate
NotesString(25)NoNotes
ProductEntranceListAddProductEntranceYesList with load entrances

📝 AddProductEntrance Object​

The AddProductEntrance object represents a product entrance in the load.

Input Parameters​

ParameterTypeRequiredDescription
PurchaseOrderNoString(25)YesExternal code of the purchase order in ERP
PurchaseOrderDateDataHoraYesEntrance date/time
SupplierNoString(25)YesExternal code of the supplier
DocumentNoString(25)NoDocument
DocumentTypeNoDocumentTypeNoDocument type code
DocumentDateDataHoraNoDocument issue date/time
EntranceOrderNoIntegerNoEntrance order number
NotesString(25)NoNote
ProductEntranceItemListAddProductEntranceItemYesList with entrance products

📝 AddProductEntranceItem Object​

The AddProductEntranceItem object represents a product entrance item.

Input Parameters​

ParameterTypeRequiredDescription
ProductNoString(25)YesExternal code of the entrance product
WarehouseNoString(25)YesExternal code of the material entrance warehouse
SupplierNoString(25)YesExternal code of the supplier
CostCenterNoString(25)NoExternal code of the material cost center
ProductSupplyContractNoString(25)NoExternal code of the product supply contract
QtyFloatYesQuantity of boxes
WeightFloatNoUnit weight per box
ProductionDateDataHoraNoProduction date
ExpirationDateDataHoraNoExpiration date
SupplierLotNoString(50)YesSupplier lot of the product
UnitValueFloatYesProduct unit value
DiscountValueFloatNoProduct discount value

Return​

ParameterTypeRequiredDescription
WebServiceReturnWebServiceReturnYesStandard WebService response information in method execution
LoadProductEntranceCodeIntegerYesInternal product entrance load code generated in the MIMS system

Request Example​

POST http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/PostAddLoadProductEntrance
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​

CodeMessage
ALP‑001The 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 TypeExample URL
POST{{url_base}}/PostDeleteLoadProductEntrance
Examplehttp://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostDeleteLoadProductEntrance"

Input Parameters​

ParameterTypeRequiredDescription
LoadNoString(25)YesExternal load code
BranchNoString(25)YesExternal branch code
ErrorIfNotFoundBooleanNoReturns error if the informed load does not exist in the database

Return​

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

CodeMessage
DLP‑001The current status ("[current load status]") of "LoadNo" is not available for deletion. The load status must be "BQ" or "AB"!
DLP‑002The informed "LoadNo" was not found!
DLP‑003Deletion not allowed for the informed "LoadNo", as there are linked identifications.
DLP‑004Deletion 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 TypeExample URL
POST{{url_base}}/PostFinishLoadProductEntrance
Examplehttp://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostFinishLoadProductEntrance"

Input Parameters​

ParameterTypeRequiredDescription
LoadNoString(25)YesExternal load code
BranchNoString(25)YesExternal branch code
ErrorIfNotFoundBooleanNoReturns error if the informed load does not exist in the database

Return​

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

CodeMessage
FLP‑001The current status ("[current load status]") of the informed "LoadNo" is not allowed to change. The load status must be "FE" or "FD"!