Skip to main content

Direct Return


Direct Return Registration

The PostAddDirectReturn endpoint is responsible for registering a new direct product return in the MIMS system and can be viewed through screen EXP005.


How to register a direct product return

HTTP POST Request

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

Input Parameters

ParameterTypeRequiredDescription
DirectReturnNoString(25)YesDirect return code in ERP
BranchNoString(25)YesExternal branch code
DirectReturnDateDataHoraYesDirect return date
DirectReturnReasonNoString(25)NoExternal return reason code
WarehouseNoString(25)NoExternal direct return warehouse code
OverwriteIfExistsBooleanNoFlag indicating that data should be overwritten if the record already exists

Return

ParameterTypeRequiredDescription
WebServiceReturnWebServiceReturnYesStandard WebService response information on method execution
DirectReturnCodeIntegerYesInternal direct return code generated in the MIMS system

Request Example

curl --location 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddDirectReturn"' \
--header 'Content-Type: application/json' \
--data '{
"DirectReturnNo": "DR98765",
"BranchNo": "101",
"DirectReturnDate": "2025-03-10T14:30:00Z",
"DirectReturnReasonNo": "R002",
"WarehouseNo": "WH05",
"OverwriteIfExists": true
}'

Response Example

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

🐞 Possible Errors

CodeMessage
ADR‑001The provided External Direct Return Code parameter (DirectReturnNo) already exists!
ADR‑002The current status of the Direct Return Order ("[return order status]") does not allow changes. Operation not allowed!
ADR‑003The informed Direct Return already has readings. Warehouse modification not allowed!


Direct Return Deletion

The PostDeleteDirectReturn endpoint is responsible for executing the deletion of a direct product return in the MIMS system and can be viewed through EXP026.


How to delete a direct product return

HTTP POST Request

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

Input Parameters

ParameterTypeRequiredDescription
DirectReturnNoString(25)YesDirect return code in ERP
ErrorIfNotFoundBooleanNoReturns error if the informed return does not exist in the database

Return

ParameterTypeRequiredDescription
WebServiceReturnWebServiceReturnYesStandard WebService response information on method execution

Request Example

curl --location 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostDeleteDirectReturn"' \
--header 'Content-Type: application/json' \
--data '{
"DirectReturnNo": "DR98765",
"ErrorIfNotFound": false
}'

Response Example

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

🐞 Possible Errors

CodeMessage
DDR‑001The current status of the informed Direct Return ("[direct return status]") does not allow deletion!