> For the complete documentation index, see [llms.txt](https://mobile-calendar.gitbook.io/v1/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mobile-calendar.gitbook.io/v1/rest-api/history.md).

# History

Read-only change history (audit log) of reservations, clients, and rooms.

## List change history (audit log) of the account

> Read-only audit log of reservations, clients, and rooms. Filter by object type (optionally a specific object), employee, operation type, source app, and date range. Entries are sorted by change date (newest first by default).

```json
{"openapi":"3.0.0","info":{"title":"Public REST API v1 – mobile-calendar.com","version":"1.0.0"},"tags":[{"name":"history","description":"Read-only change history (audit log) of reservations, clients, and rooms."}],"servers":[{"url":"https://api.mobile-calendar.com/v1/public","description":"Production"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","description":"Pass the token in header: Authorization: Bearer <JWT>","bearerFormat":"JWT","scheme":"bearer"}},"parameters":{"HistoryEmployeeIdParam":{"name":"employeeId","in":"query","description":"Filter by employee who made the change","required":false,"schema":{"type":"integer","minimum":1}},"HistoryModeParam":{"name":"mode","in":"query","description":"Filter by operation type","required":false,"schema":{"type":"string","enum":["ADD","EDIT","DELETE","RESTORE"]}},"HistoryAppParam":{"name":"app","in":"query","description":"Filter by source application of the change","required":false,"schema":{"type":"string","enum":["WEB","MOBILE","API","AI","CRON","PAYMENT_LINK"]}},"HistoryFromParam":{"name":"from","in":"query","description":"Only entries at or after this date ('Y-m-d') or datetime ('Y-m-d H:i:s')","required":false,"schema":{"type":"string"}},"HistoryToParam":{"name":"to","in":"query","description":"Only entries at or before this date ('Y-m-d', inclusive whole day) or datetime ('Y-m-d H:i:s')","required":false,"schema":{"type":"string"}},"HistoryOrderTypeParam":{"name":"orderType","in":"query","description":"Sort direction by change date","required":false,"schema":{"type":"string","default":"DESC","enum":["ASC","DESC"]}},"PageParam":{"name":"page","in":"query","description":"Page number (>=1)","required":false,"schema":{"type":"integer","default":1,"minimum":1}},"LimitParam":{"name":"limit","in":"query","description":"Page size (1–200)","required":false,"schema":{"type":"integer","default":25,"maximum":200,"minimum":1}}},"schemas":{"HistoryListResponse":{"description":"Paginated list of history entries","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/HistoryEntry"}},"meta":{"$ref":"#/components/schemas/MetaWithPagination"}},"type":"object"},"HistoryEntry":{"description":"Single history (audit log) entry","required":["logId","objectType","objectId","mode","changes","addDate"],"properties":{"logId":{"type":"integer"},"objectType":{"description":"Type of the affected object","type":"string","enum":["reservations","clients","rooms"]},"objectId":{"description":"ID of the affected object; an array of IDs for group operations (e.g. group reservations)","oneOf":[{"type":"integer"},{"type":"array","items":{"type":"integer"}}]},"mode":{"description":"Operation type","type":"string","enum":["ADD","EDIT","DELETE","RESTORE"]},"changes":{"description":"Field-level changes (non-empty only for EDIT entries)","type":"array","items":{"$ref":"#/components/schemas/HistoryChange"}},"employeeId":{"description":"Employee who made the change (null = account owner or system)","type":"integer","nullable":true},"createdBy":{"description":"Original author (for entries created on behalf of someone)","type":"integer","nullable":true},"app":{"description":"Source of the change: WEB/MOBILE = panel or mobile app, API = API key, AI = AI agent (Mobi), CRON = automated job, PAYMENT_LINK = guest paid a payment link (payment status / additional services status)","type":"string","enum":["WEB","MOBILE","API","AI","CRON","PAYMENT_LINK"],"nullable":true},"addDate":{"description":"When the change happened (UTC, ISO 8601)","type":"string","format":"date-time"}},"type":"object"},"HistoryChange":{"description":"Single field change within an EDIT entry","required":["key"],"properties":{"key":{"description":"Changed field name","type":"string"},"previous":{"description":"Previous value (any type)"},"current":{"description":"New value (any type)"},"previousSuffix":{"description":"Unit/currency of the previous value (only for monetary fields)","type":"string","nullable":true},"currentSuffix":{"description":"Unit/currency of the new value (only for monetary fields)","type":"string","nullable":true}},"type":"object"},"MetaWithPagination":{"description":"Pagination parameters with request tracking in list responses.","required":["totalItems","currentPage","totalPages","itemsPerPage","ruid"],"properties":{"totalItems":{"type":"integer","minimum":0},"currentPage":{"type":"integer","minimum":1},"totalPages":{"type":"integer","minimum":0},"itemsPerPage":{"type":"integer","minimum":1},"ruid":{"description":"Request Unique ID","type":"string","format":"uuid"}},"type":"object"},"ApiProblem401":{"description":"Missing authentication or invalid credentials.","allOf":[{"$ref":"#/components/schemas/ApiProblemBase"},{"properties":{"type":{"description":"401 Unauthorized","type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"type":"object"}]},"ApiProblemBase":{"description":"RFC 7807 Problem Details (base schema).","required":["type","title","status","detail","instance"],"properties":{"type":{"description":"RFC 7807 base — DO NOT use directly in endpoints.\nIn endpoints reference ApiProblem400/401/403/409/422/429/500.","type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"type":"object"},"ApiProblem422":{"description":"Input data validation error.","allOf":[{"$ref":"#/components/schemas/ApiProblemBase"},{"properties":{"type":{"description":"422 Unprocessable Entity (validation)","type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"description":"Map: field name → error message(s)","type":"object","additionalProperties":{"$ref":"#/components/schemas/ErrorValue"}}},"type":"object"}]},"ErrorValue":{"description":"Single error message or list of messages.","oneOf":[{"description":"Error value in error map can be:\n- single string, or\n- array of strings (multiple messages for one field).","type":"string"},{"type":"array","items":{"type":"string"}}]}}},"paths":{"/history":{"get":{"tags":["history"],"summary":"List change history (audit log) of the account","description":"Read-only audit log of reservations, clients, and rooms. Filter by object type (optionally a specific object), employee, operation type, source app, and date range. Entries are sorted by change date (newest first by default).","operationId":"listHistory","parameters":[{"name":"objectType","in":"query","description":"Filter by object type","required":false,"schema":{"type":"string","enum":["reservations","clients","rooms"]}},{"name":"objectId","in":"query","description":"Filter by a specific object ID (requires objectType); matches also group operations containing this ID","required":false,"schema":{"type":"integer","minimum":1}},{"$ref":"#/components/parameters/HistoryEmployeeIdParam"},{"$ref":"#/components/parameters/HistoryModeParam"},{"$ref":"#/components/parameters/HistoryAppParam"},{"$ref":"#/components/parameters/HistoryFromParam"},{"$ref":"#/components/parameters/HistoryToParam"},{"$ref":"#/components/parameters/HistoryOrderTypeParam"},{"$ref":"#/components/parameters/PageParam"},{"$ref":"#/components/parameters/LimitParam"}],"responses":{"200":{"description":"Paginated history entries","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HistoryListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiProblem401"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiProblem422"}}}}}}}}}
```

## Get change history of a reservation

> All history entries of one reservation (including group operations that contained it). Sorted by change date, newest first by default.

```json
{"openapi":"3.0.0","info":{"title":"Public REST API v1 – mobile-calendar.com","version":"1.0.0"},"tags":[{"name":"history","description":"Read-only change history (audit log) of reservations, clients, and rooms."}],"servers":[{"url":"https://api.mobile-calendar.com/v1/public","description":"Production"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","description":"Pass the token in header: Authorization: Bearer <JWT>","bearerFormat":"JWT","scheme":"bearer"}},"parameters":{"HistoryEmployeeIdParam":{"name":"employeeId","in":"query","description":"Filter by employee who made the change","required":false,"schema":{"type":"integer","minimum":1}},"HistoryModeParam":{"name":"mode","in":"query","description":"Filter by operation type","required":false,"schema":{"type":"string","enum":["ADD","EDIT","DELETE","RESTORE"]}},"HistoryAppParam":{"name":"app","in":"query","description":"Filter by source application of the change","required":false,"schema":{"type":"string","enum":["WEB","MOBILE","API","AI","CRON","PAYMENT_LINK"]}},"HistoryFromParam":{"name":"from","in":"query","description":"Only entries at or after this date ('Y-m-d') or datetime ('Y-m-d H:i:s')","required":false,"schema":{"type":"string"}},"HistoryToParam":{"name":"to","in":"query","description":"Only entries at or before this date ('Y-m-d', inclusive whole day) or datetime ('Y-m-d H:i:s')","required":false,"schema":{"type":"string"}},"HistoryOrderTypeParam":{"name":"orderType","in":"query","description":"Sort direction by change date","required":false,"schema":{"type":"string","default":"DESC","enum":["ASC","DESC"]}},"PageParam":{"name":"page","in":"query","description":"Page number (>=1)","required":false,"schema":{"type":"integer","default":1,"minimum":1}},"LimitParam":{"name":"limit","in":"query","description":"Page size (1–200)","required":false,"schema":{"type":"integer","default":25,"maximum":200,"minimum":1}}},"schemas":{"HistoryListResponse":{"description":"Paginated list of history entries","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/HistoryEntry"}},"meta":{"$ref":"#/components/schemas/MetaWithPagination"}},"type":"object"},"HistoryEntry":{"description":"Single history (audit log) entry","required":["logId","objectType","objectId","mode","changes","addDate"],"properties":{"logId":{"type":"integer"},"objectType":{"description":"Type of the affected object","type":"string","enum":["reservations","clients","rooms"]},"objectId":{"description":"ID of the affected object; an array of IDs for group operations (e.g. group reservations)","oneOf":[{"type":"integer"},{"type":"array","items":{"type":"integer"}}]},"mode":{"description":"Operation type","type":"string","enum":["ADD","EDIT","DELETE","RESTORE"]},"changes":{"description":"Field-level changes (non-empty only for EDIT entries)","type":"array","items":{"$ref":"#/components/schemas/HistoryChange"}},"employeeId":{"description":"Employee who made the change (null = account owner or system)","type":"integer","nullable":true},"createdBy":{"description":"Original author (for entries created on behalf of someone)","type":"integer","nullable":true},"app":{"description":"Source of the change: WEB/MOBILE = panel or mobile app, API = API key, AI = AI agent (Mobi), CRON = automated job, PAYMENT_LINK = guest paid a payment link (payment status / additional services status)","type":"string","enum":["WEB","MOBILE","API","AI","CRON","PAYMENT_LINK"],"nullable":true},"addDate":{"description":"When the change happened (UTC, ISO 8601)","type":"string","format":"date-time"}},"type":"object"},"HistoryChange":{"description":"Single field change within an EDIT entry","required":["key"],"properties":{"key":{"description":"Changed field name","type":"string"},"previous":{"description":"Previous value (any type)"},"current":{"description":"New value (any type)"},"previousSuffix":{"description":"Unit/currency of the previous value (only for monetary fields)","type":"string","nullable":true},"currentSuffix":{"description":"Unit/currency of the new value (only for monetary fields)","type":"string","nullable":true}},"type":"object"},"MetaWithPagination":{"description":"Pagination parameters with request tracking in list responses.","required":["totalItems","currentPage","totalPages","itemsPerPage","ruid"],"properties":{"totalItems":{"type":"integer","minimum":0},"currentPage":{"type":"integer","minimum":1},"totalPages":{"type":"integer","minimum":0},"itemsPerPage":{"type":"integer","minimum":1},"ruid":{"description":"Request Unique ID","type":"string","format":"uuid"}},"type":"object"},"ApiProblem401":{"description":"Missing authentication or invalid credentials.","allOf":[{"$ref":"#/components/schemas/ApiProblemBase"},{"properties":{"type":{"description":"401 Unauthorized","type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"type":"object"}]},"ApiProblemBase":{"description":"RFC 7807 Problem Details (base schema).","required":["type","title","status","detail","instance"],"properties":{"type":{"description":"RFC 7807 base — DO NOT use directly in endpoints.\nIn endpoints reference ApiProblem400/401/403/409/422/429/500.","type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"type":"object"},"ApiProblem422":{"description":"Input data validation error.","allOf":[{"$ref":"#/components/schemas/ApiProblemBase"},{"properties":{"type":{"description":"422 Unprocessable Entity (validation)","type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"description":"Map: field name → error message(s)","type":"object","additionalProperties":{"$ref":"#/components/schemas/ErrorValue"}}},"type":"object"}]},"ErrorValue":{"description":"Single error message or list of messages.","oneOf":[{"description":"Error value in error map can be:\n- single string, or\n- array of strings (multiple messages for one field).","type":"string"},{"type":"array","items":{"type":"string"}}]}}},"paths":{"/history/reservations/{id}":{"get":{"tags":["history"],"summary":"Get change history of a reservation","description":"All history entries of one reservation (including group operations that contained it). Sorted by change date, newest first by default.","operationId":"getReservationHistory","parameters":[{"name":"id","in":"path","description":"Reservation ID","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/HistoryEmployeeIdParam"},{"$ref":"#/components/parameters/HistoryModeParam"},{"$ref":"#/components/parameters/HistoryAppParam"},{"$ref":"#/components/parameters/HistoryFromParam"},{"$ref":"#/components/parameters/HistoryToParam"},{"$ref":"#/components/parameters/HistoryOrderTypeParam"},{"$ref":"#/components/parameters/PageParam"},{"$ref":"#/components/parameters/LimitParam"}],"responses":{"200":{"description":"Paginated history entries of the reservation (empty list if none)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HistoryListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiProblem401"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiProblem422"}}}}}}}}}
```

## Get change history of a client

> All history entries of one client. Sorted by change date, newest first by default.

```json
{"openapi":"3.0.0","info":{"title":"Public REST API v1 – mobile-calendar.com","version":"1.0.0"},"tags":[{"name":"history","description":"Read-only change history (audit log) of reservations, clients, and rooms."}],"servers":[{"url":"https://api.mobile-calendar.com/v1/public","description":"Production"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","description":"Pass the token in header: Authorization: Bearer <JWT>","bearerFormat":"JWT","scheme":"bearer"}},"parameters":{"HistoryEmployeeIdParam":{"name":"employeeId","in":"query","description":"Filter by employee who made the change","required":false,"schema":{"type":"integer","minimum":1}},"HistoryModeParam":{"name":"mode","in":"query","description":"Filter by operation type","required":false,"schema":{"type":"string","enum":["ADD","EDIT","DELETE","RESTORE"]}},"HistoryAppParam":{"name":"app","in":"query","description":"Filter by source application of the change","required":false,"schema":{"type":"string","enum":["WEB","MOBILE","API","AI","CRON","PAYMENT_LINK"]}},"HistoryFromParam":{"name":"from","in":"query","description":"Only entries at or after this date ('Y-m-d') or datetime ('Y-m-d H:i:s')","required":false,"schema":{"type":"string"}},"HistoryToParam":{"name":"to","in":"query","description":"Only entries at or before this date ('Y-m-d', inclusive whole day) or datetime ('Y-m-d H:i:s')","required":false,"schema":{"type":"string"}},"HistoryOrderTypeParam":{"name":"orderType","in":"query","description":"Sort direction by change date","required":false,"schema":{"type":"string","default":"DESC","enum":["ASC","DESC"]}},"PageParam":{"name":"page","in":"query","description":"Page number (>=1)","required":false,"schema":{"type":"integer","default":1,"minimum":1}},"LimitParam":{"name":"limit","in":"query","description":"Page size (1–200)","required":false,"schema":{"type":"integer","default":25,"maximum":200,"minimum":1}}},"schemas":{"HistoryListResponse":{"description":"Paginated list of history entries","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/HistoryEntry"}},"meta":{"$ref":"#/components/schemas/MetaWithPagination"}},"type":"object"},"HistoryEntry":{"description":"Single history (audit log) entry","required":["logId","objectType","objectId","mode","changes","addDate"],"properties":{"logId":{"type":"integer"},"objectType":{"description":"Type of the affected object","type":"string","enum":["reservations","clients","rooms"]},"objectId":{"description":"ID of the affected object; an array of IDs for group operations (e.g. group reservations)","oneOf":[{"type":"integer"},{"type":"array","items":{"type":"integer"}}]},"mode":{"description":"Operation type","type":"string","enum":["ADD","EDIT","DELETE","RESTORE"]},"changes":{"description":"Field-level changes (non-empty only for EDIT entries)","type":"array","items":{"$ref":"#/components/schemas/HistoryChange"}},"employeeId":{"description":"Employee who made the change (null = account owner or system)","type":"integer","nullable":true},"createdBy":{"description":"Original author (for entries created on behalf of someone)","type":"integer","nullable":true},"app":{"description":"Source of the change: WEB/MOBILE = panel or mobile app, API = API key, AI = AI agent (Mobi), CRON = automated job, PAYMENT_LINK = guest paid a payment link (payment status / additional services status)","type":"string","enum":["WEB","MOBILE","API","AI","CRON","PAYMENT_LINK"],"nullable":true},"addDate":{"description":"When the change happened (UTC, ISO 8601)","type":"string","format":"date-time"}},"type":"object"},"HistoryChange":{"description":"Single field change within an EDIT entry","required":["key"],"properties":{"key":{"description":"Changed field name","type":"string"},"previous":{"description":"Previous value (any type)"},"current":{"description":"New value (any type)"},"previousSuffix":{"description":"Unit/currency of the previous value (only for monetary fields)","type":"string","nullable":true},"currentSuffix":{"description":"Unit/currency of the new value (only for monetary fields)","type":"string","nullable":true}},"type":"object"},"MetaWithPagination":{"description":"Pagination parameters with request tracking in list responses.","required":["totalItems","currentPage","totalPages","itemsPerPage","ruid"],"properties":{"totalItems":{"type":"integer","minimum":0},"currentPage":{"type":"integer","minimum":1},"totalPages":{"type":"integer","minimum":0},"itemsPerPage":{"type":"integer","minimum":1},"ruid":{"description":"Request Unique ID","type":"string","format":"uuid"}},"type":"object"},"ApiProblem401":{"description":"Missing authentication or invalid credentials.","allOf":[{"$ref":"#/components/schemas/ApiProblemBase"},{"properties":{"type":{"description":"401 Unauthorized","type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"type":"object"}]},"ApiProblemBase":{"description":"RFC 7807 Problem Details (base schema).","required":["type","title","status","detail","instance"],"properties":{"type":{"description":"RFC 7807 base — DO NOT use directly in endpoints.\nIn endpoints reference ApiProblem400/401/403/409/422/429/500.","type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"type":"object"},"ApiProblem422":{"description":"Input data validation error.","allOf":[{"$ref":"#/components/schemas/ApiProblemBase"},{"properties":{"type":{"description":"422 Unprocessable Entity (validation)","type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"description":"Map: field name → error message(s)","type":"object","additionalProperties":{"$ref":"#/components/schemas/ErrorValue"}}},"type":"object"}]},"ErrorValue":{"description":"Single error message or list of messages.","oneOf":[{"description":"Error value in error map can be:\n- single string, or\n- array of strings (multiple messages for one field).","type":"string"},{"type":"array","items":{"type":"string"}}]}}},"paths":{"/history/clients/{id}":{"get":{"tags":["history"],"summary":"Get change history of a client","description":"All history entries of one client. Sorted by change date, newest first by default.","operationId":"getClientHistory","parameters":[{"name":"id","in":"path","description":"Client ID","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/HistoryEmployeeIdParam"},{"$ref":"#/components/parameters/HistoryModeParam"},{"$ref":"#/components/parameters/HistoryAppParam"},{"$ref":"#/components/parameters/HistoryFromParam"},{"$ref":"#/components/parameters/HistoryToParam"},{"$ref":"#/components/parameters/HistoryOrderTypeParam"},{"$ref":"#/components/parameters/PageParam"},{"$ref":"#/components/parameters/LimitParam"}],"responses":{"200":{"description":"Paginated history entries of the client (empty list if none)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HistoryListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiProblem401"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiProblem422"}}}}}}}}}
```

## Get change history of a room

> All history entries of one room. Sorted by change date, newest first by default.

```json
{"openapi":"3.0.0","info":{"title":"Public REST API v1 – mobile-calendar.com","version":"1.0.0"},"tags":[{"name":"history","description":"Read-only change history (audit log) of reservations, clients, and rooms."}],"servers":[{"url":"https://api.mobile-calendar.com/v1/public","description":"Production"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","description":"Pass the token in header: Authorization: Bearer <JWT>","bearerFormat":"JWT","scheme":"bearer"}},"parameters":{"HistoryEmployeeIdParam":{"name":"employeeId","in":"query","description":"Filter by employee who made the change","required":false,"schema":{"type":"integer","minimum":1}},"HistoryModeParam":{"name":"mode","in":"query","description":"Filter by operation type","required":false,"schema":{"type":"string","enum":["ADD","EDIT","DELETE","RESTORE"]}},"HistoryAppParam":{"name":"app","in":"query","description":"Filter by source application of the change","required":false,"schema":{"type":"string","enum":["WEB","MOBILE","API","AI","CRON","PAYMENT_LINK"]}},"HistoryFromParam":{"name":"from","in":"query","description":"Only entries at or after this date ('Y-m-d') or datetime ('Y-m-d H:i:s')","required":false,"schema":{"type":"string"}},"HistoryToParam":{"name":"to","in":"query","description":"Only entries at or before this date ('Y-m-d', inclusive whole day) or datetime ('Y-m-d H:i:s')","required":false,"schema":{"type":"string"}},"HistoryOrderTypeParam":{"name":"orderType","in":"query","description":"Sort direction by change date","required":false,"schema":{"type":"string","default":"DESC","enum":["ASC","DESC"]}},"PageParam":{"name":"page","in":"query","description":"Page number (>=1)","required":false,"schema":{"type":"integer","default":1,"minimum":1}},"LimitParam":{"name":"limit","in":"query","description":"Page size (1–200)","required":false,"schema":{"type":"integer","default":25,"maximum":200,"minimum":1}}},"schemas":{"HistoryListResponse":{"description":"Paginated list of history entries","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/HistoryEntry"}},"meta":{"$ref":"#/components/schemas/MetaWithPagination"}},"type":"object"},"HistoryEntry":{"description":"Single history (audit log) entry","required":["logId","objectType","objectId","mode","changes","addDate"],"properties":{"logId":{"type":"integer"},"objectType":{"description":"Type of the affected object","type":"string","enum":["reservations","clients","rooms"]},"objectId":{"description":"ID of the affected object; an array of IDs for group operations (e.g. group reservations)","oneOf":[{"type":"integer"},{"type":"array","items":{"type":"integer"}}]},"mode":{"description":"Operation type","type":"string","enum":["ADD","EDIT","DELETE","RESTORE"]},"changes":{"description":"Field-level changes (non-empty only for EDIT entries)","type":"array","items":{"$ref":"#/components/schemas/HistoryChange"}},"employeeId":{"description":"Employee who made the change (null = account owner or system)","type":"integer","nullable":true},"createdBy":{"description":"Original author (for entries created on behalf of someone)","type":"integer","nullable":true},"app":{"description":"Source of the change: WEB/MOBILE = panel or mobile app, API = API key, AI = AI agent (Mobi), CRON = automated job, PAYMENT_LINK = guest paid a payment link (payment status / additional services status)","type":"string","enum":["WEB","MOBILE","API","AI","CRON","PAYMENT_LINK"],"nullable":true},"addDate":{"description":"When the change happened (UTC, ISO 8601)","type":"string","format":"date-time"}},"type":"object"},"HistoryChange":{"description":"Single field change within an EDIT entry","required":["key"],"properties":{"key":{"description":"Changed field name","type":"string"},"previous":{"description":"Previous value (any type)"},"current":{"description":"New value (any type)"},"previousSuffix":{"description":"Unit/currency of the previous value (only for monetary fields)","type":"string","nullable":true},"currentSuffix":{"description":"Unit/currency of the new value (only for monetary fields)","type":"string","nullable":true}},"type":"object"},"MetaWithPagination":{"description":"Pagination parameters with request tracking in list responses.","required":["totalItems","currentPage","totalPages","itemsPerPage","ruid"],"properties":{"totalItems":{"type":"integer","minimum":0},"currentPage":{"type":"integer","minimum":1},"totalPages":{"type":"integer","minimum":0},"itemsPerPage":{"type":"integer","minimum":1},"ruid":{"description":"Request Unique ID","type":"string","format":"uuid"}},"type":"object"},"ApiProblem401":{"description":"Missing authentication or invalid credentials.","allOf":[{"$ref":"#/components/schemas/ApiProblemBase"},{"properties":{"type":{"description":"401 Unauthorized","type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"type":"object"}]},"ApiProblemBase":{"description":"RFC 7807 Problem Details (base schema).","required":["type","title","status","detail","instance"],"properties":{"type":{"description":"RFC 7807 base — DO NOT use directly in endpoints.\nIn endpoints reference ApiProblem400/401/403/409/422/429/500.","type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"type":"object"},"ApiProblem422":{"description":"Input data validation error.","allOf":[{"$ref":"#/components/schemas/ApiProblemBase"},{"properties":{"type":{"description":"422 Unprocessable Entity (validation)","type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"description":"Map: field name → error message(s)","type":"object","additionalProperties":{"$ref":"#/components/schemas/ErrorValue"}}},"type":"object"}]},"ErrorValue":{"description":"Single error message or list of messages.","oneOf":[{"description":"Error value in error map can be:\n- single string, or\n- array of strings (multiple messages for one field).","type":"string"},{"type":"array","items":{"type":"string"}}]}}},"paths":{"/history/rooms/{id}":{"get":{"tags":["history"],"summary":"Get change history of a room","description":"All history entries of one room. Sorted by change date, newest first by default.","operationId":"getRoomHistory","parameters":[{"name":"id","in":"path","description":"Room ID","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/HistoryEmployeeIdParam"},{"$ref":"#/components/parameters/HistoryModeParam"},{"$ref":"#/components/parameters/HistoryAppParam"},{"$ref":"#/components/parameters/HistoryFromParam"},{"$ref":"#/components/parameters/HistoryToParam"},{"$ref":"#/components/parameters/HistoryOrderTypeParam"},{"$ref":"#/components/parameters/PageParam"},{"$ref":"#/components/parameters/LimitParam"}],"responses":{"200":{"description":"Paginated history entries of the room (empty list if none)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HistoryListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiProblem401"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiProblem422"}}}}}}}}}
```
