{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/divvy/json-schema/divvy-create-classification-item-request-dto-schema.json",
  "title": "CreateClassificationItemRequestDto",
  "description": "Create an item",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/divvy-classifications-api-openapi.yml#/components/schemas/CreateClassificationItemRequestDto",
  "required": [
    "name",
    "type"
  ],
  "type": "object",
  "properties": {
    "type": {
      "allOf": [
        {
          "$ref": "#/$defs/ItemTypeRequest"
        },
        {
          "description": "Item type"
        }
      ]
    },
    "shortName": {
      "type": "string",
      "description": "Item short name"
    },
    "name": {
      "minLength": 1,
      "type": "string",
      "description": "Item name"
    },
    "description": {
      "type": "string",
      "description": "Item description"
    },
    "parentId": {
      "type": "string",
      "description": "BILL-generated ID of the parent item. You can set this field if this item is a child object."
    },
    "price": {
      "type": "number",
      "description": "Item price"
    },
    "expenseChartOfAccountId": {
      "type": "string",
      "description": "BILL-generated ID of the chart of accounts for the item when it is used for bills or purchases in your accounting system. The value begins with `0ca`."
    },
    "purchaseDescription": {
      "type": "string",
      "description": "Item description when it is used for bills or purchases in your accounting system"
    },
    "purchaseCost": {
      "type": "number",
      "description": "Item purchase cost set in your accounting system"
    },
    "chartOfAccountId": {
      "type": "string",
      "description": "BILL-generated ID of the chart of accounts for the item. The value begins with `0ca`."
    },
    "taxable": {
      "type": "boolean",
      "description": "Set as `true` if the item is taxable"
    },
    "percentage": {
      "type": "number",
      "description": "Item tax percentage. You can set this field for a set of item `type` values.\n* `DISCOUNT`\n* `SALES_TAX`\n* `OTHER_CHARGE`\n"
    }
  },
  "$defs": {
    "ItemTypeRequest": {
      "type": "string",
      "description": "ItemType.",
      "enum": [
        "UNKNOWN",
        "SERVICE",
        "INVENTORY",
        "NON_INVENTORY",
        "PAYMENT",
        "DISCOUNT",
        "SALES_TAX",
        "SUBTOTAL",
        "OTHER_CHARGE",
        "INVENTORY_ASSEMBLY",
        "GROUP",
        "SALES_TAX_GROUP",
        "FIXED_ASSET",
        "CATEGORY",
        "EXPENSE"
      ]
    }
  }
}