---
title: "Plan a room or another space"
method: POST
path: "/plan"
tags: ["Planner"]
---

# Plan a room or another space

`POST /plan`

## Request

- Base URL: `https://api.craftquantities.com/v1`
- URL: `https://api.craftquantities.com/v1/plan`
- Auth: none declared

## Query parameters

- `detail` 'full' | 'summary': full (the default): the whole answer. summary: the result lines, the citation line and the page only — fewer tokens to read.
- `format` 'json' | 'md'

## Request body

- object
  - `kind` 'room' | 'bathroom' | 'slab' | 'deck' | 'driveway' | 'fence' | 'loft' | 'retaining-wall' | 'exterior-wall' | 'stair', required: The kind of space: a room or a bathroom (from its size, doors and windows), or a slab, deck, driveway, fence, loft, retaining wall, exterior wall or stair.
  - `figures` object, required: The space's figures, by the planner's ids, each a length with its unit (a room: length, width, height, wallThickness; a fence: length, height; a stair: totalRise, width …).
  - `doors` object
    - `count` integer
    - `width` union
      - number
      - string
      - object
        - `value` number, required
        - `unit` string
    - `height` union
      - number
      - string
      - object
        - `value` number, required
        - `unit` string
  - `windows` object
    - `count` integer
    - `width` union
      - number
      - string
      - object
        - `value` number, required
        - `unit` string
    - `height` union
      - number
      - string
      - object
        - `value` number, required
        - `unit` string
  - `finishes` object: Surface role → finish id, by the planner's ids.
  - `scope` object: Scope question name → answer value, by the planner's ids.
  - `intent` string: A trade, or everything.
  - `leaveOut` string[]: Branch ids to leave out.
  - `inputs` object: Branch id → { calculator input id: value in its base unit }.
  - `name` string
  - `system` 'metric' | 'imperial': The unit system inputs left out open in, and the one the page link opens in. The answer comes in both.
  - `inputUnits` 'base': Send "base" to pass bare numbers on dimensioned inputs in base units (m, m², L, kg …), as the published test vectors are written. Without it a length, area or volume must carry its unit.

## Response `200`

Every row the planner works, and the plan.

- union
  - object
    - `engine` object, required
    - `space` object, required
    - `system` 'metric' | 'imperial', required
    - `outcomes` object[], required
      - `branch` string, required
      - `label` string, required
      - `trade` string, required
      - `status` 'ready' | 'needs' | 'loading' | 'did-not-load' | 'no-answer' | 'gap' | 'left-out' | 'not-applicable', required
      - `comparison` boolean, required
    - `lines` object[], required
    - `labour` object, required
    - `assumptions` object[], required
    - `model` object, required
    - `sources` unknown[], required
      - unknown
    - `citation` object, required
      - `author` string, required
      - `title` string, required
      - `version` string, nullable
      - `sourcesChecked` string, nullable
      - `url` string, required
      - `accessDate` string, nullable, required
      - `formats` object, required
        - `plain` string, required
        - `apa` string, required
        - `harvard` string, required
        - `bibtex` string, required
    - `licence` object, required
      - `name` string, required
      - `url` string, required
      - `attribution` string, required
    - `notice` string, required
  - object
    - `detail` 'summary', required
    - `tool` string, required
    - `title` string, required
    - `lines` object[], required: The result lines, as the report's table gives them.
    - `notes` string[], required: What a professional must decide, when to call one, a false-friend warning, that adoption is local: kept in every summary.
    - `citation` string, required: The one citation line, built from the answer's own data.
    - `url` string, nullable, required
    - `open` string, nullable, required
    - `more` string, nullable, required

## Other responses

- `400`: The request was refused; every problem is listed.

---

[API](https://skmtc.dev/craftquantities/apis/craft-quantities-engine-api.md) · [All operations](https://skmtc.dev/craftquantities/apis/craft-quantities-engine-api/llms.txt) · [OpenAPI document](https://skmtc.dev/craftquantities/apis/craft-quantities-engine-api/revisions/a69883abc23b?raw)
