openapi: 3.0.1
info:
  title: Management API (HaaS)
  version: 1.36.0.0
  description: This is the OpenAPI specification consumed by Consumer Dashboard Clients
  contact:
    email: hello@biza.io
    name: Biza.io
    url: https://biza.io/
  license:
    name: Commercial
    url: https://biza.io/
servers:
  - url: https://grant.haas.biza/dio-au/v1
    description: Generated server url
security:
  - APIKey: []
  - TokenBasedAuth:
      - biza-au:haas:dashboard:readwrite
tags:
  - name: Accounts
    description: Accounts Management
  - name: Admin
    description: Admin Endpoints
  - name: DOMS
    description: Disclosure Option Management Service Management
  - name: Grants
    description: Grants Management
  - name: Grant Consents
    description: Consent Management related to Grants
  - name: Notifications
    description: Notifications
  - name: Secondary User Instructions
    description: Secondary User Instruction Management
  - name: User
    description: User Management
  - name: Dashboard
    description: Admin functions for the biza consumer dashboard
paths:
  /health:
    get:
      description: Retrieve health check summary
      operationId: getHealth
      parameters:
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
        - $ref: '#/components/parameters/HeaderRealmName'
      responses:
        '200':
          $ref: '#/components/responses/GetHealth'
        '400':
          $ref: '#/components/responses/ResponseGeneric400'
      summary: Service Health Status
      tags:
        - Admin
  /{principalId}:
    get:
      tags:
        - Grants
      summary: List Grants
      description: >-
        Lists Grants (Arrangements) for a specific User


        **Note:** This endpoint is intended for eventual migration to
        `/{principalId}/grant`.


        We recommend considering migrating to this alternative URL at your
        convenience but have not currently defined any retirement date.
      operationId: listGrantsOld
      deprecated: true
      parameters:
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
        - $ref: '#/components/parameters/HeaderRealmName'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/QueryUserId'
        - $ref: '#/components/parameters/QueryPage'
        - $ref: '#/components/parameters/QueryPageSize'
        - $ref: '#/components/parameters/QueryGrantStatus'
      responses:
        '200':
          $ref: '#/components/responses/ListGrants'
        '400':
          $ref: '#/components/responses/ResponseGeneric400'
        '404':
          $ref: '#/components/responses/ResponseGeneric404'
  /{principalId}/user:
    get:
      tags:
        - User
      summary: Get User
      description: >-
        Get User Details for a specific User in the context of a specific
        Principal
      operationId: getUser
      parameters:
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
        - $ref: '#/components/parameters/HeaderRealmName'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/QueryUserId'
      responses:
        '200':
          $ref: '#/components/responses/GetUser'
        '400':
          $ref: '#/components/responses/ResponseGeneric400'
        '404':
          $ref: '#/components/responses/ResponseGeneric404'
  /{principalId}/doms:
    get:
      tags:
        - DOMS
      summary: List DOMS Requests for a specific Principal
      description: Lists all DOMS requests related to the specific Principal
      operationId: listDOMSRequests
      parameters:
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
        - $ref: '#/components/parameters/HeaderRealmName'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/QueryUserId'
        - $ref: '#/components/parameters/QueryIsDomsCreator'
        - $ref: '#/components/parameters/QueryPage'
        - $ref: '#/components/parameters/QueryPageSize'
      responses:
        '200':
          $ref: '#/components/responses/ListDOMSRequests'
        '400':
          $ref: '#/components/responses/ResponseGeneric400'
        '404':
          $ref: '#/components/responses/ResponseGeneric404'
  /{principalId}/doms/{requestId}:
    get:
      tags:
        - DOMS
      summary: Get DOMS Request
      description: Get a DOMS request by the request identifier
      operationId: getDOMSRequest
      parameters:
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
        - $ref: '#/components/parameters/HeaderRealmName'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/QueryUserId'
        - $ref: '#/components/parameters/PathRequestId'
      responses:
        '200':
          $ref: '#/components/responses/GetDOMSRequest'
        '400':
          $ref: '#/components/responses/ResponseGeneric400'
        '404':
          $ref: '#/components/responses/ResponseGeneric404'
  /{principalId}/account/{accountId}/doms:
    get:
      tags:
        - DOMS
      summary: List DOMS Requests for a Specific Account
      description: >-
        Lists all DOMS requests related to a specific Account for a specific
        Principal
      operationId: listDOMSRequestSpecificAccount
      parameters:
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
        - $ref: '#/components/parameters/HeaderRealmName'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/QueryUserId'
        - $ref: '#/components/parameters/QueryIsDomsCreator'
        - $ref: '#/components/parameters/PathAccountId'
        - $ref: '#/components/parameters/QueryPage'
        - $ref: '#/components/parameters/QueryPageSize'
      responses:
        '200':
          $ref: '#/components/responses/ListDOMSRequests'
        '400':
          $ref: '#/components/responses/ResponseGeneric400'
        '404':
          $ref: '#/components/responses/ResponseGeneric404'
    post:
      tags:
        - DOMS
      summary: Create DOMS Request for an Account for a specific User
      description: >-
        Creates a DOMS change request for a specific Account from a specific
        User
      operationId: createDOMSRequest
      parameters:
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
        - $ref: '#/components/parameters/HeaderRealmName'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/PathAccountId'
      requestBody:
        $ref: '#/components/requestBodies/CreateDOMSRequest'
      responses:
        '200':
          $ref: '#/components/responses/CreateDOMSRequest'
        '400':
          $ref: '#/components/responses/ResponseGeneric400'
        '404':
          $ref: '#/components/responses/ResponseGeneric404'
  /{principalId}/account/{accountId}/doms/{requestId}:
    put:
      tags:
        - DOMS
      summary: Handle DOMS Request for an Account
      description: Provides a method of responding to a DOMS request
      operationId: handleDOMSRequest
      parameters:
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
        - $ref: '#/components/parameters/HeaderRealmName'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/PathAccountId'
        - $ref: '#/components/parameters/PathRequestId'
      requestBody:
        $ref: '#/components/requestBodies/HandleDOMSRequest'
      responses:
        '200':
          $ref: '#/components/responses/UpdateDOMSRequest'
        '400':
          $ref: '#/components/responses/ResponseGeneric400'
        '404':
          $ref: '#/components/responses/ResponseGeneric404'
  /{principalId}/account:
    get:
      tags:
        - Accounts
      summary: List Principal Accounts
      description: List Principal Accounts for a specific User
      operationId: listAccounts
      parameters:
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
        - $ref: '#/components/parameters/HeaderRealmName'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/QueryUserId'
        - $ref: '#/components/parameters/QueryPage'
        - $ref: '#/components/parameters/QueryPageSize'
        - $ref: '#/components/parameters/QueryDashboardRealmAccountType'
      responses:
        '200':
          $ref: '#/components/responses/ListAccounts'
        '400':
          $ref: '#/components/responses/ResponseGeneric400'
        '404':
          $ref: '#/components/responses/ResponseGeneric404'
  /{principalId}/account/{accountId}:
    get:
      tags:
        - Accounts
      summary: Get Specific Account
      description: Get the details for a specific Account in the context of a specific User
      operationId: getAccount
      parameters:
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
        - $ref: '#/components/parameters/HeaderRealmName'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/QueryUserId'
        - $ref: '#/components/parameters/PathAccountId'
      responses:
        '200':
          $ref: '#/components/responses/GetAccount'
        '400':
          $ref: '#/components/responses/ResponseGeneric400'
        '404':
          $ref: '#/components/responses/ResponseGeneric404'
  /{principalId}/account/{accountId}/grant:
    get:
      tags:
        - Accounts
      summary: List Grants for Specific Account
      description: >-
        List Grants related to a specific Account in the context of a specific
        User
      operationId: listGrantsByAccountId
      parameters:
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
        - $ref: '#/components/parameters/HeaderRealmName'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/QueryUserId'
        - $ref: '#/components/parameters/PathAccountId'
        - $ref: '#/components/parameters/QueryPage'
        - $ref: '#/components/parameters/QueryPageSize'
        - $ref: '#/components/parameters/QueryGrantStatus'
      responses:
        '200':
          $ref: '#/components/responses/ListAccountGrants'
        '400':
          $ref: '#/components/responses/ResponseGeneric400'
        '404':
          $ref: '#/components/responses/ResponseGeneric404'
  /{principalId}/account/{accountId}/notification:
    get:
      tags:
        - Notifications
      summary: Get Notification Preferences for an Account
      description: Get Notification Preferences for a specific Account for a specific User
      operationId: getNotificationPreferences
      parameters:
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
        - $ref: '#/components/parameters/HeaderRealmName'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/QueryUserId'
        - $ref: '#/components/parameters/PathAccountId'
      responses:
        '200':
          $ref: '#/components/responses/GetNotificationPreferences'
        '400':
          $ref: '#/components/responses/ResponseGeneric400'
        '404':
          $ref: '#/components/responses/ResponseGeneric404'
    put:
      tags:
        - Notifications
      summary: Update Notification Preferences for an Account
      description: >-
        Update Notification Preferences for a specific Account for a specific
        User
      operationId: updateNotificationPreferences
      parameters:
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
        - $ref: '#/components/parameters/HeaderRealmName'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/PathAccountId'
      requestBody:
        $ref: '#/components/requestBodies/UpdateNotificationsRequest'
      responses:
        '200':
          $ref: '#/components/responses/UpdateNotificationPreferences'
        '400':
          $ref: '#/components/responses/ResponseGeneric400'
        '404':
          $ref: '#/components/responses/ResponseGeneric404'
  /{principalId}/account/{accountId}/secondary:
    get:
      tags:
        - Secondary User Instructions
      summary: List Secondary User Instructions for an Account
      description: List Secondary User Instructions for an Account for a specific User
      operationId: listSecondaryUserInstructions
      parameters:
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
        - $ref: '#/components/parameters/HeaderRealmName'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/QueryUserId'
        - $ref: '#/components/parameters/PathAccountId'
        - $ref: '#/components/parameters/QuerySecondaryUserSharingStatus'
        - $ref: '#/components/parameters/QueryPage'
        - $ref: '#/components/parameters/QueryPageSize'
      responses:
        '200':
          $ref: '#/components/responses/ListSecondaryUsers'
        '400':
          $ref: '#/components/responses/ResponseGeneric400'
        '404':
          $ref: '#/components/responses/ResponseGeneric404'
  /{principalId}/account/{accountId}/secondary/{secondaryUserUserId}:
    put:
      tags:
        - Secondary User Instructions
      summary: Update Secondary User Instruction
      description: Update Secondary User Instruction status
      operationId: updateSecondaryUserInstruction
      parameters:
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
        - $ref: '#/components/parameters/HeaderRealmName'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/PathAccountId'
        - $ref: '#/components/parameters/PathSecondaryUserId'
      requestBody:
        $ref: '#/components/requestBodies/UpdateSecondaryUserRequest'
      responses:
        '200':
          $ref: '#/components/responses/UpdateSecondaryUser'
        '400':
          $ref: '#/components/responses/ResponseGeneric400'
        '404':
          $ref: '#/components/responses/ResponseGeneric404'
  /{principalId}/grant:
    get:
      tags:
        - Grants
      summary: List Grants
      description: >-
        Lists Grants (Arrangements) for a specific Principal in the context of a
        specific User
      operationId: listGrants
      parameters:
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
        - $ref: '#/components/parameters/HeaderRealmName'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/QueryUserId'
        - $ref: '#/components/parameters/QueryPage'
        - $ref: '#/components/parameters/QueryPageSize'
        - $ref: '#/components/parameters/QueryGrantStatus'
      responses:
        '200':
          $ref: '#/components/responses/ListGrants'
        '400':
          $ref: '#/components/responses/ResponseGeneric400'
        '404':
          $ref: '#/components/responses/ResponseGeneric404'
  /{principalId}/grant/{grantId}:
    get:
      tags:
        - Grants
      summary: Get Grant
      description: Get details for a specific Grant
      operationId: getGrant
      parameters:
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
        - $ref: '#/components/parameters/HeaderRealmName'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/QueryUserId'
        - $ref: '#/components/parameters/PathGrantId'
      responses:
        '200':
          $ref: '#/components/responses/GetGrant'
        '400':
          $ref: '#/components/responses/ResponseGeneric400'
        '404':
          $ref: '#/components/responses/ResponseGeneric404'
    delete:
      tags:
        - Grants
      summary: Delete Grant
      description: >-
        Revokes a specific Grant immediately triggering notification actions to
        related parties
      operationId: revokeGrant
      parameters:
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
        - $ref: '#/components/parameters/HeaderRealmName'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/QueryUserId'
        - $ref: '#/components/parameters/PathGrantId'
      responses:
        '204':
          $ref: '#/components/responses/DeleteGrant'
        '400':
          $ref: '#/components/responses/ResponseGeneric400'
        '404':
          $ref: '#/components/responses/ResponseGeneric404'
  /{principalId}/grant/{grantId}/log:
    get:
      tags:
        - Grants
      summary: List Grant Logs
      description: |-
        Returns logs about every event that modifies this grant. 

        Examples are:
          - Access token issuance (i.e: the ADR is requesting a data sharing session)
          - Dashboard api modifications
          - Amending consent with the user
          - Revocation
      operationId: getLogs
      parameters:
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
        - $ref: '#/components/parameters/HeaderRealmName'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/PathGrantId'
        - $ref: '#/components/parameters/QueryUserId'
        - $ref: '#/components/parameters/QueryGrantEventType'
        - $ref: '#/components/parameters/QueryPage'
        - $ref: '#/components/parameters/QueryPageSize'
      responses:
        '200':
          $ref: '#/components/responses/ListGrantLogs'
        '400':
          $ref: '#/components/responses/ResponseGeneric400'
        '404':
          $ref: '#/components/responses/ResponseGeneric404'
  /{principalId}/grant/{grantId}/account:
    get:
      tags:
        - Grants
      summary: List Grant Accounts
      description: >-
        List the Account identifiers that an End User has given during the Grant
        (Arrangement) establishment process
      operationId: listGrantAccounts
      parameters:
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
        - $ref: '#/components/parameters/HeaderRealmName'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/QueryUserId'
        - $ref: '#/components/parameters/PathGrantId'
        - $ref: '#/components/parameters/QueryPage'
        - $ref: '#/components/parameters/QueryPageSize'
      responses:
        '200':
          $ref: '#/components/responses/ListAccounts'
        '400':
          $ref: '#/components/responses/ResponseGeneric400'
        '404':
          $ref: '#/components/responses/ResponseGeneric404'
  /{principalId}/grant/{grantId}/consent:
    get:
      tags:
        - Grant Consents
      summary: List Grant Consents
      description: >-
        While a grant is the top level data structure that has tokens issued
        against it, consents are the individual temporal histories of that grant
        as it changes over it's lifespan. As a grant is modified, the current
        consent is terminated and a new consent is created to reflect the new
        state.
      operationId: getConsents
      parameters:
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
        - $ref: '#/components/parameters/HeaderRealmName'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/QueryUserId'
        - $ref: '#/components/parameters/PathGrantId'
        - $ref: '#/components/parameters/QueryPage'
        - $ref: '#/components/parameters/QueryPageSize'
      responses:
        '200':
          $ref: '#/components/responses/ListGrantRequests'
        '400':
          $ref: '#/components/responses/ResponseGeneric400'
        '404':
          $ref: '#/components/responses/ResponseGeneric404'
    put:
      tags:
        - Grant Consents
      summary: Create a new Grant Consent
      description: >-
        Creates a new consent and modifies the existing state of the grant to
        reflect. If the content of this request matches the existing arrangement
        state then the previous consent response is returned.
      operationId: createConsent
      parameters:
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
        - $ref: '#/components/parameters/HeaderRealmName'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/PathGrantId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GrantConsentDetailV1'
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CreateGrantRequest'
        '400':
          $ref: '#/components/responses/ResponseGeneric400'
        '404':
          $ref: '#/components/responses/ResponseGeneric404'
  /{principalId}/grant/{grantId}/joint-account/{accountId}:
    delete:
      tags:
        - Grants
      summary: Withdraw joint account sharing approval
      description: >-
        For joint account owner to withdraw sharing approval on the joint
        account from a specific Grant that was created by another joint account
        owner.
      operationId: withdrawJointAccount
      parameters:
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
        - $ref: '#/components/parameters/HeaderRealmName'
        - $ref: '#/components/parameters/PathPrincipalId'
        - $ref: '#/components/parameters/PathGrantId'
        - $ref: '#/components/parameters/PathAccountId'
        - $ref: '#/components/parameters/QueryUserId'
      responses:
        '204':
          $ref: '#/components/responses/WithdrawJointAccount'
        '400':
          $ref: '#/components/responses/ResponseGeneric400'
        '404':
          $ref: '#/components/responses/ResponseGeneric404'
  /dashboard/sso/request:
    post:
      tags:
        - Dashboard
      summary: Dashboard SSO Request
      description: >-
        Requests a signed JWT for use for logging into the biza consumer
        dashboard with a trusted user and (optionally) principal.


        This request object can be given to dashboard to create a link that will
        log the user into the dashboard. E.g:
        https://dashboard.biza.io/sso?request=$requestObjectJwt  


        Only required if using the Biza Consent Dashboard and wanting to login
        via  a prompt free single sign on. Calls to this must be secured by an
        appropriate  authentication mechanism for your digital portal.
      operationId: dashboardSsoRequest
      parameters:
        - $ref: '#/components/parameters/HeaderRealmNameRequired'
        - $ref: '#/components/parameters/HeaderXFapiInteractionId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RequestCreateDashboardSsoRequest'
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CreateDashboardSsoRequest'
        '400':
          $ref: '#/components/responses/ResponseGeneric400'
        '404':
          $ref: '#/components/responses/ResponseGeneric404'
