Return Load
Return Load Registration
The PostAddReturnOrderLoad endpoint is responsible for registering a new return load in the MIMS system.
How to register a return load
HTTP POST Request
| Request Type | Example URL |
|---|---|
| POST | {{url_base}}/PostAddReturnOrderLoad |
| Example | http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddReturnOrderLoad" |
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ReturnLoadNo | String(25) | Yes | External return load code |
| BranchNo | String(25) | Yes | External branch code |
| ReturnLoadDate | DataHora | Yes | Load date |
| RoutingDate | DataHora | No | Load assembly date/time |
| TransporterNo | String(25) | Yes | External transporter code |
| DriverNo | String(25) | Yes | External driver code |
| VehiclePlateNo | String(8) | Yes | Vehicle plate |
| ReplacedTransporterNo | String(25) | No | External replacement transporter code |
| ReplacedDriverNo | String(25) | No | External replacement driver code |
| ReplacedVehiclePlateNo | String(8) | No | Replacement vehicle plate |
| DispatchingDate | DataHora | No | Expected load start date |
| isBlocked | Boolean | Yes | Flag indicating whether the return load will be created with blocked status |
| Notes | String(2000) | No | Observation |
| SalesReturnOrderList | AddReturnOrderLoadItemList | Yes | List with all external codes of return orders in the return load |
Observation
- If the
RoutingDateparameter is not informed, the date informed in theReturnLoadDateparameter will be used
📝 AddReturnOrderLoadItemList Object
The AddReturnOrderLoadItemList object represents a sales order in the return load.
Input Parameters
Parameters Type Required Description SalesReturnOrderNo String(25) Yes External return order code of the return load
Return
| Parameter | Type | Required | Description |
|---|---|---|---|
| WebServiceReturn | WebServiceReturn | Yes | Standard WebService response information on method execution |
| ReturnLoadCode | Integer | Yes | Internal return load code generated in the MIMS system |
Request Example
curl --location 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddReturnOrderLoad"' \
--header 'Content-Type: application/json' \
--data '{
"ReturnLoadNo": "RL12345",
"BranchNo": "101",
"ReturnLoadDate": "2025-02-07T00:00:00",
"RoutingDate": "2025-02-07T00:00:00",
"TransporterNo": "030703",
"VehiclePlateNo": "GFI2I13",
"ReplacedVehiclePlateNo": "MHW6C93",
"ReplacedTransporterNo": "031771",
"ReplacedDriverNo": "46049853835",
"DriverNo": "27213585886",
"SalesReturnOrderList": [
{
"SalesReturnOrderNo": 2314504
}
],
"DispatchingDate": "2025-02-07T00:00:00",
"isBlocked": false,
"Notes": "Carga Filial 1"
}'
Response Example
{
"WebServiceReturn": {
"Status": "wrsSuccess",
"ErrorCode": "",
"Message": "",
"Actor": "",
"ReturnQuestion": null
},
"ReturnLoadCode": 1001
}
🐞 Possible Errors
| Code | Message |
|---|---|
| ARL‑001 | The provided External Return Load Code parameter (ReturnLoadNo) already exists! |
| ARL‑002 | Sales Return Order "[value sent in request]" informed at index [[index code]] belongs to a different return load. Process Aborted! |
| ARL‑003 | Sales Return Order "[value sent in request]" informed at index [[index code]] is blocked. Operation not allowed! |
| ARL‑004 | The status of Sales Return Order "[value sent in request]" informed at index [[index code]] ("[value sent in request]") is not available for loading. Process Aborted! |
| ARL‑005 | External Transporter Code parameter (TransporterNo) belongs to a supplier that is not of type "Transporter". Operation not allowed! |
| ARL‑006 | The link between transporter x vehicle of the sales return order is different from the link between transporter x vehicle of the return load. Process aborted! |
Return Load Deletion
The PostDeleteReturnOrderLoad endpoint is responsible for executing the deletion of a return load in MIMS.
How to delete a return load
HTTP POST Request
| Request Type | Example URL |
|---|---|
| POST | {{url_base}}/PostDeleteReturnOrderLoad |
| Example | http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostDeleteReturnOrder" |
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ReturnLoadNo | String(25) | Yes | External return load code |
| BranchNo | String(25) | Yes | External branch code |
| ErrorIfNotFound | Boolean | No | Returns error if the informed return 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/"PostDeleteReturnOrderLoad"' \
--header 'Content-Type: application/json' \
--data '{
"ReturnLoadNo": "RL12345",
"BranchNo": "101",
"ErrorIfNotFound": false
}'
Response Example
{
"WebServiceReturn": {
"Status": "wrsSuccess",
"ErrorCode": "",
"Message": "",
"Actor": "",
"ReturnQuestion": null
}
}
🐞 Possible Errors
| Code | Message |
|---|---|
| DRL‑001 | The current status of the informed Return Load ("[value sent in request]") is not available for deletion. The Return Load status must be "[allowed status]" or "[allowed status]"! |
| DRL‑002 | The truck of the informed Return Load has already been weighed. Operation not allowed! |