GET /v1/accounts/{accountNumber} {query-parameters}

Reads details about an account, with balances where required. It is assumed that a consent of the PSU to this access is already given and stored on the ASPSP system. The addressed details of this account depends then on the stored consent addressed by consentId, respectively the oAuth2 access token.

 

Path parameters

Attribute

Type

Description

accountNumber

String

The accountNumber is retrieved by using a Read Account List call. It is part of the Account model in the response.

 

Query parameters

Attribute

Type

Condition

Description

withBalance

Boolean

Optional

If contained, this response will include the booking balance, if granted by the PSU in the related consent and available by the ASPSP. Parameter might be ignored.

 

Request headers

Attribute

Type

Condition

Description

X-Request-ID

UUID

Mandatory

ID of the request, unique to the call, as determined by the initiating party (TPP).

Consent-ID

UUID

Mandatory

The consentId of the related AIS consent.

Authorization

String

Mandatory

The oAuth2 Bearer token obtained from the performed SCA performed prior to this request.

API-Key

String

Mandatory

Consumer key available on the developers portal.

PSU-IP-Address

String

Optional

The forwarded IP address header field consists of the corresponding http request IP address field between PSU and TPP.

PSU-IP-Port

String

Optional

The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.

PSU-Device-ID

String

Optional

UUID (Universally Unique Identifier) for a device, which is used by the PSU if available. UUID identifies either a device or a device dependent application installation. In case of an installation identification this ID needs to be unaltered until removal from device.

PSU-Geo-Location

String

Optional

The forwarded Geo Location of the corresponding http request between PSU and TPP if available.

 

Request body

No request body

 

Response Code

HTTP Response Code 200 (OK).

 

Response headers

Attribute

Type

Condition

Description

X-Request-ID

UUID

Mandatory

ID of the request, unique to the call, as determined by the initiating party (TPP).

 

Response body

Attribute

Type

Condition

Description

accountNumber

String

Mandatory

 The unique identifier of the account.

status

Account Status

Mandatory

The status of the account.

iban

String

Mandatory

The IBAN related to the account.

currency

String

Mandatory

The currency of the account.

name

String

Mandatory

A custom name of the account.

balance

Double

Mandatory

The available balance in the account.

product

String

Mandatory

The contractor for the account, either myPOS or iCard.

cashAccountType

String

Mandatory

E-Money.

bicSwift

String

Mandatory

The BIC/SWIFT code.

beneficiaryName

String

Mandatory

The name of the beneficirary for the account.

beneficiaryAddress

String

Mandatory

The address of the beneficiary for the account.

 

Example

 

Request

curl -X GET \
https://mp-psd2-api.mypos.com/v1/accounts/50044620073 \
-H 'API-Key: aGDmxHAmpMWUL1txqCsjEcOS' \
-H 'Authorization: Bearer oqeeWzoYfqkf1RsfyaB3hyNiLvY7GNAV6Kta7sGa9X' \
-H 'X-Request-ID: a552babc-7081-44e7-9361-61eb17e0bfd9' \
-H 'Consent-ID: 3c7816ee-3d51-4bf5-8ced-ece2af35d431'
import requests

url = "https://mp-psd2-api.mypos.com/v1/accounts/50044620073"

headers = {
    'API-Key': "aGDmxHAmpMWUL1txqCsjEcOS",
    'X-Request-ID': "a552babc-7081-44e7-9361-61eb17e0bfd9",
    'Authorization': "Bearer oqeeWzoYfqkf1RsfyaB3hyNiLvY7GNAV6Kta7sGa9X"
}

response = requests.request("GET", url, headers=headers)

print(response.text)
var request = require("request");

var options = { method: 'GET',
  url: 'https://mp-psd2-api.mypos.com/v1/accounts/50044620073',
  headers: {
    'Authorization': 'Bearer oqeeWzoYfqkf1RsfyaB3hyNiLvY7GNAV6Kta7sGa9X',
    'X-Request-ID': 'a552babc-7081-44e7-9361-61eb17e0bfd9',
    'API-Key': 'aGDmxHAmpMWUL1txqCsjEcOS'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
<?php

$request = new HttpRequest();
$request->setUrl('https://mp-psd2-api.mypos.com/v1/accounts/50044620073');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders(array(
  'Authorization' => 'Bearer oqeeWzoYfqkf1RsfyaB3hyNiLvY7GNAV6Kta7sGa9X',
  'X-Request-ID' => 'a552babc-7081-44e7-9361-61eb17e0bfd9',
  'API-Key' => 'aGDmxHAmpMWUL1txqCsjEcOS'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}

 

Response 
{
    "accountNumber": "50044620073",
    "status": "Active",
    "iban": "BG57INTF40015004462007",
    "currency": "PLN",
    "name": "PLN Account",
    "balance": 4.200,
    "product": "myPOS",
    "cashAccountType": "E-Money",
    "bicSwift": "MPOSGB2L",
    "beneficiaryName": "TEST",
    "beneficiaryAddress": "POL, TEST, TEST TEST"
}