---
title: "Get consent request"
method: GET
path: "/v1/consents/{consentId}"
tags: ["Account Information Service (AIS)"]
---

# Get consent request

`GET /v1/consents/{consentId}`

Returns the content of an account information consent object. 
This is returning the data for the TPP especially in cases, 
where the consent was directly managed between ASPSP and PSU e.g. in a redirect SCA Approach.

## Path parameters

- `consentId` string, required — ID of the corresponding consent object as returned by an account information consent request.

## Headers

- `X-Request-ID` string, required
- `Digest` string
- `Signature` string
- `TPP-Signature-Certificate` string, byte
- `PSU-IP-Address` string, ipv4
- `PSU-IP-Port` string
- `PSU-Accept` string
- `PSU-Accept-Charset` string
- `PSU-Accept-Encoding` string
- `PSU-Accept-Language` string
- `PSU-User-Agent` string
- `PSU-Http-Method` 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'
- `PSU-Device-ID` string
- `PSU-Geo-Location` string

## Response `200`

OK

- ConsentInformationResponse200Json — Body of the JSON response for a successfull get consent request.
  - `access` AccountAccess, required — Requested access services for a consent.
    - `accounts` AccountReference16CH[] — Is asking for detailed account information. If the array is empty in a request, the TPP is asking for an accessible account list. This may be restricted in a PSU/ASPSP authorization dialogue. If the array is empty, also the arrays for balances, additionalInformation sub attributes or transactions shall be empty, if used.
      - `iban` string — IBAN of an account.
      - `otherAccountIdentification` string — Other payment account Identifier. adapted from ISO pain.001.001.03.ch.02 GenericAccountIdentification1-CH
      - `currency` string — ISO 4217 Alpha 3 currency code.
      - `cashAccountType` string — ExternalCashAccountType1Code from ISO 20022.
    - `balances` AccountReference16CH[] — Is asking for balances of the addressed accounts. If the array is empty in the request, the TPP is asking for the balances of all accessible account lists. This may be restricted in a PSU/ASPSP authorization dialogue. If the array is empty, also the arrays for accounts, additionalInformation sub attributes or transactions shall be empty, if used.
      - `iban` string — IBAN of an account.
      - `otherAccountIdentification` string — Other payment account Identifier. adapted from ISO pain.001.001.03.ch.02 GenericAccountIdentification1-CH
      - `currency` string — ISO 4217 Alpha 3 currency code.
      - `cashAccountType` string — ExternalCashAccountType1Code from ISO 20022.
    - `transactions` AccountReference16CH[] — Is asking for transactions of the addressed accounts. If the array is empty in the request, the TPP is asking for the transactions of all accessible account lists. This may be restricted in a PSU/ASPSP authorization dialogue. If the array is empty, also the arrays for accounts, additionalInformation sub attributes or balances shall be empty, if used.
      - `iban` string — IBAN of an account.
      - `otherAccountIdentification` string — Other payment account Identifier. adapted from ISO pain.001.001.03.ch.02 GenericAccountIdentification1-CH
      - `currency` string — ISO 4217 Alpha 3 currency code.
      - `cashAccountType` string — ExternalCashAccountType1Code from ISO 20022.
    - `additionalInformation` AdditionalInformationAccess — Optional if supported by API provider. Is asking for additional information as added within this structured object. The usage of this data element requires at least one of the entries "accounts", "transactions" or "balances" also to be contained in the object. If detailed accounts are referenced, it is required in addition that any account addressed within the additionalInformation attribute is also addressed by at least one of the attributes "accounts", "transactions" or "balances".
      - `ownerName` AccountReference16CH[] — Is asking for account owner name of the accounts referenced within. If the array is empty in the request, the TPP is asking for the account owner name of all accessible accounts. This may be restricted in a PSU/ASPSP authorization dialogue. If the array is empty, also the arrays for accounts, balances or transactions shall be empty, if used. The ASPSP will indicate in the consent resource after a successful authorisation, whether the ownerName consent can be accepted by providing the accounts on which the ownerName will be delivered. This array can be empty.
        - `iban` string — IBAN of an account.
        - `otherAccountIdentification` string — Other payment account Identifier. adapted from ISO pain.001.001.03.ch.02 GenericAccountIdentification1-CH
        - `currency` string — ISO 4217 Alpha 3 currency code.
        - `cashAccountType` string — ExternalCashAccountType1Code from ISO 20022.
      - `trustedBeneficiaries` AccountReference16CH[] — Optional if supported by API provider. Is asking for the trusted beneficiaries related to the accounts referenced within and related to the PSU. If the array is empty in the request, the TPP is asking for the lists of trusted beneficiaries of all accessible accounts. This may be restricted in a PSU/ASPSP authorization dialogue by the PSU if also the account lists addressed by the tags “accounts”, “balances” or “transactions” are empty. The ASPSP will indicate in the consent resource after a successful authorisation, whether the trustedBeneficiaries consent can be accepted by providing the accounts on which the list of trusted beneficiaries will be delivered. This array can be empty.
        - `iban` string — IBAN of an account.
        - `otherAccountIdentification` string — Other payment account Identifier. adapted from ISO pain.001.001.03.ch.02 GenericAccountIdentification1-CH
        - `currency` string — ISO 4217 Alpha 3 currency code.
        - `cashAccountType` string — ExternalCashAccountType1Code from ISO 20022.
    - `availableAccounts` 'allAccounts' | 'allAccountsWithOwnerName' — Optional if supported by API provider. The values "allAccounts" and "allAccountsWithOwnerName" are admitted. The support of the "allAccountsWithOwnerName" value by the ASPSP is optional.
    - `availableAccountsWithBalance` 'allAccounts' | 'allAccountsWithOwnerName' — Optional if supported by API provider. The values "allAccounts" and "allAccountsWithOwnerName" are admitted. The support of the "allAccountsWithOwnerName" value by the ASPSP is optional.
    - `allPsd2` 'allAccounts' | 'allAccountsWithOwnerName' — Optional if supported by API provider. The values "allAccounts" and "allAccountsWithOwnerName" are admitted. The support of the "allAccountsWithOwnerName" value by the ASPSP is optional.
    - `restrictedTo` CashAccountType[] — If the TPP requests access to accounts via availableAccounts (List of available accounts), global or bank driven consents, the TPP may include this element to restrict access to the referred account types. Absence of the element is interpreted as "no restriction" (therefore access to accounts of all types is requested). The element may only occur, if each of the elements - accounts - balances - transactions is either not present or contains an empty array.
  - `recurringIndicator` boolean, required — "true", if the consent is for recurring access to the account data. "false", if the consent is for one access to the account data.
  - `validUntil` string, date, required — This parameter is defining a valid until date (including the mentioned date) for the requested consent. The content is the local ASPSP date in ISO-Date format, e.g. 2017-10-30. Future dates might get adjusted by ASPSP. If a maximal available date is requested, a date in far future is to be used: "9999-12-31". In both cases the consent object to be retrieved by the get consent request will contain the adjusted date.
  - `frequencyPerDay` integer, required — This field indicates the requested maximum frequency for an access without PSU involvement per day. For a one-off access, this attribute is set to "1". The frequency needs to be greater equal to one. If not otherwise agreed bilaterally between TPP and ASPSP, the frequency is less equal to 4.
  - `lastActionDate` string, date, required — This date is containing the date of the last action on the consent object either through the XS2A interface or the PSU/ASPSP interface having an impact on the status.
  - `consentStatus` 'received' | 'rejected' | 'valid' | 'revokedByPsu' | 'expired' | 'terminatedByTpp' | 'partiallyAuthorised', required — This is the overall lifecycle status of the consent. Valid values are: - 'received': The consent data have been received and are technically correct. The data is not authorised yet. - 'rejected': The consent data have been rejected e.g. since no successful authorisation has taken place. - 'valid': The consent is accepted and valid for GET account data calls and others as specified in the consent object. - 'revokedByPsu': The consent has been revoked by the PSU towards the ASPSP. - 'expired': The consent expired. - 'terminatedByTpp': The corresponding TPP has terminated the consent by applying the DELETE method to the consent resource. - 'partiallyAuthorised': The consent is due to a multi-level authorisation, some but not all mandated authorisations have been performed yet. The ASPSP might add further codes. These codes then shall be contained in the ASPSP's documentation of the XS2A interface and has to be added to this API definition as well.
  - `_links` LinksGetConsent — A list of hyperlinks to be recognised by the TPP. Links of type "account" and/or "cardAccount", depending on the nature of the consent.
    - `account` HrefType — Link to a resource.
      - `href` string — Link to a resource.
    - `card-account` HrefType — Link to a resource.
      - `href` string — Link to a resource.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not found
- `405` — Method Not Allowed
- `406` — Not Acceptable
- `408` — Request Timeout
- `409` — Conflict
- `415` — Unsupported Media Type
- `429` — Too Many Requests
- `500` — Internal Server Error
- `503` — Service Unavailable

---

[API](https://skmtc.net/openbankingproject-ch/apis/swiss-nextgen-banking-api-framework.md) · [All operations](https://skmtc.net/openbankingproject-ch/apis/swiss-nextgen-banking-api-framework/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openbankingproject-ch/swiss-nextgen-banking-api-framework/revisions/c32e86db40b4/schema)
