APIRecord history

Get record history

GET
/public/v1/record-history

The history of one record, newest first: who changed what and when, field by field, as the record's History tab in Distru shows it. Each entry is one operation (a save in Distru, an API call, a sync, an automation run, a job) with the record's rows it changed (the record itself and its lines, such as an order's items), and, for invoices, purchases, orders, returns, batches, assemblies, stock transfers and companies, the notes, calls, meetings and emails logged on the record or, except for companies, on its invoices, returns, payments, shipments, credits and tasks.

A record's history shows only that record's part of an operation. An operation that changed an order and its invoice shows the order's rows here and the invoice's in the invoice's history, under the same id. The whole operation, across every record it changed, is at GET /public/v1/activity with ids[]=<id>; LEGACY entries copied from the old activity log are not always there.

Field names and the entities of rows are listed per record type in Record history fields.

This is not for keeping a copy of your data in sync: use each type's list endpoint with updated_datetime (Incremental Sync). Entries sort by when their operation started, so one still running when you read a page can later appear behind it.

History is read from a copy of the database that can lag a few seconds behind: a change, or a record, made a moment ago may not show yet (a record created that recently can return 404).

Results are paginated, 100 entries per page. A page can hold fewer entries, even none, while next_page is set: what you may not see is left out after the page is cut. Keep following next_page until it is null.

Required permission: the same as viewing the record in Distru, for example invoices_permissions_view for an INVOICE; you see the history of the records your team restrictions let you see (another one returns 403), and only the fields you may see. The history of API keys, MCP keys, webhooks, integrations (PARTNER_CONNECTION), QuickBooks Online settings, company settings and scheduled reports can't be read with an API key: those types return 403.

Authorization

Bearer
headerAuthorizationBearer <token>

API token generated in Distru (Settings → Distru API). Send it on every request as Authorization: Bearer YOUR_API_TOKEN.

Query Parameters

record_type*string

Required. The kind of record.

Value in"ASSEMBLY""AUTOMATION""BATCH""BIN""CHARGE_PRESET""COMPANY""COMPANY_GROUP""COMPANY_SETTINGS""COMPLIANCE_TRANSFER""COST_TYPE""CREDIT""CUSTOM_VALIDATION""DATASET""DRIVER""HARVEST""INVITATION""INVOICE""LABEL_TEMPLATE""MCP_API_KEY""MENU""PACKAGE""PARTNER_CONNECTION""PAYMENT_METHOD""PAYMENT_TERM""PLANT""PLANT_GROUP""PRICE_TIER""PRODUCT""PRODUCT_CATEGORY""PRODUCT_GROUP""PUBLIC_API_KEY""PURCHASE""QUICKBOOKS_SETTINGS""RELATIONSHIP_TYPE""RETURN""ROLE""SALES_ORDER""SCHEDULED_ALERT""SCHEDULED_REPORT""STOCK_TRANSFER""STRAIN""TAG""TAX""TEAM""TEARDOWN""TEST_RESULT""UNIT_TYPE""USER""VEHICLE""WEBHOOK_CONFIGURATION"
record_id*string

Required. The record's ID, as its type's endpoints return it, or as records[].id in GET /public/v1/activity gives it for a type with no endpoint. An ID that doesn't exist for your company returns 404; one your team restrictions hide returns 403. A type an API key can't read returns 403 for any well-formed ID.

page?string

Page selector. Page size is fixed by the server; paginate by following the next_page URL in each response rather than building page selectors yourself — it is null on the last page. next_page uses page[after]=<cursor>, an opaque token marking where the next page resumes; pass it back exactly as given, and only to the endpoint that issued it. This is seek-based, so every page stays fast no matter how deep you page.

Response Body

A page of the record's history

*/*
  1. response

A page of a record's history

data?array<>

Record History Entries

next_page?string

URL for the next page of results; null when there is no next page

Example Request
curl -X GET 'https://app.distru.com/public/v1/record-history?record_type=INVOICE&record_id=00000000-0000-0000-0000-00000000003b'
Example Response
{  "data": [    {      "actor": {        "company_name": null,        "id": "00000000-0000-0000-0000-000000000da9",        "name": "FirstName3944 LastName3945"      },      "changed_datetime": "2026-11-18T16:10:42.869394Z",      "events": null,      "id": "00000000-0000-0000-0000-00000000023c",      "impersonator": null,      "logged_on": {        "id": "00000000-0000-0000-0000-000000000013",        "name": "Payment $100.00",        "type": "INVOICE_PAYMENT"      },      "note_type": "NOTE",      "rows": null,      "source": null,      "source_detail": null,      "text": "Wired",      "type": "NOTE"    },    {      "actor": {        "company_name": null,        "id": "00000000-0000-0000-0000-000000000da9",        "name": "FirstName3944 LastName3945"      },      "changed_datetime": "2026-11-18T16:10:42.837514Z",      "events": null,      "id": "00000000-0000-0000-0000-00000000023b",      "impersonator": null,      "logged_on": null,      "note_type": "NOTE",      "rows": null,      "source": null,      "source_detail": null,      "text": "Called the buyer",      "type": "NOTE"    },    {      "actor": {        "company_name": null,        "id": "00000000-0000-0000-0000-000000000da9",        "name": "FirstName3944 LastName3945"      },      "changed_datetime": "2026-11-18T16:10:42.823368Z",      "events": [],      "id": "511b1e0a-9fa0-40b2-a4f2-136912940ed9",      "impersonator": null,      "logged_on": null,      "note_type": null,      "rows": [        {          "entity": "INVOICE",          "entity_label": "Invoice",          "fields": [            {              "field": "owner",              "label": "Owner",              "legacy_text": null,              "new_value": {                "id": "00000000-0000-0000-0000-000000000da9",                "name": "FirstName3944 LastName3945"              },              "old_value": {                "id": "00000000-0000-0000-0000-000000000dae",                "name": "FirstName3954 LastName3959"              }            },            {              "field": "external_notes",              "label": "External notes",              "legacy_text": null,              "new_value": "E1",              "old_value": null            }          ],          "op": "UPDATE",          "row_id": "00000000-0000-0000-0000-00000000003b",          "row_label": null        }      ],      "source": "WEB",      "source_detail": null,      "text": null,      "type": "CHANGE"    }  ],  "next_page": "https://www.example.com/public/v1/record-history?page[after]=MXwyMDI2LTExLTE4VDE2OjEwOjQyLjgyMzM2OFp8NTExYjFlMGEtOWZhMC00MGIyLWE0ZjItMTM2OTEyOTQwZWQ5&record_id=00000000-0000-0000-0000-00000000003b&record_type=INVOICE"}