{
  "openapi": "3.1.0",
  "info": {
    "title": "START_ENDE_ZUORDNUNG (NB)",
    "version": "202610",
    "description": "The event `START_ENDE_ZUORDNUNG` of the market role NB as a standalone specification, derived from the trigger API of format version 202610. 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_ENDE_ZUORDNUNG"
    }
  ],
  "paths": {
    "/inbound": {
      "post": {
        "deprecated": false,
        "description": "Trigger-Event **START_ENDE_ZUORDNUNG** der Marktrolle NB.\n\n**Startet diese Rollensichten** (5):\n\n- [Fall 2: LF-Zuordnung bei EEG-Marktlokation mit DV-Pflicht — NB](/prozessdoku/202610/NB/GPKE-Teil2-fall-2-lf-zuordnung-bei-eeg-marktlokation-mit-dv-pflicht)\n- [Fall 3: LF-Zuordnung bei KWKG-Marktlokation mit DV-Pflicht bzw. Nicht-EEG-/Nicht-KWKG-Marktlokation und Marktlokation wird nicht-tranchiert abgebildet — NB](/prozessdoku/202610/NB/GPKE-Teil2-fall-3-lf-zuordnung-bei-kwkg-marktlokation-mit-dv-pflicht-bzw-nicht-eeg-nicht-kwkg-marktlokation-und-marktlokation-wird-nicht-tranchiert-abgebildet)\n- [Fall 4: LF-Zuordnung bei KWKG-Marktlokation mit DV-Pflicht bzw. Nicht-EEG-/Nicht-KWKG-Marktlokation und Marktlokation wird tranchiert abgebildet — NB](/prozessdoku/202610/NB/GPKE-Teil2-fall-4-lf-zuordnung-bei-kwkg-marktlokation-mit-dv-pflicht-bzw-nicht-eeg-nicht-kwkg-marktlokation-und-marktlokation-wird-tranchiert-abgebildet)\n- [Lieferbeginn — NB](/prozessdoku/202610/NB/GPKE-Teil2-lieferbeginn)\n- [Lieferende von NB an LF — NB](/prozessdoku/202610/NB/GPKE-Teil2-lieferende-von-nb-an-lf)\n\n<a href=\"/apis/einzeln/202610/nb/START_ENDE_ZUORDNUNG.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_ENDE_ZUORDNUNG",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NB_START_ENDE_ZUORDNUNG"
              }
            }
          }
        },
        "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_ENDE_ZUORDNUNG (NB)",
        "tags": [
          "START_ENDE_ZUORDNUNG"
        ],
        "x-actual-endpoint": "POST /inbound",
        "x-event-source": "event/202610/[NB]_START_ENDE_ZUORDNUNG.yaml",
        "x-handbuchsatz": true
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "type": "http"
      }
    },
    "schemas": {
      "Marktrolle": {
        "description": "A market participant can take on these roles",
        "enum": [
          "NB",
          "LF",
          "MSB",
          "MSBA",
          "GMSB",
          "MDL",
          "DL",
          "BKV",
          "BKO",
          "UENB",
          "KUNDE-SELBST-NN",
          "MGV",
          "EIV",
          "RB",
          "KUNDE",
          "INTERESSENT",
          "KN",
          "UBA",
          "BIKO",
          "ESA"
        ],
        "title": "Market role",
        "type": "string"
      },
      "NB_START_ENDE_ZUORDNUNG": {
        "properties": {
          "stammdaten": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PI_55037__stammdaten"
              },
              {
                "$ref": "#/components/schemas/PI_55611__stammdaten"
              }
            ]
          },
          "transaktionsdaten": {
            "properties": {
              "absender": {
                "properties": {
                  "rollencodenummer": {
                    "$ref": "#/components/schemas/rollencodenummer"
                  }
                },
                "type": "object"
              },
              "empfaenger": {
                "properties": {
                  "marktrolle": {
                    "$ref": "#/components/schemas/marktrolle"
                  },
                  "rollencodenummer": {
                    "$ref": "#/components/schemas/rollencodenummer"
                  }
                },
                "type": "object"
              },
              "pruefidentifikator": {
                "description": "Determined dynamically in the event process (basis for the decision: marktrolle). A value supplied by the sender is ignored. Check identifiers possible in the topic — 55037, 55611.",
                "examples": [
                  "55037",
                  "55611"
                ]
              },
              "sparte": {
                "$ref": "#/components/schemas/sparte"
              },
              "transaktionsgrund": {
                "$ref": "#/components/schemas/transaktionsgrund"
              },
              "transaktionsgrundergaenzung": {
                "$ref": "#/components/schemas/transaktionsgrundergaenzung"
              }
            },
            "required": [
              "absender",
              "empfaenger",
              "sparte",
              "transaktionsgrund",
              "transaktionsgrundergaenzung"
            ],
            "type": "object"
          },
          "zusatzdaten": {
            "properties": {
              "eventname": {
                "const": "START_ENDE_ZUORDNUNG",
                "default": "START_ENDE_ZUORDNUNG",
                "type": "string"
              },
              "prozessId": {
                "type": "string"
              }
            },
            "required": [
              "prozessId",
              "eventname"
            ],
            "type": "object"
          }
        },
        "required": [
          "stammdaten",
          "transaktionsdaten",
          "zusatzdaten"
        ],
        "type": "object"
      },
      "PI_55037__stammdaten": {
        "properties": {
          "MARKTLOKATION": {
            "items": {
              "$ref": "#/components/schemas/PI_55037__stammdaten__MARKTLOKATION"
            },
            "type": "array"
          },
          "NETZNUTZUNGSVERTRAG": {
            "items": {
              "$ref": "#/components/schemas/PI_55037__stammdaten__NETZNUTZUNGSVERTRAG"
            },
            "type": "array"
          },
          "TRANCHE": {
            "items": {
              "$ref": "#/components/schemas/PI_55037__stammdaten__TRANCHE"
            },
            "type": "array"
          }
        },
        "type": "object",
        "title": "55037"
      },
      "PI_55037__stammdaten__MARKTLOKATION": {
        "properties": {
          "marktlokationsId": {
            "$ref": "#/components/schemas/marktlokationsId",
            "x-edifact-segment": [
              "SG4.IDE+24.SG5.LOC+Z16"
            ]
          }
        },
        "type": "object"
      },
      "PI_55037__stammdaten__NETZNUTZUNGSVERTRAG": {
        "properties": {
          "vertragsende": {
            "$ref": "#/components/schemas/vertragsende",
            "x-edifact-segment": [
              "SG4.IDE+24.DTM+93"
            ]
          }
        },
        "type": "object"
      },
      "PI_55037__stammdaten__TRANCHE": {
        "properties": {
          "tranchenId": {
            "$ref": "#/components/schemas/tranchenId",
            "x-edifact-segment": [
              "SG4.IDE+24.SG5.LOC+Z21"
            ]
          }
        },
        "type": "object"
      },
      "PI_55611__stammdaten": {
        "properties": {
          "MARKTLOKATION": {
            "items": {
              "$ref": "#/components/schemas/PI_55611__stammdaten__MARKTLOKATION"
            },
            "type": "array"
          },
          "MESSLOKATION": {
            "items": {
              "$ref": "#/components/schemas/PI_55611__stammdaten__MESSLOKATION"
            },
            "type": "array"
          },
          "NETZNUTZUNGSVERTRAG": {
            "items": {
              "$ref": "#/components/schemas/PI_55611__stammdaten__NETZNUTZUNGSVERTRAG"
            },
            "type": "array"
          }
        },
        "type": "object",
        "title": "55611"
      },
      "PI_55611__stammdaten__MARKTLOKATION": {
        "properties": {
          "marktlokationsId": {
            "$ref": "#/components/schemas/marktlokationsId",
            "x-edifact-segment": [
              "SG4.IDE+24.SG5.LOC+Z16"
            ]
          }
        },
        "type": "object"
      },
      "PI_55611__stammdaten__MESSLOKATION": {
        "properties": {
          "messlokationsId": {
            "$ref": "#/components/schemas/messlokationsId",
            "x-edifact-segment": [
              "SG4.IDE+24.SG5.LOC+Z17"
            ]
          }
        },
        "type": "object"
      },
      "PI_55611__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"
      },
      "Sparte": {
        "description": "Division",
        "enum": [
          "STROM",
          "GAS",
          "FERNWAERME",
          "NAHWAERME",
          "WASSER",
          "ABWASSER"
        ],
        "title": "Division",
        "type": "string"
      },
      "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"
      },
      "marktlokationsId": {
        "description": "Identification number of a market location at which energy is either\nconsumed or generated",
        "type": "string"
      },
      "marktrolle": {
        "$ref": "#/components/schemas/Marktrolle",
        "description": "Indicates the designation of the market role in free text."
      },
      "messlokationsId": {
        "description": "The metering location identification. This is the former metering point identifier,\ne.g. DE 47108151234567",
        "type": "string"
      },
      "rollencodenummer": {
        "description": "Specifies the code value of the market role.",
        "type": "string"
      },
      "sparte": {
        "$ref": "#/components/schemas/Sparte",
        "description": "Contains information about the division"
      },
      "tranchenId": {
        "description": "tranchenId",
        "type": "string"
      },
      "transaktionsgrund": {
        "description": "The transaction reason describes the business transaction for the category in more detail / UTILMD STS+7++###+ZW4+E03",
        "type": "string"
      },
      "transaktionsgrundergaenzung": {
        "description": "Supplement to the transaction reason / UTILMD STS+7++E01+###+E03",
        "type": "string"
      },
      "vertragsbeginn": {
        "description": "Specifies when the contract begins.",
        "format": "date-time",
        "type": "string"
      },
      "vertragsende": {
        "description": "Contract end date / DTM+93",
        "format": "date-time",
        "type": "string"
      }
    }
  }
}