{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/autodesk-construction-cloud/json-schema/autodesk-construction-cloud-form-v2-schema.json",
  "title": "FormV2",
  "description": "A form instance.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/autodesk-construction-cloud-forms-openapi.yml#/components/schemas/FormV2",
  "type": "object",
  "properties": {
    "formTemplateId": {
      "type": "string",
      "format": "uuid",
      "description": "Unique identifier of template the form belongs to."
    },
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Unique identifier of the form."
    },
    "status": {
      "type": "string",
      "description": "Current state of the form e.g. inProgress. Note: the GET Forms (v2) page documents this field with possible values draft, inReview, submitted, archived, while the batch-update and batch-delete (v2) pages document the same field with possible values inProgress, discarded, closed, inReview, archived. Both sets are included here; see the report for details.",
      "enum": [
        "draft",
        "inReview",
        "submitted",
        "archived",
        "inProgress",
        "discarded",
        "closed"
      ]
    },
    "formNum": {
      "type": "integer",
      "description": "Unique identifier of form, autoincremental, unique per project."
    },
    "formDate": {
      "type": "string",
      "description": "Date the Form is created for."
    },
    "assigneeId": {
      "type": "string",
      "description": "ID of the entity form is assigned to."
    },
    "assigneeType": {
      "$ref": "#/$defs/AssigneeType"
    },
    "dueDate": {
      "type": "string",
      "description": "Date the Form is due."
    },
    "locationId": {
      "type": "string",
      "format": "uuid",
      "description": "The unique identifier of the Form's location."
    },
    "createdBy": {
      "type": "string",
      "description": "User ID that created the Form."
    },
    "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."
    },
    "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."
    },
    "notes": {
      "type": "string",
      "description": "Form notes."
    },
    "description": {
      "type": "string",
      "description": "Form description."
    },
    "name": {
      "type": "string",
      "description": "Form name."
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "When form was last updated, UTC date and time in ISO-8601 format."
    },
    "updatedBy": {
      "type": "string",
      "description": "User ID that last updated the Form."
    },
    "weatherId": {
      "type": "integer",
      "description": "Unique identifier of weather associated with this form."
    },
    "lastSubmitterSignature": {
      "type": "string",
      "description": "Signature of the reviewer who last submitted the Form (if applicable). Signature value (base64 encoded SVG)."
    },
    "lastSubmittedBy": {
      "type": "string",
      "description": "User ID that last submitted the Form."
    },
    "lastSubmittedAt": {
      "type": "string",
      "format": "date-time",
      "description": "When form was last submitted (if applicable), UTC date and time in ISO-8601 format."
    },
    "lastReopenedBy": {
      "type": "string",
      "description": "User ID that re-opened the Form (if applicable)."
    },
    "lastStatusChanges": {
      "$ref": "#/$defs/LastStatusChanges"
    },
    "nativeForm": {
      "$ref": "#/$defs/NativeForm"
    },
    "pdfFile": {
      "$ref": "#/$defs/PdfFile"
    },
    "lastFetchedAt": {
      "type": "string",
      "format": "date-time",
      "description": "When form was retrieved from the API, 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."
        }
      }
    },
    "LastStatusChanges": {
      "type": "object",
      "description": "Contains the last transition into each status. Since a form can transition between statuses multiple times (e.g., reopened from closed back to inProgress), this shows the most recent transition for each status the form has been in.",
      "properties": {
        "previousStatus": {
          "type": "string",
          "description": "The status the form was in before the current status."
        },
        "inProgress": {
          "allOf": [
            {
              "$ref": "#/$defs/StatusChange"
            }
          ],
          "description": "The last time the form transitioned into inProgress status."
        },
        "inReview": {
          "allOf": [
            {
              "$ref": "#/$defs/StatusChange"
            }
          ],
          "description": "The last time the form transitioned into inReview status."
        },
        "closed": {
          "allOf": [
            {
              "$ref": "#/$defs/StatusChange"
            }
          ],
          "description": "The last time the form transitioned into closed status."
        },
        "archived": {
          "allOf": [
            {
              "$ref": "#/$defs/StatusChange"
            }
          ],
          "description": "The last time the form transitioned into archived status."
        },
        "discarded": {
          "allOf": [
            {
              "$ref": "#/$defs/StatusChange"
            }
          ],
          "description": "The last time the form transitioned into discarded status."
        }
      }
    },
    "LayoutInfo": {
      "type": "object",
      "description": "Information about the layout of this form.",
      "properties": {
        "description": {
          "type": "string",
          "description": "The description of the layout."
        },
        "hasSectionAssignees": {
          "type": "boolean",
          "description": "Determines if section assignment is enabled."
        }
      }
    },
    "NativeForm": {
      "type": "object",
      "description": "Native form data including layout and values. Note: the GET Forms (v2) page documents this as \"Native form data including layout information. To retrieve form field values, use the GET custom values endpoint.\" while the batch-update and batch-delete (v2) pages, whose responses can include nested customValues, document it as \"Native form data including layout and values.\" See the report for details.",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "The form's unique identifier. This is the same value as the top-level form id."
        },
        "layoutId": {
          "type": "string",
          "format": "uuid",
          "description": "Unique identifier of the layout."
        },
        "version": {
          "type": "string",
          "description": "Semantic version indicating the feature set available for this form's template. Clients can use this to determine which features are supported. For example, version 13.0 or higher is required for custom tables support. The Forms App typically uses the highest available version."
        },
        "layoutInfo": {
          "$ref": "#/$defs/LayoutInfo"
        },
        "customValues": {
          "type": "array",
          "description": "Custom form values for Form.",
          "items": {
            "$ref": "#/$defs/CustomValue"
          }
        }
      }
    },
    "PdfFile": {
      "type": "object",
      "description": "PDF file information for the form.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier of the PDF file."
        },
        "fileName": {
          "type": "string",
          "description": "Name of the PDF file."
        },
        "pdfUrl": {
          "type": "string",
          "description": "URL to download the PDF file."
        }
      }
    },
    "StatusChange": {
      "type": "object",
      "properties": {
        "by": {
          "type": "string",
          "description": "User ID who made the status change."
        },
        "at": {
          "type": "string",
          "description": "When the status change occurred, UTC date and time in ISO-8601 format."
        }
      }
    },
    "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"
      ]
    }
  }
}