Skip to content
Leadtime
English
Esc
↑↓navigate↵open⌘Jpreview

Reorder product categories

Updates the display order of product categories by providing an ordered list of category IDs.

How to reorder categories:

  1. Get the current list of categories using GET /administration/product-categories
  2. Create an array of category IDs in the desired display order
  3. 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/sort
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Request body
requiredapplication/json
idsstring[]required

Array 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
200

Product categories reordered successfully

401

Unauthorized - Invalid or missing authentication token

403

Forbidden - Insufficient API scopes or permissions

Try it
Server
Authorization
Bodyapplication/json
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"
  ]
}'
Response
Product categories reordered successfully