Search categories by term
GET/truckers/categories/search
Search for categories that match a search term in their codes or descriptions.
Features:
- Case insensitive search in titles and labels
- Partial match (does not require complete term)
- Limit of 20 results for headings and 20 for subheadings
- Results sorted alphabetically by code
- Automatic normalization of titles and labels
Search algorithm:
- Search for matches in:
- Category codes (4 or 6 digits)
- Descriptive text (labels)
- Apply filters:
- Minimum 2 characters in search term
- Maximum 40 total results (20 headings + 20 subheadings)
- Processing:
- Removes prefixes such as heading, subheading
- Combines and cleans labels (removes -, :, extra spaces)
- Sorts results alphabetically
Request
Responses
- 200
- 400
- 401
- 500
Standardized and sorted search results.
Structure: - title: Normalized category code (without prefixes) - label: Human-readable description (without special characters)
Complete example: json [ { title: 0101, label: Live horses, asses, mules and hinnies, metadata: { type: heading, originalTitle: heading 0101, originalLabels: [Horses, asses, mules, hinnies, live] } }, { title: 010121, label: Pure-bred breeding animals, metadata: { type: subheading, originalTitle: subheading 010121, originalLabels: [Breeding, animals, pure-bred] } } ]
Use cases: 1. Interactive search in user interfaces 2. Category autocompletion 3. Integration with merchandise classification systems
Search term missing or too short (less than 2 characters)
Unauthorized - Invalid or missing JWT token
Internal Server Error