---
updatedAt: 2026-03-31T12:12:41.000Z
agentTools:
  projectIndex: https://api.net2grid.com/llms.txt
---

# /datahub/mandate

Returns the status of the user's mandate that is necessary so that NET2GRID can receive energy measurements from the datahub on behalf of the user.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "NET2GRID Customer Engagement API",
    "description": "This is the B2C NET2GRID API that can be used by mobile and web apps to manage the accounts and the data that are provided by the NET2GRID Meter Data Analytics Platform.",
    "version": "13.6.0"
  },
  "servers": [
    {
      "url": "http://api.net2grid.docker",
      "description": "API server"
    }
  ],
  "paths": {
    "/v2/datahub/mandate": {
      "get": {
        "tags": [
          "Account Status"
        ],
        "summary": "/datahub/mandate",
        "description": "Returns the status of the user's mandate that is necessary so that NET2GRID can receive energy measurements from the datahub on behalf of the user.",
        "operationId": "v2getDataHubMandate",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MandateResponseDTO"
                },
                "examples": {
                  "GetApprovedMandateWithoutRenewalStatus": {
                    "$ref": "#/components/examples/GetApprovedMandateWithoutRenewalStatus"
                  },
                  "GetApprovedMandateWithRenewalStatus": {
                    "$ref": "#/components/examples/GetApprovedMandateWithRenewalStatus"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid Request\n    <br/>422: Multiple Installations are not supported\n    <br/>425: Datahub GET mandate call is disabled\n    <br/>999: Datahub Client generic error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "MandateDataAccessPeriodDTO": {
        "properties": {
          "start": {
            "description": "Data access period start date in the format: YYYY-MM-DDTHH:MM:SSZ",
            "type": "string"
          },
          "end": {
            "description": "Data access period end date in the format: YYYY-MM-DDTHH:MM:SSZ",
            "type": "string"
          }
        },
        "type": "object"
      },
      "MandateDataDTO": {
        "properties": {
          "customer_id": {
            "description": "Customer identifier as of the datahub (reference number).",
            "type": "string"
          },
          "status": {
            "description": "An aggregated status of all mandates of this customer depending on the status of the corresponding metering points:<br/>\n     INITIAL: If all metering-point mandates are INITIAL.\n     REQUESTED: If all metering-point mandates are REQUESTED.\n     APPROVED: If at least one metering-point mandate is APPROVED.\n     REJECTED: If all metering-point mandates are REJECTED.<br/>\n     For more details consult the status under the METERING_POINTS object.",
            "type": "string",
            "enum": [
              "INITIAL",
              "REQUESTED",
              "APPROVED",
              "REJECTED"
            ]
          },
          "url": {
            "description": "URL provided by the datahub.",
            "type": "string"
          },
          "metering_points": {
            "description": "Contains the metering points information of the authenticated user.",
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/MandateMeteringPointDTO"
            }
          }
        },
        "type": "object"
      },
      "MandateMeteringPointDTO": {
        "properties": {
          "commodity": {
            "description": "Contains the commodity of the metering point. Allowed values: ELECTRICITY|GAS.",
            "type": "string",
            "enum": [
              "ELECTRICITY",
              "GAS"
            ]
          },
          "status": {
            "description": "The status of the mandate as obtained from the datahub. If there is no mandate available the status will not be returned at all. The stages where the mandates get updated are the following:<br/>\n     INITIAL: The metering point has been created in the NET2GRID backend but the user has not requested a mandate yet.\n     REQUESTED: The user requested the mandate but NET2GRID hasn’t received an update from the datahub yet.\n     APPROVED: The user has approved the mandate.\n     REJECTED: The mandate is no longer approved. This can happen for various reasons, like the user having explicitly rejected the mandate or in case it has expired.",
            "type": "string",
            "enum": [
              "INITIAL",
              "REQUESTED",
              "APPROVED",
              "REJECTED"
            ]
          },
          "granularity": {
            "description": "The data granularity to which the mandate corresponds. Allowed value is: PT15M (15-minute)",
            "type": "string",
            "enum": [
              "PT15M"
            ]
          },
          "data_access_period": {
            "$ref": "#/components/schemas/MandateDataAccessPeriodDTO"
          },
          "expiration_date": {
            "description": "The expiration date of the mandate in the format: YYYY-MM-DDTHH:MM:SSZ",
            "type": "string"
          },
          "renewal_status": {
            "description": "The renewal status of the mandate. This field will appear 3 months before the mandate expires,\n     to help end users renew their mandate proactively, before it expires. Despite representing the need for renewal,\n     it also showcases the status of the renewal process. Allowed values:<br/>\n     TO_BE_RENEWED: The mandate should be renewed soon.<br/>\n     RENEWAL_REQUESTED: The renewal of the mandate has been requested by the user.<br/>\n     EXPIRED: The mandate has expired and cannot be further renewed. The user will have to request a new mandate to\n     continue receiving the service.",
            "type": "string",
            "enum": [
              "TO_BE_RENEWED",
              "RENEWAL_REQUESTED",
              "EXPIRED"
            ]
          }
        },
        "type": "object"
      },
      "MandateResponseDTO": {
        "required": [
          "status",
          "data"
        ],
        "properties": {
          "status": {
            "description": "The status of the call, it displays “ok” if it is successful.",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/MandateDataDTO"
          }
        },
        "type": "object"
      },
      "ErrorDTO": {
        "properties": {
          "code": {
            "type": "integer"
          },
          "message": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "ErrorResponseDTO": {
        "properties": {
          "status": {
            "type": "string"
          },
          "error": {
            "$ref": "#/components/schemas/ErrorDTO"
          }
        },
        "type": "object"
      }
    },
    "examples": {
      "GetApprovedMandateWithoutRenewalStatus": {
        "summary": "Approved mandate - No expiration within three months",
        "value": {
          "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"
              }
            }
          }
        }
      },
      "GetApprovedMandateWithRenewalStatus": {
        "summary": "Approved mandate - Expiration within three months",
        "value": {
          "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"
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "bearerFormat": "JWT",
        "scheme": "bearer"
      }
    }
  },
  "tags": [
    {
      "name": "Account Status"
    }
  ],
  "x-explorer-enabled": false
}
```