# Deletion Sequence for Products with Inventory/Transactions using API

**URL:** https://community.openboxes.com/t/deletion-sequence-for-products-with-inventory-transactions-using-api/2038
**Category:** general
**Created:** [September 16, 2026, 2:06pm UTC](https://community.openboxes.com/t/deletion-sequence-for-products-with-inventory-transactions-using-api/2038 "2026-09-16T14:06:07Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![acayci](https://community.openboxes.com/user_avatar/community.openboxes.com/acayci/32/1340_2.png) [@acayci](https://community.openboxes.com/u/acayci)
#### Post date: [September 16, 2026, 2:06pm UTC](https://community.openboxes.com/t/deletion-sequence-for-products-with-inventory-transactions-using-api/2038/1 "2026-09-16T14:06:08Z")

</div>

Hi everyone,

I am trying to use the OpenBoxes API to completely delete some test products and their linked inventory/lot items so I can start fresh.

Every time I try to run a delete command on a product, the API blocks it and throws a 500 server error saying the resource cannot be deleted because of an existing association.

What is the correct way or sequence to completely delete products and inventory items using the API?

Thanks,  
Mustafa

---

<div class="post-metadata">

### Author: ![jmiranda](https://community.openboxes.com/user_avatar/community.openboxes.com/jmiranda/32/199_2.png) [@jmiranda](https://community.openboxes.com/u/jmiranda)
#### Post date: [September 17, 2026, 3:49pm UTC](https://community.openboxes.com/t/deletion-sequence-for-products-with-inventory-transactions-using-api/2038/2 "2026-09-17T15:49:38Z")

</div>

@acayci This may have been a duplicate post that was addressed here [How to delete products and inventory items via the API? - #2 by jmiranda](https://community.openboxes.com/t/how-to-delete-products-and-inventory-items-via-the-api/2036/2) . Let me know if that’s the case and I’ll remove it.
