Update Return Order
Update billing information
The PostUpdateInvoiceNoSalesReturnOrder endpoint updates invoice number and billing date in a sales return order in MIMS
How to update invoice number and billing date in return order
HTTP POST Request
| Request Type | Example URL |
|---|---|
| POST | {{url_base}}/PostUpdateInvoiceNoSalesReturnOrder |
| Example | http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostUpdateInvoiceNoSalesReturnOrder" |
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| SalesReturnOrderNo | String(25) | Yes | External sales return order code |
| BranchNo | String(25) | Yes | External branch code |
| InvoiceNo | String(25) | No | Invoice number |
| BillingDateOrder | DataHora | No | Billing date |
| ErrorIfNotFound | Boolean | No | Returns error if the informed order 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/"PostUpdateInvoiceNoSalesReturnOrder"' \
--header 'Content-Type: application/json' \
--data '{
"SalesReturnOrderNo": "249",
"BranchNo": "010",
"InvoiceNo": "0018",
"BillingDateOrder": "2025-07-17T01:00:00",
"ErrorIfNotFound": false
}'
Response Example
{
"WebServiceReturn": {
"Status": "wrsSuccess",
"ErrorCode": "",
"Message": "",
"Actor": "",
"ReturnQuestion": null
}
}
🐞 Possible Errors
| Code | Message |
|---|---|
| UIR‑001 | The Invoice Number cannot be updated for return order ([value sent in request]) of type Leftovers. Process aborted! |
Update invoice number and dispatched quantities
The PostUpdateInvoiceToTransporterReturnOrder endpoint updates invoice data and adjusts ERP dispatched quantities in a sales return order in the MIMS system.
How to update invoice number and dispatched quantities in return order
HTTP POST Request
| Request Type | Example URL |
|---|---|
| POST | {{url_base}}/PostUpdateInvoiceToTransporterReturnOrder |
| Example | http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostUpdateInvoiceToTransporterReturnOrder" |
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| SalesReturnOrderNo | String(25) | Yes | External sales return order code |
| BranchNo | String(25) | Yes | External branch code |
| InvoiceNo | String(25) | No | Invoice number |
| InvoiceSeriesNo | String(10) | No | Invoice series number |
| ItemList | UpdateInvoiceToTransporterReturnOrderItemList | No | List of Sales Return Order items |
| ErrorIfNotFound | Boolean | No | Returns error if the informed order does not exist in the database |
Observation
- If the
InvoiceNoandInvoiceSeriesNoparameters are not informed, the fields will be saved as null. - If the
InvoiceNoparameter is informed, theInvoiceSeriesNoparameter must also be informed.
📝 UpdateInvoiceToTransporterReturnOrderItemList Object
The UpdateInvoiceToTransporterReturnOrderItemList object represents a list of return order items, containing information about products, quantities and weights for update.
Input Parameters
Parameter Type Required Description ProductNo String(25) Yes External product code Qty Integer No Quantity of boxes Weight Float No Box weight Observation
- The
Qtyparameter is required if the "Weight" parameter is not informed.- The
Weightparameter is required if the "Qty" parameter is not informed.
Return
| Parameter | Type | Required | Description |
|---|---|---|---|
| WebServiceReturn | WebServiceReturn | Yes | Standard WebService response information on method execution |
Request Example
curl --location 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostUpdateInvoiceToTransporterReturnOrder"' \
--header 'Content-Type: application/json' \
--data '{
"SalesReturnOrderNo": "RET123",
"BranchNo": "BR001",
"InvoiceNo": "NF123456",
"InvoiceSeriesNo": "001",
"ItemList": [
{
"ProductNo": "PROD001",
"Qty": 5,
"Weight": 10.0
}
],
"ErrorIfNotFound": false
}'
Response Example
{
"WebServiceReturn": {
"Status": "wrsSuccess",
"ErrorCode": "",
"Message": "",
"Actor": "",
"ReturnQuestion": null
}
}
🐞 Possible Errors
| Code | Message |
|---|---|
| UIT‑001 | The item "[parameter description]" value "[value sent in request]" at index [[index code]] must have Quantity "Qty" or Weight "Weight" informed! |
| UIT‑002 | The product "[parameter description]" provided ([value sent in request]) at index [[index code]] is not linked to the informed sales return order! |