This API is to get account transactions history of an account with input criteria as Date range (start_date,end_date). If date range is not sent then the last 'n' transactions (where 'n' is the page_size) is returned. Further filtering can be done by transaction_type to return only Debit or Credit transactions.
Version 1.0.1 :
- Updated the path to <i>accounts/{account_id}/transactions</i> instead of <i>account-transactions/{account_id}</i>
<i>id</i> changed to <i>transaction_id</i> inside transactions
Version 1.0.2 :
Response returns coll_transactions which a collection of transactions along with some metadata information
- Use the href_next to fetch the next page in the collection
<h3>OAuth Metadata details</h3> OAuth metadata parameter to be passed at the time of generating access token using <a href="/partner-authentication">Partner Authentication API</a> for client credential grant type is mentioned below. For information on OAuth Metadata, see <a href="/security/#oauth-metadata-partnerauth">About the OAuth Metadata</a> <p class="oauth_metadata">oauth_metadata.account_id : {account_id}</p>
Attachment | Size |
---|---|
![]() | 3.74 KB |
OAuth Metadata details
OAuth metadata parameter to be passed at the time of generating access token using Partner Authentication API for client credential grant type is mentioned below. For information on OAuth Metadata, see About the OAuth Metadata
oauth_metadata.account_id : {account_id}
Basepath
/v1
Paths
/accounts/{account_id}/transactions
Get Transaction details by passing the account id with Start Date, To Date range or Last N number of Transactions .
Account id of the customer on which transactions are returned. Masked value should be passed in the UAT and Production environments. For information on the masking logic to be followed, see Masking Logic
{
"maxLength": 13
}
Unique Id sent by client. Value should be a unique identifier of the request in UUID format.
{
"maxLength": 50
}
Start date of the filter
End date of the filter
number of transactions in a page
{
"maximum": 100
}
page index
{
"maximum": 1000
}
transaction type indicator. Allowed values: C/D/B
{
"enum": [
"D",
"C",
"B"
]
}
Definitions
Transaction details
{
"properties": {
"transaction_id": {
"type": "string",
"maxLength": 32,
"description": "Holds transaction id of the transaction.",
"example": "M216"
},
"transaction_date": {
"type": "string",
"description": "Holds transaction date",
"format": "date",
"example": "2019-02-01"
},
"posting_date": {
"type": "string",
"description": "Holds transaction posted date",
"format": "date",
"example": "2019-02-01"
},
"value_date": {
"type": "string",
"description": "Holds value date of the transaction",
"format": "date",
"example": "2019-02-01"
},
"transaction_desc": {
"type": "string",
"maxLength": 210,
"description": "Holds transaction narrations",
"example": "GOLD UNITS BOUGHT||FROM 0037100178001|Buy Rate: AED 160.866971 / g||"
},
"transaction_amount": {
"description": "Holds transaction amount",
"$ref": "#/definitions/value",
"example": "50"
},
"original_amount": {
"description": "Holds Reference amount of the transaction.",
"$ref": "#/definitions/value",
"example": "752"
},
"transaction_type": {
"type": "string",
"maxLength": 2,
"description": "Holds transaction type Debit or Credit.",
"example": "D"
},
"running_balance": {
"description": "Holds Running balance at the instance the transaction was posted.",
"$ref": "#/definitions/value",
"example": "50"
},
"transaction_cheque_num": {
"type": "string",
"maxLength": 16,
"description": "Holds instrument ID for the transaction. In case of Cheque, it will have cheque number.",
"example": "12334"
}
},
"additionalProperties": false,
"required": [
"transaction_id",
"transaction_date",
"transaction_amount",
"transaction_desc",
"transaction_type"
]
}
Transaction amount details
{
"properties": {
"amount": {
"type": "string",
"description": "amount",
"example": "200"
},
"currency": {
"type": "string",
"description": "currency",
"example": "AED"
}
},
"additionalProperties": false,
"required": [
"amount"
]
}
Response in case of error
{
"properties": {
"status": {
"type": "string",
"description": "HTTP Status"
},
"response_code": {
"type": "string",
"description": "API specific error code"
},
"property": {
"type": "string"
},
"response_message": {
"type": "string",
"description": "brief type of the error"
},
"description": {
"type": "string",
"description": "detailed description of the error"
}
},
"additionalProperties": false,
"required": [
"status",
"response_code",
"response_message"
]
}
Returns the collection of transactions along with some meta data
{
"properties": {
"page_size": {
"type": "integer",
"maximum": 100,
"description": "Holds the page size of the currect page",
"example": 25
},
"total_count": {
"type": "integer",
"description": "Holds the total no. of transactions for the search criteria",
"example": 2500
},
"href": {
"type": "string",
"description": "href value to fetch this page",
"example": "https://sandboxapi.rakbank.ae/v1/accounts/1234567890123/transactions?start_date=2018-11-29&end_date=2018-11-29&page_size=25&page_index=1"
},
"href_next": {
"type": "string",
"description": "href value to fetch the next page if there are more pages in the collection",
"example": "https://sandboxapi.rakbank.ae/v1/accounts/1234567890123/transactions?start_date=2018-11-29&end_date=2018-11-29&page_size=25&page_index=2"
},
"transactions": {
"type": "array",
"items": {
"$ref": "#/definitions/transactions"
},
"description": "array of transactions"
}
},
"additionalProperties": false,
"required": [
"href"
]
}