{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/autodesk/json-schema/autodesk-form-schema.json",
  "title": "Form",
  "description": "A form instance.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/autodesk-aps-construction-forms-openapi.yml#/components/schemas/Form",
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "The current status of the form. Note that forms are created in draft status. Possible values: draft: you can edit forms. inReview: you cannot edit forms, however, they can be approved by form reviewers. submitted: forms are closed and no longer editable. archived forms are not edtiable and hidden in the UI.",
      "enum": [
        "draft",
        "inReview",
        "submitted",
        "archived"
      ]
    },
    "id": {
      "type": "string",
      "description": "The unique identifier of the form."
    },
    "projectId": {
      "type": "string",
      "description": "The unique identifier of the project the form belongs to."
    },
    "formNum": {
      "type": "integer",
      "description": "A chronological user-fiendly identifier of the form within the project e.g. form"
    },
    "formDate": {
      "type": "string",
      "description": "Date the form pertains to."
    },
    "assigneeId": {
      "type": "string",
      "description": "The unique identifier of the user, role, or company the form is assigned to."
    },
    "assigneeType": {
      "$ref": "#/$defs/AssigneeType"
    },
    "locationId": {
      "type": "string",
      "description": "Location identifier associated with the form. For more information about the location, see GET nodes."
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "The date when the form was last updated, UTC date and time in ISO-8601 format."
    },
    "createdBy": {
      "type": "string",
      "description": "The unique identifier of the user who created the form."
    },
    "notes": {
      "type": "string",
      "description": "Text for the form's notes section."
    },
    "description": {
      "type": "string",
      "description": "Text for the form's description section."
    },
    "name": {
      "type": "string",
      "description": "The name of the form instance. Max length: 100."
    },
    "formTemplate": {
      "$ref": "#/$defs/FormTemplateInfo"
    },
    "pdfValues": {
      "type": "array",
      "description": "For PDF forms, values extracted from fields in the PDF.",
      "items": {
        "$ref": "#/$defs/PdfValue"
      }
    },
    "pdfUrl": {
      "type": "string",
      "description": "For PDF forms, the URL to download the form's PDF."
    },
    "weather": {
      "$ref": "#/$defs/FormWeather"
    },
    "tabularValues": {
      "type": [
        "object",
        "null"
      ],
      "description": "Tabular field values for the form's built-in tables, keyed by table name. Not documented in the API reference; observed in example responses. Each table's value may be null if it has no rows.",
      "properties": {
        "worklogEntries": {
          "type": [
            "array",
            "null"
          ],
          "items": {},
          "description": "Work log table rows for the form, or null if none exist."
        },
        "materialsEntries": {
          "type": [
            "array",
            "null"
          ],
          "items": {},
          "description": "Materials table rows for the form, or null if none exist."
        },
        "equipmentEntries": {
          "type": [
            "array",
            "null"
          ],
          "items": {},
          "description": "Equipment table rows for the form, or null if none exist."
        }
      }
    },
    "customValues": {
      "type": "array",
      "description": "For non-PDF forms, data stored in the form fields.",
      "items": {
        "$ref": "#/$defs/CustomValue"
      }
    },
    "lastReopenedBy": {
      "type": "string",
      "description": "Unique identifier for the user that last re-opened the Form (if applicable)."
    },
    "lastSubmitterSignature": {
      "type": "string",
      "description": "Signature of the reviewer who last submitted the Form (if applicable). Signature value (base64 encoded SVG)."
    },
    "userCreatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp when the form was created on the client device or external system. This may differ from createdAt if the form was created offline and synced later. UTC date and time in ISO-8601 format."
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp when the form was received and stored on the server. UTC date and time in ISO-8601 format."
    }
  },
  "$defs": {
    "AssigneeType": {
      "type": "string",
      "description": "Type of entity the form is assigned to. Possible values: company, role, user",
      "enum": [
        "company",
        "role",
        "user"
      ]
    },
    "CustomValue": {
      "type": "object",
      "description": "For non-PDF forms, data stored in a form field.",
      "properties": {
        "fieldId": {
          "type": "string",
          "description": "The unique identifier of the field."
        },
        "sectionLabel": {
          "type": "string",
          "description": "Name of the section containing this field."
        },
        "itemLabel": {
          "type": "string",
          "description": "The field's label or question text."
        },
        "valueName": {
          "$ref": "#/$defs/ValueName"
        },
        "toggleVal": {
          "$ref": "#/$defs/ToggleVal"
        },
        "textVal": {
          "type": "string",
          "description": "A text value."
        },
        "arrayVal": {
          "type": "string",
          "description": "Multi select values."
        },
        "numberVal": {
          "type": "number",
          "description": "A numeric value."
        },
        "choiceVal": {
          "type": "string",
          "description": "A single select value."
        },
        "dateVal": {
          "type": "string",
          "description": "A date value."
        },
        "svgVal": {
          "type": "string",
          "description": "A signature value (base64 encoded SVG)."
        },
        "notes": {
          "type": "string",
          "description": "Text for the field's notes section. Max length: 8000."
        }
      }
    },
    "FormHourlyWeather": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "Unique identifier."
        },
        "hour": {
          "type": "string",
          "description": "Hour of the day for this forecast."
        },
        "temp": {
          "type": "number",
          "description": "Temperature during specified hour."
        },
        "windSpeed": {
          "type": "number",
          "description": "Average wind speed."
        },
        "windBearing": {
          "type": "integer",
          "description": "Direction of the wind, in degrees."
        },
        "humidity": {
          "type": "number",
          "description": "A percentage value indicating the humidity."
        },
        "fetchedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "The date when weather was fetched from weather API."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "The date when weather was first fetched."
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The date when the weather was last updated."
        }
      }
    },
    "FormTemplateInfo": {
      "type": "object",
      "description": "Information about the form's template.",
      "properties": {
        "status": {
          "type": "string",
          "description": "Possible values: active, inactive, deleted",
          "enum": [
            "active",
            "inactive",
            "deleted"
          ]
        },
        "id": {
          "type": "string",
          "description": "The unique identifier of the template."
        },
        "projectId": {
          "type": "string",
          "description": "Unique indentifier of the project the template belongs to."
        },
        "name": {
          "type": "string",
          "description": "Name of the form template."
        },
        "templateType": {
          "type": "string",
          "description": "User defined type of the form template."
        }
      }
    },
    "FormWeather": {
      "type": "object",
      "description": "Weather forecast captured on the form.",
      "properties": {
        "summaryKey": {
          "type": "string",
          "description": "A code describing the weather conditions. For weather data from DarkSky (legacy), possible values are: clear, rain, snow, sleet, wind, fog, cloudy, partlyCloudy. For weather data from WeatherKit, values come from Apple's WeatherCondition codes and include: Clear, MostlyClear, PartlyCloudy, MostlyCloudy, Cloudy, Rain, HeavyRain, Drizzle, Snow, HeavySnow, Flurries, Sleet, FreezingRain, FreezingDrizzle, Hail, Thunderstorms, IsolatedThunderstorms, ScatteredThunderstorms, StrongStorms, Windy, Breezy, Foggy, Haze, Smoky, Blizzard, BlowingDust, BlowingSnow, TropicalStorm, Hurricane, SunShowers, Hot, Frigid, WintryMix. Check the provider field to determine which value set to expect. Additional values may appear as Apple's WeatherKit condition codes evolve.\n"
        },
        "precipitationAccumulation": {
          "type": "number",
          "description": "Amount of precipitation accumulated throughout the day."
        },
        "precipitationAccumulationUnit": {
          "type": "string",
          "description": "Indicates the measurement unit of the precipitationAccumulation."
        },
        "temperatureMin": {
          "type": "number",
          "description": "Minimum temperature during the day."
        },
        "temperatureMax": {
          "type": "number",
          "description": "Maximum temperature during the day."
        },
        "temperatureUnit": {
          "type": "string",
          "description": "Indicates the measurement unit of the temperature values e.g. temperatureMin, temperatureMax, temp."
        },
        "humidity": {
          "type": "number",
          "description": "A percentage value indicating the humidity over the course of the day."
        },
        "windSpeed": {
          "type": "number",
          "description": "Average wind speed observed throughout the day."
        },
        "windGust": {
          "type": "number",
          "description": "Maximum wind speed observed throughout the day."
        },
        "speedUnit": {
          "type": "string",
          "description": "Indicates the measurement unit of the windSpeed and windGust."
        },
        "windBearing": {
          "type": "number",
          "description": "Direction of the wind, in degrees."
        },
        "hourlyWeather": {
          "type": "array",
          "description": "Weather information for specific hours (07:00:00, 12:00:00, 16:00:00).",
          "items": {
            "$ref": "#/$defs/FormHourlyWeather"
          }
        },
        "provider": {
          "type": "string",
          "description": "Indicates the source of the weather data. Possible values: darksky, weatherkit",
          "enum": [
            "darksky",
            "weatherkit"
          ]
        }
      }
    },
    "PdfValue": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the PDF field."
        },
        "value": {
          "type": [
            "string",
            "null"
          ],
          "description": "The value of the PDF field. The value can be null if the field is empty or does not have an extracted value."
        }
      }
    },
    "ToggleVal": {
      "type": "string",
      "description": "A boolean like enum value. Possible values: Yes, No, False, True, Minus, Plus, Fail, Pass, NA",
      "enum": [
        "Yes",
        "No",
        "False",
        "True",
        "Minus",
        "Plus",
        "Fail",
        "Pass",
        "NA"
      ]
    },
    "ValueName": {
      "type": "string",
      "description": "Indicates the type of value used for this item. Possible values: textVal, toggleVal, arrayVal, numberVal, choiceVal, dateVal, svgVal",
      "enum": [
        "textVal",
        "toggleVal",
        "arrayVal",
        "numberVal",
        "choiceVal",
        "dateVal",
        "svgVal"
      ]
    }
  }
}