{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/quickbooks/json-schema/quickbooks-categoryupdaterequest-schema.json",
  "title": "categoryupdaterequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/quickbooks-item-api-openapi.yml#/components/schemas/categoryupdaterequest",
  "type": "object",
  "properties": {
    "SyncToken": {
      "type": "string",
      "description": "Version number of the object. It is used to lock an object for use by one app at a time. As soon as an application modifies an object, its SyncToken is incremented. Attempts to modify an object specifying an older SyncToken fails. Only the latest version of the object is maintained by QuickBooks Online.",
      "x-intuit-required": "Required for update"
    },
    "Name": {
      "type": "string",
      "description": "Name of the category.",
      "x-intuit-required": "Required"
    },
    "Level": {
      "type": "integer",
      "description": "Specifies the level of the hierarchy in which the object is located. First sub-category level below the top-most category is 1. Returned in the response body only when SubItem is set to true.\nSub-categories can be nested to a maximum depth of three levels below a top-level category."
    },
    "FullyQualifiedName": {
      "type": "string",
      "description": "Colon-separated list of the top-level category, followed by each sub-category in the hierarchy. Takes the form of Category:SubCategory1:SubCategory2:.... Limited to 5 levels: 4 category levels with an inventory, non-inventory, or service item as the 5th."
    },
    "SubItem": {
      "type": "boolean",
      "description": "true--The object is a sub-category.\nfalse--The object is a top-level category (default).\nSub-categories can be nested to a maximum depth of three levels below a top-level category. Required if this is a sub-category object.",
      "x-intuit-required": "Conditionally required"
    },
    "ParentRef": {
      "allOf": [
        {
          "$ref": "#/$defs/referencetype"
        }
      ],
      "description": "The immediate parent of the sub item in the hierarchical Category:Sub-category list. If SubItem is true, then ParenRef is required. Query the Item name list resource to determine the appropriate object for this reference. Use Item.Id and Item.Name from that object for ParentRef.value and ParentRef.name, respectively."
    },
    "Active": {
      "type": "boolean",
      "description": "For categories, this is always set to true.",
      "x-intuit-required": "Optional"
    },
    "Type": {
      "type": "string",
      "description": "Must be set to the literal string, Category.",
      "x-intuit-required": "Required"
    },
    "Id": {
      "type": "string",
      "description": "Unique identifier for this object.",
      "x-intuit-required": "Required for update",
      "x-intuit-filterable": true
    },
    "MetaData": {
      "allOf": [
        {
          "$ref": "#/$defs/modificationmetadata"
        }
      ],
      "description": "Descriptive information about the entity. The MetaData values are set by Data Services and are read only for all applications.",
      "x-intuit-required": "Optional"
    }
  },
  "required": [
    "Name",
    "Type"
  ],
  "$defs": {
    "modificationmetadata": {
      "type": "object",
      "title": "modificationmetadata",
      "properties": {
        "CreateTime": {
          "type": "string",
          "format": "date-time",
          "description": "Time the entity was created in the source domain.",
          "x-intuit-filterable": true,
          "x-intuit-sortable": true
        },
        "LastUpdatedTime": {
          "type": "string",
          "format": "date-time",
          "description": "Time the entity was last updated in the source domain.",
          "x-intuit-filterable": true,
          "x-intuit-sortable": true
        }
      }
    },
    "referencetype": {
      "type": "object",
      "title": "referencetype",
      "properties": {
        "name": {
          "type": "string",
          "description": "An identifying name for the object being referenced by value and is derived from the field that holds the common name of that object. This varies by context and specific type of object referenced. For example, references to a Customer object use Customer.DisplayName to populate this field. Optionally returned in responses, implementation dependent.",
          "x-intuit-required": "Optional"
        },
        "value": {
          "type": "string",
          "description": "The ID for the referenced object as found in the Id field of the object payload. The context is set by the type of reference and is specific to the QuickBooks company file.",
          "x-intuit-required": "Required"
        }
      },
      "required": [
        "value"
      ]
    }
  }
}