---
title: "Preview Framework Code"
method: POST
path: "/v2/framework/code/preview"
tags: ["Framework"]
---

# Preview Framework Code

`POST /v2/framework/code/preview`

Preview the API code for a framework configuration before purchase.

## Request body

- BodyPreviewFrameworkCodeV2FrameworkCodePreviewPost
  - `framework` FrameworkRequest, required
    - `entities` union, required
      - FrameworkEntityRequest[]
        - `carc_id` integer, required
        - `representation` string, required
        - `entity_name` string, nullable
      - WildCardEntityRequest
        - `carc_name` string
        - `representation` string, required
    - `insight` FrameworkInsightRequest, required
      - `insight_id` integer, required
      - `insight_name` string, nullable
    - `filters` object, required
    - `aggregate` 'sum' | 'mean' | 'count_distinct', nullable
    - `events` FrameworkEventRequest[], nullable
      - `event_id` string, nullable
      - `representation` string, required
      - `event_name` string, nullable
      - `event_category_id` union
        - integer
        - string
  - `config` object, nullable

## Response `200`

Successful Response

- CodeResponse
  - `code` string, required

## Other responses

- `404` — Not Found
- `422` — Validation Error

---

[API](https://skmtc.net/carbonarc/apis/carbon-arc-api-documentation.md) · [All operations](https://skmtc.net/carbonarc/apis/carbon-arc-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/carbonarc/carbon-arc-api-documentation/versions/bd33ea42994c/schema)
