Search notes

distru-search-notesRead

Lists the notes, calls, meetings and emails logged on records.

Inputs

Every tool also takes the common inputs.

FieldTypeRequiredDescription
limitintegerNoDefault: 10
cursorstringNonextCursor of the previous call; keep the other arguments unchanged.
recordTypeenum
ASSEMBLYBATCHCOMPANYINVOICESALES_ORDERPURCHASERETURNSTOCK_TRANSFER
NoWith recordId.
recordIdstringNoWith recordType. The record's ID: resolve via distru-search-sales-orders, distru-search-purchase-orders, distru-search-invoices, distru-search-companies, distru-search-assemblies, distru-search-batches, distru-search-returns or distru-search-stock-transfers.
recordTypesenum[]
ASSEMBLYBATCHCOMPANYINVOICESALES_ORDERPURCHASERETURNSTOCK_TRANSFER
NoOnly notes logged on a record of these types.
noteTypesenum[]
EMAILMEETINGNOTEPHONE
No
userIdsstring[]NoAuthors. Resolve via distru-search-users.
idsstring[]No
insertedAtobjectNoInclusive. YYYY-MM-DD (whole days, company timezone) or ISO 8601 with a UTC offset. When the note was logged.
insertedAt.endstringNo
insertedAt.startstringNo
updatedAtobjectNoInclusive. YYYY-MM-DD (whole days, company timezone) or ISO 8601 with a UTC offset. When the note was last changed.
updatedAt.endstringNo
updatedAt.startstringNo
sortByobjectNoDefault UPDATED_AT DESC, most recently changed first.
sortBy.directionenum
ASCDESC
Yes
sortBy.fieldenum
INSERTED_ATUPDATED_AT
Yes

Output

Presence on a nested field assumes its parent exists.

FieldTypePresenceDescription
hasMorebooleanAlways
nextCursorstringCan be absent
totalCountintegerCan be absent
itemsobject[]Always
items[].idstringAlways
items[].noteTypeenum
EMAILMEETINGNOTEPHONE
Always
items[].textstringAlways
items[].userobjectCan be nullNull for syncs and jobs.
items[].user.idstringCan be nullNull for Distru Support and another company's user, whose id no tool takes.
items[].user.namestringAlways
items[].user.companyNamestringCan be nullThe actor's company, when it isn't the record's (a buyer's user).
items[].recordobjectAlwaysThe record the note is listed under: the one asked for, else where it was logged.
items[].record.typeenum
ASSEMBLYBATCHCOMPANYINVOICESALES_ORDERPURCHASERETURNSTOCK_TRANSFER
Always
items[].record.idstringAlways
items[].loggedOnobjectCan be nullWhere the note was written, when not `record`: a linked invoice, payment, shipment, return or task.
items[].loggedOn.typeenum
129 values
ACCOUNTASSEMBLYASSEMBLY_INPUTASSEMBLY_OUTPUTASSEMBLY_OUTPUT_BINAUTOMATIONAUTOMATION_RUN_ROLEAUTOMATION_VERSIONBATCHBILL_OF_MATERIALSBINCHARGECHARGE_PRESETCHARGE_PRESET_OWNER_TEAMCHARGE_PRESET_OWNER_USERCHARGE_PRESET_TAGCOMPANYCOMPANY_GROUPCOMPANY_SETTINGSCOMPLIANCE_DELIVERYCOMPLIANCE_TRANSFERCONTACTCOST_TYPECREDITCREDIT_USECUSTOM_FIELDCUSTOM_VALIDATIONDATASETDEFAULT_MENU_INTERNAL_ORDER_NOTIFICATIONS_RECIPIENTDRIVERHARVESTHARVEST_GROUPHARVEST_WASTEIMAGEINVITATIONINVOICEINVOICE_ITEMINVOICE_PAYMENTINVOICE_RECIPIENT_EMAILINVOICE_SIGNATURELABEL_TEMPLATELICENSELOCATIONMATERIAL_TEST_RESULTMCP_API_KEYMENUMENU_BANNER_IMAGEMENU_COLLECTIONMENU_COLLECTION_BRANDMENU_COLLECTION_IMAGEMENU_COLLECTION_OFFICIAL_PRODUCT_CATEGORYMENU_COLLECTION_PRODUCT_CATEGORYMENU_COLLECTION_PRODUCT_GROUPMENU_COLLECTION_PRODUCT_SUBCATEGORYMENU_COLLECTION_STRAINMENU_COLLECTION_STRAIN_TYPEMENU_HOLDERMENU_INTERNAL_ORDER_NOTIFICATIONS_RECIPIENTMENU_OFFICIAL_PRODUCT_CATEGORY_TO_SELL_BY_POTENCYMENU_PRICE_TIERMENU_PRODUCTMENU_URLOFFICIAL_PRODUCT_CATEGORYORDER_ITEMORDER_SHIPMENTORDER_SHIPMENT_ITEMORDER_SHIPMENT_SIGNATUREPACKAGEPACKAGE_BINPARTNERPARTNER_CONNECTIONPAYMENTPAYMENT_METHODPAYMENT_TERMPENDING_METRC_ITEMPLANTPLANT_ADDITIVEPLANT_ADDITIVE_TARGETPLANT_ADDITIVE_TYPEPLANT_GROUPPLANT_WASTEPLANT_WASTE_PLANTPRICE_TIERPRODUCTPRODUCT_CATEGORYPRODUCT_GROUPPRODUCT_SUBCATEGORYPRODUCT_TAGPROFILEPUBLIC_API_KEYPURCHASEPURCHASE_PAYMENTQB_ACCOUNTQB_AUTH_TOKENQB_CLASSQB_CUSTOMERQB_VENDORQUICKBOOKS_ITEMQUICKBOOKS_SETTINGSRECURRING_SCHEDULERELATIONSHIP_TYPEREQUESTRETURNRETURN_ITEMROLESALES_ORDERSCHEDULED_ALERTSCHEDULED_QB_EXPORTSCHEDULED_REPORTSIGNATURESTOCK_ADJUSTMENTSTOCK_TRANSFERSTOCK_TRANSFER_ITEMSTRAINTAGTASKTAXTAX_TAGTEAMTEAM_MEMBERSHIPTEARDOWNTEARDOWN_INPUTTEARDOWN_MAPPINGTEARDOWN_OUTPUTTEST_RESULTUNIT_TYPEUSERVEHICLEWEBHOOK_CONFIGURATION
Can be null
items[].loggedOn.idstringCan be absent
items[].loggedOn.namestringAlways
items[].insertedAtstringAlways
items[].updatedAtstringAlways
What the AI reads

Notes, calls, meetings and emails (noteType) logged by hand on records, one row per note. Only sales orders, purchase orders, invoices, companies, assemblies, batches, returns and stock transfers list them. With recordType and recordId, lists what that record's History tab shows: its own notes plus those logged on a linked record (e.g. a sales order's invoice, payment, shipment or return, or a task linked to the record); loggedOn names where it was written, null for a note on the record itself. A company lists only notes logged on it, not its contacts' or orders'. Without them, lists notes by where they were logged, on those eight types only: a payment's or task's note shows only under its record. record is the one asked for, else where it was logged. Shows only notes on records the caller may view, linked records included, and none on deleted records or with no text. Notes are not in distru-get-record-history or distru-search-activity. Errors as not found when no record matches recordId (another company's included); a permission error if the caller can't view it.