Skip to main content

Templates guide

Templates define the structure of financial acts. Each template contains tabs, sections, and fields that describe what data must be captured for an evaluation. Fetch templates to render data-entry forms, validate inputs, or map act data points into your internal schema.

What a template includes​

A template is a hierarchical structure:

  • Template metadata - id, name, country, language, and timestamps for auditing.
  • Tabs - Ordered groupings of sections that match the UI layout used by Krebit Finance.
  • Sections - Ordered clusters of fields inside each tab.
  • Fields - Individual data points with id, name, type, required, options, and order.

Use field metadata to enforce validation rules and guide operators through the expected data entry flow.

Country coverage​

country is either a country code such as SE or * for all countries enabled for the organization. Forms for all countries contain only basic fields. Treat * as a coverage marker rather than an ISO country code.

Template workflows​

Use list workflows to discover templates by name or country, then fetch a specific template when you need field-level metadata such as tabs, sections, and fields. The Templates section of the generated API reference includes the authoritative request parameters and response shapes.

Mapping templates to act data​

Act data points return template_field_id, name, type, required, section_id, and tab_id. Use these relationships to:

  • Match act values back to template fields.
  • Render forms that mirror the same tab and section order.
  • Validate or transform values based on each field's type and options.

Template edits affect future acts. Existing acts keep their copied field definitions, so use the act's own fields and effective options when updating its data. Store the template ID for provenance; a current template may differ from an older act.

Best practices​

  • Cache templates - Templates do not change frequently. Cache responses and refresh on a schedule to minimize API calls.
  • Validate before update - Use the act field definitions and effective options for existing acts, and template metadata when preparing new ones.
  • Support localization - Templates include language and country. Respect these when rendering forms or labels.

Working with the API reference​

The generated API reference in the sidebar documents every request and response schema for templates. Combine the conceptual guidance here with the reference details for exact field definitions.