Delete task product
What this endpoint does: Removes a product from a task. This performs a soft delete - the product is marked as deleted but not permanently removed from the database. This preserves historical data for auditing and reporting purposes.
Important notes:
- Product must belong to the specified task
- This is a soft delete - the product record remains in the database with deletedAt timestamp set
- Deleted products are excluded from normal queries but can be accessed for historical purposes
- The original catalog product is not affected by this deletion
- Once deleted, the product cannot be restored through this API (requires database-level operation)
What is returned: Returns success status.
Permission requirements: Requires “manageProducts” permission on tasks and “api” scope.
DELETE
/tasks/{identifier}/products/{productId}Authorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
identifierstringrequiredTask identifier. Can be either a UUID (e.g., "550e8400-e29b-41d4-a716-446655440000") or a numeric shortNumber (e.g., "123"). The shortNumber is a human-readable task number assigned by the system.
productIdstring<uuid>requiredUUID of the product that was imported into the task. This is the ID returned when importing a product via the POST endpoint.
Responses
200Product deleted successfully
successbooleanrequiredOperation success flag
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient permissions or no task access
404Not Found - Product or task does not exist
Request
curl -X DELETE "https://leadtime.app/api/public/tasks/123/products/%3Cuuid%3E" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"const response = await fetch("https://leadtime.app/api/public/tasks/123/products/%3Cuuid%3E", {
method: "DELETE",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
});import requests
response = requests.delete(
"https://leadtime.app/api/public/tasks/123/products/%3Cuuid%3E",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
},
)Response
{
"success": true
}Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient permissions or no task access
Not Found - Product or task does not exist