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 Type | Example URL |
|---|---|
| POST | {{url_base}}/PostAddLoad |
| Example | http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddLoad" |
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| LoadNo | String(25) | Yes | External code of the load |
| BranchNo | String(25) | Yes | External code of the branch |
| LoadDate | DataHora | Yes | Loading date |
| RoutingDate | DataHora | No | Load assembly date/time |
| DispatchingDate | DataHora | No | Expected start date for loading |
| EffectedLoadDate | DataHora | No | Load effectuation date |
| Blocked | Boolean | Yes | Indicates if the load will be created with blocked status |
| VehiclePlateNo | String(8) | Yes | Vehicle plate |
| DriverNo | String(25) | Yes | External code of the driver |
| TransporterNo | String(25) | Yes | External code of the transporter |
| LoadType | LoadType | Yes | Enumerator with possible values for Load Modality: ltTotalized (Totalized), ltMixed (Mixed) or ltSalesOrder (Sales Order) |
| ShippingType | ShippingType | No | Enumerator with possible values for Loading Type: sptCarton (Box), sptPallet (Palletized) or sptMixed (Mixed) |
| ContainerNo | String(25) | No | Container number |
| LoadGroupNo | String(25) | No | External code of the grouped load |
| EffectedLoadUserNo | String(25) | No | External code of the user who effected the load |
| DistributionCenterNo | String(25) | No | External code of the load distribution center |
| IsLoadGroup | Boolean | No | Flag indicating that the load is a grouped load |
| IsDistributionCenterTransfer | Boolean | No | Flag indicating that the load is used for transfer between DCs |
| Notes | String(2000) | No | Notes |
| TransporterNotes | String(2000) | No | Notes for the transporter |
| SalesOrderList | AddLoadSalesOrderItemList | No | List with all external codes of the load orders |
Note
- The
SalesOrderListparameter is required only when the load is not of grouped type, that is, when theIsLoadGroupparameter is set to false.
📝 AddLoadSalesOrderItem Object
The AddLoadSalesOrderItem object represents a sales order in the load.
Input Parameters
Parameter Type Required Description SalesOrderNo String(25) No External code of the sales order in the load SalesOrderCode Integer No Internal code of the sales order in the load
Return
| Parameter | Type | Required | Description |
|---|---|---|---|
| WebServiceReturn | WebServiceReturn | Yes | Standard WebService response information in method execution |
| LoadCode | Integer | Yes | Internal 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
| Code | Message |
|---|---|
| ALO‑001 | The provided External Load Code parameter (LoadNo) already exists! |
| ALO‑002 | Error generating truck scheduling! |
| ALO‑003 | Error generating truck scheduling item! |
| ALO‑004 | The 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‑005 | The External Code of the Grouped Load (LoadGroupNo) does not belong to a Grouped Load. Process Aborted! |
| ALO‑006 | Sales Order "[value sent in request]" informed at index [[index code]] belongs to a different load. Process Aborted! |
| ALO‑007 | Sales Order "[value sent in request]" informed at index [[index code]] is a direct sales order. Operation not allowed! |
| ALO‑008 | Sales Order "[value sent in request]" informed at index [[index code]] is blocked. Operation not allowed! |
| ALO‑009 | The 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‑010 | External Transporter Code parameter (TransporterNo) belongs to a supplier that is not of type "Transporter". Operation not allowed! |
| ALO‑011 | If it is a grouped load, the "LoadGroupNo" parameter should not be provided. Process Aborted! |
| ALO‑012 | Sales Order "[value sent in request]" informed at index [[index code]] was not found! |
| ALO‑013 | Transfer loads between distribution centers cannot contain more than one sales order! |
| ALO‑014 | The load was informed as transfer (parameter IsDistributionCenterTransfer), however, no transfer configurations were found. Process Aborted! |
| ALO‑015 | A transfer load (parameter IsDistributionCenterTransfer) cannot simultaneously be a grouped load (parameter IsLoadGroup)! |
| ALO‑016 | The 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 Type | Example URL |
|---|---|
| POST | {{url_base}}/PostDeleteLoad |
| Example | http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostDeleteLoad" |
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| LoadNo | String(25) | Yes | External code of the load |
| BranchNo | String(25) | Yes | External code of the branch |
| NotVerifyTruckWeighed | Boolean | No | Flag indicating if the truck weighing record verification should be ignored |
| 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 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
| Code | Message |
|---|---|
| DLO‑001 | External Load Code parameter (LoadNo) refers to a Grouped Load and is related to other Loads. Process Aborted! |
| DLO‑002 | The current status of the informed Load ("[value sent in request]") is not available for deletion!. The Load status must be "Open" or "Blocked"! |
| DLO‑003 | There is a loading map for the informed Load. Operation not allowed! |
| DLO‑004 | The truck of the informed Load has already been weighed. Operation not allowed! |
| DLO‑005 | The 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 Type | Example URL |
|---|---|
| POST | {{url_base}}/PostLoadClosure |
| Example | http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostLoadClosure" |
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| LoadNo | String(25) | Yes | External code of the load |
| BranchNo | String(25) | Yes | External code of the branch |
| VehicleTare | Float | No | Vehicle tare |
| VehicleGrossWeight | Float | No | Vehicle gross weight |
| TruckArrivalDate | DataHora | No | Truck arrival date/time |
| TruckDepartureDate | DataHora | No | Truck departure date/time |
| MinTolerance | Float | No | Minimum tolerance |
| MaxTolerance | Float | No | Maximum tolerance |
| ReleaseUserNo | String(25) | No | Release user |
| ReleaseReason | String(50) | No | Release reason |
Return
| Parameter | Type | Required | Description |
|---|---|---|---|
| WebServiceReturn | WebServiceReturn | Yes | Standard 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
| Code | Message |
|---|---|
| LDC‑001 | The 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‑002 | External 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 Type | Example URL |
|---|---|
| POST | {{url_base}}/PostLoadReopening |
| Example | http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostLoadReopening" |
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| LoadNo | String(25) | Yes | External load code |
| BranchNo | String(25) | Yes | External branch code |
| ErrorIfNotClosed | Boolean | No | Returns error if the informed load is not finalized and has been sent to ERP |
Return
| Parameter | Type | Required | Description |
|---|---|---|---|
| WebServiceReturn | WebServiceReturn | Yes | Standard 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
| Code | Message |
|---|---|
| LRP‑001 | The current status of the informed Load ("[value sent in request]") is not available for reopening. The Load status must be "Closed"! |