---
title: "Download Assembly Excel"
method: POST
path: "/api/assemblies/{slug}/excel"
tags: ["assemblies"]
---

# Download Assembly Excel

`POST /api/assemblies/{slug}/excel`

## Request

- Base URL: `https://api.civilquants.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.civilquants.com/api/assemblies/{slug}/excel`
- Auth: none declared

Stream the customer-facing 2-tab .xlsx for an assembly's current
parameter set.

Tier-aware entitlement per `entitlement_for_assembly`: free-tier
slugs (six per launch spec § 1.1) grant for any caller — the
workbook just renders with the free-tier watermark + sheet
protection so the marketing-attribution moat (pin 13) stays
intact. Paid-tier slugs require an active Subscription / 7-day
pass / dev-unlock; otherwise 402 with the canonical hint envelope.

The render-tier (controls watermark + protection) is derived from
the caller's auth context independently of the slug tier:
authenticated callers on free slugs get unlocked workbooks; the
free-tier watermark + lock only fires when the caller is anonymous
(or unauthenticated in dev without dev-unlock).

## Path parameters

- `slug` string, required

## Query parameters

- `include_workings` boolean
- `include_procurement_summary` boolean

## Headers

- `authorization` string, nullable

## Request body

- CivilquantsApiRoutesAssembliesComputeRequest
  - `parameters` object
  - `standard` 'CESMM4' | 'NRM2' | 'SMM7' | 'MMHW', required
  - `project` ProjectMeta: Option C free-text Project entity per 25th-fire (filed 2026-05-19, in-scope for the architectural rewrite per INBOX 26th-fire Amendment C). Thin-slice precursor to a full Project entity in v1.1: just two optional free-text fields that the workspace surfaces at the top of every assembly form and that propagate to the BoQ header, the PDF cover sheet, and the DXF title block. No DB persistence, no cross-assembly rollup — those land in v1.1.
    - `name` string, nullable: Free-text project name, e.g. "Phase 2 Drainage Works".
    - `reference` string, nullable: Free-text project reference, e.g. "PRJ-2026-042".
  - `render_artefacts` boolean, nullable: Opt-in to eagerly render + persist the Excel/DXF/PDF export bundle (signed-URL artefacts) inline on this compute. Omitted / null / false means OFF, so the interactive workspace recompute path — debounced POST /compute on every parameter change — stays pure-engine fast and never launches the Puppeteer/Chromium PDF sidecar. Exports are fetched on demand via the dedicated /excel /pdf /dxf endpoints; only callers that genuinely want inline download URLs in one round-trip (e.g. an agent batch) set this True. Nullable default (mirroring `project`) keeps it an optional request field in the generated client. Still subject to the same server-side entitlement + export-gate checks.

## Response `200`

Streamed .xlsx workbook — Bill of Quantities + Quantities by assembly per CLAUDE.md pin 2. Free-tier callers receive a watermarked + sheet-protected workbook; entitled callers (active subscription / 7-day pass / dev-unlock) receive an unlocked workbook with no watermark.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/civilquants/apis/civilquants-api.md) · [All operations](https://skmtc.dev/civilquants/apis/civilquants-api/llms.txt) · [OpenAPI document](https://skmtc.dev/civilquants/apis/civilquants-api/revisions/84569a3761e1?raw)
