Get deleted records
Changed onList 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): 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 or COMPANY_GROUP for GET /public/v1/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 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) 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.
Request
- Base URLhttps://app.distru.com
- AuthHTTP bearer
Query parameters
Required. The kind of deleted record to list. Each request lists one kind; make one request per kind you sync.
Filter by deletion datetime, given as an inclusive after,before range of ISO 8601 timestamps separated by a comma. Either bound may be left empty: after, keeps only records deleted on or after after; ,before only those deleted on or before before; after,before keeps those inside the closed range. A range with both bounds empty is rejected.
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
A list of deleted records
Changes
- warning
added the new
ADJUSTMENTenum value to the//response property for the response status - warning
added the new
BATCHenum value to the//response property for the response status - warning
added the new
BINenum value to the//response property for the response status - warning
added the new
CHARGE_PRESETenum value to the//response property for the response status - warning
added the new
COMPANYenum value to the//response property for the response status - warning
added the new
COMPANY_GROUPenum value to the//response property for the response status - warning
added the new
CONTACTenum value to the//response property for the response status - warning
added the new
COST_TYPEenum value to the//response property for the response status - warning
added the new
CREDITenum value to the//response property for the response status - warning
added the new
CUSTOM_FIELDenum value to the//response property for the response status - warning
added the new
DRIVERenum value to the//response property for the response status - warning
added the new
LICENSEenum value to the//response property for the response status - warning
added the new
LOCATIONenum value to the//response property for the response status - warning
added the new
MENUenum value to the//response property for the response status - warning
added the new
PAYMENTenum value to the//response property for the response status - warning
added the new
PAYMENT_METHODenum value to the//response property for the response status - warning
added the new
PAYMENT_TERMenum value to the//response property for the response status - warning
added the new
PRICE_TIERenum value to the//response property for the response status - warning
added the new
PRODUCTenum value to the//response property for the response status - warning
added the new
PRODUCT_CATEGORYenum value to the//response property for the response status - warning
added the new
PRODUCT_GROUPenum value to the//response property for the response status - warning
added the new
PRODUCT_POS_MAPPINGenum value to the//response property for the response status - warning
added the new
PRODUCT_SUBCATEGORYenum value to the//response property for the response status - warning
added the new
PURCHASEenum value to the//response property for the response status - warning
added the new
RETURNenum value to the//response property for the response status - warning
added the new
STRAINenum value to the//response property for the response status - warning
added the new
TAGenum value to the//response property for the response status - warning
added the new
TASKenum value to the//response property for the response status - warning
added the new
TAXenum value to the//response property for the response status - warning
added the new
TEST_RESULTenum value to the//response property for the response status - warning
added the new
UNIT_TYPEenum value to the//response property for the response status - warning
added the new
USERenum value to the//response property for the response status - warning
added the new
VEHICLEenum value to the//response property for the response status - info
added the new enum value
ADJUSTMENTto thequeryrequest parameterrecord_type - info
added the new enum value
BATCHto thequeryrequest parameterrecord_type - info
added the new enum value
BINto thequeryrequest parameterrecord_type - info
added the new enum value
CHARGE_PRESETto thequeryrequest parameterrecord_type - info
added the new enum value
COMPANYto thequeryrequest parameterrecord_type - info
added the new enum value
COMPANY_GROUPto thequeryrequest parameterrecord_type - info
added the new enum value
CONTACTto thequeryrequest parameterrecord_type - info
added the new enum value
COST_TYPEto thequeryrequest parameterrecord_type - info
added the new enum value
CREDITto thequeryrequest parameterrecord_type - info
added the new enum value
CUSTOM_FIELDto thequeryrequest parameterrecord_type - info
added the new enum value
DRIVERto thequeryrequest parameterrecord_type - info
added the new enum value
LICENSEto thequeryrequest parameterrecord_type - info
added the new enum value
LOCATIONto thequeryrequest parameterrecord_type - info
added the new enum value
MENUto thequeryrequest parameterrecord_type - info
added the new enum value
PAYMENTto thequeryrequest parameterrecord_type - info
added the new enum value
PAYMENT_METHODto thequeryrequest parameterrecord_type - info
added the new enum value
PAYMENT_TERMto thequeryrequest parameterrecord_type - info
added the new enum value
PRICE_TIERto thequeryrequest parameterrecord_type - info
added the new enum value
PRODUCTto thequeryrequest parameterrecord_type - info
added the new enum value
PRODUCT_CATEGORYto thequeryrequest parameterrecord_type - info
added the new enum value
PRODUCT_GROUPto thequeryrequest parameterrecord_type - info
added the new enum value
PRODUCT_POS_MAPPINGto thequeryrequest parameterrecord_type - info
added the new enum value
PRODUCT_SUBCATEGORYto thequeryrequest parameterrecord_type - info
added the new enum value
PURCHASEto thequeryrequest parameterrecord_type - info
added the new enum value
RETURNto thequeryrequest parameterrecord_type - info
added the new enum value
STRAINto thequeryrequest parameterrecord_type - info
added the new enum value
TAGto thequeryrequest parameterrecord_type - info
added the new enum value
TASKto thequeryrequest parameterrecord_type - info
added the new enum value
TAXto thequeryrequest parameterrecord_type - info
added the new enum value
TEST_RESULTto thequeryrequest parameterrecord_type - info
added the new enum value
UNIT_TYPEto thequeryrequest parameterrecord_type - info
added the new enum value
USERto thequeryrequest parameterrecord_type - info
added the new enum value
VEHICLEto thequeryrequest parameterrecord_type
- warning
- info
endpoint added
- info