{
  "$id": "https://schemas.ruter.no/adt/ota/api/v2.1/driver-interaction/assignment-attempt.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "AssignmentAttempt",
  "type": "object",
  "required": [
    "vehicleRef",
    "assignmentType",
    "assignmentCode",
    "apiVersion"
  ],
  "description": "Describes an attempt to sign on or off a block from MADT, another GUI or from the PTO backoffice. The result of this request will be confirmed by the PTA backoffice and the results presented either on the topic ruter/{PTO}/{vehicleID}/oi/current_ block/state or the topic ruter/{PTO}/{vehicleID}/di/assignment_attempt_rejection/block.",
  "additionalProperties": true,
  "properties": {
    "fromDateTime": {
      "$id": "#/properties/fromDateTime",
      "type": "string",
      "description": "Time, according to sheduled departure, from which the sign on/off applies. ISO 8601, UTC. Eg. departure time of block, journey (partial servicing of block) or call on Journey (partial servicing of journey)"
    },
    "vehicleRef": {
      "$id": "#/properties/vehicleRef",
      "type": "string",
      "description": "ID of the vehicle/vessel."
    },
    "blockRef": {
      "$id": "#/properties/blockRef",
      "type": "string",
      "description": "Optional. Not provided for sign off. Otherwise the Block identifier to be signed on. "
    },
    "apiVersion": {
      "$id": "#/properties/apiVersion",
      "type": "string",
      "description": "'v2' for ADT v2.x. Attribute in use by Ruter only. Not part of ITxPT specification."
    },
    "assignmentType": {
      "$id": "#/properties/assignmentType",
      "type": "string",
      "description": "Attribute in use by Ruter only. Not part of ITxPT specification.",
      "examples": [
        "SIGNON",
        "SIGNOFF"
      ]
    },
    "assignmentCode": {
      "$id": "#/properties/assignmentCode",
      "type": "string",
      "description": "Attribute in use by Ruter only. Not part of ITxPT specification.",
      "examples": [
        "PLANNED",
        "EXTRA",
        "SHORTENING",
        "CANCELLED",
        "BREAKDOWN",
        "FINISHED",
        "REPLACEMENT"
      ]
    }
  }
}
