> ## Documentation Index
> Fetch the complete documentation index at: https://docs.auth.energy/llms.txt
> Use this file to discover all available pages before exploring further.

# List Own Access Records

> Returns all Access Records registered by the authenticated Data User, scoped to their DUID. Supports filtering by state and legal basis.

This is the correct endpoint for a Data User listing their own registrations. Use `GET /meter-points/{mpxn}/access-records` to see all Data Users' records for a specific meter point (e.g. for a customer-facing portal view).



## OpenAPI

````yaml /data-access-register/api/openapi-dar.yaml get /records
openapi: 3.1.0
info:
  title: Data Access Register
  description: >
    Core APIs for the Central Data Access Register.


    The register records all lawful access to customer energy data by
    Controllers,

    regardless of the legal basis on which that access rests. It is not
    exclusively

    a consent register — legitimate interests, public task, legal obligation,
    and

    contract are all within scope alongside consent-based access.


    **Jurisdiction:** This is a UK-only solution. All Controllers, customers,
    and

    meter points are within Great Britain. The governing data protection
    framework

    is **UK GDPR** and the **Data Protection Act 2018**. EU GDPR does not apply.

    The jurisdiction field is fixed to `GB` and does not need to be supplied.


    ## Purpose


    The register provides a single, auditable source of truth for:


    - **Controllers** — to record and demonstrate the legal basis under which
    they
      access customer meter data.
    - **Data Providers** — to verify that a Controller has a registered, active
    access
      record before releasing data.
    - **Customers** — to view all parties registered as having lawful access to
    their
      meter point, on request via any Controller.

    ## Party Model


    | Party | UK GDPR Role | Description |

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

    | **Data User** | Processor | Operates the register. Fetches and processes
    meter data on behalf of Controllers. Authenticated via bearer token. |

    | **Controller** | Data Controller | A B2B customer of the Data User. One or
    more Controllers may be registered per access record — sole, joint (Art.
    26), or group (trading name transparency). Bears GDPR accountability for the
    legal basis and its ongoing validity. |

    | **Customer** | Data Subject | The energy customer. Identified by MPxN to
    minimise PII held centrally. |

    | **Data Provider** | Data Source | Holds meter data. Verifies access
    records before releasing data via `GET /access-records/{ak}`. |


    ## Record Structure


    All access records share a single schema — `AccessRecord` — with four
    sections

    aligned to ISO/IEC TS 27560:2023:


    1. **`record-metadata`** — record identifier, creation timestamp, controller
       arrangement (sole, joint, or group), and a reference to the associated
       Identity Record. Present for all records.
    2. **`notice`** — the privacy notice(s) presented to the customer. Present
    only
       for consent-based records; null for all other legal bases. Supports a single
       shared notice (common) or per-controller notices (joint arrangements where
       controllers discharge Art. 13 obligations separately).
    3. **`processing`** — legal basis, purpose, data types, and related
    obligations.
       Present for all records. Per-controller compliance fields (privacy rights URL,
       LIA reference, statutory reference, storage conditions) are held on each
       controller entry within `record-metadata.controller-arrangement`.
    4. **`access-event`** — when and how access was registered or consent was
    obtained;
       current lifecycle state. Present for all records.

    The `notice` and `access-event.consent` sub-object are null for non-consent
    records.

    The `access-event.consent` sub-object is null for non-consent records and
    populated

    for consent records.


    ## Identity Records


    The person-property relationship — who the individual is and their occupancy
    of the

    meter point — is held separately in an **Identity Record**
    (`/identity-records`).

    This keeps PII (MPxN, address, move-in date) and identity verification
    evidence

    out of the access record entirely.


    Each `AccessRecord` carries an `identity-record-ref` (`ir` key) linking it
    to its

    Identity Record. Identity Records are accessible only to authenticated Data
    Users.

    The unauthenticated `GET /access-records/{ak}` endpoint used by Data
    Providers

    never returns PII.


    Identity Records support two re-identification flows to reconnect a
    returning

    customer to an existing record without re-collecting all their details:

    - **Magic link** — a short-lived email link triggers re-identification.

    - **Passkey** — initiates a WebAuthn registration or assertion ceremony.


    ## Legal Basis and Required Fields


    The `processing.legal-basis` value determines which fields within `notice`
    and

    `access-event.consent` are expected:


    | Legal basis | `notice` | `access-event.consent` |

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

    | `uk-consent`, `uk-explicit-consent` | **Required** | **Required** |

    | All other bases | Must be null | Must be null |


    For legitimate interests records, `lia-reference` should be supplied on the

    lead controller entry within `record-metadata.controller-arrangement`.

    For public task or legal obligation records, `statutory-reference`

    should be supplied on the lead controller entry.


    ## Access Record Lifecycle


    Records are never hard-deleted. All state transitions are recorded with
    timestamps.


    ```

    [ACTIVE] ──revoke──▶ [REVOKED]

    [ACTIVE] ──expiry──▶ [EXPIRED]

    [DISCOVERED] ──claimed──▶ [ACTIVE]

    [DISCOVERED] ──expiry──▶ [EXPIRED]

    ```


    `REVOKED` represents consent withdrawal (consent records) or the Controller

    removing their registration (non-consent records). Data Providers must deny

    access for any record not in `ACTIVE` state with a future (or null) expiry.


    `DISCOVERED` is a sparse, read-only state created by the DCC when it detects

    historic meter data requests from an organisation that has not yet
    registered

    as a Data User. These records are visible to Customers for transparency but

    cannot be used to authorise data release. When the organisation onboards as

    a Data User and registers a full access record for the same MPxN, the

    DISCOVERED record is superseded and transitions to `ACTIVE`.


    ## Authentication


    All endpoints except `GET /access-records/{ak}` require a bearer token from

    `GET /auth/token`. Tokens expire after 7200 seconds.


    ## Versioning


    URI-based versioning. Current version: `v1`.
  version: 0.0.16
  contact:
    name: Auth Energy
    email: contact@auth.energy
    url: https://docs.auth.energy/consent
  license:
    name: Proprietary
