Reorder product categories
Updates the display order of product categories by providing an ordered list of category IDs.
How to reorder categories:
- Get the current list of categories using GET /administration/product-categories
- Create an array of category IDs in the desired display order
- Send the ordered array in the request body
Example: If you want categories in order: Hardware, Software, Consulting Provide: [“hardware-id”, “software-id”, “consulting-id”]
What happens:
- Categories are reordered according to the provided array
- First ID in array becomes first category, second ID becomes second, etc.
- Sort order is updated for all categories in the workspace
Note: This endpoint requires the manageSettings permission. The order affects how categories appear in dropdowns and lists throughout the application.
POST
/administration/product-categories/sortAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredRequest body
requiredapplication/jsonidsstring[]requiredArray of product category IDs in the desired display order. The first ID in the array will be displayed first, the second ID will be displayed second, and so on. All category IDs must be valid UUIDs that exist in the workspace. The sort order is updated for all categories based on their position in this array.
Responses
200Product categories reordered successfully
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
Request
curl -X POST "https://leadtime.app/api/public/administration/product-categories/sort" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ids": [
"123e4567-e89b-12d3-a456-426614174000",
"223e4567-e89b-12d3-a456-426614174001",
"323e4567-e89b-12d3-a456-426614174002"
]
}'const response = await fetch("https://leadtime.app/api/public/administration/product-categories/sort", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"ids": [
"123e4567-e89b-12d3-a456-426614174000",
"223e4567-e89b-12d3-a456-426614174001",
"323e4567-e89b-12d3-a456-426614174002"
]
})
});import requests
response = requests.post(
"https://leadtime.app/api/public/administration/product-categories/sort",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"ids": [
"123e4567-e89b-12d3-a456-426614174000",
"223e4567-e89b-12d3-a456-426614174001",
"323e4567-e89b-12d3-a456-426614174002"
]
},
)Response
Product categories reordered successfully
Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions