Partially update product category
Partially updates an existing product category. Only provided fields will be updated.
What can be updated:
- Name: Display name of the category (optional)
- Icon: Icon in format :icon_name: (optional)
- Description: Optional description of the category (optional)
- Translations: Multilingual name and description translations (optional)
Icon format:
- Use emoji-style format: :icon_name:
- Examples: :computer:, :desktop_computer:, :money_with_wings:, :office_worker:
Multilingual support:
- Provide translations array with language codes
- Each translation can have a translated name and description
- If translations are provided, they replace existing translations
- Translations appear automatically in multilingual user interfaces and documents
Note: This endpoint requires the manageSettings permission. Only fields provided in the request body will be updated. Fields not provided will remain unchanged. Returns 404 if the category does not exist.
PATCH
/administration/product-categories/{id}Authorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
idstringrequiredRequest body
requiredapplication/jsondescriptionobjectOptional description explaining what products or services belong to this category. Helps users understand the category purpose when creating or assigning products. Only include this field if you want to update the description. If not provided, the existing description remains unchanged. Set to null to clear the description.
iconstringIcon identifier for the product category in emoji-style format :icon_name:. Icons help visually distinguish categories in lists and dropdowns. Examples: :computer:, :desktop_computer:, :money_with_wings:, :office_worker:, :package:. Only include this field if you want to update the icon. If not provided, the existing icon remains unchanged.
namestringDisplay name of the product category. This is the primary name used to identify and organize products. Examples: "Hardware", "Software", "Consulting", "Subscriptions". Only include this field if you want to update the name. If not provided, the existing name remains unchanged.
translationsProductCategoryTranslationDto[]Array of translations for multilingual support. Each translation provides the category name and description in a specific language. Translations are automatically used in multilingual user interfaces and documents based on the user language preference. Common languages: "en" (English), "de" (German). Only include this field if you want to update translations. If provided, it replaces all existing translations. If not provided, existing translations remain unchanged.
Show propertiesHide properties
Array of
ProductCategoryTranslationDtodescriptionobjectTranslated description of the product category in the specified language. This description appears in multilingual user interfaces and documents when the user language matches.
languagestringrequiredISO 639-1 language code for the translation (e.g., "en" for English, "de" for German). This determines which language interface will display this translation.
nameobjectTranslated name of the product category in the specified language. This name appears in multilingual user interfaces and documents when the user language matches.
Responses
200Product category updated successfully
createdAtstring<date-time>requiredISO 8601 timestamp indicating when the product category was created. Format: YYYY-MM-DDTHH:mm:ss.sssZ
defaultKeyobjectDefault key identifier for system-defined categories (e.g., "software", "hardware", "consulting", "external_costs"). Only present for categories that were created from system defaults. Custom categories created by users do not have a defaultKey. This key is used when restoring default categories.
deletedAtobjectISO 8601 timestamp indicating when the product category was soft-deleted, or null if not deleted. Format: YYYY-MM-DDTHH:mm:ss.sssZ. Soft-deleted categories are marked as deleted but not permanently removed.
descriptionobjectOptional description explaining what products or services belong to this category. Helps users understand the category purpose when creating or assigning products.
iconstringrequiredIcon identifier for the product category in emoji-style format :icon_name:. Icons help visually distinguish categories in lists and dropdowns.
idstringrequiredUnique identifier (UUID) of the product category. Use this ID to reference the category in other API calls.
namestringrequiredDisplay name of the product category. This is the primary name used to identify and organize products.
sortnumberNumeric sort order for displaying categories. Lower numbers appear first. Used to control the order in which categories appear in dropdowns and lists.
translationsProductCategoryTranslationDto[]requiredArray of translations for multilingual support. Each translation provides the category name and description in a specific language. Translations are automatically used in multilingual user interfaces and documents based on the user language preference.
Show propertiesHide properties
Array of
ProductCategoryTranslationDtodescriptionobjectTranslated description of the product category in the specified language. This description appears in multilingual user interfaces and documents when the user language matches.
languagestringrequiredISO 639-1 language code for the translation (e.g., "en" for English, "de" for German). This determines which language interface will display this translation.
nameobjectTranslated name of the product category in the specified language. This name appears in multilingual user interfaces and documents when the user language matches.
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
Request
curl -X PATCH "https://leadtime.app/api/public/administration/product-categories/string" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"description": "Software products and licenses",
"icon": ":package:",
"name": "Software",
"translations": [
{
"description": "Software products and licenses",
"language": "en",
"name": "Software"
}
]
}'const response = await fetch("https://leadtime.app/api/public/administration/product-categories/string", {
method: "PATCH",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"description": "Software products and licenses",
"icon": ":package:",
"name": "Software",
"translations": [
{
"description": "Software products and licenses",
"language": "en",
"name": "Software"
}
]
})
});import requests
response = requests.patch(
"https://leadtime.app/api/public/administration/product-categories/string",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"description": "Software products and licenses",
"icon": ":package:",
"name": "Software",
"translations": [
{
"description": "Software products and licenses",
"language": "en",
"name": "Software"
}
]
},
)Response
{
"createdAt": "2024-01-01T00:00:00.000Z",
"defaultKey": "software",
"deletedAt": null,
"description": "Software products and licenses",
"icon": ":package:",
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Software",
"sort": 1,
"translations": [
{
"description": "Software products and licenses",
"language": "en",
"name": "Software"
},
{
"description": "Softwareprodukte und Lizenzen",
"language": "de",
"name": "Software"
}
]
}Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions