---
title: "Update a checkin"
method: PATCH
path: "/v1/checkins/{id}"
tags: ["Checkins"]
---

# Update a checkin

`PATCH /v1/checkins/{id}`

## Request

- Base URL: `https://api.officina.it`
- URL: `https://api.officina.it/v1/checkins/{id}`
- Auth: HTTP bearer

Three-state PATCH semantics (omitted = unchanged, `null` =
clear, value = set).

Fields NOT patchable here: `status` (use the transitions
endpoint), `customer_id`, `vehicle_id` (immutable),
`seq_number`, `created_by`, timestamps, `line_items`.

Returns the fully materialized post-update checkin.

Foreign-key references in the body (`work_category_id`,
`worksheet_id`, `quote_id`) must resolve to resources owned by
the authenticated user's company. Unreachable refs return 422
`parameter_invalid` pointing at the offending field.

## Request body

- CheckinPatchRequest: Body of `PATCH /v1/checkins/{id}`. Three-state per field: - Field omitted → leave the entity field untouched. - Field present with value `null` → clear the entity field. - Field present with a value → set the entity field. Fields not listed here are intentionally NOT patchable: `id`, `company_id`, `created_by`, `seq_number`, system timestamps, `status` (use the transitions endpoint), `customer_id`, `vehicle_id` (immutable), and `line_items` (separate sub-resource).
  - `title` string, nullable
  - `comments` string, nullable
  - `internal_comments` string, nullable
  - `fuel_level` integer, nullable
  - `section1` string, nullable
  - `section2` string, nullable
  - `section3` string, nullable
  - `section4` string, nullable
  - `section5` string, nullable
  - `section6` string, nullable
  - `section7` string, nullable
  - `section8` string, nullable
  - `km` number, nullable
  - `work_category_id` string, nullable: Single-category form for clients that handle one category, accepted in every revision with the same meaning: a value replaces the first category of the list and keeps the others; `null` removes the first one. To set or clear the full list, send `work_category_ids` instead (not both).
  - `work_category_ids` string[], nullable: Replaces the document's whole category list, in the order given. Omitted → untouched; `[]` or `null` → removes every category; a list → becomes the new list. Same validation as on create (max 10, de-duplicated, company's categories only). Do not send together with `work_category_id`: both → `422 parameter_invalid`. Available since revision 2026-10-03.
  - `worksheet_id` string, nullable
  - `quote_id` string, nullable

## Response `200`

Checkin updated.

- Checkin: A vehicle intake / inspection snapshot. Belongs to one company, one customer, and one vehicle. List responses omit `line_items` to keep payloads small; detail responses populate it.
  - `object` 'checkin', required
  - `id` string, required
  - `seq_number` integer, required: Per-company human-readable sequence (e.g. "Checkin #142"). Assigned at create time and stable afterwards.
  - `status` 'active' | 'completed', required: Lifecycle state. Mutated only through `POST /v1/checkins/{id}/transitions`, never via PATCH.
  - `title` string, nullable
  - `comments` string, nullable
  - `internal_comments` string, nullable: Notes visible only to workshop staff.
  - `customer_id` string, required
  - `vehicle_id` string, required
  - `work_category_id` string, nullable
  - `worksheet_id` string, nullable: Set when the checkin has been converted into a worksheet.
  - `quote_id` string, nullable: Set when the checkin has been converted into a quote.
  - `fuel_level` integer, nullable: Free-form integer captured at intake. Convention is 0–100 (percentage) but the API enforces no bounds today.
  - `section1` string, nullable
  - `section2` string, nullable
  - `section3` string, nullable
  - `section4` string, nullable
  - `section5` string, nullable
  - `section6` string, nullable
  - `section7` string, nullable
  - `section8` string, nullable
  - `km` number, nullable: Odometer reading at intake.
  - `created_by` string, required: User id of the staff member who created the checkin.
  - `customer_name` string, required: Denormalized display string of the linked customer. Pre-computed on the entity for list-row rendering without a second request.
  - `vehicle_name` string, required: Denormalized display string of the linked vehicle.
  - `vehicle_license` string, nullable
  - `work_category_name` string, nullable
  - `work_category_ids` string[], required: Every work category ("categoria") of the document, in the order chosen. `work_category_id` (kept for clients that handle a single category) always equals the first. `[]` when the document has none, never null. Available since revision 2026-10-03.
  - `work_categories` WorkCategory[], required: The same list as `work_category_ids` with each category's name, same order. `work_category_name` is the first one's name. Available since revision 2026-10-03.
    - `object` 'work_category', required
    - `id` string, uuid, required
    - `name` string, required
  - `delivered_at` string, date-time, nullable
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `deleted_at` string, date-time, nullable: Soft-deletion timestamp. Populated on the response from DELETE /v1/checkins/{id}. Checkins with a non-null deleted_at are not returned by list/detail endpoints — this field appears for the delete response only.
  - `line_items` CheckinLineItem[], nullable: Embedded line items (description-only notes). Populated on detail / batch responses; list GET emits `null` to keep payloads small. Mutate via POST /v1/checkins/{id}/line-items/batch.
    - `object` 'checkin_line_item', required
    - `id` string, required
    - `description` string, required
    - `created_at` string, date-time, required

## Other responses

- `400`: Request body is unparseable or X-API-Version is missing.
- `401`: Missing, malformed, expired, or wrong-audience bearer token.
- `402`: The company has no active subscription, or its plan does not include API access. API access is included in the Business and Illimitato plans.
- `403`: The authenticated user lacks the required permission.
- `404`: Resource does not exist OR belongs to a different company. The two cases are intentionally indistinguishable.
- `415`: Content-Type is not `application/json`, or Accept rejects JSON.
- `422`: A request field is missing or invalid (fast-fail).
- `500`: Unhandled server error. Detail is logged, not exposed.

---

[API](https://skmtc.dev/officina/apis/officina-it-api.md) · [All operations](https://skmtc.dev/officina/apis/officina-it-api/llms.txt) · [OpenAPI document](https://skmtc.dev/officina/apis/officina-it-api/revisions/7da3fccfe551?raw)
