{
  "openapi": "3.1.0",
  "info": {
    "title": "START_WIEDERHERST_LB (NB)",
    "version": "202604",
    "description": "The event `START_WIEDERHERST_LB` of the market role NB as a standalone specification, derived from the trigger API of format version 202604. Exactly one path: `POST /inbound`; the event is derived from `zusatzdaten.eventname` in the body."
  },
  "servers": [
    {
      "description": "Fake Env",
      "url": "https://api.macoapp.de"
    }
  ],
  "tags": [
    {
      "name": "START_WIEDERHERST_LB"
    }
  ],
  "paths": {
    "/inbound": {
      "post": {
        "deprecated": false,
        "description": "Trigger-Event **START_WIEDERHERST_LB** der Marktrolle NB.\n\n**Startet diese Rollensichten** (6):\n\n- [Unterbrechung der Anschlussnutzung (Sperren) auf Anweisung des LF — NB (AWH Sperrprozesse Gas)](/prozessdoku/202604/NB/awh-sperrprozesse-gas-unterbrechung-der-anschlussnutzung-sperren-auf-anweisung-des-lf)\n- [Unterbrechung der Anschlussnutzung (Sperren) auf Anweisung des LF — NB (GPKE Teil 2)](/prozessdoku/202604/NB/GPKE-Teil2-unterbrechung-der-anschlussnutzung-sperren-auf-anweisung-des-lf)\n- [Wiederherstellung der Anschlussnutzung (Entsperren) auf Anweisung des LF — NB (AWH Sperrprozesse Gas)](/prozessdoku/202604/NB/awh-sperrprozesse-gas-wiederherstellung-der-anschlussnutzung-entsperren-auf-anweisung-des-lf)\n- [Wiederherstellung der Anschlussnutzung (Entsperren) auf Anweisung des LF — NB (GPKE Teil 2)](/prozessdoku/202604/NB/GPKE-Teil2-wiederherstellung-der-anschlussnutzung-entsperren-auf-anweisung-des-lf)\n- [Wiederherstellung der Anschlussnutzung bei Lieferbeginn — NB (AWH Sperrprozesse Gas)](/prozessdoku/202604/NB/awh-sperrprozesse-gas-wiederherstellung-der-anschlussnutzung-bei-lieferbeginn)\n- [Wiederherstellung der Anschlussnutzung bei Lieferbeginn — NB (GPKE Teil 2)](/prozessdoku/202604/NB/GPKE-Teil2-wiederherstellung-der-anschlussnutzung-bei-lieferbeginn)\n\n<a href=\"/apis/einzeln/202604/nb/START_WIEDERHERST_LB.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_NB_START_WIEDERHERST_LB",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NB_START_WIEDERHERST_LB"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/event_responses_success"
                }
              }
            },
            "description": "Success | Success"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/event_response_fail"
                }
              }
            },
            "description": "Error | Fail"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "START_WIEDERHERST_LB (NB)",
        "tags": [
          "START_WIEDERHERST_LB"
        ],
        "x-actual-endpoint": "POST /inbound",
        "x-event-source": "event/202604/[NB]_START_WIEDERHERST_LB.yaml",
        "x-handbuchsatz": true
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "type": "http"
      }
    },
    "schemas": {
      "Auftragsstatus": {
        "description": "Order status",
        "enum": [
          "GESCHEITERT",
          "ERFOLGREICH",
          "LIEFERUNG_GEPLANT",
          "GEPLANT",
          "ZUGESTIMMT",
          "WIDERSPROCHEN",
          "STOERUNGSFREI",
          "GESTOERT",
          "FESTGESTELLTE_STOERUNG",
          "VERMUTETE_STOERUNG",
          "ABGELEHNT",
          "BEENDET",
          "ANTWORT_DRITTER",
          "BESTAETIGT",
          "UMGESETZT",
          "ENFG_STROMSPEICHER_UND_VERLUSTENERGIE",
          "ENFG_ELEKTRISCH_ANGETRIEBENE_WAERMEPUMPEN",
          "ENFG_UMLAGEERHEBUNG_BEI_ANLAGEN_ZUR_VERSTROMUNG_VON_KUPPELGASEN",
          "ENFG_HERSTELLUNG_VON_GRUENEN_WASSERSTOFF",
          "ENFG_STROMKOSTENINTENSIVE_UNTERNEHMEN",
          "ENFG_HERSTELLUNG_VON_WASSERSTOFF_IN_STROMKOSTENINTENSIVEN_UNTERNEHMEN",
          "ENFG_SCHIENENBAHNEN",
          "ENFG_ELEKTRISCHE_BETRIEBENE_BUSSEN_IM_LINIENVERKEHR",
          "ENFG_LANDSTROMANLAGEN",
          "AENDERUNG_DER_DATEN",
          "KEINE_AENDERUNG_DER_DATEN",
          "ZEITREIHE_AKZEPTIERT",
          "ZEITREIHE_NICHT_AKZEPTIERT"
        ],
        "title": "Order status",
        "type": "string"
      },
      "NB_START_WIEDERHERST_LB": {
        "properties": {
          "stammdaten": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PI_21039__stammdaten"
              },
              {
                "$ref": "#/components/schemas/PI_21040__stammdaten"
              }
            ]
          },
          "transaktionsdaten": {
            "properties": {
              "absender": {
                "properties": {
                  "rollencodenummer": {
                    "$ref": "#/components/schemas/rollencodenummer"
                  }
                },
                "type": "object"
              },
              "empfaenger": {
                "properties": {
                  "rollencodenummer": {
                    "$ref": "#/components/schemas/rollencodenummer"
                  }
                },
                "type": "object"
              },
              "fertigstellungsdatum": {
                "$ref": "#/components/schemas/fertigstellungsdatum"
              },
              "pruefidentifikator": {
                "description": "Determined dynamically in the event process (basis for the decision: istAuftragsstatusGeplant). A value supplied by the sender is ignored. Check identifiers possible in the topic — 21039, 21040.",
                "examples": [
                  "21039",
                  "21040"
                ]
              },
              "sparte": {
                "$ref": "#/components/schemas/sparte"
              }
            },
            "required": [
              "absender",
              "empfaenger",
              "fertigstellungsdatum",
              "sparte"
            ],
            "type": "object"
          },
          "zusatzdaten": {
            "properties": {
              "eventname": {
                "const": "START_WIEDERHERST_LB",
                "default": "START_WIEDERHERST_LB",
                "type": "string"
              },
              "prozessId": {
                "type": "string"
              }
            },
            "required": [
              "prozessId",
              "eventname"
            ],
            "type": "object"
          }
        },
        "required": [
          "stammdaten",
          "transaktionsdaten",
          "zusatzdaten"
        ],
        "type": "object",
        "x-unresolved-routing": [
          {
            "conditions": [
              "${istAuftragsstatusGeplant==false}",
              "${istAuftragsstatusGeplant==true}"
            ],
            "discriminates": true,
            "selects-pruefis": [
              "21039",
              "21040"
            ],
            "variable": "istAuftragsstatusGeplant"
          }
        ]
      },
      "PI_21039__stammdaten": {
        "properties": {
          "MARKTLOKATION": {
            "items": {
              "$ref": "#/components/schemas/PI_21039__stammdaten__MARKTLOKATION"
            },
            "type": "array"
          },
          "STATUSMITTEILUNG": {
            "items": {
              "$ref": "#/components/schemas/PI_21039__stammdaten__STATUSMITTEILUNG"
            },
            "type": "array"
          }
        },
        "required": [
          "MARKTLOKATION",
          "STATUSMITTEILUNG"
        ],
        "type": "object",
        "title": "21039"
      },
      "PI_21039__stammdaten__MARKTLOKATION": {
        "properties": {
          "marktlokationsId": {
            "$ref": "#/components/schemas/marktlokationsId",
            "x-edifact-segment": [
              "SG14.CNI.LOC+172"
            ]
          }
        },
        "required": [
          "marktlokationsId"
        ],
        "type": "object"
      },
      "PI_21039__stammdaten__STATUSMITTEILUNG": {
        "properties": {
          "auftragsstatus": {
            "$ref": "#/components/schemas/auftragsstatus",
            "x-edifact-segment": [
              "SG14.CNI.SG15.STS+Z37",
              "SG14.CNI.SG15.STS+Z38"
            ]
          },
          "positionsdaten": {
            "items": {
              "$ref": "#/components/schemas/PI_21039__stammdaten__STATUSMITTEILUNG__positionsdaten"
            },
            "type": "array"
          },
          "statusObjekt": {
            "$ref": "#/components/schemas/statusObjekt",
            "x-edifact-segment": [
              "SG14.CNI.SG15.STS+Z37",
              "SG14.CNI.SG15.STS+Z38"
            ]
          }
        },
        "required": [
          "positionsdaten"
        ],
        "type": "object"
      },
      "PI_21039__stammdaten__STATUSMITTEILUNG__positionsdaten": {
        "properties": {
          "allgemeineInformationen": {
            "$ref": "#/components/schemas/PI_21039__stammdaten__STATUSMITTEILUNG__positionsdaten__allgemeineInformationen"
          },
          "positionsnummer": {
            "$ref": "#/components/schemas/positionsnummer",
            "x-edifact-segment": [
              "SG14.CNI"
            ]
          }
        },
        "required": [
          "positionsnummer"
        ],
        "type": "object"
      },
      "PI_21039__stammdaten__STATUSMITTEILUNG__positionsdaten__allgemeineInformationen": {
        "properties": {
          "info1": {
            "$ref": "#/components/schemas/info1",
            "x-edifact-segment": [
              "SG14.CNI.SG15.STS+Z37.SG25.GID.FTX+ACB",
              "SG14.CNI.SG15.STS+Z38.SG25.GID.FTX+ACB"
            ]
          },
          "info2": {
            "$ref": "#/components/schemas/info2",
            "x-edifact-segment": [
              "SG14.CNI.SG15.STS+Z37.SG25.GID.FTX+ACB",
              "SG14.CNI.SG15.STS+Z38.SG25.GID.FTX+ACB"
            ]
          },
          "info3": {
            "$ref": "#/components/schemas/info3",
            "x-edifact-segment": [
              "SG14.CNI.SG15.STS+Z37.SG25.GID.FTX+ACB",
              "SG14.CNI.SG15.STS+Z38.SG25.GID.FTX+ACB"
            ]
          },
          "info4": {
            "$ref": "#/components/schemas/info4",
            "x-edifact-segment": [
              "SG14.CNI.SG15.STS+Z37.SG25.GID.FTX+ACB",
              "SG14.CNI.SG15.STS+Z38.SG25.GID.FTX+ACB"
            ]
          },
          "info5": {
            "$ref": "#/components/schemas/info5",
            "x-edifact-segment": [
              "SG14.CNI.SG15.STS+Z37.SG25.GID.FTX+ACB",
              "SG14.CNI.SG15.STS+Z38.SG25.GID.FTX+ACB"
            ]
          }
        },
        "type": "object"
      },
      "PI_21040__stammdaten": {
        "properties": {
          "MARKTLOKATION": {
            "items": {
              "$ref": "#/components/schemas/PI_21040__stammdaten__MARKTLOKATION"
            },
            "type": "array"
          },
          "STATUSMITTEILUNG": {
            "items": {
              "$ref": "#/components/schemas/PI_21040__stammdaten__STATUSMITTEILUNG"
            },
            "type": "array"
          }
        },
        "required": [
          "MARKTLOKATION",
          "STATUSMITTEILUNG"
        ],
        "type": "object",
        "title": "21040"
      },
      "PI_21040__stammdaten__MARKTLOKATION": {
        "properties": {
          "marktlokationsId": {
            "$ref": "#/components/schemas/marktlokationsId",
            "x-edifact-segment": [
              "SG14.CNI.LOC+172"
            ]
          }
        },
        "required": [
          "marktlokationsId"
        ],
        "type": "object"
      },
      "PI_21040__stammdaten__STATUSMITTEILUNG": {
        "properties": {
          "auftragsstatus": {
            "$ref": "#/components/schemas/auftragsstatus",
            "x-edifact-segment": [
              "SG14.CNI.SG15.STS+Z39"
            ]
          },
          "positionsdaten": {
            "items": {
              "$ref": "#/components/schemas/PI_21040__stammdaten__STATUSMITTEILUNG__positionsdaten"
            },
            "type": "array"
          }
        },
        "required": [
          "auftragsstatus",
          "positionsdaten"
        ],
        "type": "object"
      },
      "PI_21040__stammdaten__STATUSMITTEILUNG__positionsdaten": {
        "properties": {
          "positionsnummer": {
            "$ref": "#/components/schemas/positionsnummer",
            "x-edifact-segment": [
              "SG14.CNI"
            ]
          }
        },
        "required": [
          "positionsnummer"
        ],
        "type": "object"
      },
      "Sparte": {
        "description": "Division",
        "enum": [
          "STROM",
          "GAS",
          "FERNWAERME",
          "NAHWAERME",
          "WASSER",
          "ABWASSER"
        ],
        "title": "Division",
        "type": "string"
      },
      "Statusobjekt": {
        "description": "Status object",
        "enum": [
          "MSBWECHSEL",
          "UMBAUMELO",
          "ERSTEINBAUIMS",
          "ERSTEINBAUMME",
          "GERAET",
          "ANGEBOTANFRAGE",
          "STATUSBESTELLUNG",
          "LIEFERSCHEIN",
          "SPERREN",
          "ENTSPERREN",
          "PRIVILEGIERUNG_NACH_ENFG",
          "VERAENDERUNGSSTATUS_DER_DATEN",
          "TURNUSAUSLESUNG",
          "PRUEFSTATUS_ANTWORT_SUMMENZEITREIHEN",
          "ABWEISUNG_SUMMENZEITREIHE",
          "PRUEFSTATUS_SUMMENZEITREIHE",
          "DATENSTATUS_SUMMENZEITREIHE",
          "ABWEISUNG_STATUSMELDUNG_AENDERUNG",
          "AUSFALLARBEIT",
          "FAHRPLANANTEIL",
          "GEGENVORSCHLAG_AUSFALLARBEIT",
          "GEGENVORSCHLAG_FAHRPLANANTEIL"
        ],
        "title": "Status object",
        "type": "string"
      },
      "auftragsstatus": {
        "$ref": "#/components/schemas/Auftragsstatus"
      },
      "event_response_fail": {
        "description": "Error message on process data API call | Error message on process data API call",
        "properties": {
          "errorCode": {
            "description": "Error identifier",
            "example": "400",
            "type": "string"
          },
          "message": {
            "description": "Technical message | Technical message",
            "example": "Validation Failed",
            "type": "string"
          }
        },
        "type": "object"
      },
      "event_responses_success": {
        "description": "Success message on process data API call | Success message on process data API call",
        "properties": {
          "businessKey": {
            "description": "Unique identifier of the business process | Unique identifier of the business process",
            "format": "uuid",
            "type": "string"
          },
          "message": {
            "description": "Message with details about the triggered 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"
      },
      "fertigstellungsdatum": {
        "description": "fertigstellungsdatum",
        "format": "date-time",
        "type": "string"
      },
      "info1": {
        "description": "General info 1",
        "type": "string"
      },
      "info2": {
        "description": "General info 2",
        "type": "string"
      },
      "info3": {
        "description": "General info 3",
        "type": "string"
      },
      "info4": {
        "description": "General info 4",
        "type": "string"
      },
      "info5": {
        "description": "General info 5",
        "type": "string"
      },
      "marktlokationsId": {
        "description": "Identification number of a market location at which energy is either\nconsumed or generated",
        "type": "string"
      },
      "positionsnummer": {
        "description": "Line item number",
        "type": "integer"
      },
      "rollencodenummer": {
        "description": "Specifies the code value of the market role.",
        "type": "string"
      },
      "sparte": {
        "$ref": "#/components/schemas/Sparte",
        "description": "Contains information about the division"
      },
      "statusObjekt": {
        "$ref": "#/components/schemas/Statusobjekt"
      }
    }
  }
}