{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/quickbooks/json-schema/quickbooks-departmentrequest-schema.json",
  "title": "departmentrequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/quickbooks-department-api-openapi.yml#/components/schemas/departmentrequest",
  "type": "object",
  "properties": {
    "Name": {
      "type": "string",
      "description": "User recognizable name for the department.",
      "x-intuit-required": "Required"
    },
    "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"
    }
  },
  "required": [
    "Name"
  ],
  "$defs": {
    "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"
      ]
    }
  }
}