Accounts v3.0

Version Control

VersionDateAuthorComments
3.0-draft118-Apr-2018OB R/W API Team

Initial draft for Version 3.0

  • Moved enumerations up to parent document
3.0-draft4 OB R/W API TeamClarified use of Idempotency Key in endpoint table.
3.0-draft5 OB R/W API Team

Draft5 changes:

  • Updated examples to change UTC to GMT to be in line with https://tools.ietf.org/html/rfc7231#page-66
  • P21 changes:
    • Genericised guidelines on UK domestic identification schemes.
    • Internationalisation for the Servicer object.
      • SchemeName updated to Max40Text - so that additional schemes can be agreed and specified outside of the OB standard.
    • Internationalisation for the Account object.
      • SchemeName updated to Max40Text - so that additional schemes can be agreed and specified outside of the OB standard.
      • Identification updated to Max256Text - so that schemes that require an email address can be accommodated.
3.0-draft6/rc1 OB R/W API Team

Draft6 Changes:

  • Clarified how the ReadPAN permission affects the resource.
  • Updated definition of Name field in the Account object for clarity. Have specified usage that it is "The account name is the name or names of the account owner(s) represented at an account level. The account name is not the product name or the nickname of the account."
  • Updated Usage Examples to reflect namespacing for the SchemeName
3.0-draft7 OB R/W API TeamNo Change
3.0-RC2 OB R/W API TeamNo Change
3.0-RC3 OB R/W API TeamNo Change
3.0 OB R/W API TeamThis is the baseline version. No change from RC3.

Endpoints

Endpoints for the resource - and available methods.


Resource
HTTP Operation
Endpoint
Mandatory?
Scope
Grant Type
Idempotency Key
Parameters
Request Object
Response Object
1accountsGET

GET /accounts

Mandatory

accountsAuthorization CodeNoPagination
OBReadAccount2
2accountsGETGET /accounts/{AccountId}MandatoryaccountsAuthorization CodeNo

OBReadAccount2

GET /accounts

First Step

The first step for an AISP after an account-request is authorised - is to call the GET /accounts endpoint. 

An AISP will be given the full list of accounts (the AccountId(s)) that the PSU has authorised the AISP to access. The AccountId(s) returned may then be used to retrieve other resources for a specific AccountId. The selection of authorised accounts happens only at the ASPSP's interface.

GET /accounts/{AccountId}

An AISP may retrieve the account information resources for the AccountId (which is retrieved in the call to GET /accounts).

Data Model

The OBReadAccount2 object will be used for the call to:

  • GET /accounts/{AccountId}
  • GET /accounts

Resource Definition

This resource represents the account to which credit and debit entries are made.

Each account resource will have a unique and immutable AccountId.

UML Diagram

Notes:

  • The Account and Servicer structure has been designed to:
    • Reflect the DebtorAccount and DebtorAgent (and similarly for CreditorAccount and CreditorAgent) structures in the PISP use case
    • Having a SchemeName for the Account and Servicer blocks means we can be flexible to accommodate multiple types of accounts
  • For common Domestic UK identification schemes:
    • Account/Account
      • Where "SortCodeAccountNumber" is specified as the SchemeName, the Identification field must be populated with the 6 digit Sort Code and 8 digit Account Number (a 14 digit field)
      • Where "IBAN" is specified as the SchemeName, the Identification field must be populated with the full IBAN
      • Where "PAN" is specified as the SchemeName, the Identification field must be populated with the primary PAN linked to the account. An ASPSP may choose to mask digits returned in the Identification field.
    • Account/Servicer
      • Where "BICFI" is populated as the SchemeName, the Identification field must be populated with the BIC 
  • The SecondaryIdentification field is used to identify an account in addition to the primary Account/Identification field. SecondaryIdentification may be populated with a roll number for building societies, or a currency code where an account has multiple currency sub-accounts.

Permission Codes

