LFI · Consent Management Interface · API Guide

Consent Management Interface — API Guide 6 min read

This guide explains how to use the API Hub's Consent Manager API to retrieve and manage the data needed to populate each page of the LFI Consent Management Interface (CMI). See the per-product Requirements pages (Bank Data Sharing, Bank Service Initiation, Insurance Data Sharing) for what each page must display, and the matching User Experience pages for interactive wireframes.

01 Before you begin

Prerequisites

Before making Consent Manager API calls the LFI must:

  1. Have a working mTLS connection to the API Hub — verify with GET/hello-mtls
  2. Patch the end user identifier onto each consent using PATCH/consents/{consentId} so that consents can be retrieved by user
02 Primary lookup

Retrieving user consents

To retrieve all consents associated with a customer use:

where userId is the LFI's unique identifier for the customer.

The response returns a paginated array of consent objects. Each consent object contains the fields needed to populate the dashboard cards and detail pages described in the per-product Requirements pages (Bank Data Sharing, Bank Service Initiation, Insurance Data Sharing).

Query parameters

ParameterRequiredDescription
consentTypeNoFilter by consent type
statusNoFilter by consent status
pageNoPage number for paginated results
pageSizeNoNumber of records per page

Alternative retrieval operations

OperationUse when
GET/consents/{consentId}You need a single consent by its ID
GET/accounts/{accountId}/consentsYou need all consents linked to a specific account
GET/consentsYou need to search consents by criteria other than user
03 Field-by-field

Dashboard — mapping API fields to CMI

The sections below map each CMI field from the per-product Requirements (Bank Data Sharing, Bank Service Initiation, Insurance Data Sharing) to the API response property and any transformation the LFI must apply.

Data Sharing

#CMI fieldOperationJSONPathGuidelines
1TPP nameGET /psu/{userId}/consents$..TradingName or $.data[*].tpp.tppNameIf a trading name is supplied in the consent, display it. Otherwise fall back to the TPP name from the Trust Framework.
2Last data sharedGET /psu/{userId}/consents$.data[*].consentUsage.lastDataShared
3Connection expiresGET /psu/{userId}/consents$.data[*].request.consent.ExpirationDateTime
4StatusGET /psu/{userId}/consents$.data[*].statusMap to user-friendly label per Status labels.
5Consent IDGET /psu/{userId}/consents$.data[*].idDisplay truncated with copy button.
6IBANGET /psu/{userId}/consents$.data[*].accountIdsThe surrogate account identifiers patched onto the consent are returned. The LFI must replace these with the real IBAN — PII is not stored in the API Hub.
7Data permissionsGET /psu/{userId}/consents$.data[*].request.consent.PermissionsPermissions must be displayed using the standardised data cluster language provided in the Customer Data standards. Map each permission code to its correct language label.
8First ConnectedGET /psu/{userId}/consents or GET /consent-groups/{consentGroupId}/consents$.data[*].consentBody.Data.CreationDateTimeIf the consent has a BaseConsentId, this must be the CreationDateTime of the first consent in the consent group. The BaseConsentId value is used as the consentGroupId parameter. If BaseConsentId is not set, use the consent's own CreationDateTime.
9Last UpdatedGET /psu/{userId}/consents or GET /consent-groups/{consentGroupId}/consents$.data[*].consentBody.Data.CreationDateTime or $.data[*].updatedAtIf the consent has a BaseConsentId, this must be the CreationDateTime of the latest consent in the consent group. If BaseConsentId is not set, use the consent's updatedAt value.

Single Instant Payment

#CMI fieldOperationJSONPathGuidelines
1TPP nameGET /psu/{userId}/consents$..TradingName or $.data[*].tpp.tppNameSame trading name / TPP name fallback as Data Sharing.
2Total paidGET /psu/{userId}/consents or GET /payment-log$.data[*].consentBody.Data.PaymentConsumption.CumulativeValueOfPayments or $.data[*].requestBody.Data.Instruction.Amount.AmountFor single instant payments the amount matches the payment value.
3Permission Cancelled / Expired / ConsumedGET /psu/{userId}/consents$.data[*].updatedAtTerminal states — the last update date reflects when the consent entered that state.
4Last payment madeGET /psu/{userId}/consents$.data[*].consentUsage.lastServiceInitiationAttempt
5Payment toGET /psu/{userId}/consents or GET /payment-log$.data[*].request.consent.PersonalIdentifiableInformation or $.data[*].requestBody.Data.PersonalIdentifiableInformationUse the value of Creditor.Name from either the consent or the payment initiation request, depending on the payment type.
6IBANGET /psu/{userId}/consents or GET /payment-logSame as aboveUse the value of CreditorAccount.Identification from either the consent or the payment initiation request.
7ReferenceGET /payment-log$.data[*].requestBody.Data.CreditorReference
8Payment PurposeGET /payment-log$.data[*].requestBody.Data.PaymentPurposeCodeThe payment request provides the Aani purpose code, which must be transposed to the correct purpose code description based on Aani reference information.
9From accountGET /psu/{userId}/consents$.data[*].accountIds or $.data[*].request.consent.PersonalIdentifiableInformationThe surrogate account identifiers patched onto the consent must be replaced with the real IBAN. Alternatively, if the TPP provided the debtor IBAN on the consent, use DebtorAccount.Identification.
10Payment RulesGET /psu/{userId}/consents$.data[*].request.consent.ControlParametersThe displayed properties depend on the values found in control parameters, which differ by payment type. Refer to the API spec for available properties.
11You started this permissionGET /psu/{userId}/consents or GET /consent-groups/{consentGroupId}/consents$.data[*].consentBody.Data.CreationDateTimeSame consent-group logic as Data Sharing "First Connected" — use the first consent's CreationDateTime when BaseConsentId is set.
12You cancelled this permissionGET /psu/{userId}/consents$.data[*].updatedAt

