{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/quickbooks/json-schema/quickbooks-attachablerequest-schema.json",
  "title": "attachablerequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/quickbooks-attachable-api-openapi.yml#/components/schemas/attachablerequest",
  "type": "object",
  "properties": {
    "Note": {
      "type": "string",
      "description": "The note is either related to the attachment specified with the FileName attribute, or as a standalone note. Required for note attachments.",
      "x-intuit-required": "Conditionally required",
      "x-intuit-filterable": true,
      "x-intuit-sortable": true
    },
    "AttachableRef": {
      "allOf": [
        {
          "$ref": "#/$defs/attachableref"
        }
      ],
      "description": "Specifies the transaction object to which this attachable file is to be linked.",
      "x-intuit-required": "Optional"
    },
    "FileName": {
      "type": "string",
      "description": "FileName of the attachment. Required for file attachments.",
      "x-intuit-required": "Conditionally required",
      "x-intuit-filterable": true,
      "x-intuit-sortable": true
    }
  },
  "$defs": {
    "attachableref": {
      "type": "object",
      "title": "attachableref",
      "properties": {
        "IncludeOnSend": {
          "type": "boolean",
          "description": "Used when EntityRef.type references a transaction object. This field indicates whether or not the attachment is sent with the transaction when Save and Send button is clicked in the QuickBooks UI or when the Send endpoint (send email) is invoked for the object.",
          "x-intuit-required": "Optional",
          "x-intuit-filterable": true
        },
        "LineInfo": {
          "type": "string",
          "description": "For transaction objects, used to reference a transaction detail line.",
          "x-intuit-required": "Optional",
          "x-intuit-filterable": true
        },
        "NoRefOnly": {
          "type": "boolean",
          "description": "Indicates whether or not to find attachable records that have no references to any entity. Combine with\nAttachableRef.Inactiveto return hidden references.",
          "x-intuit-required": "Optional",
          "x-intuit-filterable": true
        },
        "CustomField": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/customfield"
          },
          "description": "If the user tries to fetch a record without permission, the permission denied message is conveyed through this field.",
          "x-intuit-required": "Optional"
        },
        "Inactive": {
          "type": "boolean",
          "description": "Indicates whether or not to include references to hidden entities when filtering. When set to\ntrue , hidden references are returned in the result set.\n For filtering results, it works with\nAttachableRef.EntityRef.Type ,\nAttachableRef.EntityRef.Value and\nAttachableRef.NoRefOnly filters in combination.",
          "x-intuit-required": "Optional",
          "x-intuit-default": "false",
          "x-intuit-filterable": true
        },
        "EntityRef": {
          "allOf": [
            {
              "$ref": "#/$defs/referencetype"
            }
          ],
          "description": "Object reference to which this attachment is linked.\n\nSet EntityRef.value with the Id of the target object as returned in its response body when queried.\n\nSet EntityRef.type with the specific type of the target object. For example, invoice, bill, item, etc.",
          "x-intuit-required": "Optional",
          "x-intuit-filterable": true
        }
      }
    },
    "customfield": {
      "type": "object",
      "title": "customfield",
      "properties": {
        "DefinitionId": {
          "type": "string",
          "description": "Unique identifier of the CustomFieldDefinition that corresponds to this CustomField.",
          "x-intuit-required": "Required"
        },
        "StringValue": {
          "type": "string",
          "description": "The value for the\nStringTypecustom field.",
          "x-intuit-required": "Optional"
        },
        "Type": {
          "type": "string",
          "description": "Data type of custom field. Only one type is currently supported:\nStringType."
        },
        "Name": {
          "type": "string",
          "description": "Name of the custom field.",
          "x-intuit-required": "Optional"
        }
      },
      "required": [
        "DefinitionId"
      ]
    },
    "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"
      ]
    }
  }
}