Last updated: Jul 30, 2026
Hierarchies
Hierarchieslink
The Infraspeak API uses hierarchical structures for locations, categories, and material types. Understanding these hierarchies is essential for organizing and querying data effectively.
Location Hierarchylink
Locations represent the physical spaces where maintenance operations occur. They follow a hierarchical structure from buildings down to individual rooms or equipment positions.
Locations have three level types in a tree structure:
| Type | Description | Use Case |
|---|---|---|
| Building | Top-level structure. | Sites, buildings, campuses |
| Location-Folder | Optional grouping container, nested folders are allowed. | Floors, wings, zones |
| Location | Leaf level, physical space that can be a direct child of a Building or Location-Folder | Rooms, areas, spaces |
graph TD
Building["Building (root)<br>(e.g. Headquarters)"] --> FolderA["Location-Folder<br>(optional grouping)<br>(e.g. Floor 1)"]
Building --> LeafDirect["Location<br>(leaf - direct child)<br>(e.g. Reception)"]
FolderA --> LeafA["Location (leaf)<br>(e.g. Meeting Room 1)"]
FolderA --> FolderB["Location-Folder<br>(nested grouping)<br>(e.g. IT Area)"]
FolderB --> LeafB["Location (leaf)<br>(e.g. Server Room)"]
Fetching Locationslink
# Get buildings (root nodes)
curl "https://api.infraspeak.com/v3/buildings" \
-H "Authorization: Bearer YOUR_TOKEN"
# Get direct children of a location (building or folder)
curl "https://api.infraspeak.com/v3/locations/12345/children" \
-H "Authorization: Bearer YOUR_TOKEN"
Category Hierarchylink
Categories organize equipment types in a tree structure:
- Category Folders: used for grouping other categories, nested folders are allowed. Folders have the attribute
typeset toTYPE_OF_EQUIPMENTand the attributeis_realset tofalse. - Type of Equipments: equipment-based categories, used to configure maintenance on real equipments. They have the attribute
typeset toTYPE_OF_EQUIPMENTand the attributeis_realset totrue. - Soft Maintenance: location-based categories, used to configure maintenance on locations. They have the attribute
typeset toSOFT_MAINTENANCE.
graph TD
Root["Root Category (folder)<br>(e.g. Electricity)"] --> SubA["Sub-Category (folder)<br>(e.g. Elevator)"]
Root --> TypeDirectE["Equipment Type<br>(e.g. Generator)"]
Root --> TypeDirectS["Soft Maintenance<br>(e.g. Emergency Lighting)"]
SubA --> TypeA["Equipment Type<br>(e.g. Public Elevator)"]
SubA --> TypeB["Equipment Type<br>(e.g. Service Elevator)"]
Fetching Categorieslink
# Get root categories
curl "https://api.infraspeak.com/v3/categories" \
-H "Authorization: Bearer YOUR_TOKEN"
# Get children of a category
curl "https://api.infraspeak.com/v3/categories/12345/children" \
-H "Authorization: Bearer YOUR_TOKEN"
# Get only real (non-folder) categories
curl "https://api.infraspeak.com/v3/categories?is_real=true" \
-H "Authorization: Bearer YOUR_TOKEN"
Material Type Hierarchylink
Materials can be organized in a folder structure:
- Folders: used for grouping, nested folders are allowed.
- Materials: consumable materials.
graph TD
Folder["Material Folder<br>(e.g. Lighting)"] --> SubFolder["Material Folder<br>(e.g. Lamps)"]
Folder --> MatDirect["Material<br>(e.g. Eletronic Ballasts)"]
SubFolder --> MatA["Material<br>(e.g. LED)"]
SubFolder --> MatB["Material<br>(e.g. Fluorescent)"]
Fetching Material Typeslink
# Get root material type folders
curl "https://api.infraspeak.com/v3/material-types/root-folders" \
-H "Authorization: Bearer YOUR_TOKEN"
# Get children of a material type folder
curl "https://api.infraspeak.com/v3/material-types/folders/12345/children" \
-H "Authorization: Bearer YOUR_TOKEN"
# Get complete tree of material types
curl "https://api.infraspeak.com/v3/material-types/folders/tree" \
-H "Authorization: Bearer YOUR_TOKEN"
Full Code Patternslink
The "full code" of an entity provides a complete hierarchical path, by concatenating the codes of each level:
| Entity | Pattern | Example |
|---|---|---|
| Location | Building.Folder.Location | HQ.F1.R101 |
| Category | Parent.Child.Leaf | HVAC.AC.SPLIT |
| Material | Folder.Subfolder.Item | FILTERS.AIR.20X20 |