The resource differs depending on the permissions (ReadAccountsBasic and ReadAccountsDetail) used to access resource. In the event the resource is accessed with both ReadAccountsBasic and ReadAccountsDetail, the most detailed level (ReadAccountsDetail) must be used.

  • These objects must not be returned without the ReadAccountsDetail permission:
    • OBReadAccount2/Data/Account/Account
    • OBReadAccount2/Data/Account/Servicer
  • If the ReadAccountsDetail is granted by the PSU:
    • OBReadAccount2/Data/Account/Account must be returned (1..n)
    • OBReadAccount2/Data/Account/Servicer may be returned if applicable to the account and ASPSP (0..1)

If the ReadPAN permission is granted by the PSU - the ASPSP may choose to populate the OBReadAccount2/Data/Account/Account/Identification with the unmasked PAN (if the PAN is being populated in the response).

Data Dictionary

NameOccurrenceXPathEnhancedDefinitionClassCodesPattern
OBReadAccount2
OBReadAccount2
OBReadAccount2

Data1..1OBReadAccount2/Data
OBReadDataAccount2

Account0..nOBReadAccount2/Data/AccountUnambiguous identification of the account to which credit and debit entries are made.OBAccount2

AccountId1..1OBReadAccount2/Data/Account/AccountIdA unique and immutable identifier used to identify the account resource. This identifier has no meaning to the account owner.Max40Text

Currency1..1OBReadAccount2/Data/Account/CurrencyIdentification of the currency in which the account is held.

Usage: Currency should only be used in case one and the same account number covers several currencies
and the initiating party needs to identify which currency needs to be used for settlement on the account.
ActiveOrHistoricCurrencyCode^[A-Z]{3,3}$
AccountType1..1OBReadAccount2/Data/Account/AccountTypeSpecifies the type of account (personal or business).OBExternalAccountType1CodeBusiness
Personal

AccountSubType1..1OBReadAccount2/Data/Account/AccountSubTypeSpecifies the sub type of account (product family group).OBExternalAccountSubType1CodeChargeCard
CreditCard
CurrentAccount
EMoney
Loan
Mortgage
PrePaidCard
Savings

Description0..1OBReadAccount2/Data/Account/DescriptionSpecifies the description of the account type.Max35Text

Nickname0..1OBReadAccount2/Data/Account/NicknameThe nickname of the account, assigned by the account owner in order to provide an additional means of identification of the account.Max70Text

Account0..nOBReadAccount2/Data/Account/AccountProvides the details to identify an account.OBCashAccount3

SchemeName1..1OBReadAccount2/Data/Account/Account/SchemeNameName of the identification scheme, in a coded form as published in an external list.Max40Text

Identification1..1OBReadAccount2/Data/Account/Account/IdentificationIdentification assigned by an institution to identify an account. This identification is known by the account owner.Max256Text

Name0..1OBReadAccount2/Data/Account/Account/NameName of the account, as assigned by the account servicing institution.

Usage: The account name is the name or names of the account owner(s) represented at an account level. The account name is not the product name or the nickname of the account.
Max70Text

SecondaryIdentification0..1OBReadAccount2/Data/Account/Account/SecondaryIdentificationThis is secondary identification of the account, as assigned by the account servicing institution.
This can be used by building societies to additionally identify accounts with a roll number (in addition to a sort code and account number combination).
Max34Text

Servicer0..1OBReadAccount2/Data/Account/ServicerParty that manages the account on behalf of the account owner, that is manages the registration and booking of entries on the account, calculates balances on the account and provides information about the account.OBBranchAndFinancialInstitutionIdentification4

SchemeName1..1OBReadAccount2/Data/Account/Servicer/SchemeNameName of the identification scheme, in a coded form as published in an external list.Max40Text

Identification1..1OBReadAccount2/Data/Account/Servicer/IdentificationUnique and unambiguous identification of the servicing institution.Max35Text

Usage Examples

Bulk - Detail Permission

The call to GET /accounts is the first step after an account-request is authorised. This will allow the AISP to discover which accounts (and AccountId values) are associated with the authorisation of consent.

In this scenario AccountId 22289 has a building society roll number; and AccountId 31820 does not.

The ReadAccountsDetail permission has been granted.

Request

