{
  "openapi": "3.0.3",
  "info": {
    "title": "incident-management",
    "description": "### ServiceId: BSCMF0101\n\n# API Version - 1.0.0\n#### Generated by ECDM Toolkit version 2.12.3\nService to manage the incidents of a smart meter of the requested accounting point. Currently, this version of the service supports the retrieval (request) of smart meter incidents only.\n# Release History\n\n## 1.0.0 (2025-07-02)\nFinal version after approval\n\n## 0.8.0 (2025-05-13)\nName change from incidents-retrieval into incidents-management\n\n## 0.7.0 (2025-01-24)\nNew datamodel according class incidents\n\n## 0.6.0 (2024-04-02)\nVersion for BT MFFBAS\n\n## 0.4.0 (2024-03-04)\nUpdated version after review BT MFFBAS\n\n## 0.3.0 (2024-02-29)\nVersion for review BT MFFBAS\n\n## 0.1.0 (2024-02-08)\nFirst draft\n",
    "contact": {
      "name": "EDSN B.V.",
      "url": "https://www.edsn.nl",
      "email": "servicedesk@edsn.nl"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0"
    },
    "version": "1.0.0",
    "x-releaseDate": "2025-07-02"
  },
  "servers": [
    {
      "url": "/energy-grid/energy-grid/meter/incident-management/v1",
      "description": "Default host only has API context, name and version,"
    }
  ],
  "tags": [
    {
      "name": "Manage",
      "description": "With this service the incidents of a smart meter of an accounting point can be managed"
    }
  ],
  "paths": {
    "/incidents": {
      "get": {
        "summary": "Get incident",
        "description": "With this operation incidents of a smart meter of an accounting point can be retrieved",
        "deprecated": false,
        "operationId": "incidentRetrieval",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "description": "Type of incident",
            "required": true,
            "deprecated": false,
            "allowReserved": false,
            "style": "form",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 6
            },
            "example": "METER"
          },
          {
            "name": "accounting-point-id",
            "in": "query",
            "description": "The EAN18 of the accounting point",
            "required": true,
            "deprecated": false,
            "allowReserved": false,
            "style": "form",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{18}$"
            },
            "example": "871687120060458579"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Incident"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "400-Error-Example_PEuXgnxlBq": {
                    "$ref": "#/components/examples/400-Error-Example_PEuXgnxlBq"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "401-Error-Example_Ox7hMSgI9k": {
                    "$ref": "#/components/examples/401-Error-Example_Ox7hMSgI9k"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "403-Error-Example_NdO9U7i48s": {
                    "$ref": "#/components/examples/403-Error-Example_NdO9U7i48s"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "404-Error-Example_JiWhNGZvci": {
                    "$ref": "#/components/examples/404-Error-Example_JiWhNGZvci"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/application+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "500-Error-Example_QFdLoQTMMS": {
                    "$ref": "#/components/examples/500-Error-Example_QFdLoQTMMS"
                  }
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "503-Error-Example_CCVKUXhRzA": {
                    "$ref": "#/components/examples/503-Error-Example_CCVKUXhRzA"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "examples": {
      "400-Error-Example_PEuXgnxlBq": {
        "summary": "Example of a 400 syntax error.",
        "value": {
          "type": "https://cmf.energysector.nl/reference-data/error-catalogue/user-errors/bad-request",
          "title": "Request contains syntax errors.",
          "status": 400,
          "detail": "Parameter- and payload syntax errors prevented the request from being processed.",
          "instance": "urn:uuid:4017fabc-1b28-11e8-accf-0ed5f89f718b",
          "traceID": "00-80e1afed08e019fc1110464cfa66635c-7a085853722dc6d2-01",
          "applicationProblem": [
            {
              "categoryCode": "SYNTAX_ERROR",
              "severityCode": "ERROR",
              "message": [
                {
                  "identifier": "ERR01",
                  "code": "MISSING",
                  "text": "Required parameters A and B are missing."
                },
                {
                  "identifier": "ERR03",
                  "code": "SCHEMA_ERROR",
                  "text": "Class C1 contains unrecognized attributes A1 and A2."
                },
                {
                  "identifier": "ERR02",
                  "code": "MISSING",
                  "text": "Required instance of class C2 is missing from payload."
                }
              ]
            },
            {
              "categoryCode": "RESULT_SET_SIZE",
              "severityCode": "WARNING",
              "message": [
                {
                  "identifier": "WRN03",
                  "code": "RESULT_SET",
                  "text": "Specified parameters may result in a very large result-set, not all results might be available."
                }
              ]
            }
          ]
        }
      },
      "401-Error-Example_Ox7hMSgI9k": {
        "summary": "Example of a 401 authentication error",
        "value": {
          "type": "https://cmf.energysector.nl/reference-data/error-catalogue/default/http-401",
          "title": "Unauthorized.",
          "status": 401,
          "detail": "No access to requested resource."
        }
      },
      "403-Error-Example_NdO9U7i48s": {
        "summary": "Example of a 403 authorization error.",
        "value": {
          "type": "https://cmf.energysector.nl/reference-data/error-catalogue/default/http-403",
          "title": "Forbidden.",
          "status": 403,
          "detail": "Requester has no permission to perform the requested operation."
        }
      },
      "404-Error-Example_JiWhNGZvci": {
        "summary": "Example of a 404 not found error.",
        "value": {
          "type": "https://cmf.energysector.nl/reference-data/error-catalogue/default/http-404",
          "title": "Not found.",
          "status": 404,
          "detail": "Requested resource R1 could not be found."
        }
      },
      "500-Error-Example_QFdLoQTMMS": {
        "summary": "Example of a 500 server error.",
        "value": {
          "type": "https://cmf.energysector.nl/reference-data/error-catalogue/default/http-500",
          "title": "Internal Server Error",
          "status": 500,
          "detail": "Application encountered a fatal exception."
        }
      },
      "503-Error-Example_CCVKUXhRzA": {
        "summary": "Example of a 503 service unavailable error.",
        "value": {
          "type": "https://cmf.energysector.nl/reference-data/error-catalogue/default/http-503",
          "title": "Service Unavailable.",
          "status": 503,
          "detail": "Requested endpoint is unreachable at this time."
        }
      }
    },
    "schemas": {
      "ActivityRecord": {
        "title": "ActivityRecord",
        "description": "Activity record",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "status": {
            "title": "IncidentStatusCode",
            "description": "The value for the status.\n014.0  Visit is planned\n014.1  Incident is reported and analysed\n014.2  Customer is informed \n014.3  Help needed from Energy Supplier/ODA for planning customer appointment\n014.4  Visit confirmed\n014.5  Solution is being tested",
            "example": "014.1",
            "type": "string",
            "enum": [
              "014.0",
              "014.1",
              "014.2",
              "014.3",
              "014.4",
              "014.5"
            ]
          }
        },
        "required": [
          "status"
        ]
      },
      "ApplicationMessage": {
        "title": "ApplicationMessage",
        "description": "Each ApplicationProblem object can be associated with an array of error messages, represented by ApplicationMessage objects.",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "identifier": {
            "title": "IdentifierType",
            "description": "A unique, application-specific identification of the message.",
            "example": "VAL01",
            "type": "string"
          },
          "code": {
            "title": "CodeListCodeType",
            "description": "An application-specific message code.",
            "example": "PARAM_CONFLICT",
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "content": {
                "title": "NormalizedString",
                "type": "string"
              },
              "_codeListName": {
                "title": "NormalizedString",
                "type": "string"
              },
              "_codeListVersion": {
                "title": "NormalizedString",
                "type": "string"
              }
            },
            "required": [
              "content"
            ]
          },
          "text": {
            "title": "TextType",
            "description": "Provides a detailed description of the error.",
            "example": "Parameters A and B can not occur at the same time.",
            "type": "string"
          }
        },
        "required": [
          "text"
        ]
      },
      "ApplicationProblem": {
        "title": "ApplicationProblem",
        "description": "The ApplicationProblem object provides an extension mechanism for the definition of more complex, structured error messages. It defines an array of error messages associated with a severity- and application-specific error code.",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "categoryCode": {
            "title": "CodeListCodeType",
            "description": "An application-specific error category code.",
            "example": "PARAMETER_VALIDATION_ERROR",
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "content": {
                "title": "NormalizedString",
                "type": "string"
              },
              "_codeListName": {
                "title": "NormalizedString",
                "type": "string"
              },
              "_codeListVersion": {
                "title": "NormalizedString",
                "type": "string"
              }
            },
            "required": [
              "content"
            ]
          },
          "severityCode": {
            "title": "ProblemSeverityCodeType",
            "description": "Identifies the severity of the error.",
            "example": "ERROR",
            "type": "string",
            "default": "ERROR",
            "enum": [
              "INFORMATION",
              "WARNING",
              "ERROR",
              "CRITICAL_ERROR"
            ]
          },
          "message": {
            "title": "ApplicationMessage",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationMessage"
            }
          }
        },
        "required": [
          "categoryCode",
          "severityCode"
        ]
      },
      "Incident": {
        "title": "Incident",
        "description": "Incident",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "activityRecord": {
            "$ref": "#/components/schemas/ActivityRecord"
          },
          "createdDateTime": {
            "title": "DateTimeType",
            "description": "Creation date/time of the incident as per ISO 8601 YYYY-MM-DDThh:mm:ssZ",
            "example": "2028-01-31T08:35:00Z",
            "type": "string",
            "format": "date-time"
          },
          "meter": {
            "$ref": "#/components/schemas/Meter"
          }
        },
        "required": [
          "activityRecord",
          "createdDateTime",
          "meter"
        ]
      },
      "Meter": {
        "title": "Meter",
        "description": "Meter",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "referencedAccountingPoint": {
            "$ref": "#/components/schemas/ReferencedAccountingPoint"
          }
        },
        "required": [
          "referencedAccountingPoint"
        ]
      },
      "ProblemDetails": {
        "title": "ProblemDetails",
        "description": "The ProblemDetails error response object represents an application error that is compliant with the RFC9457 Problem Details specification.",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "type": {
            "title": "NormalizedString",
            "description": "The type member is a JSON string containing a URI reference that identifies the problem type. Consumers MUST use the type URI (after resolution, if necessary) as the problem type's primary identifier.\n\nWhen this member is not present, its value is assumed to be about:blank.\n\nIf the type URI is a locator (e.g., those with an http or https scheme), dereferencing it SHOULD provide human-readable documentation for the problem type (e.g., using HTML). However, consumers SHOULD NOT automatically dereference the type URI, unless they do so when providing information to developers (e.g., when a debugging tool is in use).",
            "example": "https://standards.edsn.nl/REST/error-catalogue/user-errors/parameter-validation",
            "type": "string"
          },
          "title": {
            "title": "NameType",
            "description": "The title member is a JSON string containing a short, human-readable summary of the problem type.\n\nIt SHOULD NOT change from occurrence to occurrence of the problem, except for localization (e.g., using proactive content negotiation).",
            "example": "One or more parameters did not validate correctly",
            "type": "string"
          },
          "status": {
            "title": "IntegerType",
            "description": "The status member is a JSON number indicating the HTTP status code generated by the origin server for this occurrence of the problem.\n\nThe status member conveys the HTTP status code used for the convenience of the consumer. Generators MUST use the same status code in the actual HTTP response, to assure that generic HTTP software that does not understand this format still behaves correctly.\n\nConsumers can use the status member to determine what the original status code used by the generator was when it has been changed (e.g., by an intermediary or cache) and when a message's content is persisted without HTTP information. Generic HTTP software will still use the HTTP status code.",
            "example": 400,
            "type": "integer"
          },
          "detail": {
            "title": "TextType",
            "description": "The detail member is a JSON string containing a human-readable explanation specific to this occurrence of the problem.\n\nThe detail string, if present, ought to focus on helping the client correct the problem, rather than giving debugging information.\n\nConsumers SHOULD NOT parse the detail member for information; extensions are more suitable and less error-prone ways to obtain such information.",
            "example": "Conflicting parameters are: A, B, C, D",
            "type": "string"
          },
          "instance": {
            "title": "TextType",
            "description": "The instance member is a JSON string containing a URI reference that identifies the specific occurrence of the problem.\nWhen the instance URI is dereferenceable, the problem details object can be fetched from it. It might also return information about the problem occurrence in other formats through use of proactive content negotiation.\nWhen the instance URI is not dereferenceable, it serves as a unique identifier for the problem occurrence that may be of significance to the server but is opaque to the client.",
            "example": "urn:uuid:4017fabc-1b28-11e8-accf-0ed5f89f718b",
            "type": "string"
          },
          "traceId": {
            "title": "IdentifierType",
            "description": "This field provides an OpenTelemetry compliant trace identifier that can be used to correlate related (error) messages. The field is constructed as follows:\n{version}-{trace_id}-{span_id}-{trace_flags}\nIn which:\nversion = version of this trace;\ntrace-id = identification of a single trace (i.e. associated series of messages);\nspan-id = identification of a series of correlated messages within a single trace;\ntrace-flags = additional information.",
            "example": "00-80e1afed08e019fc1110464cfa66635c-7a085853722dc6d2-01",
            "type": "string"
          },
          "applicationProblem": {
            "title": "ApplicationProblem",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationProblem"
            }
          }
        },
        "required": [
          "type",
          "title",
          "status"
        ]
      },
      "ReferencedAccountingPoint": {
        "title": "ReferencedAccountingPoint",
        "description": "An administrative point where energy supplier change can take place and for which commercial business processes are defined",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "mrid": {
            "title": "Ean18Type",
            "description": "The EAN18 of the accounting point",
            "example": "871687120060458579",
            "type": "string",
            "pattern": "^[0-9]{18}$"
          }
        },
        "required": [
          "mrid"
        ]
      }
    }
  }
}