> 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-customer-account-history.md).

# Get Customer Account History

To retrieve the customer account history report, send a GET request to the following endpoint:

\ <mark style="color:blue;">`GET`</mark> `/api/Report/v1/RequestCustomerAccountHistoryReport`\
\
The request must include the necessary customer identification details in the request query to specify the customer account for which the history report is requested.\
\
This process streamlines the retrieval of customer account history reports and effectively manages customer account-related information.

**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>Name</th><th width="173">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 account number associated with the transaction</td><td></td></tr><tr><td><code>postingReferenceNumber</code></td><td>string</td><td>The unique reference number for the posting</td><td></td></tr><tr><td><code>instrumentNumber</code></td><td>string</td><td>The instrument number related to the transaction</td><td></td></tr><tr><td><code>entryCode</code></td><td>string</td><td>The code representing the type of financial entry</td><td></td></tr><tr><td><code>batchCode</code></td><td>string</td><td>The batch code for grouping transactions</td><td></td></tr><tr><td><code>financialDateFrom</code></td><td>date</td><td>The starting date for the financial activity</td><td></td></tr><tr><td><code>financialDateTo</code></td><td>date</td><td>The ending date for the financial activity</td><td></td></tr><tr><td><code>startDate</code></td><td>date</td><td>The start date of the transaction period</td><td></td></tr><tr><td><code>endDate</code></td><td>date</td><td>The end date of the transaction period</td><td></td></tr><tr><td><code>pageNumber</code></td><td>integer</td><td>The page number for pagination</td><td></td></tr><tr><td><code>pageSize</code></td><td>integer</td><td>The number of results 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 -g '{{baseurl}}/api/Report/v1/RequestCustomerAccountHistoryReport?AccountNumber=1000002992&PostingReferenceNumber=4945858&InstrumentNumber=0002&EntryCode=100&BatchCode=001&FinancialDateFrom=2022-01-01&FinancialDateTo=2022-03-09&StartDate=2022-01-01&EndDate=2022-03-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": [
      {
        "financialDate": "string",
        "transactionDate": "2023-01-29T15:13:21.626Z",
        "accountNumber": "string",
        "accountName": "string",
        "branch": "string",
        "postedBy": "string",
        "approvedBy": "string",
        "postingReferenceNumber": "string",
        "debit": "string",
        "credit": "string",
        "narration": "string",
        "entryCode": "string",
        "instrumentNumber": "string",
        "balance": "string",
        "accessLevel": 0
      }
    ],
    "recordCount": 0
  }
}
```

</details>
