> ## 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.

# Try a configuration

> Exactly the body creation takes, run through exactly its checks, and nothing written. See the refusal — or the values as they will read back — before a configuration that can never be removed exists.

A configuration is immutable and cannot be removed, so a mistaken one stands in your catalogue forever. This route takes [the creation body](/api-reference/product-configurations/create) byte for byte, runs every check creation runs in the same order, and stores nothing. A body creation would store answers `200` with the Archetype, the values as creation would read them back, and `id` — the identifier creation would compose. Asking does not reserve it: two previews answer the same identifier and the create that follows takes it. A body creation would refuse meets creation's own refusal: the same status, the same `code`, the same field named.

No idempotency key is read: there is nothing to replay. A form that previews under the key it will submit under loses nothing by it.

## Path parameters

<ParamField path="tenant_id" type="string" required>
  The Tenancy that would hold the configuration.
</ParamField>

## Body

[The creation body](/api-reference/product-configurations/create#body): `archetype` and `values`. Stating `id` is refused here exactly as it is there.

## Response

<ResponseField name="id" type="string" required>
  The identifier the create would compose, so you can show it before the Product exists. Not reserved by asking.
</ResponseField>

<ResponseField name="archetype" type="string" required>
  As sent.
</ResponseField>

<ResponseField name="values" type="object" required>
  The terms as creation would read them back — a rate in its exact form, one schedule under `schedule` and a menu under `schedules`.
</ResponseField>

<ResponseField name="effective" type="object" required>
  The value every field the frame declares would take, stated or by default — [as creation answers it](/api-reference/product-configurations/create#response).
</ResponseField>

<ResponseField name="advisories" type="object[]" required>
  What creation would advise for the same body — [the same codes](/api-reference/product-configurations/create#response), empty where there is nothing. Nothing is refused for them.
</ResponseField>

No `id`, no `version`, no `created_at`: a preview knows none of them.

## Refusals

Exactly [creation's](/api-reference/product-configurations/create#refusals), with the same codes. A refused preview is a refused creation on the same body.

<RequestExample>
  ```bash Preview theme={null}
  BODY='{
    "archetype": "payday",
    "id": "adelanto-nomina",
    "values": {
      "principal_min": { "minor_units": 50000, "currency": "MXN" },
      "principal_max": { "minor_units": 500000, "currency": "MXN" },
      "rate_min": "45",
      "rate_max": "300",
      "penalty_rate_min": "60",
      "penalty_rate_max": "90",
      "day_count_basis": "actual_360",
      "schedule": { "kind": "anchored_every_n_days", "interval_days": 14 },
      "terms": [1]
    }
  }'

  curl -X POST "https://api.capcells.com/v1/tenants/$TENANT_ID/product-configurations/preview" \
    -H "Authorization: $(capcells_sign "$CAPCELLS_API_KEY" POST "/v1/tenants/$TENANT_ID/product-configurations/preview" "$BODY")" \
    -H "Content-Type: application/json" \
    -d "$BODY"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "archetype": "payday",
    "values": {
      "principal_min": { "minor_units": 50000, "currency": "MXN" },
      "principal_max": { "minor_units": 500000, "currency": "MXN" },
      "rate_min": "45",
      "rate_max": "300",
      "penalty_rate_min": "60",
      "penalty_rate_max": "90",
      "day_count_basis": "actual_360",
      "schedule": { "kind": "anchored_every_n_days", "interval_days": 14 }
    }
  }
  ```

  ```json 422 theme={null}
  {
    "error": "product: field is fixed by the archetype: terms on a payday product: a payday product is a single period and carries no instalment menu",
    "code": "field_locked"
  }
  ```
</ResponseExample>


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