{"openapi":"3.1.0","info":{"title":"LoggerIQ API","version":"1.0.0","description":"Read people, time, leave and pay summaries, create clock entries and manage webhooks for one workspace. Authenticate with a workspace API key as a bearer token."},"servers":[{"url":"https://app.loggeriq.io/api/v1"}],"security":[{"apiKey":[]}],"tags":[{"name":"Keys"},{"name":"People"},{"name":"Time"},{"name":"Leave"},{"name":"Pay"},{"name":"Webhooks"}],"paths":{"/me":{"get":{"operationId":"getKeyInfo","summary":"Check a key","description":"The workspace a key belongs to and the scopes it holds. Any valid key may call it.","tags":["Keys"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/KeyInfo"}}}}}},"401":{"description":"The key is missing, unknown or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope or the workspace has the API switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request did not validate. `fields` lists what to fix.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests for this key. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/people":{"get":{"operationId":"listPeople","summary":"List people","tags":["People"],"security":[{"apiKey":["people:read"]}],"x-required-scope":"people:read","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Page size, 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `nextCursor` from the previous page.","schema":{"description":"The `nextCursor` from the previous page.","type":"string","minLength":1,"maxLength":512}},{"name":"status","in":"query","required":false,"description":"Only people in this state.","schema":{"description":"Only people in this state.","type":"string","enum":["active","invited","left"]}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Person"}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"401":{"description":"The key is missing, unknown or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope or the workspace has the API switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request did not validate. `fields` lists what to fix.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests for this key. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/people/{id}":{"get":{"operationId":"getPerson","summary":"Get a person","tags":["People"],"security":[{"apiKey":["people:read"]}],"x-required-scope":"people:read","parameters":[{"name":"id","in":"path","required":true,"description":"The person’s id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Person"}}}}}},"401":{"description":"The key is missing, unknown or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope or the workspace has the API switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request did not validate. `fields` lists what to fix.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests for this key. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sites":{"get":{"operationId":"listSites","summary":"List sites","tags":["People"],"security":[{"apiKey":["people:read"]}],"x-required-scope":"people:read","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Page size, 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `nextCursor` from the previous page.","schema":{"description":"The `nextCursor` from the previous page.","type":"string","minLength":1,"maxLength":512}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Site"}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"401":{"description":"The key is missing, unknown or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope or the workspace has the API switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request did not validate. `fields` lists what to fix.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests for this key. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/clock-entries":{"get":{"operationId":"listClockEntries","summary":"List clock entries","description":"Newest first. Locations are never included.","tags":["Time"],"security":[{"apiKey":["time:read"]}],"x-required-scope":"time:read","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Page size, 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `nextCursor` from the previous page.","schema":{"description":"The `nextCursor` from the previous page.","type":"string","minLength":1,"maxLength":512}},{"name":"from","in":"query","required":false,"description":"Entries recorded at or after this instant.","schema":{"description":"Entries recorded at or after this instant.","type":"string","format":"date-time"}},{"name":"to","in":"query","required":false,"description":"Entries recorded before this instant.","schema":{"description":"Entries recorded before this instant.","type":"string","format":"date-time"}},{"name":"personId","in":"query","required":false,"description":"The person’s id.","schema":{"type":"string","minLength":1,"maxLength":64,"description":"The person’s id."}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ClockEntry"}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"401":{"description":"The key is missing, unknown or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope or the workspace has the API switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request did not validate. `fields` lists what to fix.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests for this key. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createClockEntry","summary":"Create a clock entry","description":"Records a clock in or out for a person at a site. Entries from the API carry no location proof, so they arrive for review. Send an `Idempotency-Key` header: a retry with the same key and body returns the first result.","tags":["Time"],"security":[{"apiKey":["clock_entries:write"]}],"x-required-scope":"clock_entries:write","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"A unique value per logical request, up to 255 characters. Retries with the same key and body return the first response for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewClockEntry"}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/ClockEntry"}}}}}},"401":{"description":"The key is missing, unknown or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope or the workspace has the API switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A request with this idempotency key is still being processed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request did not validate. `fields` lists what to fix.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests for this key. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/timesheets":{"get":{"operationId":"listTimesheets","summary":"List approved timesheet weeks","description":"Approved weeks only, newest first, with the week’s totals in minutes.","tags":["Time"],"security":[{"apiKey":["time:read"]}],"x-required-scope":"time:read","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Page size, 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `nextCursor` from the previous page.","schema":{"description":"The `nextCursor` from the previous page.","type":"string","minLength":1,"maxLength":512}},{"name":"from","in":"query","required":false,"description":"Weeks starting on or after this day.","schema":{"description":"Weeks starting on or after this day.","type":"string","format":"date"}},{"name":"to","in":"query","required":false,"description":"Weeks starting before this day.","schema":{"description":"Weeks starting before this day.","type":"string","format":"date"}},{"name":"personId","in":"query","required":false,"description":"The person’s id.","schema":{"type":"string","minLength":1,"maxLength":64,"description":"The person’s id."}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TimesheetWeek"}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"401":{"description":"The key is missing, unknown or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope or the workspace has the API switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request did not validate. `fields` lists what to fix.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests for this key. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/shifts":{"get":{"operationId":"listShifts","summary":"List published shifts","tags":["Time"],"security":[{"apiKey":["time:read"]}],"x-required-scope":"time:read","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Page size, 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `nextCursor` from the previous page.","schema":{"description":"The `nextCursor` from the previous page.","type":"string","minLength":1,"maxLength":512}},{"name":"from","in":"query","required":false,"description":"Shifts on or after this day. Defaults to today.","schema":{"description":"Shifts on or after this day. Defaults to today.","type":"string","format":"date"}},{"name":"to","in":"query","required":false,"description":"Shifts before this day. Defaults to 28 days after `from`.","schema":{"description":"Shifts before this day. Defaults to 28 days after `from`.","type":"string","format":"date"}},{"name":"personId","in":"query","required":false,"description":"The person’s id.","schema":{"type":"string","minLength":1,"maxLength":64,"description":"The person’s id."}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Shift"}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"401":{"description":"The key is missing, unknown or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope or the workspace has the API switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request did not validate. `fields` lists what to fix.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests for this key. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/leave-requests":{"get":{"operationId":"listLeaveRequests","summary":"List leave requests","description":"Newest first. Reasons and attached documents are never included.","tags":["Leave"],"security":[{"apiKey":["leave:read"]}],"x-required-scope":"leave:read","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Page size, 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `nextCursor` from the previous page.","schema":{"description":"The `nextCursor` from the previous page.","type":"string","minLength":1,"maxLength":512}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pending","approved","rejected","cancelled"]}},{"name":"personId","in":"query","required":false,"description":"The person’s id.","schema":{"type":"string","minLength":1,"maxLength":64,"description":"The person’s id."}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/LeaveRequest"}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"401":{"description":"The key is missing, unknown or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope or the workspace has the API switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request did not validate. `fields` lists what to fix.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests for this key. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pay-runs":{"get":{"operationId":"listPayRuns","summary":"List pay run summaries","description":"Finalised and reversed runs, newest first. Totals only: no payslips, tax file numbers or bank details.","tags":["Pay"],"security":[{"apiKey":["pay:read"]}],"x-required-scope":"pay:read","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Page size, 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `nextCursor` from the previous page.","schema":{"description":"The `nextCursor` from the previous page.","type":"string","minLength":1,"maxLength":512}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PayRun"}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"401":{"description":"The key is missing, unknown or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope or the workspace has the API switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request did not validate. `fields` lists what to fix.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests for this key. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhook-endpoints":{"get":{"operationId":"listWebhookEndpoints","summary":"List webhook endpoints","tags":["Webhooks"],"security":[{"apiKey":["webhooks:manage"]}],"x-required-scope":"webhooks:manage","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 100. Defaults to 50.","schema":{"default":50,"description":"Page size, 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `nextCursor` from the previous page.","schema":{"description":"The `nextCursor` from the previous page.","type":"string","minLength":1,"maxLength":512}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"401":{"description":"The key is missing, unknown or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope or the workspace has the API switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request did not validate. `fields` lists what to fix.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests for this key. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createWebhookEndpoint","summary":"Create a webhook endpoint","description":"The response carries the signing secret once. Store it then.","tags":["Webhooks"],"security":[{"apiKey":["webhooks:manage"]}],"x-required-scope":"webhooks:manage","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"A unique value per logical request, up to 255 characters. Retries with the same key and body return the first response for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewWebhookEndpoint"}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/WebhookEndpointCreated"}}}}}},"401":{"description":"The key is missing, unknown or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope or the workspace has the API switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A request with this idempotency key is still being processed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request did not validate. `fields` lists what to fix.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests for this key. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhook-endpoints/{id}":{"delete":{"operationId":"deleteWebhookEndpoint","summary":"Delete a webhook endpoint","tags":["Webhooks"],"security":[{"apiKey":["webhooks:manage"]}],"x-required-scope":"webhooks:manage","parameters":[{"name":"id","in":"path","required":true,"description":"The endpoint id.","schema":{"type":"string"}}],"responses":{"204":{"description":"Done. No body."},"401":{"description":"The key is missing, unknown or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope or the workspace has the API switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request did not validate. `fields` lists what to fix.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests for this key. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{"clock_entry.created":{"post":{"summary":"Clock entry created","description":"Someone clocked in or out, from any device or the API. Signed with the `LoggerIQ-Signature` header.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Any 2xx status marks the delivery done."}}}},"timesheet.approved":{"post":{"summary":"Timesheet approved","description":"A person’s week was approved by a manager or approved itself. Signed with the `LoggerIQ-Signature` header.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Any 2xx status marks the delivery done."}}}},"leave.decided":{"post":{"summary":"Leave decided","description":"A leave request was approved, declined or cancelled. Signed with the `LoggerIQ-Signature` header.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Any 2xx status marks the delivery done."}}}},"expense.decided":{"post":{"summary":"Expense decided","description":"An expense claim was approved or declined. Signed with the `LoggerIQ-Signature` header.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Any 2xx status marks the delivery done."}}}},"pay_run.finalised":{"post":{"summary":"Pay run finalised","description":"A pay run was finalised. Totals only. Signed with the `LoggerIQ-Signature` header.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Any 2xx status marks the delivery done."}}}},"person.joined":{"post":{"summary":"Person joined","description":"Someone joined the workspace. Signed with the `LoggerIQ-Signature` header.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Any 2xx status marks the delivery done."}}}},"person.left":{"post":{"summary":"Person left","description":"Someone left the workspace. Signed with the `LoggerIQ-Signature` header.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Any 2xx status marks the delivery done."}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","description":"What went wrong, in a sentence."},"code":{"type":"string","description":"A stable machine code, for example `rate_limited`."}},"required":["error","code"],"additionalProperties":false},"KeyInfo":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid"},"workspaceName":{"type":"string"},"keyId":{"type":"string","format":"uuid"},"keyName":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["people:read","time:read","clock_entries:write","leave:read","pay:read","webhooks:manage"]}}},"required":["workspaceId","workspaceName","keyId","keyName","scopes"],"additionalProperties":false},"Person":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"description":"The person’s id."},"name":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["admin","manager","employee","reception","payroll_officer","auditor","area_manager","kiosk_worker"]},"status":{"type":"string","enum":["active","invited","left"]},"employeeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"jobTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"siteIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Sites they may clock in at. Empty means all."},"teamId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"startDate":{"anyOf":[{"type":"string","format":"date","description":"A calendar day, YYYY-MM-DD, in the workspace time zone."},{"type":"null"}]},"leftOn":{"anyOf":[{"type":"string","format":"date","description":"A calendar day, YYYY-MM-DD, in the workspace time zone."},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","description":"An instant, ISO 8601 in UTC."}},"required":["id","name","email","role","status","employeeId","jobTitle","siteIds","teamId","startDate","leftOn","createdAt"],"additionalProperties":false},"Site":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"address":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"},"radiusMeters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string","format":"date-time","description":"An instant, ISO 8601 in UTC."}},"required":["id","name","address","latitude","longitude","radiusMeters","createdAt"],"additionalProperties":false},"ClockEntry":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"personId":{"type":"string","minLength":1,"maxLength":64,"description":"The person’s id."},"siteId":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["in","out"]},"source":{"type":"string","enum":["mobile","web","kiosk","badge","api","other"]},"recordedAt":{"type":"string","format":"date-time","description":"An instant, ISO 8601 in UTC."},"verdict":{"type":"string","enum":["verified","review","rejected"]},"authenticity":{"type":"string","enum":["high","medium","low"]},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `externalId` sent when it was created here."}},"required":["id","personId","siteId","type","source","recordedAt","verdict","authenticity","externalId"],"additionalProperties":false},"NewClockEntry":{"type":"object","properties":{"personId":{"type":"string","minLength":1,"maxLength":64,"description":"The person’s id."},"siteId":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["in","out"]},"recordedAt":{"description":"When it happened. Defaults to now. At most 7 days in the past.","type":"string","format":"date-time"},"externalId":{"description":"Your own id for the entry. Sending it again returns the first entry.","type":"string","minLength":1,"maxLength":64}},"required":["personId","siteId","type"],"additionalProperties":false},"TimesheetWeek":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"personId":{"type":"string","minLength":1,"maxLength":64,"description":"The person’s id."},"weekStart":{"type":"string","format":"date","description":"The Monday the week starts on."},"weekEnd":{"type":"string","format":"date","description":"The Sunday the week ends on."},"status":{"type":"string","const":"approved"},"approvedAt":{"type":"string","format":"date-time","description":"An instant, ISO 8601 in UTC."},"approvedBy":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Who approved it. Null when it approved itself."},"method":{"type":"string","enum":["manual","auto"]},"workedMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"overtimeMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"shortfallMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","personId","weekStart","weekEnd","status","approvedAt","approvedBy","method","workedMinutes","overtimeMinutes","shortfallMinutes"],"additionalProperties":false},"LeaveRequest":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"personId":{"type":"string","minLength":1,"maxLength":64,"description":"The person’s id."},"type":{"type":"string"},"startDate":{"type":"string","format":"date","description":"A calendar day, YYYY-MM-DD, in the workspace time zone."},"endDate":{"type":"string","format":"date","description":"A calendar day, YYYY-MM-DD, in the workspace time zone."},"halfDay":{"type":"boolean"},"workingDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"type":"string","enum":["pending","approved","rejected","cancelled"]},"decidedAt":{"anyOf":[{"type":"string","format":"date-time","description":"An instant, ISO 8601 in UTC."},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","description":"An instant, ISO 8601 in UTC."}},"required":["id","personId","type","startDate","endDate","halfDay","workingDays","status","decidedAt","createdAt"],"additionalProperties":false},"PayRun":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"label":{"type":"string"},"kind":{"type":"string","enum":["regular","bonus","final_settlement","reversal"]},"status":{"type":"string","enum":["finalised","reversed"]},"periodStart":{"type":"string","format":"date","description":"A calendar day, YYYY-MM-DD, in the workspace time zone."},"periodEnd":{"type":"string","format":"date","description":"A calendar day, YYYY-MM-DD, in the workspace time zone."},"payDate":{"type":"string","format":"date","description":"A calendar day, YYYY-MM-DD, in the workspace time zone."},"currency":{"type":"string"},"headcount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"grossCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer cents in the run currency."},"deductionsCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer cents in the run currency."},"netCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer cents in the run currency."},"employerCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer cents in the run currency."},"taxCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer cents in the run currency."},"finalisedAt":{"anyOf":[{"type":"string","format":"date-time","description":"An instant, ISO 8601 in UTC."},{"type":"null"}]},"reversedAt":{"anyOf":[{"type":"string","format":"date-time","description":"An instant, ISO 8601 in UTC."},{"type":"null"}]}},"required":["id","label","kind","status","periodStart","periodEnd","payDate","currency","headcount","grossCents","deductionsCents","netCents","employerCents","taxCents","finalisedAt","reversedAt"],"additionalProperties":false},"Shift":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"personId":{"anyOf":[{"type":"string","minLength":1,"maxLength":64,"description":"The person’s id."},{"type":"null"}],"description":"Null for an open shift nobody has taken."},"siteId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"date":{"type":"string","format":"date","description":"A calendar day, YYYY-MM-DD, in the workspace time zone."},"startTime":{"type":"string","description":"HH:MM, workspace time."},"endTime":{"type":"string","description":"HH:MM, workspace time. Earlier than the start for an overnight shift."},"role":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","personId","siteId","date","startTime","endTime","role"],"additionalProperties":false},"ExpenseClaim":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"personId":{"type":"string","minLength":1,"maxLength":64,"description":"The person’s id."},"type":{"type":"string"},"amountCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string"},"date":{"type":"string","format":"date","description":"A calendar day, YYYY-MM-DD, in the workspace time zone."},"status":{"type":"string","enum":["submitted","approved","rejected"]},"decidedAt":{"anyOf":[{"type":"string","format":"date-time","description":"An instant, ISO 8601 in UTC."},{"type":"null"}]}},"required":["id","personId","type","amountCents","currency","date","status","decidedAt"],"additionalProperties":false},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"events":{"type":"array","items":{"type":"string","enum":["clock_entry.created","timesheet.approved","leave.decided","expense.decided","pay_run.finalised","person.joined","person.left"]}},"enabled":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","description":"An instant, ISO 8601 in UTC."}},"required":["id","url","description","events","enabled","createdAt"],"additionalProperties":false},"NewWebhookEndpoint":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"},"description":{"type":"string","maxLength":200},"events":{}},"required":["url","events"],"additionalProperties":false},"WebhookEndpointCreated":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"events":{"type":"array","items":{"type":"string","enum":["clock_entry.created","timesheet.approved","leave.decided","expense.decided","pay_run.finalised","person.joined","person.left"]}},"enabled":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","description":"An instant, ISO 8601 in UTC."},"secret":{"type":"string","description":"The signing secret. Shown once: store it now."}},"required":["id","url","description","events","enabled","createdAt","secret"],"additionalProperties":false},"WebhookEvent":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["clock_entry.created","timesheet.approved","leave.decided","expense.decided","pay_run.finalised","person.joined","person.left"]},"createdAt":{"type":"string","format":"date-time","description":"An instant, ISO 8601 in UTC."},"workspaceId":{"type":"string","format":"uuid"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","type","createdAt","workspaceId","data"],"additionalProperties":false}},"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"A workspace API key. Scopes: `people:read` (Read people), `time:read` (Read time), `clock_entries:write` (Write clock entries), `leave:read` (Read leave), `pay:read` (Read pay summaries), `webhooks:manage` (Manage webhooks)."}}}}