{
  "openapi": "3.0.3",
  "info": {
    "title": "market-report-notification",
    "description": "### ServiceId: BSCMF0120\n\n# API Version - 1.0.0\n#### Generated by ECDM Toolkit version 2.12.1\nWith this REST API a market participant can submit a market report.\n\nThe design of this REST API is generic in nature and offers the possibility to submit different types of reports by ‘key-value’ attributes (also called ‘key-value pair’). The key-value concept is used to deliver this data in an organized and scalable way.\n\nFor the time being, the use of this service is limited to the submission of ELK TMT reports for BSCMF0120.\n# Release History\n\n## 1.0.0 (2025-05-21)\nFinal version\n\n## 0.9.0 (2025-03-18)\nAccess scheme using an API key added.\nVersion for the approval process.\n\n## 0.6.0 (2025-03-06)\nVersion after adding review from MFFBAS API working group.\nAdded new set of HTTP Response codes.\nAdded examples.\n\n## 0.3.0 (2025-02-20)\nVersion for review by MFFBAS BT and MFFBAS API working group.\n\n## 0.1.0 (2025-02-11)\nInitial version for refinement.\n",
    "contact": {
      "name": "EDSN",
      "url": "https://www.edsn.nl",
      "email": "servicedesk@edsn.nl"
    },
    "license": {
      "name": "APACHE2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0"
    },
    "version": "1.0.0",
    "x-releaseDate": "2025-05-21"
  },
  "servers": [
    {
      "url": "/energy-market/data-provision/energy-market/market-report-notification/v1",
      "description": "Default host only has API context, name and version,"
    }
  ],
  "tags": [
    {
      "name": "MarketReport",
      "description": "All operations surrounding MarketReport"
    }
  ],
  "security": [
    {
      "Public": []
    }
  ],
  "paths": {
    "/market-report": {
      "post": {
        "tags": [
          "MarketReport"
        ],
        "summary": "Post figures for a market report",
        "deprecated": false,
        "operationId": "marketReport",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FiguresMarketDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Accepted"
          },
          "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"
                  }
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "422-Error-Example_Ibk73NKq19": {
                    "$ref": "#/components/examples/422-Error-Example_Ibk73NKq19"
                  }
                }
              }
            }
          },
          "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."
        }
      },
      "422-Error-Example_Ibk73NKq19": {
        "summary": "Example of a 422 semantic validation error.",
        "value": {
          "type": "https://cmf.energysector.nl/reference-data/error-catalogue/user-errors/parameter-validation",
          "title": "One or more parameters did not validate correctly.",
          "status": 422,
          "detail": "Conflicting parameters are: A, B, C, D",
          "instance": "urn:uuid:4017fabc-1b28-11e8-accf-0ed5f89f718b",
          "traceID": "00-80e1afed08e019fc1110464cfa66635c-7a085853722dc6d2-01",
          "applicationProblem": [
            {
              "categoryCode": "PARAMETER_VALIDATION_ERROR",
              "severityCode": "ERROR",
              "message": [
                {
                  "identifier": "VAL01",
                  "code": "CONFLICT",
                  "text": "Parameters A and B cannot occur at the same time."
                },
                {
                  "identifier": "VAL12",
                  "code": "VALUE",
                  "text": "Value of parameter C must be greater than value of parameter D."
                },
                {
                  "identifier": "VAL12",
                  "code": "VALUE",
                  "text": "Value of parameter B must be greater than 100"
                }
              ]
            },
            {
              "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."
                }
              ]
            }
          ]
        }
      },
      "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."
        }
      }
    },
    "securitySchemes": {
      "Public": {
        "type": "apiKey",
        "description": "This is an access scheme using an API key passed as a header parameter.",
        "name": "apiKey",
        "in": "header"
      }
    },
    "schemas": {
      "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"
            ]
          },
          "messageList": {
            "title": "ApplicationMessageListType",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationMessage"
            }
          }
        },
        "required": [
          "categoryCode",
          "severityCode"
        ]
      },
      "DateAndOrTime": {
        "title": "DateAndOrTime",
        "description": "The Date and or the Time.",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "dateTime": {
            "title": "DateTimeType",
            "description": "Date and time as per ISO 8601 YYYY-MM-DDThh:mm:ss.sssZ. Is used for the market report period (one whole month) or for calendar dates.\n\nExample for report month June 2026: \nreport period start date time: 2026-05-31T22:00:00Z\nreport period end date time: 2026-06-30T22:00:00Z\n\nExample for calendar date August 12, 2026:\nmetering period start date time: 2026-08-11T22:00:00Z\nmetering period end date time:  2026-08-12T22:00:00Z",
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "dateTime"
        ]
      },
      "FiguresMarketDocument": {
        "title": "FiguresMarketDocument",
        "description": "An electronic document containing the information necessary to satisfy the requirements of a given business process. This is the top level of the market report notification.",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "mrid": {
            "title": "IdType",
            "description": "A unique identification of the market report (UUID).",
            "example": "e3d5ced9-3b0a-4e46-ba55-4cad6cdf2e56",
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "createdDateTime": {
            "title": "DateTimeType",
            "description": "Creation date/time of the market report as per ISO 8601 YYYY-MM-DDThh:mm:ssZ",
            "example": "2026-03-08T11:31:28Z",
            "type": "string",
            "format": "date-time"
          },
          "creator": {
            "$ref": "#/components/schemas/MarketParticipant"
          },
          "figuresReportRefineMarketDocumentList": {
            "title": "FiguresRefineMarketDocumentListType",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FiguresRefineMarketDocument"
            },
            "minItems": 1
          },
          "process": {
            "$ref": "#/components/schemas/Process"
          },
          "reportPeriodEndDateTime": {
            "$ref": "#/components/schemas/DateAndOrTime"
          },
          "reportPeriodStartDateTime": {
            "$ref": "#/components/schemas/DateAndOrTime"
          }
        },
        "required": [
          "mrid",
          "createdDateTime",
          "creator",
          "figuresReportRefineMarketDocumentList",
          "process",
          "reportPeriodEndDateTime",
          "reportPeriodStartDateTime"
        ]
      },
      "FiguresMktActivityRecord": {
        "title": "FiguresMktActivityRecord",
        "description": "Subclass of IEC61968: Common:ActivityRecord.",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "keyDescription": {
            "title": "KeyDescriptionType",
            "description": "The description is a free human readable text describing or naming the object. In this case the key for the identification:",
            "example": "R009",
            "type": "string",
            "minLength": 1,
            "maxLength": 32
          },
          "reasonList": {
            "title": "ReasonListType",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Reason"
            }
          },
          "valueDescription": {
            "title": "ValueDescriptionType",
            "description": "The description is a free human readable text describing or naming the object. In this case the count or volume value:",
            "example": "12",
            "type": "string",
            "minLength": 1,
            "maxLength": 16
          }
        },
        "required": [
          "keyDescription",
          "valueDescription"
        ]
      },
      "FiguresRefineMarketDocument": {
        "title": "FiguresRefineMarketDocument",
        "description": "An electronic document containing the information necessary to satisfy the requirements of a given business process. This is the refine level of the market report notification.",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "figuresMktActivityRecordList": {
            "title": "FiguresMktActivityRecordListType",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FiguresMktActivityRecord"
            },
            "minItems": 1
          },
          "meteringPeriodEndDateTime": {
            "$ref": "#/components/schemas/DateAndOrTime"
          },
          "meteringPeriodStartDateTime": {
            "$ref": "#/components/schemas/DateAndOrTime"
          },
          "refineMktActivityRecordList": {
            "title": "RefineMktActivityRecordListType",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RefineMktActivityRecord"
            },
            "minItems": 1
          },
          "relatedParty": {
            "$ref": "#/components/schemas/MarketParticipant"
          }
        },
        "required": [
          "figuresMktActivityRecordList",
          "refineMktActivityRecordList"
        ]
      },
      "MarketParticipant": {
        "title": "MarketParticipant",
        "description": "The identification of the party participating in energy market business processes.",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "marketRole": {
            "$ref": "#/components/schemas/MarketRole"
          },
          "mrid": {
            "title": "IdType",
            "description": "The identification of a party in the energy market (EAN13).",
            "example": "8716892700004",
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          }
        },
        "required": [
          "marketRole",
          "mrid"
        ]
      },
      "MarketRole": {
        "title": "MarketRole",
        "description": "The identification of the intended behaviour of a market participant played within a given business process.",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "type": {
            "title": "MarketRoleTypeCode",
            "description": "The identification of the role played by a market player (UN 3035 Party function code qualifier).",
            "example": "DDM",
            "type": "string",
            "enum": [
              "BSP",
              "DDK",
              "CSP",
              "DDM",
              "DDQ",
              "MDR",
              "CTO",
              "EZ",
              "CDS",
              "OSP"
            ]
          }
        },
        "required": [
          "type"
        ]
      },
      "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"
          },
          "applicationProblemList": {
            "title": "ApplicationProblemListType",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationProblem"
            }
          }
        },
        "required": [
          "type",
          "title",
          "status"
        ]
      },
      "Process": {
        "title": "Process",
        "description": "The formal identification of the business process in which a flow of information is exchanged.",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "processType": {
            "title": "ProcessTypeCode",
            "description": "The unique identification of the type of market report.",
            "example": "R20.001",
            "type": "string",
            "enum": [
              "R20.001",
              "R20.002",
              "R20.101",
              "R20.102",
              "R20.103",
              "R20.201",
              "R20.202"
            ]
          }
        },
        "required": [
          "processType"
        ]
      },
      "Reason": {
        "title": "Reason",
        "description": "The motivation of an act.",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "code": {
            "title": "ReasonCodeType",
            "description": "The error code as described in the corresponding service description.",
            "example": "651",
            "type": "string",
            "minLength": 1,
            "maxLength": 8
          },
          "rejectionCountText": {
            "title": "IntegerType",
            "description": "The number of rejections for the error code in question.",
            "example": 89,
            "type": "integer"
          }
        },
        "required": [
          "code",
          "rejectionCountText"
        ]
      },
      "RefineMktActivityRecord": {
        "title": "RefineMktActivityRecord",
        "description": "Subclass of IEC61968: Common:ActivityRecord.",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "keyDescription": {
            "title": "KeyDescriptionType",
            "description": "The description is a free human readable text describing or naming the object. In this case the refine key:",
            "example": "reasonRevisionRequest",
            "type": "string",
            "minLength": 1,
            "maxLength": 32
          },
          "valueDescription": {
            "title": "ValueDescriptionType",
            "description": "The description is a free human readable text describing or naming the object. In this case the value:",
            "example": "E0U",
            "type": "string",
            "minLength": 1,
            "maxLength": 16
          }
        },
        "required": [
          "keyDescription",
          "valueDescription"
        ]
      }
    }
  }
}