Monthly Sales
The PostAddMonthlyIncome endpoint is responsible for registering the value of monthly sales performed in ERP in the MIMS system.
How to register monthly sales value
HTTP POST Request
| Request Type | Example URL |
|---|---|
| POST | {{url_base}}/PostAddMonthlyIncome |
| Example | http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddMonthlyIncome" |
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| BranchNo | String(25) | Yes | External Branch Code |
| Period | String(40) | Yes | Period (Month/Year) |
| OverwriteIfExists | Boolean | No | Flag indicating that data should be overwritten if the record already exists |
| ItemList | AddMonthlyIncomeItemList | Yes | List of all costs per product in the period |
📝 AddMonthlyIncomeItemList Object
The AddMonthlyIncomeItemList object represents a monthly sales item performed in ERP.
Input Parameters
Parameter Type Required Description ProductNo String(25) Yes External Product code TotalProductWeight Float Yes Total product weight TotalProductCost Float Yes Total product cost
Return
| Parameter | Type | Required | Description |
|---|---|---|---|
| WebServiceReturn | WebServiceReturn | Yes | Standard WebService response information on method execution |
Request Example
curl --location --request POST '{{url_base}}/PostAddMonthlyIncome' \
--header 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{
"BranchNo": "FIL123",
"Period": "01-2025",
"OverwriteIfExists": true,
"ItemList": [
{
"ProductNo": "PROD001",
"TotalProductWeight": 1000.50,
"TotalProductCost": 50000.75
},
{
"ProductNo": "PROD002",
"TotalProductWeight": 750.30,
"TotalProductCost": 32000.40
}
]
}'
Response Example
{
"WebServiceReturn": {
"Status": "wrsSuccess",
"ErrorCode": "",
"Message": "",
"Actor": "",
"ReturnQuestion": null
}
}
🐞 Possible Errors
| Code | Message |
|---|---|
| AMI‑001 | Monthly Cost has already been processed for Period (PeriodNo) [value sent in request] and Branch (BranchNo) [value sent in request] informed. Operation not allowed! |
| AMI‑002 | Monthly Income already exists for Period (PeriodNo) [value sent in request] and Branch (BranchNo) [value sent in request] informed. Operation not allowed! |