Retrieve account information associated with an authorized consent or a specific account
View Accounts API allows applications to retrieve account information from a bank using a previously authorized consent. The API returns account details for all accounts associated with the provided consentId, or for a specific account when an accountId is supplied.
This endpoint enables applications to access key account information such as account holder details, account type, currency, identifiers, and account status.
Access to this API requires a valid consent that has been authorized by the customer. The consent determines which accounts and financial data the application is permitted to access.
consentId must refer to an active and authorized consent and accountId must refer to an account associated with the provided consentIdAuthorization: Bearer headerThis API can only be accessed using a valid and active consent. Before accessing this service, ensure that a consent has been created and authorized with the required useCaseType and permissions.
The consent must include the appropriate useCaseType and permission values that allow access to the corresponding financial data services.
If you do not already have a consent with the required configuration, you must first create one using the Create Consent API and ensure that it is successfully authorized. Once the consent becomes active, the generated consentId can be used to access this API service.
Scope | useCaseType | Permissions |
|---|---|---|
To access all Raw Data API services:
|
|
|
This service requires consentId and returns all accounts associated with that consent.
Endpoint URL | Method |
|---|---|
| GET |
The following headers must be included when calling the accounts API.
Header parameter | Description |
|---|---|
| Access token used to authenticate the API request |
curl --request GET \
--url 'https://obsandbox.onesingleview.com/v2/api/observice/accounts?dateTimeStamp=2023-06-14T17%3A51%3A03&requestID=db35902b-806a-4141-b1e2-e93f60c82f62&merchantId=APIU-300356&bankCode=SABB&consentId=urn%3ASABBSARI%3Akac-cd3b9a37-eb97-4a70-b268-38af9f2950b1' \
--header 'accept: application/json' \
--header 'authorization: Bearer asdrtyuiokjhgfrtyujhdd'Request parameters
Parameters | Requirement | Description | Data type | Data validation |
|---|---|---|---|---|
dateTimeStamp | Mandatory | Indicates the date and time when the request is created | Date | ISO 8601 format |
requestID | Mandatory | Unique identifier for the request used for tracking and traceability | Alphanumeric | UUID format |
merchantID | Mandatory | Identifier assigned to the merchant or client application initiating the request | String |
|
bankCode | Mandatory | Unique bank identifier code | Enum |
|
consentId | Mandatory | Unique identifier of the consent | String |
|
{
"success": true,
"payload": [
{
"code": "SABB",
"data": {
"account": [
{
"accountId": "100004000000000000000001",
"accountHolderName": "Mohammad Alhajri",
"accountHolderShortName": "Alhajri",
"status": "Active",
"currency": "SAR",
"nickname": "Mohammad",
"accountType": "KSAOB.Corporate",
"accountSubType": "Business Current Account",
"accountIdentifiers": [
{
"identificationType": "KSAOB.IBAN",
"identification": "SA5678907654334454445601",
"name": "Mohammad Alhajri"
},
{
"identificationType": "KSAOB.NationalID",
"identification": "2123456789",
"name": "Mohammad Alhajri"
},
{
"identificationType": "KSAOB.CommercialRegistrationNumber",
"identification": "5566456733",
"name": "Saudi Company"
}
],
"servicer": {
"identificationType": "KSAOB.BICFI",
"identification": "10000109010101"
},
"statusUpdateDateTime": "2023-02-01T16:37:00.980Z",
"description": "Account sub-type description",
"openingDate": "2022-04-08T16:37:00.980Z",
"maturityDate": "2023-11-29T16:37:00.980Z"
}
]
},
"links": {
"self": ""
},
"meta": {
"totalPages": 1
}
}
]
}Response parameters
Parameter | Description | Data type | Data validation |
|---|---|---|---|
success | Indicates whether the request was successfully processed | Enum |
|
payload | Contains account information grouped by bank | Array of objects |
|
code | Bank identifier associated with the account data | Enum |
|
data | Contains account details returned from the bank | Object |
|
account | List of accounts associated with the consent | Array of objects |
|
accountId | Unique identifier of the account | String |
|
accountHolderName | Full name of the account holder | String |
|
accountHolderShortName | Short or display name of the account holder | String |
|
status | Current status of the account | Enum |
|
currency | Currency in which the account operates | String |
|
nickname | Nickname assigned to the account | String |
|
accountType | Specifies the type of accounts that can be accessed | Enum |
|
accountSubType | Specifies the type of accounts that can be accessed | Enum |
|
accountIdentifiers | Each account may contain one or more identifiers that uniquely identify the account | Object |
|
identificationType | Type of identifier used | String |
|
identification | Identifier value associated with the account | String |
|
name | Name associated with the identifier | String |
|
servicer | This contains information about the financial institution servicing the account | Object |
|
identificationType | Type of bank identifier used | String |
|
identification | Identifier value of the servicing institution | String |
|
statusUpdateDateTime | Date and time when the account status was last updated by the servicing bank | Date | ISO 8601 format |
description | Additional information or description associated with the account subtype or account characteristics | String |
|
openingDate | Date and time when the account was originally opened at the bank | Date | ISO 8601 format |
maturityDate | Date when the account reaches maturity. This field is typically applicable for term-based accounts. | Date | ISO 8601 format |
links | Contains reference links related to the API response or resource | Object |
|
self | Link referencing the current API resource or endpoint that returned the response | String |
|
meta | Provides additional metadata related to the API response, such as pagination information | Object |
|
totalPages | Indicates the total number of pages available in the response when pagination is applied | Integer |
|
This service requires accountId along with consentId and returns details for the specified account.
Endpoint URL | Method |
|---|---|
| GET |
The following headers must be included when calling the accounts API.
Header parameter | Description |
|---|---|
| Access token used to authenticate the API request |
curl --request GET \
--url 'https://obsandbox.onesingleview.com/v2/api/observice/accountsById?dateTimeStamp=2023-06-14T17%3A51%3A03&requestID=db35902b-806a-4141-b1e2-e93f60c82f62&merchantId=APIU-300356&bankCode=SABB&consentId=urn%3ASABBSARI%3Akac-cd3b9a37-eb97-4a70-b268-38af9f2950b1&accountId=100004000000000000000001' \
--header 'accept: application/json' \
--header 'authorization: Bearer asdrtyuiokjhgfrtyujhdd'Request parameters
Parameters | Requirement | Description | Data type | Data validation |
|---|---|---|---|---|
dateTimeStamp | Mandatory | Indicates the date and time when the request is created | Date | ISO 8601 format |
requestID | Mandatory | Unique identifier for the request used for tracking and traceability | Alphanumeric | UUID format |
merchantID | Mandatory | Identifier assigned to the merchant or client application initiating the request | String |
|
bankCode | Mandatory | Unique bank identifier code | Enum |
|
consentId | Mandatory | Unique identifier of the consent | String |
|
accountId | Mandatory | Unique identifier of the account | String |
|
{
"success": true,
"payload": [
{
"code": "SABB",
"data": {
"accountId": "100004000000000000000001",
"account": {
"accountId": "100004000000000000000001",
"accountHolderName": "Mohammad Alhajri",
"accountHolderShortName": "Alhajri",
"status": "Active",
"currency": "SAR",
"nickname": "Mohammad",
"accountType": "KSAOB.Corporate",
"accountSubType": "Business Current Account",
"accountIdentifiers": [
{
"identificationType": "KSAOB.IBAN",
"identification": "SA5678907654334454445601",
"name": "Mohammad Alhajri"
},
{
"identificationType": "KSAOB.NationalID",
"identification": "2123456789",
"name": "Mohammad Alhajri"
},
{
"identificationType": "KSAOB.CommercialRegistrationNumber",
"identification": "5566456733",
"name": "Saudi Company"
}
],
"servicer": {
"identificationType": "KSAOB.BICFI",
"identification": "10000109010101"
},
"statusUpdateDateTime": "2023-02-01T16:37:00.980Z",
"description": "Account sub-type description",
"openingDate": "2022-04-08T16:37:00.980Z",
"maturityDate": "2023-11-29T16:37:00.980Z"
}
},
"links": {},
"meta": {}
}
]
}
Response parameters
Parameter | Description | Data type | Data validation |
|---|---|---|---|
success | Indicates whether the request was successfully processed | Enum |
|
payload | Contains the requested account information | Array of objects |
|
code | Bank identifier associated with the account data | Enum |
|
data | Contains account details returned from the bank | Object |
|
accountId | Unique identifier of the account | String |
|
accountHolderName | Full name of the account holder | String |
|
accountHolderShortName | Short or display name of the account holder | String |
|
status | Current status of the account | Enum |
|
currency | Currency in which the account operates | String |
|
nickname | Nickname assigned to the account | String |
|
accountType | Specifies the type of accounts that can be accessed | Enum |
|
accountSubType | Specifies the type of accounts that can be accessed | Enum |
|
accountIdentifiers | Each account may contain one or more identifiers that uniquely identify the account | Object |
|
identificationType | Type of identifier used | String |
|
identification | Identifier value associated with the account | String |
|
name | Name associated with the identifier | String |
|
servicer | This contains information about the financial institution servicing the account | Object |
|
identificationType | Type of bank identifier used | String |
|
identification | Identifier value of the servicing institution | String |
|
statusUpdateDateTime | Date and time when the account status was last updated by the servicing bank | Date | ISO 8601 format |
description | Additional information or description associated with the account subtype or account characteristics | String |
|
openingDate | Date and time when the account was originally opened at the bank | Date | ISO 8601 format |
maturityDate | Date when the account reaches maturity. This field is typically applicable for term-based accounts. | Date | ISO 8601 format |
links | Contains reference links related to the API response or resource | Object |
|
self | Link referencing the current API resource or endpoint that returned the response | String |
|
meta | Provides additional metadata related to the API response, such as pagination information | Object |
|
totalPages | Indicates the total number of pages available in the response when pagination is applied | Integer |
|