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 |
- The
SalesOrderListparameter is required only when the load is not of grouped type, that is, when theIsLoadGroupparameter is set to false. - The simultaneous use of the
IsDistributionCenterTransferandIsLoadGroupparameters is not allowed (see errorALO-015).
📝 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 |
Load types in MIMS
The PostAddLoad method allows registering different types of load in MIMS:
→ Normal load
Used for the conventional dispatch of sales orders destined for the end customer, representing the most common scenario for creating loads in the system.
- Provide at least one order in the
SalesOrderListproperty. - The
IsDistributionCenterTransferparameter and theIsLoadGroupparameter must remain absent or with a false value. - The load type (
LoadTypeparameter) may vary according to the integration business rule.
Request Example
{
"BranchNo": "0102",
"LoadNo": "LOADTAGAT1",
"LoadDate": "2026-07-21T00:00:00",
"RoutingDate": "2026-07-21T00:00:00",
"DispatchingDate": "2026-07-21T00:00:00",
"VehiclePlateNo": "MFD0E98",
"Blocked": false,
"LoadType": "ltTotalized",
"ShippingType": "sptCarton",
"DriverNo": "1",
"TransporterNo": "033818",
"DistributionCenterNo": "0102",
"SalesOrderList": [
{
"SalesOrderNo": "ABTMPY",
"RecnoSC5": 6430995
}
]
}
→ Transfer loads between distribution centers
- Provide
IsDistributionCenterTransferas true, indicating that it is a transfer load. - Provide the destination distribution center in the
DistributionCenterNoparameter. - Provide the order in
SalesOrderList— transfer loads accept only one sales order (see errorALO-013). - The
IsLoadGroupparameter must remain absent or with a false value.
When the load is not blocked (Blocked = false), it is mandatory to provide DistributionCenterNo and valid transfer configurations must exist.
Request Example
{
"BranchNo": "0102",
"LoadNo": "LOADTAGAT2",
"LoadDate": "2026-07-21T00:00:00",
"RoutingDate": "2026-07-21T00:00:00",
"DispatchingDate": "2026-07-21T00:00:00",
"VehiclePlateNo": "UDV6D02",
"Blocked": false,
"LoadType": "ltSalesOrder",
"ShippingType": "sptCarton",
"DriverNo": "1",
"TransporterNo": "002922",
"IsDistributionCenterTransfer": true,
"DistributionCenterNo": "0102",
"SalesOrderList": [
{
"SalesOrderNo": "ABTSBH",
"RecnoSC5": 6434851
}
]
}
→ Grouping load of other loads
- Provide
IsLoadGroupas true, indicating that it is a grouping load. - The
SalesOrderListproperty must be sent empty, since a grouping load does not have directly linked orders, as its purpose is to group other loads, not to contain orders. - The
IsDistributionCenterTransferparameter must remain absent or with a false value.
- The
LoadGroupNoparameter is used to link a load to an already existing grouping load. The creation process must follow this sequence:
- Create the grouping load, providing
IsLoadGroupas true and sending theSalesOrderListproperty empty, that is, without orders. - Create the loads that will be grouped, providing
IsLoadGroupas false (or omitting this parameter), filling in theSalesOrderListproperty normally and providing the grouping load number in theLoadGroupNoparameter. This way, each created load will be linked to the previously registered grouping load.
Request Example
{
"BranchNo": "0102",
"LoadNo": "LOADTAGAT3",
"LoadDate": "2026-07-19T00:00:00",
"RoutingDate": "2026-07-20T00:00:00",
"DispatchingDate": "2026-07-20T00:00:00",
"VehiclePlateNo": "ATX4F98",
"Blocked": false,
"LoadType": "ltTotalized",
"ShippingType": "sptCarton",
"DriverNo": "1",
"TransporterNo": "033751",
"SalesOrderList": [],
"DistributionCenterNo": "0102",
"IsLoadGroup": true
}
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! |
| ALO‑017 | The informed "VehiclePlateNo" must contain only letters and numbers. Verify the plate format! |
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"! |