Download
Introduction:
This is the 3rd API in the Statement Analysis Flow. This API is used to download the analysis report of the Bank Statements provided in the Analyze Statement API. This api supports two different formats Excel and JSON. Users can choose either one or both.

Sample Curl:
curl --location 'https://api.signzy.ae/api/v3/statementanalysis/download-report' \
--header 'Content-Type: application/json' \
--header 'Authorization: <auth-token>' \
--data '{
"authToken": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhYmhpc2hlay5taXNocmFAc2lnbnp5LmNvbSIsInJvbGVzIjpbIkFETUlOIl0sImNsaWVudCI6ImNISmxZMmx6WVY5MFpXNWhiblF5TXprMU9BPT0iLCJ0ZW5hbnRJZCI6IjIzOTU4IiwiYWNjZXNzIjoiZmFsc2UiLCJpYXQiOjE3MTc2NTU5MTEsImV4cCI6MTcxNzc0MjMxMX0.GVBZ582JnJNYYucWty5ZFMvsmhacWg1ctx2QjzB99ak",
"reportId": "PR2253490007730517",
"fileType": "excel and json",
"templateId": "template_1",
"includeAccountLevelReports":true,
"borrowerReferenceId": "JOURNEY_08",
"getTransactions": true
}'Input Parameters:

Parameter | Type | Description | Mandatory/Optional |
|---|---|---|---|
authToken | String | Authentication Token Generated in Authenticate API | Mandatory |
reportId | String | reportId to download your report | Mandatory |
fileType | String | Report Type (Ex: JSON, Excel, Excel and JSON) | Mandatory |
templateId | String | Custom Template for Report | Optional |
includeAccountLevelReports | Boolean | Account Level Analysis of Report | Optional |
borrowerReferenceId | String | Id which was passed during create web journey link. | Optional |
getTransactions | Boolean | All transaction json link | Optional |

reportId/borrowerReferenceId one of them is mandatory to be passed in req body of download report api.

Sample Output:
{
"result": {
"json": "https://files-preproduction.signzy.tech/api/files/47430328/download/9dbe1c7ad8e541018d5647bff672fd1246fbbb306efc40adb51378df4a5f5cbf.json",
"excel": "https://files-preproduction.signzy.tech/api/files/47430326/download/edf2054cff404ac188afc3d5a48ab83a3dc3a691d0d2459cb33b5fc2ffac844b.xlsx",
"base64Excel": "https://files-preproduction.signzy.tech/api/files/47430327/download/b0e0334155964565beb8c47b0303a6b5e68ff8dd122e42c2ae0b5c3a9f2545d9.txt",
"accountLevelAnalysis": [
{
"accountId": "5946",
"bankName": "RAK Bank",
"excel": "https://files-preproduction.signzy.tech/api/files/47430321/download/7792ff13e08e448599bf2ecf500a9ad2a2af1e6f6ae144afbb22d97465fabe77.xlsx"
}
],
"fileUrls": [
{
"originalFileUrl": "https://files-preproduction.signzy.tech/api/files/47430254/download/acc9d8b55a524795aa805d3afc83dd1991ce3651b47c4a448c0d17bce8b1aa00.pdf",
"base64FileUrl": "https://files-preproduction.signzy.tech/api/files/47430253/download/e06fdb48dec242eebf86cb8adc87fa6a243d9dd8a7824a01a29ec8620d2bf69c.txt"
}
],
"transactionsJsonUrl": [
{
"accountId": "5946",
"bankName": "RAK Bank",
"json": "https://preproduction-persist.signzy.tech/api/files/47430307/download/a9b929fac24c4799b6c7619d2e18efacb11087535c8049abaaaf6f6955638e61.json"
}
]
}
}
Output Parameters:
Parameter | Type | Description |
|---|---|---|
result | Object | Contains Excel and JSON file urls |
result.json | String | Public URL of the JSON report |
result.excel | String | Public URL of the Excel report |
result.transactionsJsonUrl | Array | URLs of the bank statement transactions |

StatusCodes:
{
"error": {
"name": "error",
"message": "Internal Server Error",
"status": 500,
"reason": "ERROR",
"type": "Internal Server Error",
"statusCode": 500
}
}