Search notes
distru-search-notesReadLists the notes, calls, meetings and emails logged on records.
Inputs
Every tool also takes the common inputs.
| Field | Type | Required | Description |
|---|---|---|---|
| limit | integer | No | Default: 10 |
| cursor | string | No | nextCursor of the previous call; keep the other arguments unchanged. |
| recordType | enumASSEMBLYBATCHCOMPANYINVOICESALES_ORDERPURCHASERETURNSTOCK_TRANSFER | No | With recordId. |
| recordId | string | No | With 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. |
| recordTypes | enum[]ASSEMBLYBATCHCOMPANYINVOICESALES_ORDERPURCHASERETURNSTOCK_TRANSFER | No | Only notes logged on a record of these types. |
| noteTypes | enum[]EMAILMEETINGNOTEPHONE | No | |
| userIds | string[] | No | Authors. Resolve via distru-search-users. |
| ids | string[] | No | |
| insertedAt | object | No | Inclusive. YYYY-MM-DD (whole days, company timezone) or ISO 8601 with a UTC offset. When the note was logged. |
| insertedAt. | string | No | |
| insertedAt. | string | No | |
| updatedAt | object | No | Inclusive. YYYY-MM-DD (whole days, company timezone) or ISO 8601 with a UTC offset. When the note was last changed. |
| updatedAt. | string | No | |
| updatedAt. | string | No | |
| sortBy | object | No | Default UPDATED_AT DESC, most recently changed first. |
| sortBy. | enumASCDESC | Yes | |
| sortBy. | enumINSERTED_ATUPDATED_AT | Yes |
Output
Presence on a nested field assumes its parent exists.
| Field | Type | Presence | Description |
|---|---|---|---|
| hasMore | boolean | Always | |
| nextCursor | string | Can be absent | |
| totalCount | integer | Can be absent | |
| items | object[] | Always | |
| items[]. | string | Always | |
| items[]. | enumEMAILMEETINGNOTEPHONE | Always | |
| items[]. | string | Always | |
| items[]. | object | Can be null | Null for syncs and jobs. |
| items[]. | string | Can be null | Null for Distru Support and another company's user, whose id no tool takes. |
| items[]. | string | Always | |
| items[]. | string | Can be null | The actor's company, when it isn't the record's (a buyer's user). |
| items[]. | object | Always | The record the note is listed under: the one asked for, else where it was logged. |
| items[]. | enumASSEMBLYBATCHCOMPANYINVOICESALES_ORDERPURCHASERETURNSTOCK_TRANSFER | Always | |
| items[]. | string | Always | |
| items[]. | object | Can be null | Where the note was written, when not `record`: a linked invoice, payment, shipment, return or task. |
| items[]. | enum129 valuesACCOUNTASSEMBLYASSEMBLY_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[]. | string | Can be absent | |
| items[]. | string | Always | |
| items[]. | string | Always | |
| items[]. | string | Always |
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.