Duplicate product
Creates a copy of an existing product within the same project. Useful when you need the same product multiple times with different configurations or for different time periods.
What gets duplicated:
- All product details (name, description, category, logo)
- All pricing information
- All variants and their configurations
- All options and option values
- Current quantity and settings
Use cases:
- Same product with different active date ranges
- Same product with different variant/option selections
- Multiple instances of a product in one project
Returns the ID of the newly created duplicate product.
POST
/projects/{projectId}/products/{productId}/duplicateAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
projectIdstring<uuid>requiredProject ID
productIdstring<uuid>requiredProduct ID to duplicate
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:
fullResponses
201Product duplicated successfully
successbooleanrequiredOperation success flag
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/duplicate" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"const response = await fetch("https://leadtime.app/api/public/projects/%3Cuuid%3E/products/%3Cuuid%3E/duplicate", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
});import requests
response = requests.post(
"https://leadtime.app/api/public/projects/%3Cuuid%3E/products/%3Cuuid%3E/duplicate",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
},
)Response
{
"success": true
}Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient permissions or no project access
Not Found - Product or project does not exist