Capability
A capability attaches structured metadata to any resource on the platform. It holds a JSON payload, optional localization strings, and an optional render template. The same capability row can be attached to a single bookable, an entire bookable type, or any other supported object. The data travels with the resource and is included in the context available to actions.
Two patterns are common. Functional capabilities hold data in value that actions or external code read to make decisions. Nothing is rendered to the user. Rendered capabilities carry a render template the server interpolates against value and locale to produce a markdown body that can be shown directly in the UI.
For the call sequence see Attach a Capability.
Fields
| Field | Purpose |
|---|---|
name | Identifier shown in admin tooling |
description | Free text rationale |
value | Free form JSON payload. The shape is decided by the consumer that reads it. |
locale | Localization map. Top level keys are either column names like name or description, or jsonpath references into value such as .foo.bar. Each key maps to a per language map of strings. |
render | Markdown body using Go text/template syntax. Helpers localize and path are available. |
rendered | Server side rendered output of the render template applied to this row. Read only. |
owner_id | Owning organization. Required on create. |
If render is empty the capability is functional only. If render is set, the server fills rendered from value and locale.
Localization
locale lets the same capability surface different strings per language without duplicating the row. The key naming follows two conventions:
- Column key: a top level key such as
nameordescriptionoverrides the value of the same named field at render time. - Path key: a key beginning with
.is a jsonpath intovalue. The string replaces what thepathtemplate helper would otherwise pull fromvalue.
{
"locale": {
"name": { "eng": "Projector", "nob": "Prosjektor" },
".specs.resolution": { "eng": "4K", "nob": "4K" }
}
}Object bindings
A capability can be attached to any resource on the platform. The attachment records which object carries the capability and an optional reason and priority. Supported targets include organizations, locations, bookables, bookable types, bookings, checkins, claims, codes, assets, timeslots, actions, and other capabilities.
Actions
A capability can carry actions managed through its sub resource endpoints. Actions bound to a capability are matched and run through the same trigger mechanism as actions bound directly to a bookable, its locations, or its organizations. Any bookable that has the capability attached becomes part of the match chain.
API
The Capability tag covers capability CRUD, object attachment, the capability audit log and the actions bound to a capability.