Skip to content
Leadtime
English
Esc
navigateopen⌘Jpreview

Import product from catalog to task

What are Task Products? Task products allow you to add standardized services or goods from your product catalog directly to tasks (tickets). This enables quick pricing for support requests, service tickets, or express quotes without creating a full project. Products can include variants (e.g., Standard, Pro, Enterprise) and options (e.g., additional services or upgrades).

How this endpoint works: This endpoint imports a product from your workspace product catalog into a specific task. The product is copied into the task context, allowing you to customize quantity, select variants, and configure options without affecting the original catalog product.

What you need to provide:

  • productId: The UUID of the product from your catalog (must exist in catalog, not already assigned to a task or project)
  • quantity: How many units of this product (minimum 1)
  • activeVariantId: (Optional) Which variant to activate if the product has multiple variants
  • options: Array of option selections, where each option specifies which values are selected

Important notes:

  • Only products from the catalog (not already assigned to tasks or projects) can be imported
  • The product is copied into the task - changes here do not affect the catalog version
  • Products support three pricing models: fixed price, subscription price, and per-unit pricing
  • Variants allow different configurations (e.g., different package sizes or service levels)
  • Options allow customers to add extra services or upgrades (e.g., “Add workshop” or “Enable premium support”)

What is returned: Returns the ID of the newly created task product, which can be used for subsequent updates or deletion.

Permission requirements: Requires “manageProducts” permission on tasks and “api” scope.

POST/tasks/{identifier}/products
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.
Query parameters
fieldsToReturnstring
Comma-separated list of top-level response fields to return. Overrides the endpoint compact default unless responseShape=full is used.
responseShapestring
Advanced override. Omit for the endpoint compact default. Use full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
Allowed:compactfull
Header parameters
LT-Response-Shapestring
Advanced override. Set to full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
Allowed:full
Request body
requiredapplication/json
activeFromFixedDatestring<date> | null
Fixed start date when activeFromType is FixedDate. Format: ISO 8601 date (YYYY-MM-DD). Required when activeFromType is FixedDate.
activeFromTypestring
Type of activation start for the product. Immediately means it starts right away, ProjectBilling means it starts with project billing, FixedDate means it starts on a specific date.
Allowed:ImmediatelyProjectBillingFixedDate
activeVariantIdobject | null
UUID of the variant to activate when importing. Optional - only needed if the product has multiple variants (e.g., Standard, Pro, Enterprise). If not provided, the first variant will be active by default.
customPricesobjectrequired
Custom price overrides for base product, variants, and options. Keys can be "base", "variant_<variantId>", or "option_<optionValueId>". Each value contains priceFixed, priceSubscription, and pricePerUnit overrides. These prices are applied to the product when saving. Note: Tasks only support priceFixed, so priceSubscription and pricePerUnit are ignored.
optionsProductSettingOptionDto[]required
Array of option selections for this product. Each option specifies which values are selected. For example, if a product has a "Support Level" option with values "Basic" and "Premium", you would include the option ID and select one or more value IDs. Required even if empty array.
Show properties
Array of ProductSettingOptionDto
idstringrequired
UUID of the product option. This identifies which option (e.g., "Color", "Size", "Support Level") is being configured.
valuestring[]required
Array of UUIDs representing the selected option values. For example, if the option is "Color", this array might contain IDs for "Blue" and "Red" if multiple selections are allowed. Each value ID must be a valid UUID.
productIdstringrequired
UUID of the product from your workspace product catalog. The product must exist in the catalog and not be already assigned to a task or project. This product will be copied into the task.
quantitynumberrequired
Number of units of this product to add to the task. Must be at least 1. For example, if importing a "Workshop" product, quantity 2 means two workshops.
min 1
Responses
201Product imported successfully
successbooleanrequired
Operation success flag
400Bad Request - Invalid input or validation error
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient permissions or no task access
404Not Found - Catalog product or task does not exist
Request
curl -X POST "https://leadtime.app/api/public/tasks/123/products" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "activeFromFixedDate": "2024-01-01",
  "activeFromType": "Immediately",
  "activeVariantId": "550e8400-e29b-41d4-a716-446655440003",
  "customPrices": {
    "base": {
      "priceFixed": 100.5,
      "pricePerUnit": null,
      "priceSubscription": null
    },
    "variant_550e8400": {
      "priceFixed": 150,
      "pricePerUnit": null,
      "priceSubscription": null
    }
  },
  "options": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440004",
      "value": [
        "550e8400-e29b-41d4-a716-446655440005"
      ]
    }
  ],
  "productId": "550e8400-e29b-41d4-a716-446655440002",
  "quantity": 2
}'
Response
{
  "success": true
}