Approval - Get budget approvals
API Url
Use it to get the budget approval records
http://localhost:16010/ProMarkREST/web/Approval/plan-budget
Permissions: user
Request headers
| Field | Type | Description |
|---|---|---|
Accept-Languageoptional | String | =en-GB Language use for localization. |
X-Clientoptional | String | =Client type. "Portal""Mobile""Admin" |
X-Roleoptional | Number | ProMark role (1: Employee, 2: User). {12} |
X-WebPart-Idoptional | Number | Unique web-part identifier. |
Query parameters
| Field | Type | Description |
|---|---|---|
approvalGroupoptional | String | Approval Group ID. If not defined all valid approval groups are taken by default. |
approvalStatusoptional | Number | Approval status to filter data 1-3 |
fromoptional | Date | From requested date |
tooptional | Date | To requested date |
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| budgetApproval | Object[] | Collection of budget approvalr registrations |
| approveFrom | Date | The date on which the budget was exceeded |
| exceeded | Number | The percentage by which the budget was exceeded |
| firstValue | Number | First value from the planning figure |
| planDescription | String | Plan description |
| planFigureId | Number | Planning figure id |
| planId | String | Plan id |
| planObjectId | Number | Plan object id |
rejectedTextoptional | String | Rejection Text if transaction is rejected |
rejectionCodeoptional | String | Rejection code if transaction is rejected |
| requestedTime | Date | Requested time of the approval |
| secondValue | Number | Second value from the planning figure |
messageoptional | Object | Object containing response messages. |
| code | Number | Message code. |
| text | String | Message text. |
| type | String | Type of message. "warning""info" |
Success example:
HTTP/1.1 200 OK{"response": {"data": {"budgetApproval": [{"id": "0x0000000002386b87","planObjectId": 2163995151,"planFigureId": 2,"planDescription": "plan","planFigureDescription": "AUR currency vs Cost","planId": "AUR","date": "2020-09-08","approvalStatus": 1,"exceeded": 733.3333333333,"requestedTime": "2020-09-02T13:39:18.000","firstValue": 1000.0,"secondValue": 120.0,"type": 0}]}}}
Error 4xx
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data (empty). |
| errorCode | Number | Error code. |
| errorMessage | String | Error description. |