components:
  securitySchemes:
    APIKey:
      description: >
        Specifies the API Key to access the Grant API. The header name can be
        tuned per installation.
      name: API-Key
      type: apiKey
      in: header
    TokenBasedAuth:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://idp.haas.biza/endpoint/token
          scopes:
            biza-au:haas:dashboard:readwrite: Access to all Dashboard functions
  parameters:
    HeaderXFapiInteractionId:
      description: >-
        An [RFC4122](https://tools.ietf.org/html/rfc4122) UUID used as a
        correlation id. If provided, the data holder must play back this value
        in the _x-fapi-interaction-id_ response header. If not provided a
        [RFC4122](https://tools.ietf.org/html/rfc4122) UUID value is required to
        be provided in the response header to track the interaction.
      explode: false
      in: header
      name: x-fapi-interaction-id
      required: false
      schema:
        type: string
        format: uuid
        example: 6ba7b814-9dad-11d1-80b4-00c04fd430c8
      style: simple
    HeaderRealmName:
      in: header
      name: x-haas-realm-name
      description: Represents the authorisation realm name context for the call being made.
      required: false
      schema:
        $ref: '#/components/schemas/DioRealmName'
    PathPrincipalId:
      description: ID of the specific Principal requested
      name: principalId
      in: path
      required: true
      schema:
        type: string
    QueryUserId:
      description: >-
        ID of the specific user requested.


        **Note:** This **SHOULD** be supplied, even if it is the same value as
        `principalId`. This field will be made mandatory at a later date
        however, if omitted, `userId` is currently assumed to be the same as
        `principalId`.
      name: userId
      in: query
      required: false
      schema:
        type: string
    QueryPage:
      description: Page of results to request (standard pagination).
      explode: true
      in: query
      name: page
      required: false
      schema:
        default: 1
        minimum: 1
        type: integer
        x-cds-type: PositiveInteger
      style: form
    QueryPageSize:
      description: Page size to request. Default is 25 (standard pagination).
      explode: true
      in: query
      name: page-size
      required: false
      schema:
        default: 25
        minimum: 1
        type: integer
        x-cds-type: PositiveInteger
      style: form
    QueryGrantStatus:
      name: status
      description: Filter on a specific grant status
      explode: true
      in: query
      required: false
      schema:
        type: array
        items:
          $ref: '#/components/schemas/EnumGrantStatus'
      style: form
    QueryIsDomsCreator:
      name: isCreator
      description: Filter DOMS requests by those created by this user
      in: query
      required: false
      schema:
        type: boolean
    PathRequestId:
      description: ID of the specific sharing request
      name: requestId
      in: path
      required: true
      schema:
        type: string
        format: uuid
    PathAccountId:
      description: ID of the specific account
      name: accountId
      in: path
      required: true
      schema:
        type: string
    QueryDashboardRealmAccountType:
      name: account-type
      description: >-
        Filter on a specific Account Type (if not provided no filter will be
        applied)
      explode: true
      in: query
      required: false
      schema:
        type: array
        items:
          $ref: '#/components/schemas/EnumDashboardRealmAccountTypeV1'
      style: form
    QuerySecondaryUserSharingStatus:
      name: status
      description: 'Filter on a specific Secondary User sharing status '
      in: query
      required: false
      schema:
        $ref: '#/components/schemas/EnumSecondaryUserSharingStatusV1'
    PathSecondaryUserId:
      description: User ID of the Secondary User
      name: secondaryUserUserId
      in: path
      required: true
      schema:
        type: string
    PathGrantId:
      description: ID of the specific grant
      name: grantId
      in: path
      required: true
      schema:
        type: string
        format: uuid
    QueryGrantEventType:
      name: eventType
      description: Filter on specific grant event types
      explode: true
      in: query
      required: false
      schema:
        type: array
        items:
          $ref: '#/components/schemas/EnumGrantEventTypeV1'
      style: form
    HeaderRealmNameRequired:
      in: header
      name: x-haas-realm-name
      description: Represents the authorisation realm name context for the call being made.
      required: true
      schema:
        $ref: '#/components/schemas/DioRealmName'
  schemas:
    DioRealmName:
      description: >-
        The name of the realm that data is being requested for. Necessary for
        holders that have multiple brands that should not share data between
        them.
      type: string
      example: biza-holder
    EnumAdapterHealthStatusV1:
      description: The Health Status
      enum:
        - UP
        - DOWN
      type: string
      example: UP
    ManagementHealthV1:
      properties:
        status:
          $ref: '#/components/schemas/EnumAdapterHealthStatusV1'
      type: object
      required:
        - status
    ResponseManagementGetHealthV1:
      properties:
        data:
          $ref: '#/components/schemas/ManagementHealthV1'
      required:
        - data
      type: object
    ErrorFieldInvalidV1:
      type: object
      properties:
        code:
          description: >-
            Holds an endpoint specific error code. This MAY be a standard CDR
            error code or an application-specific error code.
          type: string
          default: urn:au-cds:error:cds-all:Field/Invalid
        title:
          description: Holds a human readable label of the error that is constant per code
          type: string
          default: Invalid Field
        detail:
          description: >-
            Holds a human readable description of this specific error. The error
            detail SHOULD be the parameter name of the invalid field. The error
            detail MAY include further details explaining the valid format.
          type: string
          example: Invalid format supplied for fieldName
        meta:
          description: Holds additional endpoint specific data relevant to the error
          properties:
            urn:
              description: Holds a standard CDR error code
              type: string
              format: uri
              x-cds-type: URIString
              default: urn:au-cds:error:cds-all:Field/Invalid
          type: object
      required:
        - code
        - title
        - detail
    ErrorGeneralUnexpectedV1:
      type: object
      properties:
        code:
          description: >-
            Holds an endpoint specific error code. This MAY be a standard CDR
            error code or an application-specific error code.
          type: string
          default: urn:au-cds:error:cds-all:GeneralError/Unexpected
        title:
          description: Holds a human readable label of the error that is constant per code
          type: string
          default: Unexpected Error Encountered
        detail:
          description: >-
            Holds a human readable description of this specific error. The error
            detail SHOULD be populated with a meaningful error description,
            without revealing sensitive information.
          type: string
          example: General Unexpected error occurred
        meta:
          description: Holds additional endpoint specific data relevant to the error
          properties:
            urn:
              description: Holds a standard CDR error code
              type: string
              format: uri
              x-cds-type: URIString
              default: urn:au-cds:error:cds-all:GeneralError/Unexpected
          type: object
      required:
        - code
        - title
        - detail
    ResponseGeneric400Item:
      oneOf:
        - $ref: '#/components/schemas/ErrorFieldInvalidV1'
        - $ref: '#/components/schemas/ErrorGeneralUnexpectedV1'
      discriminator:
        propertyName: code
    EnumGrantStatus:
      type: string
      description: >+

        Grant Status


        | Value | Description

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

        INITIALISE | Grant is in Initialisation status. This status should be
        ignored from dashboard visibility and is used by the system to setup
        grant state prior to a consent being established

        ACTIVE | Grant is Active and therefore authorisation is active enabling
        tokens to be issued

        REVOKED | Grant has been Revoked and, if appropriate, a revocation
        request has been issued to the counterparty

        EXPIRED | Grant has reached Expiration and therefore is no longer usable

      example: ACTIVE
      enum:
        - INITIALISE
        - ACTIVE
        - REVOKED
        - EXPIRED
    GrantV1:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: f924e6a6-248b-4034-9885-25f8805964cd
          description: Deprecated in favour of grantId
          deprecated: true
        grantId:
          type: string
          format: uuid
          example: f924e6a6-248b-4034-9885-25f8805964cd
        grantType:
          $ref: '#/components/schemas/EnumGrantTypeV1'
      discriminator:
        propertyName: grantType
        mapping:
          CDR_SHARING_ARRANGEMENT_V1: '#/components/schemas/GrantSharingArrangementV1'
      required:
        - id
        - grantId
        - grantType
      example:
        grantId: f924e6a6-248b-4034-9885-25f8805964cd
        grantType: CDR_SHARING_ARRANGEMENT_V1
        softwareProduct:
          softwareProductId: 01cd0bb0-0eb5-4e73-8c0d-dcbe7df27dc3
          productId: d1b29ec9-ba9e-4ad7-aac3-7a4afa03fc7d
          name: Test Software Product
          description: This is an example of a software product's description
          logoUri: https://biza.io/logo.png
          status: ACTIVE
          brandName: Test Recipient Brand
          brandStatus: ACTIVE
          accreditationNumber: TESTACCNO000123
        status: ACTIVE
        created: '2021-01-01T12:30:00Z'
        expiry: '2021-01-02T12:30:00Z'
        principalId: e4ddb46f-ff94-42a4-bba3-0a36be4de5ee
        userId: e56ffbdv-dd98-78d4-mn72-8v056786eed7
        accounts:
          accountID: ee00456f-90ao-5609-nm67-6hjn900234yu
          accountType: single
        scopes:
          name: common:customer.basic:readd
          description: Saved payees
          permissionLanguage: >-
            Names and details of accounts you have saved (eg. their BSB and
            Account Number, BPay CRN and Biller code, or NPP PayID)
        cx_scopes:
          name: common:customer.basic:read
          description: Saved payees
          permissionLanguage: >-
            Names and details of accounts you have saved (eg. their BSB and
            Account Number, BPay CRN and Biller code, or NPP PayID)
          includedScopes:
            name: common:customer.basic:read
            description: Saved payees
            permissionLanguage: >-
              Names and details of accounts you have saved (eg. their BSB and
              Account Number, BPay CRN and Biller code, or NPP PayID)
        private: false
    EnumDashboardSoftwareProductStatusTypeV1:
      type: string
      example: ACTIVE
      description: CDR Holder Status
      enum:
        - ACTIVE
        - INACTIVE
        - REMOVED
    EnumRegisterDataRecipientBrandStatusV1:
      type: string
      description: Data Recipient Brand Status in the CDR Register
      enum:
        - ACTIVE
        - INACTIVE
        - REMOVED
      example: ACTIVE
      x-cds-type: Enum
    WikkitSoftwareProductV1:
      type: object
      properties:
        id:
          type: string
          example: 01cd0bb0-0eb5-4e73-8c0d-dcbe7df27dc3
          deprecated: true
          description: Deprecated in favour of `softwareProductId`
        softwareProductId:
          type: string
          example: 01cd0bb0-0eb5-4e73-8c0d-dcbe7df27dc3
          description: Internal Software Product Identifier
        productId:
          type: string
          example: d1b29ec9-ba9e-4ad7-aac3-7a4afa03fc7d
          description: Software Product ID according to the CDR Register
        name:
          type: string
          example: Test Software Product
        description:
          type: string
          example: This is an example of a software product's description
        logoUri:
          type: string
          format: uri
          example: https://biza.io/logo.png
        status:
          $ref: '#/components/schemas/EnumDashboardSoftwareProductStatusTypeV1'
        brandName:
          type: string
          example: Test Recipient Brand
        brandStatus:
          $ref: '#/components/schemas/EnumRegisterDataRecipientBrandStatusV1'
        accreditationNumber:
          type: string
          example: TESTACCNO000123
      description: This is the software product that arranged the consent
      required:
        - id
        - softwareProductId
        - productId
        - name
        - status
        - brandName
        - brandStatus
        - accreditationNumber
    EnumDashboardRealmAccountTypeV1:
      type: string
      description: Realm Account Type
      example: SINGLE
      enum:
        - SINGLE
        - JOINT
        - BUSINESS
    WikkitAccountV1:
      type: object
      properties:
        id:
          type: string
          example: a9a8469b-3364-4bbf-aae2-d0c76f2dea02
          deprecated: true
          description: This has been deprecated as it is of no value.
        accountId:
          type: string
          example: 000d7490-a2b7-4f9c-82a3-648fe879905b
          description: >-
            Refers to the Account identifier (`id`) produced by the Data Adapter
            List Accounts
        principalId:
          type: string
          example: 000d7490-a2b7-4f9c-82a3-648fe879905b
          deprecated: true
          description: >-
            Refers to the Account Identifier. This has been **Deprecated** in
            favour of `accountId`
        accountType:
          $ref: '#/components/schemas/EnumDashboardRealmAccountTypeV1'
      required:
        - accountType
        - id
        - accountId
        - principalId
    EnumCDRScopesV1:
      type: string
      example: common:customer.basic:read
      description: >+
        This should be read in conjunction with the [Data Standards
        section](https://consumerdatastandardsaustralia.github.io/standards/#profile-scope)
        on this topic. 


        **Note:** We provide a `x-enum-varnames` vendor extension (OpenAPI
        Generator supported) to provide a safe enumeration name without colons.


        | Name | Description

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

        openid | OpenID Connect

        profile | OpenID Profile

        common:customer.basic:read | Basic Customer Data

        common:customer.detail:read | Detailed Customer Data

        bank:accounts.basic:read | Basic Banking Account Information

        bank:accounts.detail:read | Detailed Banking Account Information

        bank:transactions:read | Banking Transaction Data

        bank:regular_payments:read | Scheduled Payments & Direct Debits

        bank:payees:read | Banking Payee Data

        energy:accounts.basic:read | Basic Energy Account Information

        energy:accounts.detail:read | Detailed Energy Account Information

        energy:accounts.concessions:read | Energy Account Concessions

        energy:accounts.paymentschedule:read | Energy Account Payment Schedules

        energy:billing:read | Energy Billing Data

        energy:electricity.servicepoints.basic:read | Electricity Connection
        Data

        energy:electricity.servicepoints.detail:read | Electricity Connection &
        Metering Data

        energy:electricity.der:read | Energy Generation and Storage

        energy:electricity.usage:read | Electricity usage


      enum:
        - openid
        - profile
        - common:customer.basic:read
        - common:customer.detail:read
        - bank:accounts.basic:read
        - bank:accounts.detail:read
        - bank:transactions:read
        - bank:regular_payments:read
        - bank:payees:read
        - energy:accounts.basic:read
        - energy:accounts.detail:read
        - energy:accounts.concessions:read
        - energy:accounts.paymentschedule:read
        - energy:billing:read
        - energy:electricity.servicepoints.basic:read
        - energy:electricity.servicepoints.detail:read
        - energy:electricity.der:read
        - energy:electricity.usage:read
      x-enum-varnames:
        - OPENID
        - PROFILE
        - COMMON_CUSTOMER_BASIC_READ
        - COMMON_CUSTOMER_DETAIL_READ
        - BANK_ACCOUNTS_BASIC_READ
        - BANK_ACCOUNTS_DETAIL_READ
        - BANK_TRANSACTIONS_READ
        - BANK_REGULAR_PAYMENTS_READ
        - BANK_PAYEES_READ
        - ENERGY_ACCOUNTS_BASIC_READ
        - ENERGY_ACCOUNTS_DETAIL_READ
        - ENERGY_ACCOUNTS_CONCESSIONS_READ
        - ENERGY_ACCOUNTS_PAYMENTSCHEDULE_READ
        - ENERGY_BILLING_READ
        - ENERGY_ELECTRICITY_SERVICEPOINTS_BASIC_READ
        - ENERGY_ELECTRICITY_SERVICEPOINTS_DETAIL_READ
        - ENERGY_ELECTRICITY_DER_READ
        - ENERGY_ELECTRICITY_USAGE_READ
    CDRScopeDetailV1:
      type: object
      properties:
        id:
          type: string
          example: c2b35192-ecff-4239-b07a-fa1563b2b150
          deprecated: true
          description: Deprecated without replacement as `name` should be used.
        name:
          $ref: '#/components/schemas/EnumCDRScopesV1'
        description:
          type: string
          example: Saved payees
        permissionLanguage:
          type: array
          items:
            type: string
            example: >-
              Names and details of accounts you have saved (eg. their BSB and
              Account Number, BPay CRN and Biller code, or NPP PayID)
      required:
        - id
        - name
        - description
        - permissionLanguage
    CDRScopeCXDetailV1:
      type: object
      properties:
        id:
          type: string
          example: bank:payees:read
          deprecated: true
          description: Deprecated without replacement as `name` should be used.
        name:
          $ref: '#/components/schemas/EnumCDRScopesV1'
        description:
          type: string
          example: Saved payees
        permissionLanguage:
          type: array
          items:
            type: string
            example: >-
              Names and details of accounts you have saved (eg. their BSB and
              Account Number, BPay CRN and Biller code, or NPP PayID)
        includedScopes:
          type: array
          items:
            $ref: '#/components/schemas/CDRScopeDetailV1'
      description: >-
        These are the scopes that should be displayed to the end user that have
        been collapsed to support the CDR CX Permission Language Guidelines
      required:
        - id
        - description
        - includedScopes
        - name
        - permissionLanguage
    GrantSharingArrangementV1:
      type: object
      allOf:
        - $ref: '#/components/schemas/GrantV1'
        - type: object
          properties:
            softwareProduct:
              $ref: '#/components/schemas/WikkitSoftwareProductV1'
            status:
              $ref: '#/components/schemas/EnumGrantStatus'
            created:
              type: string
              format: date-time
              example: '2021-01-01T12:30:00Z'
            expiry:
              type: string
              format: date-time
              example: '2021-01-02T12:30:00Z'
            principalId:
              type: string
              example: e4ddb46f-ff94-42a4-bba3-0a36be4de5ee
              description: The principal ID that this grant allows access to
            userId:
              type: string
              example: 2753c9cc-316f-42c1-97c8-4ae38d119fe2
              description: The user ID that created the grant
            latestTokenTime:
              type: string
              format: date-time
              example: '2021-01-01T15:30:00Z'
            accounts:
              type: array
              items:
                $ref: '#/components/schemas/WikkitAccountV1'
            scopes:
              type: array
              description: This is the exact scopes that were requested by the ADR.
              items:
                $ref: '#/components/schemas/CDRScopeDetailV1'
            cx_scopes:
              type: array
              description: >-
                These are the scopes that should be displayed to the end user
                that have been collapsed to support the CDR CX Permission
                Language Guidelines
              items:
                $ref: '#/components/schemas/CDRScopeCXDetailV1'
            private:
              type: boolean
              description: >-
                This identifies whether or not an arrangement was created by a
                vulnerable user and  therefore should have altered CX.
              example: false
          required:
            - softwareProduct
            - status
            - created
            - expiry
            - accounts
            - scopes
            - cx_scopes
            - private
            - principalId
            - userId
    EnumGrantTypeV1:
      type: string
      example: CDR_SHARING_ARRANGEMENT_V1
      default: CDR_SHARING_ARRANGEMENT_V1
      description: |+

        Grant Types

        | Value | Description
        |-------|-------------|
        CDR_SHARING_ARRANGEMENT_V1 | A CDR Sharing Arrangement


      enum:
        - CDR_SHARING_ARRANGEMENT_V1
      x-enum-varnames:
        - CDR_SHARING_ARRANGEMENT_V1
    FilterField:
      type: object
      example: {}
    MetaV1:
      type: object
      properties:
        page:
          type: integer
          format: int32
          example: 1
        pageSize:
          type: integer
          format: int32
          example: 25
        totalPages:
          type: integer
          format: int32
          example: 2
        totalRecords:
          type: integer
          format: int64
          example: 40
        filters:
          type: array
          items:
            $ref: '#/components/schemas/FilterField'
      required:
        - page
        - pageSize
        - totalPages
        - totalRecords
    ResponseGrantListV1:
      properties:
        data:
          type: array
          description: Grants
          items:
            $ref: '#/components/schemas/GrantV1'
        meta:
          $ref: '#/components/schemas/MetaV1'
      type: object
      required:
        - data
        - meta
    ErrorResourceNotFoundV1:
      type: object
      properties:
        code:
          description: >-
            Holds an endpoint specific error code. This MAY be a standard CDR
            error code or an application-specific error code.
          type: string
          default: urn:au-cds:error:cds-all:Resource/NotFound
        title:
          description: Holds a human readable label of the error that is constant per code
          type: string
          default: Resource Not Found
        detail:
          description: >-
            The requested resource URL is not an API endpoint defined by the
            Consumer Data Standards and it is not a URL recognised by the Data
            Holder or Data Recipient.
          type: string
          example: >-
            The requested resource URL is not an API endpoint defined by the
            Consumer Data Standards
        meta:
          description: Holds additional endpoint specific data relevant to the error
          properties:
            urn:
              description: Holds a standard CDR error code
              type: string
              format: uri
              x-cds-type: URIString
              default: urn:au-cds:error:cds-all:Resource/NotFound
          type: object
      required:
        - code
        - title
        - detail
    ResponseGeneric404Item:
      oneOf:
        - $ref: '#/components/schemas/ErrorResourceNotFoundV1'
      discriminator:
        propertyName: code
    EnumDashboardAuthorityToOperateV1:
      description: The type of Authority To Operate on this principal.
      type: string
      enum:
        - POWER_OF_ATTORNEY
      example: POWER_OF_ATTORNEY
    DashboardAuthorityToOperateV1:
      type: object
      properties:
        principalId:
          type: string
          example: ad383b27-22d5-4da8-beb8-2fcf65029f0d
          description: >-
            The Principal ID of the user that the authority to operate
            instruction is on.
        userId:
          type: string
          example: 4e9cfa0b-5790-41de-8fbe-7e4caec817af
          description: >-
            The User ID of the user that the authority to operate instruction is
            on.
        type:
          $ref: '#/components/schemas/EnumDashboardAuthorityToOperateV1'
      required:
        - principalId
        - userId
        - type
    DashboardUserV1:
      type: object
      properties:
        vulnerable:
          description: >-
            Used to flag if the customer is deemed vulnerable by the data
            holder. Has implications for the consent dashboard and joint account
            notifications with altered CX behaviour.
          type: boolean
          example: false
        authorityToOperate:
          description: A list of users that this user has the authority to operate on.
          type: array
          items:
            $ref: '#/components/schemas/DashboardAuthorityToOperateV1'
      required:
        - vulnerable
        - authorityToOperate
    ResponseDashboardUserByIdV1:
      properties:
        data:
          $ref: '#/components/schemas/DashboardUserV1'
      type: object
      required:
        - data
    EnumDashboardAccountCustomerRelationshipTypeV1:
      description: The relationship of this customer to this account.
      type: string
      enum:
        - OWNER
        - SECONDARY_USER
        - SECONDARY_USER_PRIVATE
        - NOMINATED_REPRESENTATIVE
      example: OWNER
    DashboardAccountCustomerV1:
      properties:
        principalId:
          description: >-
            Principal Identifier.

            **Deprecated:** This should always be equal to the `principalId` in
            the List Accounts path, therefore making this field redundant.
          deprecated: true
          type: string
          example: 8d3bc307-a75a-4899-820b-dcca3cca4fd9
        userId:
          description: >-
            User Identifier.

            **Note:** This **SHOULD** be supplied, even if it is the same value
            as `principalId`. This field will be made mandatory at a later date
            however, if omitted, `userId` is currently assumed to be the same as
            `principalId`.
          type: string
          example: 8d3bc307-a75a-4899-820b-dcca3cca4fd9
        relationshipType:
          $ref: '#/components/schemas/EnumDashboardAccountCustomerRelationshipTypeV1'
        vulnerable:
          description: >-
            Used to flag if the customer is deemed vulnerable by the data
            holder. Has implications for the consent dashboard and joint account
            notifications and therefore has altered CX.
          type: boolean
          example: false
      type: object
      required:
        - principalId
        - relationshipType
        - vulnerable
    DashboardNotificationFrequencyV1:
      type: object
      properties:
        event:
          description: Notifications will be sent as they happen.
          type: boolean
          example: true
        weekly:
          description: Notifications will be collated and sent on a weekly basis.
          type: boolean
          example: false
        monthly:
          description: Notifications will be collated and sent on a monthly basis.
          type: boolean
          example: true
      required:
        - event
        - weekly
        - monthly
    DashboardNotificationPreferencesV1:
      description: >-
        Describes the notification preferences currently specified for the
        target entity.
      properties:
        dataSharingStarted:
          $ref: '#/components/schemas/DashboardNotificationFrequencyV1'
        dataSharingStopped:
          $ref: '#/components/schemas/DashboardNotificationFrequencyV1'
        dataSharingNotApproved:
          type: boolean
          example: true
        secondaryUsers:
          $ref: '#/components/schemas/DashboardNotificationFrequencyV1'
      type: object
      required:
        - dataSharingStarted
        - dataSharingStopped
        - dataSharingNotApproved
        - secondaryUsers
    EnumAccountSharingStatusV1:
      type: string
      example: PRE_APPROVAL
      description: >+

        Account Sharing Statuses


        | Value | Description

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

        PRE_APPROVAL | The account currently allows any party to establish a
        sharing arrangement

        NON_DISCLOSURE | No party is allowed to establish a sharing arrangement


      enum:
        - PRE_APPROVAL
        - NON_DISCLOSURE
    EnumDOMSRequestStatusV1:
      type: string
      example: PENDING
      description: |+

        DOMS Request Statuses

        | Value | Description
        |-------|-------------|
        APPROVED | The DOMS Request has been approved by all parties
        DENIED | The DOMS Request was denied by one or more parties
        PENDING | The DOMS Request is pending approval by all parties
        EXPIRED | The DOMS Request expired prior to all parties approving it

      enum:
        - APPROVED
        - DENIED
        - PENDING
        - EXPIRED
    DashboardDOMSRequestSummaryV1:
      type: object
      properties:
        requestId:
          type: string
          format: uuid
          example: d1e9dafa-dadd-43a4-a44c-1ba425c65aad
        expiry:
          type: string
          format: date-time
          example: '2022-01-01T12:30:00Z'
          description: The expiry time of the sharing request.
        targetSharingStatus:
          $ref: '#/components/schemas/EnumAccountSharingStatusV1'
        status:
          $ref: '#/components/schemas/EnumDOMSRequestStatusV1'
      required:
        - requestId
        - targetSharingStatus
        - expiry
        - status
    DashboardAccountJAV1:
      type: object
      description: >-
        Additional Joint Account information for when accountType is set to
        JOINT
      properties:
        sharingStatus:
          $ref: '#/components/schemas/EnumAccountSharingStatusV1'
        sharingStatusLastUpdated:
          type: string
          format: date-time
          example: '2022-01-01T12:30:00Z'
          description: >-
            Represents the last time the Sharing Status was changed or null if
            it has never been changed
        latestDomsRequest:
          $ref: '#/components/schemas/DashboardDOMSRequestSummaryV1'
      required:
        - sharingStatus
    DashboardAccountV1:
      type: object
      properties:
        id:
          type: string
          example: a9a8469b-3364-4bbf-aae2-d0c76f2dea02
          deprecated: true
          description: >-
            Refers to the Account Identifier. This has been **Deprecated** in
            favour of `accountId`
        accountId:
          type: string
          example: 000d7490-a2b7-4f9c-82a3-648fe879905b
          description: >-
            Refers to the Account identifier (`id`) produced by the Data Adapter
            List Accounts
        principalId:
          type: string
          example: 000d7490-a2b7-4f9c-82a3-648fe879905b
          deprecated: true
          description: >-
            Refers to the Account Identifier. This has been **Deprecated** in
            favour of `accountId`
        accountType:
          $ref: '#/components/schemas/EnumDashboardRealmAccountTypeV1'
        maskedAccountNumber:
          type: string
          example: XXXX 1234
          description: The Masked Account number for the account as per the Data Adapter.
        accountName:
          type: string
          example: Everyday Transaction Account
          description: The Account Name for the account as per Data Adapter.
        accountCustomers:
          description: >-
            This a subset of the Account Customers described from the Data
            Adapter.
          type: array
          items:
            $ref: '#/components/schemas/DashboardAccountCustomerV1'
        notificationPreferences:
          $ref: '#/components/schemas/DashboardNotificationPreferencesV1'
        jointAccount:
          $ref: '#/components/schemas/DashboardAccountJAV1'
      required:
        - id
        - accountId
        - principalId
        - accountType
        - maskedAccountNumber
        - accountName
        - accountCustomers
        - notificationPreferences
    DashboardDOMSResponseV1:
      type: object
      properties:
        respondedAt:
          type: string
          format: date-time
          description: The time of the DOMS response
          example: '2022-06-01T10:30:00Z'
        response:
          $ref: '#/components/schemas/EnumDOMSRequestStatusV1'
        userId:
          type: string
          description: The user that created this response
          example: 51af03f3-5583-4ba5-bd31-12064082eb25
      required:
        - response
        - userId
    DashboardDOMSRequestV1:
      type: object
      properties:
        requestId:
          type: string
          format: uuid
          example: d1e9dafa-dadd-43a4-a44c-1ba425c65aad
        accounts:
          type: array
          description: Accounts
          items:
            $ref: '#/components/schemas/DashboardAccountV1'
          maxItems: 1
        createdBy:
          type: string
          description: The User ID that initiated this request
          example: 51af03f3-5583-4ba5-bd31-12064082eb25
        created:
          type: string
          format: date-time
          description: The creation time of the DOMS request
          example: '2021-01-01T12:30:00Z'
        expiry:
          type: string
          format: date-time
          description: The expiry time of the sharing request
          example: '2021-01-01T12:30:00Z'
        targetSharingStatus:
          $ref: '#/components/schemas/EnumAccountSharingStatusV1'
        status:
          $ref: '#/components/schemas/EnumDOMSRequestStatusV1'
        responses:
          type: array
          description: Responses by joint account holders
          items:
            $ref: '#/components/schemas/DashboardDOMSResponseV1'
      required:
        - requestId
        - accounts
        - created
        - createdBy
        - expiry
        - targetSharingStatus
        - status
        - responses
    ResponseDashboardDOMSRequestListV1:
      properties:
        data:
          type: array
          description: DOMS Requests
          items:
            $ref: '#/components/schemas/DashboardDOMSRequestV1'
        meta:
          $ref: '#/components/schemas/MetaV1'
      type: object
      required:
        - data
        - meta
    ResponseDashboardGetDOMSRequestV1:
      properties:
        data:
          $ref: '#/components/schemas/DashboardDOMSRequestV1'
      type: object
      required:
        - data
    EnumDOMSRequestProposalV1:
      type: string
      example: PRE_APPROVAL
      description: >+

        Account Sharing Statuses


        | Value | Description

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

        PRE_APPROVAL | The account currently allows any party to establish a
        sharing arrangement

        NON_DISCLOSURE | No party is allowed to establish a sharing arrangement


      enum:
        - PRE_APPROVAL
        - NON_DISCLOSURE
    UserIdV1:
      type: string
      example: 77bdf4ac-f107-4524-aa11-b15086ac1f35
      description: >-
        ID of the specific user requested.

        **Note:** This **SHOULD** be supplied, even if it is the same value as
        `principalId`. This field will be made mandatory at a later date
        however, if omitted, `userId` is currently assumed to be the same as
        `principalId`.
    CreateDOMSRequestV1:
      type: object
      properties:
        action:
          $ref: '#/components/schemas/EnumDOMSRequestProposalV1'
        userId:
          $ref: '#/components/schemas/UserIdV1'
      required:
        - action
    RequestCreateDOMSRequestV1:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/CreateDOMSRequestV1'
      required:
        - data
    EnumDOMSDecisionV1:
      type: string
      example: APPROVED
      enum:
        - APPROVED
        - DENIED
    UpdateDOMSRequestV1:
      type: object
      properties:
        action:
          $ref: '#/components/schemas/EnumDOMSDecisionV1'
        userId:
          $ref: '#/components/schemas/UserIdV1'
      required:
        - action
    RequestHandleDOMSRequestV1:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/UpdateDOMSRequestV1'
      required:
        - data
    ResponseDashboardAccountListV1:
      properties:
        data:
          type: array
          description: Accounts
          items:
            $ref: '#/components/schemas/DashboardAccountV1'
        meta:
          $ref: '#/components/schemas/MetaV1'
      type: object
      required:
        - data
        - meta
    ResponseDashboardGetAccountV1:
      properties:
        data:
          $ref: '#/components/schemas/DashboardAccountV1'
      required:
        - data
      type: object
    ResponseDashboardNotificationPreferenceV1:
      description: Success
      properties:
        data:
          $ref: '#/components/schemas/DashboardNotificationPreferencesV1'
      type: object
      required:
        - data
    UpdateNotificationPreferencesV1:
      description: >-
        Describes the notification preferences currently specified for the
        target entity.
      properties:
        dataSharingStarted:
          $ref: '#/components/schemas/DashboardNotificationFrequencyV1'
        dataSharingStopped:
          $ref: '#/components/schemas/DashboardNotificationFrequencyV1'
        dataSharingNotApproved:
          type: boolean
          example: true
        secondaryUsers:
          $ref: '#/components/schemas/DashboardNotificationFrequencyV1'
        userId:
          $ref: '#/components/schemas/UserIdV1'
      type: object
      required:
        - dataSharingStarted
        - dataSharingStopped
        - dataSharingNotApproved
        - secondaryUsers
    RequestUpdateNotificationPreferencesV1:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/UpdateNotificationPreferencesV1'
      required:
        - data
    EnumSecondaryUserSharingStatusV1:
      type: string
      example: DISABLED
      enum:
        - ENABLED
        - DISABLED
    DashboardSecondaryUserV1:
      type: object
      properties:
        secondaryUserUserId:
          type: string
          example: f23417ff-8de4-4bf7-9f9d-ce0e6ec67cb3
          description: The User ID of the Secondary User
        private:
          type: boolean
          default: false
          example: false
        secondaryUserSharingStatus:
          $ref: '#/components/schemas/EnumSecondaryUserSharingStatusV1'
      required:
        - private
        - secondaryUserSharingStatus
        - secondaryUserUserId
    ResponseDashboardSecondaryUserListV1:
      properties:
        data:
          type: array
          description: Secondary Users
          items:
            $ref: '#/components/schemas/DashboardSecondaryUserV1'
        meta:
          $ref: '#/components/schemas/MetaV1'
      type: object
      required:
        - data
        - meta
    UpdateSecondaryUserV1:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/EnumSecondaryUserSharingStatusV1'
        userId:
          $ref: '#/components/schemas/UserIdV1'
      required:
        - status
    RequestUpdateSecondaryUserV1:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/UpdateSecondaryUserV1'
      required:
        - data
    EnumGrantEventTypeV1:
      type: string
      description: >

        Grant Event Types


        | Value                                         |
        Description                                                            
        |

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

        | GRANT_ACCESS_TOKEN_ISSUANCE_EVENT             | Grant Access Token
        issued                                               |

        | GRANT_AMENDMENT_EVENT                         | Grant
        amended                                                           |

        | GRANT_CODE_CLAIMED_EVENT                      | Grant Code
        claimed                                                      |

        | GRANT_CREATION_EVENT                          | Grant
        created                                                           |

        | GRANT_HELD_VIA_REGISTER_UPDATE_EVENT          | Grant held due to
        Software Product being made inactive by register      |

        | GRANT_ID_TOKEN_ISSUANCE_EVENT                 | Grant ID Token
        issued                                                   |

        | GRANT_REACTIVATED_VIA_REGISTER_UPDATE_EVENT   | Grant reactivated due
        to Software Product being made active by register |

        | GRANT_REFRESH_TOKEN_ISSUANCE_EVENT            | Grant Refresh Token
        issued                                              |

        | GRANT_REVOKED_BY_ADMIN_EVENT                  | Grant revoked by
        Admin                                                  |

        | GRANT_REVOKED_BY_DASHBOARD_EVENT              | Grant revoked by
        Dashboard                                              |

        | GRANT_REVOKED_BY_RECIPIENT_EVENT              | Grant revoked by
        Recipient                                              |

        | GRANT_REVOKED_VIA_CLOSED_PRINCIPAL_POLL_EVENT | Grant revoked due to
        Principal being closed                             |

        | GRANT_REVOKED_VIA_REGISTER_UPDATE_EVENT       | Grant revoked due to
        Software Product being revoked by register         |

        | GRANT_REVOKED_VIA_USER_INELIGIBLE_EVENT       | Grant revoked due to
        the user becoming ineligible                       |
      example: GRANT_AMENDMENT_EVENT
      enum:
        - GRANT_ACCESS_TOKEN_ISSUANCE_EVENT
        - GRANT_AMENDMENT_EVENT
        - GRANT_CODE_CLAIMED_EVENT
        - GRANT_CREATION_EVENT
        - GRANT_HELD_VIA_REGISTER_UPDATE_EVENT
        - GRANT_ID_TOKEN_ISSUANCE_EVENT
        - GRANT_REACTIVATED_VIA_REGISTER_UPDATE_EVENT
        - GRANT_REFRESH_TOKEN_ISSUANCE_EVENT
        - GRANT_REVOKED_BY_ADMIN_EVENT
        - GRANT_REVOKED_BY_DASHBOARD_EVENT
        - GRANT_REVOKED_BY_RECIPIENT_EVENT
        - GRANT_REVOKED_VIA_CLOSED_PRINCIPAL_POLL_EVENT
        - GRANT_REVOKED_VIA_REGISTER_UPDATE_EVENT
        - GRANT_REVOKED_VIA_USER_INELIGIBLE_EVENT
      x-enum-varnames:
        - GRANT_ACCESS_TOKEN_ISSUANCE_EVENT
        - GRANT_AMENDMENT_EVENT
        - GRANT_CODE_CLAIMED_EVENT
        - GRANT_CREATION_EVENT
        - GRANT_HELD_VIA_REGISTER_UPDATE_EVENT
        - GRANT_ID_TOKEN_ISSUANCE_EVENT
        - GRANT_REACTIVATED_VIA_REGISTER_UPDATE_EVENT
        - GRANT_REFRESH_TOKEN_ISSUANCE_EVENT
        - GRANT_REVOKED_BY_ADMIN_EVENT
        - GRANT_REVOKED_BY_DASHBOARD_EVENT
        - GRANT_REVOKED_BY_RECIPIENT_EVENT
        - GRANT_REVOKED_VIA_CLOSED_PRINCIPAL_POLL_EVENT
        - GRANT_REVOKED_VIA_REGISTER_UPDATE_EVENT
        - GRANT_REVOKED_VIA_USER_INELIGIBLE_EVENT
    WikkitGrantLogBaseV1:
      type: object
      properties:
        grantLogId:
          type: string
          example: 9824d737-5787-4ab1-97bd-0a81fa2f20c2
          description: A unique identifier of the individual log message
        created:
          type: string
          format: date-time
          example: '2021-01-01T12:30:00Z'
          description: When did the log message occur
        grantEventUType:
          $ref: '#/components/schemas/EnumGrantEventTypeV1'
        content:
          type: string
          description: A text based description of the event that occurred
          example: >-
            Short term access credentials issued till
            2022-01-20T17:19:50.586326+10:00 with the following scopes: Direct
            debits and scheduled payments,Account numbers and features,Account
            name, type and balance,Transaction details,Contact details,OpenID
            Profiles,Saved payees,Name and occupation,OpenID Connect
      required:
        - grantLogId
        - created
        - grantEventUType
        - content
    WikkitGrantLogAccessTokenIssuanceV1:
      allOf:
        - $ref: '#/components/schemas/WikkitGrantLogBaseV1'
    CDRScopeDetailV2:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/EnumCDRScopesV1'
        description:
          type: string
          example: Saved payees
        permissionLanguage:
          type: array
          items:
            type: string
            example: >-
              Names and details of accounts you have saved (eg. their BSB and
              Account Number, BPay CRN and Biller code, or NPP PayID)
      required:
        - name
        - description
        - permissionLanguage
    CDRScopeCXDetailV2:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/EnumCDRScopesV1'
        description:
          type: string
          example: Saved payees
        permissionLanguage:
          type: array
          items:
            type: string
            example: >-
              Names and details of accounts you have saved (eg. their BSB and
              Account Number, BPay CRN and Biller code, or NPP PayID)
        includedScopes:
          type: array
          items:
            $ref: '#/components/schemas/CDRScopeDetailV2'
      description: >-
        These are the scopes that should be displayed to the end user that have
        been collapsed to support the CDR CX Permission Language Guidelines
      required:
        - description
        - includedScopes
        - name
        - permissionLanguage
    GrantLogGrantAmendmentV1:
      type: object
      description: Amendment to the grant
      properties:
        userId:
          type: string
          description: The User Identifier who made the amendment
          example: 5529e377-b8aa-42c3-8f65-b30aae26e555
        previousConsentId:
          type: string
          description: The ID of the previous consent of the grant
          example: ea1deb55-7900-4695-969a-7d8ff87b47c4
        newConsentId:
          type: string
          description: The ID of the new consent of the grant
          example: 49f42d4c-dcba-44f7-8924-a2e9063ef439
        scopesAdded:
          type: array
          description: >-
            CDR scopes added to the grant. These are the exact scopes that were
            requested by the ADR
          items:
            $ref: '#/components/schemas/CDRScopeDetailV2'
        cxScopesAdded:
          type: array
          description: >-
            CDR CX scopes added to the grant. These are the scopes that should
            be displayed to the end user that have been collapsed to support the
            CDR CX Permission Language Guidelines
          items:
            $ref: '#/components/schemas/CDRScopeCXDetailV2'
        scopesRemoved:
          type: array
          description: >-
            CDR scopes removed from the grant. These are the exact scopes that
            were requested by the ADR
          items:
            $ref: '#/components/schemas/CDRScopeDetailV2'
        cxScopesRemoved:
          type: array
          description: >-
            CDR CX scopes removed from the grant. These are the scopes that
            should be displayed to the end user that have been collapsed to
            support the CDR CX Permission Language Guidelines
          items:
            $ref: '#/components/schemas/CDRScopeCXDetailV2'
        accountsAdded:
          uniqueItems: true
          type: array
          description: >-
            Accounts added to the grant. This array does not include accounts
            that are invisible to the current user. If there are invisible
            accounts added to the grant, `hasInvisibleChange` will be set to
            `true`
          items:
            type: string
            example: 9ecddf78-43f8-408c-aa36-d0f2054ffd98
        accountsRemoved:
          uniqueItems: true
          type: array
          description: >-
            Accounts removed from the grant. This array does not include
            accounts that are invisible to the current user. If there are
            invisible accounts removed from the grant, `hasInvisibleChange` will
            be set to `true`
          items:
            type: string
            example: 9ecddf78-43f8-408c-aa36-d0f2054ffd98
        previousExpiry:
          type: string
          format: date-time
          example: '2021-01-01T12:30:00Z'
          description: The previous expiry time of the grant
        newExpiry:
          type: string
          format: date-time
          example: '2021-01-01T12:30:00Z'
          description: The new expiry time of the grant
        hasInvisibleChange:
          description: >-
            Whether the amendment contains change that is invisible to the
            current user. For example, Mark Hughes is a secondary user of Harry
            Smith's account, and if Mark Hughes creates an arrangement that
            shares data of Harry Smith's account, Harry Smith is able to see
            that arrangement and its historical amendments in Dashboard.
            However, if Mark Hughes adds his own account, which is not
            accessible to Harry Smith, to the arrangement, Harry Smith is not
            able to see Mark Hughes' account in the amendment. In this case, the
            amendment data has `hasInvisibleChange: true`
          type: boolean
          example: false
      required:
        - userId
        - previousConsentId
        - newConsentId
        - hasInvisibleChange
    WikkitGrantLogAmendmentV1:
      allOf:
        - $ref: '#/components/schemas/WikkitGrantLogBaseV1'
        - type: object
          properties:
            grantAmendmentEvent:
              $ref: '#/components/schemas/GrantLogGrantAmendmentV1'
          required:
            - grantAmendmentEvent
    WikkitGrantLogCodeClaimedV1:
      allOf:
        - $ref: '#/components/schemas/WikkitGrantLogBaseV1'
    GrantLogGrantCreationV1:
      type: object
      description: Creation of the grant
      properties:
        userId:
          type: string
          description: The User Identifier who made the amendment
          example: 5529e377-b8aa-42c3-8f65-b30aae26e555
        consentId:
          type: string
          description: The ID of the initial consent of the grant
          example: 49f42d4c-dcba-44f7-8924-a2e9063ef439
        scopes:
          type: array
          description: >-
            CDR scopes of the grant. These are the exact scopes that were
            requested by the ADR
          items:
            $ref: '#/components/schemas/CDRScopeDetailV2'
        cxScopes:
          type: array
          description: >-
            CDR CX scopes of the grant. These are the scopes that should be
            displayed to the end user that have been collapsed to support the
            CDR CX Permission Language Guidelines
          items:
            $ref: '#/components/schemas/CDRScopeCXDetailV2'
        accounts:
          uniqueItems: true
          type: array
          description: Accounts shared in the grant
          items:
            type: string
            example: 9ecddf78-43f8-408c-aa36-d0f2054ffd98
        expiry:
          type: string
          format: date-time
          example: '2021-01-01T12:30:00Z'
          description: The expiry date time of the grant
      required:
        - userId
        - consentId
        - scopes
        - cxScopes
        - accounts
        - expiry
    WikkitGrantLogCreationV1:
      allOf:
        - $ref: '#/components/schemas/WikkitGrantLogBaseV1'
        - type: object
          properties:
            grantCreationEvent:
              $ref: '#/components/schemas/GrantLogGrantCreationV1'
          required:
            - grantCreationEvent
    WikkitGrantLogHeldViaRegisterUpdateV1:
      allOf:
        - $ref: '#/components/schemas/WikkitGrantLogBaseV1'
    WikkitGrantLogIdTokenIssuanceV1:
      allOf:
        - $ref: '#/components/schemas/WikkitGrantLogBaseV1'
    WikkitGrantLogReactivatedViaRegisterUpdateV1:
      allOf:
        - $ref: '#/components/schemas/WikkitGrantLogBaseV1'
    WikkitGrantLogRefreshTokenIssuanceV1:
      allOf:
        - $ref: '#/components/schemas/WikkitGrantLogBaseV1'
    WikkitGrantLogRevokedByAdminV1:
      allOf:
        - $ref: '#/components/schemas/WikkitGrantLogBaseV1'
    WikkitGrantLogRevokedByDashboardV1:
      allOf:
        - $ref: '#/components/schemas/WikkitGrantLogBaseV1'
    WikkitGrantLogRevokedByRecipientV1:
      allOf:
        - $ref: '#/components/schemas/WikkitGrantLogBaseV1'
    WikkitGrantLogRevokedViaClosedPrincipalPollV1:
      allOf:
        - $ref: '#/components/schemas/WikkitGrantLogBaseV1'
    WikkitGrantLogRevokedViaRegisterUpdateV1:
      allOf:
        - $ref: '#/components/schemas/WikkitGrantLogBaseV1'
    WikkitGrantLogRevokedViaUserIneligibleV1:
      allOf:
        - $ref: '#/components/schemas/WikkitGrantLogBaseV1'
    WikkitGrantLogV2:
      properties:
        grantEventUType:
          $ref: '#/components/schemas/EnumGrantEventTypeV1'
      oneOf:
        - $ref: '#/components/schemas/WikkitGrantLogAccessTokenIssuanceV1'
        - $ref: '#/components/schemas/WikkitGrantLogAmendmentV1'
        - $ref: '#/components/schemas/WikkitGrantLogCodeClaimedV1'
        - $ref: '#/components/schemas/WikkitGrantLogCreationV1'
        - $ref: '#/components/schemas/WikkitGrantLogHeldViaRegisterUpdateV1'
        - $ref: '#/components/schemas/WikkitGrantLogIdTokenIssuanceV1'
        - $ref: '#/components/schemas/WikkitGrantLogReactivatedViaRegisterUpdateV1'
        - $ref: '#/components/schemas/WikkitGrantLogRefreshTokenIssuanceV1'
        - $ref: '#/components/schemas/WikkitGrantLogRevokedByAdminV1'
        - $ref: '#/components/schemas/WikkitGrantLogRevokedByDashboardV1'
        - $ref: '#/components/schemas/WikkitGrantLogRevokedByRecipientV1'
        - $ref: '#/components/schemas/WikkitGrantLogRevokedViaClosedPrincipalPollV1'
        - $ref: '#/components/schemas/WikkitGrantLogRevokedViaRegisterUpdateV1'
        - $ref: '#/components/schemas/WikkitGrantLogRevokedViaUserIneligibleV1'
      discriminator:
        propertyName: grantEventUType
        mapping:
          GRANT_ACCESS_TOKEN_ISSUANCE_EVENT: '#/components/schemas/WikkitGrantLogAccessTokenIssuanceV1'
          GRANT_AMENDMENT_EVENT: '#/components/schemas/WikkitGrantLogAmendmentV1'
          GRANT_CODE_CLAIMED_EVENT: '#/components/schemas/WikkitGrantLogCodeClaimedV1'
          GRANT_CREATION_EVENT: '#/components/schemas/WikkitGrantLogCreationV1'
          GRANT_HELD_VIA_REGISTER_UPDATE_EVENT: '#/components/schemas/WikkitGrantLogHeldViaRegisterUpdateV1'
          GRANT_ID_TOKEN_ISSUANCE_EVENT: '#/components/schemas/WikkitGrantLogIdTokenIssuanceV1'
          GRANT_REACTIVATED_VIA_REGISTER_UPDATE_EVENT: '#/components/schemas/WikkitGrantLogReactivatedViaRegisterUpdateV1'
          GRANT_REFRESH_TOKEN_ISSUANCE_EVENT: '#/components/schemas/WikkitGrantLogRefreshTokenIssuanceV1'
          GRANT_REVOKED_BY_ADMIN_EVENT: '#/components/schemas/WikkitGrantLogRevokedByAdminV1'
          GRANT_REVOKED_BY_DASHBOARD_EVENT: '#/components/schemas/WikkitGrantLogRevokedByDashboardV1'
          GRANT_REVOKED_BY_RECIPIENT_EVENT: '#/components/schemas/WikkitGrantLogRevokedByRecipientV1'
          GRANT_REVOKED_VIA_CLOSED_PRINCIPAL_POLL_EVENT: '#/components/schemas/WikkitGrantLogRevokedViaClosedPrincipalPollV1'
          GRANT_REVOKED_VIA_REGISTER_UPDATE_EVENT: '#/components/schemas/WikkitGrantLogRevokedViaRegisterUpdateV1'
          GRANT_REVOKED_VIA_USER_INELIGIBLE_EVENT: '#/components/schemas/WikkitGrantLogRevokedViaUserIneligibleV1'
    ResponseGrantLogListV2:
      properties:
        data:
          description: Grant logs
          type: array
          items:
            $ref: '#/components/schemas/WikkitGrantLogV2'
        meta:
          $ref: '#/components/schemas/MetaV1'
      type: object
      required:
        - data
        - meta
    GrantConsentDetailV1:
      type: object
      properties:
        grantConsentType:
          $ref: '#/components/schemas/EnumGrantConsentTypeV1'
      discriminator:
        propertyName: grantConsentType
        mapping:
          CDR_SHARING_ARRANGEMENT_V1: '#/components/schemas/GrantConsentDetailSharingArrangementV1'
      required:
        - grantConsentType
    GrantConsentDetailSharingArrangementV1:
      type: object
      allOf:
        - $ref: '#/components/schemas/GrantConsentDetailV1'
        - type: object
          properties:
            userId:
              type: string
              description: The User Identifier who executed the consent
              example: 5529e377-b8aa-42c3-8f65-b30aae26e555
            scopes:
              uniqueItems: true
              type: array
              description: This is a list of scopes related to CDR Sharing Arrangements.
              items:
                $ref: '#/components/schemas/EnumCDRScopesV1'
            accountIds:
              uniqueItems: true
              type: array
              items:
                type: string
                example: 9ecddf78-43f8-408c-aa36-d0f2054ffd98
            expiry:
              type: string
              format: date-time
              example: '2021-01-01T12:30:00Z'
              description: The new expiry time of the underlying Grant
          required:
            - userId
            - scopes
            - accountIds
            - expiry
    EnumGrantConsentTypeV1:
      type: string
      example: CDR_SHARING_ARRANGEMENT_V1
      default: CDR_SHARING_ARRANGEMENT_V1
      description: |+

        Grant Types

        | Value | Description
        |-------|-------------|
        CDR_SHARING_ARRANGEMENT_V1 | A CDR Sharing Arrangement


      enum:
        - CDR_SHARING_ARRANGEMENT_V1
      x-enum-varnames:
        - CDR_SHARING_ARRANGEMENT_V1
    GrantConsentV1:
      type: object
      properties:
        grantConsentId:
          type: string
          format: uuid
          example: f1ddcf6f-1f63-4f3a-a937-12052d776212
          description: The identifier for the Grant Consent
        created:
          type: string
          format: date-time
          example: '2021-01-01T12:30:00Z'
          description: When was this consent created by the user
        superceded:
          type: string
          format: date-time
          example: '2021-01-01T15:30:00Z'
          description: When was this consent superceded by a later consent
        details:
          $ref: '#/components/schemas/GrantConsentDetailV1'
      required:
        - grantConsentId
        - created
        - details
    ResponseGrantRequestsListV1:
      properties:
        data:
          description: >-
            The list of consents showing what access was granted at each point
            in the lifespan of a grant
          type: array
          items:
            $ref: '#/components/schemas/GrantConsentV1'
        meta:
          $ref: '#/components/schemas/MetaV1'
      type: object
      required:
        - data
        - meta
    CreateDashboardSsoRequestV1:
      type: object
      properties:
        userId:
          type: string
          example: 8d3bc307-a75a-4899-820b-dcca3cca4fd9
          description: The userId being logged into dashboard
        principalId:
          type: string
          example: 14fa42ba-5fbf-498a-95dc-0ab46b560839
          description: >-
            The principal being logged into dashboard. This is optional. If
            selected, the dashboard will only show grants and accounts for that
            user and principal.

            If omitted, Dashboard will show a principal selector on the first
            page to allow the user to  select a principal that they are acting
            upon in the dashboard. If the user only has one  principal, then no
            principal selector will be shown. 
      required:
        - userId
    RequestCreateDashboardSsoRequest:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/CreateDashboardSsoRequestV1'
      required:
        - data
    ResponseCreateDashboardSsoRequestV1:
      properties:
        jwt:
          type: string
          description: >-
            The compact JWT string that should be given to the dashboard sso
            route
          example: >-
            eyJhbGciOiJIUzUxMiJ9.eyJhdWQiOiJodHRwczpcL1wvaWRwLnNhbmRib3hcL3NhbmRib3gtZGFzaGJvYXJkLWF1dGgiLCJzdWIiOiIwOGMzMWEyYTkwMTZkNmM1MTdhOTU1NjIyMjhhMzdjMDowOGMzMWEyYTkwMTZkNmM1MTdhOTU1NjIyMjhhMzdjMCIsIm5iZiI6MTY2MTEwNDc2MywiaXNzIjoiYml6YS1kYXNoYm9hcmQiLCJleHAiOjE2NjExMDQ5MTMsImlhdCI6MTY2MTEwNDc5M30.vsAgJ1cHKEGBuJ54h8taPC2iK0l1ItBA2XQjaIZGq_3KQfYuU5ctsdnUgu6NRXUWL9bsYLaS5gnbkzw6nbd6zw
      type: object
      required:
        - jwt
  headers:
    XFAPIInteractionId:
      description: >-
        An [RFC4122](https://tools.ietf.org/html/rfc4122) UUID used as a
        correlation id. If provided, the data holder must play back this value
        in the _x-fapi-interaction-id_ response header. If not provided a
        [RFC4122](https://tools.ietf.org/html/rfc4122) UUID value is required to
        be provided in the response header to track the interaction. This header
        MUST be responded for success and error responses for authenticated
        APIs.
      explode: false
      schema:
        type: string
        format: uuid
        example: 6ba7b814-9dad-11d1-80b4-00c04fd430c8
      style: simple
  responses:
    GetHealth:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseManagementGetHealthV1'
      headers:
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFAPIInteractionId'
    ResponseGeneric400:
      description: Bad Request
      content:
        application/json:
          schema:
            properties:
              errors:
                items:
                  $ref: '#/components/schemas/ResponseGeneric400Item'
                type: array
            required:
              - errors
            type: object
    ListGrants:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseGrantListV1'
      headers:
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFAPIInteractionId'
    ResponseGeneric404:
      description: Resource Not Found
      content:
        application/json:
          schema:
            properties:
              errors:
                items:
                  $ref: '#/components/schemas/ResponseGeneric404Item'
                type: array
            required:
              - errors
            type: object
    GetUser:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseDashboardUserByIdV1'
      headers:
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFAPIInteractionId'
    ListDOMSRequests:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseDashboardDOMSRequestListV1'
      headers:
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFAPIInteractionId'
    GetDOMSRequest:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseDashboardGetDOMSRequestV1'
      headers:
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFAPIInteractionId'
    CreateDOMSRequest:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseDashboardDOMSRequestListV1'
      headers:
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFAPIInteractionId'
    UpdateDOMSRequest:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseDashboardDOMSRequestListV1'
      headers:
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFAPIInteractionId'
    ListAccounts:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseDashboardAccountListV1'
      headers:
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFAPIInteractionId'
    GetAccount:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseDashboardGetAccountV1'
      headers:
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFAPIInteractionId'
    ListAccountGrants:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseGrantListV1'
      headers:
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFAPIInteractionId'
    GetNotificationPreferences:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseDashboardNotificationPreferenceV1'
      headers:
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFAPIInteractionId'
    UpdateNotificationPreferences:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseDashboardNotificationPreferenceV1'
      headers:
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFAPIInteractionId'
    ListSecondaryUsers:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseDashboardSecondaryUserListV1'
      headers:
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFAPIInteractionId'
    UpdateSecondaryUser:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseDashboardSecondaryUserListV1'
      headers:
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFAPIInteractionId'
    GetGrant:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GrantV1'
      headers:
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFAPIInteractionId'
    DeleteGrant:
      description: >-
        This revokes the grant, revoking tokens and notifying the ADR of the
        revocation. For grants with joint accounts, the other joint account
        holders will be notified of this action.
    ListGrantLogs:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseGrantLogListV2'
      headers:
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFAPIInteractionId'
    ListGrantRequests:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseGrantRequestsListV1'
      headers:
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFAPIInteractionId'
    CreateGrantRequest:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GrantConsentV1'
      headers:
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFAPIInteractionId'
    WithdrawJointAccount:
      description: >-
        Joint account owner withdraws sharing approval on the joint account from
        a specific Grant that was created by another joint account owner.
    CreateDashboardSsoRequest:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseCreateDashboardSsoRequestV1'
      headers:
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFAPIInteractionId'
  requestBodies:
    CreateDOMSRequest:
      description: Create DOMS Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RequestCreateDOMSRequestV1'
          encoding:
            payload:
              contentType: application/json
      required: true
    HandleDOMSRequest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RequestHandleDOMSRequestV1'
      required: true
    UpdateNotificationsRequest:
      description: Update the notifications
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RequestUpdateNotificationPreferencesV1'
          encoding:
            payload:
              contentType: application/json
      required: true
    UpdateSecondaryUserRequest:
      description: Update Secondary User Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RequestUpdateSecondaryUserV1'
          encoding:
            payload:
              contentType: application/json
      required: true
