GET /v1/consents/{consentId}

Returns the consent of an account information consent object

 

Query parameters

No query parameters.

 

Path parameters

Attribute

Type

Description

consentId

String

The consent identification assigned to the created resource.

 

Request header

Attribute

Type

Condition

Description

X-Request-ID

String

Mandatory

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

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.

 

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

access

Account Access

Mandatory

 Information about the provided access. (AIS, PIS, COF)

validUntil

ISODate

Mandatory

 The validity of the consent.

consentStatus

Consent

Status

Mandatory

The status of the consent resource.

 

Example

 

Request

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

url = "https://mp-psd2-api.mypos.com/v1/consents/3c7816ee-3d51-4bf5-8ced-ece2af35d431"

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/consents/3c7816ee-3d51-4bf5-8ced-ece2af35d431',
  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/consents/3c7816ee-3d51-4bf5-8ced-ece2af35d431');
$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 
{
    "consentId": "3c7816ee-3d51-4bf5-8ced-ece2af35d431",
    "consentStatus": "Valid",
    "validUntil": "2019-10-05T13:58:58.643",
    "access": {
        "balances": {
            "iban": [
                "BG49INTF40015055350097",
                "BG57INTF40015015863678",
                "BG19INTF40015026159069",
            ]
        },
        "transactions": {
            "iban": [
                "BG49INTF40015055350097",
                "BG94INTF40015055648629",
                "BG57INTF40015004462007"
            ]
        },
        "funds": {
            "iban": [
                "BG49INTF40015055350097",
                "BG57INTF40015004462007"
            ]
        }
    }
}