The StatementImage property is how most Q2 Financial Institutions determine eligibility to download statements for a particular account. You can assume that by the time a user accesses your extension, those properties will be set correctly, if they are with an institution that is using the built in Q2 statement download feature.
From a Tecton extension you can use the following code to get a list of eligible accounts:
tecton.sources.requestPlatformData({
route: 'mobilews/accountStatement/form',
method: 'GET'
}).then((data) => { debugger; });
This will get you the HostAccountID numbers you need to match up to the account list you already have. You can then pass the ID's back to these API functions depending on whether you have an active session or not:
https://docs.q2developer.com/docs/api_references/hq_api/q2_api/GetStatementCycleList.html
https://docs.q2developer.com/docs/api_references/hq_api/q2_api/GetStatementImage.html
https://docs.q2developer.com/docs/api_references/hq_api/wedge_online_banking/GetStatementCycleList.html
https://docs.q2developer.com/docs/api_references/hq_api/wedge_online_banking/GetStatementImage.html
If you need to search for the StatementImage property for a user without using Tecton, you can use the PolicyData object, which will bring back a list of User Properties for a particular User (make sure include_parent_policy_data is set to True). Then you can locate the StatementImage property and see if it's just True at the Customer/User level or if there are specific accounts where it is set True/False.
After retrieving a PDF you can send it to your server in a variety of ways. One way is to utilize the ArdentFS infrastructure to create a short-lived link from AWS S3:
https://docs.q2developer.com/docs/guides/online_integration/file_uploads.html
https://docs.q2developer.com/docs/api_references/q2_sdk/ardent/index.html
Hi, I tried this "tecton.sources.requestPlatformData" but I do not see "HostAccountID" as a key in the return value. I tried this in the dev and beta env. Is there something I am missing? Is it mapped to something else? Also, the dev environment returns no data with this call, I think we talked about this a while back. Is it still supposed to be the case? Also, for the PolicyData object, to be clear, is the idea behind that just to check whether a user has statement images enabled at some level?
—I may be able to get the dev environment to return data. What is the beta environment you're using?
The PolicyData object would be a full list of entitlements for that user on all levels, including account levels. You would search for the StatementImage property and figure out which accounts have access to statements. I believe you will not need to go this route based on what I know about your solution.
ArdentFS is a way of storing files in an S3 bucket for you to retrieve them. If you want to store them in your own S3 directly, you will need to request a whitelist in the datacenter.
—