Sync units (bulk)
POST/pms/units/sync
Bulk upsert unit facts. State-oriented — partners send the full current state of each unit, KISS reconciles.
Units are matched by crm_unit_id within the authenticated company's scope. If no match is found, the unit is created automatically (stamped source_type='push').
Move-in is handled by sending occupied: true with tenant info. Move-out is handled by sending occupied: false — KISS automatically resets 8 facts to defaults (same reset as /pms/events/move-out).
Partial failures return 200 with per-unit errors under errors[]. Whole-request validation failures return 422.
Idempotent via the Idempotency-Key header.
Request
Responses
- 200
- 401
- 409
- 422
- 429
Sync completed
Missing or invalid authentication
Returned in two cases:
- Source-type collision: a push write targets a unit that is owned by another source (e.g., a pull-mode PMS integration). Units cannot silently change source type.
- Idempotency-Key reuse with a different payload: the same
Idempotency-Keywas used for a prior request with a different body.
Validation failed (whole-request malformed; individual unit errors return 200 with errors[])
Rate limit exceeded. Includes a Retry-After header.
Response Headers
Seconds to wait before retrying.