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

# /discovery

Returns if the user has been migrated to Gen 2.0 or not. This API call can be used in order to decide if this
user needs to follow the Gen 1.0 or Gen 2.0 flow. If `migrated` is `true`, then this means the user has been
migrated to Gen 2.0 and the relevant flow should be followed.

# 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/discovery": {
      "get": {
        "tags": [
          "Account Status"
        ],
        "summary": "/discovery",
        "description": "Returns if the user has been migrated to Gen 2.0 or not. This API call can be used in order to decide if this\nuser needs to follow the Gen 1.0 or Gen 2.0 flow. If `migrated` is `true`, then this means the user has been\nmigrated to Gen 2.0 and the relevant flow should be followed.",
        "operationId": "v2getDiscovery",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryResponseDTO"
                },
                "examples": {
                  "DiscoveryResponseMigrated": {
                    "$ref": "#/components/examples/DiscoveryResponseMigrated"
                  },
                  "DiscoveryResponseNotMigrated": {
                    "$ref": "#/components/examples/DiscoveryResponseNotMigrated"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request<br/>999: Unspecified Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "DiscoveryDataDTO": {
        "description": "Contains information about whether a user has been migrated to a new platform and the URL of that platform if\napplicable.",
        "required": [
          "migrated"
        ],
        "properties": {
          "migrated": {
            "description": "Indicates if the user has been migrated to the new platform.",
            "type": "boolean"
          },
          "url": {
            "description": "The URL of the new platform. Only present if `migrated` is `true`.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "DiscoveryResponseDTO": {
        "description": "The response object containing the discovery data.",
        "required": [
          "status",
          "data"
        ],
        "properties": {
          "status": {
            "description": "Indicates the status of the response.",
            "type": "string",
            "enum": [
              "ok"
            ]
          },
          "data": {
            "$ref": "#/components/schemas/DiscoveryDataDTO"
          }
        },
        "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": {
      "DiscoveryResponseMigrated": {
        "summary": "Migrated User",
        "value": {
          "status": "ok",
          "data": {
            "migrated": true,
            "url": "https://api.n2g-gen2-platform.net"
          }
        }
      },
      "DiscoveryResponseNotMigrated": {
        "summary": "Non-Migrated User",
        "value": {
          "status": "ok",
          "data": {
            "migrated": false
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "bearerFormat": "JWT",
        "scheme": "bearer"
      }
    }
  },
  "tags": [
    {
      "name": "Account Status"
    }
  ],
  "x-explorer-enabled": false
}
```