{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/buildertrend/json-schema/buildertrend-task-schema.json",
  "title": "Task",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/buildertrend-openapi.yml#/components/schemas/Task",
  "type": "object",
  "required": [
    "id",
    "title",
    "taskType",
    "status",
    "jobId",
    "jobName",
    "startDate",
    "startTime",
    "endDate",
    "endTime",
    "parentTaskId",
    "parentTaskName",
    "isLocked",
    "hasAttachments"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "title": {
      "type": "string"
    },
    "taskType": {
      "type": "string",
      "enum": [
        "Task",
        "PunchList",
        "ScheduleItem",
        "Unknown"
      ],
      "description": "`Task`, `PunchList` or `ScheduleItem`. `Unknown` covers a type Buildertrend adds before this API names it."
    },
    "status": {
      "type": "string",
      "enum": [
        "NotStarted",
        "Completed",
        "Unknown"
      ]
    },
    "jobId": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "The job's ID, as `GET /v1/jobs` lists it."
    },
    "jobName": {
      "type": [
        "string",
        "null"
      ],
      "description": "`null` in the list response; filled in on the single-task read."
    },
    "startDate": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "startTime": {
      "type": [
        "string",
        "null"
      ],
      "description": "`HH:mm:ss`, the builder's local time. `null` for an all-day task."
    },
    "endDate": {
      "type": [
        "string",
        "null"
      ],
      "format": "date",
      "description": "The due date."
    },
    "endTime": {
      "type": [
        "string",
        "null"
      ],
      "description": "`HH:mm:ss`, the builder's local time. `null` for an all-day task."
    },
    "parentTaskId": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "`null` for top-level tasks."
    },
    "parentTaskName": {
      "type": [
        "string",
        "null"
      ],
      "description": "`null` for top-level tasks."
    },
    "isLocked": {
      "type": "boolean"
    },
    "hasAttachments": {
      "type": "boolean"
    }
  }
}