{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/quickbooks/json-schema/quickbooks-budgetrequest-schema.json",
  "title": "budgetrequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/quickbooks-budget-api-openapi.yml#/components/schemas/budgetrequest",
  "type": "object",
  "properties": {
    "BudgetDetail": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/budgetdetail"
      },
      "description": "Container for the budget items.",
      "x-intuit-required": "Optional"
    },
    "BudgetEntryType": {
      "type": "string",
      "description": "Period that this budget detail covers..\n Valid values include: Monthly, Quarterly, Annually.",
      "x-intuit-required": "Optional"
    },
    "EndDate": {
      "type": "string",
      "format": "date-time",
      "description": "Budget end date.",
      "x-intuit-required": "Required"
    },
    "Name": {
      "type": "string",
      "description": "User recognizable name for the Account.\nAccount.Name attribute must not contain double quotes (\") or colon (:).",
      "x-intuit-required": "Optional",
      "x-intuit-filterable": true,
      "x-intuit-sortable": true
    },
    "StartDate": {
      "type": "string",
      "format": "date-time",
      "description": "Budget begin date.",
      "x-intuit-required": "Required"
    },
    "BudgetType": {
      "type": "string",
      "description": "Budget types.\n The only value currently supported is ProfitAndLoss.",
      "x-intuit-required": "Optional",
      "x-intuit-filterable": true,
      "x-intuit-sortable": true
    },
    "CustomExtensions": {
      "allOf": [
        {
          "$ref": "#/$defs/customextensions"
        }
      ],
      "description": "Array of custom extension objects that associate additional attributes with the item. The ExtensionType field specifies the type of extension. The currently supported value is DIMENSION. The AssociatedValues array contains key/value pairs referencing Dimensions DefinitionID/Dimension ValueID. Multiple key/value pairs per extension type are supported. This field is designed to support additional extension types in the future. Dimensions is available for Intuit Enterprise Suite.",
      "x-intuit-required": "Optional"
    }
  },
  "required": [
    "EndDate",
    "StartDate"
  ],
  "$defs": {
    "associatedvalues": {
      "type": "object",
      "title": "associatedvalues",
      "properties": {
        "Value": {
          "type": "string",
          "description": "For ExtensionType=DIMENSION, the unique ID of the selected dimension value.",
          "x-intuit-required": "Required"
        },
        "Key": {
          "type": "string",
          "description": "For ExtensionType=DIMENSION, the unique ID of the dimension definition.",
          "x-intuit-required": "Required"
        }
      },
      "required": [
        "Key",
        "Value"
      ]
    },
    "budgetdetail": {
      "type": "object",
      "title": "budgetdetail",
      "properties": {
        "ClassRef": {
          "allOf": [
            {
              "$ref": "#/$defs/referencetype"
            }
          ],
          "description": "Reference to the Class associated with the transaction. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerLine is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.",
          "x-intuit-required": "Optional"
        },
        "DepartmentRef": {
          "allOf": [
            {
              "$ref": "#/$defs/referencetype"
            }
          ],
          "description": "A reference to a Department object specifying the location of the transaction, as defined using location tracking in QuickBooks Online. Query the Department name list resource to determine the appropriate department object for this reference. Use Department.Id and Department.Name from that object for DepartmentRef.value and DepartmentRef.name, respectively.",
          "x-intuit-required": "Optional"
        },
        "Amount": {
          "type": "number",
          "description": "Amount assigned to a BudgetDetail.",
          "x-intuit-required": "Optional"
        },
        "BudgetDate": {
          "type": "string",
          "format": "date-time",
          "description": "Date of the individual BudgetDetail.",
          "x-intuit-required": "Optional"
        },
        "AccountRef": {
          "allOf": [
            {
              "$ref": "#/$defs/referencetype"
            }
          ],
          "description": "Reference to the Account associated with this BudgetDetail. Query the Account name list resource to determine the appropriate Account object for this reference, where Account.AccountType=Expense. Use Account.Id and Account.Name from that object for AccountRef.value and AccountRef.name, respectively.",
          "x-intuit-required": "Optional"
        },
        "CustomerRef": {
          "allOf": [
            {
              "$ref": "#/$defs/referencetype"
            }
          ],
          "description": "Reference to the Customer associated with this BudgetDetail. Query the Customer name list resource to determine the appropriate Customer object for this reference. Use Customer.Id and Customer.DisplayName from that object for CustomerRef.value and CustomerRef.name, respectively.",
          "x-intuit-required": "Optional"
        }
      }
    },
    "customextensions": {
      "type": "object",
      "title": "customextensions",
      "properties": {
        "AssociatedValues": {
          "allOf": [
            {
              "$ref": "#/$defs/associatedvalues"
            }
          ],
          "description": "Array of key/value pairs associated with this extension. For ExtensionType=DIMENSION, each pair maps a dimension definition (Key) to a dimension value (Value).",
          "x-intuit-required": "Required"
        },
        "ExtensionType": {
          "type": "string",
          "description": "The type of extension applied to the line. Currently supported value: DIMENSION.",
          "x-intuit-required": "Required"
        }
      },
      "required": [
        "AssociatedValues",
        "ExtensionType"
      ]
    },
    "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"
      ]
    }
  }
}