{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/divvy/json-schema/divvy-custom-field-response-dto-schema.json",
  "title": "CustomFieldResponseDto",
  "description": "DTO representing a custom field response.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/divvy-custom-fields-api-openapi.yml#/components/schemas/CustomFieldResponseDto",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "BILL-generated ID of the custom field",
      "deprecated": true
    },
    "uuid": {
      "type": "string",
      "description": "BILL-generated UUID of the custom field"
    },
    "name": {
      "type": "string",
      "description": "Custom field name"
    },
    "description": {
      "type": "string",
      "description": "Custom field description"
    },
    "type": {
      "allOf": [
        {
          "$ref": "#/$defs/CustomFieldType"
        },
        {
          "description": "Custom field type.\nn* `CUSTOM_SELECTOR`: Select one value from the list (or multiple values when `multiSelect` is true)\n* `NOTE`: Write a per-transaction custom note.\n\n**Note**: Currently, BILL does not support creating additional custom fields with `type` set as `NOTE`."
        }
      ]
    },
    "multiSelect": {
      "type": "boolean",
      "description": "Set as `true` if the custom field can have multiple selected values"
    },
    "allowCustomValues": {
      "type": "boolean",
      "description": "Set as `true` if the custom field can have custom values"
    },
    "minimumAmountForRequirement": {
      "type": "number",
      "description": "Minimum transaction amount where the custom field is required"
    },
    "required": {
      "type": "boolean",
      "description": "Set as `true` if the custom field is required for all budgets. The default value is `false`."
    },
    "global": {
      "type": "boolean",
      "description": "Set as `true` if the custom field applies to all budgets. The default value is `false`."
    },
    "retired": {
      "type": "boolean",
      "description": "Set as `true` if the custom field is retired"
    },
    "createdTime": {
      "type": "string",
      "description": "Created date and time",
      "format": "date-time"
    },
    "selectedBudgetIds": {
      "type": "array",
      "description": "List of BILL-generated ID values of budgets where the custom field is available",
      "deprecated": true,
      "items": {
        "type": "string"
      }
    },
    "selectedBudgetUuids": {
      "type": "array",
      "description": "List of BILL-generated UUID values of budgets where the custom field is available",
      "items": {
        "type": "string"
      }
    },
    "requiredBudgetIds": {
      "type": "array",
      "description": "List of BILL-generated ID values of budgets where the custom field is required",
      "deprecated": true,
      "items": {
        "type": "string"
      }
    },
    "requiredBudgetUuids": {
      "type": "array",
      "description": "List of BILL-generated UUID values of budgets where the custom field is required",
      "items": {
        "type": "string"
      }
    }
  },
  "$defs": {
    "CustomFieldType": {
      "type": "string",
      "description": "Enum representing the custom field kind in the Spend API.",
      "enum": [
        "CUSTOM_SELECTOR",
        "NOTE"
      ]
    }
  }
}