Multi Payment (all subtypes)

Multi Payment consents follow the same field mappings as Single Instant Payment, with these additions:

#CMI fieldOperationJSONPathGuidelines
2Total paid to dateGET /psu/{userId}/consents or GET /payment-log$.data[*].consentBody.Data.PaymentConsumption.CumulativeValueOfPaymentsFor long-lived consents the CumulativeValueOfPayments property is maintained to provide the cumulative value of all payments.
04 List of updates

Connection history

To provide the List of Updates view described in the Bank Data Sharing Requirements, use:

where consentGroupId is the value of BaseConsentId on the current consent.

This returns all consents in a consent group — consents that are linked by the same BaseConsentId.

How BaseConsentId works

Connection history is driven by “revisions” to consents orchestrated by TPPs: an existing consent is replaced by a new consent with updated permissions or data-access terms. The TPP links the new consent to the original by setting BaseConsentId on the new consent to the ConsentId of the original consent. All subsequent consents sharing the same history use the same BaseConsentId value.

End user isolation risk

When a consent is created it contains no customer information — the end user identity is only added later when the LFI patches in the end user ID. This means two consents sharing the same BaseConsentId are not guaranteed to belong to the same customer. LFIs must ensure that only consents belonging to the same end user are returned when resolving related consents.

Note

The GET/consents/{consentId}/audit operation is not the correct way to retrieve connection history. It relates to changes within a single consent, not changes across multiple consents linked by BaseConsentId.

Connection history — Data Sharing & Insurance

#CMI fieldJSONPathGuidelines
1TPP name$..TradingName or $.data[*].tpp.tppNameSame trading name / TPP name fallback.
2Consent ID$.data[*].id
3IBAN (Data Sharing)$.data[*].accountIdsReplace surrogate IDs with real IBANs.
4Policy number (Insurance)$.data[*].supplementaryInformation.{{policyNumber}}Same supplementaryInformation or insurancePolicyIds approach.
5Policy expires (Insurance)$.data[*].supplementaryInformation.{{policyExpires}}Same approach.
6Data permissions$.data[*].request.consent.PermissionsMap permission codes to standardised language.
7Connection date (shown as label)$.data[*].consentBody.Data.CreationDateTime

Connection history — Service Initiation

#CMI fieldJSONPathGuidelines
1Payment to$.data[*].request.consent.PersonalIdentifiableInformation or payment-log $.data[*].requestBody.Data.PersonalIdentifiableInformationUse Creditor.Name from the consent group member or the payment initiation request.
2IBANSame as aboveUse CreditorAccount.Identification.
3Reference$.data[*].request.consent.DebtorReference
4Payment Purpose$.data[*].request.consent.PaymentPurposeCodeTranspose to purpose code description.
5From account$.data[*].accountIds or $.data[*].request.consent.PersonalIdentifiableInformationReplace surrogate IDs with real IBANs, or use DebtorAccount.Identification if provided by the TPP.
6Payment Rules$.data[*].request.consent.ControlParametersProperties vary by payment type.
7Connection date (shown as label)$.data[*].consentBody.Data.CreationDateTime
05 Payment log

Payment history

To provide the Payment History tab described in the Bank Service Initiation Requirements, use:

This returns a summary of all payments for a given consent. Each payment log entry contains the fields needed to populate a single row in the Payment History tab.

#CMI fieldJSONPathGuidelines
1TPP name$..TradingName or $.data[*].tpp.tppNameSame trading name / TPP name fallback.
2Total paid to date$.data[*].requestBody.Data.Instruction.Amount.AmountSum the amounts of all successful payments returned by this operation.
3Payment date/time$.data[*].paymentResponse.creationDateTimeDisplay as date and time, e.g. 15/02/2025 14:22.
4Status$.data[*].paymentResponse.statusMap API status to display label: AcceptedSettlementCompleted, AcceptedCreditSettlementCompleted, AcceptedWithoutPostingSuccessful; RejectedFailed; PendingPending.
5Amount$.data[*].requestBody.Data.Instruction.Amount.AmountDisplay with currency symbol.
6Purpose$.data[*].requestBody.Data.PaymentPurposeCodeThe payment request provides the Aani purpose code. Transpose to the purpose code description, e.g. ACMAgency Commission (ACM).
7Reference$.data[*].requestBody.Data.CreditorReference
06 Action revoke

Revoking a consent

When the customer confirms a revocation action on the CMI, the LFI must immediately revoke the consent via:

This also revokes any associated tokens. The request body must include revokedBy set to LFI.InitiatedByUser.

json
{
  "revokedBy": "LFI.InitiatedByUser"
}

To revoke all consents in a consent group at once, use:

07 Change history

Audit trail

To inspect the change history of a single consent use:

This returns a chronological list of all operations performed on the consent, including the caller details and patch content. This is useful for debugging and compliance but is not the same as connection history.

08 Translate API to UI

Status code mapping

The Consent Manager API returns status codes that must be mapped to user-friendly labels. See Status labels (Bank Service Initiation) for the full mapping table.

API statusCMI label
AuthorizedActive
AwaitingAuthorizationPending
RevokedCancelled
SuspendedSuspended
ConsumedConsumed (or Successful/Failed for payments)
ExpiredExpired
RejectedRejected

If a status code does not appear in this list, it should be normalised by splitting on word boundaries and maintaining case. If the status requires truncation for display, return the whole of the leftmost word.