> ## Documentation Index
> Fetch the complete documentation index at: https://docs.a7manager.se/llms.txt
> Use this file to discover all available pages before exploring further.

# cleaning_records

> Cleaning and toilet emptying events.

Cleaning and toilet emptying events. Delivered daily. The simplest file in the set.

**Update key:** `external_system_id`

## Columns

| Column               | Type        | Required | Notes                                                 |
| -------------------- | ----------- | :------: | ----------------------------------------------------- |
| `external_system_id` | text(100)   |     ●    | Update key                                            |
| `vehicle_number`     | text(100)   |     ●    | Must exist in project                                 |
| `cleaning_type`      | enum        |     ●    | See values below                                      |
| `status`             | enum        |     ○    | `PERFORMED` (the default when omitted) or `CANCELLED` |
| `completed_at`       | timestamptz |     ●    | Time of the event — required for cancelled events too |
| `depot`              | text(100)   |     ○    |                                                       |
| `notes`              | text        |     ○    |                                                       |
| `last_updated`       | timestamptz |     ●    | Staleness key                                         |

### `cleaning_type` values

`INTERIOR_CLEAN` · `EXTERIOR_WASH` · `TOILET_EMPTY` · `DEEP_CLEAN` · `OTHER`

## Rules

* `completed_at` is required **even when `status` is `CANCELLED`**. Nothing exempts a
  cancelled event from carrying a time, and there is no cross-check between `status` and any
  other field.
* `status` defaults to `PERFORMED` when the field is **omitted**. Send it empty rather than
  attempting any other placeholder.

## Example

The second row is the cancelled case, still carrying `completed_at`:

```csv theme={null}
external_system_id,vehicle_number,cleaning_type,status,completed_at,depot,notes,last_updated
CLN-001,X61001,INTERIOR_CLEAN,PERFORMED,2026-02-15T06:00:00Z,Raus,Morning interior clean,2026-03-14T09:00:00Z
CLN-004,X61002,INTERIOR_CLEAN,CANCELLED,2026-03-05T06:00:00Z,Hässleholm,Cancelled due to vehicle out of service,2026-03-14T09:00:00Z
```

## Why a file gets rejected

Required fields and the two enums together:

```
Row 3: missing or empty external_system_id
Row 4: missing or empty vehicle_number
Row 5: missing or empty cleaning_type
Row 6: missing or empty completed_at
Row 8: invalid cleaning_type 'INTERIOR' (must be one of: INTERIOR_CLEAN, EXTERIOR_WASH, TOILET_EMPTY, DEEP_CLEAN, OTHER)
Row 9: invalid status 'DONE' (must be one of: PERFORMED, CANCELLED)
```

Vehicle resolution is checked afterwards:

```
Row 11: vehicle_number 'X61099' not found in project
```
