{
  "$id": "https://schema.nfh.global/StopEvent/v2.0",
  "x-iri": "https://schema.nfh.global/StopEvent/v2.0",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "StopEvent",
  "type": "object",
  "description": "A departure or arrival event at a stop, used to retrieve the next or previous vehicle movements at a specific location.",
  "properties": {
    "stopEventType": {
      "description": "Type of event (DEPARTURE, ARRIVAL)",
      "type": "string"
    },
    "timetabledTime": {
      "description": "Scheduled time for the event",
      "type": "string",
      "format": "date-time"
    },
    "estimatedTime": {
      "description": "Estimated actual time for the event",
      "type": "string",
      "format": "date-time"
    },
    "serviceJourneyRef": {
      "description": "Reference to the vehicle journey for this event",
      "$ref": "https://schema.nfh.global/VehicleJourney/v2.0/schema.json"
    },
    "stopPointRef": {
      "description": "Reference to the stop point where the event occurs",
      "$ref": "https://schema.nfh.global/StopPoint/v2.0/schema.json"
    },
    "id": {
      "description": "Unique identifier for the fulfillment stop",
      "type": "string"
    },
    "location": {
      "description": "Geographic location of the stop",
      "$ref": "https://schema.nfh.global/Location/v2.0/schema.json"
    },
    "type": {
      "description": "Type of stop (start, end, intermediate)",
      "type": "string"
    },
    "instructions": {
      "description": "Instructions for passengers at this stop",
      "$ref": "https://schema.nfh.global/Descriptor/v2.1/schema.json"
    },
    "time": {
      "description": "Expected time window at this stop",
      "$ref": "https://schema.nfh.global/TimePeriod/v2.1/schema.json"
    }
  },
  "additionalProperties": false,
  "x-tags": [
    "mobility",
    "ride-hailing"
  ]
}
