Fluvius mandate retrieval

Introduction

This guide outlines the upcoming updates in the GET /datahub/mandate endpoint, which returns the status of the consumer's consent from the Fluvius data hub.

Currently, users who receive data from the Fluvius data hub can renew their mandates only after they expire, thus causing a temporary interruption of the generation of the EnergyAI insights. With the new functionality introduced in the Fluvius API, EnergyAI can inform users up to 3 months before expiration, so they renew proactively, ensuring the continuity of the service.

The endpoint will be extended to provide the following information:

  1. Mandate renewal status: Is reported by the renewal_status field, and it appears 3 months before the mandate expires showing:
    • Whether the renewal is pending (TO_BE_RENEWED)
    • If the user has requested a renewal already (RENEWAL_REQUESTED)
    • Whether the mandate expiration date has passed, meaning the end user needs to request a new mandate in order to continue receiving energy insights. (EXPIRED)
  2. Expiration date of the mandate: The date when the mandate is set to expire, reported in the expiration_date field.
  3. Granularity: The data granularity that corresponds to this mandate, reported in the granularity field.

The response of the endpoint will be as follows:

Approved Mandate that is not expiring within 3 months

{
  "status": "ok",
  "data": {
    "customer_id": "<customer-id>",
    "status": "APPROVED",
    "url": "https://<datahub-url>?id=<mandate-request-id>",
    "metering_points": {
      "<electricity-EAN>": {
        "commodity": "ELECTRICITY",
        "status": "APPROVED",
        "granularity": "PT15M",
        "data_access_period": {
          "start": "2024-01-01T00:00:00Z"
        },
        "expiration_date": "2027-04-01T00:00:00Z"
      },
      "<gas-EAN>": {
        "commodity": "GAS",
        "status": "APPROVED",
        "granularity": "PT15M",
        "data_access_period": {
          "start": "2024-01-01T00:00:00Z"
        },
        "expiration_date": "2027-04-01T00:00:00Z"
      }
    }
  }
}

Approved Mandate that is expiring in the next 3 months

{
  "status": "ok",
  "data": {
    "customer_id": "<customer-id>",
    "status": "APPROVED",
    "url": "https://<datahub-url>?id=<mandate-request-id>",
    "metering_points": {
      "<electricity-EAN>": {
        "commodity": "ELECTRICITY",
        "status": "APPROVED",
        "granularity": "PT15M",
        "data_access_period": {
          "start": "2024-01-01T00:00:00Z",
          "end": "2025-04-01T00:00:00Z"
        },
        "expiration_date": "2025-04-01T00:00:00Z",
        "renewal_status": "TO_BE_RENEWED"
      },
      "<gas-EAN>": {
        "commodity": "GAS",
        "status": "APPROVED",
        "granularity": "PT15M",
        "data_access_period": {
          "start": "2024-01-01T00:00:00Z",
          "end": "2025-04-01T00:00:00Z"
        },
        "expiration_date": "2025-04-01T00:00:00Z",
        "renewal_status": "TO_BE_RENEWED"
      }
    }
  }
}

Timing

This change is expected to be delivered before March, 2025