---
title: "The trade book and the work orders still running"
method: GET
path: "/api/v1/contractors"
tags: ["People"]
---

# The trade book and the work orders still running

`GET /api/v1/contractors`

## Request

- Base URL: `http://localhost:5180`
- URL: `http://localhost:5180/api/v1/contractors`
- Auth: API key in cookie `better-auth.session_token`

Every contractor with the name of the contact behind them, their rates, their cover and the figures earned rather than entered by hand: rating, jobs completed, on-time rate. Beside them, the work orders nobody has closed yet, each with the unit it is in and the trade it went to.

## Response `200`

Contractors and open work orders.

- object
  - `ok` unknown, required
  - `data` object, required
    - `contractors` object[], required: Every trade on the book, preferred or not.
      - `id` string, required: Stable record id, e.g. `lse_012`.
      - `contactId` string, required: Stable record id, e.g. `lse_012`.
      - `businessName` string, required
      - `trades` string[], required: What they do: `plumbing`, `electrical`, `heating`, `roofing` and the rest.
      - `calloutFee` integer: Call-out charge, for estimating before a quote exists.
      - `hourlyRate` integer: Money, always in integer cents. €1,250.00 is 125000.
      - `vatNumber` string
      - `vatRate` number, required: A decimal ratio. 0.21 is 21%.
      - `rating` number: 0 to 5, computed from completed work orders rather than entered by hand.
      - `jobsCompleted` number, required
      - `avgResponseHours` number
      - `onTimeRate` number: A decimal ratio. 0.21 is 21%.
      - `isPreferred` boolean, required
      - `availableOutOfHours` boolean, required
      - `serviceAreas` string[], required: Where they will travel. Empty means no stated limit, which is a real answer and not a missing one.
      - `unitIds` string[]: Present when they are engaged for named lots only. Absent means anywhere in the stated areas.
      - `insurance` object
        - `policyNumber` string, required
        - `validUntil` string, required: A calendar date, `YYYY-MM-DD`.
        - `insurer` string, required
      - `certifications` object[], required
        - `name` string, required
        - `validUntil` string: A calendar date, `YYYY-MM-DD`.
        - `reference` string
      - `notes` string
      - `name` string, required: The name on the contact behind the trade: a company where there is one, otherwise the person.
    - `openWorkOrders` object[], required: Work still running: drafted, awaiting approval, dispatched, accepted, scheduled or in progress.
      - `id` string, required: Stable record id, e.g. `lse_012`.
      - `reference` string, required
      - `issueId` string: Stable record id, e.g. `lse_012`.
      - `unitId` string, required: Stable record id, e.g. `lse_012`.
      - `buildingId` string, required: Stable record id, e.g. `lse_012`.
      - `contractorId` string: Stable record id, e.g. `lse_012`.
      - `trade` string, required
      - `title` string, required
      - `scope` string, required: What the contractor was actually asked to do.
      - `status` 'draft' | 'awaiting_approval' | 'dispatched' | 'accepted' | 'scheduled' | 'in_progress' | 'completed' | 'invoiced' | 'paid' | 'cancelled', required
      - `priority` 'emergency' | 'urgent' | 'routine' | 'cosmetic', required
      - `spendLimit` integer: The cap communicated to the contractor. Above it they have to come back and re-quote.
      - `quoteIds` string[], required
      - `acceptedQuoteId` string: Stable record id, e.g. `lse_012`.
      - `scheduledFor` string: ISO 8601 timestamp.
      - `accessArrangement` object: How the contractor gets in. An unconfirmed arrangement is the usual reason a visit is wasted.
        - `method` 'tenant_present' | 'key_collection' | 'smart_lock' | 'concierge' | 'owner_present', required
        - `windowStart` string: ISO 8601 timestamp.
        - `windowEnd` string: ISO 8601 timestamp.
        - `tenantConfirmed` boolean, required
        - `notes` string
      - `startedAt` string: ISO 8601 timestamp.
      - `completedAt` string: ISO 8601 timestamp.
      - `completionNotes` string
      - `completionPhotoRefs` string[], required
      - `invoiceExpected` integer: Money, always in integer cents. €1,250.00 is 125000.
      - `supplierInvoiceId` string: Stable record id, e.g. `lse_012`.
      - `actualCost` integer: Money, always in integer cents. €1,250.00 is 125000.
      - `warrantyUntil` string: A calendar date, `YYYY-MM-DD`.
      - `tenantSatisfaction` number
      - `provenance` object, required
        - `actor` object, required
          - `kind` 'owner' | 'ai' | 'tenant' | 'contractor' | 'system' | 'channel', required: `ai` is Dardaris acting on the owner’s behalf. Everything it touches is marked.
          - `id` string: Stable record id, e.g. `lse_012`.
          - `name` string, required
        - `at` string, required: ISO 8601 timestamp.
        - `workflowRunId` string: Set when an automated run produced this, linking the record back to the run.
        - `reasoning` string: The rationale the AI recorded at the moment it acted.
      - `unitLabel` string, required: Resolved through buildingLabel(), so an owner alias is honoured.
      - `contractorName` string, required: Who it went to. `None` when nobody has been appointed yet.
  - `meta` object, required
    - `requestId` string, required: Echoed in the x-request-id header. Quote it in a bug report.

---

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