{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/loadsmart/json-schema/loadsmart-user-schema.json",
  "title": "User",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/loadsmart-carrier-users-api-openapi.yml#/components/schemas/User",
  "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
    },
    "role": {
      "type": "string",
      "enum": [
        "role_owner",
        "role_admin",
        "role_operator",
        "role_attendant",
        "role_spectator",
        "role_yard_driver",
        "role_carrier_admin",
        "role_carrier",
        "role_base"
      ]
    },
    "appointments": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Appointment"
      }
    },
    "company": {
      "type": "Company"
    },
    "orgCarrierSettings": {
      "type": "array",
      "items": {
        "type": "OrgCarrierSettings"
      }
    },
    "org": {
      "type": "Org"
    },
    "warehouseAccessList": {
      "type": "UUID"
    },
    "tcConfirmedAt": {
      "format": "date-time",
      "type": "string"
    }
  },
  "required": [
    "id",
    "createDateTime",
    "createdBy",
    "lastChangedDateTime"
  ],
  "$defs": {
    "Appointment": {
      "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": {
          "type": "string",
          "enum": [
            "Standard",
            "Reserve"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "NoShow",
            "Cancelled",
            "Requested",
            "Scheduled",
            "Arrived",
            "InProgress",
            "Completed"
          ]
        },
        "user": {
          "$ref": "#/$defs/User"
        },
        "userId": {
          "type": "object"
        },
        "loadType": {
          "type": "LoadType"
        },
        "loadTypeId": {
          "type": "string"
        },
        "dock": {
          "type": "Dock"
        },
        "org": {
          "type": "Org"
        },
        "orgId": {
          "type": "string"
        },
        "end": {
          "format": "date-time",
          "type": "string"
        },
        "eta": {
          "format": "date-time",
          "type": "string"
        },
        "refNumber": {
          "type": "string"
        },
        "refNumbers": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "customFields": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "notes": {
          "type": "object"
        },
        "ccEmails": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "recurringParentId": {
          "type": "string"
        },
        "recurringParent": {
          "$ref": "#/$defs/Appointment"
        },
        "recurringChildren": {
          "$ref": "#/$defs/Appointment"
        },
        "recurringPattern": {
          "type": "object"
        },
        "reschedules": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "muteNotifications": {
          "type": "boolean"
        },
        "isCheckedInByCarrier": {
          "type": "boolean"
        }
      },
      "required": [
        "id",
        "createDateTime",
        "createdBy",
        "lastChangedDateTime"
      ]
    },
    "User": {
      "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
        },
        "role": {
          "type": "string",
          "enum": [
            "role_owner",
            "role_admin",
            "role_operator",
            "role_attendant",
            "role_spectator",
            "role_yard_driver",
            "role_carrier_admin",
            "role_carrier",
            "role_base"
          ]
        },
        "appointments": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Appointment"
          }
        },
        "company": {
          "type": "Company"
        },
        "orgCarrierSettings": {
          "type": "array",
          "items": {
            "type": "OrgCarrierSettings"
          }
        },
        "org": {
          "type": "Org"
        },
        "warehouseAccessList": {
          "type": "UUID"
        },
        "tcConfirmedAt": {
          "format": "date-time",
          "type": "string"
        }
      },
      "required": [
        "id",
        "createDateTime",
        "createdBy",
        "lastChangedDateTime"
      ]
    }
  }
}