This service lets you fetch Approval tasks in your Zoho Creator applications and execute approval actions.
Fetch recent approval List
Methods
static func fetchRecentApprovalList(for approvalAPIInfo:ApprovalAPIInfo, completionHandler: @escaping (Result) -> Void)Fetches the recent approval for the application for the given Approval type.
static func fetchRecentApprovalList(for approvalAPIInfo:ApprovalAPIInfo, completionHandler: @escaping (Result) -> Void)
Parameters
| ApprovalAPIInfo | A struct that has the information on Creator app and approval type. |
|---|---|
| completionHandler | Approval data will be returned in completion Handler. |
Example
let approvalAPIInfo = ApprovalAPIInfo.init(appOwner: "<appOwner>", appLinkName: "<appLinkName>", listType: ApprovalAPIInfo.ApprovalListType.pending) ZCApprovalAPIService.fetchRecentApprovalList(for: approvalAPIInfo) { (result) in switch result { case .success(let approval): print(approval.tasks) case .failure(let error): print(error) } }