API reference
Templates
Template authoring, versioning, and effective-resolution lookups across the four-tier inheritance chain.
Key points
- Templates define what the engine schedules — entity types, event types, constraints, notifications
- Four-tier inheritance: Platform → Application → Customer → Instance
- Effective configuration is the merged result of the full inheritance chain
- Versions follow draft → published → deprecated lifecycle; only published versions are usable
About templates
Templates are JSON configurations that define your domain. They layer through four tiers, with deeper tiers overriding shallower ones. Most operations against templates target a specific tier — customer-tier configuration changes don’t require republishing the underlying application template.
See the configuration framework for the full inheritance model with examples.
List templates
/api/v1/templatesPaginated list of templates the organization can read.
Headers
x-organization-idUUIDrequiredOrganization scope
Query parameters
layerenumFilter by layer — platform, application, customer, instance
statusenumdraft, published, deprecated
searchstringSearch across templateId and name
tagsstring[]Filter by tag(s)
limitintegerDefault 20, max 100
offsetintegerDefault 0
Responses
200Paginated template list{
"items": [
{
"templateId": "home_care_v1",
"name": "Home Care PACE",
"layer": "application",
"currentVersion": "1.4.0",
"status": "published",
"tags": ["healthcare", "pace"]
}
],
"total": 12,
"limit": 20,
"offset": 0
}401UnauthorizedGet template
/api/v1/templates/{templateId}Retrieve a specific template by ID. Optionally pin to a version.
Path parameters
templateIdstringrequiredTemplate identifier
Query parameters
versionstringSpecific version to retrieve. Defaults to current published version.
Responses
200Template configuration returned404Template not foundEffective configuration
/api/v1/templates/{templateId}/effectiveReturn the merged result of the full inheritance chain — what the engine actually uses for this template in this organization.
Headers
x-organization-idUUIDrequiredOrganization scope
Path parameters
templateIdstringrequiredTemplate to resolve
Responses
200Resolved effective configuration with provenance{
"templateId": "home_care_v1_seniorlife",
"resolvedFrom": [
"platform/universal_person_scheduling@1.0.0",
"application/home_care_v1@1.4.0",
"customer/seniorlife@2.1.0",
"instance/seniorlife_main_center@1.0.2"
],
"config": {
"entities": { ... },
"eventTypes": { ... },
"constraints": { ... },
"operatingHours": {
"monday": { "start": "07:00", "end": "19:00" }
}
}
}404Template not foundWhen to use effective vs. raw
GET /templates/{id} when editing — you want to see one tier’s configuration in isolation. Use /effective when debugging — you want to see what the engine sees after all overrides have applied.Validate
/api/v1/templates/{templateId}/validateValidate a template configuration without persisting. Returns structured errors and warnings.
Headers
x-organization-idUUIDrequiredOrganization scope
Path parameters
templateIdstringrequiredTemplate ID
Request body
Configuration object to validate against the template schema and parent-tier expectations.
{
"config": {
"entities": { ... },
"constraints": { ... }
}
}Responses
200Validation result. Check the isValid field; errors and warnings are always populated.{
"isValid": false,
"errors": [
{
"path": "constraints.daily_hour_limit.rule",
"code": "INVALID_EXPRESSION",
"message": "Unknown variable 'travel_time' — declare it in extension_inputs"
}
],
"warnings": []
}400Request body is not valid JSONVersioning
Templates carry version history. New versions start as drafts, get reviewed and published, and eventually get deprecated. Only published versions are usable for live scheduling.
Version history
/api/v1/templates/{templateId}/versionsList all versions of a template with their status.
Headers
x-organization-idUUIDrequiredOrganization scope
Path parameters
templateIdstringrequiredTemplate ID
Responses
200List of versions{
"versions": [
{ "version": "1.4.0", "status": "published", "publishedAt": "..." },
{ "version": "1.3.2", "status": "deprecated", "deprecatedAt": "..." },
{ "version": "1.5.0-rc.1", "status": "draft" }
]
}404Template not foundLifecycle endpoints
Four endpoints manage the version lifecycle:
POST /api/v1/templates/{templateId}/versions— create a new draft version (optionally based on an existing version)PUT /api/v1/templates/{templateId}/versions/{version}— update a draft version’s configurationPOST /api/v1/templates/{templateId}/versions/{version}/publish— promote a draft to published. Validation runs server-side; bad templates fail with 400.POST /api/v1/templates/{templateId}/versions/{version}/deprecate— mark a published version as deprecated. Existing references continue working; new uses are blocked.
Publish is one-way