---
title: "Group lines, calculators or a project by MasterFormat 2018 division (a suggestion)"
method: POST
path: "/classify"
tags: ["Agent tools"]
---

# Group lines, calculators or a project by MasterFormat 2018 division (a suggestion)

`POST /classify`

## Request

- Base URL: `https://api.craftquantities.com/v1`
- URL: `https://api.craftquantities.com/v1/classify`
- 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
  - `token` string: A project state token: its lines are grouped.
  - `lines` object[]: Lines of a takeoff, plan, house, drawing or bill: each a label, and the calculator slug where known.
    - `label` string
    - `description` string
    - `quantity` number
    - `unit` string
    - `slug` string: The calculator that made the line, where known.
    - `calculator` string
    - `from` string: Where the line came from, as a project file names it (calculator:…, takeoff:…).
  - `calculators` string[]: Calculator slugs or permanent ids.

## Response `200`

The lines by division, in MasterFormat order.

- union
  - object
    - `scheme` object, required
      - `name` string, required
      - `edition` string, required
      - `level` string, required
    - `divisions` object[], required
      - `code` string, required
      - `name` string, required
      - `lines` object[], required
        - `label` string, required
        - `quantity` number
        - `unit` string
        - `slug` string
        - `basis` 'calculator' | 'words' | 'none', required
    - `counts` object, required
      - `lines` integer, required
      - `divisions` integer, required
      - `unassigned` integer, required
    - `note` string, required
    - `otherSchemes` string
    - `licence` object, required
      - `name` string, required
      - `url` string, required
      - `attribution` 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.
- `422`: 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)
