{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/quickbooks/json-schema/quickbooks-inventoryadjustmentrequest-schema.json",
  "title": "inventoryadjustmentrequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/quickbooks-inventoryadjustment-api-openapi.yml#/components/schemas/inventoryadjustmentrequest",
  "type": "object",
  "properties": {
    "DocNumber": {
      "type": "string",
      "description": "Reference number for the transaction.",
      "x-intuit-required": "Optional"
    },
    "AdjustAccountRef": {
      "allOf": [
        {
          "$ref": "#/$defs/referencetype"
        }
      ],
      "description": "Specifies which account is debited. Query the Account name list resource to determine the appropriate Account object for this reference. Use Account.Id and Account.Name from that object for AdjustAccountRef.value and AdjustAccountRef.name, respectively.",
      "x-intuit-required": "Required"
    },
    "PrivateNote": {
      "type": "string",
      "description": "User entered, organization-private note about the transaction. This note does not appear on the invoice to the customer. This field maps to the Statement Memo field on the Invoice form in the QuickBooks Online UI.",
      "x-intuit-required": "Optional",
      "x-intuit-default": "<span class=\"literal\">ascend</span>"
    },
    "Line": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/line"
      },
      "description": "Individual line items of an inventory adjustment.",
      "x-intuit-required": "Required"
    },
    "TxnDate": {
      "type": "string",
      "format": "date-time",
      "description": "The date entered by the user when this transaction occurred.\nyyyy/MM/dd is the valid date format.\n\nFor posting transactions, this is the posting date that affects the financial statements. If the date is not supplied, the current date on the server is used.\n\nSort order is ASC by default.",
      "x-intuit-required": "Required"
    }
  },
  "required": [
    "AdjustAccountRef",
    "Line",
    "TxnDate"
  ],
  "$defs": {
    "line": {
      "type": "object",
      "title": "line",
      "properties": {
        "Received": {
          "type": "string",
          "description": "Supported for Purchase Order only. The amount/quantity received of the line, which depends on the type of the line. It can represent the received amount or received quantity based on the line type detail. Applies to existing and new entities."
        },
        "LinkedTxn": {
          "type": "array",
          "items": {},
          "description": "Transaction to which the current entity is related. For example, an invoice line may link to a sales order or estimate.",
          "x-intuit-required": "Optional"
        },
        "Description": {
          "type": "string",
          "description": "Free form text description of the line item that appears in the printed record.",
          "x-intuit-required": "Optional"
        },
        "ProjectRef": {
          "allOf": [
            {
              "$ref": "#/$defs/referencetype"
            }
          ],
          "description": "Reference to the Project ID associated with this transaction.",
          "x-intuit-required": "Conditionally required"
        },
        "LineNum": {
          "type": "number",
          "description": "Specifies the position of the line in the collection of transaction lines. Positive integer",
          "x-intuit-required": "Optional"
        },
        "Amount": {
          "type": "number",
          "description": "The amount of the line item.",
          "x-intuit-required": "Required"
        },
        "Id": {
          "type": "string",
          "description": "The Id of the line item. Its use in requests is as folllows:\nIf\nIdis greater than zero and exists for the company, the request is considered an update operation for a line item.\n\nIf no\nIdis provided, the\nIdprovided is less than or equal to zero, or the\nIdprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.\n\nAvailable in all objects that use lines and support the update operation.",
          "x-intuit-required": "Required for update"
        }
      },
      "required": [
        "Amount"
      ]
    },
    "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"
      ]
    }
  }
}