Skip to main content
Docs

Templates and presets

A preset is configuration data authored by Holdyn that you can install: a controls profile, a set of settings, templates. A template is your own versioned blueprint for a mandate. Installing a preset first shows a preview of what would change, and you acknowledge every conflict before it applies. Templates are created as drafts and a member reviews and publishes them. Nothing in the product is specific to one industry; presets are data. See Templates and presets.

The base is https://holdyn-fb2e34c7cbae.herokuapp.com/api/v1/b2b. Every endpoint below lists who may call it.

At a glance#

Objects

Template and TemplateBody

Template and TemplateBody (example values)
{
  "id": "tpl_6543a1b2c3d4e5f6a7b8ca20",
  "object": "template",
  "key": "milestone_project",
  "name": "Project work",
  "description": "",
  "version": 1,
  "status": "published",
  "is_current": true,
  "body": { "...": "TemplateBody" },
  "preset": { "key": "milestone_project", "version": 1, "values_status": "draft_values" },
  "created_by": "mem_6543a1b2c3d4e5f6a7b8c9d1",
  "published_by": "mem_6543a1b2c3d4e5f6a7b8c9d1",
  "published_at": "2026-11-02T09:10:00.000Z",
  "change_request": null,
  "validation": null,
  "builder_notices": [
    { "code": "obo_payee_onboarding_first", "message": "Providers must finish card and bank-debit onboarding before the first debit." },
    { "code": "collections_do_not_mirror_releases", "message": "If cancelled after Materials delivered and tear-off, $3,000 of the $8,000 Materials payment cannot be refunded on this connection (example on $20,000)." }
  ],
  "created_at": "2026-11-02T09:05:00.000Z",
  "updated_at": "2026-11-02T09:10:00.000Z"
}

Preset and PresetInstallPreview

Preset and PresetInstallPreview (example values)
{
  "id": "preset_6543a1b2c3d4e5f6a7b8ca10",
  "object": "preset",
  "key": "milestone_project",
  "kind": "bundle",
  "name": "Project work",
  "description": "Four client payments, three provider payments, California B&P 7159.5 checks in warn mode.",
  "version": 1,
  "status": "active",
  "values_status": "draft_values",
  "checksum": "5f1d…64 hex",
  "contents": {
    "settings_patch": { "...": "partial settings document: every control key the bundle relies on, stated explicitly" },
    "templates": [ { "key": "milestone_project", "name": "Project work", "body": { "...": "TemplateBody" } } ]
  },
  "installed": { "version": 1, "installed_at": "2026-11-02T09:05:00.000Z", "installed_by": "mem_6543a1b2c3d4e5f6a7b8c9d1", "settings_version": 2,
                 "templates": ["tpl_6543a1b2c3d4e5f6a7b8ca20"], "values_confirmed_at": null, "values_confirmed_by": null }
}

Endpoints

GET/presets

Credential
Member session or API key
Permission
templates.read
API key scope
templates:read
Mode
tenant-wide
Pagination
none (`has_more: false`)

Request

kind (multi: control_profile, template, bundle).

Response

200 ListResponse<Preset> (contents: null; installed reflects this tenant). Retired presets are omitted.

GET/presets/:key

Credential
Member session or API key
Permission
templates.read
API key scope
templates:read
Mode
tenant-wide

Request

:key preset key (recommended_controls, start_minimal, milestone_project, …).

Response

200 Preset with contents.

POST/presets/:key/install

Credential
Member session
Permission
settings.update and templates.manage
Mode
tenant-wide
Step-up
live (tenant live-enabled) when apply_settings is true
Idempotency
honoured, recommended

Request

dry_run boolean optional (default false: with true nothing is stored and the answer is PresetInstallPreview); acknowledged_paths string[] (required: every conflicts path of the preview); acknowledge_draft_values boolean (required true when the preset's values_status is draft_values); reason string (10–1000; required when the settings patch switches a control off, when installing start_minimal, or when the change class is weakening); templates string[] optional (subset of the preset's template keys; default all); apply_settings boolean optional (default true).

Response

200 PresetInstallPreview (dry run), or 200 {"object": "preset_install", "preset": Preset, "settings_version": SettingsVersion|null, "change_request": ChangeRequest|null, "templates": [Template]}. Templates are created as draft versions (a new draft version when the key exists): a member reviews and publishes them.

Errors

400 parameter_missing (acknowledge_draft_values), reason_required; 409 preset_conflicts_unacknowledged (+ conflicts, body = the preview), change_request_pending, compliance_acknowledgement_required (the patch enables a pack; acknowledge first).

Record and events

preset.installed (key, version, checksum, acknowledged paths), settings.version_created (or settings.change_requested when weakening on a live-enabled tenant), template.created per template · Events: —

