Zum Inhalt springen
Leadtime
Deutsch
Esc
navigateopen⌘Jpreview

Partially update task product

What this endpoint does: Updates an existing product that has been imported into a task. This endpoint supports partial updates - you only need to provide the fields you want to change. All other fields remain unchanged.

What can be updated:

  • Basic information: Name, description (HTML or Markdown), category, logo
  • Pricing: Fixed price, subscription price, per-unit price, unit name, billing frequency
  • Variants: Add, update, or modify product variants (e.g., Standard, Pro, Enterprise versions)
  • Options: Modify product options and their values (e.g., additional services, upgrades)

Important notes:

  • This is a PATCH operation - only provided fields are updated
  • Description can be provided as HTML or Markdown - it will be automatically converted to the internal document format
  • Variant descriptions also support HTML or Markdown
  • When updating variants, you must provide the complete variant structure (existing variants are replaced)
  • When updating options, you must provide the complete options structure (existing options are replaced)
  • Changes only affect the product within this task - the catalog product remains unchanged
  • Product must belong to the specified task

Pricing models:

  • Fixed price: One-time payment amount
  • Subscription price: Recurring payment (e.g., monthly, yearly)
  • Price per unit: Calculated per quantity (e.g., per user, per hour)
  • Price frequency: Billing interval for subscriptions (in months)

What is returned: Returns success status and the product ID.

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

PATCH/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.
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
categoryIdobject | null
UUID of the product category. Categories help organize products (e.g., "Hardware", "Software", "Services"). Set to null to remove category assignment.
descriptionstring
Product description in HTML or Markdown format. This will be automatically converted to the internal document format. Can include details about what the product includes, features, or specifications.
logoIdobject | null
UUID of the logo image file. This image is displayed alongside the product in lists and views. Set to null to remove the logo.
namestring
Display name of the product. This is what appears in quotes, invoices, and task views. All fields in this DTO are optional - only provide fields you want to update.
optionsTaskProductOptionDto[]
Array of product options. Options allow customers to add extra services or upgrades (e.g., "Add workshop", "Enable premium support"). When updating, you must provide the complete options structure - existing options will be replaced. Task products only support fixed pricing.
Show properties
Array of TaskProductOptionDto
idstring
UUID of the product option. Required when updating an existing option. Omit or leave undefined when creating a new option.
isMultiplebooleanrequired
Whether multiple values can be selected for this option. If true, customers can select multiple values (e.g., multiple colors). If false, only one value can be selected.
isRequiredbooleanrequired
Whether this option must be selected. If true, customers must choose at least one value from this option. If false, the option is optional.
namestringrequired
Display name of the option. Examples: "Color", "Size", "Support Level", "Additional Services". This identifies what type of choice the customer is making.
valuesTaskProductOptionValueDto[]required
Array of available values for this option. Each value can have its own name and fixed pricing. Task products only support fixed pricing. For example, a "Support Level" option might have values: "Basic" (no extra cost), "Premium" (+50 EUR one-time), "Enterprise" (+200 EUR one-time).
Show properties
Array of TaskProductOptionValueDto
extraPriceFixedobject | null
Additional fixed price charged when this option value is selected. Task products only support fixed pricing. For example, if selecting "Premium Support" adds 50 EUR one-time fee, set this to 50.0. Set to null if no extra fixed price applies. Must be 0 or greater.
idstring
UUID of the option value. Required when updating an existing value. Omit or leave undefined when creating a new value.
namestringrequired
Display name of the option value. Examples: "Blue", "Red", "Premium Support", "Add Workshop", "Extra Storage".
priceFixedobject | null
One-time fixed price for the product. Task products only support fixed pricing. Set to null if this pricing model does not apply. Must be 0 or greater.
variantsTaskProductVariantDto[]
Array of product variants. Variants allow different configurations or service levels (e.g., Standard, Pro, Enterprise). When updating, you must provide the complete variant structure - existing variants will be replaced. Task products only support fixed pricing.
Show properties
Array of TaskProductVariantDto
descriptionobject
Detailed description of the variant in HTML or Markdown format. This will be automatically converted to the internal document format. Can describe features, specifications, or what is included in this variant.
idstring
UUID of the variant. Required when updating an existing variant. Omit or leave undefined when creating a new variant.
namestringrequired
Display name of the variant. Examples: "Standard", "Pro", "Enterprise", "Basic Package", "Premium Package".
priceFixedobject | null
One-time fixed price for this variant. Task products only support fixed pricing. Set to null if this pricing model does not apply. Must be 0 or greater.
Responses
200Product 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 PATCH "https://leadtime.app/api/public/tasks/123/products/%3Cuuid%3E" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "categoryId": "550e8400-e29b-41d4-a716-446655440010",
  "description": "<p>Updated product description</p>",
  "logoId": "550e8400-e29b-41d4-a716-446655440011",
  "name": "Updated Product",
  "options": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440007",
      "isMultiple": false,
      "isRequired": true,
      "name": "Color",
      "values": [
        {
          "extraPriceFixed": 10,
          "id": "550e8400-e29b-41d4-a716-446655440008",
          "name": "Blue"
        }
      ]
    }
  ],
  "priceFixed": 100,
  "variants": [
    {
      "description": "<p>Premium variant with additional features</p>",
      "id": "550e8400-e29b-41d4-a716-446655440006",
      "name": "Premium",
      "priceFixed": 150
    }
  ]
}'
Response
{
  "success": true
}