Delete and erase through the API
The OLET API has a DELETE for products, brands, categories, tags, suppliers and customers. Each one answers 204 with no body, needs the catalog:write scope (or customers:write for customers), and cleans up whatever pointed at the thing you deleted. The deletes are soft: the row is kept but hidden, so sales and reports that refer to it keep working.
What happens when I delete a product
Section titled “What happens when I delete a product”DELETE /products/{id} removes the product. It refuses with:
422 UNPROCESSABLEfor a gift card product.409 CONFLICTif the product is a component of a composite product.409 CONFLICTif it still has active variant children.409 CONFLICTif it is on an open purchase order, transfer, draft supplier return or open stock count. The message names the oldest one.
A successful delete writes the product’s stock on hand off to 0 with the reason Product deleted, recorded in the stock movements like any other adjustment.
What happens when I delete a brand, category, tag or supplier
Section titled “What happens when I delete a brand, category, tag or supplier”Each delete runs as one step, matching what the back office does.
- Brand. The brand is removed and every product that used it is left with no brand.
- Category. The category is removed and its products move to the system “Other Products” category. It refuses with
409 CONFLICTfor a system category, for the reserved gift cards category, and for a category that still has live subcategories. - Tag. The tag is removed from every product that carried it.
- Supplier. The supplier is removed from every product that carried it, and its supplier packs are removed too. A purchase order that named this supplier keeps its reference to the deleted supplier.
Changing a product this way gives it a new version, so every affected product shows up again in your next poll. Deleting a brand used by thousands of products means thousands of rows to re-sync. See pagination and polling.
Deleting an id that is unknown, belongs to another store, or is already deleted answers 404 NOT_FOUND.
What happens when I erase a customer
Section titled “What happens when I erase a customer”DELETE /customers/{id} needs the customers:write scope and permanently erases the customer’s personal details. It cannot be undone.
- The customer is marked deleted and the personal details are scrubbed: name, email, phone, address and the rest.
- The
customer_codeis replaced with a placeholder, so you can no longer look the customer up by the code you created them with. Keep your own mapping if you need to match records later. - The customer’s
versionmoves, so the erasure reaches your next poll as a tombstone when you useinclude_deleted=true. - Sale history survives. Every past sale still resolves, shown against the anonymized customer, so reports and refunds keep adding up.
- A
customer.deletedwebhook event fires, carrying only the id. Webhook bodies are built when they are sent, so the erased details are never delivered. See webhooks.
The walk-in customer is a system record and cannot be deleted: it answers 409 CONFLICT. Customer calls share a smaller rate limit than the rest of the API, see rate limits.
Because the data is gone for good, ask for confirmation in your own app before you call it. A key with customers:write can do it, so create keys with only the scopes they need. See authentication.
Where to go next
Section titled “Where to go next”See write a whole product in one request for creating and changing products, or errors for every status code.