Skip to main content

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

Input Parameters

ParameterTypeRequiredDescription
ReturnLoadNoString(25)YesExternal return load code
BranchNoString(25)YesExternal branch code
ReturnLoadDateDataHoraYesLoad date
RoutingDateDataHoraNoLoad assembly date/time
TransporterNoString(25)YesExternal transporter code
DriverNoString(25)YesExternal driver code
VehiclePlateNoString(8)YesVehicle plate
ReplacedTransporterNoString(25)NoExternal replacement transporter code
ReplacedDriverNoString(25)NoExternal replacement driver code
ReplacedVehiclePlateNoString(8)NoReplacement vehicle plate
DispatchingDateDataHoraNoExpected load start date
isBlockedBooleanYesFlag indicating whether the return load will be created with blocked status
NotesString(2000)NoObservation
SalesReturnOrderListAddReturnOrderLoadItemListYesList with all external codes of return orders in the return load
Observation
  • If the RoutingDate parameter is not informed, the date informed in the ReturnLoadDate parameter will be used

📝 AddReturnOrderLoadItemList Object

The AddReturnOrderLoadItemList object represents a sales order in the return load.

Input Parameters

ParametersTypeRequiredDescription
SalesReturnOrderNoString(25)YesExternal return order code of the return load

Return

ParameterTypeRequiredDescription
WebServiceReturnWebServiceReturnYesStandard WebService response information on method execution
ReturnLoadCodeIntegerYesInternal 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

CodeMessage
ARL‑001The provided External Return Load Code parameter (ReturnLoadNo) already exists!
ARL‑002Sales Return Order "[value sent in request]" informed at index [[index code]] belongs to a different return load. Process Aborted!
ARL‑003Sales Return Order "[value sent in request]" informed at index [[index code]] is blocked. Operation not allowed!
ARL‑004The 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‑005External Transporter Code parameter (TransporterNo) belongs to a supplier that is not of type "Transporter". Operation not allowed!
ARL‑006The 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 TypeExample URL
POST{{url_base}}/PostDeleteReturnOrderLoad
Examplehttp://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostDeleteReturnOrder"

Input Parameters

ParameterTypeRequiredDescription
ReturnLoadNoString(25)YesExternal return load code
BranchNoString(25)YesExternal branch code
ErrorIfNotFoundBooleanNoReturns error if the informed return 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/"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

CodeMessage
DRL‑001The 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‑002The truck of the informed Return Load has already been weighed. Operation not allowed!