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 Type | Example URL |
|---|---|
| POST | {{url_base}}/PostAddDirectReturn |
| Example | http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddDirectReturn" |
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| DirectReturnNo | String(25) | Yes | Direct return code in ERP |
| BranchNo | String(25) | Yes | External branch code |
| DirectReturnDate | DataHora | Yes | Direct return date |
| DirectReturnReasonNo | String(25) | No | External return reason code |
| WarehouseNo | String(25) | No | External direct return warehouse code |
| OverwriteIfExists | Boolean | No | Flag indicating that data should be overwritten if the record already exists |
Return
| Parameter | Type | Required | Description |
|---|---|---|---|
| WebServiceReturn | WebServiceReturn | Yes | Standard WebService response information on method execution |
| DirectReturnCode | Integer | Yes | Internal 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
| Code | Message |
|---|---|
| ADR‑001 | The provided External Direct Return Code parameter (DirectReturnNo) already exists! |
| ADR‑002 | The current status of the Direct Return Order ("[return order status]") does not allow changes. Operation not allowed! |
| ADR‑003 | The 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 Type | Example URL |
|---|---|
| POST | {{url_base}}/PostDeleteDirectReturn |
| Example | http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostDeleteDirectReturn" |
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| DirectReturnNo | String(25) | Yes | Direct return code in ERP |
| ErrorIfNotFound | Boolean | No | Returns error if the informed return 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/"PostDeleteDirectReturn"' \
--header 'Content-Type: application/json' \
--data '{
"DirectReturnNo": "DR98765",
"ErrorIfNotFound": false
}'
Response Example
{
"WebServiceReturn": {
"Status": "wrsSuccess",
"ErrorCode": "",
"Message": "",
"Actor": "",
"ReturnQuestion": null
}
}
🐞 Possible Errors
| Code | Message |
|---|---|
| DDR‑001 | The current status of the informed Direct Return ("[direct return status]") does not allow deletion! |