Status Definitions API
Canonical status catalog and transition rules shared across all domains
Overview
The Status Definitions API provides the canonical list of available statuses for each entity type. Use this endpoint to populate dropdowns, badges, timelines, and status transition UIs without hardcoding values in the frontend.
Supported Entity Types
case, inquiry, order, offer, message, invoice, contract, sign_request, product
Primary Use Cases
- Populate status pickers and badges
- Drive transition dropdowns in UI forms
- Explain allowed next statuses in workflow screens
| Method | Endpoint | Description | Requirements |
|---|---|---|---|
| GET | /api/status-definitions | List status definitions for all entity types or a specific entity type |
|
| GET | /api/status-definitions/transitions | List allowed transitions, optionally filtered by entity type and source status |
|
Request Examples
Get Definitions for One Entity Type
GET /api/status-definitions?entity_type=offer&grouped=false
{
"success": true,
"count": 6,
"grouped": false,
"data": [
{
"entity_type": "offer",
"key": "draft",
"label": "Draft",
"color": "#6B7280",
"sort_order": 1,
"is_initial": true,
"is_terminal": false
}
]
}
Get Transition Rules
GET /api/status-definitions/transitions?entity_type=offer&from_status=sent
{
"success": true,
"count": 2,
"grouped": true,
"data": {
"offer": {
"sent": [
{
"from_status": "sent",
"to_status": "viewed"
},
{
"from_status": "sent",
"to_status": "accepted"
}
]
}
}
}