{
  "openapi": "3.1.0",
  "info": {
    "title": "START_LIEFERENDE (NB)",
    "version": "202610",
    "description": "Das Ereignis `START_LIEFERENDE` der Marktrolle NB 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_LIEFERENDE"
    }
  ],
  "paths": {
    "/inbound": {
      "post": {
        "deprecated": false,
        "description": "Trigger-Event **START_LIEFERENDE** der Marktrolle NB.\n\n**Startet diese Rollensichten** (2):\n\n- [Lieferende von NB an LF — NB (GPKE Teil 2)](/prozessdoku/202610/NB/GPKE-Teil2-lieferende-von-nb-an-lf)\n- [Lieferende von NB an LF — NB (GeLi Gas 2.0)](/prozessdoku/202610/NB/geli-gas-2-0-lieferende-von-nb-an-lf)\n\n<a href=\"/apis/einzeln/202610/nb/START_LIEFERENDE.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_NB_START_LIEFERENDE",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "START_LIEFERENDE_LF_Z16": {
                  "$ref": "#/components/examples/START_LIEFERENDE_LF_Z16"
                },
                "START_LIEFERENDE_LF_Z22": {
                  "$ref": "#/components/examples/START_LIEFERENDE_LF_Z22"
                },
                "START_LIEFERENDE_NB": {
                  "$ref": "#/components/examples/START_LIEFERENDE_NB"
                }
              },
              "schema": {
                "$ref": "#/components/schemas/NB_START_LIEFERENDE"
              }
            }
          }
        },
        "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_LIEFERENDE (NB)",
        "tags": [
          "START_LIEFERENDE"
        ],
        "x-actual-endpoint": "POST /inbound",
        "x-event-source": "event/202610/[NB]_START_LIEFERENDE.yaml",
        "x-handbuchsatz": true
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "type": "http"
      }
    },
    "schemas": {
      "NB_START_LIEFERENDE": {
        "properties": {
          "stammdaten": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PI_44007__stammdaten"
              },
              {
                "$ref": "#/components/schemas/PI_55007__stammdaten"
              }
            ]
          },
          "transaktionsdaten": {
            "properties": {
              "absender": {
                "properties": {
                  "rollencodenummer": {
                    "$ref": "#/components/schemas/rollencodenummer"
                  }
                },
                "type": "object"
              },
              "empfaenger": {
                "properties": {
                  "rollencodenummer": {
                    "$ref": "#/components/schemas/rollencodenummer"
                  }
                },
                "type": "object"
              },
              "freitext": {
                "$ref": "#/components/schemas/freitext"
              },
              "kategorie": {
                "$ref": "#/components/schemas/kategorie"
              },
              "pruefidentifikator": {
                "description": "Wird dynamisch im Event-Prozess ermittelt (Entscheidungsgrundlage: sparte). Ein vom Sender mitgegebener Wert wird ignoriert. Im Topic mögliche Prüfis — 44007, 55007.",
                "examples": [
                  "44007",
                  "55007"
                ]
              },
              "sparte": {
                "$ref": "#/components/schemas/sparte"
              },
              "transaktionsgrund": {
                "$ref": "#/components/schemas/transaktionsgrund"
              },
              "transaktionsgrundergaenzung": {
                "$ref": "#/components/schemas/transaktionsgrundergaenzung"
              }
            },
            "required": [
              "absender",
              "empfaenger",
              "freitext",
              "kategorie",
              "sparte",
              "transaktionsgrund",
              "transaktionsgrundergaenzung"
            ],
            "type": "object"
          },
          "zusatzdaten": {
            "properties": {
              "eventname": {
                "const": "START_LIEFERENDE",
                "default": "START_LIEFERENDE",
                "type": "string"
              },
              "prozessId": {
                "type": "string"
              }
            },
            "required": [
              "prozessId",
              "eventname"
            ],
            "type": "object"
          }
        },
        "required": [
          "stammdaten",
          "transaktionsdaten",
          "zusatzdaten"
        ],
        "type": "object"
      },
      "PI_44007__stammdaten": {
        "properties": {
          "BILANZIERUNG": {
            "items": {
              "$ref": "#/components/schemas/PI_44007__stammdaten__BILANZIERUNG"
            },
            "type": "array"
          },
          "MARKTLOKATION": {
            "items": {
              "$ref": "#/components/schemas/PI_44007__stammdaten__MARKTLOKATION"
            },
            "type": "array"
          },
          "NETZNUTZUNGSVERTRAG": {
            "items": {
              "$ref": "#/components/schemas/PI_44007__stammdaten__NETZNUTZUNGSVERTRAG"
            },
            "type": "array"
          }
        },
        "required": [
          "MARKTLOKATION"
        ],
        "type": "object",
        "title": "44007"
      },
      "PI_44007__stammdaten__BILANZIERUNG": {
        "properties": {
          "bilanzierungsende": {
            "$ref": "#/components/schemas/bilanzierungsende",
            "x-edifact-segment": [
              "SG4.IDE+24.DTM+159"
            ]
          }
        },
        "type": "object"
      },
      "PI_44007__stammdaten__MARKTLOKATION": {
        "properties": {
          "marktlokationsId": {
            "$ref": "#/components/schemas/marktlokationsId",
            "x-edifact-segment": [
              "SG4.IDE+24.SG5.LOC+172"
            ]
          }
        },
        "required": [
          "marktlokationsId"
        ],
        "type": "object"
      },
      "PI_44007__stammdaten__NETZNUTZUNGSVERTRAG": {
        "properties": {
          "vertragsende": {
            "$ref": "#/components/schemas/vertragsende",
            "x-edifact-segment": [
              "SG4.IDE+24.DTM+93"
            ]
          }
        },
        "type": "object"
      },
      "PI_55007__stammdaten": {
        "properties": {
          "MARKTLOKATION": {
            "items": {
              "$ref": "#/components/schemas/PI_55007__stammdaten__MARKTLOKATION"
            },
            "type": "array"
          },
          "NETZNUTZUNGSVERTRAG": {
            "items": {
              "$ref": "#/components/schemas/PI_55007__stammdaten__NETZNUTZUNGSVERTRAG"
            },
            "type": "array"
          },
          "TRANCHE": {
            "items": {
              "$ref": "#/components/schemas/PI_55007__stammdaten__TRANCHE"
            },
            "type": "array"
          }
        },
        "type": "object",
        "title": "55007"
      },
      "PI_55007__stammdaten__MARKTLOKATION": {
        "properties": {
          "marktlokationsId": {
            "$ref": "#/components/schemas/marktlokationsId",
            "x-edifact-segment": [
              "SG4.IDE+24.SG5.LOC+Z16",
              "SG4.IDE+24.SG5.LOC+Z22"
            ]
          },
          "marktlokationsTyp": {
            "items": {
              "$ref": "#/components/schemas/PI_55007__stammdaten__MARKTLOKATION__marktlokationsTyp"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "PI_55007__stammdaten__MARKTLOKATION__marktlokationsTyp": {
        "properties": {
          "typ": {
            "$ref": "#/components/schemas/typ",
            "x-edifact-segment": [
              "SG4.IDE+24.SG5.LOC+Z16",
              "SG4.IDE+24.SG5.LOC+Z22"
            ]
          }
        },
        "type": "object"
      },
      "PI_55007__stammdaten__NETZNUTZUNGSVERTRAG": {
        "properties": {
          "vertragsende": {
            "$ref": "#/components/schemas/vertragsende",
            "x-edifact-segment": [
              "SG4.IDE+24.DTM+93"
            ]
          }
        },
        "type": "object"
      },
      "PI_55007__stammdaten__TRANCHE": {
        "properties": {
          "tranchenId": {
            "$ref": "#/components/schemas/tranchenId",
            "x-edifact-segment": [
              "SG4.IDE+24.SG5.LOC+Z21"
            ]
          }
        },
        "type": "object"
      },
      "Sparte": {
        "description": "Sparte",
        "enum": [
          "STROM",
          "GAS",
          "FERNWAERME",
          "NAHWAERME",
          "WASSER",
          "ABWASSER"
        ],
        "title": "Sparte",
        "type": "string"
      },
      "bilanzierungsende": {
        "description": "Exklusives Ende der Bilanzierung",
        "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"
      },
      "freitext": {
        "description": "Freitext / FTX+ACB",
        "type": "string"
      },
      "kategorie": {
        "description": "Qualifier aus dem Beginn der EDIFact Nachricht / BGM",
        "type": "string"
      },
      "marktlokationsId": {
        "description": "Identifikationsnummer einer Marktlokation, an der Energie entweder\nverbraucht, oder erzeugt wird",
        "type": "string"
      },
      "rollencodenummer": {
        "description": "Gibt die Codenummer der Marktrolle an.",
        "type": "string"
      },
      "sparte": {
        "$ref": "#/components/schemas/Sparte",
        "description": "Enthält Informationen über die Sparte"
      },
      "tranchenId": {
        "description": "tranchenId",
        "type": "string"
      },
      "transaktionsgrund": {
        "description": "Der Transaktionsgrund beschreibt den Geschäftsvorfall zur Kategorie genauer / UTILMD STS+7++###+ZW4+E03",
        "type": "string"
      },
      "transaktionsgrundergaenzung": {
        "description": "Ergänzung zum Transaktionsgrund / UTILMD STS+7++E01+###+E03",
        "type": "string"
      },
      "typ": {
        "description": "Alter FW - OBSOLET",
        "type": "string"
      },
      "vertragsende": {
        "description": "Datum Vertragsende / DTM+93",
        "format": "date-time",
        "type": "string"
      }
    },
    "examples": {
      "START_LIEFERENDE_LF_Z16": {
        "summary": "START_LIEFERENDE - Lieferende verbr MaLo Strom LF an NB",
        "value": {
          "stammdaten": {
            "MARKTLOKATION": [
              {
                "boTyp": "MARKTLOKATION",
                "energierichtung": "AUSSP",
                "marktlokationsId": "57685676748",
                "marktlokationsTyp": [
                  {
                    "typ": "STANDARD_MARKTLOKATION"
                  }
                ],
                "sparte": "STROM",
                "versionStruktur": "1"
              }
            ]
          },
          "transaktionsdaten": {
            "absender": {
              "rollencodenummer": "9904000000005",
              "rollencodetyp": "BDEW"
            },
            "empfaenger": {
              "rollencodenummer": "9900936000002",
              "rollencodetyp": "BDEW"
            },
            "kategorie": "E02",
            "sparte": "STROM",
            "transaktionsgrund": "E01",
            "transaktionsgrundergaenzung": "ZW4",
            "vertragsende": "2025-10-31T23:00:00Z"
          },
          "zusatzdaten": {
            "eventname": "START_LIEFERENDE",
            "prozessId": "00505688-E4A2-1EDF-A0C2-C81842E2515E"
          }
        }
      },
      "START_LIEFERENDE_LF_Z22": {
        "summary": "START_LIEFERENDE - Lieferende erzeug MaLo Strom LF an NB",
        "value": {
          "stammdaten": {
            "TRANCHE": [
              {
                "boTyp": "TRANCHE",
                "energierichtung": "EINSP",
                "sparte": "STROM",
                "tranchenId": "57685676742",
                "versionStruktur": "1"
              }
            ]
          },
          "transaktionsdaten": {
            "absender": {
              "rollencodenummer": "9904000000005",
              "rollencodetyp": "BDEW"
            },
            "empfaenger": {
              "rollencodenummer": "9900936000002",
              "rollencodetyp": "BDEW"
            },
            "kategorie": "E02",
            "sparte": "STROM",
            "transaktionsgrund": "E01",
            "transaktionsgrundergaenzung": "ZW3",
            "vertragsende": "2025-10-31T23:00:00Z"
          },
          "zusatzdaten": {
            "eventname": "START_LIEFERENDE",
            "prozessId": "00505688-E4A2-1EDF-A0C2-C81842E2515E"
          }
        }
      },
      "START_LIEFERENDE_NB": {
        "summary": "START_LIEFERENDE - Lieferende verbr MaLo Strom NB an LF",
        "value": {
          "stammdaten": {
            "MARKTLOKATION": [
              {
                "boTyp": "MARKTLOKATION",
                "energierichtung": "AUSSP",
                "marktlokationsId": "57685676748",
                "marktlokationsTyp": [
                  {
                    "typ": "STANDARD_MARKTLOKATION"
                  }
                ],
                "sparte": "STROM",
                "versionStruktur": "1"
              }
            ]
          },
          "transaktionsdaten": {
            "absender": {
              "rollencodenummer": "9904000000005",
              "rollencodetyp": "BDEW"
            },
            "empfaenger": {
              "rollencodenummer": "9900936000002",
              "rollencodetyp": "BDEW"
            },
            "kategorie": "E02",
            "sparte": "STROM",
            "transaktionsgrund": "Z33",
            "transaktionsgrundergaenzung": "ZW4",
            "vertragsende": "2025-10-31T23:00:00Z"
          },
          "zusatzdaten": {
            "eventname": "START_LIEFERENDE",
            "prozessId": "00505688-E4A2-1EDF-A0C2-C81842E2515E"
          }
        }
      }
    }
  }
}