Get a record’s history
distru-get-record-historyReadShows who changed a record, when, and what they changed.
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 | enum43 valuesASSEMBLYAUTOMATIONBATCHBINCHARGE_PRESETCOMPANYCOMPANY_GROUPCOMPLIANCE_TRANSFERCOST_TYPECREDITCUSTOM_VALIDATIONDATASETDRIVERHARVESTINVITATIONINVOICELABEL_TEMPLATEMENUSALES_ORDERPACKAGEPAYMENT_METHODPAYMENT_TERMPLANTPLANT_GROUPPRICE_TIERPRODUCTPRODUCT_CATEGORYPRODUCT_GROUPPURCHASERELATIONSHIP_TYPERETURNROLESCHEDULED_ALERTSTOCK_TRANSFERSTRAINTAGTAXTEAMTEARDOWNTEST_RESULTUNIT_TYPEUSERVEHICLE | Yes | |
| recordId | string | Yes | The record's ID, of recordType's kind: from that kind's search tool where one exists (e.g. distru-search-sales-orders, distru-search-products, distru-search-lookups), or a reference's id in another history entry. COMPLIANCE_TRANSFER, CUSTOM_VALIDATION, DATASET, DRIVER, INVITATION, LABEL_TEMPLATE, ROLE, SCHEDULED_ALERT, TEAM and VEHICLE ids come only from references. |
| sortBy | object | No | Default CHANGED_AT DESC, newest first. |
| sortBy. | enumASCDESC | Yes | |
| sortBy. | enumCHANGED_AT | Yes | CHANGED_AT: when the action started, or the note was logged. |
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 or object)[] | Always | |
| items[]. | enumCHANGE | Always | |
| items[]. | string | 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 | Can be null | Distru staff acting for the actor, as Distru Support. |
| 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[]. | enum16 valuesAI_AGENTAUTOMATIONBIOTRACKIMPORTJOBLEGACYMCPMETRCMIGRATIONMOBILEPARTNER_APIPUBLIC_APIQUICKBOOKSSTAFF_SQLUNKNOWNWEB | Always | |
| items[]. | string | Can be null | The API key or automation name; Distru Support for a fix by Distru staff. |
| items[]. | integer | Always | |
| items[]. | boolean | Always | Whether rows holds only the first 50 rows. |
| items[]. | object[] | Always | |
| items[]. | enum128 valuesACCOUNTASSEMBLYASSEMBLY_INPUTASSEMBLY_OUTPUTASSEMBLY_OUTPUT_BINAUTOMATIONAUTOMATION_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 | Always | |
| items[]. | string | Always | |
| items[]. | enumDELETEINSERTUPDATE | Always | |
| items[]. | string | Can be absent | Left out when the MCP takes that type's ids nowhere; QuickBooks ids are raw. |
| items[]. | string | Can be null | |
| items[]. | object[] | Always | |
| items[]. | string | Always | |
| items[]. | string | Always | |
| items[]. | any | Always | |
| items[]. | any | Always | |
| items[]. | object | Can be absent | An entry copied from the old activity feed: its text, with no values. |
| items[]. | string | Can be null | |
| items[]. | string | Can be null | |
| items[]. | object[] | Always | |
| items[]. | enumCREDIT_USE_DELETEDCREDIT_USEDLEGACY_NOTEQUICKBOOKS_CUSTOMER_DELETEDQUICKBOOKS_PAYMENT_MERGEDQUICKBOOKS_VENDOR_DELETED | Always | |
| items[]. | string | Can be null | |
| items[]. | enumNOTE | Always | |
| items[]. | string | 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[]. | enumEMAILMEETINGNOTEPHONE | Always | |
| items[]. | string | Can be null | |
| items[]. | object | Can be null | The record the note was logged on, when it is not this one. |
| items[]. | enum128 valuesACCOUNTASSEMBLYASSEMBLY_INPUTASSEMBLY_OUTPUTASSEMBLY_OUTPUT_BINAUTOMATIONAUTOMATION_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 |
What the AI reads
A record's history, as on its History tab: who changed it and when, what each field was before and after, and old notes, calls, meetings and emails logged on it. One CHANGE entry per action (a save, import, sync, job or automation run), with the rows of the record and its lines it wrote (the record's own row first; the first 50 when truncated). rowCount counts rows after netting each row's changes in the action, so it can be lower than distru-search-activity's. Values are raw (ids, numbers, enum values). A reference is {id, name}: name is its current name, null once the record is deleted or archived; no id when the MCP takes that type's ids nowhere or it is another company's (a menu buyer's account, user or locations). A field customFields.<id> is that custom field, named in label. A field with legacyText was copied from the old activity feed: its name is that feed's, and legacyText holds its text. An entry shows only this record's part of an action: for everything the action changed, pass its id to distru-search-activity ids. For changes across the company, use distru-search-activity. A page can hold fewer entries than limit, even none, while hasMore is true: keep following nextCursor. Errors as not found when no record of recordType matches recordId (another company's included); a permission error if the caller can't view it, its team restrictions included.