{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/wearewarp-com/main/json-schema/wearewarp-com-get-events-success-schema.json",
  "title": "GetEventsSuccess",
  "x-generated": "2026-10-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/wearewarp-com-freight-openapi.json#/components/schemas/GetEventsSuccess",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "description": "Tracking events, oldest first.",
      "items": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "Human readable description of the event."
          },
          "when": {
            "type": "string",
            "format": "date-time",
            "description": "Time the event happened."
          },
          "createdWhen": {
            "type": "string",
            "format": "date-time",
            "description": "Time the event was recorded."
          },
          "eventName": {
            "type": "string",
            "description": "Shipment status reached by the event, or an appointment event.",
            "enum": [
              "needCarrier",
              "booked",
              "dispatched",
              "arrivedAtPickup",
              "pickupSuccessful",
              "pickupFailed",
              "inRouteToDropoff",
              "arrivedAtDropoff",
              "dropoffSuccessful",
              "dropoffFailed",
              "complete",
              "returnInitiated",
              "inRouteToReturn",
              "arrivedAtReturn",
              "returned",
              "canceled",
              "inRouteToWareHouse",
              "arrivedAtWareHouse",
              "departedFromWarehouse",
              "inTransit",
              "receivedAtFacility",
              "departedFacility",
              "failedAtFacility",
              "requireAppointmentAtPickup",
              "requireAppointmentAtDelivery",
              "updateAppointmentTimeAtPickup",
              "updateAppointmentTimeAtDelivery",
              "appointmentConfirmationSentAtPickup",
              "appointmentConfirmationSentAtDelivery",
              "appointmentCanceledAtPickup",
              "appointmentCanceledAtDelivery",
              "appointmentCancellationSentAtPickup",
              "appointmentCancellationSentAtDelivery",
              "appointmentRequestUnansweredAtPickup",
              "appointmentRequestUnansweredAtDelivery",
              "appointmentRequestSendFailedAtPickup",
              "appointmentRequestSendFailedAtDelivery"
            ]
          },
          "details": {
            "type": "object",
            "description": "Only present on appointment events.",
            "properties": {
              "appointmentInfo": {
                "$ref": "#/$defs/TimeWindow"
              },
              "contactType": {
                "type": "string",
                "description": "How the appointment was arranged.",
                "enum": [
                  "phone",
                  "sms",
                  "email",
                  "link",
                  "ob_phone"
                ]
              }
            }
          }
        }
      }
    }
  },
  "$defs": {
    "TimeWindow": {
      "type": "object",
      "required": [
        "from",
        "to"
      ],
      "properties": {
        "from": {
          "type": "string",
          "format": "date-time",
          "description": "Starting time of the window in ISO format"
        },
        "to": {
          "type": "string",
          "format": "date-time",
          "description": "Ending time of the window in ISO format"
        }
      }
    }
  }
}