On this page6 sections
POST/api/products/cleanupProductsPermission: product.delete
Cleanup Duplicate Products
Detects duplicate active products sharing the same product code in the active tenant and soft-archives older duplicates.
Authentication: Requires Authorization: Bearer <ACCESS_TOKEN> (Supabase JWT, OAuth2 M2M token, or integration token).
Outlet Scope Enforcement: Results and mutations are automatically scoped to the actor's accessible outlets when the
productmodule restriction applies.
Request
Provide the following fields in the request payload.
No request body parameters are required for this endpoint.
Responses
Select a status code to inspect schema.
OK — Duplicate cleanup finished.application/json
successenum('true')
Success (true).
messagestring
Message.
dataobject | null
Response payload or null.
POST/api/products/cleanup
curl -X POST "https://api.invoger.com/api/products/cleanup" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{}'Interactive playground
Response
application/json
{
"success": true,
"message": "Cleanup complete. Archived 0 duplicate products.",
"data": {
"deletedCount": 0,
"archivedCount": 0,
"details": []
}
}