Skip to main content

Direct Cost

The PostAddDirectCost endpoint is responsible for registering Monthly Expenses by Cost Center (Direct Cost) in the MIMS system.


How to register Monthly Expenses by Cost Center​

HTTP POST Request

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

Input Parameters​

ParameterTypeRequiredDescription
BranchNoString(25)YesExternal branch code
PeriodString(40)YesPeriod (Month + Year)
CostCenterNoString(25)YesExternal cost center code
GLAccountNoString(25)YesGeneral ledger account code
PeriodValueFloatYesPeriod expenses
OverwriteIfExistsBooleanNoFlag indicating that data should be overwritten if the record already exists

Return​

ParameterTypeRequiredDescription
WebServiceReturnWebServiceReturnYesStandard WebService response information on method execution
DirectCostCodeIntegerYesInternal monthly expense code generated in the MIMS system

Request Example​

curl --location 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddDirectCost"' \
--header 'Content-Type: application/json' \
--data '{
"BranchNo": "BR001",
"Period": "202502",
"CostCenterNo": "CC001",
"GLAccountNo": "ACC123",
"PeriodValue": 5000.00,
"OverwriteIfExists": true
}'

Response Example​

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

🐞 Possible Errors​

CodeMessage
ADC‑001The Direct Cost for Period (PeriodNo) [value sent in request], Cost Center (CostCenterNo) [value sent in request], General Ledger Account (GLAccountNo) [value sent in request] and Branch (BranchNo) [value sent in request] informed already exists!