{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/loadsmart/json-schema/loadsmart-appointment-list-item-dto-schema.json",
  "title": "AppointmentListItemDto",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/loadsmart-appointments-api-openapi.yml#/components/schemas/AppointmentListItemDto",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "createDateTime": {
      "type": "string",
      "format": "date-time"
    },
    "createdBy": {
      "type": "string",
      "format": "uuid"
    },
    "lastChangedDateTime": {
      "type": "string",
      "format": "date-time"
    },
    "lastChangedBy": {
      "type": "string",
      "format": "uuid"
    },
    "isActive": {
      "type": "boolean"
    },
    "tags": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      }
    },
    "type": {
      "type": "string",
      "enum": [
        "Standard",
        "Reserve"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "NoShow",
        "Cancelled",
        "Requested",
        "Scheduled",
        "Arrived",
        "InProgress",
        "Completed"
      ]
    },
    "statusTimeline": {
      "$ref": "#/$defs/StatusTimelineDto"
    },
    "userId": {
      "type": [
        "object",
        "null"
      ],
      "format": "uuid"
    },
    "loadTypeId": {
      "type": "string",
      "format": "uuid"
    },
    "dockId": {
      "type": "string",
      "format": "uuid"
    },
    "orgId": {
      "type": "string",
      "format": "uuid"
    },
    "start": {
      "type": "string",
      "format": "date-time"
    },
    "end": {
      "type": "string",
      "format": "date-time"
    },
    "eta": {
      "type": [
        "object",
        "null"
      ],
      "format": "date-time"
    },
    "refNumber": {
      "type": "string"
    },
    "refNumbers": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "customFields": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CustomFieldDto"
      }
    },
    "notes": {
      "type": [
        "object",
        "null"
      ]
    },
    "ccEmails": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "recurringParentId": {
      "type": [
        "object",
        "null"
      ],
      "format": "uuid"
    },
    "recurringPattern": {
      "type": [
        "object",
        "null"
      ]
    },
    "reschedules": {
      "type": [
        "object",
        "null"
      ]
    },
    "confirmationNumber": {
      "type": "string"
    },
    "muteNotifications": {
      "type": "boolean"
    },
    "isCheckedInByCarrier": {
      "type": "boolean"
    },
    "metadata": {
      "$ref": "#/$defs/AppointmentMetadataDto"
    },
    "units": {
      "type": [
        "object",
        "null"
      ]
    },
    "searchableCustomFields": {
      "type": [
        "object",
        "null"
      ]
    },
    "recurringParent": {
      "type": [
        "object",
        "null"
      ]
    },
    "recurringChildren": {
      "description": "Child appointments in a recurring series (only present when relation is loaded)",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "object"
      }
    }
  },
  "required": [
    "id",
    "createDateTime",
    "createdBy",
    "lastChangedDateTime",
    "isActive",
    "type",
    "status",
    "loadTypeId",
    "dockId",
    "orgId",
    "start",
    "end",
    "confirmationNumber",
    "muteNotifications",
    "isCheckedInByCarrier"
  ],
  "$defs": {
    "AppointmentMetadataDto": {
      "type": "object",
      "properties": {
        "unitLimitBreached": {
          "type": "boolean"
        },
        "externalValidationFailed": {
          "type": "boolean"
        },
        "externalValidationErrorMessage": {
          "type": [
            "object",
            "null"
          ]
        },
        "unitLimitOverrideReason": {
          "type": [
            "object",
            "null"
          ]
        },
        "clonedFromId": {
          "type": [
            "object",
            "null"
          ],
          "format": "uuid"
        }
      }
    },
    "CustomFieldDto": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "placeholder": {
          "type": "string"
        },
        "dropDownValues": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "hiddenFromCarrier": {
          "type": "boolean"
        },
        "requiredForCarrier": {
          "type": "boolean"
        },
        "requiredForWarehouse": {
          "type": "boolean"
        },
        "value": {
          "type": "object",
          "description": "Field value — type depends on the custom field type"
        }
      },
      "required": [
        "name",
        "type",
        "label"
      ]
    },
    "StatusTimelineDto": {
      "type": "object",
      "properties": {
        "NoShow": {
          "type": [
            "object",
            "null"
          ],
          "format": "date-time"
        },
        "Arrived": {
          "type": [
            "object",
            "null"
          ],
          "format": "date-time"
        },
        "Cancelled": {
          "type": [
            "object",
            "null"
          ],
          "format": "date-time"
        },
        "Completed": {
          "type": [
            "object",
            "null"
          ],
          "format": "date-time"
        },
        "Requested": {
          "type": [
            "object",
            "null"
          ],
          "format": "date-time"
        },
        "Scheduled": {
          "type": [
            "object",
            "null"
          ],
          "format": "date-time"
        },
        "InProgress": {
          "type": [
            "object",
            "null"
          ],
          "format": "date-time"
        }
      }
    }
  }
}