Skip to main content

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

Input Parameters​

ParameterTypeRequiredDescription
BranchNoString(25)YesExternal Branch Code
PeriodString(40)YesPeriod (Month/Year)
OverwriteIfExistsBooleanNoFlag indicating that data should be overwritten if the record already exists
ItemListAddMonthlyIncomeItemListYesList of all costs per product in the period

📝 AddMonthlyIncomeItemList Object​

The AddMonthlyIncomeItemList object represents a monthly sales item performed in ERP.

Input Parameters​

ParameterTypeRequiredDescription
ProductNoString(25)YesExternal Product code
TotalProductWeightFloatYesTotal product weight
TotalProductCostFloatYesTotal product cost

Return​

ParameterTypeRequiredDescription
WebServiceReturnWebServiceReturnYesStandard 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​

CodeMessage
AMI‑001Monthly Cost has already been processed for Period (PeriodNo) [value sent in request] and Branch (BranchNo) [value sent in request] informed. Operation not allowed!
AMI‑002Monthly Income already exists for Period (PeriodNo) [value sent in request] and Branch (BranchNo) [value sent in request] informed. Operation not allowed!