Skip to main content

Load


Load Registration

The PostAddLoad endpoint registers a new load in the MIMS system and can be viewed on screen TRP003.


How to register a load

HTTP POST Request

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

Input Parameters

ParameterTypeRequiredDescription
LoadNoString(25)YesExternal code of the load
BranchNoString(25)YesExternal code of the branch
LoadDateDataHoraYesLoading date
RoutingDateDataHoraNoLoad assembly date/time
DispatchingDateDataHoraNoExpected start date for loading
EffectedLoadDateDataHoraNoLoad effectuation date
BlockedBooleanYesIndicates if the load will be created with blocked status
VehiclePlateNoString(8)YesVehicle plate
DriverNoString(25)YesExternal code of the driver
TransporterNoString(25)YesExternal code of the transporter
LoadTypeLoadTypeYesEnumerator with possible values for Load Modality: ltTotalized (Totalized), ltMixed (Mixed) or ltSalesOrder (Sales Order)
ShippingTypeShippingTypeNoEnumerator with possible values for Loading Type: sptCarton (Box), sptPallet (Palletized) or sptMixed (Mixed)
ContainerNoString(25)NoContainer number
LoadGroupNoString(25)NoExternal code of the grouped load
EffectedLoadUserNoString(25)NoExternal code of the user who effected the load
DistributionCenterNoString(25)NoExternal code of the load distribution center
IsLoadGroupBooleanNoFlag indicating that the load is a grouped load
IsDistributionCenterTransferBooleanNoFlag indicating that the load is used for transfer between DCs
NotesString(2000)NoNotes
TransporterNotesString(2000)NoNotes for the transporter
SalesOrderListAddLoadSalesOrderItemListNoList with all external codes of the load orders
Note
  • The SalesOrderList parameter is required only when the load is not of grouped type, that is, when the IsLoadGroup parameter is set to false.

📝 AddLoadSalesOrderItem Object

The AddLoadSalesOrderItem object represents a sales order in the load.

Input Parameters

ParameterTypeRequiredDescription
SalesOrderNoString(25)NoExternal code of the sales order in the load
SalesOrderCodeIntegerNoInternal code of the sales order in the load

Return

ParameterTypeRequiredDescription
WebServiceReturnWebServiceReturnYesStandard WebService response information in method execution
LoadCodeIntegerYesInternal load code generated in the MIMS system

Request Example

curl --location 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/PostAddLoad' \
--header 'Content-Type: application/json' \
--data-raw '{
"BranchNo": "BR001",
"LoadDate": "2025-03-10T08:00:00Z",
"RoutingDate": "2025-03-10T07:00:00Z",
"VehiclePlateNo": "ABC1234",
"Blocked": true,
"Notes": "Example load",
"LoadType": "ltTotalized",
"DriverNo": "DRV001",
"TransporterNo": "TRP001",
"ShippingType": "sptPallet",
"ContainerNo": "CONT001",
"LoadGroupNo": "LGR001",
"IsLoadGroup": false,
"SalesOrderList": [
{
"SalesOrderNo": "SO123",
"SalesOrderCode": 456
}
],
"EffectedLoadDate": "2025-03-10T09:00:00Z",
"EffectedLoadUserNo": "USR001"
}'

Response Example

{
"WebServiceReturn": {
"Status": "wrsSuccess",
"ErrorCode": "",
"Message": "",
"Actor": "",
"ReturnQuestion": null
},
"LoadCode": 789
}

🐞 Possible Errors

CodeMessage
ALO‑001The provided External Load Code parameter (LoadNo) already exists!
ALO‑002Error generating truck scheduling!
ALO‑003Error generating truck scheduling item!
ALO‑004The status of the informed Grouped Load (LoadGroupNo) ("[load status sent in request]") is not available. The Grouped Load status must be "Open" or "Blocked"!
ALO‑005The External Code of the Grouped Load (LoadGroupNo) does not belong to a Grouped Load. Process Aborted!
ALO‑006Sales Order "[value sent in request]" informed at index [[index code]] belongs to a different load. Process Aborted!
ALO‑007Sales Order "[value sent in request]" informed at index [[index code]] is a direct sales order. Operation not allowed!
ALO‑008Sales Order "[value sent in request]" informed at index [[index code]] is blocked. Operation not allowed!
ALO‑009The status of Sales Order "[value sent in request]" informed at index [[index code]] ("[linked sales order status]") is not available for loading. Process Aborted!
ALO‑010External Transporter Code parameter (TransporterNo) belongs to a supplier that is not of type "Transporter". Operation not allowed!
ALO‑011If it is a grouped load, the "LoadGroupNo" parameter should not be provided. Process Aborted!
ALO‑012Sales Order "[value sent in request]" informed at index [[index code]] was not found!
ALO‑013Transfer loads between distribution centers cannot contain more than one sales order!
ALO‑014The load was informed as transfer (parameter IsDistributionCenterTransfer), however, no transfer configurations were found. Process Aborted!
ALO‑015A transfer load (parameter IsDistributionCenterTransfer) cannot simultaneously be a grouped load (parameter IsLoadGroup)!
ALO‑016The origin warehouse cannot be the same as the destination warehouse in transfer loads. Process aborted!


