Skip to main content

get statement for an account

GET /api/v1/Accounts/statement

Description

This endpoint allows you to retrieve a statement for an account within a specific date range, based on the provided query parameters.

Request

Headers:

  • Accept-Language: Change default response message language from English(en). Available languages fr,en

Query Parameters:

  • id: The identifier of the account for which the statement is to be retrieved. (Optional)
  • startDate: The start date of the statement period. (Optional)
  • endDate: The end date of the statement period. (Optional)
  • pageNumber: The page number for pagination. (Default: 1)
  • pageSize: The number of records per page. (Default: 10)
  • version: The version of the API.

Response:

  • 200: Success. Returns a paged list of transaction responses.
  • 400: Bad Request. The request is not valid.
  • 404: Not Found. The requested account or transactions were not found.

Example:

Request:

    httpCopy codeGET /api/v{version}/Accounts/statement?id=123&startDate=2024-01-01T00:00:00Z&endDate=2024-02-01T00:00:00Z&pageNumber=1&pageSize=10 HTTP/1.1
Host: example.com
Accept-Language: en

Response

jsonCopy codeHTTP/1.1 200 OK
{
"totalCount": 50,
"pageSize": 10,
"pageNumber": 1,
"items": [
{
"id": "1",
"type": "Withdrawal",
"amount": -100.0,
"date": "2024-01-05T00:00:00Z",
"source": {
"id": "123",
"name": "User 1"
},
"destination": {
"id": "124",
"name": "User 2"
}
},
{
"id": "2",
"type": "Deposit",
"amount": 50.0,
"date": "2024-01-07T00:00:00Z",
"source": {
"id": "124",
"name": "User 2"
},
"destination": {
"id": "123",
"name": "User 1"
}
}
]
}

Error Response

jsonCopy codeHTTP/1.1 404 Not Found
{
"message": "Account or transactions not found."
}

Headers

Content-TypeValue
Accepttext/plain
ParamValue
id<string>
startDate<dateTime>
endDate<dateTime>
pageNumber1
pageSize10

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request GET \ 
--url /api/v1/Accounts/statement \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


Click Try It! to start a request and see the response here!