{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/deputy/json-schema/deputy-custom-fields-get-response-schema.json",
  "title": "CustomFieldsGetResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/deputy-custom-fields-api-openapi.yml#/components/schemas/CustomFieldsGetResponse",
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean",
      "title": "successful response"
    },
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/tenantcustom_fieldsv2modelCustomField"
      },
      "title": "a list of custom fields"
    }
  },
  "$defs": {
    "modelRecordType": {
      "type": "string",
      "enum": [
        "ROSTER",
        "TIMESHEET",
        "EMPLOYEE"
      ],
      "default": "ROSTER",
      "title": "RecordType (formerly System)"
    },
    "tenantcustom_fieldsv2modelCustomField": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32",
          "title": "Custom Field ID"
        },
        "recordType": {
          "$ref": "#/$defs/modelRecordType",
          "title": "recordType (one of ROSTER or TIMESHEET or EMPLOYEE)"
        },
        "title": {
          "type": "string",
          "title": "title (formerly name)"
        },
        "identifier": {
          "type": "string",
          "title": "identifier (formerly apiName)"
        },
        "dataField": {
          "type": "string",
          "title": "data field (formerly deputyField)"
        },
        "sortOrder": {
          "type": "integer",
          "format": "int32",
          "title": "ranking sort order"
        },
        "defaultValue": {
          "type": "string",
          "title": "default value (formerly default)"
        },
        "type": {
          "type": "integer",
          "format": "int32",
          "title": "type"
        },
        "displayTiming": {
          "type": "integer",
          "format": "int32",
          "title": "display timing"
        },
        "conditionalRules": {
          "type": "string",
          "title": "conditional rules"
        },
        "action": {
          "type": "integer",
          "format": "int32",
          "title": "action"
        },
        "published": {
          "type": "boolean",
          "title": "published"
        },
        "valueList": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "title": "value list for custom fields that can have multiple values"
        },
        "visible": {
          "type": "boolean",
          "title": "visible"
        },
        "triggerScript": {
          "type": "integer",
          "format": "int32",
          "title": "script to trigger custom field value"
        },
        "validation": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "title": "validation"
        },
        "helptext": {
          "type": "string",
          "title": "helptext"
        },
        "areas": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "int32"
          },
          "title": "area ids this custom field applies to"
        },
        "creator": {
          "type": "integer",
          "format": "int32",
          "title": "creator"
        },
        "createdAt": {
          "type": "string",
          "title": "date the custom field was created, format ISO8601 eg 2012-12-18T13:45:00+01:00"
        },
        "modifiedAt": {
          "type": "string",
          "title": "date the custom field was modified, format ISO8601 eg 2012-12-18T13:45:00+01:00"
        },
        "employeeVisible": {
          "type": "boolean"
        }
      },
      "title": "CustomField"
    }
  }
}