Zum Inhalt springen
Leadtime
Deutsch
Esc
navigateopen⌘Jpreview

Update product settings

Updates only product configuration settings without modifying product details. This endpoint is designed for quick updates to how a product is used in a project, without changing the product itself.

What gets updated:

  • quantity: How many units of this product are in the project
  • activeVariantId: Which variant is currently active (e.g., Standard vs Pro)
  • options: Which option values are selected (e.g., color, add-ons)

What does not get updated:

  • Product name, description, category, or logo
  • Base pricing (priceFixed, priceSubscription, pricePerUnit)
  • Variant definitions or option definitions
  • Active date ranges

Use cases:

  • Customer changes their mind about variant selection
  • Adjusting quantity after initial import
  • Adding or removing optional add-ons
  • Quick configuration changes without full product edit

Pricing Impact: Changing quantity, variant, or options will affect the final calculated prices, but the base product pricing structure remains unchanged.

POST/projects/{projectId}/products/{productId}/settings
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
projectIdstring<uuid>required
Project ID
productIdstring<uuid>required
Product ID
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 for this product. Variants represent different configurations or tiers (e.g., Standard, Pro, Enterprise). Set to null to deactivate any currently active variant. The variant must belong to this product.
contractPeriodMonthsnumber
Contract period in months. Defaults to 12 months if not specified.
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.
fixedDiscountAmountnumber
Discount amount for the fixed price component. For percentage discounts, this is the percentage (0-100). For fixed discounts, this is the amount. Set to 0 to remove.
min 0
fixedDiscountTypestring
Discount type for the fixed price component.
Allowed:FixedPercentage
optionsProductSettingOptionDto[]required
Array of option selections for this product. Each selection specifies which option is being configured and which values are selected. Required options must be included. Provide an empty array if no options should be selected.
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.
perUnitDiscountAmountnumber
Discount amount for the per-unit price component.
min 0
perUnitDiscountTypestring
Discount type for the per-unit price component.
Allowed:FixedPercentage
priceFrequencynumber
Billing frequency in months for subscription or per-unit pricing. Valid values: 1 (monthly), 3 (quarterly), 6 (semi-annually), 12 (annually).
quantitynumberrequired
Number of units of this product in the project. Must be at least 1. This affects the final price calculation, especially for per-unit pricing.
min 1
renewalModestring
Renewal mode for the product subscription. Automatic means the subscription will automatically renew, Stops means it will stop at the end of the contract period.
Allowed:AutomaticStops
subscriptionDiscountAmountnumber
Discount amount for the subscription price component.
min 0
subscriptionDiscountTypestring
Discount type for the subscription price component.
Allowed:FixedPercentage
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 project access
404Not Found - Product or project does not exist
Request
curl -X POST "https://leadtime.app/api/public/projects/%3Cuuid%3E/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",
  "contractPeriodMonths": 12,
  "customPrices": {
    "base": {
      "priceFixed": 100.5,
      "pricePerUnit": 10,
      "priceSubscription": 50.25
    },
    "variant_550e8400": {
      "priceFixed": 150,
      "pricePerUnit": 15,
      "priceSubscription": 75
    }
  },
  "fixedDiscountAmount": 10,
  "fixedDiscountType": "Fixed",
  "options": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440004",
      "value": [
        "550e8400-e29b-41d4-a716-446655440007"
      ]
    }
  ],
  "perUnitDiscountAmount": 5,
  "perUnitDiscountType": "Fixed",
  "priceFrequency": 1,
  "quantity": 3,
  "renewalMode": "Automatic",
  "subscriptionDiscountAmount": 15,
  "subscriptionDiscountType": "Fixed"
}'
Response
{
  "success": true
}