{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://schemas.ruter.no/adt/ota/api/v3.0/pe/sales/current_stop/sales-current_stop.json",
  "type": "object",
  "title": "SalesCurrentStop",
  "required": [
    "eventTimestamp",
    "traceId",
    "vehicleRef",
    "stopPlaceId",
    "tariffZone"
  ],
  "additionalProperties": false,
  "properties": {
    "eventTimestamp": {
      "$id": "#/properties/eventTimestamp",
      "type": "string",
      "description": "Time of the Progress event",
      "format": "date-time"
    },
    "traceId": {
      "$id": "#/properties/traceId",
      "$comment": "Added in version 2.5",
      "type": "string",
      "description": "A unique identifier to be able to trace this message. Also used to detect duplicate messages received."
    },
    "spanId": {
      "$id": "#/properties/spanId",
      "type": "string",
      "description": "A unique identifier for an individual step of a transaction. Consists of the spanId from the current_stop message and a new UUID for this step, separated by a colon."
    },
    "progressRef": {
      "$id": "#/properties/progressRef",
      "type": "string",
      "description": "A reference to the Progress event that triggered this message. Matches the traceId from the Progress event."
    },
    "actualCallRef": {
      "$id": "#/properties/actualCallRef",
      "type": "string",
      "description": "A reference to actualCallRef on the Progress event that triggered this message. This is necessary because some journeys serve the same stopPlaceId twice"
    },
    "journeyRef": {
      "$id": "#/properties/journeyRef",
      "type": "string",
      "description": "JourneyRef from the Progress event"
    },
    "vehicleRef": {
      "$id": "#/properties/vehicleRef",
      "type": "string",
      "description": "The vehicleRef (VIN) for the vehicle that sent the Progress event"
    },
    "assignmentRef": {
      "$id": "#/properties/assignmentRef",
      "type": "string",
      "description": "AssignmentRef from the Progress event"
    },
    "chainId": {
      "$id": "#/properties/chainId",
      "type": "string",
      "description": "The chainId for the operator that owns the vehicle"
    },
    "lineRef": {
      "$id": "#/properties/lineRef",
      "type": "string",
      "description": "LineRef the bus is operating currently, obtained from the Progress event"
    },
    "lineName": {
      "$id": "#/properties/lineName",
      "type": "string",
      "description": "Name of the line the bus is operating currently"
    },
    "blockId": {
      "$id": "#/properties/blockId",
      "type": "string",
      "description": "BlockId from the Progress event"
    },
    "quayId": {
      "$id": "#/properties/quayId",
      "type": "string",
      "description": "QuayId from the Progress event"
    },
    "stopPlaceId": {
      "$id": "#/properties/stopPlaceId",
      "type": "string",
      "description": "StopPlaceId the Progress event was received for"
    },
    "tariffZone": {
      "$id": "#/properties/tariffZone",
      "type": "string",
      "description": "The tariff zone the vehicle is currently in"
    },
    "stopPlaceIdNextStop": {
      "$id": "#/properties/stopPlaceIdNextStop",
      "type": "string",
      "description": "StopPlaceId for the next stop after the current stop (not by plan, but by actual progress, as these sometimes deviate)"
    },
    "tariffZoneNextStop": {
      "$id": "#/properties/tariffZoneNextStop",
      "type": "string",
      "description": "The tariff zone of the next stop. This can be used to determine if the vehicle is leaving a zone."
    }
  }
}