Notes

precedence: every key the preset's settings_patch lists overwrites the current value; unlisted keys are untouched; bundles list every control key they rely on, enabled or not. Installing a control_profile preset sets tenant.onboarding.control_profile (the first choice is change class initial). Presets are data; nothing here runs preset-specific code. Works in either dashboard mode (settings are tenant-wide).

POST/presets/:key/confirm-values

Credential
Member session
Permission
settings.update and templates.manage
Mode
tenant-wide
Idempotency
honoured

Request

note string optional (≤ 1000).

Response

200 Preset (installed.values_confirmed_at set; the dashboard's "draft values" badge disappears).

Errors

409 preset_not_installed, invalid_state_transition (already confirmed).

Record and events

preset.values_confirmed · Notes: confirmation states that the tenant reviewed the preset values with its own business and counsel; it changes no value.

GET/templates

Credential
Member session or API key
Permission
templates.read
API key scope
templates:read
Mode
tenant-wide
Pagination
cursor

Request

key (all versions of one key), status (multi: draft, published, archived), latest boolean (default true when key is absent: one row per key, the newest version).

Response

200 ListResponse<Template>.

GET/templates/:id

Credential
Member session or API key
Permission
templates.read
API key scope
templates:read
Mode
tenant-wide

POST/templates

Credential
Member session
Permission
templates.manage
Mode
tenant-wide
Idempotency
honoured, recommended

Request

key string required (^[a-z0-9_]{2,40}$); name string required (1–120); description string optional (≤ 1000); body TemplateBody required (structure validated; sums and references may still be incomplete in a draft).

Response

201 Template (status: draft, version: 1, validation and builder_notices filled).

Errors

400 parameter_invalid (structure); 409 template_key_exists; 422 feature_not_available (evidence_file_types).

Record and events

template.created.

PATCH/templates/:id

Credential
Member session
Permission
templates.manage
Mode
tenant-wide
Idempotency
honoured

Request

name, description, body (replaces the whole body).

Response

200 Template (with validation).

Errors

409 invalid_state_transition (only draft versions are editable; published versions are immutable).

Record and events

— (draft edits are not consequential; publishing is recorded).

POST/templates/:id/validate

Credential
Member session
Permission
templates.read
Mode
tenant-wide
Idempotency
not stored (read-only)

Request

amount integer required (sample mandate amount in minor units, ≥ 100); currency optional (default settings.program.currency).

Response

200 MandateValidation computed for the sample amount (terms_preview_hash: null), including the warning with its concrete stranded amounts, terms_preview and compliance results.

POST/templates/:id/publish

Credential
Member session
Permission
templates.manage
Mode
tenant-wide
Idempotency
honoured

Request

reason string (10–1000; required when the new version weakens the current published version of the key).

Response

200 {"object": "template_publish_result", "published": true, "template": Template, "change_request": null}, or 202 with "published": false, "template": null, "change_request": ChangeRequest (weakening vs the current published version on a live-enabled tenant).

Errors

422 template_invalid (errors, warnings); 409 invalid_state_transition (not draft), change_request_pending; 400 reason_required.

Record and events

template.version_published (or settings.change_requested + change_request.opened with kind: template_publish).

Notes

the previous published version stays valid for mandates already created from it; is_current moves to the new version.

POST/templates/:id/versions

Credential
Member session
Permission
templates.manage
Mode
tenant-wide
Idempotency
honoured, recommended

Request

none.

Response

201 Template (a new draft version N+1 copied from :id).

Errors

409 invalid_state_transition (current_state: "draft_exists" — one draft per key at a time).

Record and events

template.created.

POST/templates/validate

Credential
Member session or API key
Permission
templates.read
API key scope
templates:read
Mode
tenant-wide
Idempotency
not stored (read-only)

Request

body TemplateBody required (an unsaved draft from the builder); amount integer required (sample, ≥ 100); currency optional.

Response

200 MandateValidation (as POST /templates/:id/validate, without saving anything).

POST/templates/:id/duplicate

Credential
Member session
Permission
templates.manage
Mode
tenant-wide
Idempotency
honoured, recommended

Request

key string required (new key, ^[a-z0-9_]{2,40}$); name string required (1–120).

Response

201 Template (version 1 draft of the new key with the body of :id; preset provenance is not copied).

Errors

409 template_key_exists.

Record and events

template.created (data.duplicatedFrom).

POST/templates/:id/archive

Credential
Member session
Permission
templates.manage
Mode
tenant-wide
Idempotency
honoured

Request

reason string optional (≤ 1000).

Response

200 Template (every version of the key becomes archived; mandates already created are unaffected; new mandates from it answer 409 template_not_published).

Record and events

template.archived.

Templates and presets · Holdyn Business docs