Taxonomy ID System
Switchyard uses an 18-digit taxonomy ID system as a scannable, human-readable alternative to UUIDs. Every entity in the system has both a UUID (for internal database operations) and a taxonomy ID (for scanning, display, and external references).Overview
Taxonomy IDs are designed to be:- Scannable - Can be printed as Code 128 barcodes
- Checksum-protected - MOD-97 validation prevents typos
- Type-aware - First digits identify the entity type
- Globally unique - No collisions across entity types
All V1 API endpoints accept both UUIDs and taxonomy IDs as the
:id parameter. The system automatically detects and resolves the correct format.ID Format (Memory Map)
An 18-digit taxonomy ID follows this structure:| Offset | Width | Field | Allowed | Description |
|---|---|---|---|---|
| 0 | 2 | VER | 01 | Schema version. Reserve 90-99 for future versions |
| 2 | 2 | TYPE | See table below | Entity type. Partitions the ID space |
| 4 | 3 | FAC | 000–999 | Facility/site code. Single site uses 000 |
| 7 | 7 | SEQ | 0000000–9999999 | Per-TYPE per-FAC counter |
| 14 | 2 | RSV | 00–99 | Reserved for future use (flags, subtypes). Keep 00 |
| 16 | 2 | CS | 00–96 | MOD-97 checksum over digits 0–15 |
Type Allocations
Each entity type has a unique 2-digit TYPE code:| TYPE | Entity | Initial Allocation | Description |
|---|---|---|---|
10 | Tote | FAC=000, SEQ working band | Container for order items |
11 | Robot | FAC=000, SEQ working band | Delivery robot |
12 | Map Location | FAC=000, SEQ working band | Warehouse location node |
13 | Item | FAC=000, SEQ working band | Sellable product |
14 | Job/Task | Optional | Work assignments |
20–49 | Reserved | Hold | Near-term entity classes |
50–89 | Vendor/Batch | Hold | Lot tracking, experiments |
90–99 | Future Schema | Do not use | Reserved for schema evolution |
Entity Type Details
TYPE 10 - Totes
TYPE 10 - Totes
Physical containers used to hold items during fulfillment.Use cases:
- Order picking containers
- Receiving containers
- Inter-zone transfer bins
01 10 000 0000001 00 CS → Tote #1TYPE 11 - Robots
TYPE 11 - Robots
Autonomous delivery robots for warehouse operations.Use cases:
- Delivery robots
- Picking assistants
- Inventory scanners
01 11 000 0000027 00 CS → Robot #27TYPE 12 - Map Locations
TYPE 12 - Map Locations
Physical locations within the warehouse grid.Use cases:
- Aisles, bays, shelves, slots
- Zone markers
- Staging areas
01 12 000 0000042 00 CS → Map location #42TYPE 13 - Items
TYPE 13 - Items
Sellable products in the catalog.Use cases:
- Product lookup
- Inventory tracking
- Order line items
01 13 000 0012345 00 CS → Item #12345SEQ Reservation Bands
Within each TYPE×FAC combination, the 7-digit SEQ space is divided:| SEQ Range | Purpose |
|---|---|
0000000–0099999 | Test/Temporary - Development and testing |
0100000–8999999 | Production - Live working pool (~8.9M IDs) |
9000000–9999999 | Future/Expansion - Reserved for growth |
Checksum Calculation
The 2-digit checksum (CS) at positions 16-17 is calculated using MOD-97:Examples (FAC=000, RSV=00)
| Entity | Full ID (without CS) | Calculation | CS | Complete Taxonomy ID |
|---|---|---|---|---|
| Tote #1 | 01 10 000 0000001 00 | 0110000000000100 mod 97 | XX | 011000000000010XX |
| Robot #27 | 01 11 000 0000027 00 | 0111000000002700 mod 97 | XX | 011100000000270XX |
| Map loc #42 | 01 12 000 0000042 00 | 0112000000004200 mod 97 | XX | 011200000000420XX |
| Item #12345 | 01 13 000 0012345 00 | 0113000001234500 mod 97 | XX | 011300000123450XX |
The checksum provides typo detection. If a user manually enters an ID incorrectly, the checksum validation will fail.
Database Implementation
Taxonomy IDs are automatically generated by database triggers when new entities are created.Table Structure
Each table with taxonomy IDs has:Generation Trigger
API Usage
Dual ID Support
All V1 API endpoints accept both UUIDs and taxonomy IDs:ID Resolution
The API automatically detects the ID format:Detection Logic
Barcode Implementation
Code 128 Set C
Taxonomy IDs are optimized for Code 128 Set C encoding:- 18 digits = 9 symbol pairs
- Highly compact barcode
- Fast scanning
Label Format
Validation
Client-Side Validation
Server-Side Validation
The API validates taxonomy IDs using Zod schemas:Best Practices
Use Taxonomy IDs for Display
Show taxonomy IDs in user interfaces and printed materials. They’re easier to read and verify than UUIDs.
Store UUIDs Internally
Use UUIDs for database foreign keys and internal references. Taxonomy IDs are for external interfaces.
Validate on Input
Always validate the checksum when accepting taxonomy ID input to catch typos early.
Include Both in Exports
When exporting data, include both the UUID and taxonomy ID for maximum compatibility.
Related Documentation
- Data Model - Database schema and relationships
- V1 API Overview - API endpoint documentation
- Scanner API Guide - Mobile scanning integration