{
  "openapi": "3.1.0",
  "info": {
    "title": "START_ENDE_MSB (MSB)",
    "version": "202604",
    "description": "Das Ereignis `START_ENDE_MSB` der Marktrolle MSB als eigenständige Spezifikation, abgeleitet aus der Auslöser-API der Formatversion 202604. Genau ein Pfad: `POST /inbound`; das Ereignis ergibt sich aus `zusatzdaten.eventname` im Rumpf."
  },
  "servers": [
    {
      "description": "Fake Env",
      "url": "https://api.macoapp.de"
    }
  ],
  "tags": [
    {
      "name": "START_ENDE_MSB"
    }
  ],
  "paths": {
    "/inbound": {
      "post": {
        "deprecated": false,
        "description": "Trigger-Event **START_ENDE_MSB** der Marktrolle MSB.\n\n**Startet diese Rollensichten** (1):\n\n- [Ende Messstellenbetrieb — MSBA](/prozessdoku/202604/MSB--MSBA/WiM-Teil1-ende-messstellenbetrieb)\n\n<a href=\"/apis/einzeln/202604/msb/START_ENDE_MSB.json\" data-maco=\"einzelschema\" download target=\"_blank\">Schema nur dieses Ereignisses herunterladen</a> (OpenAPI, JSON).\n\n<Hinweisbereich>\n\nDer Aufruf geht tatsächlich an `POST /inbound`; das Event ergibt sich aus `zusatzdaten.eventname` im Rumpf. Diese Seite trennt eine von 105 Rumpfvarianten heraus, damit sie einzeln lesbar und ausprobierbar sind.\n\n</Hinweisbereich>",
        "operationId": "trigger_MSB_START_ENDE_MSB",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MSB_START_ENDE_MSB"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/event_responses_success"
                }
              }
            },
            "description": "Erfolg | Success"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/event_response_fail"
                }
              }
            },
            "description": "Fehler | Fail"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "START_ENDE_MSB (MSB)",
        "tags": [
          "START_ENDE_MSB"
        ],
        "x-actual-endpoint": "POST /inbound",
        "x-event-source": "event/202604/[MSB]_START_ENDE_MSB.yaml",
        "x-handbuchsatz": true
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "type": "http"
      }
    },
    "schemas": {
      "MSB_START_ENDE_MSB": {
        "properties": {
          "stammdaten": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PI_55051__stammdaten"
              }
            ]
          },
          "transaktionsdaten": {
            "properties": {
              "pruefidentifikator": {
                "description": "Wird dynamisch im Event-Prozess ermittelt (Entscheidungsgrundlage: sparte). Ein vom Sender mitgegebener Wert wird ignoriert. Im Topic mögliche Prüfis — 44051, 55051.",
                "examples": [
                  "44051",
                  "55051"
                ]
              }
            },
            "type": "object"
          },
          "zusatzdaten": {
            "properties": {
              "eventname": {
                "const": "START_ENDE_MSB",
                "default": "START_ENDE_MSB",
                "type": "string"
              },
              "prozessId": {
                "type": "string"
              }
            },
            "required": [
              "prozessId",
              "eventname"
            ],
            "type": "object"
          }
        },
        "required": [
          "stammdaten",
          "transaktionsdaten",
          "zusatzdaten"
        ],
        "type": "object",
        "x-pending-dmn": {
          "reason": "Kein Eintrag in S_EVENT_VARIABLEN.dmn — der Prozess setzt für dieses Event keine Variablen. Der Pflichtsatz von transaktionsdaten ist damit nicht bestimmbar und bleibt offen, bis die DMN-Zeile existiert."
        },
        "x-pending-pruefis": [
          "44051"
        ],
        "x-unresolved-routing": [
          {
            "conditions": [
              "${sparte==\"GAS\"}",
              "${sparte==\"STROM\"}"
            ],
            "discriminates": true,
            "selects-pruefis": [
              "44051",
              "55051"
            ],
            "variable": "sparte"
          }
        ]
      },
      "PI_55051__stammdaten": {
        "properties": {
          "MESSLOKATION": {
            "items": {
              "$ref": "#/components/schemas/PI_55051__stammdaten__MESSLOKATION"
            },
            "type": "array"
          },
          "NETZNUTZUNGSVERTRAG": {
            "items": {
              "$ref": "#/components/schemas/PI_55051__stammdaten__NETZNUTZUNGSVERTRAG"
            },
            "type": "array"
          }
        },
        "required": [
          "MESSLOKATION"
        ],
        "type": "object",
        "title": "55051"
      },
      "PI_55051__stammdaten__MESSLOKATION": {
        "properties": {
          "messlokationsId": {
            "$ref": "#/components/schemas/messlokationsId",
            "x-edifact-segment": [
              "SG4.IDE+24.SG5.LOC+Z17"
            ]
          }
        },
        "required": [
          "messlokationsId"
        ],
        "type": "object"
      },
      "PI_55051__stammdaten__NETZNUTZUNGSVERTRAG": {
        "properties": {
          "vertragsbeginn": {
            "$ref": "#/components/schemas/vertragsbeginn",
            "x-edifact-segment": [
              "SG4.IDE+24.DTM+92"
            ]
          },
          "vertragsende": {
            "$ref": "#/components/schemas/vertragsende",
            "x-edifact-segment": [
              "SG4.IDE+24.DTM+93"
            ]
          }
        },
        "type": "object"
      },
      "event_response_fail": {
        "description": "Fehlermeldung auf Prozessdaten API Aufruf | Error message on process data API call",
        "properties": {
          "errorCode": {
            "description": "Error identifier",
            "example": "400",
            "type": "string"
          },
          "message": {
            "description": "Technische Meldung | Technische Meldung",
            "example": "Validation Failed",
            "type": "string"
          }
        },
        "type": "object"
      },
      "event_responses_success": {
        "description": "Erfolgsmeldung auf Prozessdaten API Aufruf | Success message on process data API call",
        "properties": {
          "businessKey": {
            "description": "Einzigartige Kennung des Geschäftsprozesses | Unique identifier of the business process",
            "format": "uuid",
            "type": "string"
          },
          "message": {
            "description": "Nachricht mit Details zum ausgelösten Event | Message with details about the triggered event",
            "example": "received event XXXXXXXXXXXX with id at 2024-08-08T12:58:22Z and started process with businessKey 4c7170ed-3518-41ee-8582-39ab65b00107",
            "type": "string"
          }
        },
        "required": [
          "businessKey",
          "message"
        ],
        "type": "object"
      },
      "messlokationsId": {
        "description": "Die Messlokations-Identifikation. Das ist die frühere Zählpunktbezeichnung,\nz.B. DE 47108151234567",
        "type": "string"
      },
      "vertragsbeginn": {
        "description": "Gibt an, wann der Vertrag beginnt.",
        "format": "date-time",
        "type": "string"
      },
      "vertragsende": {
        "description": "Datum Vertragsende / DTM+93",
        "format": "date-time",
        "type": "string"
      }
    }
  }
}