servers:
  - url: https://api.central.consent/v1
    description: Production
security: []
tags:
  - name: Identity Records
    description: >
      Endpoints for Data Users to create and manage Identity Records, which hold
      the person-property relationship (MPxN, address, move-in date, identity
      verification evidence) separately from access records. Supports
      re-identification of returning customers via email magic link or WebAuthn
      passkey.
  - name: Re-identification
    description: >-
      Endpoints for initiating and confirming customer re-identification flows.
      Supports magic link, passkey assertion, and passkey registration — both
      for the same Data User (same-DUID) and for a second Data User linking to
      an existing Identity Record created by another Data User (cross-DUID). In
      the cross-DUID flow the `ir` key is never exposed to the initiating Data
      User — the register resolves it internally after the customer completes
      the challenge.
  - name: Authentication
    description: Obtain bearer tokens for authenticated endpoints.
  - name: Data Users
    description: >
      Endpoints for Data Users (Processors) to register and manage access
      records on behalf of their Controller customers.
  - name: Data Providers
    description: >
      Endpoints for Data Providers (EDPs) to verify access records and look up
      registered Data User organisations before releasing meter data. Includes
      access record verification via access key and Data User directory lookup
      by DUID, allowing EDPs to confirm both that a specific record is active
      and that the organisation behind it is in good standing.
  - name: DCC
    description: >
      Endpoints restricted to Smart DCC system credentials. Covers two
      responsibilities: (1) submitting discovered access records derived from
      historic meter transaction logs — sparse, read-only records that surface
      to customers for transparency but cannot authorise data release,
      superseded when the organisation registers as a Data User; and (2)
      submitting Change of Tenancy events, which trigger `tenancy.change`
      webhooks to all Data Users with active access records on the affected
      MPxN.
  - name: Customer Portal
    description: >
      The centralised Customer Consent Portal is a standalone web service at
      https://portal.central.consent. It has no API endpoints — Data Users link
      customers to the portal via a plain URL carrying `ir` or `mpxn` and an
      optional `return` parameter. The portal authenticates the customer
      directly using the re-identification mechanisms on their Identity Record
      (passkey, magic link, or supplier OAuth fallback). This tag documents the
      portal behaviour and the `consent.withdrawal` webhook it fires on
      revocation.
  - name: Webhooks
    description: >
      Endpoints for Controllers to register and manage webhook subscriptions.
      The register dispatches event payloads to registered callback URLs when
      consent records are approaching expiry or when a Change of Tenancy is
      recorded against an MPxN with active access records.
