# Retrieve list of consents.

Returns a list of consents that can be filtered with a number of optional parameters and ordered descending by status updated datetime value

Endpoint: GET /consents/v2
Version: all
Security: Bearer

## Security:

  - `Bearer` (unknown)
    http bearer scopes: api:consent

## Query parameters:

  - `configurationName` (string)
    Optional filter to get consents only for a particular configuration name for the client.

  - `consentStatus` (string)
    Optional filter to get consents with a particular status.

  - `providerId` (integer)
    Optional filter to get consents only for a particular provider id.

  - `customerReference` (string)
    Optional filter to get consents that match the customer reference exactly.

  - `userId` (string)
    Optional filter to get consents associated with userId

  - `dataSourceType` (string)
    Optional filter to get consents of a particular type (OpenBanking vs. CreditInformation).

  - `from` (string)
    Optional filter to get consents which have been created/updated after the from date.

  - `to` (string)
    Optional filter to get consents which have been created/updated before the to date.

  - `offset` (integer)
    Number of consents to skip.

  - `limit` (integer)
    Maximum number of consents in the response.

## Response 200:

  - `200` (unknown)
    Returns the list of consents.

## Response 200 fields (application/json):

  - `consentId` (string)
    Unique reference for the consent.

  - `applicationId` (string)
    Application Id for the client.

  - `userId` (string)
    Unique reference for the User the consent is associated with.

  - `providerId` (integer)
    Provider Id for the consent.

  - `providerName` (string)
    Provider name for the consent.

  - `configurationName` (string)
    Specific configuration of the client.

  - `customerReference` (string)
    Reference for the consent provided by the client.

  - `consentDurationType` (string)
    Type of the consent based on duration.
    Enum: "Single", "Limited", "Infinite"

  - `consentStatus` (string)
    Enum: "Pending", "Active", "Revoked", "Abandoned", "Failed", "Expired"

  - `consentStart` (string)
    Start date for the consent.

  - `consentEnd` (string)
    End date for the consent.

  - `duration` (string)
    Duration of consent in ISO8601 format.

  - `daysOfHistoricalTransactions` (integer)
    Number of days of transactions that can be requested from the bank.

  - `statusUpdated` (string)
    Date of last status update of the consent.

  - `statusDetails` (string)
    Details for the current status.

  - `permissions` (array)
    List of permissions for the consent.

  - `invitationId` (string)
    Associated Invitation Id

  - `journeyType` (string)
    Used to indicate the type of journey that was performed
If null it means the default(initial) journey was performed.
    Enum: "Reauthentication", "Reconfirmation"

  - `dataSourceType` (string)
    Enum: "OpenBanking", "CreditInformation", "UserSupplied"

  - `dataSource` (string)
    Enum: "Akoya", "CIS", "Finverse", "OAuth", "SaltEdge", "Yapily", "Yodlee", "DocumentService"

## Response 400:

  - `400` (unknown)
    Invalid input parameters were provided.

## Response 400 fields (application/json):

  - `code` (string)
    Error code.

  - `description` (string)
    Error message.

  - `details` (string)
    Error details.

  - `correlationId` (string)
    User transaction tracking Id

## Response 401:

  - `401` (unknown)
    Client is not authorized.

## Response 500:

  - `500` (unknown)
    Unable to get consents due to an unexpected failure.

## Response 500 fields (application/json):

  - `code` (string)
    Error code.

  - `description` (string)
    Error message.

  - `details` (string)
    Error details.

  - `correlationId` (string)
    User transaction tracking Id

