Import product from catalog
Imports a standardized product from the product catalog into a project. The product is copied into the project, allowing project-specific configuration without affecting the original catalog entry.
How it works:
- Select a product from the catalog by providing its productId
- Set the quantity for this product in the project
- Optionally select an active variant (e.g., Standard, Pro, Enterprise)
- Select any required options and optional add-ons
Product Isolation: When imported, the product becomes a copy within the project. Any subsequent changes to the product in this project do not affect the original catalog entry. This ensures historical accuracy for quotes and invoices.
Pricing: The final price is calculated based on:
- Base product pricing (fixed, subscription, or per-unit)
- Selected variant pricing adjustments
- Selected option value extra pricing
- Quantity multiplier
Required fields:
- productId: UUID of the catalog product to import
- quantity: Minimum 1
- options: Array of option selections (can be empty array)
Optional fields:
- activeVariantId: UUID of the variant to activate
Returns the ID of the newly created product in the project.
POST
/projects/{projectId}/productsAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
projectIdstring<uuid>requiredProject ID
Query parameters
fieldsToReturnstringComma-separated list of top-level response fields to return. Overrides the endpoint compact default unless responseShape=full is used.
responseShapestringAdvanced 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:
compactfullHeader parameters
LT-Response-ShapestringAdvanced override. Set to full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
Allowed:
fullRequest body
requiredapplication/jsonactiveFromFixedDatestring<date> | nullFixed start date when activeFromType is FixedDate. Format: ISO 8601 date (YYYY-MM-DD). Required when activeFromType is FixedDate.
activeFromTypestringType 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:
ImmediatelyProjectBillingFixedDateactiveVariantIdobject | nullUUID of the variant to activate for this product instance. Variants represent different configurations or tiers of a product (e.g., Standard, Pro, Enterprise). If not provided, no variant is active. The variant must belong to the product being imported.
contractPeriodMonthsnumberContract period in months. Defaults to 12 months if not specified.
customPricesobjectrequiredCustom 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.
optionsProductSettingOptionDto[]requiredArray of option selections for this product. Options are add-ons or configuration choices that customers can select. Each option selection specifies which option is being configured and which values are selected. Required options must be included. Can be an empty array if no options are needed.
Show propertiesHide properties
Array of
ProductSettingOptionDtoidstringrequiredUUID of the product option. This identifies which option (e.g., "Color", "Size", "Support Level") is being configured.
valuestring[]requiredArray 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.
priceFrequencynumberBilling frequency in months for subscription or per-unit pricing. Valid values: 1 (monthly), 3 (quarterly), 6 (semi-annually), 12 (annually).
productIdstringrequiredUUID of the catalog product to import into the project. The product must exist in the product catalog. When imported, a copy is created in the project that can be configured independently.
quantitynumberrequiredNumber of units of this product to add to the project. Must be at least 1. The quantity affects the final price calculation when using per-unit pricing.
min 1
renewalModestringRenewal 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:
AutomaticStopsResponses
201Product imported successfully
successbooleanrequiredOperation success flag
400Bad Request - Invalid input or validation error
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient permissions or no project access
404Not Found - Catalog product or project does not exist
Request
curl -X POST "https://leadtime.app/api/public/projects/%3Cuuid%3E/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",
"contractPeriodMonths": 12,
"customPrices": {
"base": {
"priceFixed": 100.5,
"pricePerUnit": 10,
"priceSubscription": 50.25
},
"variant_550e8400": {
"priceFixed": 150,
"pricePerUnit": 15,
"priceSubscription": 75
}
},
"options": [
{
"id": "550e8400-e29b-41d4-a716-446655440004",
"value": [
"550e8400-e29b-41d4-a716-446655440005"
]
}
],
"priceFrequency": 1,
"productId": "550e8400-e29b-41d4-a716-446655440002",
"quantity": 2,
"renewalMode": "Automatic"
}'const response = await fetch("https://leadtime.app/api/public/projects/%3Cuuid%3E/products", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"activeFromFixedDate": "2024-01-01",
"activeFromType": "Immediately",
"activeVariantId": "550e8400-e29b-41d4-a716-446655440003",
"contractPeriodMonths": 12,
"customPrices": {
"base": {
"priceFixed": 100.5,
"pricePerUnit": 10,
"priceSubscription": 50.25
},
"variant_550e8400": {
"priceFixed": 150,
"pricePerUnit": 15,
"priceSubscription": 75
}
},
"options": [
{
"id": "550e8400-e29b-41d4-a716-446655440004",
"value": [
"550e8400-e29b-41d4-a716-446655440005"
]
}
],
"priceFrequency": 1,
"productId": "550e8400-e29b-41d4-a716-446655440002",
"quantity": 2,
"renewalMode": "Automatic"
})
});import requests
response = requests.post(
"https://leadtime.app/api/public/projects/%3Cuuid%3E/products",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"activeFromFixedDate": "2024-01-01",
"activeFromType": "Immediately",
"activeVariantId": "550e8400-e29b-41d4-a716-446655440003",
"contractPeriodMonths": 12,
"customPrices": {
"base": {
"priceFixed": 100.5,
"pricePerUnit": 10,
"priceSubscription": 50.25
},
"variant_550e8400": {
"priceFixed": 150,
"pricePerUnit": 15,
"priceSubscription": 75
}
},
"options": [
{
"id": "550e8400-e29b-41d4-a716-446655440004",
"value": [
"550e8400-e29b-41d4-a716-446655440005"
]
}
],
"priceFrequency": 1,
"productId": "550e8400-e29b-41d4-a716-446655440002",
"quantity": 2,
"renewalMode": "Automatic"
},
)Response
{
"success": true
}Bad Request - Invalid input or validation error
Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient permissions or no project access
Not Found - Catalog product or project does not exist