Load Deletion

The PostDeleteLoad endpoint is responsible for executing the deletion of a load in the MIMS system.


How to delete a load

HTTP POST Request

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

Input Parameters

ParameterTypeRequiredDescription
LoadNoString(25)YesExternal code of the load
BranchNoString(25)YesExternal code of the branch
NotVerifyTruckWeighedBooleanNoFlag indicating if the truck weighing record verification should be ignored
ErrorIfNotFoundBooleanNoReturns error if the informed load does not exist in the database

Return

ParameterTypeRequiredDescription
WebServiceReturnWebServiceReturnYesStandard WebService response information in method execution

Request Example

curl --location --request POST 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/PostDeleteLoad' \
--header 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{
"LoadNo": "LOAD12345",
"BranchNo": "BR001",
"ErrorIfNotFound": true
}'

Response Example

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

🐞 Possible Errors

CodeMessage
DLO‑001External Load Code parameter (LoadNo) refers to a Grouped Load and is related to other Loads. Process Aborted!
DLO‑002The current status of the informed Load ("[value sent in request]") is not available for deletion!. The Load status must be "Open" or "Blocked"!
DLO‑003There is a loading map for the informed Load. Operation not allowed!
DLO‑004The truck of the informed Load has already been weighed. Operation not allowed!
DLO‑005The informed "LoadNo" is blocked for the logistics team. Operation not allowed!


Load Closure

The PostLoadClosure endpoint is responsible for closing a load in the MIMS system.


How to close a load

HTTP POST Request

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

Input Parameters

ParameterTypeRequiredDescription
LoadNoString(25)YesExternal code of the load
BranchNoString(25)YesExternal code of the branch
VehicleTareFloatNoVehicle tare
VehicleGrossWeightFloatNoVehicle gross weight
TruckArrivalDateDataHoraNoTruck arrival date/time
TruckDepartureDateDataHoraNoTruck departure date/time
MinToleranceFloatNoMinimum tolerance
MaxToleranceFloatNoMaximum tolerance
ReleaseUserNoString(25)NoRelease user
ReleaseReasonString(50)NoRelease reason

Return

ParameterTypeRequiredDescription
WebServiceReturnWebServiceReturnYesStandard WebService response information in method execution

Request Example

curl --location --request POST 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/PostLoadClosure' \
--header 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{
"LoadNo": "LOAD12345",
"BranchNo": "BR001",
"VehicleTare": 15000.5,
"VehicleGrossWeight": 25000.75,
"TruckArrivalDate": "2025-02-07T08:30:00",
"TruckDepartureDate": "2025-02-07T09:45:00",
"MinTolerance": 50.0,
"MaxTolerance": 200.0,
"ReleaseUserNo": "USR001",
"ReleaseReason": "Carga verificada e aprovada"
}'

Response Example

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

🐞 Possible Errors

CodeMessage
LDC‑001The current status of the informed Load ("[value sent in request]") is not available for closure. The Load status must be "Awaiting Weighing" or "Closed"!
LDC‑002External Load Code parameter (LoadNo) refers to a Grouped Load, however one or more Loads are still not closed. Operation not allowed!


Load Reopening / Recomposition

The PostLoadReopening endpoint allows the reopening (recomposition) of a load that has already been closed and sent to ERP.


How to perform load reopening / recomposition

HTTP POST Request

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

Input Parameters

ParameterTypeRequiredDescription
LoadNoString(25)YesExternal load code
BranchNoString(25)YesExternal branch code
ErrorIfNotClosedBooleanNoReturns error if the informed load is not finalized and has been sent to ERP

Return

ParameterTypeRequiredDescription
WebServiceReturnWebServiceReturnYesStandard WebService response information on method execution

Request Example

curl --location 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostLoadReopening"' \
--header 'Content-Type: application/json' \
--data '{
"LoadNo": "LOAD12345",
"BranchNo": "BR001",
"ErrorIfNotClosed": true
}'

Response Example

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

🐞 Possible Errors

CodeMessage
LRP‑001The current status of the informed Load ("[value sent in request]") is not available for reopening. The Load status must be "Closed"!