Approval - Get plan approvals
API Url
Use it to get the plan approval records
http://localhost:16010/ProMarkREST/web/Approval/plan-approval
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 |
planIdoptional | Number | If Sent only the records for this plan are returned. |
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. |
| planApproval | Object[] | Collection of plan approval records. |
| approvalGroupId | String | The approval group Id on the plan that is sent to approval. |
| approveFrom | Date | The date on which the budget was exceeded |
| planObjectId | Number | Plan object id. |
| publishedUntil | Date | The date that the plan is published until. |
| publisherId | String | The Id of the user who sent this plan to approval. |
rejectedTextoptional | String | Rejection Text if transaction is rejected |
rejectionCodeoptional | String | Rejection code if transaction is rejected |
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": {"planApproval": [{"planObjectId": 2163995151,"publisherId": "FGN","approvalGroupId": "FGNAppr","publishedUntil": "2021-04-22""approvalStatus": 1,"requestedTime": "2020-09-02T13:39:18.000",}]}}}
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. |