{
  "openapi": "3.1.0",
  "info": {
    "title": "START_GERAETEWECHSEL (MSB)",
    "version": "202604",
    "description": "The event `START_GERAETEWECHSEL` of the market role MSB 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_GERAETEWECHSEL"
    }
  ],
  "paths": {
    "/inbound": {
      "post": {
        "deprecated": false,
        "description": "Trigger-Event **START_GERAETEWECHSEL** der Marktrolle MSB.\n\n**Startet diese Rollensichten** (2):\n\n- [Gerätewechsel — MSBN (AWH WiM Gas 2.0)](/prozessdoku/202604/MSB--MSBN/awh-wim-gas-2-0-geratewechsel)\n- [Gerätewechsel — MSBN (WiM Strom Teil 1)](/prozessdoku/202604/MSB--MSBN/WiM-Teil1-geraetewechsel)\n\n<a href=\"/apis/einzeln/202604/msb/START_GERAETEWECHSEL.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_MSB_START_GERAETEWECHSEL",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MSB_START_GERAETEWECHSEL"
              }
            }
          }
        },
        "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_GERAETEWECHSEL (MSB)",
        "tags": [
          "START_GERAETEWECHSEL"
        ],
        "x-actual-endpoint": "POST /inbound",
        "x-event-source": "event/202604/[MSB]_START_GERAETEWECHSEL.yaml",
        "x-handbuchsatz": true
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "type": "http"
      }
    },
    "schemas": {
      "Anfragetyp": {
        "description": "Request type",
        "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": "Request type",
        "type": "string"
      },
      "Geraetetyp": {
        "description": "List of possible billable device types",
        "enum": [
          "WECHSELSTROMZAEHLER",
          "DREHSTROMZAEHLER",
          "ZWEIRICHTUNGSZAEHLER",
          "RLM_ZAEHLER",
          "IMS_ZAEHLER",
          "BALGENGASZAEHLER",
          "MAXIMUMZAEHLER",
          "MULTIPLEXANLAGE",
          "PAUSCHALANLAGE",
          "VERSTAERKERANLAGE",
          "SUMMATIONSGERAET",
          "IMPULSGEBER",
          "EDL_21_ZAEHLERAUFSATZ",
          "VIER_QUADRANTEN_LASTGANGZAEHLER",
          "MENGENUMWERTER",
          "STROMWANDLER",
          "SPANNUNGSWANDLER",
          "DATENLOGGER",
          "KOMMUNIKATIONSANSCHLUSS",
          "MODEM",
          "TELEKOMMUNIKATIONSEINRICHTUNG",
          "KOMMUNIKATIONSEINRICHTUNG",
          "DREHKOLBENGASZAEHLER",
          "TURBINENRADGASZAEHLER",
          "ULTRASCHALLZAEHLER",
          "WIRBELGASZAEHLER",
          "MODERNE_MESSEINRICHTUNG",
          "ELEKTRONISCHER_HAUSHALTSZAEHLER",
          "STEUEREINRICHTUNG",
          "TECHNISCHESTEUEREINRICHTUNG",
          "TARIFSCHALTGERAET",
          "RUNDSTEUEREMPFAENGER",
          "OPTIONALE_ZUS_ZAEHLEINRICHTUNG",
          "MESSWANDLERSATZ_IMS_MME",
          "KOMBIMESSWANDLER_IMS_MME",
          "TARIFSCHALTGERAET_IMS_MME",
          "RUNDSTEUEREMPFAENGER_IMS_MME",
          "TEMPERATUR_KOMPENSATION",
          "HOECHSTBELASTUNGS_ANZEIGER",
          "SONSTIGES_GERAET",
          "SMARTMETERGATEWAY",
          "STEUERBOX",
          "BLOCKSTROMWANDLER",
          "KOMBIMESSWANDLER",
          "MODEM_GSM",
          "ETHERNET_KOM",
          "PLC_COM",
          "MODEM_FESTNETZ",
          "DSL_KOM",
          "LTE_KOM",
          "DICHTEMENGENUMWERTER",
          "TEMPERATURMENGENUMWERTER",
          "ZUSTANDSMENGENUMWERTER",
          "MESSDATENREGISTRIERGERAET",
          "WANDLER",
          "BEFESTIGUNGSEINRICHTUNG"
        ],
        "title": "Device type",
        "type": "string"
      },
      "MSB_START_GERAETEWECHSEL": {
        "properties": {
          "stammdaten": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PI_17009__stammdaten"
              }
            ]
          },
          "transaktionsdaten": {
            "properties": {
              "absender": {
                "properties": {
                  "marktrolle": {
                    "$ref": "#/components/schemas/marktrolle"
                  },
                  "rollencodenummer": {
                    "$ref": "#/components/schemas/rollencodenummer"
                  }
                },
                "type": "object"
              },
              "empfaenger": {
                "properties": {
                  "marktrolle": {
                    "$ref": "#/components/schemas/marktrolle"
                  },
                  "rollencodenummer": {
                    "$ref": "#/components/schemas/rollencodenummer"
                  }
                },
                "type": "object"
              },
              "kategorie": {
                "$ref": "#/components/schemas/kategorie"
              },
              "pruefidentifikator": {
                "description": "Determined dynamically in the event process. A value supplied by the sender is ignored. Check identifiers possible in the topic — 17009.",
                "examples": [
                  "17009"
                ]
              },
              "sparte": {
                "$ref": "#/components/schemas/sparte"
              }
            },
            "required": [
              "absender",
              "empfaenger",
              "kategorie",
              "sparte"
            ],
            "type": "object"
          },
          "zusatzdaten": {
            "properties": {
              "eventname": {
                "const": "START_GERAETEWECHSEL",
                "default": "START_GERAETEWECHSEL",
                "type": "string"
              },
              "prozessId": {
                "type": "string"
              }
            },
            "required": [
              "prozessId",
              "eventname"
            ],
            "type": "object"
          }
        },
        "required": [
          "stammdaten",
          "transaktionsdaten",
          "zusatzdaten"
        ],
        "type": "object"
      },
      "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"
      },
      "PI_17009__stammdaten": {
        "properties": {
          "ANFRAGE": {
            "items": {
              "$ref": "#/components/schemas/PI_17009__stammdaten__ANFRAGE"
            },
            "type": "array"
          },
          "AUFTRAG": {
            "items": {
              "$ref": "#/components/schemas/PI_17009__stammdaten__AUFTRAG"
            },
            "type": "array"
          },
          "ZAEHLER": {
            "items": {
              "$ref": "#/components/schemas/PI_17009__stammdaten__ZAEHLER"
            },
            "type": "array"
          }
        },
        "required": [
          "ANFRAGE",
          "AUFTRAG",
          "ZAEHLER"
        ],
        "type": "object",
        "title": "17009"
      },
      "PI_17009__stammdaten__ANFRAGE": {
        "properties": {
          "anfragetyp": {
            "$ref": "#/components/schemas/anfragetyp",
            "x-edifact-segment": [
              "IMD++[Z58|Z59]"
            ]
          },
          "lokationsId": {
            "$ref": "#/components/schemas/lokationsId",
            "x-edifact-segment": [
              "SG2.NAD+DP.LOC+172"
            ]
          }
        },
        "required": [
          "anfragetyp",
          "lokationsId"
        ],
        "type": "object"
      },
      "PI_17009__stammdaten__AUFTRAG": {
        "properties": {
          "ausfuehrungsdatum": {
            "$ref": "#/components/schemas/ausfuehrungsdatum",
            "x-edifact-segment": [
              "DTM+203"
            ]
          }
        },
        "required": [
          "ausfuehrungsdatum"
        ],
        "type": "object"
      },
      "PI_17009__stammdaten__ZAEHLER": {
        "properties": {
          "geraete": {
            "items": {
              "$ref": "#/components/schemas/PI_17009__stammdaten__ZAEHLER__geraete"
            },
            "type": "array"
          }
        },
        "required": [
          "geraete"
        ],
        "type": "object"
      },
      "PI_17009__stammdaten__ZAEHLER__geraete": {
        "properties": {
          "geraeteeigenschaften": {
            "$ref": "#/components/schemas/PI_17009__stammdaten__ZAEHLER__geraete__geraeteeigenschaften"
          },
          "geraetenummer": {
            "$ref": "#/components/schemas/geraetenummer",
            "x-edifact-segment": [
              "SG29.LIN.SG34.RFF+Z09"
            ]
          },
          "weitereGeraetenummern": {
            "$ref": "#/components/schemas/weitereGeraetenummern",
            "x-edifact-segment": [
              "SG29.LIN.SG34.RFF+Z09"
            ]
          }
        },
        "required": [
          "geraeteeigenschaften",
          "geraetenummer"
        ],
        "type": "object"
      },
      "PI_17009__stammdaten__ZAEHLER__geraete__geraeteeigenschaften": {
        "properties": {
          "geraetetyp": {
            "$ref": "#/components/schemas/geraetetyp",
            "x-edifact-segment": [
              "SG29.LIN.SG30.CCI"
            ]
          }
        },
        "required": [
          "geraetetyp"
        ],
        "type": "object"
      },
      "Sparte": {
        "description": "Division",
        "enum": [
          "STROM",
          "GAS",
          "FERNWAERME",
          "NAHWAERME",
          "WASSER",
          "ABWASSER"
        ],
        "title": "Division",
        "type": "string"
      },
      "anfragetyp": {
        "$ref": "#/components/schemas/Anfragetyp",
        "description": "Type/kind of the request (ORDERS ORDRSP IMD 7081)"
      },
      "ausfuehrungsdatum": {
        "description": "The execution date describes at which point in time an order is to be executed.",
        "format": "date-time",
        "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"
      },
      "geraetenummer": {
        "description": "The number printed on the device, which is assigned by the MSB.",
        "type": "string"
      },
      "geraetetyp": {
        "$ref": "#/components/schemas/Geraetetyp"
      },
      "kategorie": {
        "description": "Qualifier from the beginning of the EDIFACT message / BGM",
        "type": "string"
      },
      "lokationsId": {
        "description": "Which market or metering location this request applies to.",
        "type": "string"
      },
      "marktrolle": {
        "$ref": "#/components/schemas/Marktrolle",
        "description": "Indicates the designation of the market role in free text."
      },
      "rollencodenummer": {
        "description": "Specifies the code value of the market role.",
        "type": "string"
      },
      "sparte": {
        "$ref": "#/components/schemas/Sparte",
        "description": "Contains information about the division"
      },
      "weitereGeraetenummern": {
        "description": "weitereGeraetenummern",
        "items": {
          "type": "string"
        },
        "nullable": true,
        "type": "array"
      }
    }
  }
}