paths:
  /records:
    get:
      tags:
        - Data Users
      summary: List Own Access Records
      description: >-
        Returns all Access Records registered by the authenticated Data User,
        scoped to their DUID. Supports filtering by state and legal basis.


        This is the correct endpoint for a Data User listing their own
        registrations. Use `GET /meter-points/{mpxn}/access-records` to see all
        Data Users' records for a specific meter point (e.g. for a
        customer-facing portal view).
      operationId: listOwnRecords
      parameters:
        - name: state
          in: query
          required: false
          schema:
            $ref: fa20dc6b-ac6a-46f9-8658-d5543820cf3d
          description: Filter by record state.
        - name: legal-basis
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/LegalBasis'
          description: Filter by legal basis.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 200
            maximum: 500
          description: Maximum number of records to return.
      responses:
        '200':
          description: List of own access records.
          content:
            application/json:
              schema:
                type: object
                required:
                  - response
                  - records
                  - total
                properties:
                  response:
                    $ref: '#/components/schemas/ResponseMetadata'
                  records:
                    type: array
                    items:
                      $ref: '#/components/schemas/AccessRecordSummary'
                  total:
                    type: integer
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorised'
      security:
        - bearerAuth: []
components:
  schemas:
    LegalBasis:
      type: string
      description: >
        The legal basis under which the Controller accesses customer data.


        **Consent bases** — `notice` and `access-event.consent` must be
        populated.


        | Value | Plain name | Article |

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

        | `uk-consent` | UK Consent | UK GDPR Art. 6(1)(a) |

        | `uk-explicit-consent` | UK Explicit Consent | UK GDPR Art. 9(2)(a) |


        **Non-consent bases** — `notice` and `access-event.consent` must be
        null.


        | Value | Plain name | Article | Supporting field (on lead controller) |

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

        | `uk-legitimate-interests` | UK Legitimate Interests | UK GDPR Art.
        6(1)(f) | `lia-reference` |

        | `uk-public-task` | UK Public Task | UK GDPR Art. 6(1)(e) |
        `statutory-reference` |

        | `uk-legal-obligation` | UK Legal Obligation | UK GDPR Art. 6(1)(c) |
        `statutory-reference` |

        | `uk-contract` | UK Contract | UK GDPR Art. 6(1)(b) | — |
      enum:
        - uk-consent
        - uk-explicit-consent
        - uk-legitimate-interests
        - uk-public-task
        - uk-legal-obligation
        - uk-contract
      example: uk-consent
    ResponseMetadata:
      type: object
      properties:
        resource:
          type: string
          example: /v1/access-records/ak_691df0c788ca043403b7fa90
        timestamp:
          type: string
          format: date-time
          example: '2026-03-11T12:00:00Z'
        transaction-id:
          type: string
          description: >-
            Unique identifier for this request/response pair. Quote in support
            enquiries.
          example: tid_691df0c788ca043403b7fa90
      required:
        - resource
        - timestamp
        - transaction-id
    AccessRecordSummary:
      type: object
      description: >
        A summary entry as returned in a list response. Includes convenience
        fields derived from `record-metadata.controller-arrangement` so callers
        can display controller identity without expanding the full metadata
        object.
      properties:
        ak:
          $ref: '#/components/schemas/AccessKey'
        lead-controller-name:
          type: string
          nullable: true
          description: >
            Trading name of the lead (or sole) controller. Derived from the
            `lead` or `sole` entry in
            `record-metadata.controller-arrangement.controllers`. Null for
            `DISCOVERED` records.
          example: Bright Energy Ltd
        arrangement-type:
          nullable: true
          description: >
            The controller arrangement type for this record. Null for
            `DISCOVERED` records. Allows list UIs to show "Bright Energy Ltd + 1
            other" for group/joint arrangements without expanding the full
            metadata.
          allOf:
            - $ref: '#/components/schemas/ControllerArrangementType'
        controller-count:
          type: integer
          nullable: true
          description: >
            Total number of controllers in the arrangement. Null for
            `DISCOVERED` records. Use alongside `lead-controller-name` to render
            "X and N others" for multi-controller arrangements.
          example: 1
        record-metadata:
          $ref: '#/components/schemas/RecordMetadata'
          nullable: true
          description: >
            Full record metadata. Present for full access records. Null for
            DISCOVERED records, which carry a `discovered-access` object
            instead.
        legal-basis:
          $ref: '#/components/schemas/LegalBasis'
          nullable: true
          description: |
            Present for full access records. Null for DISCOVERED records.
        purpose:
          type: string
          nullable: true
          example: Energy efficiency analysis and tariff recommendations
        data-types:
          $ref: '#/components/schemas/DataType'
        state:
          $ref: '#/components/schemas/AccessState'
        expiry:
          type: string
          format: date-time
          nullable: true
        discovered-access:
          nullable: true
          description: >
            Populated only for `DISCOVERED` records. Null for all other states.
            Contains the sparse information derived from DCC transaction logs.
          allOf:
            - $ref: '#/components/schemas/DiscoveredAccessRecord'
      required:
        - ak
        - data-types
        - state
    AccessKey:
      type: string
      pattern: ^ak_[0-9a-f]{24}$
      description: >
        Unique opaque identifier for an access record, issued by the register on
        creation. Treat as a secret — possession enables access verification.
      example: ak_691df0c788ca043403b7fa90
    ControllerArrangementType:
      type: string
      description: >
        The nature of the controller arrangement for this access record.


        - `sole` — a single Data Controller bears full GDPR accountability.

        - `joint` — two or more legally distinct Data Controllers jointly
        determine
          the purposes and means of processing under UK GDPR Art. 26. An
          `art26-reference` pointing to their inter-controller arrangement must
          be supplied. Each controller holds individual accountability.
        - `group` — one accountable lead controller plus one or more trading
        names
          or subsidiaries listed purely for customer transparency, so customers
          recognise the brands accessing their data. The lead bears all GDPR
          accountability; members inherit it. No Art. 26 arrangement required.
      enum:
        - sole
        - joint
        - group
    RecordMetadata:
      type: object
      description: >-
        **ISO 27560 Section 1 — Record Metadata**


        `record-identifier` and `created-at` are assigned by the register on
        creation

        and returned in responses; they must not be supplied in request bodies.


        `identity-record-ref` links this access record to the Identity Record
        that

        holds the person-property relationship (PII principal, move-in date,
        address,

        and identity verification evidence). Supply the `ir` key returned when
        the

        Identity Record was created. The linked Identity Record must have been

        registered by the same authenticated Data User.



        `identity-record-ref` is required when registering a new Access Record
        in the standard flow. It may be omitted when a `reidentification-token`
        is supplied in the `POST /access-records` request body — the register
        resolves the `ir` internally from the validated token.
      properties:
        schema-version:
          type: string
          description: Version of the schema profile this record conforms to.
          example: '1.0'
        record-identifier:
          $ref: '#/components/schemas/AccessKey'
          readOnly: true
        created-at:
          type: string
          format: date-time
          readOnly: true
          description: >
            UTC timestamp when this record was created in the register. May
            differ from `access-event.registered-at` for historic registrations.
          example: '2024-01-15T09:30:00Z'
        controller-arrangement:
          $ref: '#/components/schemas/ControllerArrangement'
        identity-record-ref:
          $ref: '#/components/schemas/IdentityRecordKey'
          description: >
            Reference to the Identity Record holding the person-property
            relationship for this access registration. The `ir` key is issued
            when the Identity Record is created via `POST /identity-records`.
          nullable: true
      required:
        - schema-version
        - controller-arrangement
    DataType:
      type: array
      minItems: 1
      description: One or more energy data categories covered by this access record.
      items:
        type: string
        enum:
          - HH-CONSUMPTION
          - HH-EXPORT
          - MTH-CONSUMPTION
          - MTH-EXPORT
          - ANNUAL-CONSUMPTION
          - ANNUAL-EXPORT
          - TARIFF-IMPORT
          - TARIFF-EXPORT
    AccessState:
      type: string
      description: >
        Lifecycle state of the access record.


        - `ACTIVE` — access is registered and in force.

        - `EXPIRED` — the record's `expiry` has passed.

        - `REVOKED` — the Controller has removed their registration, or the
        customer
          has withdrawn consent. Retained for audit with `access-event.revoked-at` set.
        - `DISCOVERED` — a sparse record created by the DCC from historic meter
          transaction logs. The organisation has not yet registered as a Data User.
          Visible to customers for transparency but cannot authorise data release.
          Transitions to superseded when the organisation registers a full record.
      enum:
        - ACTIVE
        - EXPIRED
        - REVOKED
        - DISCOVERED
    DiscoveredAccessRecord:
      type: object
      description: >
        A sparse access record derived from DCC historic meter transaction logs.

        Submitted by the DCC when it detects an organisation making data
        requests

        against a meter point that has no corresponding DAR registration.


        This schema is intentionally minimal — it captures only what the DCC can

        observe from transaction logs without requiring the organisation's

        participation. The `organisation-name` is the DCC's own record of the

        requesting party; it is not validated against any external directory.


        DISCOVERED records are visible to customers in the access record list
        and

        serve as a prompt for the organisation to formalise their registration.

        They cannot be used to authorise data release.
      properties:
        mpxn:
          $ref: '#/components/schemas/MPxN'
        organisation-name:
          type: string
          maxLength: 255
          description: >
            The name of the organisation as known to the DCC from its
            transaction records. Not validated against the Data User directory.
          example: Acme Energy Services Ltd
        organisation-reference:
          type: string
          maxLength: 255
          description: >
            The DCC's internal identifier for this organisation. Used to link
            the DISCOVERED record to a full access record when the organisation
            subsequently registers as a Data User.
          example: org_abc123def456
        first-seen:
          type: string
          format: date
          description: >
            The earliest date on which the DCC observed a data request from this
            organisation against this MPxN.
          example: '2024-06-01'
        last-seen:
          type: string
          format: date
          description: >
            The most recent date on which the DCC observed a data request from
            this organisation against this MPxN.
          example: '2026-02-28'
        data-types-observed:
          description: >
            The data types the DCC observed being requested. Uses the same enum
            as `processing.data-types` on a full access record.
          allOf:
            - $ref: '#/components/schemas/DataType'
        source-reference:
          type: string
          maxLength: 255
          description: >
            The DCC's internal reference for the transaction log batch or audit
            record from which this discovered access was derived. Retained for
            traceability.
          example: DCC-TX-LOG-2026-03-001
        superseded-by:
          type: string
          readOnly: true
          description: >
            The access key (`ak`) of the full access record that supersedes this
            DISCOVERED record, if the organisation has since registered. Set by
            the register; not accepted in requests.
          nullable: true
          example: ak_691df0c788ca043403b7fa90
      required:
        - mpxn
        - organisation-name
        - organisation-reference
        - first-seen
        - data-types-observed
        - source-reference
    ErrorResponse:
      type: object
      properties:
        response:
          $ref: '#/components/schemas/ResponseMetadata'
        errors:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/ErrorDetail'
      required:
        - response
        - errors
    ControllerArrangement:
      type: object
      description: >
        **ISO 27560 Section 1 — Controller Arrangement**


        Describes the controller(s) accountable for this access record. Supports

        three arrangement types:


        **`sole`** — single controller. `controllers` has exactly one entry with

        `role: sole`. `art26-reference` must be null.


        **`joint`** — two or more legally distinct controllers jointly
        determining

        the purposes and means of processing (UK GDPR Art. 26). Exactly one
        entry

        must carry `role: lead`; all others carry `role: joint`.
        `art26-reference`

        is required and must point to the inter-controller arrangement document.

        Each controller should supply their own `privacy-rights-url`,
        `lia-reference`,

        and `statutory-reference` as applicable.


        **`group`** — one accountable lead plus trading names or subsidiaries
        listed

        for customer transparency. Exactly one entry carries `role: lead`; all
        others

        carry `role: member`. `art26-reference` must be null. Per-controller

        compliance fields are only required on the lead entry.


        In all cases the customer can exercise their GDPR rights against any

        controller listed — the `contact-url` and `privacy-rights-url` on each

        entry (where present) are shown in the Customer Portal.
      properties:
        arrangement-type:
          $ref: '#/components/schemas/ControllerArrangementType'
        art26-reference:
          type: string
          maxLength: 500
          nullable: true
          description: >
            Reference to the Art. 26 inter-controller arrangement (e.g. a
            contract reference or document URL). Required when
            `arrangement-type` is `joint`; must be null for `sole` and `group`.
          example: JCA-2024-BrightGrid-001
        controllers:
          type: array
          minItems: 1
          description: >
            The controller entries for this arrangement. Must contain exactly
            one `lead` (or `sole`) entry. Joint arrangements require at least
            two entries.
          items:
            $ref: '#/components/schemas/Controller'
      required:
        - arrangement-type
        - controllers
    IdentityRecordKey:
      type: string
      pattern: ^ir_[0-9a-f]{24}$
      description: >
        Unique opaque identifier for an Identity Record, issued by the register
        on creation. Referenced from `record-metadata.identity-record-ref` on an
        AccessRecord to link the two resources.
      example: ir_a3c5e7f9b1d3a3c5e7f9b1d3
    MPxN:
      type: string
      pattern: ^(?:[0-9A-HJ-NPR-Z]{2}[0-9]{8,10}|[0-9]{10})$
      description: >-
        Meter Point Administration Number (MPAN) or Meter Point Reference Number
        (MPRN).
      example: '1234567890123'
    ErrorDetail:
      type: object
      properties:
        error-code:
          type: string
          example: VAL001
        message:
          type: string
          example: Field 'mpxn' does not match the required pattern.
      required:
        - error-code
        - message
    Controller:
      type: object
      description: >
        A single controller entry within a `ControllerArrangement`. The `role`
        field determines its position in the arrangement. Per-controller
        compliance fields (`privacy-rights-url`, `lia-reference`,
        `statutory-reference`, `storage-conditions`) are required on `sole` and
        `lead` entries; optional on `joint` entries (where each controller
        should hold their own); and omitted on `member` entries (which inherit
        from the lead).
      properties:
        name:
          type: string
          maxLength: 255
          description: Trading name of the Controller organisation.
          example: Bright Energy Ltd
        role:
          $ref: '#/components/schemas/ControllerRole'
        contact-url:
          type: string
          format: uri
          description: URL of the Controller's customer-facing contact or privacy page.
          example: https://bright-energy.com/contact
        address:
          $ref: '#/components/schemas/UKAddress'
        privacy-rights-url:
          type: string
          format: uri
          description: >
            URL of this Controller's data subject rights page. Required by GDPR
            Art. 13(2)(b)/(c). Required on `sole` and `lead` entries. Optional
            on `joint` entries (where each controller should supply their own).
            Omitted on `member` entries — customers are directed to the lead's
            URL.
          example: https://bright-energy.com/your-rights
        lia-reference:
          type: string
          maxLength: 255
          nullable: true
          description: >
            Reference to this Controller's Legitimate Interests Assessment.
            Expected on `sole` and `lead` entries when `legal-basis` is
            `uk-legitimate-interests`. Each joint controller should supply their
            own.
          example: LIA-2024-003
        statutory-reference:
          type: string
          maxLength: 500
          nullable: true
          description: >
            The statutory instrument, regulation, or licence condition
            authorising this Controller's access. Expected on `sole` and `lead`
            entries when `legal-basis` is `uk-public-task` or
            `uk-legal-obligation`.
          example: Energy Act 2023, s.147
        storage-conditions:
          nullable: true
          description: >
            Where and for how long this Controller stores the data. Required on
            `sole` and `lead` entries. Optional on `joint` entries where storage
            arrangements differ. Omitted on `member` entries.
          allOf:
            - $ref: '#/components/schemas/StorageConditions'
      required:
        - name
        - role
        - contact-url
    ControllerRole:
      type: string
      description: >
        Role of this controller entry within the arrangement.


        - `sole` — the only controller. Only valid when `arrangement-type` is
        `sole`.

        - `lead` — the primary accountable controller. Required in `joint` and
        `group`
          arrangements; exactly one entry must carry this role.
        - `joint` — a co-controller sharing Art. 26 accountability. Only valid
        when
          `arrangement-type` is `joint`.
        - `member` — a trading name or subsidiary listed for customer
        transparency.
          Only valid when `arrangement-type` is `group`. Inherits accountability
          from the lead.
      enum:
        - sole
        - lead
        - joint
        - member
    UKAddress:
      type: object
      properties:
        addressLine1:
          type: string
          maxLength: 100
          example: 221B Baker Street
        addressLine2:
          type: string
          maxLength: 100
          nullable: true
          example: Marylebone
        townCity:
          type: string
          maxLength: 100
          example: London
        county:
          type: string
          maxLength: 100
          nullable: true
          example: Greater London
        postcode:
          type: string
          pattern: ^[A-Z]{1,2}[0-9][0-9A-Z]? ?[0-9][A-Z]{2}$
          example: NW1 6XE
      required:
        - addressLine1
        - townCity
        - postcode
    StorageConditions:
      type: object
      properties:
        location:
          type: string
          description: >-
            ISO 3166-1 alpha-2 country code where data is stored. Expected to be
            `GB` for UK-only deployments.
          example: GB
        retention-period:
          type: string
          description: ISO 8601 duration for data retention after expiry or revocation.
          example: P2Y
      required:
        - location
        - retention-period
  responses:
    BadRequest:
      description: The request was malformed or failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorised:
      description: Missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT from `GET /auth/token`. Pass as `Authorization: Bearer <token>`.
        Expires after 7200s.

````