{"openapi":"3.0.3","info":{"title":"i-Swipe HR API","version":"v1","description":"Read and update your HR data. Every response is JSON: {\"data\": …, \"meta\": …} on success, or {\"error\": {\"code\", \"message\", \"fields\"?}} with the HTTP status on failure. Keys are made in Settings → API keys, each with only the permissions it needs. Retries: send an Idempotency-Key header (a UUID) on POST and PATCH; for 24 hours, the same key returns the first answer again (marked Idempotent-Replayed: true) instead of doing the work twice. Rate limits are per key per sliding hour (X-RateLimit-Limit, X-RateLimit-Remaining; Retry-After on 429)."},"servers":[{"url":"https://api.iswipehr.com"}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Authorization: Bearer <your API key>"}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Any unique string (a UUID is ideal). Retrying with the same key and body within 24 hours returns the first answer; the same key with a different body gets 422 idempotency_key_reused; while the first call is still running, 409 idempotency_in_progress."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Machine-readable, e.g. unauthenticated, invalid_token, forbidden, not_found, method_not_allowed, invalid, insufficient_balance, conflict, finalised, rate_limited, server_error"},"message":{"type":"string","description":"Plain-English explanation"},"fields":{"type":"object","additionalProperties":{"type":"string"},"description":"Per-field problems (422)"},"reference":{"type":"string","description":"Request id to quote to support (500)"}}}}},"EmployeeUpdate":{"type":"object","properties":{"personal_phone":{"type":"string","maxLength":20,"pattern":"^\\+?[0-9 ()\\-]{7,20}$"},"alt_phone":{"type":"string","maxLength":20},"emergency_contact_phone":{"type":"string","maxLength":20},"emergency_contact_name":{"type":"string","maxLength":150},"personal_email":{"type":"string","format":"email","maxLength":150},"home_address":{"type":"string","maxLength":1000},"work_location":{"type":"string","enum":["onsite","remote","hybrid"]},"department_id":{"type":"integer"},"job_title_id":{"type":"integer"},"line_manager_id":{"type":"integer"}}},"LeaveRequest":{"type":"object","required":["employee_id","leave_type_id","start_date","end_date"],"properties":{"employee_id":{"type":"string","description":"Employee id or staff number"},"leave_type_id":{"type":"integer"},"start_date":{"type":"string","format":"date"},"end_date":{"type":"string","format":"date"},"reason":{"type":"string","maxLength":2000},"status":{"type":"string","enum":["pending","approved"],"description":"pending (default) goes through the approval chain; approved records leave already approved elsewhere"},"approval_reason":{"type":"string","maxLength":500,"description":"Required with status=approved; the API key is recorded as the approver"}}},"Clock":{"type":"object","required":["employee_id"],"properties":{"employee_id":{"type":"string","description":"Employee id or staff number"},"time":{"type":"string","format":"date-time"}}},"Webhook":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"},"description":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["employee.created","employee.updated","employee.exited","leave.requested","leave.approved","leave.declined","leave.cancelled","attendance.clock_in","attendance.clock_out","payroll.approved","payroll.released","document.signed"]}}}},"ScimUser":{"type":"object","required":["userName","name"],"properties":{"userName":{"type":"string","format":"email"},"externalId":{"type":"string"},"active":{"type":"boolean"},"title":{"type":"string"},"name":{"type":"object","properties":{"givenName":{"type":"string"},"familyName":{"type":"string"}}},"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User":{"type":"object","properties":{"department":{"type":"string"},"employeeNumber":{"type":"string"}}}}}}},"paths":{"/v1/me":{"get":{"summary":"The key and company in use","tags":["HR"],"security":[{"bearer":[]}],"x-scope":"","responses":{"200":{"description":"OK"},"401":{"description":"Missing, wrong or revoked key (with WWW-Authenticate: Bearer)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the permission, or the plan has no API access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed (see the Allow header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Some input is not valid (see error.fields)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (see the Retry-After header, in seconds)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Our fault: quote error.reference to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/employees":{"get":{"summary":"List employees","tags":["HR"],"security":[{"bearer":[]}],"x-scope":"employees:read","responses":{"200":{"description":"OK"},"401":{"description":"Missing, wrong or revoked key (with WWW-Authenticate: Bearer)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the permission, or the plan has no API access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed (see the Allow header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Some input is not valid (see error.fields)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (see the Retry-After header, in seconds)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Our fault: quote error.reference to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"page","in":"query","required":false,"description":"Page number (from 1)","schema":{"type":"string"}},{"name":"per_page","in":"query","required":false,"description":"Items per page (max 200)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"Keyset paging in id order for syncing: send it empty to start, then meta.next_cursor until it is null","schema":{"type":"string"}},{"name":"updated_since","in":"query","required":false,"description":"Only records changed since this date or ISO 8601 date-time","schema":{"type":"string"}},{"name":"q","in":"query","required":false,"description":"Search name, email or staff number","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"active, probation, exiting, exited","schema":{"type":"string"}},{"name":"department_id","in":"query","required":false,"description":"Department id","schema":{"type":"string"}}]}},"/v1/employees/{id}":{"get":{"summary":"One employee","tags":["HR"],"security":[{"bearer":[]}],"x-scope":"employees:read","responses":{"200":{"description":"OK"},"401":{"description":"Missing, wrong or revoked key (with WWW-Authenticate: Bearer)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the permission, or the plan has no API access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed (see the Allow header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Some input is not valid (see error.fields)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (see the Retry-After header, in seconds)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Our fault: quote error.reference to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"description":"Employee id or staff number","schema":{"type":"string"}}]},"patch":{"summary":"Update an employee","tags":["HR"],"security":[{"bearer":[]}],"x-scope":"employees:write","responses":{"200":{"description":"OK"},"401":{"description":"Missing, wrong or revoked key (with WWW-Authenticate: Bearer)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the permission, or the plan has no API access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed (see the Allow header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Some input is not valid (see error.fields)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (see the Retry-After header, in seconds)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Our fault: quote error.reference to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (e.g. overlapping leave, a finalised attendance month, or the same Idempotency-Key still running)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"description":"Employee id or staff number","schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeUpdate"}}}}}},"/v1/departments":{"get":{"summary":"Departments","tags":["HR"],"security":[{"bearer":[]}],"x-scope":"employees:read","responses":{"200":{"description":"OK"},"401":{"description":"Missing, wrong or revoked key (with WWW-Authenticate: Bearer)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the permission, or the plan has no API access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed (see the Allow header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Some input is not valid (see error.fields)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (see the Retry-After header, in seconds)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Our fault: quote error.reference to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/job-titles":{"get":{"summary":"Job titles","tags":["HR"],"security":[{"bearer":[]}],"x-scope":"employees:read","responses":{"200":{"description":"OK"},"401":{"description":"Missing, wrong or revoked key (with WWW-Authenticate: Bearer)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the permission, or the plan has no API access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed (see the Allow header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Some input is not valid (see error.fields)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (see the Retry-After header, in seconds)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Our fault: quote error.reference to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/leave/types":{"get":{"summary":"Leave types","tags":["HR"],"security":[{"bearer":[]}],"x-scope":"leave:read","responses":{"200":{"description":"OK"},"401":{"description":"Missing, wrong or revoked key (with WWW-Authenticate: Bearer)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the permission, or the plan has no API access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed (see the Allow header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Some input is not valid (see error.fields)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (see the Retry-After header, in seconds)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Our fault: quote error.reference to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/leave/requests":{"get":{"summary":"Leave requests","tags":["HR"],"security":[{"bearer":[]}],"x-scope":"leave:read","responses":{"200":{"description":"OK"},"401":{"description":"Missing, wrong or revoked key (with WWW-Authenticate: Bearer)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the permission, or the plan has no API access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed (see the Allow header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Some input is not valid (see error.fields)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (see the Retry-After header, in seconds)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Our fault: quote error.reference to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"page","in":"query","required":false,"description":"Page number (from 1)","schema":{"type":"string"}},{"name":"per_page","in":"query","required":false,"description":"Items per page (max 200)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"Keyset paging in id order for syncing: send it empty to start, then meta.next_cursor until it is null","schema":{"type":"string"}},{"name":"updated_since","in":"query","required":false,"description":"Only records changed since this date or ISO 8601 date-time","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"pending, with_hr, approved, declined, cancelled","schema":{"type":"string"}},{"name":"from","in":"query","required":false,"description":"YYYY-MM-DD","schema":{"type":"string"}},{"name":"to","in":"query","required":false,"description":"YYYY-MM-DD","schema":{"type":"string"}},{"name":"employee_id","in":"query","required":false,"description":"Employee id or staff number","schema":{"type":"string"}}]},"post":{"summary":"Send a leave request (same rules and approval chain as the app)","tags":["HR"],"security":[{"bearer":[]}],"x-scope":"leave:write","responses":{"200":{"description":"OK"},"401":{"description":"Missing, wrong or revoked key (with WWW-Authenticate: Bearer)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the permission, or the plan has no API access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed (see the Allow header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Some input is not valid (see error.fields)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (see the Retry-After header, in seconds)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Our fault: quote error.reference to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (e.g. overlapping leave, a finalised attendance month, or the same Idempotency-Key still running)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaveRequest"}}}}}},"/v1/leave/balances":{"get":{"summary":"Leave balances","tags":["HR"],"security":[{"bearer":[]}],"x-scope":"leave:read","responses":{"200":{"description":"OK"},"401":{"description":"Missing, wrong or revoked key (with WWW-Authenticate: Bearer)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the permission, or the plan has no API access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed (see the Allow header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Some input is not valid (see error.fields)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (see the Retry-After header, in seconds)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Our fault: quote error.reference to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"employee_id","in":"query","required":false,"description":"Employee id or staff number","schema":{"type":"string"}},{"name":"year","in":"query","required":false,"description":"Year","schema":{"type":"string"}}]}},"/v1/attendance":{"get":{"summary":"Attendance records","tags":["HR"],"security":[{"bearer":[]}],"x-scope":"attendance:read","responses":{"200":{"description":"OK"},"401":{"description":"Missing, wrong or revoked key (with WWW-Authenticate: Bearer)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the permission, or the plan has no API access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed (see the Allow header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Some input is not valid (see error.fields)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (see the Retry-After header, in seconds)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Our fault: quote error.reference to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"page","in":"query","required":false,"description":"Page number (from 1)","schema":{"type":"string"}},{"name":"per_page","in":"query","required":false,"description":"Items per page (max 200)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"Keyset paging in id order for syncing: send it empty to start, then meta.next_cursor until it is null","schema":{"type":"string"}},{"name":"updated_since","in":"query","required":false,"description":"Only records changed since this date or ISO 8601 date-time","schema":{"type":"string"}},{"name":"date","in":"query","required":false,"description":"YYYY-MM-DD","schema":{"type":"string"}},{"name":"from","in":"query","required":false,"description":"YYYY-MM-DD","schema":{"type":"string"}},{"name":"to","in":"query","required":false,"description":"YYYY-MM-DD","schema":{"type":"string"}},{"name":"employee_id","in":"query","required":false,"description":"Employee id or staff number","schema":{"type":"string"}}]}},"/v1/attendance/clock-in":{"post":{"summary":"Clock in (time clocks, fingerprint terminals)","tags":["HR"],"security":[{"bearer":[]}],"x-scope":"attendance:write","responses":{"200":{"description":"OK"},"401":{"description":"Missing, wrong or revoked key (with WWW-Authenticate: Bearer)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the permission, or the plan has no API access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed (see the Allow header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Some input is not valid (see error.fields)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (see the Retry-After header, in seconds)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Our fault: quote error.reference to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (e.g. overlapping leave, a finalised attendance month, or the same Idempotency-Key still running)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Clock"}}}}}},"/v1/attendance/clock-out":{"post":{"summary":"Clock out","tags":["HR"],"security":[{"bearer":[]}],"x-scope":"attendance:write","responses":{"200":{"description":"OK"},"401":{"description":"Missing, wrong or revoked key (with WWW-Authenticate: Bearer)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the permission, or the plan has no API access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed (see the Allow header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Some input is not valid (see error.fields)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (see the Retry-After header, in seconds)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Our fault: quote error.reference to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (e.g. overlapping leave, a finalised attendance month, or the same Idempotency-Key still running)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Clock"}}}}}},"/v1/payroll/runs":{"get":{"summary":"Payroll runs","tags":["HR"],"security":[{"bearer":[]}],"x-scope":"payroll:read","responses":{"200":{"description":"OK"},"401":{"description":"Missing, wrong or revoked key (with WWW-Authenticate: Bearer)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the permission, or the plan has no API access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed (see the Allow header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Some input is not valid (see error.fields)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (see the Retry-After header, in seconds)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Our fault: quote error.reference to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"page","in":"query","required":false,"description":"Page number (from 1)","schema":{"type":"string"}},{"name":"per_page","in":"query","required":false,"description":"Items per page (max 200)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"Keyset paging in id order for syncing: send it empty to start, then meta.next_cursor until it is null","schema":{"type":"string"}}]}},"/v1/payroll/runs/{id}/records":{"get":{"summary":"Payslips in a run","tags":["HR"],"security":[{"bearer":[]}],"x-scope":"payroll:read","responses":{"200":{"description":"OK"},"401":{"description":"Missing, wrong or revoked key (with WWW-Authenticate: Bearer)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the permission, or the plan has no API access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed (see the Allow header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Some input is not valid (see error.fields)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (see the Retry-After header, in seconds)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Our fault: quote error.reference to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"description":"Run id","schema":{"type":"string"}}]}},"/v1/webhooks":{"get":{"summary":"Your webhooks","tags":["HR"],"security":[{"bearer":[]}],"x-scope":"webhooks:manage","responses":{"200":{"description":"OK"},"401":{"description":"Missing, wrong or revoked key (with WWW-Authenticate: Bearer)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the permission, or the plan has no API access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed (see the Allow header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Some input is not valid (see error.fields)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (see the Retry-After header, in seconds)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Our fault: quote error.reference to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Add a webhook (signed with HMAC-SHA256)","tags":["HR"],"security":[{"bearer":[]}],"x-scope":"webhooks:manage","responses":{"200":{"description":"OK"},"401":{"description":"Missing, wrong or revoked key (with WWW-Authenticate: Bearer)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the permission, or the plan has no API access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed (see the Allow header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Some input is not valid (see error.fields)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (see the Retry-After header, in seconds)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Our fault: quote error.reference to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (e.g. overlapping leave, a finalised attendance month, or the same Idempotency-Key still running)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}}}},"/v1/webhooks/{id}":{"delete":{"summary":"Remove a webhook","tags":["HR"],"security":[{"bearer":[]}],"x-scope":"webhooks:manage","responses":{"200":{"description":"OK"},"401":{"description":"Missing, wrong or revoked key (with WWW-Authenticate: Bearer)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the permission, or the plan has no API access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed (see the Allow header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Some input is not valid (see error.fields)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (see the Retry-After header, in seconds)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Our fault: quote error.reference to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"description":"Webhook id","schema":{"type":"string"}}]}},"/v1/scim/v2/Users":{"get":{"summary":"SCIM: list users (filter userName eq \"…\")","tags":["SCIM"],"security":[{"bearer":[]}],"x-scope":"scim","responses":{"200":{"description":"OK"},"401":{"description":"Missing, wrong or revoked key (with WWW-Authenticate: Bearer)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the permission, or the plan has no API access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed (see the Allow header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Some input is not valid (see error.fields)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (see the Retry-After header, in seconds)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Our fault: quote error.reference to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"filter","in":"query","required":false,"description":"userName eq \"a@b.com\"","schema":{"type":"string"}},{"name":"startIndex","in":"query","required":false,"description":"From 1","schema":{"type":"string"}},{"name":"count","in":"query","required":false,"description":"Max 200","schema":{"type":"string"}}]},"post":{"summary":"SCIM: create user","tags":["SCIM"],"security":[{"bearer":[]}],"x-scope":"scim","responses":{"200":{"description":"OK"},"401":{"description":"Missing, wrong or revoked key (with WWW-Authenticate: Bearer)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the permission, or the plan has no API access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed (see the Allow header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Some input is not valid (see error.fields)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (see the Retry-After header, in seconds)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Our fault: quote error.reference to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimUser"}}}}}},"/v1/scim/v2/Users/{id}":{"get":{"summary":"SCIM: one user","tags":["SCIM"],"security":[{"bearer":[]}],"x-scope":"scim","responses":{"200":{"description":"OK"},"401":{"description":"Missing, wrong or revoked key (with WWW-Authenticate: Bearer)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the permission, or the plan has no API access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed (see the Allow header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Some input is not valid (see error.fields)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (see the Retry-After header, in seconds)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Our fault: quote error.reference to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"description":"User id","schema":{"type":"string"}}]},"put":{"summary":"SCIM: replace user","tags":["SCIM"],"security":[{"bearer":[]}],"x-scope":"scim","responses":{"200":{"description":"OK"},"401":{"description":"Missing, wrong or revoked key (with WWW-Authenticate: Bearer)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the permission, or the plan has no API access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed (see the Allow header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Some input is not valid (see error.fields)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (see the Retry-After header, in seconds)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Our fault: quote error.reference to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"description":"User id","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimUser"}}}}},"patch":{"summary":"SCIM: update (e.g. active=false)","tags":["SCIM"],"security":[{"bearer":[]}],"x-scope":"scim","responses":{"200":{"description":"OK"},"401":{"description":"Missing, wrong or revoked key (with WWW-Authenticate: Bearer)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the permission, or the plan has no API access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed (see the Allow header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Some input is not valid (see error.fields)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (see the Retry-After header, in seconds)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Our fault: quote error.reference to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"description":"User id","schema":{"type":"string"}}]},"delete":{"summary":"SCIM: deactivate","tags":["SCIM"],"security":[{"bearer":[]}],"x-scope":"scim","responses":{"200":{"description":"OK"},"401":{"description":"Missing, wrong or revoked key (with WWW-Authenticate: Bearer)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the permission, or the plan has no API access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed (see the Allow header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Some input is not valid (see error.fields)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (see the Retry-After header, in seconds)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Our fault: quote error.reference to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"description":"User id","schema":{"type":"string"}}]}}}}