{
  "openapi": "3.1.0",
  "info": {
    "title": "START_BEEND_RE_MSB (MSB)",
    "version": "202610",
    "description": "Das Ereignis `START_BEEND_RE_MSB` der Marktrolle MSB als eigenständige Spezifikation, abgeleitet aus der Auslöser-API der Formatversion 202610. 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_BEEND_RE_MSB"
    }
  ],
  "paths": {
    "/inbound": {
      "post": {
        "deprecated": false,
        "description": "Trigger-Event **START_BEEND_RE_MSB** der Marktrolle MSB.\n\n**Startet diese Rollensichten** (1):\n\n- [Beendigung Rechnungsabwicklung des Messstellenbetriebes über den LF durch den MSB — MSB-MALO](/prozessdoku/202610/MSB/WiM-Teil1-beendigung-rechnungsabwicklung-des-messstellenbetriebes-ueber-den-lf-durch-den-msb)\n\n<a href=\"/apis/einzeln/202610/msb/START_BEEND_RE_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 104 Rumpfvarianten heraus, damit sie einzeln lesbar und ausprobierbar sind.\n\n</Hinweisbereich>",
        "operationId": "trigger_MSB_START_BEEND_RE_MSB",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MSB_START_BEEND_RE_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_BEEND_RE_MSB (MSB)",
        "tags": [
          "START_BEEND_RE_MSB"
        ],
        "x-actual-endpoint": "POST /inbound",
        "x-event-source": "event/202610/[MSB]_START_BEEND_RE_MSB.yaml",
        "x-handbuchsatz": true
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "type": "http"
      }
    },
    "schemas": {
      "Abonnement": {
        "description": "Abonnement",
        "enum": [
          "START_ABO",
          "ENDE_ABO",
          "OHNE_ABO"
        ],
        "title": "Abonnement",
        "type": "string"
      },
      "Anfragegrund": {
        "description": "Anfragegrund",
        "enum": [
          "ABGRENZUNG_VON_ENERGIEMENGEN",
          "ABGRENZUNG",
          "WECHSELEREIGNIS",
          "ZWISCHENABLESUNG",
          "DIREKTER_VERTRAG_MSB_AN",
          "DIREKTER_VERTRAG_MSB_ANN",
          "AENDERUNG_IM_LOKATIONSBUENDEL",
          "NEUKONFIGURATION",
          "KONFIGURATION_UNVERAENDERT"
        ],
        "title": "Anfragegrund",
        "type": "string"
      },
      "MSB_START_BEEND_RE_MSB": {
        "properties": {
          "stammdaten": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PI_17006__stammdaten"
              }
            ]
          },
          "transaktionsdaten": {
            "properties": {
              "pruefidentifikator": {
                "description": "Wird dynamisch im Event-Prozess ermittelt. Ein vom Sender mitgegebener Wert wird ignoriert. Im Topic mögliche Prüfis — 17006.",
                "examples": [
                  "17006"
                ]
              }
            },
            "type": "object"
          },
          "zusatzdaten": {
            "properties": {
              "eventname": {
                "const": "START_BEEND_RE_MSB",
                "default": "START_BEEND_RE_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."
        }
      },
      "PI_17006__stammdaten": {
        "properties": {
          "ANFRAGE": {
            "items": {
              "$ref": "#/components/schemas/PI_17006__stammdaten__ANFRAGE"
            },
            "type": "array"
          },
          "AUFTRAG": {
            "items": {
              "$ref": "#/components/schemas/PI_17006__stammdaten__AUFTRAG"
            },
            "type": "array"
          }
        },
        "required": [
          "ANFRAGE",
          "AUFTRAG"
        ],
        "type": "object",
        "title": "17006"
      },
      "PI_17006__stammdaten__ANFRAGE": {
        "properties": {
          "abonnement": {
            "$ref": "#/components/schemas/abonnement",
            "x-edifact-segment": [
              "IMD++Z02"
            ]
          },
          "lokationsId": {
            "$ref": "#/components/schemas/lokationsId",
            "x-edifact-segment": [
              "SG2.NAD+DP.LOC+172"
            ]
          }
        },
        "required": [
          "abonnement",
          "lokationsId"
        ],
        "type": "object"
      },
      "PI_17006__stammdaten__AUFTRAG": {
        "properties": {
          "ausfuehrungsdatum": {
            "$ref": "#/components/schemas/ausfuehrungsdatum",
            "x-edifact-segment": [
              "DTM+203"
            ]
          },
          "positionsdaten": {
            "items": {
              "$ref": "#/components/schemas/PI_17006__stammdaten__AUFTRAG__positionsdaten"
            },
            "type": "array"
          }
        },
        "required": [
          "ausfuehrungsdatum"
        ],
        "type": "object"
      },
      "PI_17006__stammdaten__AUFTRAG__positionsdaten": {
        "properties": {
          "anfragegrund": {
            "$ref": "#/components/schemas/anfragegrund",
            "x-edifact-segment": [
              "SG29.LIN.IMD++[Z61|Z62|Z63]"
            ]
          }
        },
        "type": "object"
      },
      "abonnement": {
        "$ref": "#/components/schemas/Abonnement",
        "description": "Start oder Ende Abo",
        "x-descriptions": {
          "EN": "Start or end of subscription"
        }
      },
      "anfragegrund": {
        "$ref": "#/components/schemas/Anfragegrund"
      },
      "ausfuehrungsdatum": {
        "description": "Das Ausführungsdatum beschreibt zu welchem Zeitpunkt ein Auftrag ausgeführt werden soll.",
        "format": "date-time",
        "type": "string"
      },
      "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"
      },
      "lokationsId": {
        "description": "Für welche Markt- oder Messlokation gilt diese Anfrage.",
        "type": "string"
      }
    }
  }
}