Approval - Get plan approvals

API Url

Use it to get the plan approval records

GET
http://localhost:16010/ProMarkREST/web/Approval/plan-approval

Permissions: user

Request headers

FieldTypeDescription
Accept-LanguageoptionalString

=en-GB Language use for localization.

X-ClientoptionalString

=Client type.

Allowed values:"Portal""Mobile""Admin"
X-RoleoptionalNumber

ProMark role (1: Employee, 2: User).

Allowed values:{12}
X-WebPart-IdoptionalNumber

Unique web-part identifier.

Query parameters

FieldTypeDescription
approvalGroupoptionalString

Approval Group ID. If not defined all valid approval groups are taken by default.

approvalStatusoptionalNumber

Approval status to filter data 1: Untreated, 2: Approved, 3</code: Rejected). If not defined then untreated transactions are returned.

Size range: 1-3
fromoptionalDate

From requested date

planIdoptionalNumber

If Sent only the records for this plan are returned.

tooptionalDate

To requested date

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    planApprovalObject[]

Collection of plan approval records.

      approvalGroupIdString

The approval group Id on the plan that is sent to approval.

      approveFromDate

The date on which the budget was exceeded

      planObjectIdNumber

Plan object id.

      publishedUntilDate

The date that the plan is published until.

      publisherIdString

The Id of the user who sent this plan to approval.

      rejectedTextoptionalString

Rejection Text if transaction is rejected

      rejectionCodeoptionalString

Rejection code if transaction is rejected

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"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

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.