Skip to main content

Bulk Delete Products (Tracked)

DELETE 

/api/products/tracked

Delete a product selection of any size in the background and return a tracked_job_log_id to follow its progress with the tracked job endpoints.

Required scope: products:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Authentication: Requires Bearer token.

Body fields:

  • ids (array of integers, required unless apply_to_all): the products to include
  • apply_to_all (boolean, optional): true to include every product matching filters instead of ids
  • filters (object, optional): the same filters List Products accepts, without the filter[...] wrapper (e.g. {"ids": "101,102"})
  • delete_returns (boolean, optional, default false): also delete the returns of products kept only because of them. A product whose only history is RMAs and return receipts (and the returned units still in stock) is deleted together with its return receipt lines, which takes those units back out of stock, and its RMA lines. RMAs and receipts left with no lines are deleted; other products' lines and linked sales credits stay. Returns synced to your accounting system or received in the closed period always stay, and so does the product.

Behavior:

  • The selection is resolved when the request is made and deleted in slices; each product goes through the same checks and clean-up as Delete Product.
  • Products that are still used (orders, stock movements, purchases, returns, …) are kept and reported in the job's results.failure_groups, grouped by reason. Each kept group: reason, label, count, message, next_step and items (the first few records: id, label, link, optional detail).
  • Ids that no longer exist count as already_deleted, so sending the same selection again only finishes what is left.
  • Job results: deleted, deleted_with_parent (variations removed with their parent), already_deleted, skipped_in_use / kept / kept_count / has_kept (products kept because something uses them — not failures), failed / failed_count / has_failures (products that hit an error), failure_groups (each kept product counted once, under its main reason, so the groups add up to kept_count), groups_note, and with delete_returns returns_removed (rmas, rma_lines, return_receipts, return_receipt_lines, units).

Requires permission: products.delete

Request​

Responses​

OK

Response Headers
    Content-Type