Zum Inhalt springen
Leadtime
Deutsch
Esc
navigateopen⌘Jpreview

Update task product settings

What this endpoint does: Updates the configuration settings for a product that has been imported into a task. This includes quantity, which variant is active, and which option values are selected. This is different from updating the product details (name, description, prices) - use PATCH for those changes.

What can be configured:

  • quantity: How many units of this product (minimum 1)
  • activeVariantId: Which variant is currently active (if product has variants)
  • options: Which option values are selected for each product option

Use cases:

  • Adjust quantity after initial import
  • Switch between variants (e.g., from Standard to Pro)
  • Change option selections (e.g., add or remove premium support)
  • Configure product for specific customer requirements

Important notes:

  • This endpoint only updates configuration, not product details (name, description, prices)
  • To update product details, use the PATCH endpoint instead
  • Product must belong to the specified task
  • All option selections must be provided (partial updates not supported for options)

What is returned: Returns success status.

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

POST/tasks/{identifier}/products/{productId}/settings
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.
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 that should be active. Use this to switch between variants (e.g., from Standard to Pro). Set to null if the product has no variants or to deactivate variant selection.
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. Each entry specifies which option is being configured and which values are selected. You must provide selections for all options defined on the product, even if no values are selected (use empty array for value). This updates the product configuration without changing product details like name or prices.
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.
quantitynumberrequired
Number of units of this product. Must be at least 1. This affects the total price calculation when using per-unit pricing.
min 1
Responses
200Product settings updated 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 - Product or task does not exist
Request
curl -X POST "https://leadtime.app/api/public/tasks/123/products/%3Cuuid%3E/settings" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "activeFromFixedDate": "2024-01-01",
  "activeFromType": "Immediately",
  "activeVariantId": "550e8400-e29b-41d4-a716-446655440006",
  "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-446655440007"
      ]
    }
  ],
  "quantity": 3
}'
Response
{
  "success": true
}