{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/loadsmart/json-schema/loadsmart-asset-container-event-schema.json",
  "title": "AssetContainerEvent",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/loadsmart-asset-container-api-openapi.yml#/components/schemas/AssetContainerEvent",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "orgId": {
      "type": "string",
      "format": "uuid"
    },
    "createDateTime": {
      "type": "string",
      "description": "The date and time when the event was created",
      "format": "date-time"
    },
    "createdBy": {
      "type": "object",
      "format": "uuid",
      "description": "The id of the user who created the event"
    },
    "assetContainerId": {
      "type": "string",
      "format": "uuid",
      "description": "The id of the asset container"
    },
    "assetVisitId": {
      "type": "object",
      "format": "uuid",
      "description": "The id of the asset visit attached (truck)"
    },
    "eventType": {
      "$ref": "#/$defs/AssetContainerEventType"
    }
  },
  "required": [
    "id",
    "orgId",
    "createDateTime",
    "assetContainerId",
    "eventType"
  ],
  "$defs": {
    "AssetContainerEventType": {
      "type": "string",
      "description": "The type of the event",
      "enum": [
        "Arrived",
        "Loading",
        "Loading Complete",
        "Unloading",
        "Unloading Complete",
        "Ready for Pickup",
        "Departed",
        "Inoperable",
        "Missing"
      ]
    }
  }
}