Skip to content
Leadtime
English
Esc
navigateopen⌘Jpreview

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 · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
identifierstringrequired
Task 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>required
UUID 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
successbooleanrequired
Operation 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"
Response
{
  "success": true
}