openapi: 3.0.0
info:
  contact:
    email: hello@biza.io
    name: Biza.io
    url: https://biza.io/
  description: >-
    Programmatic access to a Data Holder's consent store: Grants, their history,
    and the account, notification, secondary-user and multi-party-sharing
    resources around them. See the guide linked below for how each operation
    behaves.
  license:
    name: Commercial
    url: https://biza.io/
  title: Consent API
  version: 1.0.0
servers:
  - url: https://consent.data.holder/dio-au/v1
security:
  - ConsentApiOAuth:
      - biza-au:haas:consent:read
tags:
  - name: Grants
    description: >-
      Listing, retrieving and revoking the Grants visible to a named User or
      Principal.
  - name: Accounts
    description: >-
      Reading the accounts visible to a named User or Principal, including
      account details scoped to a single Grant.
  - name: Notifications
    description: Reading and updating a User's notification preferences for one account.
  - name: Secondary Users
    description: Reading and updating the secondary users an account owner has authorised.
  - name: DOMS
    description: >-
      Proposing, reading and resolving Disclosure Option Management Service
      requests on a joint account.
  - name: Profiles
    description: >-
      Discovering the profiles a User can act as, and each one's vulnerability
      status.
  - name: Discovery
    description: What this deployment supports.
  - name: App-to-App
    description: >-
      Exchanging a holder's own session token for a request_uri-bound act_token,
      for the app2app consent-flow handoff (RFC 8693).
externalDocs:
  description: Consent API guide
  url: https://guides.biza.io/haas/developer-resources/consent-api
paths:
  /{realmName}/meta/endpoints:
    get:
      description: >-
        Report the request and response versions this deployment serves for each
        operation.
      operationId: getEndpointMeta
      parameters:
        - $ref: '#/components/parameters/PathRealmName'
        - $ref: '#/components/parameters/HeaderXHaasMaxV'
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
      responses:
        '200':
          $ref: '#/components/responses/GetEndpointMeta'
        '400':
          $ref: '#/components/responses/ErrorBadRequest'
        '401':
          $ref: '#/components/responses/ErrorUnauthorised'
        '403':
          $ref: '#/components/responses/ErrorForbidden'
        '404':
          $ref: '#/components/responses/ErrorNotFound'
        '406':
          $ref: '#/components/responses/ErrorUnsupportedVersion'
      security:
        - ConsentApiOAuth:
            - biza-au:haas:consent:read
      summary: Get Endpoint Meta
      tags:
        - Discovery
  /{realmName}/user/{userId}/grant:
    get:
      description: >-
        List the Grants visible to a named User, including those created by
        related parties such as joint account holders.
      operationId: listUserGrants
      parameters:
        - $ref: '#/components/parameters/PathRealmName'
        - $ref: '#/components/parameters/PathUserId'
        - $ref: '#/components/parameters/QueryPrincipalId'
        - $ref: '#/components/parameters/QueryGrantStatus'
        - $ref: '#/components/parameters/QueryPage'
        - $ref: '#/components/parameters/QueryPageSize'
        - $ref: '#/components/parameters/HeaderXHaasV'
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
      responses:
        '200':
          $ref: '#/components/responses/ListGrants'
        '400':
          $ref: '#/components/responses/ErrorBadRequest'
        '401':
          $ref: '#/components/responses/ErrorUnauthorised'
        '403':
          $ref: '#/components/responses/ErrorForbidden'
        '404':
          $ref: '#/components/responses/ErrorNotFound'
        '406':
          $ref: '#/components/responses/ErrorUnsupportedVersion'
      security:
        - ConsentApiOAuth:
            - biza-au:haas:consent:read
      summary: List User Grants
      tags:
        - Grants
  /{realmName}/user/{userId}/grant/{grantId}:
    get:
      description: Retrieve one Grant as a named User sees it.
      operationId: getUserGrant
      parameters:
        - $ref: '#/components/parameters/PathRealmName'
        - $ref: '#/components/parameters/PathUserId'
        - $ref: '#/components/parameters/PathGrantId'
        - $ref: '#/components/parameters/HeaderXHaasV'
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
      responses:
        '200':
          $ref: '#/components/responses/GetGrant'
        '400':
          $ref: '#/components/responses/ErrorBadRequest'
        '401':
          $ref: '#/components/responses/ErrorUnauthorised'
        '403':
          $ref: '#/components/responses/ErrorForbidden'
        '404':
          $ref: '#/components/responses/ErrorNotFound'
        '406':
          $ref: '#/components/responses/ErrorUnsupportedVersion'
      security:
        - ConsentApiOAuth:
            - biza-au:haas:consent:read
      summary: Get User Grant
      tags:
        - Grants
    delete:
      description: >-
        Revoke a Grant as the User who created it, so tokens issued against it
        are no longer honoured.
      operationId: revokeUserGrant
      parameters:
        - $ref: '#/components/parameters/PathRealmName'
        - $ref: '#/components/parameters/PathUserId'
        - $ref: '#/components/parameters/PathGrantId'
        - $ref: '#/components/parameters/HeaderXHaasV'
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
      responses:
        '200':
          $ref: '#/components/responses/GetGrant'
        '400':
          $ref: '#/components/responses/ErrorBadRequest'
        '401':
          $ref: '#/components/responses/ErrorUnauthorised'
        '403':
          $ref: '#/components/responses/ErrorForbidden'
        '404':
          $ref: '#/components/responses/ErrorNotFound'
        '406':
          $ref: '#/components/responses/ErrorUnsupportedVersion'
      security:
        - ConsentApiOAuth:
            - biza-au:haas:consent:revoke
      summary: Revoke User Grant
      tags:
        - Grants
  /{realmName}/user/{userId}/grant/{grantId}/history:
    get:
      description: Retrieve the lifecycle history of one Grant as a named User sees it.
      operationId: getUserGrantHistory
      parameters:
        - $ref: '#/components/parameters/PathRealmName'
        - $ref: '#/components/parameters/PathUserId'
        - $ref: '#/components/parameters/PathGrantId'
        - $ref: '#/components/parameters/QueryPage'
        - $ref: '#/components/parameters/QueryPageSize'
        - $ref: '#/components/parameters/HeaderXHaasV'
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
      responses:
        '200':
          $ref: '#/components/responses/ListGrantHistory'
        '400':
          $ref: '#/components/responses/ErrorBadRequest'
        '401':
          $ref: '#/components/responses/ErrorUnauthorised'
        '403':
          $ref: '#/components/responses/ErrorForbidden'
        '404':
          $ref: '#/components/responses/ErrorNotFound'
        '406':
          $ref: '#/components/responses/ErrorUnsupportedVersion'
      security:
        - ConsentApiOAuth:
            - biza-au:haas:consent:read
      summary: Get User Grant History
      tags:
        - Grants
  /{realmName}/principal/{principalId}/grant:
    get:
      description: >-
        List the Grants held against a named Principal, across every User
        attached to it.
      operationId: listPrincipalGrants
      parameters:
        - $ref: '#/components/parameters/PathRealmName'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/QueryGrantStatus'
        - $ref: '#/components/parameters/QueryPage'
        - $ref: '#/components/parameters/QueryPageSize'
        - $ref: '#/components/parameters/HeaderXHaasV'
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
      responses:
        '200':
          $ref: '#/components/responses/ListGrants'
        '400':
          $ref: '#/components/responses/ErrorBadRequest'
        '401':
          $ref: '#/components/responses/ErrorUnauthorised'
        '403':
          $ref: '#/components/responses/ErrorForbidden'
        '404':
          $ref: '#/components/responses/ErrorNotFound'
        '406':
          $ref: '#/components/responses/ErrorUnsupportedVersion'
      security:
        - ConsentApiOAuth:
            - biza-au:haas:consent:read
      summary: List Principal Grants
      tags:
        - Grants
  /{realmName}/principal/{principalId}/grant/{grantId}:
    get:
      description: Retrieve one Grant held against a named Principal.
      operationId: getPrincipalGrant
      parameters:
        - $ref: '#/components/parameters/PathRealmName'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/PathGrantId'
        - $ref: '#/components/parameters/HeaderXHaasV'
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
      responses:
        '200':
          $ref: '#/components/responses/GetGrant'
        '400':
          $ref: '#/components/responses/ErrorBadRequest'
        '401':
          $ref: '#/components/responses/ErrorUnauthorised'
        '403':
          $ref: '#/components/responses/ErrorForbidden'
        '404':
          $ref: '#/components/responses/ErrorNotFound'
        '406':
          $ref: '#/components/responses/ErrorUnsupportedVersion'
      security:
        - ConsentApiOAuth:
            - biza-au:haas:consent:read
      summary: Get Principal Grant
      tags:
        - Grants
  /{realmName}/principal/{principalId}/grant/{grantId}/history:
    get:
      description: >-
        Retrieve the lifecycle history of one Grant held against a named
        Principal.
      operationId: getPrincipalGrantHistory
      parameters:
        - $ref: '#/components/parameters/PathRealmName'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/PathGrantId'
        - $ref: '#/components/parameters/QueryPage'
        - $ref: '#/components/parameters/QueryPageSize'
        - $ref: '#/components/parameters/HeaderXHaasV'
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
      responses:
        '200':
          $ref: '#/components/responses/ListGrantHistory'
        '400':
          $ref: '#/components/responses/ErrorBadRequest'
        '401':
          $ref: '#/components/responses/ErrorUnauthorised'
        '403':
          $ref: '#/components/responses/ErrorForbidden'
        '404':
          $ref: '#/components/responses/ErrorNotFound'
        '406':
          $ref: '#/components/responses/ErrorUnsupportedVersion'
      security:
        - ConsentApiOAuth:
            - biza-au:haas:consent:read
      summary: Get Principal Grant History
      tags:
        - Grants
  /{realmName}/user/{userId}/principal/{principalId}/account/{accountId}/grant/{grantId}:
    delete:
      description: >-
        Withdraw an account you own from a Grant another joint account owner
        created.
      operationId: withdrawJointAccountSharingApprovalForGrant
      parameters:
        - $ref: '#/components/parameters/PathRealmName'
        - $ref: '#/components/parameters/PathUserId'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/PathAccountId'
        - $ref: '#/components/parameters/PathGrantId'
        - $ref: '#/components/parameters/HeaderXHaasV'
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
      responses:
        '200':
          $ref: '#/components/responses/GetGrant'
        '400':
          $ref: '#/components/responses/ErrorBadRequest'
        '401':
          $ref: '#/components/responses/ErrorUnauthorised'
        '403':
          $ref: '#/components/responses/ErrorForbidden'
        '404':
          $ref: '#/components/responses/ErrorNotFound'
        '406':
          $ref: '#/components/responses/ErrorUnsupportedVersion'
      security:
        - ConsentApiOAuth:
            - biza-au:haas:consent:revoke
      summary: Withdraw Joint Account Sharing Approval For Grant
      tags:
        - Grants
  /{realmName}/user/{userId}/principal/{principalId}/account:
    get:
      description: List the accounts the asserted User sees under a named Principal.
      operationId: listUserPrincipalAccounts
      parameters:
        - $ref: '#/components/parameters/PathRealmName'
        - $ref: '#/components/parameters/PathUserId'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/HeaderXHaasV'
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
      responses:
        '200':
          $ref: '#/components/responses/ListUserPrincipalAccounts'
        '400':
          $ref: '#/components/responses/ErrorBadRequest'
        '401':
          $ref: '#/components/responses/ErrorUnauthorised'
        '403':
          $ref: '#/components/responses/ErrorForbidden'
        '404':
          $ref: '#/components/responses/ErrorNotFound'
        '406':
          $ref: '#/components/responses/ErrorUnsupportedVersion'
      security:
        - ConsentApiOAuth:
            - biza-au:haas:consent:read
      summary: List User Principal Accounts
      tags:
        - Accounts
  /{realmName}/user/{userId}/principal/{principalId}/account/{accountId}:
    get:
      description: Retrieve one account the asserted User sees under a named Principal.
      operationId: getUserPrincipalAccount
      parameters:
        - $ref: '#/components/parameters/PathRealmName'
        - $ref: '#/components/parameters/PathUserId'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/PathAccountId'
        - $ref: '#/components/parameters/HeaderXHaasV'
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
      responses:
        '200':
          $ref: '#/components/responses/GetUserPrincipalAccount'
        '400':
          $ref: '#/components/responses/ErrorBadRequest'
        '401':
          $ref: '#/components/responses/ErrorUnauthorised'
        '403':
          $ref: '#/components/responses/ErrorForbidden'
        '404':
          $ref: '#/components/responses/ErrorNotFound'
        '406':
          $ref: '#/components/responses/ErrorUnsupportedVersion'
      security:
        - ConsentApiOAuth:
            - biza-au:haas:consent:read
      summary: Get User Principal Account
      tags:
        - Accounts
  /{realmName}/principal/{principalId}/grant/{grantId}/account-detail:
    get:
      description: >-
        Retrieve details for the accounts shared under one Grant, in the
        Principal context.
      operationId: getPrincipalGrantAccountDetails
      parameters:
        - $ref: '#/components/parameters/PathRealmName'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/PathGrantId'
        - $ref: '#/components/parameters/HeaderXHaasV'
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
      responses:
        '200':
          $ref: '#/components/responses/GetPrincipalGrantAccountDetails'
        '400':
          $ref: '#/components/responses/ErrorBadRequest'
        '401':
          $ref: '#/components/responses/ErrorUnauthorised'
        '403':
          $ref: '#/components/responses/ErrorForbidden'
        '404':
          $ref: '#/components/responses/ErrorNotFound'
        '406':
          $ref: '#/components/responses/ErrorUnsupportedVersion'
      security:
        - ConsentApiOAuth:
            - biza-au:haas:consent:read
      summary: Get Principal Grant Account Details
      tags:
        - Accounts
  /{realmName}/user/{userId}/grant/{grantId}/account-detail:
    get:
      description: >-
        Retrieve details for the accounts shared under one Grant, in the User
        context.
      operationId: getUserGrantAccountDetails
      parameters:
        - $ref: '#/components/parameters/PathRealmName'
        - $ref: '#/components/parameters/PathUserId'
        - $ref: '#/components/parameters/PathGrantId'
        - $ref: '#/components/parameters/HeaderXHaasV'
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
      responses:
        '200':
          $ref: '#/components/responses/GetUserGrantAccountDetails'
        '400':
          $ref: '#/components/responses/ErrorBadRequest'
        '401':
          $ref: '#/components/responses/ErrorUnauthorised'
        '403':
          $ref: '#/components/responses/ErrorForbidden'
        '404':
          $ref: '#/components/responses/ErrorNotFound'
        '406':
          $ref: '#/components/responses/ErrorUnsupportedVersion'
      security:
        - ConsentApiOAuth:
            - biza-au:haas:consent:read
      summary: Get User Grant Account Details
      tags:
        - Accounts
  /{realmName}/user/{userId}/account/{accountId}/notification:
    get:
      description: Retrieve the asserted User's notification preferences for one account.
      operationId: getUserAccountNotificationPreferences
      parameters:
        - $ref: '#/components/parameters/PathRealmName'
        - $ref: '#/components/parameters/PathUserId'
        - $ref: '#/components/parameters/PathAccountId'
        - $ref: '#/components/parameters/HeaderXHaasV'
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
      responses:
        '200':
          $ref: '#/components/responses/GetUserAccountNotificationPreferences'
        '400':
          $ref: '#/components/responses/ErrorBadRequest'
        '401':
          $ref: '#/components/responses/ErrorUnauthorised'
        '403':
          $ref: '#/components/responses/ErrorForbidden'
        '404':
          $ref: '#/components/responses/ErrorNotFound'
        '406':
          $ref: '#/components/responses/ErrorUnsupportedVersion'
      security:
        - ConsentApiOAuth:
            - biza-au:haas:consent:read
      summary: Get User Account Notification Preferences
      tags:
        - Notifications
    put:
      description: Replace the asserted User's notification preferences for one account.
      operationId: updateUserAccountNotificationPreferences
      parameters:
        - $ref: '#/components/parameters/PathRealmName'
        - $ref: '#/components/parameters/PathUserId'
        - $ref: '#/components/parameters/PathAccountId'
        - $ref: '#/components/parameters/HeaderXHaasV'
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateNotificationPreferencesV1'
      responses:
        '200':
          $ref: '#/components/responses/UpdateUserAccountNotificationPreferences'
        '400':
          $ref: '#/components/responses/ErrorBadRequest'
        '401':
          $ref: '#/components/responses/ErrorUnauthorised'
        '403':
          $ref: '#/components/responses/ErrorForbidden'
        '404':
          $ref: '#/components/responses/ErrorNotFound'
        '406':
          $ref: '#/components/responses/ErrorUnsupportedVersion'
      security:
        - ConsentApiOAuth:
            - biza-au:haas:consent:write
      summary: Update User Account Notification Preferences
      tags:
        - Notifications
  /{realmName}/user/{userId}/principal/{principalId}/account/{accountId}/secondary-user:
    get:
      description: >-
        List the secondary users authorised on one account, as an asserted owner
        of it.
      operationId: listSecondaryUsers
      parameters:
        - $ref: '#/components/parameters/PathRealmName'
        - $ref: '#/components/parameters/PathUserId'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/PathAccountId'
        - $ref: '#/components/parameters/HeaderXHaasV'
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
      responses:
        '200':
          $ref: '#/components/responses/ListSecondaryUsers'
        '400':
          $ref: '#/components/responses/ErrorBadRequest'
        '401':
          $ref: '#/components/responses/ErrorUnauthorised'
        '403':
          $ref: '#/components/responses/ErrorForbidden'
        '404':
          $ref: '#/components/responses/ErrorNotFound'
        '406':
          $ref: '#/components/responses/ErrorUnsupportedVersion'
      security:
        - ConsentApiOAuth:
            - biza-au:haas:secondary-user:read
      summary: List Secondary Users
      tags:
        - Secondary Users
  /{realmName}/user/{userId}/principal/{principalId}/account/{accountId}/secondary-user/{secondaryUserUserId}:
    put:
      description: >-
        Enable or disable one secondary user's access to an account, as an
        asserted owner of it.
      operationId: updateSecondaryUser
      parameters:
        - $ref: '#/components/parameters/PathRealmName'
        - $ref: '#/components/parameters/PathUserId'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/PathAccountId'
        - $ref: '#/components/parameters/PathSecondaryUserUserId'
        - $ref: '#/components/parameters/HeaderXHaasV'
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSecondaryUserV1'
      responses:
        '200':
          $ref: '#/components/responses/UpdateSecondaryUser'
        '400':
          $ref: '#/components/responses/ErrorBadRequest'
        '401':
          $ref: '#/components/responses/ErrorUnauthorised'
        '403':
          $ref: '#/components/responses/ErrorForbidden'
        '404':
          $ref: '#/components/responses/ErrorNotFound'
        '406':
          $ref: '#/components/responses/ErrorUnsupportedVersion'
      security:
        - ConsentApiOAuth:
            - biza-au:haas:secondary-user:write
      summary: Update Secondary User
      tags:
        - Secondary Users
  /{realmName}/user/{userId}/principal/{principalId}/account/{accountId}/doms:
    get:
      description: >-
        List the Disclosure Option Management Service (DOMS) requests on one
        account, in the asserted User's context.
      operationId: listUserPrincipalAccountDomsRequests
      parameters:
        - $ref: '#/components/parameters/PathRealmName'
        - $ref: '#/components/parameters/PathUserId'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/PathAccountId'
        - $ref: '#/components/parameters/HeaderXHaasV'
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
      responses:
        '200':
          $ref: '#/components/responses/ListUserPrincipalAccountDomsRequests'
        '400':
          $ref: '#/components/responses/ErrorBadRequest'
        '401':
          $ref: '#/components/responses/ErrorUnauthorised'
        '403':
          $ref: '#/components/responses/ErrorForbidden'
        '404':
          $ref: '#/components/responses/ErrorNotFound'
        '406':
          $ref: '#/components/responses/ErrorUnsupportedVersion'
      security:
        - ConsentApiOAuth:
            - biza-au:haas:doms:read
      summary: List User Principal Account DOMS Requests
      tags:
        - DOMS
    post:
      description: >-
        Propose a multi-party sharing election on one account, as an asserted
        owner of it.
      operationId: createUserPrincipalAccountDomsRequest
      parameters:
        - $ref: '#/components/parameters/PathRealmName'
        - $ref: '#/components/parameters/PathUserId'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/PathAccountId'
        - $ref: '#/components/parameters/HeaderXHaasV'
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDOMSRequestV1'
      responses:
        '201':
          $ref: '#/components/responses/CreateUserPrincipalAccountDomsRequest'
        '400':
          $ref: '#/components/responses/ErrorBadRequest'
        '401':
          $ref: '#/components/responses/ErrorUnauthorised'
        '403':
          $ref: '#/components/responses/ErrorForbidden'
        '404':
          $ref: '#/components/responses/ErrorNotFound'
        '406':
          $ref: '#/components/responses/ErrorUnsupportedVersion'
      security:
        - ConsentApiOAuth:
            - biza-au:haas:doms:write
      summary: Create User Principal Account DOMS Request
      tags:
        - DOMS
  /{realmName}/user/{userId}/principal/{principalId}/account/{accountId}/doms/{requestId}:
    get:
      description: Retrieve one DOMS request on an account, in the asserted User's context.
      operationId: getUserPrincipalAccountDomsRequest
      parameters:
        - $ref: '#/components/parameters/PathRealmName'
        - $ref: '#/components/parameters/PathUserId'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/PathAccountId'
        - $ref: '#/components/parameters/PathRequestId'
        - $ref: '#/components/parameters/HeaderXHaasV'
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
      responses:
        '200':
          $ref: '#/components/responses/GetUserPrincipalAccountDomsRequest'
        '400':
          $ref: '#/components/responses/ErrorBadRequest'
        '401':
          $ref: '#/components/responses/ErrorUnauthorised'
        '403':
          $ref: '#/components/responses/ErrorForbidden'
        '404':
          $ref: '#/components/responses/ErrorNotFound'
        '406':
          $ref: '#/components/responses/ErrorUnsupportedVersion'
      security:
        - ConsentApiOAuth:
            - biza-au:haas:doms:read
      summary: Get User Principal Account DOMS Request
      tags:
        - DOMS
    put:
      description: >-
        Approve or deny a pending DOMS request, as an asserted owner of the
        account.
      operationId: handleUserPrincipalAccountDomsRequest
      parameters:
        - $ref: '#/components/parameters/PathRealmName'
        - $ref: '#/components/parameters/PathUserId'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/PathAccountId'
        - $ref: '#/components/parameters/PathRequestId'
        - $ref: '#/components/parameters/HeaderXHaasV'
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HandleDOMSRequestV1'
      responses:
        '200':
          $ref: '#/components/responses/HandleUserPrincipalAccountDomsRequest'
        '400':
          $ref: '#/components/responses/ErrorBadRequest'
        '401':
          $ref: '#/components/responses/ErrorUnauthorised'
        '403':
          $ref: '#/components/responses/ErrorForbidden'
        '404':
          $ref: '#/components/responses/ErrorNotFound'
        '406':
          $ref: '#/components/responses/ErrorUnsupportedVersion'
      security:
        - ConsentApiOAuth:
            - biza-au:haas:doms:write
      summary: Handle User Principal Account DOMS Request
      tags:
        - DOMS
  /{realmName}/user/{userId}/profile:
    get:
      description: >-
        List the Principals the asserted User can act as, with each one's
        vulnerability status.
      operationId: lookupUserProfiles
      parameters:
        - $ref: '#/components/parameters/PathRealmName'
        - $ref: '#/components/parameters/PathUserId'
        - $ref: '#/components/parameters/HeaderXHaasV'
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
      responses:
        '200':
          $ref: '#/components/responses/LookupUserProfiles'
        '400':
          $ref: '#/components/responses/ErrorBadRequest'
        '401':
          $ref: '#/components/responses/ErrorUnauthorised'
        '403':
          $ref: '#/components/responses/ErrorForbidden'
        '404':
          $ref: '#/components/responses/ErrorNotFound'
        '406':
          $ref: '#/components/responses/ErrorUnsupportedVersion'
      security:
        - ConsentApiOAuth:
            - biza-au:haas:consent:read
      summary: Lookup User Profiles
      tags:
        - Profiles
  /{realmName}/app2app/token:
    post:
      description: >-
        Exchange a holder session token for a request_uri-bound, single-use
        act_token (RFC 8693).
      operationId: exchangeToken
      parameters:
        - $ref: '#/components/parameters/PathRealmName'
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TokenExchangeRequestV1'
      responses:
        '200':
          $ref: '#/components/responses/ExchangeToken'
        '400':
          $ref: '#/components/responses/TokenExchangeError'
        '401':
          $ref: '#/components/responses/ErrorUnauthorised'
        '403':
          $ref: '#/components/responses/ErrorForbidden'
        '404':
          $ref: '#/components/responses/ErrorNotFound'
      security:
        - ConsentApiOAuth:
            - biza-au:haas:consent:exchange
      summary: Exchange Token
      tags:
        - App-to-App
