Using HyperLink & Reports via API
To understand this section we recommend you first read the HyperLink and Reports guides.
Using HyperLink and Reports is a fully no-code solution. However, it requires your operations team to perform some manual tasks to:
- Create a customer
- Share the URL with the customer via email or SMS
- Generate the report in Lean Dashboard once the customer has connected their bank account and Lean has fetched the data
- Download the report from Lean Dashboard
For clients that would like these steps to be automated, we provide a solution that requires some integration effort but still less than the full integration.
Creating a customer via API
The API POST /reports/v2/customers
(see Create Reports Customer API) will allow you to create a new customer by providing the NID, CR and/or UNN of your customer:
- NID is mandatory if your customer is a person
- CR and UNN are both mandatory if your customer is a business
As a response to this API you will receive the HyperLink URL (e.g.: https://connect.sa.leantech.me/hyperlink/a059df39-d754-4cea-9901-4a357f9ac80e) that you can share with your customer via SMS, email or any other means. Note that sharing the URL with your customer will need to be done through your own systems as Lean does not provide this service.
Triggering a fallback flow
In some cases, a customer might want to connect a bank account for a bank that Lean does not currently support. In that case, the customer will be able to select that bank but will not be able to connect the bank account. When the customer selects the unsupported bank, a webhook will be sent to you. You can then trigger a fallback flow so that your customer can complete the journey via another method (e.g.: uploading a bank statement).

Report generation
Once your customer receives the URL, your customer will connect their bank account as described in the customer journey section of the HyperLink guide. Lean will then fetch the data from the bank account. Once this is completed, Lean will automatically generate the report.
If the report is generated successfully you will receive a report.generated
webhook (see webhook details). However, if any issue occurs during the data retrieval or report generation process a report.failed
webhook will be sent (see webhook details).
Report retrieval
Once you receive a report.generated
webhook, you can use the customer_id
and report_id
that you will receive in the webhook to retrieve the PDF report with the bank data your customer has shared (see Get Report API).
To ensure you have not missed any report for any of your customers, you can also retrieve all report IDs for a specific customer using our Get Reports for Customer API. You can then get any report you want as mentioned above.
Updated 3 months ago