> ## Documentation Index
> Fetch the complete documentation index at: https://docs.capcells.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Read the archetypes

> Every Archetype's frame — which fields it carries, which it requires, which it locks, and the bounds — plus the closed sets a value is drawn from. What a form is built from.

What a configuration may say, as the Platform's own validator reads it. For each Archetype: every field its frame declares, with the kind of value it takes, the unit, whether it is required, and the bounds; and every field the Archetype locks, with the reason. Beside the frames: the day-count bases, the schedule kinds with what each takes, the treatments of early money, and the shape the Platform composes a configuration's identifier to.

The answer is the same under every Tenancy and reads nothing yours. It is addressed under a Tenancy so that the console and the API serve it alike. A build fails when this answer and the frame in code disagree, so a form generated from it cannot drift from what [creation](/api-reference/product-configurations/create) will refuse.

<Info>
  Bounds are stated in the unit the wire takes the value in, so a form compares without converting. An amount's bound is in minor units with no currency. A rate's bound is the percentage string a body quotes: `"2000"` is 2,000% per year. A menu of terms carries both the largest term and the longest menu.
</Info>

## Path parameters

<ParamField path="tenant_id" type="string" required>
  The Tenancy asking. The answer does not depend on it.
</ParamField>

## Response

<ResponseField name="archetypes" type="object[]" required>
  One frame per Archetype, in the Platform's order: `instalment`, `bnpl`, `payday`.

  <Expandable title="a frame">
    <ResponseField name="archetype" type="string" required>
      One of `instalment`, `bnpl`, `payday`.
    </ResponseField>

    <ResponseField name="fields" type="object[]" required>
      Every field a configuration of this Archetype may state, ordered by name. A field absent here cannot be stated at all: sending it is `422` `field_not_in_frame`.

      | Key | What it says |
      | - | - |
      | `name` | The key in `values` |
      | `kind` | `amount`, `rate`, `basis_points`, `count`, `terms`, `basis`, `schedule`, `flag`, `treatment` |
      | `unit` | `minor_units`, `percent_per_year`, `basis_points`, `days`, `periods`, `rollovers`. Absent on a kind with no numeric range |
      | `required` | The frame refuses a configuration without it |
      | `min`, `max` | The bounds, in the wire's unit. An integer for every ranged kind but `rate`; for `rate`, the percentage string. Absent on a kind with no range |
      | `max_entries` | The longest menu, on `terms` alone |
    </ResponseField>

    <ResponseField name="locked" type="object[]" required>
      The fields the Archetype fixes itself, each with `name` and `reason`. Stating one is `422` `field_locked` with that reason.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="day_count_bases" type="string[]" required>
  The conventions `day_count_basis` may name.
</ResponseField>

<ResponseField name="schedule_kinds" type="object[]" required>
  The kinds a schedule may be, each with what it takes: `interval_days` as `{min, max}` on the interval kind, `grid_days` as `{min_entries, min, max, last_day}` on the grid kind, and `takes_day` — `true` on the one kind under which the Loan, never the product, names the day of the month.
</ResponseField>

<ResponseField name="early_money_treatments" type="string[]" required>
  The treatments `early_money_treatment` may name.
</ResponseField>

<ResponseField name="identifier" type="object" required>
  The shape a configuration's `id` is composed to: `pattern`, as a regular expression, and `digits`, the digits the number carries. Every identifier is eleven characters — a four-character Archetype code, a hyphen, six digits — so a catalogue reads down one column. It describes what the Platform will answer, not a rule you must meet: you state no identifier. Each Archetype's frame carries its own `identifier_prefix` beside it.
</ResponseField>

Any query parameter on this route answers `400`: the route reads none.

<RequestExample>
  ```bash Read theme={null}
  curl "https://api.capcells.com/v1/tenants/$TENANT_ID/product-archetypes" \
    -H "Authorization: $(capcells_sign "$CAPCELLS_API_KEY" GET "/v1/tenants/$TENANT_ID/product-archetypes")"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 (abridged) theme={null}
  {
    "archetypes": [
      {
        "archetype": "instalment",
        "fields": [
          { "name": "day_count_basis", "kind": "basis", "required": true },
          { "name": "early_money_treatment", "kind": "treatment", "required": false },
          { "name": "first_period_gap_days", "kind": "count", "unit": "days", "required": false, "min": 0, "max": 365 },
          { "name": "late_fee", "kind": "amount", "unit": "minor_units", "required": false, "min": 0, "max": 1000000000000000 },
          { "name": "penalty_ceiling_bps", "kind": "basis_points", "unit": "basis_points", "required": false, "min": 1, "max": 50000 },
          { "name": "principal_min", "kind": "amount", "unit": "minor_units", "required": true, "min": 1, "max": 1000000000000000 },
          { "name": "rate_max", "kind": "rate", "unit": "percent_per_year", "required": true, "min": "0", "max": "2000" },
          { "name": "schedule", "kind": "schedule", "required": true },
          { "name": "terms", "kind": "terms", "unit": "periods", "required": true, "min": 1, "max": 480, "max_entries": 24 }
        ],
        "locked": []
      },
      {
        "archetype": "bnpl",
        "fields": [ "…the instalment fields, and merchant_commission_bps…" ],
        "locked": [
          { "name": "payment_at_purchase", "reason": "a BNPL product always collects a payment at the purchase itself" }
        ]
      },
      {
        "archetype": "payday",
        "fields": [ "…no terms; rollover_fee and rollover_limit…" ],
        "locked": [
          { "name": "terms", "reason": "a payday product is a single period and carries no instalment menu" }
        ]
      }
    ],
    "day_count_bases": ["actual_360", "actual_365_fixed", "30e_360"],
    "schedule_kinds": [
      { "kind": "anchored_monthly", "takes_day": false },
      { "kind": "anchored_every_n_days", "interval_days": { "min": 1, "max": 365 }, "takes_day": false },
      { "kind": "semi_monthly_grid", "grid_days": { "min_entries": 2, "min": 1, "max": 31, "last_day": -1 }, "takes_day": false },
      { "kind": "monthly_on_day", "takes_day": true }
    ],
    "early_money_treatments": ["reduces_principal", "advances_instalments"],
    "identifier": {
      "pattern": "^[a-z]{4}-[0-9]{6,}$",
      "digits": 6
    }
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.