---
title: "Put a clean behind every departure"
method: POST
path: "/api/v1/short-stay/turnovers/reconcile"
tags: ["Short stay"]
---

# Put a clean behind every departure

`POST /api/v1/short-stay/turnovers/reconcile`

## Request

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

Works the turnovers out of the bookings on the calendar and reconciles the cleaning schedule against them. Ranges are half-open, so a checkout and a check-in on the same date is a same-day turnover and not a clash, and it is the tightest window in the operation. Nothing before today is created or moved, and no clean already under way is rewritten.

## Request body

- object
  - `unitId` string: Restricts the pass to one unit. Omitted, every short-stay unit is reconciled.

## Response `200`

What the schedule now says, and what could not be moved.

- object
  - `ok` unknown, required
  - `data` object, required
    - `created` number, required: Departures that had no clean. Assigned to whoever last cleaned the unit, where anybody has.
    - `moved` object[], required: Cleans whose date, window or next guest changed.
      - `id` string, required: Stable record id, e.g. `lse_012`.
      - `because` string, required: What moved, in the words the owner reads on the activity line.
    - `stoodDown` object[], required: Cleans for a departure that is no longer happening. Stood down, never deleted: the record is what says a cleaner was told.
      - `id` string, required: Stable record id, e.g. `lse_012`.
      - `because` string, required: What moved, in the words the owner reads on the activity line.
    - `locked` object[], required: Cleans that need moving but are already under way, finished or missed. Reported rather than rewritten, because a person is already committed to them.
      - `id` string, required: Stable record id, e.g. `lse_012`.
      - `because` string, required: What moved, in the words the owner reads on the activity line.
    - `unchanged` number, required
  - `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)