components:
  securitySchemes:
    ConsentApiOAuth:
      type: oauth2
      description: >-
        OAuth 2.0 bearer token issued by Biza ID. The token is opaque to the
        caller: this specification states only which scopes an operation
        requires, never what the token contains. Tenancy is enforced by the
        deployment, not by the caller - a token is bound to the audience of the
        space it was issued for.


        Every grant-bearing operation on this surface is grounded - it requires
        naming a User or a Principal - so there is no realm-wide *read of
        grants* to gate separately. The one exception is `getEndpointMeta`,
        which names no subject and reports only this deployment's static
        capabilities; its realm entitlement is checked exactly as every other
        operation's is, and it answers 404 for a realm this credential may not
        name. An implementer must not assume a subject is always resolved before
        a realm.


        Note what a scope does **not** do: it does not stop a caller naming a
        User or Principal it was not meant to serve, because those identifiers
        are assigned by you and are not necessarily unguessable. Your realm
        entitlement is what separates you from other data holders.
      flows:
        clientCredentials:
          tokenUrl: https://id.biza.io/oauth/token
          scopes:
            biza-au:haas:consent:read: >-
              Read endpoint metadata, and read Grants and Grant history grounded
              under a named User or Principal.
            biza-au:haas:consent:revoke: Revoke a Grant grounded under the User who created it.
            biza-au:haas:consent:write: Update a User's own preferences, grounded under that User.
            biza-au:haas:secondary-user:read: Read the secondary users on an account.
            biza-au:haas:secondary-user:write: Enable or disable a secondary user's access to an account.
            biza-au:haas:doms:read: >-
              Read Disclosure Option Management Service (DOMS) requests on an
              account.
            biza-au:haas:doms:write: >-
              Propose, approve or deny a Disclosure Option Management Service
              (DOMS) request on an account.
            biza-au:haas:consent:exchange: >-
              Exchange the holder's own session token for a request_uri-bound
              act_token via RFC 8693 token exchange, for the app2app
              consent-flow handoff. Held by the holder's backend, not the native
              app.
  parameters:
    PathRealmName:
      description: >-
        Realm name to bound the request to. A client is entitled to the realms
        of the space its token was issued for.
      in: path
      name: realmName
      required: true
      schema:
        type: string
        example: sandbox-holder
    HeaderXHaasMaxV:
      in: header
      name: x-haas-max-v
      required: true
      description: >-
        The highest response version your client understands. 

        **This is a ceiling, not an exact match** and is a bound rather than a
        single value.

        This deployment serves the highest version it supports that is at or
        below the ceiling provided, and never a version above it. If it supports
        no version at or below the provided ceiling the response is **406**
        `Header/UnsupportedVersion`.
      schema:
        type: string
        example: V1
    HeaderXFapiInteractionId:
      description: >-
        Caller-supplied correlation identifier, echoed on the response and
        recorded for the interaction.
      in: header
      name: x-fapi-interaction-id
      required: false
      schema:
        type: string
        format: uuid
        example: 6ba7b814-9dad-11d1-80b4-00c04fd430c8
    PathUserId:
      description: >-
        The User Identifier for the User. This is a globally unique and stable
        identifier for the User.
      in: path
      name: userId
      required: true
      schema:
        type: string
        example: 7c4a8d09ca3762af61e59520943dc264
    QueryPrincipalId:
      description: >-
        Narrow the visible Grants to those held against this Principal in
        addition to the path parameters specified.
      in: query
      name: principalId
      required: false
      schema:
        type: string
        example: 08c31a2a9016d6c517a95562228a37c0
    QueryGrantStatus:
      description: |-

        Restrict results to Grants with the input status. 

        Supports multiple types using exploded `form` style.  

        If not present will return Grants in all statuses.
      explode: true
      in: query
      name: status
      required: false
      style: form
      schema:
        type: array
        items:
          $ref: '#/components/schemas/EnumGrantStatusV1'
    QueryPage:
      description: Page of results to request, 1-based.
      in: query
      name: page
      required: false
      schema:
        type: integer
        format: int32
        default: 1
        minimum: 1
        example: 1
    QueryPageSize:
      description: Number of records to return per page.
      in: query
      name: page-size
      required: false
      schema:
        type: integer
        format: int32
        default: 25
        minimum: 1
        maximum: 1000
        example: 25
    HeaderXHaasV:
      description: >-
        The response version requested for this operation. The version actually
        served is returned in the `x-haas-v` response header and in the
        payload's `version` property.
      in: header
      name: x-haas-v
      required: true
      schema:
        type: string
        example: V1
    PathGrantId:
      description: >-
        The identifier of the grant. Unique within the realm, so a Grant is
        addressable without naming its User or Principal.
      in: path
      name: grantId
      required: true
      schema:
        type: string
        format: uuid
        example: dd488573-510f-42c1-82b7-e6ecaa735545
    PathPrincipalId:
      description: >-
        The Principal Identifier for a Principal. This is a globally unique and
        stable identifier for the Principal.
      in: path
      name: principalId
      required: true
      schema:
        type: string
        example: 08c31a2a9016d6c517a95562228a37c0
    PathAccountId:
      description: >-
        Account Identifier used by the Data Adapter and reflected unmodified
        within responses. This identifier is not pairwised, as this is an
        internal API, not an externally facing one.
      in: path
      name: accountId
      required: true
      schema:
        type: string
        example: 0b6d9c6e9d4a4e23a3b0a5d6c7e8f901
    PathSecondaryUserUserId:
      description: >-
        The User Identifier of the secondary user whose sharing status on this
        account is being addressed. Distinct from the `userId` path segment
        naming the caller's own asserted identity.
      in: path
      name: secondaryUserUserId
      required: true
      schema:
        type: string
        example: 3f6e9a2c7d8b4512a0f6e9c2d7b48a01
    PathRequestId:
      description: >-
        The identifier of a Disclosure Option Management Service (DOMS) request.
        Unique within the realm.
      in: path
      name: requestId
      required: true
      schema:
        type: string
        format: uuid
        example: f3e6b2d4-9c1a-4f6e-8b2a-1d6c9e4a7b50
  headers:
    ResponseXHaasV:
      description: >-
        The version actually served for this operation. Always present, and
        always equal to the `version` property of the payload.
      required: true
      schema:
        type: string
        example: V1
    XFapiInteractionId:
      description: >-
        Echo of the request's `x-fapi-interaction-id` when one was supplied
        **and valid**, otherwise a server-generated correlation identifier. 
        Always present  on every response, including a 401, to be used in
        tracking for support requests. 
      required: true
      schema:
        type: string
        format: uuid
        example: 6ba7b814-9dad-11d1-80b4-00c04fd430c8
    ResponseWwwAuthenticate:
      description: Authentication required challenge.
      required: true
      schema:
        type: string
        example: Bearer error="insufficient_scope", scope="biza-au:haas:consent:revoke"
  schemas:
    EnumResponseListUserGrantsVersion:
      description: Supported Response Version
      enum:
        - V1
      type: string
      example: V1
    EndpointMetaListUserGrantsV1:
      type: object
      description: >-
        Whether this operation is available here, and which versions of it are
        understood. Follows the HaaS Data Adapter specification's convention of
        a dedicated leaf schema per operation, rather than one generic shape
        reused across every operation - the two conventions should converge the
        day they are the same operation, and nothing else should look alike by
        accident.
      properties:
        flags:
          type: array
          description: >-
            Per-operation feature flags. In this version no optional behaviour
            is currently advertised.
          default: []
          maxItems: 0
          items:
            type: string
        responseVersions:
          type: array
          description: >-
            Response versions that may be asked using the `x-haas-v` header,
            lowest first.
          default:
            - V1
          items:
            $ref: '#/components/schemas/EnumResponseListUserGrantsVersion'
      required:
        - flags
        - responseVersions
      example:
        flags: []
        responseVersions:
          - V1
    EnumResponseGetUserGrantVersion:
      description: Supported Response Version
      enum:
        - V1
      type: string
      example: V1
    EndpointMetaGetUserGrantV1:
      type: object
      description: >-
        Whether this operation is available here, and which versions of it are
        understood. Follows the HaaS Data Adapter specification's convention of
        a dedicated leaf schema per operation, rather than one generic shape
        reused across every operation - the two conventions should converge the
        day they are the same operation, and nothing else should look alike by
        accident.
      properties:
        flags:
          type: array
          description: >-
            Per-operation feature flags. In this version no optional behaviour
            is currently advertised.
          default: []
          maxItems: 0
          items:
            type: string
        responseVersions:
          type: array
          description: >-
            Response versions that may be asked using the `x-haas-v` header,
            lowest first.
          default:
            - V1
          items:
            $ref: '#/components/schemas/EnumResponseGetUserGrantVersion'
      required:
        - flags
        - responseVersions
      example:
        flags: []
        responseVersions:
          - V1
    EnumResponseGetUserGrantHistoryVersion:
      description: Supported Response Version
      enum:
        - V1
      type: string
      example: V1
    EndpointMetaGetUserGrantHistoryV1:
      type: object
      description: >-
        Whether this operation is available here, and which versions of it are
        understood. Follows the HaaS Data Adapter specification's convention of
        a dedicated leaf schema per operation, rather than one generic shape
        reused across every operation - the two conventions should converge the
        day they are the same operation, and nothing else should look alike by
        accident.
      properties:
        flags:
          type: array
          description: >-
            Per-operation feature flags. In this version no optional behaviour
            is currently advertised.
          default: []
          maxItems: 0
          items:
            type: string
        responseVersions:
          type: array
          description: >-
            Response versions that may be asked using the `x-haas-v` header,
            lowest first.
          default:
            - V1
          items:
            $ref: '#/components/schemas/EnumResponseGetUserGrantHistoryVersion'
      required:
        - flags
        - responseVersions
      example:
        flags: []
        responseVersions:
          - V1
    EnumResponseRevokeUserGrantVersion:
      description: Supported Response Version
      enum:
        - V1
      type: string
      example: V1
    EndpointMetaRevokeUserGrantV1:
      type: object
      description: >-
        Whether this operation is available here, and which versions of it are
        understood. Follows the HaaS Data Adapter specification's convention of
        a dedicated leaf schema per operation, rather than one generic shape
        reused across every operation - the two conventions should converge the
        day they are the same operation, and nothing else should look alike by
        accident.
      properties:
        flags:
          type: array
          description: >-
            Per-operation feature flags. In this version no optional behaviour
            is currently advertised.
          default: []
          maxItems: 0
          items:
            type: string
        responseVersions:
          type: array
          description: >-
            Response versions that may be asked using the `x-haas-v` header,
            lowest first.
          default:
            - V1
          items:
            $ref: '#/components/schemas/EnumResponseRevokeUserGrantVersion'
      required:
        - flags
        - responseVersions
      example:
        flags: []
        responseVersions:
          - V1
    EnumResponseWithdrawJointAccountSharingApprovalForGrantVersion:
      description: Supported Response Version
      enum:
        - V1
      type: string
      example: V1
    EndpointMetaWithdrawJointAccountSharingApprovalForGrantV1:
      type: object
      description: >-
        Whether this operation is available here, and which versions of it are
        understood. Follows the HaaS Data Adapter specification's convention of
        a dedicated leaf schema per operation, rather than one generic shape
        reused across every operation - the two conventions should converge the
        day they are the same operation, and nothing else should look alike by
        accident.
      properties:
        flags:
          type: array
          description: >-
            Per-operation feature flags. In this version no optional behaviour
            is currently advertised.
          default: []
          maxItems: 0
          items:
            type: string
        responseVersions:
          type: array
          description: >-
            Response versions that may be asked using the `x-haas-v` header,
            lowest first.
          default:
            - V1
          items:
            $ref: >-
              #/components/schemas/EnumResponseWithdrawJointAccountSharingApprovalForGrantVersion
      required:
        - flags
        - responseVersions
      example:
        flags: []
        responseVersions:
          - V1
    EnumResponseListPrincipalGrantsVersion:
      description: Supported Response Version
      enum:
        - V1
      type: string
      example: V1
    EndpointMetaListPrincipalGrantsV1:
      type: object
      description: >-
        Whether this operation is available here, and which versions of it are
        understood. Follows the HaaS Data Adapter specification's convention of
        a dedicated leaf schema per operation, rather than one generic shape
        reused across every operation - the two conventions should converge the
        day they are the same operation, and nothing else should look alike by
        accident.
      properties:
        flags:
          type: array
          description: >-
            Per-operation feature flags. In this version no optional behaviour
            is currently advertised.
          default: []
          maxItems: 0
          items:
            type: string
        responseVersions:
          type: array
          description: >-
            Response versions that may be asked using the `x-haas-v` header,
            lowest first.
          default:
            - V1
          items:
            $ref: '#/components/schemas/EnumResponseListPrincipalGrantsVersion'
      required:
        - flags
        - responseVersions
      example:
        flags: []
        responseVersions:
          - V1
    EnumResponseGetPrincipalGrantVersion:
      description: Supported Response Version
      enum:
        - V1
      type: string
      example: V1
    EndpointMetaGetPrincipalGrantV1:
      type: object
      description: >-
        Whether this operation is available here, and which versions of it are
        understood. Follows the HaaS Data Adapter specification's convention of
        a dedicated leaf schema per operation, rather than one generic shape
        reused across every operation - the two conventions should converge the
        day they are the same operation, and nothing else should look alike by
        accident.
      properties:
        flags:
          type: array
          description: >-
            Per-operation feature flags. In this version no optional behaviour
            is currently advertised.
          default: []
          maxItems: 0
          items:
            type: string
        responseVersions:
          type: array
          description: >-
            Response versions that may be asked using the `x-haas-v` header,
            lowest first.
          default:
            - V1
          items:
            $ref: '#/components/schemas/EnumResponseGetPrincipalGrantVersion'
      required:
        - flags
        - responseVersions
      example:
        flags: []
        responseVersions:
          - V1
    EnumResponseGetPrincipalGrantHistoryVersion:
      description: Supported Response Version
      enum:
        - V1
      type: string
      example: V1
    EndpointMetaGetPrincipalGrantHistoryV1:
      type: object
      description: >-
        Whether this operation is available here, and which versions of it are
        understood. Follows prior Data Adapter specification's convention of a
        dedicated leaf schema per operation, rather than one generic shape
        reused across every operation.
      properties:
        flags:
          type: array
          description: >-
            Per-operation feature flags. In this version no optional behaviour
            is currently advertised.
          default: []
          maxItems: 0
          items:
            type: string
        responseVersions:
          type: array
          description: >-
            Response versions that may be asked using the `x-haas-v` header,
            lowest first.
          default:
            - V1
          items:
            $ref: '#/components/schemas/EnumResponseGetPrincipalGrantHistoryVersion'
      required:
        - flags
        - responseVersions
      example:
        flags: []
        responseVersions:
          - V1
    EnumResponseListUserPrincipalAccountsVersion:
      description: Supported Response Version
      enum:
        - V1
      type: string
      example: V1
    EndpointMetaListUserPrincipalAccountsV1:
      type: object
      description: >-
        Whether this operation is available here, and which versions of it are
        understood.
      properties:
        flags:
          type: array
          description: >-
            Per-operation feature flags. In this version no optional behaviour
            is currently advertised.
          default: []
          maxItems: 0
          items:
            type: string
        responseVersions:
          type: array
          description: >-
            Response versions that may be asked using the `x-haas-v` header,
            lowest first.
          default:
            - V1
          items:
            $ref: '#/components/schemas/EnumResponseListUserPrincipalAccountsVersion'
      required:
        - flags
        - responseVersions
      example:
        flags: []
        responseVersions:
          - V1
    EnumResponseGetUserPrincipalAccountVersion:
      description: Supported Response Version
      enum:
        - V1
      type: string
      example: V1
    EndpointMetaGetUserPrincipalAccountV1:
      type: object
      description: >-
        Whether this operation is available here, and which versions of it are
        understood.
      properties:
        flags:
          type: array
          description: >-
            Per-operation feature flags. In this version no optional behaviour
            is currently advertised.
          default: []
          maxItems: 0
          items:
            type: string
        responseVersions:
          type: array
          description: >-
            Response versions that may be asked using the `x-haas-v` header,
            lowest first.
          default:
            - V1
          items:
            $ref: '#/components/schemas/EnumResponseGetUserPrincipalAccountVersion'
      required:
        - flags
        - responseVersions
      example:
        flags: []
        responseVersions:
          - V1
    EnumResponseGetPrincipalGrantAccountDetailsVersion:
      description: Supported Response Version
      enum:
        - V1
      type: string
      example: V1
    EndpointMetaGetPrincipalGrantAccountDetailsV1:
      type: object
      description: >-
        Whether this operation is available here, and which versions of it are
        understood.
      properties:
        flags:
          type: array
          description: >-
            Per-operation feature flags. In this version no optional behaviour
            is currently advertised.
          default: []
          maxItems: 0
          items:
            type: string
        responseVersions:
          type: array
          description: >-
            Response versions that may be asked using the `x-haas-v` header,
            lowest first.
          default:
            - V1
          items:
            $ref: >-
              #/components/schemas/EnumResponseGetPrincipalGrantAccountDetailsVersion
      required:
        - flags
        - responseVersions
      example:
        flags: []
        responseVersions:
          - V1
    EnumResponseGetUserGrantAccountDetailsVersion:
      description: Supported Response Version
      enum:
        - V1
      type: string
      example: V1
    EndpointMetaGetUserGrantAccountDetailsV1:
      type: object
      description: >-
        Whether this operation is available here, and which versions of it are
        understood.
      properties:
        flags:
          type: array
          description: >-
            Per-operation feature flags. In this version no optional behaviour
            is currently advertised.
          default: []
          maxItems: 0
          items:
            type: string
        responseVersions:
          type: array
          description: >-
            Response versions that may be asked using the `x-haas-v` header,
            lowest first.
          default:
            - V1
          items:
            $ref: '#/components/schemas/EnumResponseGetUserGrantAccountDetailsVersion'
      required:
        - flags
        - responseVersions
      example:
        flags: []
        responseVersions:
          - V1
    EnumResponseGetUserAccountNotificationPreferencesVersion:
      description: Supported Response Version
      enum:
        - V1
      type: string
      example: V1
    EndpointMetaGetUserAccountNotificationPreferencesV1:
      type: object
      description: >-
        Whether this operation is available here, and which versions of it are
        understood.
      properties:
        flags:
          type: array
          description: >-
            Per-operation feature flags. In this version no optional behaviour
            is currently advertised.
          default: []
          maxItems: 0
          items:
            type: string
        responseVersions:
          type: array
          description: >-
            Response versions that may be asked using the `x-haas-v` header,
            lowest first.
          default:
            - V1
          items:
            $ref: >-
              #/components/schemas/EnumResponseGetUserAccountNotificationPreferencesVersion
      required:
        - flags
        - responseVersions
      example:
        flags: []
        responseVersions:
          - V1
    EnumResponseUpdateUserAccountNotificationPreferencesVersion:
      description: Supported Response Version
      enum:
        - V1
      type: string
      example: V1
    EndpointMetaUpdateUserAccountNotificationPreferencesV1:
      type: object
      description: >-
        Whether this operation is available here, and which versions of it are
        understood.
      properties:
        flags:
          type: array
          description: >-
            Per-operation feature flags. In this version no optional behaviour
            is currently advertised.
          default: []
          maxItems: 0
          items:
            type: string
        responseVersions:
          type: array
          description: >-
            Response versions that may be asked using the `x-haas-v` header,
            lowest first.
          default:
            - V1
          items:
            $ref: >-
              #/components/schemas/EnumResponseUpdateUserAccountNotificationPreferencesVersion
      required:
        - flags
        - responseVersions
      example:
        flags: []
        responseVersions:
          - V1
    EnumResponseListSecondaryUsersVersion:
      description: Supported Response Version
      enum:
        - V1
      type: string
      example: V1
    EndpointMetaListSecondaryUsersV1:
      type: object
      description: >-
        Whether this operation is available here, and which versions of it are
        understood.
      properties:
        flags:
          type: array
          description: >-
            Per-operation feature flags. In this version no optional behaviour
            is currently advertised.
          default: []
          maxItems: 0
          items:
            type: string
        responseVersions:
          type: array
          description: >-
            Response versions that may be asked using the `x-haas-v` header,
            lowest first.
          default:
            - V1
          items:
            $ref: '#/components/schemas/EnumResponseListSecondaryUsersVersion'
      required:
        - flags
        - responseVersions
      example:
        flags: []
        responseVersions:
          - V1
    EnumResponseUpdateSecondaryUserVersion:
      description: Supported Response Version
      enum:
        - V1
      type: string
      example: V1
    EndpointMetaUpdateSecondaryUserV1:
      type: object
      description: >-
        Whether this operation is available here, and which versions of it are
        understood.
      properties:
        flags:
          type: array
          description: >-
            Per-operation feature flags. In this version no optional behaviour
            is currently advertised.
          default: []
          maxItems: 0
          items:
            type: string
        responseVersions:
          type: array
          description: >-
            Response versions that may be asked using the `x-haas-v` header,
            lowest first.
          default:
            - V1
          items:
            $ref: '#/components/schemas/EnumResponseUpdateSecondaryUserVersion'
      required:
        - flags
        - responseVersions
      example:
        flags: []
        responseVersions:
          - V1
    EnumResponseListUserPrincipalAccountDomsRequestsVersion:
      description: Supported Response Version
      enum:
        - V1
      type: string
      example: V1
    EndpointMetaListUserPrincipalAccountDomsRequestsV1:
      type: object
      description: >-
        Whether this operation is available here, and which versions of it are
        understood.
      properties:
        flags:
          type: array
          description: >-
            Per-operation feature flags. In this version no optional behaviour
            is currently advertised.
          default: []
          maxItems: 0
          items:
            type: string
        responseVersions:
          type: array
          description: >-
            Response versions that may be asked using the `x-haas-v` header,
            lowest first.
          default:
            - V1
          items:
            $ref: >-
              #/components/schemas/EnumResponseListUserPrincipalAccountDomsRequestsVersion
      required:
        - flags
        - responseVersions
      example:
        flags: []
        responseVersions:
          - V1
    EnumResponseGetUserPrincipalAccountDomsRequestVersion:
      description: Supported Response Version
      enum:
        - V1
      type: string
      example: V1
    EndpointMetaGetUserPrincipalAccountDomsRequestV1:
      type: object
      description: >-
        Whether this operation is available here, and which versions of it are
        understood.
      properties:
        flags:
          type: array
          description: >-
            Per-operation feature flags. In this version no optional behaviour
            is currently advertised.
          default: []
          maxItems: 0
          items:
            type: string
        responseVersions:
          type: array
          description: >-
            Response versions that may be asked using the `x-haas-v` header,
            lowest first.
          default:
            - V1
          items:
            $ref: >-
              #/components/schemas/EnumResponseGetUserPrincipalAccountDomsRequestVersion
      required:
        - flags
        - responseVersions
      example:
        flags: []
        responseVersions:
          - V1
    EnumResponseCreateUserPrincipalAccountDomsRequestVersion:
      description: Supported Response Version
      enum:
        - V1
      type: string
      example: V1
    EndpointMetaCreateUserPrincipalAccountDomsRequestV1:
      type: object
      description: >-
        Whether this operation is available here, and which versions of it are
        understood.
      properties:
        flags:
          type: array
          description: >-
            Per-operation feature flags. In this version no optional behaviour
            is currently advertised.
          default: []
          maxItems: 0
          items:
            type: string
        responseVersions:
          type: array
          description: >-
            Response versions that may be asked using the `x-haas-v` header,
            lowest first.
          default:
            - V1
          items:
            $ref: >-
              #/components/schemas/EnumResponseCreateUserPrincipalAccountDomsRequestVersion
      required:
        - flags
        - responseVersions
      example:
        flags: []
        responseVersions:
          - V1
    EnumResponseHandleUserPrincipalAccountDomsRequestVersion:
      description: Supported Response Version
      enum:
        - V1
      type: string
      example: V1
    EndpointMetaHandleUserPrincipalAccountDomsRequestV1:
      type: object
      description: >-
        Whether this operation is available here, and which versions of it are
        understood.
      properties:
        flags:
          type: array
          description: >-
            Per-operation feature flags. In this version no optional behaviour
            is currently advertised.
          default: []
          maxItems: 0
          items:
            type: string
        responseVersions:
          type: array
          description: >-
            Response versions that may be asked using the `x-haas-v` header,
            lowest first.
          default:
            - V1
          items:
            $ref: >-
              #/components/schemas/EnumResponseHandleUserPrincipalAccountDomsRequestVersion
      required:
        - flags
        - responseVersions
      example:
        flags: []
        responseVersions:
          - V1
    EnumResponseLookupUserProfilesVersion:
      description: Supported Response Version
      enum:
        - V1
      type: string
      example: V1
    EndpointMetaLookupUserProfilesV1:
      type: object
      description: >-
        Whether this operation is available here, and which versions of it are
        understood.
      properties:
        flags:
          type: array
          description: >-
            Per-operation feature flags. In this version no optional behaviour
            is currently advertised.
          default: []
          maxItems: 0
          items:
            type: string
        responseVersions:
          type: array
          description: >-
            Response versions that may be asked using the `x-haas-v` header,
            lowest first.
          default:
            - V1
          items:
            $ref: '#/components/schemas/EnumResponseLookupUserProfilesVersion'
      required:
        - flags
        - responseVersions
      example:
        flags: []
        responseVersions:
          - V1
    EnumResponseExchangeTokenVersion:
      description: Supported Response Version
      enum:
        - V1
      type: string
      example: V1
    EndpointMetaExchangeTokenV1:
      type: object
      description: >-
        Whether this operation is available here, and which versions of it are
        understood. Follows the HaaS Data Adapter specification's convention of
        a dedicated leaf schema per operation, matching every other leaf on this
        payload — but reports `responseVersions` as a fact, not a negotiable:
        this operation carries no `x-haas-v` request header and serves no
        in-payload version discriminator at all, by design. `responseVersions:
        [V1]` states what this deployment's wire format is, not what a client
        may ask for.
      properties:
        flags:
          type: array
          description: >-
            Reserved for future per-operation feature flags. Empty in V1: this
            operation has no optional behaviour to advertise yet.
          default: []
          maxItems: 0
          items:
            type: string
        responseVersions:
          type: array
          description: >-
            This deployment's wire-format version. Not negotiable via `x-haas-v`
            — see this schema's own description.
          default:
            - V1
          items:
            $ref: '#/components/schemas/EnumResponseExchangeTokenVersion'
      required:
        - flags
        - responseVersions
      example:
        flags: []
        responseVersions:
          - V1
    EndpointMetaConsentApiV1:
      type: object
      description: >-
        What this deployment supports, per operation uniquely keyed on
        `operationId`.


        The key set is fixed rather than open: every operation this version of
        the payload knows about is a required property so typed accessors can be
        used.  A later version of this payload may add operations; a client
        pinned to `V1`  will not see them advertised.


        Each operation has its own leaf schema, named
        `EndpointMeta<Operation>V1`, matching prior Data Adapter specification's
        convention.


        This response is **static**. It describes the service, identically for
        every caller, and is never filtered by your credential's scopes.
      properties:
        listUserGrants:
          $ref: '#/components/schemas/EndpointMetaListUserGrantsV1'
        getUserGrant:
          $ref: '#/components/schemas/EndpointMetaGetUserGrantV1'
        getUserGrantHistory:
          $ref: '#/components/schemas/EndpointMetaGetUserGrantHistoryV1'
        revokeUserGrant:
          $ref: '#/components/schemas/EndpointMetaRevokeUserGrantV1'
        withdrawJointAccountSharingApprovalForGrant:
          $ref: >-
            #/components/schemas/EndpointMetaWithdrawJointAccountSharingApprovalForGrantV1
        listPrincipalGrants:
          $ref: '#/components/schemas/EndpointMetaListPrincipalGrantsV1'
        getPrincipalGrant:
          $ref: '#/components/schemas/EndpointMetaGetPrincipalGrantV1'
        getPrincipalGrantHistory:
          $ref: '#/components/schemas/EndpointMetaGetPrincipalGrantHistoryV1'
        listUserPrincipalAccounts:
          $ref: '#/components/schemas/EndpointMetaListUserPrincipalAccountsV1'
        getUserPrincipalAccount:
          $ref: '#/components/schemas/EndpointMetaGetUserPrincipalAccountV1'
        getPrincipalGrantAccountDetails:
          $ref: '#/components/schemas/EndpointMetaGetPrincipalGrantAccountDetailsV1'
        getUserGrantAccountDetails:
          $ref: '#/components/schemas/EndpointMetaGetUserGrantAccountDetailsV1'
        getUserAccountNotificationPreferences:
          $ref: >-
            #/components/schemas/EndpointMetaGetUserAccountNotificationPreferencesV1
        updateUserAccountNotificationPreferences:
          $ref: >-
            #/components/schemas/EndpointMetaUpdateUserAccountNotificationPreferencesV1
        listSecondaryUsers:
          $ref: '#/components/schemas/EndpointMetaListSecondaryUsersV1'
        updateSecondaryUser:
          $ref: '#/components/schemas/EndpointMetaUpdateSecondaryUserV1'
        listUserPrincipalAccountDomsRequests:
          $ref: >-
            #/components/schemas/EndpointMetaListUserPrincipalAccountDomsRequestsV1
        getUserPrincipalAccountDomsRequest:
          $ref: >-
            #/components/schemas/EndpointMetaGetUserPrincipalAccountDomsRequestV1
        createUserPrincipalAccountDomsRequest:
          $ref: >-
            #/components/schemas/EndpointMetaCreateUserPrincipalAccountDomsRequestV1
        handleUserPrincipalAccountDomsRequest:
          $ref: >-
            #/components/schemas/EndpointMetaHandleUserPrincipalAccountDomsRequestV1
        lookupUserProfiles:
          $ref: '#/components/schemas/EndpointMetaLookupUserProfilesV1'
        exchangeToken:
          $ref: '#/components/schemas/EndpointMetaExchangeTokenV1'
      required:
        - listUserGrants
        - getUserGrant
        - getUserGrantHistory
        - revokeUserGrant
        - withdrawJointAccountSharingApprovalForGrant
        - listPrincipalGrants
        - getPrincipalGrant
        - getPrincipalGrantHistory
        - listUserPrincipalAccounts
        - getUserPrincipalAccount
        - getPrincipalGrantAccountDetails
        - getUserGrantAccountDetails
        - getUserAccountNotificationPreferences
        - updateUserAccountNotificationPreferences
        - listSecondaryUsers
        - updateSecondaryUser
        - listUserPrincipalAccountDomsRequests
        - getUserPrincipalAccountDomsRequest
        - createUserPrincipalAccountDomsRequest
        - handleUserPrincipalAccountDomsRequest
        - lookupUserProfiles
        - exchangeToken
    ResponseGetEndpointMetaV1:
      type: object
      properties:
        version:
          type: string
          description: Discriminator for the response envelope version.
          enum:
            - V1
          example: V1
        data:
          $ref: '#/components/schemas/EndpointMetaConsentApiV1'
      required:
        - version
        - data
    ResponseGetEndpointMeta:
      description: >-
        Versioned response envelope. The `version` property is the
        discriminator: a later version of this operation adds a new member to
        the `oneOf` and leaves every existing member untouched, so a client that
        does not uplift is not affected.
      oneOf:
        - $ref: '#/components/schemas/ResponseGetEndpointMetaV1'
      discriminator:
        propertyName: version
        mapping:
          V1: '#/components/schemas/ResponseGetEndpointMetaV1'
    EnumErrorCodeV1:
      type: string
      description: >

        Error Codes


        | Value | HTTP status | Meaning |

        |-------|-------------|---------|

        | `urn:dio:error:dio-all:Field/Invalid` | 400 | A query parameter was
        supplied but its value is not one the parameter accepts - an
        unrecognised `status`, for example. |

        | `urn:dio:error:dio-all:Field/InvalidPage` | 400 | `page` is not a
        positive integer. |

        | `urn:dio:error:dio-all:Field/InvalidPageSize` | 400 | `page-size` is
        outside the range this operation accepts. |

        | `urn:dio:error:dio-all:Header/Invalid` | 400 | `x-haas-v` is absent,
        or present but malformed. The header is required on every operation that
        negotiates a response version. |

        | `urn:dio:error:dio-all:GeneralError/Expected` | 400, 401, 403 | A
        general-purpose code: a 400 not covered by a more specific code above,
        or the body accompanying a 401 or 403. On a 401 or 403 the code carries
        no detail you should branch on - read the `WWW-Authenticate` header
        instead, which names the failure as `invalid_token` or
        `insufficient_scope` per RFC 6750 §3.1. |

        | `urn:dio:error:dio-all:Resource/NotFound` | 404 | No resource with
        this identifier exists in this realm. Also carried when the realm itself
        is unknown, **or** is a realm your credential is not entitled to name -
        the two responses are byte-identical, so you cannot use this API to
        discover whether a realm you cannot reach exists. |

        | `urn:dio:error:dio-all:Header/UnsupportedVersion` | 406 | The
        requested `x-haas-v` is not supported for this operation. Call
        `getEndpointMeta` to discover which versions are. |

        | `urn:dio:error:dio-all:GeneralError/Unexpected` | 500 | An unhandled
        failure on the server side. No operation declares it, because no
        operation can predict it; handle it as you would any 5xx. |


        Every code above is in the `dio-all` namespace: none is specific to the
        consent surface.


        Note that the `dio` namespace identifier in these codes is **not** the
        `dio-au` that appears in this API's URL path. The two are independent
        namespaces and are not expected to match.
      enum:
        - urn:dio:error:dio-all:Field/Invalid
        - urn:dio:error:dio-all:Field/InvalidPage
        - urn:dio:error:dio-all:Field/InvalidPageSize
        - urn:dio:error:dio-all:Header/Invalid
        - urn:dio:error:dio-all:GeneralError/Expected
        - urn:dio:error:dio-all:Resource/NotFound
        - urn:dio:error:dio-all:Header/UnsupportedVersion
        - urn:dio:error:dio-all:GeneralError/Unexpected
      example: urn:dio:error:dio-all:Resource/NotFound
      x-enum-varnames:
        - FIELD_INVALID
        - FIELD_INVALID_PAGE
        - FIELD_INVALID_PAGE_SIZE
        - HEADER_INVALID
        - GENERAL_ERROR_EXPECTED
        - RESOURCE_NOT_FOUND
        - HEADER_UNSUPPORTED_VERSION
        - GENERAL_ERROR_UNEXPECTED
    ErrorV1:
      type: object
      properties:
        code:
          allOf:
            - $ref: '#/components/schemas/EnumErrorCodeV1'
          description: The error code. A closed enum - see EnumErrorCodeV1.
        title:
          type: string
          description: A short, human-readable summary, constant per code.
          example: Resource Not Found
        detail:
          type: string
          description: >-
            Human-readable explanation specific to this occurrence - with one
            exception that is part of the security contract.


            **For `Resource/NotFound` this string is constant.** Every cause of
            a 404 produces an identical body: an unknown realm, a realm your
            credential may not name, an unknown grant, a Grant the named subject
            has no claim on, and - on the User axis - a Grant the admission rule
            withholds. Do not vary it, and do not make it more helpful for one
            cause than another. The distinction belongs in your own logs;
            varying it here rebuilds the existence oracle that answering 404
            rather than 403 exists to prevent.
          example: The requested resource was not found
        meta:
          type: object
          description: >-
            Additional error data. Carries at most the offending parameter's
            name, and nothing else.
          properties:
            parameter:
              type: string
              description: >-
                The query parameter or header whose value caused this error,
                when a single one can be named. Present on `Field/*` and
                `Header/*` codes; absent otherwise.


                Never present on `Resource/NotFound`, which carries no `meta` at
                all - naming what was not found would defeat the constancy rule
                on `detail`.
              example: page-size
      required:
        - code
        - title
        - detail
    ResponseErrorList:
      type: object
      description: >-
        Error response. Follows the Consumer Data Standards error envelope so
        that a caller already handling CDR errors does not need a second error
        parser.
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ErrorV1'
      required:
        - errors
    EnumGrantStatusV1:
      type: string
      description: >+

        Grant Status Types


        A Grant has a particular status at any point in time.


        | Value   |
        Description                                                                                                             
        |

        |---------|--------------------------------------------------------------------------------------------------------------------------|

        | ACTIVE  | Currently active and available for data sharing provided a
        suitable token is presented and verified to utilise the Grant |

        | EXPIRED | Grant naturally expired in accordance with the agreed end
        date/time.                                                     |

        | REVOKED | Grant was actively revoked by a User action. There will be
        suitable events available in the Grant History endpoints      |

      enum:
        - ACTIVE
        - EXPIRED
        - REVOKED
      example: ACTIVE
      x-enum-varnames:
        - ACTIVE
        - EXPIRED
        - REVOKED
    EnumGrantTypeV1:
      type: string
      description: The kind of authorisation artifact this Grant is.
      enum:
        - CDR_SHARING_ARRANGEMENT_V1
      example: CDR_SHARING_ARRANGEMENT_V1
      x-enum-varnames:
        - CDR_SHARING_ARRANGEMENT_V1
    GrantBaseV1:
      type: object
      description: >-

        A **Grant** is the term used by Biza to describe an established set of
        tokens  providing permissions to designated APIs and is essentially a
        record of the  permission given by the customer to use their information
        to execute actions.  Every Grant has a `grantType` that describes what
        type of Grant it is.


        There is currently a single `grantType` of `CDR_SHARING_ARRANGEMENT_V1`
        supported. Please review the documentation for `EnumGrantTypeV1` for
        further information.
      properties:
        grantId:
          type: string
          format: uuid
          description: >-
            The grant's identifier, unique within the realm. Stable for the life
            of the grant, including after revocation.
          example: dd488573-510f-42c1-82b7-e6ecaa735545
        grantType:
          $ref: '#/components/schemas/EnumGrantTypeV1'
        userId:
          type: string
          description: >-
            The User who authorised the grant in the first place. This is the
            `userId` that must be used to revoke the Grant.
          example: 7c4a8d09ca3762af61e59520943dc264
        principalId:
          type: string
          description: The Principal the Grant is held against.
          example: 08c31a2a9016d6c517a95562228a37c0
        status:
          $ref: '#/components/schemas/EnumGrantStatusV1'
        createdTime:
          type: string
          format: date-time
          description: When the Grant was created.
          example: '2021-01-01T12:30:00Z'
        expiryTime:
          type: string
          format: date-time
          description: >-
            The expiry time of the Grant.

            **NOTE:** Do not derive `status` from this field; see `status`. A
            revoked Grant keeps the expiry it was created with, so comparing
            this to the current time reports it as expired rather than revoked.
          example: '2022-01-01T12:30:00Z'
        latestTokenTime:
          type: string
          format: date-time
          description: >-
            When an access token was most recently issued against this grant.
            Absent if none ever has been. Useful for telling a dormant Grant
            from an actively used one.
          example: '2021-06-01T09:00:00Z'
      required:
        - grantId
        - grantType
        - userId
        - principalId
        - status
        - createdTime
        - expiryTime
    CdrScopeV1:
      type: object
      description: A single CDR scope, as requested by the Data Recipient.
      properties:
        name:
          type: string
          description: The CDR scope name.
          example: bank:accounts.detail:read
        description:
          type: string
          description: Human-readable description of the scope.
          example: Account balance and details
      required:
        - name
        - description
    CdrDataClusterV1:
      type: object
      description: >-
        A customer-facing data cluster: this is one or more authorisations
        scopes presented as a single statement according to the CDR CX
        Standards.
      properties:
        name:
          type: string
          description: The name of the Data Cluster.
          example: Account balance and details
        permissionLanguage:
          type: array
          items:
            type: string
          example:
            - Name of account;
            - Type of account;
            - Account balance;
            - Account number;
            - Interest rates;
            - Fees;
            - Discounts;
            - Account terms;
            - Account mail address;
        includedScopes:
          type: array
          description: The underlying CDR scopes collapsed into this one.
          example:
            - name: bank:accounts.basic:read
              description: Account name, type and balance
            - name: bank:accounts.detail:read
              description: Account balance and details
          items:
            $ref: '#/components/schemas/CdrScopeV1'
      required:
        - name
        - permissionLanguage
        - includedScopes
    CdrAccountV1:
      type: object
      description: >-
        An account currently shared under a grant.


        It carries your own identifier for the account and nothing else. Display
        names, nicknames and masked account numbers are not published here: they
        originate in your core system, so you can resolve any of them from the
        identifier.
      properties:
        accountId:
          type: string
          description: >-
            Account Identifier used by Data Adapter and reflected unmodified
            within responses.

            This identifier **is not** pairwised as this is an internal API not
            an externally facing one.
          example: 0b6d9c6e9d4a4e23a3b0a5d6c7e8f901
      required:
        - accountId
    EnumParticipantV1:
      type: string
      description: >+

        Participant Types


        This provides an enumeration of currently supported participants.


        | Value                   |
        Description                                                     |

        |-------------------------|-----------------------------------------------------------------|

        | CDR_SOFTWARE_PRODUCT_V1 | Consumer Data Right Software Product
        belonging to a Data Recipient |

      enum:
        - CDR_SOFTWARE_PRODUCT_V1
      example: CDR_SOFTWARE_PRODUCT_V1
      x-enum-varnames:
        - CDR_SOFTWARE_PRODUCT_V1
    ParticipantBaseV1:
      type: object
      description: Participant
      properties:
        participantId:
          type: string
          description: Participant Identifier
          example: 4c90de1f-5cea-4b87-8269-5235f34c4ce1
        participantType:
          $ref: '#/components/schemas/EnumParticipantV1'
    EnumCdrSoftwareProductStatusV1:
      type: string
      description: >-
        A Software Product's status on the CDR register. A product or brand that
        is not `ACTIVE` is why a Grant may be held or revoked without the
        customer acting.
      enum:
        - ACTIVE
        - INACTIVE
        - REMOVED
      example: ACTIVE
    EnumCdrDataRecipientBrandStatusV1:
      type: string
      description: >-
        A Data Recipient brand's status on the CDR register. A brand that is not
        `ACTIVE` is why a Grant may be held or revoked without the customer
        acting.
      enum:
        - ACTIVE
        - INACTIVE
        - REMOVED
      example: ACTIVE
    EnumCdrAccreditationLevelV1:
      type: string
      description: A legal entities Accreditation Level
      enum:
        - UNRESTRICTED
        - SPONSORED
      example: UNRESTRICTED
    CdrSoftwareProductV1:
      allOf:
        - $ref: '#/components/schemas/ParticipantBaseV1'
        - type: object
          description: The Data Recipient software product that holds the grant.
          properties:
            softwareProductId:
              type: string
              description: The CDR register software product identifier.
              example: 4f012edd-05e9-4129-8682-ede321fd46eb
            name:
              type: string
              description: The name of the software product.
              example: Hardship Hub Casebook
            description:
              type: string
              description: The Software Product description provided to the Register
              example: >-
                Case management for financial counsellors: lists every creditor
                from a client's consented bank, energy and loan data, drafts
                hardship requests, tracks creditor replies against deadlines,
                and gives the client a plain-language read-only copy.
            logoUri:
              type: string
              format: uri
              description: The URI of the logo for the Software Product
              example: https://mockco.sandbox.svc.2492.au/hardship-hub/logo-1to1.png
            websiteUri:
              type: string
              format: uri
              description: Website URI of the Software Product
              example: https://mockco.sandbox.svc.2492.au/hardship-hub/
            policyUri:
              type: string
              format: uri
              description: Policy URI of the Software Product
              example: https://mockco.sandbox.svc.2492.au/hardship-hub/cdr-policy
            status:
              $ref: '#/components/schemas/EnumCdrSoftwareProductStatusV1'
            brandName:
              type: string
              example: Hardship Hub
              description: The brand name of the Data Recipient.
            brandStatus:
              $ref: '#/components/schemas/EnumCdrDataRecipientBrandStatusV1'
            legalEntityName:
              type: string
              example: Hardship Hub Pty Ltd
            accreditationNumber:
              type: string
              example: BNK00000013
              description: The accreditation number of the Data Recipient.
            accreditationLevel:
              $ref: '#/components/schemas/EnumCdrAccreditationLevelV1'
          required:
            - participantId
            - participantType
            - softwareProductId
            - name
            - description
            - logoUri
            - websiteUri
            - policyUri
            - status
            - brandName
            - brandStatus
            - legalEntityName
            - accreditationNumber
            - accreditationLevel
    ParticipantV1:
      type: object
      description: >-

        An ecosystem participant. Currently we only support a CDR Software
        Product.
      oneOf:
        - $ref: '#/components/schemas/CdrSoftwareProductV1'
      discriminator:
        propertyName: participantType
        mapping:
          CDR_SOFTWARE_PRODUCT_V1: '#/components/schemas/CdrSoftwareProductV1'
    GrantCdrSharingArrangementV1:
      allOf:
        - $ref: '#/components/schemas/GrantBaseV1'
        - type: object
          description: >-
            A CDR consumer's sharing arrangement — the only Grant kind supported
            today. `grantType: CDR_SHARING_ARRANGEMENT_V1`.
          properties:
            scopes:
              type: array
              description: The scopes as requested by the Data Recipient.
              example:
                - name: bank:accounts.basic:read
                  description: Account name, type and balance
                - name: bank:accounts.detail:read
                  description: Account numbers and features
              items:
                $ref: '#/components/schemas/CdrScopeV1'
            dataClusters:
              type: array
              description: >-
                The scopes as they were presented to the customer, collapsed to
                satisfy the CDR CX Permission Language Guidelines. These are
                what the customer actually agreed to and are what should be
                shown when explaining a Grant back to them; `scopes` is what the
                Recipient asked for.
              items:
                $ref: '#/components/schemas/CdrDataClusterV1'
            accounts:
              type: array
              description: >-
                The accounts shared under this grant. An empty array on a Grant
                whose `status` is still `ACTIVE` is valid: a joint account owner
                can withdraw their own account from a Grant someone else created
                without revoking the arrangement, and the initiating holder's
                authorisation survives even if every account that remains
                visible to this caller has been withdrawn.
              items:
                $ref: '#/components/schemas/CdrAccountV1'
            accountsWithheld:
              type: boolean
              description: >-
                Whether this grant covers accounts other than the named user's,
                which have been omitted from `accounts`. `false` with an empty
                `accounts` array means the Grant genuinely shares no accounts
                visible to this caller, not that every account was withheld.
              example: true
            participant:
              $ref: '#/components/schemas/ParticipantV1'
          required:
            - scopes
            - dataClusters
            - accounts
            - participant
    GrantV1:
      type: object
      description: >-

        A **Grant** is the term used by Biza to describe an established set of
        tokens  providing permissions to designated APIs and is essentially a
        record of the  permission given by the customer to use their information
        to execute actions.  Every Grant has a `grantType` that describes what
        type of Grant it is.


        There is currently a single `grantType` of `CDR_SHARING_ARRANGEMENT_V1`
        supported. Please review the documentation for `EnumGrantTypeV1` for
        further information.
      oneOf:
        - $ref: '#/components/schemas/GrantCdrSharingArrangementV1'
      discriminator:
        propertyName: grantType
        mapping:
          CDR_SHARING_ARRANGEMENT_V1: '#/components/schemas/GrantCdrSharingArrangementV1'
    MetaPaginatedV1:
      type: object
      description: >-
        Pagination metadata for an offset-paged collection.


        Every member is present on every paged response, so a paginator always
        has both a record count and a jump-to-page target.
      properties:
        page:
          type: integer
          format: int32
          description: The page returned, 1-based.
          example: 1
        pageSize:
          type: integer
          format: int32
          description: >-
            The number of records per page. Note the casing convention: query
            parameters on this API are kebab-case (`page-size`) and JSON
            properties are camelCase.
          example: 25
        totalPages:
          type: integer
          format: int32
          description: >-
            The total number of pages available, counting the same records as
            `totalRecords`.
          example: 2
        totalRecords:
          type: integer
          format: int64
          description: >-
            The total number of records **the caller can retrieve**, which is
            not always the number of rows matching the filters.


            Excluded from the count, not merely from the page: Grants of a kind
            this collection does not represent, and - on the User axis - grants
            the admission rule withholds. Paging to the end of the collection
            always yields exactly `totalRecords` records.


            This is a disclosure control, not a convenience. A total larger than
            what the caller can page through would report that something exists
            which the withholding is there to conceal, so the count must be
            taken over the same predicate that selects the page, in the query
            rather than after it.
          example: 40
      required:
        - page
        - pageSize
        - totalPages
        - totalRecords
    LinksPaginatedV1:
      type: object
      description: >-
        Navigation links for an offset-paged collection, in the Consumer Data
        Standards' five-member shape.


        **Link values are opaque: follow them, do not construct or parse them.**
        This API may move to cursor-based paging in a later version without
        changing this object, and a client that derives `next` by incrementing
        `page` will break when it does. That is why no member below is described
        in terms of `page`.
      properties:
        self:
          type: string
          format: uri
          description: This page. Always present.
          example: >-
            https://consent.data.holder/dio-au/v1/sandbox-holder/principal/08c31a2a9016d6c517a95562228a37c0/grant?page=2&page-size=25
        first:
          type: string
          format: uri
          description: >-
            The first page of the collection. Absent when this page is the
            first.
        prev:
          type: string
          format: uri
          description: The previous page. Absent when this page is the first.
        next:
          type: string
          format: uri
          description: The next page. Absent when this page is the last.
        last:
          type: string
          format: uri
          description: >-
            The last page of the collection.


            **Optional.** Treat its absence as normal rather than as an error:
            it is the one member that cannot be computed under cursor-based
            paging, so it may stop being sent in a future version.
      required:
        - self
    ResponseListGrantV1:
      type: object
      properties:
        version:
          type: string
          description: Discriminator for the response envelope version.
          enum:
            - V1
          example: V1
        data:
          type: array
          description: A list of Grant entities
          items:
            $ref: '#/components/schemas/GrantV1'
        meta:
          $ref: '#/components/schemas/MetaPaginatedV1'
        links:
          $ref: '#/components/schemas/LinksPaginatedV1'
      required:
        - version
        - data
        - meta
        - links
    ResponseListGrant:
      description: >-
        Versioned response envelope. The `version` property is the
        discriminator: a later version of this operation adds a new member to
        the `oneOf` and leaves every existing member untouched, so a client that
        does not uplift is not affected.
      oneOf:
        - $ref: '#/components/schemas/ResponseListGrantV1'
      discriminator:
        propertyName: version
        mapping:
          V1: '#/components/schemas/ResponseListGrantV1'
    ResponseGetGrantV1:
      type: object
      properties:
        version:
          type: string
          description: Discriminator for the response envelope version.
          enum:
            - V1
          example: V1
        data:
          $ref: '#/components/schemas/GrantV1'
      required:
        - version
        - data
    ResponseGetGrant:
      description: >-
        Versioned response envelope. The `version` property is the
        discriminator: a later version of this operation adds a new member to
        the `oneOf` and leaves every existing member untouched, so a client that
        does not uplift is not affected.
      oneOf:
        - $ref: '#/components/schemas/ResponseGetGrantV1'
      discriminator:
        propertyName: version
        mapping:
          V1: '#/components/schemas/ResponseGetGrantV1'
    EnumGrantEventTypeV1:
      type: string
      description: >

        Grant Event Types


        Named with the Grant kind as a prefix, because this enum is shared
        across every

        grant kind the API may ever carry: a future kind's lifecycle events are
        new

        members here, not a reinterpretation of these five. See `GrantV1`'s

        description for why there is only one kind today.


        | Value                                      |
        Description                                                                             
        |

        |---------------------------------------------|------------------------------------------------------------------------------------------|

        | CDR_SHARING_ARRANGEMENT_V1_CREATED     | The customer authorised the
        grant. Carries the full initial state.                       |

        | CDR_SHARING_ARRANGEMENT_V1_AMENDED     | The Grant was changed.
        Carries the delta against the previous state.                     |

        | CDR_SHARING_ARRANGEMENT_V1_REVOKED     | The Grant was revoked.
        `revocationCause` says by whom or why.                            |

        | CDR_SHARING_ARRANGEMENT_V1_HELD        | Sharing was suspended without
        the Grant being revoked. `holdCause` says why.             |

        | CDR_SHARING_ARRANGEMENT_V1_REACTIVATED | A previously held Grant
        became shareable again. `holdCause` says which hold was lifted.  |
      enum:
        - CDR_SHARING_ARRANGEMENT_V1_CREATED
        - CDR_SHARING_ARRANGEMENT_V1_AMENDED
        - CDR_SHARING_ARRANGEMENT_V1_REVOKED
        - CDR_SHARING_ARRANGEMENT_V1_HELD
        - CDR_SHARING_ARRANGEMENT_V1_REACTIVATED
      example: CDR_SHARING_ARRANGEMENT_V1_AMENDED
      x-enum-varnames:
        - CDR_SHARING_ARRANGEMENT_V1_CREATED
        - CDR_SHARING_ARRANGEMENT_V1_AMENDED
        - CDR_SHARING_ARRANGEMENT_V1_REVOKED
        - CDR_SHARING_ARRANGEMENT_V1_HELD
        - CDR_SHARING_ARRANGEMENT_V1_REACTIVATED
    GrantEventBaseV1:
      type: object
      description: >-
        The fields every history entry carries.


        There is no free-text description: every entry is typed and its payload
        structured, so there is nothing a prose blob would add that you would
        have to parse out of it.
      properties:
        grantHistoryId:
          type: string
          format: uuid
          description: The identifier of this history entry.
          example: 9824d737-5787-4ab1-97bd-0a81fa2f20c2
        occurrenceTime:
          type: string
          format: date-time
          description: When the event happened.
          example: '2021-01-01T12:30:00Z'
        grantEventType:
          $ref: '#/components/schemas/EnumGrantEventTypeV1'
      required:
        - grantHistoryId
        - occurrenceTime
        - grantEventType
    GrantEventCdrArrangementCreatedV1:
      allOf:
        - $ref: '#/components/schemas/GrantEventBaseV1'
        - type: object
          description: >-
            Grant Creation Event.

            `accounts` carries only the accounts within the currently requested
            scope.

            That matters most on this type: `CDR_SHARING_ARRANGEMENT_V1_CREATED`
            is the snapshot every later `CDR_SHARING_ARRANGEMENT_V1_AMENDED`
            delta applies to, so replaying this history reconstructs **the named
            user's view** of the Grant rather than the Grant itself.
          properties:
            accountsWithheld:
              type: boolean
              description: >-
                Whether the Grant was created covering accounts other than the
                named user's, which have been omitted from `accounts`.
              example: true
          required:
            - accountsWithheld
    EnumGrantAmendmentCauseV1:
      type: string
      description: >-
        Why a Grant was amended.


        `CONSUMER` is the consenting customer changing their own arrangement.
        `JOINT_OWNER_WITHDRAWAL` is a *different* person - another owner of an
        account the arrangement covers - withdrawing that account from it, which
        shrinks somebody else's consent without their involvement. The
        distinction matters when explaining an amendment back to a customer.


        Tolerate values added in later versions of this payload.
      enum:
        - CONSUMER
        - JOINT_OWNER_WITHDRAWAL
      example: CONSUMER
      x-enum-varnames:
        - CONSUMER
        - JOINT_OWNER_WITHDRAWAL
    GrantEventCdrArrangementAmendedV1:
      allOf:
        - $ref: '#/components/schemas/GrantEventBaseV1'
        - type: object
          description: >-
            The Grant was amended. Expressed as a delta rather than a snapshot,
            so that what the customer actually changed is legible without
            diffing two states.


            Note that `userId` is the User who made *this* amendment, which is
            not necessarily the User who created the grant: on a joint account
            another account holder may amend it. `amendmentCause` tells you
            which of the two happened - without it, a joint owner withdrawing
            their account is indistinguishable from the consumer amending their
            own consent, and a dashboard would attribute the act to the wrong
            person.


            consent-api's own withdrawJointAccountSharingApprovalForGrant causes
            a `JOINT_OWNER_WITHDRAWAL` amendment directly; every other amendment
            this event reports is caused elsewhere and only shows up here as
            history.
          properties:
            userId:
              type: string
              description: The User who made this amendment.
              example: 7c4a8d09ca3762af61e59520943dc264
            amendmentCause:
              $ref: '#/components/schemas/EnumGrantAmendmentCauseV1'
            scopesAdded:
              type: array
              items:
                $ref: '#/components/schemas/CdrScopeV1'
            scopesRemoved:
              type: array
              items:
                $ref: '#/components/schemas/CdrScopeV1'
            cxScopesAdded:
              type: array
              items:
                $ref: '#/components/schemas/CdrDataClusterV1'
            cxScopesRemoved:
              type: array
              items:
                $ref: '#/components/schemas/CdrDataClusterV1'
            accountsAdded:
              type: array
              items:
                $ref: '#/components/schemas/CdrAccountV1'
            accountsRemoved:
              type: array
              items:
                $ref: '#/components/schemas/CdrAccountV1'
            previousExpiryTime:
              type: string
              format: date-time
              description: The grant's expiry before this amendment.
              example: '2021-06-01T12:30:00Z'
            newExpiryTime:
              type: string
              format: date-time
              description: The grant's expiry after this amendment.
              example: '2022-01-01T12:30:00Z'
          required:
            - userId
            - amendmentCause
    EnumGrantRevocationCauseV1:
      type: string
      description: >

        Who or what revoked the grant.


        | Value            |
        Description                                                                
        |

        |------------------|-----------------------------------------------------------------------------|

        | ADMIN            | Revoked by the Data Holder's own administrative
        tooling.                    |

        | DASHBOARD        | Revoked by the customer through a consumer
        dashboard or app-to-app flow.    |

        | RECIPIENT        | Revoked by the Data
        Recipient.                                              |

        | CLOSED_PRINCIPAL | Revoked because the Principal was closed in the
        Holder's core system.       |

        | REGISTER_UPDATE  | Revoked because the Software Product was revoked on
        the CDR register.        |

        | USER_INELIGIBLE  | Revoked because the User ceased to be eligible to
        share.                    |
      enum:
        - ADMIN
        - DASHBOARD
        - RECIPIENT
        - CLOSED_PRINCIPAL
        - REGISTER_UPDATE
        - USER_INELIGIBLE
      example: DASHBOARD
      x-enum-varnames:
        - ADMIN
        - DASHBOARD
        - RECIPIENT
        - CLOSED_PRINCIPAL
        - REGISTER_UPDATE
        - USER_INELIGIBLE
    ActorSystemV1:
      type: object
      description: An automated process caused this, not a person.
      properties:
        actorType:
          type: string
          enum:
            - SYSTEM
          example: SYSTEM
      required:
        - actorType
    ActorUserV1:
      type: object
      description: >-
        A person caused this, acting through the calling software rather than
        through a HaaS interface directly. For instance a Holder operator
        working a support case, or customer facing staff acting on a Consumer
        instruction. Specify them as the `actorUserId` using an identifier that
        can be correlated to the internal authentication systems of the Holder.
      properties:
        actorType:
          type: string
          enum:
            - USER
          example: USER
        actorUserId:
          type: string
          description: Identifier for the person who triggered this action.
          example: a3f7c1e2-9b4d-4e6a-8c2f-1d5e7a9b3c0d
      required:
        - actorType
        - actorUserId
    ActorV1:
      description: >-
        Who or what triggered this call. Written as audit metadata onto the
        resulting history entry; it is never an authorization input.
      oneOf:
        - $ref: '#/components/schemas/ActorSystemV1'
        - $ref: '#/components/schemas/ActorUserV1'
      discriminator:
        propertyName: actorType
        mapping:
          SYSTEM: '#/components/schemas/ActorSystemV1'
          USER: '#/components/schemas/ActorUserV1'
    GrantEventCdrArrangementRevokedV1:
      allOf:
        - $ref: '#/components/schemas/GrantEventBaseV1'
        - type: object
          description: >-
            The Grant was revoked. The Grant itself remains readable with a
            status of `REVOKED`; revocation is not deletion.
          properties:
            revocationCause:
              $ref: '#/components/schemas/EnumGrantRevocationCauseV1'
            actor:
              allOf:
                - $ref: '#/components/schemas/ActorV1'
              description: >-
                Who actually revoked the Grant.


                Present when `revocationCause` is `ADMIN` or `DASHBOARD` - the
                two causes a named Holder-side actor, rather than an external
                party or the register, is responsible for. This is deliberately
                independent of who *created* the Grant: the admission rule that
                lets a request reach either revoke operation does not require
                the actor to be the Grant's own creator (for example, a
                nominated representative revoking a fellow representative's
                arrangement), so this is the only way to tell who actually
                acted.


                Absent for `RECIPIENT` - the Data Recipient's own arrangement
                revocation call has no Holder-side actor to name - and for
                `CLOSED_PRINCIPAL`, `REGISTER_UPDATE` and `USER_INELIGIBLE`,
                none of which originate from a request at all. Also absent on
                history entries written before this field existed.
            xFapiInteractionId:
              type: string
              format: uuid
              description: >-
                The `x-fapi-interaction-id` of the request that caused this
                revocation.


                Present when `revocationCause` is `ADMIN`, `DASHBOARD` or
                `RECIPIENT` - the three causes raised by an inbound request that
                carries one: a call to this estate's own revoke operations for
                the first two, and the Data Recipient's CDR
                arrangement-revocation call for the third. Absent for
                `CLOSED_PRINCIPAL`, `REGISTER_UPDATE` and `USER_INELIGIBLE`,
                none of which originate from a request at all.
              example: 6ba7b814-9dad-11d1-80b4-00c04fd430c8
          required:
            - revocationCause
    EnumGrantHoldCauseV1:
      type: string
      description: >-
        Why sharing was suspended, or which suspension was lifted. One cause
        exists today; tolerate values added in later versions of this payload.
      enum:
        - REGISTER_UPDATE
      example: REGISTER_UPDATE
      x-enum-varnames:
        - REGISTER_UPDATE
    GrantEventCdrArrangementHeldV1:
      allOf:
        - $ref: '#/components/schemas/GrantEventBaseV1'
        - type: object
          description: >-
            Sharing against the Grant was suspended without the Grant being
            revoked.


            This is in history because it is the answer to "why did data stop
            flowing against a Grant nobody revoked".
          properties:
            holdCause:
              $ref: '#/components/schemas/EnumGrantHoldCauseV1'
          required:
            - holdCause
    GrantEventCdrArrangementReactivatedV1:
      allOf:
        - $ref: '#/components/schemas/GrantEventBaseV1'
        - type: object
          description: >-
            A previously held Grant became shareable again. `holdCause` names
            the hold that was lifted.
          properties:
            holdCause:
              $ref: '#/components/schemas/EnumGrantHoldCauseV1'
          required:
            - holdCause
    GrantEventV1:
      description: >-
        One event in a Grant history extract.


        The type of event is discriminated based on `grantEventType` with the
        currently supported types provided below.
      oneOf:
        - $ref: '#/components/schemas/GrantEventCdrArrangementCreatedV1'
        - $ref: '#/components/schemas/GrantEventCdrArrangementAmendedV1'
        - $ref: '#/components/schemas/GrantEventCdrArrangementRevokedV1'
        - $ref: '#/components/schemas/GrantEventCdrArrangementHeldV1'
        - $ref: '#/components/schemas/GrantEventCdrArrangementReactivatedV1'
      discriminator:
        propertyName: grantEventType
        mapping:
          CDR_SHARING_ARRANGEMENT_V1_CREATED: '#/components/schemas/GrantEventCdrArrangementCreatedV1'
          CDR_SHARING_ARRANGEMENT_V1_AMENDED: '#/components/schemas/GrantEventCdrArrangementAmendedV1'
          CDR_SHARING_ARRANGEMENT_V1_REVOKED: '#/components/schemas/GrantEventCdrArrangementRevokedV1'
          CDR_SHARING_ARRANGEMENT_V1_HELD: '#/components/schemas/GrantEventCdrArrangementHeldV1'
          CDR_SHARING_ARRANGEMENT_V1_REACTIVATED: '#/components/schemas/GrantEventCdrArrangementReactivatedV1'
    ResponseListGrantHistoryV1:
      type: object
      properties:
        version:
          type: string
          description: Discriminator for the response envelope version.
          enum:
            - V1
          example: V1
        data:
          type: array
          description: >-
            A history of events related to a particular Grant restricted to the
            supported event types as described in `EnumGrantEventTypeV1`.
          items:
            $ref: '#/components/schemas/GrantEventV1'
        meta:
          $ref: '#/components/schemas/MetaPaginatedV1'
        links:
          $ref: '#/components/schemas/LinksPaginatedV1'
      required:
        - version
        - data
        - meta
        - links
    ResponseListGrantHistory:
      description: >-
        Versioned response envelope. The `version` property is the
        discriminator: a later version of this operation adds a new member to
        the `oneOf` and leaves every existing member untouched, so a client that
        does not uplift is not affected.
      oneOf:
        - $ref: '#/components/schemas/ResponseListGrantHistoryV1'
      discriminator:
        propertyName: version
        mapping:
          V1: '#/components/schemas/ResponseListGrantHistoryV1'
    EnumAccountSharingStatusV1:
      description: Whether a joint account's data may currently be shared.
      type: string
      enum:
        - PRE_APPROVAL
        - NON_DISCLOSURE
      example: PRE_APPROVAL
    EnumDomsRequestStatusV1:
      description: The current status of a DOMS request.
      enum:
        - PENDING
        - APPROVED
        - DENIED
        - EXPIRED
      type: string
      example: PENDING
    EnumDomsActionV1:
      description: The multi-party sharing election being proposed for the account.
      enum:
        - NON_DISCLOSURE
        - PRE_APPROVAL
      type: string
      example: PRE_APPROVAL
    DomsRequestPreviewV1:
      type: object
      description: >-
        A brief preview of the most recent DOMS request against an account,
        carried on the account itself. For the full request, including every
        other owner's response, call `getUserPrincipalAccountDomsRequest`.
      properties:
        requestId:
          type: string
          format: uuid
          description: The request's identifier, unique within the realm.
          example: f3e6b2d4-9c1a-4f6e-8b2a-1d6c9e4a7b50
        status:
          $ref: '#/components/schemas/EnumDomsRequestStatusV1'
        targetSharingStatus:
          $ref: '#/components/schemas/EnumDomsActionV1'
        expiryTime:
          type: string
          format: date-time
          description: When the request expires if it has not been resolved.
          example: '2021-01-15T12:30:00Z'
      required:
        - requestId
        - status
        - targetSharingStatus
        - expiryTime
    AccountJointDetailV1:
      type: object
      description: >-
        Joint-account detail, present only when the account has more than one
        owner.
      properties:
        sharingStatus:
          $ref: '#/components/schemas/EnumAccountSharingStatusV1'
        sharingStatusLastUpdated:
          type: string
          format: date-time
          nullable: true
          description: >-
            When `sharingStatus` last changed, or `null` if it has never
            changed.
          example: '2021-01-01T12:30:00Z'
        latestDomsRequest:
          $ref: '#/components/schemas/DomsRequestPreviewV1'
      required:
        - sharingStatus
        - sharingStatusLastUpdated
    AccountV1:
      type: object
      description: >-
        An account known to this realm, as seen by the User or Principal under
        which it was requested.
      properties:
        accountId:
          type: string
          description: >-
            Account Identifier used by the Data Adapter and reflected unmodified
            within responses. This identifier is not pairwised, as this is an
            internal API, not an externally facing one.
          example: 0b6d9c6e9d4a4e23a3b0a5d6c7e8f901
        vulnerable:
          type: boolean
          description: >-
            Whether the asserted User is currently flagged vulnerable on this
            account. This is self-referential: it reports the asserted User's
            own status only, and is always `false` for every other account
            customer, so it cannot be used to learn another customer's status.
          example: false
        ownerCount:
          type: integer
          description: >-
            The number of account customers who own this account. `1` for a
            single-owner account; more than `1` identifies a joint account, in
            which case `jointAccount` is also present.
          example: 1
        jointAccount:
          $ref: '#/components/schemas/AccountJointDetailV1'
        pendingDomsRequestCount:
          type: integer
          description: >-
            The number of DOMS requests against this account that are still
            `PENDING`.
          example: 0
        secondaryUserCount:
          type: integer
          description: >-
            The number of Secondary User Instructions on this account.
            `SECONDARY_USER_PRIVATE` relationships are excluded entirely —
            disclosing even a count of them would reveal something this resource
            family otherwise withholds completely.
          example: 0
      required:
        - accountId
        - vulnerable
        - ownerCount
        - pendingDomsRequestCount
        - secondaryUserCount
    ResponseListUserPrincipalAccountsV1:
      type: object
      properties:
        version:
          type: string
          description: Discriminator for the response envelope version.
          enum:
            - V1
          example: V1
        data:
          type: array
          description: The accounts visible to the asserted User under this Principal.
          items:
            $ref: '#/components/schemas/AccountV1'
      required:
        - version
        - data
    ResponseListUserPrincipalAccounts:
      description: >-
        Versioned response envelope. The `version` property is the
        discriminator: a later version of this operation adds a new member to
        the `oneOf` and leaves every existing member untouched, so a client that
        does not uplift is not affected.
      oneOf:
        - $ref: '#/components/schemas/ResponseListUserPrincipalAccountsV1'
      discriminator:
        propertyName: version
        mapping:
          V1: '#/components/schemas/ResponseListUserPrincipalAccountsV1'
    ResponseGetUserPrincipalAccountV1:
      type: object
      properties:
        version:
          type: string
          description: Discriminator for the response envelope version.
          enum:
            - V1
          example: V1
        data:
          $ref: '#/components/schemas/AccountV1'
      required:
        - version
        - data
    ResponseGetUserPrincipalAccount:
      description: >-
        Versioned response envelope. The `version` property is the
        discriminator: a later version of this operation adds a new member to
        the `oneOf` and leaves every existing member untouched, so a client that
        does not uplift is not affected.
      oneOf:
        - $ref: '#/components/schemas/ResponseGetUserPrincipalAccountV1'
      discriminator:
        propertyName: version
        mapping:
          V1: '#/components/schemas/ResponseGetUserPrincipalAccountV1'
    ResponseGetPrincipalGrantAccountDetailsV1:
      type: object
      properties:
        version:
          type: string
          description: Discriminator for the response envelope version.
          enum:
            - V1
          example: V1
        data:
          type: array
          description: >-
            The accounts shared under this Grant, across every User attached to
            the named Principal, withholding nothing.
          items:
            $ref: '#/components/schemas/AccountV1'
      required:
        - version
        - data
    ResponseGetPrincipalGrantAccountDetails:
      description: >-
        Versioned response envelope. The `version` property is the
        discriminator: a later version of this operation adds a new member to
        the `oneOf` and leaves every existing member untouched, so a client that
        does not uplift is not affected.
      oneOf:
        - $ref: '#/components/schemas/ResponseGetPrincipalGrantAccountDetailsV1'
      discriminator:
        propertyName: version
        mapping:
          V1: '#/components/schemas/ResponseGetPrincipalGrantAccountDetailsV1'
    ResponseGetUserGrantAccountDetailsV1:
      type: object
      properties:
        version:
          type: string
          description: Discriminator for the response envelope version.
          enum:
            - V1
          example: V1
        data:
          type: array
          description: >-
            The accounts shared under this Grant, from the perspective of the
            asserted User. An account the User cannot currently see is omitted
            here too, consistent with `accountsWithheld` on the Grant itself.
          items:
            $ref: '#/components/schemas/AccountV1'
      required:
        - version
        - data
    ResponseGetUserGrantAccountDetails:
      description: >-
        Versioned response envelope. The `version` property is the
        discriminator: a later version of this operation adds a new member to
        the `oneOf` and leaves every existing member untouched, so a client that
        does not uplift is not affected.
      oneOf:
        - $ref: '#/components/schemas/ResponseGetUserGrantAccountDetailsV1'
      discriminator:
        propertyName: version
        mapping:
          V1: '#/components/schemas/ResponseGetUserGrantAccountDetailsV1'
    NotificationFrequencyV1:
      type: object
      description: How often a notification is sent for this event.
      properties:
        event:
          type: boolean
          description: Notify as the event happens.
          example: true
        weekly:
          type: boolean
          description: Include this event in a weekly digest.
          example: false
        monthly:
          type: boolean
          description: Include this event in a monthly digest.
          example: false
      required:
        - event
        - weekly
        - monthly
    NotificationPreferencesV1:
      type: object
      description: Notification preferences for one User's relationship to one account.
      properties:
        dataSharingStarted:
          $ref: '#/components/schemas/NotificationFrequencyV1'
        dataSharingStopped:
          $ref: '#/components/schemas/NotificationFrequencyV1'
        secondaryUsers:
          $ref: '#/components/schemas/NotificationFrequencyV1'
        dataSharingNotApproved:
          type: boolean
          description: Notify when a proposed data sharing change is not approved.
          example: true
      required:
        - dataSharingStarted
        - dataSharingStopped
        - secondaryUsers
        - dataSharingNotApproved
    ResponseGetUserAccountNotificationPreferencesV1:
      type: object
      properties:
        version:
          type: string
          description: Discriminator for the response envelope version.
          enum:
            - V1
          example: V1
        data:
          $ref: '#/components/schemas/NotificationPreferencesV1'
      required:
        - version
        - data
    ResponseGetUserAccountNotificationPreferences:
      description: >-
        Versioned response envelope. The `version` property is the
        discriminator: a later version of this operation adds a new member to
        the `oneOf` and leaves every existing member untouched, so a client that
        does not uplift is not affected.
      oneOf:
        - $ref: '#/components/schemas/ResponseGetUserAccountNotificationPreferencesV1'
      discriminator:
        propertyName: version
        mapping:
          V1: '#/components/schemas/ResponseGetUserAccountNotificationPreferencesV1'
    UpdateNotificationPreferencesV1:
      type: object
      description: >-
        A full replacement of notification preferences for one User's
        relationship to one account. Every property is required: this is a
        complete replace, not a patch.
      properties:
        dataSharingStarted:
          $ref: '#/components/schemas/NotificationFrequencyV1'
        dataSharingStopped:
          $ref: '#/components/schemas/NotificationFrequencyV1'
        secondaryUsers:
          $ref: '#/components/schemas/NotificationFrequencyV1'
        dataSharingNotApproved:
          type: boolean
          description: Notify when a proposed data sharing change is not approved.
          example: true
      required:
        - dataSharingStarted
        - dataSharingStopped
        - secondaryUsers
        - dataSharingNotApproved
    ResponseUpdateUserAccountNotificationPreferencesV1:
      type: object
      properties:
        version:
          type: string
          description: Discriminator for the response envelope version.
          enum:
            - V1
          example: V1
        data:
          $ref: '#/components/schemas/NotificationPreferencesV1'
      required:
        - version
        - data
    ResponseUpdateUserAccountNotificationPreferences:
      description: >-
        Versioned response envelope. The `version` property is the
        discriminator: a later version of this operation adds a new member to
        the `oneOf` and leaves every existing member untouched, so a client that
        does not uplift is not affected.
      oneOf:
        - $ref: >-
            #/components/schemas/ResponseUpdateUserAccountNotificationPreferencesV1
      discriminator:
        propertyName: version
        mapping:
          V1: >-
            #/components/schemas/ResponseUpdateUserAccountNotificationPreferencesV1
    EnumSecondaryUserSharingStatusV1:
      description: Whether a secondary user's access to the account is enabled.
      enum:
        - ENABLED
        - DISABLED
      type: string
      example: ENABLED
    SecondaryUserV1:
      type: object
      description: A secondary user's sharing status on one account.
      properties:
        secondaryUserUserId:
          type: string
          description: The User Identifier of the secondary user.
          example: 3f6e9a2c7d8b4512a0f6e9c2d7b48a01
        secondaryUserSharingStatus:
          $ref: '#/components/schemas/EnumSecondaryUserSharingStatusV1'
        assignedTo:
          type: string
          nullable: true
          description: >-
            The User Identifier of the account owner managing this secondary
            user's access, if one has been assigned.
          example: 7c4a8d09ca3762af61e59520943dc264
      required:
        - secondaryUserUserId
        - secondaryUserSharingStatus
        - assignedTo
    ResponseListSecondaryUsersV1:
      type: object
      properties:
        version:
          type: string
          description: Discriminator for the response envelope version.
          enum:
            - V1
          example: V1
        data:
          type: array
          description: The secondary users on this account.
          items:
            $ref: '#/components/schemas/SecondaryUserV1'
      required:
        - version
        - data
    ResponseListSecondaryUsers:
      description: >-
        Versioned response envelope. The `version` property is the
        discriminator: a later version of this operation adds a new member to
        the `oneOf` and leaves every existing member untouched, so a client that
        does not uplift is not affected.
      oneOf:
        - $ref: '#/components/schemas/ResponseListSecondaryUsersV1'
      discriminator:
        propertyName: version
        mapping:
          V1: '#/components/schemas/ResponseListSecondaryUsersV1'
    UpdateSecondaryUserV1:
      type: object
      description: Enable or disable a secondary user's access to the account.
      properties:
        status:
          $ref: '#/components/schemas/EnumSecondaryUserSharingStatusV1'
      required:
        - status
    ResponseUpdateSecondaryUserV1:
      type: object
      properties:
        version:
          type: string
          description: Discriminator for the response envelope version.
          enum:
            - V1
          example: V1
        data:
          $ref: '#/components/schemas/SecondaryUserV1'
      required:
        - version
        - data
    ResponseUpdateSecondaryUser:
      description: >-
        Versioned response envelope. The `version` property is the
        discriminator: a later version of this operation adds a new member to
        the `oneOf` and leaves every existing member untouched, so a client that
        does not uplift is not affected.
      oneOf:
        - $ref: '#/components/schemas/ResponseUpdateSecondaryUserV1'
      discriminator:
        propertyName: version
        mapping:
          V1: '#/components/schemas/ResponseUpdateSecondaryUserV1'
    DOMSResponseV1:
      type: object
      description: One owner's response to a DOMS request.
      properties:
        userId:
          type: string
          description: The User who responded.
          example: 7c4a8d09ca3762af61e59520943dc264
        response:
          $ref: '#/components/schemas/EnumDomsRequestStatusV1'
        respondedAt:
          type: string
          format: date-time
          description: When the owner responded. Absent until they do.
          example: '2021-01-05T09:15:00Z'
      required:
        - userId
        - response
    DOMSRequestV1:
      type: object
      description: >-
        A Disclosure Option Management Service (DOMS) request: a proposal to
        change how a joint account's data may be shared, and its current
        approval state.
      properties:
        requestId:
          type: string
          format: uuid
          description: The request's identifier, unique within the realm.
          example: f3e6b2d4-9c1a-4f6e-8b2a-1d6c9e4a7b50
        accountId:
          type: string
          description: >-
            Account Identifier used by the Data Adapter and reflected unmodified
            within responses.
          example: 0b6d9c6e9d4a4e23a3b0a5d6c7e8f901
        createdBy:
          type: string
          description: The User who proposed this request.
          example: 7c4a8d09ca3762af61e59520943dc264
        targetSharingStatus:
          $ref: '#/components/schemas/EnumDomsActionV1'
        status:
          $ref: '#/components/schemas/EnumDomsRequestStatusV1'
        responses:
          type: array
          description: Each other owner's response so far.
          items:
            $ref: '#/components/schemas/DOMSResponseV1'
        createdTime:
          type: string
          format: date-time
          description: When the request was created.
          example: '2021-01-01T12:30:00Z'
        expiryTime:
          type: string
          format: date-time
          description: When the request expires if it has not been resolved.
          example: '2021-01-15T12:30:00Z'
      required:
        - requestId
        - accountId
        - createdBy
        - targetSharingStatus
        - status
        - responses
        - createdTime
        - expiryTime
    ResponseListUserPrincipalAccountDomsRequestsV1:
      type: object
      properties:
        version:
          type: string
          description: Discriminator for the response envelope version.
          enum:
            - V1
          example: V1
        data:
          type: array
          description: The DOMS requests visible to the asserted User on this account.
          items:
            $ref: '#/components/schemas/DOMSRequestV1'
      required:
        - version
        - data
    ResponseListUserPrincipalAccountDomsRequests:
      description: >-
        Versioned response envelope. The `version` property is the
        discriminator: a later version of this operation adds a new member to
        the `oneOf` and leaves every existing member untouched, so a client that
        does not uplift is not affected.
      oneOf:
        - $ref: '#/components/schemas/ResponseListUserPrincipalAccountDomsRequestsV1'
      discriminator:
        propertyName: version
        mapping:
          V1: '#/components/schemas/ResponseListUserPrincipalAccountDomsRequestsV1'
    CreateDOMSRequestV1:
      type: object
      description: Propose a multi-party sharing election for an account.
      properties:
        action:
          $ref: '#/components/schemas/EnumDomsActionV1'
      required:
        - action
    ResponseCreateUserPrincipalAccountDomsRequestV1:
      type: object
      properties:
        version:
          type: string
          description: Discriminator for the response envelope version.
          enum:
            - V1
          example: V1
        data:
          $ref: '#/components/schemas/DOMSRequestV1'
      required:
        - version
        - data
    ResponseCreateUserPrincipalAccountDomsRequest:
      description: >-
        Versioned response envelope. The `version` property is the
        discriminator: a later version of this operation adds a new member to
        the `oneOf` and leaves every existing member untouched, so a client that
        does not uplift is not affected.
      oneOf:
        - $ref: '#/components/schemas/ResponseCreateUserPrincipalAccountDomsRequestV1'
      discriminator:
        propertyName: version
        mapping:
          V1: '#/components/schemas/ResponseCreateUserPrincipalAccountDomsRequestV1'
    ResponseGetUserPrincipalAccountDomsRequestV1:
      type: object
      properties:
        version:
          type: string
          description: Discriminator for the response envelope version.
          enum:
            - V1
          example: V1
        data:
          $ref: '#/components/schemas/DOMSRequestV1'
      required:
        - version
        - data
    ResponseGetUserPrincipalAccountDomsRequest:
      description: >-
        Versioned response envelope. The `version` property is the
        discriminator: a later version of this operation adds a new member to
        the `oneOf` and leaves every existing member untouched, so a client that
        does not uplift is not affected.
      oneOf:
        - $ref: '#/components/schemas/ResponseGetUserPrincipalAccountDomsRequestV1'
      discriminator:
        propertyName: version
        mapping:
          V1: '#/components/schemas/ResponseGetUserPrincipalAccountDomsRequestV1'
    EnumDomsHandleDecisionV1:
      description: An owner's response to a pending DOMS request.
      enum:
        - APPROVED
        - DENIED
      type: string
      example: APPROVED
    HandleDOMSRequestV1:
      type: object
      description: Approve or deny a pending DOMS request.
      properties:
        action:
          $ref: '#/components/schemas/EnumDomsHandleDecisionV1'
      required:
        - action
    ResponseHandleUserPrincipalAccountDomsRequestV1:
      type: object
      properties:
        version:
          type: string
          description: Discriminator for the response envelope version.
          enum:
            - V1
          example: V1
        data:
          $ref: '#/components/schemas/DOMSRequestV1'
      required:
        - version
        - data
    ResponseHandleUserPrincipalAccountDomsRequest:
      description: >-
        Versioned response envelope. The `version` property is the
        discriminator: a later version of this operation adds a new member to
        the `oneOf` and leaves every existing member untouched, so a client that
        does not uplift is not affected.
      oneOf:
        - $ref: '#/components/schemas/ResponseHandleUserPrincipalAccountDomsRequestV1'
      discriminator:
        propertyName: version
        mapping:
          V1: '#/components/schemas/ResponseHandleUserPrincipalAccountDomsRequestV1'
    EnumPrincipalTypeV1:
      description: Whether the Principal is an individual or an organisation.
      enum:
        - person
        - organisation
      type: string
      example: person
    EnumProfileTypeV1:
      description: >-
        How the asserted User reaches this profile: as the Principal itself, as
        a nominated representative acting for it, or through an authority
        granted to the User by its own principal.
      enum:
        - PRINCIPAL
        - NOMINATED_REPRESENTATIVE
        - AUTHORITY_TO_OPERATE
      type: string
      example: PRINCIPAL
    LookupUserProfileBaseV1:
      type: object
      description: >-
        The fields every profile kind carries, regardless of how the asserted
        User reaches it.
      properties:
        principalId:
          type: string
          description: The Principal Identifier for this profile.
          example: 08c31a2a9016d6c517a95562228a37c0
        profileName:
          type: string
          description: The profile's display name.
          example: Jane Citizen
        principalType:
          $ref: '#/components/schemas/EnumPrincipalTypeV1'
        profileType:
          $ref: '#/components/schemas/EnumProfileTypeV1'
        userId:
          type: string
          description: >-
            The asserted User this profile belongs to. Always the path's own
            `userId`.
          example: 7c4a8d09ca3762af61e59520943dc264
        vulnerable:
          type: boolean
          description: >-
            Whether the asserted User is currently flagged vulnerable for this
            profile's Principal. Self-referential: it reports only the asserted
            User's own status against this one Principal, and is never computed
            for any other User.
          example: false
      required:
        - principalId
        - profileName
        - principalType
        - profileType
        - userId
        - vulnerable
    LookupUserProfilePrincipalV1:
      allOf:
        - $ref: '#/components/schemas/LookupUserProfileBaseV1'
        - type: object
          description: >-
            The asserted User reaches this profile as the Principal itself.
            `profileType: PRINCIPAL`. Carries no fields beyond the shared
            profile data.
    LookupUserProfileNominatedRepresentativeV1:
      allOf:
        - $ref: '#/components/schemas/LookupUserProfileBaseV1'
        - type: object
          description: >-
            The asserted User reaches this profile as a nominated representative
            acting for the Principal. `profileType: NOMINATED_REPRESENTATIVE`.
          properties:
            nominatedRepresentativePrincipalId:
              type: string
              description: The individual Principal the nomination runs through.
              example: 08c31a2a9016d6c517a95562228a37c0
          required:
            - nominatedRepresentativePrincipalId
    LookupUserProfileAuthorityToOperateV1:
      allOf:
        - $ref: '#/components/schemas/LookupUserProfileBaseV1'
        - type: object
          description: >-
            The asserted User reaches this profile through an authority to
            operate granted to it by its own principal. `profileType:
            AUTHORITY_TO_OPERATE`.
          properties:
            atoType:
              type: string
              enum:
                - POWER_OF_ATTORNEY
              example: POWER_OF_ATTORNEY
            atoUserId:
              type: string
              description: >-
                The User who granted this authority to operate. Never the same
                value as `userId`, which always names the asserted User.
              example: 7c4a8d09ca3762af61e59520943dc264
          required:
            - atoType
            - atoUserId
    LookupUserProfileV1:
      description: >-
        One Principal the asserted User can act as, and how it reaches it.
        `profileType` is the discriminator: a profile reached plainly carries no
        extra fields, one reached via nomination carries
        `nominatedRepresentativePrincipalId`, and one reached via authority to
        operate carries `atoType`/`atoUserId` — never more than one kind's extra
        fields on the same row.
      oneOf:
        - $ref: '#/components/schemas/LookupUserProfilePrincipalV1'
        - $ref: '#/components/schemas/LookupUserProfileNominatedRepresentativeV1'
        - $ref: '#/components/schemas/LookupUserProfileAuthorityToOperateV1'
      discriminator:
        propertyName: profileType
        mapping:
          PRINCIPAL: '#/components/schemas/LookupUserProfilePrincipalV1'
          NOMINATED_REPRESENTATIVE: '#/components/schemas/LookupUserProfileNominatedRepresentativeV1'
          AUTHORITY_TO_OPERATE: '#/components/schemas/LookupUserProfileAuthorityToOperateV1'
    ResponseLookupUserProfilesV1:
      type: object
      properties:
        version:
          type: string
          description: Discriminator for the response envelope version.
          enum:
            - V1
          example: V1
        data:
          type: array
          description: The profiles the asserted User can act as.
          items:
            $ref: '#/components/schemas/LookupUserProfileV1'
      required:
        - version
        - data
    ResponseLookupUserProfiles:
      description: >-
        Versioned response envelope. The `version` property is the
        discriminator: a later version of this operation adds a new member to
        the `oneOf` and leaves every existing member untouched, so a client that
        does not uplift is not affected.
      oneOf:
        - $ref: '#/components/schemas/ResponseLookupUserProfilesV1'
      discriminator:
        propertyName: version
        mapping:
          V1: '#/components/schemas/ResponseLookupUserProfilesV1'
    TokenExchangeRequestV1:
      type: object
      description: >-
        RFC 8693 token-exchange request, `application/x-www-form-urlencoded`.
        The one consent-api operation whose wire format is the RFC's own, not
        this service's HaaS-authored JSON convention — fields keep their RFC
        8693 names and `snake_case`, not this document's usual `camelCase`.
      properties:
        grant_type:
          type: string
          description: Fixed. The only grant type this operation understands.
          enum:
            - urn:ietf:params:oauth:grant-type:token-exchange
          example: urn:ietf:params:oauth:grant-type:token-exchange
        subject_token:
          type: string
          description: >-
            The holder's own, already-issued session token for the customer —
            never minted fresh for this call. A JWT carrying
            `biza-au:auth:user_id` (required) and `biza-au:auth:principal_id`
            (optional) as top-level claims. Verified — signature, `iss`, `aud`
            and temporal checks, all fail-closed — before any claim is trusted.
          example: eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJ1c2VyLTEyMyJ9.signature
        subject_token_type:
          type: string
          description: >-
            Declares what the holder calls its own token. Informational only —
            both values are validated identically, through the same
            signature/`iss`/`aud`/temporal procedure.
          enum:
            - urn:ietf:params:oauth:token-type:id_token
            - urn:ietf:params:oauth:token-type:jwt
          example: urn:ietf:params:oauth:token-type:jwt
        resource:
          type: string
          description: >-
            Exactly one occurrence, required. The triggering `request_uri`
            verbatim — `RequestUtil.parRealmURI`'s existing
            `urn:<realmName>:<parId>` format. Becomes the issued `act_token`'s
            `aud` claim.
          example: urn:example-realm:018f3f1a-7e3c-7c4e-8a2b-4e6b8f1c9d2a
        audience:
          type: string
          description: Accepted for RFC 8693 client-library compatibility. Not honoured.
        scope:
          type: string
          description: Accepted for RFC 8693 client-library compatibility. Not honoured.
        requested_token_type:
          type: string
          description: >-
            Optional. If sent, must equal
            `urn:ietf:params:oauth:token-type:access_token` or the request is
            `invalid_request` — this operation never issues any other token
            type.
          enum:
            - urn:ietf:params:oauth:token-type:access_token
          example: urn:ietf:params:oauth:token-type:access_token
        actor_token:
          type: string
          description: Accepted for RFC 8693 client-library compatibility. Not honoured.
        actor_token_type:
          type: string
          description: Accepted for RFC 8693 client-library compatibility. Not honoured.
      required:
        - grant_type
        - subject_token
        - subject_token_type
        - resource
    TokenExchangeResponseV1:
      type: object
      description: >-
        The unmodified RFC 8693 success shape — no HaaS-specific field, no
        `scope`, no `refresh_token`. The one-time, single-`request_uri` binding
        travels inside `access_token`'s own claims (its `aud`), never as a
        sibling property here.
      properties:
        access_token:
          type: string
          description: >-
            The `act_token`. Minted and signed by the token-exchange grant this
            operation mediates to, under its app2app mediation profile —
            consent-api relays it unmodified.
          example: >-
            eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1cm46ZXhhbXBsZS1yZWFsbTouLi4ifQ.signature
        issued_token_type:
          type: string
          description: Fixed. This operation only ever issues an access token.
          enum:
            - urn:ietf:params:oauth:token-type:access_token
          example: urn:ietf:params:oauth:token-type:access_token
        token_type:
          type: string
          description: Fixed.
          enum:
            - Bearer
          example: Bearer
        expires_in:
          type: integer
          description: >-
            Seconds. Tightened from RFC 8693's RECOMMENDED to REQUIRED — the SPA
            has nothing else to learn the one-shot window from.
          example: 300
      required:
        - access_token
        - issued_token_type
        - token_type
        - expires_in
    TokenExchangeErrorV1:
      type: object
      description: >-
        RFC 6749 §5.2 / RFC 8693 §2.1's own error shape — bare `{error,
        error_description}`, deliberately **not** this service's `urn:dio:`
        envelope. This is the one consent-api response body this document does
        not describe in the house vocabulary: a failure here always carries one
        of this schema's two fields, where an edge-generated failure for an
        unrelated reason (a route miss, a rate limit) carries neither. Relayed
        verbatim from the token-exchange grant this operation mediates to, where
        the failure originates; this document does not translate or re-code it.
      properties:
        error:
          type: string
          description: >-
            Not a closed enum — this document does not own this vocabulary.
            Expect RFC 6749 §5.2's codes (`invalid_request`, `invalid_grant`,
            `unsupported_grant_type`) and RFC 8693 §2.1's `invalid_target`; a
            future code the underlying grant surfaces is relayed unchanged, not
            rejected by this schema.
          example: invalid_request
        error_description:
          type: string
          description: Human-readable, RFC 6749 §5.2. Optional.
      required:
        - error
  responses:
    GetEndpointMeta:
      description: Success
      headers:
        x-haas-v:
          $ref: '#/components/headers/ResponseXHaasV'
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFapiInteractionId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseGetEndpointMeta'
    ErrorBadRequest:
      description: >-
        A parameter or header this operation accepts was supplied with a value
        it does not accept for example, an out-of-range `page` or `page-size`,
        an unrecognised `status` or `event-type` or a malformed `x-haas-v`
      headers:
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFapiInteractionId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseErrorList'
    ErrorUnauthorised:
      description: The bearer token is missing, expired or otherwise invalid
      headers:
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFapiInteractionId'
        WWW-Authenticate:
          $ref: '#/components/headers/ResponseWwwAuthenticate'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseErrorList'
    ErrorForbidden:
      description: The token is valid but lacks a scope this operation requires.
      headers:
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFapiInteractionId'
        WWW-Authenticate:
          $ref: '#/components/headers/ResponseWwwAuthenticate'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseErrorList'
    ErrorNotFound:
      description: >-
        The realm, or a resource named within it, does not exist or is not one
        this credential may access.
      headers:
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFapiInteractionId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseErrorList'
    ErrorUnsupportedVersion:
      description: >-
        No version this operation can serve satisfies the version you asked for,
        either a `x-haas-v` naming an unavailable version or a `x-haas-max-v`
        ceiling below every version available. Call `getEndpointMeta` to
        discover which versions this deployment supports for each operation.
      headers:
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFapiInteractionId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseErrorList'
    ListGrants:
      description: Success
      headers:
        x-haas-v:
          $ref: '#/components/headers/ResponseXHaasV'
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFapiInteractionId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseListGrant'
    GetGrant:
      description: Success
      headers:
        x-haas-v:
          $ref: '#/components/headers/ResponseXHaasV'
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFapiInteractionId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseGetGrant'
    ListGrantHistory:
      description: Success
      headers:
        x-haas-v:
          $ref: '#/components/headers/ResponseXHaasV'
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFapiInteractionId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseListGrantHistory'
    ListUserPrincipalAccounts:
      description: Success
      headers:
        x-haas-v:
          $ref: '#/components/headers/ResponseXHaasV'
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFapiInteractionId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseListUserPrincipalAccounts'
    GetUserPrincipalAccount:
      description: Success
      headers:
        x-haas-v:
          $ref: '#/components/headers/ResponseXHaasV'
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFapiInteractionId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseGetUserPrincipalAccount'
    GetPrincipalGrantAccountDetails:
      description: Success
      headers:
        x-haas-v:
          $ref: '#/components/headers/ResponseXHaasV'
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFapiInteractionId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseGetPrincipalGrantAccountDetails'
    GetUserGrantAccountDetails:
      description: Success
      headers:
        x-haas-v:
          $ref: '#/components/headers/ResponseXHaasV'
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFapiInteractionId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseGetUserGrantAccountDetails'
    GetUserAccountNotificationPreferences:
      description: Success
      headers:
        x-haas-v:
          $ref: '#/components/headers/ResponseXHaasV'
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFapiInteractionId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseGetUserAccountNotificationPreferences'
    UpdateUserAccountNotificationPreferences:
      description: Success
      headers:
        x-haas-v:
          $ref: '#/components/headers/ResponseXHaasV'
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFapiInteractionId'
      content:
        application/json:
          schema:
            $ref: >-
              #/components/schemas/ResponseUpdateUserAccountNotificationPreferences
    ListSecondaryUsers:
      description: Success
      headers:
        x-haas-v:
          $ref: '#/components/headers/ResponseXHaasV'
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFapiInteractionId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseListSecondaryUsers'
    UpdateSecondaryUser:
      description: Success
      headers:
        x-haas-v:
          $ref: '#/components/headers/ResponseXHaasV'
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFapiInteractionId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseUpdateSecondaryUser'
    ListUserPrincipalAccountDomsRequests:
      description: Success
      headers:
        x-haas-v:
          $ref: '#/components/headers/ResponseXHaasV'
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFapiInteractionId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseListUserPrincipalAccountDomsRequests'
    CreateUserPrincipalAccountDomsRequest:
      description: Success
      headers:
        x-haas-v:
          $ref: '#/components/headers/ResponseXHaasV'
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFapiInteractionId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseCreateUserPrincipalAccountDomsRequest'
    GetUserPrincipalAccountDomsRequest:
      description: Success
      headers:
        x-haas-v:
          $ref: '#/components/headers/ResponseXHaasV'
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFapiInteractionId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseGetUserPrincipalAccountDomsRequest'
    HandleUserPrincipalAccountDomsRequest:
      description: Success
      headers:
        x-haas-v:
          $ref: '#/components/headers/ResponseXHaasV'
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFapiInteractionId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseHandleUserPrincipalAccountDomsRequest'
    LookupUserProfiles:
      description: Success
      headers:
        x-haas-v:
          $ref: '#/components/headers/ResponseXHaasV'
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFapiInteractionId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseLookupUserProfiles'
    ExchangeToken:
      description: >-
        `act_token` minted. The unmodified RFC 8693 success shape — see
        `TokenExchangeResponseV1`.
      headers:
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFapiInteractionId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TokenExchangeResponseV1'
    TokenExchangeError:
      description: >-
        The request was malformed, named an unsupported `grant_type`,
        `subject_token_type` or `requested_token_type`, or `subject_token`
        failed verification — signature, `iss`, `aud` or temporal check. Bare
        RFC 6749 §5.2 shape — see `TokenExchangeErrorV1` for why this is the one
        response on this service that does not carry the `urn:dio:` envelope.
      headers:
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFapiInteractionId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TokenExchangeErrorV1'
