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 Type | Example URL |
|---|---|
| POST | {{url_base}}/PostAddDirectCost |
| Example | http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddDirectCost" |
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| BranchNo | String(25) | Yes | External branch code |
| Period | String(40) | Yes | Period (Month + Year) |
| CostCenterNo | String(25) | Yes | External cost center code |
| GLAccountNo | String(25) | Yes | General ledger account code |
| PeriodValue | Float | Yes | Period expenses |
| 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 |
| DirectCostCode | Integer | Yes | Internal 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
| Code | Message |
|---|---|
| ADC‑001 | The 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! |