{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/quickbooks/json-schema/quickbooks-departmentresponse-schema.json",
  "title": "departmentresponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/quickbooks-department-api-openapi.yml#/components/schemas/departmentresponse",
  "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": "User recognizable name for the Department.",
      "x-intuit-required": "Required"
    },
    "FullyQualifiedName": {
      "type": "string",
      "description": "Fully qualified name of the entity. The fully qualified name prepends the topmost parent, followed by each sub element separated by colons. Takes the form of Parent:Department1:SubDepartment1:SubDepartment2. Limited to 5 levels.",
      "x-intuit-filterable": true,
      "x-intuit-sortable": true
    },
    "SubDepartment": {
      "type": "boolean",
      "description": "Specifies whether this Department object is a SubDepartment.\ntrue--SubDepartment.\nfalse or null--top-level Department.",
      "x-intuit-default": "false",
      "x-intuit-sortable": true
    },
    "ParentRef": {
      "allOf": [
        {
          "$ref": "#/$defs/referencetype"
        }
      ],
      "description": "The immediate parent of the SubDepartment.\nRequired for the create operation if this object is a SubDepartment. Required if this object is a subdepartment.",
      "x-intuit-required": "Conditionally required"
    },
    "Active": {
      "type": "boolean",
      "description": "If true, this entity is currently enabled for use by QuickBooks. If set to false, this entity is not available.",
      "x-intuit-required": "Optional",
      "x-intuit-default": "true",
      "x-intuit-filterable": true,
      "x-intuit-sortable": true
    },
    "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 object. The MetaData values are set by Data Services and are read only for all applications.",
      "x-intuit-required": "Optional",
      "x-intuit-filterable": true,
      "x-intuit-sortable": true
    }
  },
  "required": [
    "Name"
  ],
  "$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"
      ]
    }
  }
}