---
title: "Get deleted records"
method: GET
path: "/public/v1/deleted-records"
tags: ["DeletedRecord"]
---

# Get deleted records

`GET /public/v1/deleted-records`

## Request

- Base URL: `https://app.distru.com`
- URL: `https://app.distru.com/public/v1/deleted-records`
- Auth: HTTP bearer

List the records of one type that were deleted from your company, oldest deletion first. Use it alongside the `updated_datetime` filter of that type's list endpoint to keep a copy of your data in sync ([Incremental Sync](#incremental-sync)): list endpoints leave deleted records out by default, so a copy synced from them never learns of a deletion on its own. Each `record_type` is the type of one endpoint, such as `ORDER` for [GET /public/v1/orders](#get-orders) or `COMPANY_GROUP` for [GET /public/v1/company-groups](#get-company-groups).

Every deletion is listed, including the ones caused by deleting something else, such as an order's invoices or a product's batches; each is listed under its own type. A voided invoice or payment is not deleted; it stays on its list endpoint with its new status. A record that is restored after it was deleted leaves this list and comes back on its list endpoint with a new `updated_datetime`.

Deletions are kept for 90 days. If your copy was last synced longer ago than that, reconcile it as in [Incremental Sync](#incremental-sync) step 7 before resuming.

A deletion becomes visible here once its change is committed, which can be shortly after its `deleted_datetime`, and this endpoint is eventually consistent: a deletion can take up to 1 second to appear. When you poll with `deleted_datetime`, use the same lower bound as your list calls ([Incremental Sync](#incremental-sync)) and ignore records you already removed.

Results are paginated. Follow the `next_page` URL in the response to fetch the following page.

Required permission: the same as the endpoint of `record_type` (for example `orders_permissions_view` for `ORDER`); tags and unit types need none. Team restrictions do not apply here: every deletion of that type in your company is listed.

## Query parameters

- `record_type` 'ADJUSTMENT' | 'ASSEMBLY' | 'BATCH' | 'BIN' | 'CHARGE_PRESET' | 'COMPANY' | 'COMPANY_GROUP' | 'CONTACT' | 'COST_TYPE' | 'CREDIT' | 'CUSTOM_FIELD' | 'DRIVER' | 'INVOICE' | 'LICENSE' | 'LOCATION' | 'MENU' | 'ORDER' | 'PACKAGE' | 'PAYMENT' | 'PAYMENT_METHOD' | 'PAYMENT_TERM' | 'PRICE_TIER' | 'PRODUCT' | 'PRODUCT_CATEGORY' | 'PRODUCT_GROUP' | 'PRODUCT_POS_MAPPING' | 'PRODUCT_SUBCATEGORY' | 'PURCHASE' | 'RETURN' | 'STRAIN' | 'TAG' | 'TASK' | 'TAX' | 'TEST_RESULT' | 'UNIT_TYPE' | 'USER' | 'VEHICLE', required
- `deleted_datetime` string
- `page` string

## Response `200`

A list of deleted records

- DeletedRecords: A collection of deleted records
  - `data` DeletedRecord[]: Deleted Records
    - `deleted_datetime` string, required: When the record was deleted. Each record gets its own time, so records deleted together, like an order and its invoices, can differ by a few milliseconds.
    - `record_id` string, required: ID the record had before it was deleted, the same as its `id` on its type's endpoints (for `CUSTOM_FIELD`, the field's numeric id as a string). IDs are never reused.
    - `record_type` 'ADJUSTMENT' | 'ASSEMBLY' | 'BATCH' | 'BIN' | 'CHARGE_PRESET' | 'COMPANY' | 'COMPANY_GROUP' | 'CONTACT' | 'COST_TYPE' | 'CREDIT' | 'CUSTOM_FIELD' | 'DRIVER' | 'INVOICE' | 'LICENSE' | 'LOCATION' | 'MENU' | 'ORDER' | 'PACKAGE' | 'PAYMENT' | 'PAYMENT_METHOD' | 'PAYMENT_TERM' | 'PRICE_TIER' | 'PRODUCT' | 'PRODUCT_CATEGORY' | 'PRODUCT_GROUP' | 'PRODUCT_POS_MAPPING' | 'PRODUCT_SUBCATEGORY' | 'PURCHASE' | 'RETURN' | 'STRAIN' | 'TAG' | 'TASK' | 'TAX' | 'TEST_RESULT' | 'UNIT_TYPE' | 'USER' | 'VEHICLE', required: The kind of record that was deleted.
  - `next_page` string: URL for the next page of results; null when there is no next page

## Other responses

- `400`: Invalid parameters
- `401`: Missing or invalid API token
- `403`: The API token lacks the required permission, or team restrictions hide the record

## Changes

- **2026-10-16** `4414efcaf0fd`: 33 warning, 33 info
  - added the new `ADJUSTMENT` enum value to the `data/items/record_type` response property for the response status `200`
  - added the new `BATCH` enum value to the `data/items/record_type` response property for the response status `200`
  - added the new `BIN` enum value to the `data/items/record_type` response property for the response status `200`
  - added the new `CHARGE_PRESET` enum value to the `data/items/record_type` response property for the response status `200`
  - …62 more
- **2026-10-15** `b2b0b5830a0d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/distru/apis/distru-api/changes/public/v1/deleted-records/get.md)

---

[API](https://skmtc.dev/distru/apis/distru-api.md) - [All operations](https://skmtc.dev/distru/apis/distru-api/llms.txt) - [OpenAPI document](https://skmtc.dev/distru/apis/distru-api/revisions/9d851a88e82f?raw)
