{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/loadsmart/json-schema/loadsmart-asset-container-schema.json",
  "title": "AssetContainer",
  "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/AssetContainer",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique identifier of the record",
      "readOnly": true
    },
    "createDateTime": {
      "format": "date-time",
      "type": "string",
      "description": "The date and time when the record was created",
      "readOnly": true
    },
    "createdBy": {
      "type": "object",
      "description": "The ID of the user who created the record",
      "readOnly": true
    },
    "lastChangedDateTime": {
      "format": "date-time",
      "type": "string",
      "description": "The date and time when the record was last changed",
      "readOnly": true
    },
    "type": {
      "$ref": "#/$defs/AssetContainerType"
    },
    "state": {
      "$ref": "#/$defs/AssetContainerState"
    },
    "code": {
      "type": "string",
      "description": "The code of the asset container"
    },
    "notes": {
      "type": "string",
      "description": "Extra data about the asset container"
    },
    "lastLocationCheckConfirmedAt": {
      "type": "object",
      "description": "When a yard location check last confirmed the container present (server-set only; not generic “seen”).",
      "format": "date-time"
    },
    "assetVisitId": {
      "type": "string",
      "format": "uuid",
      "description": "The id of the asset visit"
    },
    "orgId": {
      "type": "string",
      "format": "uuid"
    },
    "warehouseId": {
      "type": "string",
      "format": "uuid",
      "description": "The id of the warehouse"
    },
    "pickupAppointmentId": {
      "type": "string",
      "format": "uuid",
      "description": "The id of the pickup appointment"
    },
    "dropAppointmentId": {
      "type": "string",
      "format": "uuid",
      "description": "The id of the drop appointment"
    },
    "companyId": {
      "type": "string",
      "format": "uuid",
      "description": "The id of the company that owns the asset container"
    }
  },
  "required": [
    "id",
    "createDateTime",
    "createdBy",
    "lastChangedDateTime",
    "type",
    "code",
    "orgId",
    "warehouseId",
    "pickupAppointmentId"
  ],
  "$defs": {
    "AssetContainerState": {
      "type": "string",
      "description": "The state of the asset container",
      "enum": [
        "Full",
        "Empty",
        "Partially Loaded"
      ]
    },
    "AssetContainerType": {
      "type": "string",
      "description": "The type of the asset container",
      "enum": [
        "Trailer",
        "Container",
        "Oversized",
        "Chassis",
        "Reefer",
        "Other"
      ]
    }
  }
}