{
  "$id": "https://schema.nfh.global/StopTimeUpdate/v2.0",
  "x-iri": "https://schema.nfh.global/StopTimeUpdate/v2.0",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "StopTimeUpdate",
  "type": "object",
  "description": "A real-time update to the predicted arrival or departure time of a vehicle at a specific stop within a journey.",
  "properties": {
    "stopId": {
      "description": "Reference to the stop being updated",
      "$ref": "https://schema.nfh.global/Stop/v2.0/schema.json"
    },
    "stopSequence": {
      "description": "Sequence of this stop in the trip",
      "type": "number"
    },
    "arrivalDelay": {
      "description": "Arrival delay in seconds (negative = early)",
      "type": "number"
    },
    "departureDelay": {
      "description": "Departure delay in seconds (negative = early)",
      "type": "number"
    },
    "scheduleRelationship": {
      "description": "Relationship to schedule (SCHEDULED, SKIPPED, NO_DATA)",
      "type": "string"
    },
    "id": {
      "description": "Unique identifier for the tracking record",
      "type": "string"
    },
    "url": {
      "description": "URL endpoint for real-time tracking information",
      "type": "string",
      "format": "uri"
    },
    "status": {
      "description": "Current tracking status",
      "$ref": "https://schema.nfh.global/State/v2.0/schema.json"
    },
    "validity": {
      "description": "Validity period for this tracking record",
      "$ref": "https://schema.nfh.global/TimePeriod/v2.1/schema.json"
    }
  },
  "additionalProperties": false,
  "x-tags": [
    "mobility",
    "ride-hailing"
  ]
}
