---
title: Bank Statement Scorecard
slug: v3-gateway/bank-statement-scorecard
description: Learn how to use the Scorecard API to generate a score based on bank statement details. This API accepts bank statement PDF files or JSON files as input. Get step-by-step instructions on providing the necessary information such as the file URL, bank name,
createdAt: 2022-10-11T06:31:57.000Z
---

## Introduction

This service is used to provide details of scorecard from bank statement details.

The Scorecard API takes bank details and raw transactional data and provide a score based on the bank Statement. This API will either take direct bank statement pdf file in the input, or a JSON file in the form of Account Aggregator response.

## How to call the API

The authorization header in the request must include the access token obtained before this API can be consumed.

If isBankStatementPdf in the input is set to true, the API is hit by passing Bank statement File URL, Bank Name, Account Type, Facility, as input parameter.

If isBankStatementPdf in the input is set to false, the API is hit by passing JSON File(containing JSON in the form of Account Aggregator Response) URL as input parameter.

The API returns a bank statement score object containing number of score card inputs and the final score.&#x20;

## API Input Guidelines

Need to pass following information if bank statement PDF is provided

- isBankStatementPdf: **true**
- Bank statement File PDF URL&#x20;
- Bank Name
- Account Type
- Facility

Need to pass following information if Account Aggregator JSON is provided

- isBankStatementPdf: **false**
- Bank statement File JSON URL&#x20;

### Sample Curl

:::::Tabs
::::Tab{title="Production"}
:::CodeblockTabs
Curl1

```curl
curl --location --request POST 'https://api.signzy.app/api/v3/advanced-bank-statement-analysis/scorecard' \
--header 'Authorization: <Token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "isBankStatementPdf": true,
    "fileUrl": "https://persist.signzy.tech/api/files/4682180/download/1234.pdf",
    "bankName": "SBI",
    "accountType": "SAVING",
    "facility": ""
}'
```

Curl2

```curl
curl --location --request POST 'https://api.signzy.app/api/v3/advanced-bank-statement-analysis/scorecard' \
--header 'Authorization: <Token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "isBankStatementPdf": false,
    "fileUrl": "https://persist.signzy.tech/api/files/4684051/download/1234.json"
}'
```
:::
::::
:::::

### Input Parameters

| **PARAMETER NAME** | **REQUIRED/OPTIONAL** | **DESCRIPTION**                                                |
| ------------------ | --------------------- | -------------------------------------------------------------- |
| Authorization      | REQUIRED              | Contains the id parameter returned from the login step         |
| Content-Type       | REQUIRED              | application/json                                               |
| isBankStatementPdf | REQUIRED              | Boolean to choose pdf or json mode                             |
| fileUrl            | REQUIRED              | data                                                           |
| bankName           | REQUIRED (            | string containing bank Name                                    |
| accountType        | REQUIRED              | string containing one of ('SAVING', 'CURRENT', 'CREDIT\_CARD') |
| facility           | OPTIONAL              | string containing facility                                     |

### Sample Response

```json
{
    "result": {
        "bankStatementScore": {
            "numberOfScoreCardInputs": 16,
            "score": 647
        }
    }
}
```

### Response Parameter

| **PARAMETER NAME**                                    | **DESCRIPTION**                   |
| ----------------------------------------------------- | --------------------------------- |
| **result.bankStatementScore.numberOfScoreCardInputs** | **number of score card inputs**   |
| **result.bankStatementScore.score**                   | **number containing final score** |

## Response Codes

The API endpoint can return the following response codes:

| Response Code | Description                                                                                     | Example Input (Error Scenario)                                                                                                    | Example Output (Error Scenario)                                                                                                                                                                                                                                            |
| ------------- | ----------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 200           | The request was processed successfully.                                                         | NA                                                                                                                                | NA                                                                                                                                                                                                                                                                         |
| 400           | The request was not processed successfully. An error message is included in the response body.  | \{<br />    "isBankStatementPdf": true,<br />    "fileUrl": "https\://persist.signzy.tech/api/files/123/download/123.json"<br />} | \{<br />    "error": \{<br />        "name": "error",<br />        "message": "\\"bankName\\" is required",<br />        "status": 400,<br />        "reason": "VALIDATION\_REQUEST",<br />        "type": "Bad Request",<br />        "statusCode": 400<br />    }<br />} |
| 409           | The request could not be processed due to some error in upstream.                               | NA                                                                                                                                | \{<br />    "error": \{<br />        "name": "error",<br />        "message": "Error in fetching data",<br />        "status": 409,<br />        "reason": "UPSTREAM DOWN",<br />        "type": "Conflict",<br />        "statusCode": 409<br />    }<br />}}             |

:::hint{type="info"}
### Getting help

Please feel free to contact us if you have any questions, require clarification, or have ideas for how to make the documents or any of our services better.


You can reach out to us at [help@signzy.com](#).
:::

