{
  "openapi": "3.1.0",
  "info": {
    "title": "START_GESCHAEFTSDATENANFRAGE (LF)",
    "version": "202610",
    "description": "Das Ereignis `START_GESCHAEFTSDATENANFRAGE` der Marktrolle LF 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_GESCHAEFTSDATENANFRAGE"
    }
  ],
  "paths": {
    "/inbound": {
      "post": {
        "deprecated": false,
        "description": "Trigger-Event **START_GESCHAEFTSDATENANFRAGE** der Marktrolle LF.\n\n**Startet diese Rollensichten** (2):\n\n- [Geschäftsdatenanfrage — LF](/prozessdoku/202610/LF/GPKE-Teil4-geschaeftsdatenanfrage)\n- [Geschäftsdatenanfrage vom LF an NB — LF](/prozessdoku/202610/LF/geli-gas-2-0-geschaftsdatenanfrage-vom-lf-an-nb)\n\n<a href=\"/apis/einzeln/202610/lf/START_GESCHAEFTSDATENANFRAGE.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_LF_START_GESCHAEFTSDATENANFRAGE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LF_START_GESCHAEFTSDATENANFRAGE"
              }
            }
          }
        },
        "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_GESCHAEFTSDATENANFRAGE (LF)",
        "tags": [
          "START_GESCHAEFTSDATENANFRAGE"
        ],
        "x-actual-endpoint": "POST /inbound",
        "x-event-source": "event/202610/[LF]_START_GESCHAEFTSDATENANFRAGE.yaml",
        "x-handbuchsatz": true
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "type": "http"
      }
    },
    "schemas": {
      "Anfragekategorie": {
        "description": "Anfragekategorie",
        "enum": [
          "PROZESSDATENBERICHT",
          "GERAETEUEBERNAHME",
          "WEITERVERPFLICHTUNG_BETRIEB_MELO",
          "AENDERUNG_MELO",
          "STAMMDATEN_MALO_ODER_MELO",
          "BILANZIERTE_MENGE_MEHR_MINDER_MENGEN",
          "ALLOKATIONSLISTE_MEHR_MINDER_MENGEN",
          "ENERGIEMENGE_UND_LEISTUNGSMAXIMUM",
          "ABRECHNUNG_MESSSTELLENBETRIEB_MSB_AN_LF",
          "AENDERUNG_PROGNOSEGRUNDLAGE_GERAETEKONFIGURATION",
          "AENDERUNG_GERAETEKONFIGURATION",
          "REKLAMATION_VON_WERTEN",
          "LASTGANG_MALO_TRANCHE",
          "SPERRUNG",
          "ENTSPERRUNG",
          "REKLAMATION_ZAEHLZEITDEFINITION",
          "ZEITREIHEN_IM_RAHMEN_BILANZKREISABRECHNUNG",
          "GERAETEWECHSELABSICHT",
          "AENDERUNG_KONZESSIONSABGABE",
          "AENDERUNG_ZAEHLZEITDEFINITION",
          "UEBERMITTLUNG_WERTE_AN_ESA",
          "AENDERUNG",
          "BILANZKREISZUORDNUNGSLISTE",
          "CLEARINGLISTE",
          "NORMIERTES_PROFIL_PROFILSCHAR",
          "REDISPATCH_EINZELZEITREIHE_AUSFALLARBEIT",
          "REKLAMATION_PROFIL_PROFILSCHAR",
          "STAMMDATEN_MALO",
          "STAMMDATEN_MELO",
          "STAMMDATEN_TRANCHE",
          "BEENDIGUNG_EINER_KONFIGURATION",
          "BESTELLUNG_EINER_KONFIGURATION",
          "BESTELLUNG_EINES_ANGEBOTS_EINER_KONFIGURATION",
          "REKLAMATION_EINER_KONFIGURATION",
          "BESTELLUNG_AENDERUNG_NETZENTGELTE_NETZORIENTIERTER_STEUERUNGSMOEGLICHKEIT",
          "AENDERUNG_DER_TECHNIK_DER_LOKATION",
          "AENDERUNG_INDIVIDUELLER_KONFIGURATION",
          "BESTELLUNG_AENDERUNG_ABRECHNUNGSDATEN",
          "EINRICHTUNG_KONFIGURATION_AUFGRUND_ZUORDNUNG_LF",
          "REKLAMATION_DEFINITION",
          "BESTELLUNG_ANGEBOT_AENDERUNG_TECHNIK_LOKATION"
        ],
        "title": "Anfragekategorie",
        "type": "string"
      },
      "Anfragetyp": {
        "description": "Anfragetyp",
        "enum": [
          "KAUF",
          "NUTZUNGSUEBERLASSUNG",
          "ABRECHNUNGSBRENNWERT_UND_ZUSTANDSZAHL",
          "LASTGANGDATEN",
          "ZAEHLERSTAENDE",
          "WERTEERMITTLUNG",
          "ENERGIEMENGE_EINZELWERT",
          "INNERHALB_DER_ARBEITSZEIT",
          "AUCH_AUSSERHALB_DER_ARBEITSZEIT",
          "WECHSEL_SAEMTLICHER_EINRICHTUNGEN",
          "TEILWEISER_WECHSEL",
          "AENDERUNG_ZAEHLZEITDEFINITION",
          "ABBESTELLUNG_ZAEHLZEITEN",
          "ABBESTELLUNG_MESSPRODUKT",
          "ANGEBOT_AUF_BASIS_PREISBLATT",
          "INDIVIDUELLES_ANGEBOT",
          "AENDERUNG_KONFIGURATION",
          "KANN_NICHT_ANGEBOTEN_WERDEN",
          "NEUKONFIGURATION",
          "BEENDIGUNG_KONFIGURATION",
          "AKTIVIERUNG_KONFIGURATION"
        ],
        "title": "Anfragetyp",
        "type": "string"
      },
      "LF_START_GESCHAEFTSDATENANFRAGE": {
        "properties": {
          "stammdaten": {
            "anyOf": [
              {
                "properties": {
                  "ANFRAGE": {
                    "type": "array",
                    "items": {
                      "properties": {
                        "anfragekategorie": {
                          "description": "Kategorie der Anfrage (ORDERS ORDRSP BGM 1001)",
                          "enum": [
                            "PROZESSDATENBERICHT",
                            "GERAETEUEBERNAHME",
                            "WEITERVERPFLICHTUNG_BETRIEB_MELO",
                            "AENDERUNG_MELO",
                            "STAMMDATEN_MALO_ODER_MELO",
                            "BILANZIERTE_MENGE_MEHR_MINDER_MENGEN",
                            "ALLOKATIONSLISTE_MEHR_MINDER_MENGEN",
                            "ENERGIEMENGE_UND_LEISTUNGSMAXIMUM",
                            "ABRECHNUNG_MESSSTELLENBETRIEB_MSB_AN_LF",
                            "AENDERUNG_PROGNOSEGRUNDLAGE_GERAETEKONFIGURATION",
                            "AENDERUNG_GERAETEKONFIGURATION",
                            "REKLAMATION_VON_WERTEN",
                            "LASTGANG_MALO_TRANCHE",
                            "SPERRUNG",
                            "ENTSPERRUNG",
                            "REKLAMATION_ZAEHLZEITDEFINITION",
                            "ZEITREIHEN_IM_RAHMEN_BILANZKREISABRECHNUNG",
                            "GERAETEWECHSELABSICHT",
                            "AENDERUNG_KONZESSIONSABGABE",
                            "AENDERUNG_ZAEHLZEITDEFINITION",
                            "UEBERMITTLUNG_WERTE_AN_ESA",
                            "AENDERUNG",
                            "BILANZKREISZUORDNUNGSLISTE",
                            "CLEARINGLISTE",
                            "NORMIERTES_PROFIL_PROFILSCHAR",
                            "REDISPATCH_EINZELZEITREIHE_AUSFALLARBEIT",
                            "REKLAMATION_PROFIL_PROFILSCHAR",
                            "STAMMDATEN_MALO",
                            "STAMMDATEN_MELO",
                            "STAMMDATEN_TRANCHE",
                            "BEENDIGUNG_EINER_KONFIGURATION",
                            "BESTELLUNG_EINER_KONFIGURATION",
                            "BESTELLUNG_EINES_ANGEBOTS_EINER_KONFIGURATION",
                            "REKLAMATION_EINER_KONFIGURATION",
                            "BESTELLUNG_AENDERUNG_NETZENTGELTE_NETZORIENTIERTER_STEUERUNGSMOEGLICHKEIT",
                            "AENDERUNG_DER_TECHNIK_DER_LOKATION",
                            "AENDERUNG_INDIVIDUELLER_KONFIGURATION",
                            "BESTELLUNG_AENDERUNG_ABRECHNUNGSDATEN",
                            "EINRICHTUNG_KONFIGURATION_AUFGRUND_ZUORDNUNG_LF",
                            "REKLAMATION_DEFINITION",
                            "BESTELLUNG_ANGEBOT_AENDERUNG_TECHNIK_LOKATION"
                          ],
                          "title": "Anfragekategorie",
                          "type": "string",
                          "x-edifact-segment": [
                            "BGM+[7|Z28|Z48]"
                          ],
                          "x-process-routing": [
                            {
                              "conditions": [
                                "${anfragekategorie==\"PROZESSDATENBERICHT\" or anfragekategorie==\"ENERGIEMENGE_UND_LEISTUNGSMAXIMUM\" or  anfragekategorie==\"LASTGANG_MALO_TRANCHE\"}"
                              ],
                              "selects-pruefi": "17102",
                              "source": "$.stammdaten.ANFRAGE[0].anfragekategorie",
                              "variable": "anfragekategorie"
                            }
                          ]
                        },
                        "anfragetyp": {
                          "$ref": "#/components/schemas/anfragetyp",
                          "x-edifact-segment": [
                            "IMD++[Z11|Z12|Z35]"
                          ]
                        },
                        "lokationsId": {
                          "$ref": "#/components/schemas/lokationsId",
                          "x-edifact-segment": [
                            "SG2.NAD+DP.LOC+172"
                          ]
                        }
                      },
                      "required": [
                        "anfragekategorie",
                        "lokationsId"
                      ],
                      "type": "object"
                    }
                  },
                  "AUFTRAG": {
                    "items": {
                      "$ref": "#/components/schemas/PI_17102__stammdaten__AUFTRAG"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "ANFRAGE",
                  "AUFTRAG"
                ],
                "type": "object",
                "title": "17102"
              },
              {
                "properties": {
                  "ANFRAGE": {
                    "type": "array",
                    "items": {
                      "properties": {
                        "lokationsId": {
                          "$ref": "#/components/schemas/lokationsId",
                          "x-edifact-segment": [
                            "SG2.NAD+DP.LOC+172"
                          ]
                        },
                        "anfragekategorie": {
                          "$ref": "#/components/schemas/anfragekategorie",
                          "x-process-routing": [
                            {
                              "conditions": [
                                "${anfragekategorie==\"STAMMDATEN_MALO_ODER_MELO\"}"
                              ],
                              "selects-pruefi": "17132",
                              "source": "$.stammdaten.ANFRAGE[0].anfragekategorie",
                              "variable": "anfragekategorie"
                            }
                          ]
                        }
                      },
                      "required": [
                        "lokationsId",
                        "anfragekategorie"
                      ],
                      "type": "object"
                    }
                  }
                },
                "required": [
                  "ANFRAGE"
                ],
                "type": "object",
                "title": "17132"
              }
            ]
          },
          "transaktionsdaten": {
            "properties": {
              "absender": {
                "properties": {
                  "rollencodenummer": {
                    "$ref": "#/components/schemas/rollencodenummer"
                  }
                },
                "type": "object"
              },
              "empfaenger": {
                "properties": {
                  "rollencodenummer": {
                    "$ref": "#/components/schemas/rollencodenummer"
                  }
                },
                "type": "object"
              },
              "kategorie": {
                "$ref": "#/components/schemas/kategorie"
              },
              "pruefidentifikator": {
                "description": "Wird dynamisch im Event-Prozess ermittelt (Entscheidungsgrundlage: anfragekategorie). Ein vom Sender mitgegebener Wert wird ignoriert. Im Topic mögliche Prüfis — 17102, 17132.",
                "examples": [
                  "17102",
                  "17132"
                ]
              },
              "sparte": {
                "$ref": "#/components/schemas/sparte"
              }
            },
            "required": [
              "absender",
              "empfaenger",
              "kategorie",
              "sparte"
            ],
            "type": "object"
          },
          "zusatzdaten": {
            "properties": {
              "eventname": {
                "const": "START_GESCHAEFTSDATENANFRAGE",
                "default": "START_GESCHAEFTSDATENANFRAGE",
                "type": "string"
              },
              "prozessId": {
                "type": "string"
              }
            },
            "required": [
              "prozessId",
              "eventname"
            ],
            "type": "object"
          }
        },
        "required": [
          "stammdaten",
          "transaktionsdaten",
          "zusatzdaten"
        ],
        "type": "object"
      },
      "PI_17102__stammdaten__AUFTRAG": {
        "properties": {
          "positionsdaten": {
            "items": {
              "$ref": "#/components/schemas/PI_17102__stammdaten__AUFTRAG__positionsdaten"
            },
            "type": "array"
          }
        },
        "required": [
          "positionsdaten"
        ],
        "type": "object"
      },
      "PI_17102__stammdaten__AUFTRAG__positionsdaten": {
        "properties": {
          "enddatum": {
            "$ref": "#/components/schemas/enddatum",
            "x-edifact-segment": [
              "SG29.LIN.DTM+164"
            ]
          },
          "startdatum": {
            "$ref": "#/components/schemas/startdatum",
            "x-edifact-segment": [
              "SG29.LIN.DTM+163"
            ]
          }
        },
        "required": [
          "enddatum",
          "startdatum"
        ],
        "type": "object"
      },
      "Sparte": {
        "description": "Sparte",
        "enum": [
          "STROM",
          "GAS",
          "FERNWAERME",
          "NAHWAERME",
          "WASSER",
          "ABWASSER"
        ],
        "title": "Sparte",
        "type": "string"
      },
      "anfragekategorie": {
        "$ref": "#/components/schemas/Anfragekategorie",
        "description": "Kategorie der Anfrage (ORDERS ORDRSP BGM 1001)"
      },
      "anfragetyp": {
        "$ref": "#/components/schemas/Anfragetyp",
        "description": "Typ/Art der Anfrage (ORDERS ORDRSP IMD 7081)"
      },
      "enddatum": {
        "description": "enddatum",
        "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"
      },
      "kategorie": {
        "description": "Qualifier aus dem Beginn der EDIFact Nachricht / BGM",
        "type": "string"
      },
      "lokationsId": {
        "description": "Für welche Markt- oder Messlokation gilt diese Anfrage.",
        "type": "string"
      },
      "rollencodenummer": {
        "description": "Gibt die Codenummer der Marktrolle an.",
        "type": "string"
      },
      "sparte": {
        "$ref": "#/components/schemas/Sparte",
        "description": "Enthält Informationen über die Sparte"
      },
      "startdatum": {
        "description": "startdatum",
        "format": "date-time",
        "type": "string"
      }
    }
  }
}