> For the complete documentation index, see [llms.txt](https://docs.udara360.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.udara360.io/udara360-docs-1/reports/report-api/get-loan-expectation-report.md).

# Get Loan Expectation Report

To retrieve the loan expectation report, send a GET request to the following endpoint:\
\ <mark style="color:blue;">`GET`</mark> `api/Report/v1/GetLoanExpectationReport`\
\
The request must include the necessary parameters in the request query to identify the specific loan and criteria for the report.\
\
This process facilitates the retrieval of loan expectation reports and effectively manages loan-related information for analysis and decision-making.

**Headers**

| Name                                            | Value                |
| ----------------------------------------------- | -------------------- |
| Content-Type<mark style="color:red;">\*</mark>  | `application/json`   |
| Authorization<mark style="color:red;">\*</mark> | `Bearer <token>`     |
| Request-Reference                               | `{unique-reference}` |

**Query Parameter**

<table><thead><tr><th width="195">Name</th><th width="179">Data Type (length)</th><th>Description</th><th data-hidden>Required</th></tr></thead><tbody><tr><td><code>accountNumber</code></td><td>string</td><td>The unique number identifying the account</td><td></td></tr><tr><td><code>branchCode</code></td><td>string</td><td>The code representing the branch of the account</td><td></td></tr><tr><td><code>accountOfficerCode</code></td><td>string</td><td>The code identifying the account officer</td><td></td></tr><tr><td><code>productCode</code></td><td>string</td><td>The product code linked to the account</td><td></td></tr><tr><td><code>startDate</code></td><td>date</td><td>The start date of the query period</td><td></td></tr><tr><td><code>endDate</code></td><td>date</td><td>The end date of the query period</td><td></td></tr><tr><td><code>pageNumber</code></td><td>integer</td><td>The page number for paginated results</td><td></td></tr><tr><td><code>pageSize</code></td><td>integer</td><td>The number of records per page</td><td></td></tr><tr><td><code>sortColumn</code></td><td>string</td><td>The column by which the results are sorted</td><td></td></tr><tr><td><code>direction</code></td><td>string</td><td>The direction of sorting, either <code>Asc</code> (ascending) or <code>Desc</code></td><td></td></tr></tbody></table>

Here is an example request and response with a sample payload sent to the endpoint in Curl format.

<details>

<summary>Sample Request</summary>

```json
curl --location 'https://openapi-dev.udara360.io/api/Report/v1/GetLoanExpectationReport?AccountNumber=1000002993&BranchCode=001&AccountOfficerCode=009&ProductCode=001&StartDate=2022-01-01&EndDate=2022-05-09&PageNumber=1&PageSize=10&SortColumn=StartDate&Direction=asc' \
--header 'Authorization: bearer {token}' \
--header 'request-reference: {unique_reference}' \
--header 'Content-Type: application/json' \
--data ''
```

</details>

<details>

<summary>Respose: <code>200</code></summary>

```json
{
  "status": true,
  "message": "string",
  "data": {
    "data": [
      {
        "sn": 0,
        "accountName": "string",
        "accountNumber": "string",
        "dueDate": "2023-01-29T15:18:35.590Z",
        "principal": 0,
        "interest": 0,
        "fee": 0,
        "total": 0
      }
    ],
    "recordCount": 0
  }
}
```

</details>