Get Accounts Request
GET /accounts HTTP/1.1
Authorization: Bearer Az90SAOJklae
x-fapi-financial-id: OB/2017/001
x-fapi-customer-last-logged-time: Sun, 10 Sep 2017 19:43:31 GMT
x-fapi-customer-ip-address: 104.25.212.99
x-fapi-interaction-id: 93bac548-d2de-4546-b106-880a5018460d
Accept: application/json

Response

Get Accounts Response
HTTP/1.1 200 OK
x-fapi-interaction-id: 93bac548-d2de-4546-b106-880a5018460d
Content-Type: application/json

{
  "Data": {
    "Account": [
      {
        "AccountId": "22289",
        "Currency": "GBP",
        "AccountType": "Personal",
        "AccountSubType": "CurrentAccount",
        "Nickname": "Bills",
        "Account": {
          "SchemeName": "UK.OBIE.SortCodeAccountNumber",
          "Identification": "80200110203345",
          "Name": "Mr Kevin",
          "SecondaryIdentification": "00021"
        }
      },
      {
        "AccountId": "31820",
        "Currency": "GBP",
        "AccountType": "Personal",
        "AccountSubType": "CurrentAccount",
        "Nickname": "Household",
        "Account": {
          "SchemeName": "UK.OBIE.SortCodeAccountNumber",
          "Identification": "80200110203348",
          "Name": "Mr Kevin"
        }
      }
    ]
  },
  "Links": {
    "Self": "https://api.alphabank.com/open-banking/v2.0/accounts/"
  },
  "Meta": {
    "TotalPages": 1
  }
}


Specific Account - Detail Permission

An AISP may also retrieve the account resource details specifically for AccountId 22289.

The ReadAccountsDetail permission has been granted.

Request

Get Accounts Request
GET /accounts/22289 HTTP/1.1
Authorization: Bearer Az90SAOJklae
x-fapi-financial-id: OB/2017/001
x-fapi-customer-last-logged-time: Sun, 10 Sep 2017 19:43:31 GMT
x-fapi-customer-ip-address: 104.25.212.99
x-fapi-interaction-id: 93bac548-d2de-4546-b106-880a5018460d
Accept: application/json

Response

Get Accounts Response
HTTP/1.1 200 OK
x-fapi-interaction-id: 93bac548-d2de-4546-b106-880a5018460d
Content-Type: application/json

{
  "Data": {
    "Account": [
      {
        "AccountId": "22289",
        "Currency": "GBP",
        "AccountType": "Personal",
        "AccountSubType": "CurrentAccount",
        "Nickname": "Bills",
        "Account": {
          "SchemeName": "UK.OBIE.SortCodeAccountNumber",
          "Identification": "80200110203345",
          "Name": "Mr Kevin",
          "SecondaryIdentification": "00021"
        }
      }
    ]
  },
  "Links": {
    "Self": "https://api.alphabank.com/open-banking/v2.0/accounts/22289"
  },
  "Meta": {
    "TotalPages": 1
  }
}


Bulk - Basic Permission

The ReadAccountsBasic permission has been granted.

Request

Get Accounts Request
GET /accounts HTTP/1.1
Authorization: Bearer Az90SAOJklae
x-fapi-financial-id: OB/2017/001
x-fapi-customer-last-logged-time:  Sun, 10 Sep 2017 19:43:31 GMT
x-fapi-customer-ip-address: 104.25.212.99
x-fapi-interaction-id: 93bac548-d2de-4546-b106-880a5018460d
Accept: application/json

Response

Get Accounts Response
HTTP/1.1 200 OK
x-fapi-interaction-id: 93bac548-d2de-4546-b106-880a5018460d
Content-Type: application/json

{
  "Data": {
    "Account": [
      {
        "AccountId": "22289",
        "Currency": "GBP",
        "AccountType": "Personal",
        "AccountSubType": "CurrentAccount",
        "Nickname": "Bills"
      },
      {
        "AccountId": "31820",
        "Currency": "GBP",
        "AccountType": "Personal",
        "AccountSubType": "CurrentAccount",
        "Nickname": "Household"
      }
    ]
  },
  "Links": {
    "Self": "https://api.alphabank.com/open-banking/v2.0/accounts/"
  },
  "Meta": {
    "TotalPages": 1
  }
}