{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/loadsmart/json-schema/loadsmart-load-type-schema.json",
  "title": "LoadType",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/loadsmart-load-types-api-openapi.yml#/components/schemas/LoadType",
  "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
    },
    "org": {
      "$ref": "#/$defs/LoadType"
    },
    "orgId": {
      "type": "string"
    },
    "direction": {
      "type": "string",
      "enum": [
        "Inbound",
        "Outbound",
        "Inbound/Outbound"
      ]
    },
    "operation": {
      "type": "string",
      "enum": [
        "Live",
        "Drop",
        "Other"
      ]
    },
    "equipmentType": {
      "type": "string",
      "enum": [
        "Dry Van",
        "Flatbed",
        "Reefer",
        "Other"
      ]
    },
    "transportationMode": {
      "type": "string",
      "enum": [
        "FTL",
        "PTL",
        "Other"
      ]
    },
    "allowCarrierScheduling": {
      "type": "boolean"
    },
    "description": {
      "type": "string"
    },
    "settings": {
      "type": "object"
    },
    "schedule": {
      "$ref": "#/$defs/ScheduleDto"
    }
  },
  "required": [
    "id",
    "createDateTime",
    "createdBy",
    "lastChangedDateTime"
  ],
  "$defs": {
    "ClockSpan": {
      "type": "object",
      "properties": {
        "end": {
          "type": "string"
        },
        "start": {
          "type": "string"
        }
      },
      "required": [
        "end",
        "start"
      ]
    },
    "LoadType": {
      "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
        },
        "org": {
          "$ref": "#/$defs/LoadType"
        },
        "orgId": {
          "type": "string"
        },
        "direction": {
          "type": "string",
          "enum": [
            "Inbound",
            "Outbound",
            "Inbound/Outbound"
          ]
        },
        "operation": {
          "type": "string",
          "enum": [
            "Live",
            "Drop",
            "Other"
          ]
        },
        "equipmentType": {
          "type": "string",
          "enum": [
            "Dry Van",
            "Flatbed",
            "Reefer",
            "Other"
          ]
        },
        "transportationMode": {
          "type": "string",
          "enum": [
            "FTL",
            "PTL",
            "Other"
          ]
        },
        "allowCarrierScheduling": {
          "type": "boolean"
        },
        "description": {
          "type": "string"
        },
        "settings": {
          "type": "object"
        },
        "schedule": {
          "$ref": "#/$defs/ScheduleDto"
        }
      },
      "required": [
        "id",
        "createDateTime",
        "createdBy",
        "lastChangedDateTime"
      ]
    },
    "ScheduleDto": {
      "type": "object",
      "properties": {
        "sunday": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ClockSpan"
          }
        },
        "monday": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ClockSpan"
          }
        },
        "tuesday": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ClockSpan"
          }
        },
        "wednesday": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ClockSpan"
          }
        },
        "thursday": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ClockSpan"
          }
        },
        "friday": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ClockSpan"
          }
        },
        "saturday": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ClockSpan"
          }
        },
        "version": {
          "type": "number"
        },
        "closedIntervals": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TimeInterval"
          }
        }
      },
      "required": [
        "sunday",
        "monday",
        "tuesday",
        "wednesday",
        "thursday",
        "friday",
        "saturday",
        "version",
        "closedIntervals"
      ]
    },
    "TimeInterval": {
      "type": "object",
      "properties": {
        "end": {
          "format": "date-time",
          "type": "string"
        },
        "start": {
          "format": "date-time",
          "type": "string"
        }
      },
      "required": [
        "end",
        "start"
      ]
    }
  }
}