{"info":{"title":"HoorayHR - API Documentation","version":"4.55.3","contact":{"name":"HoorayHR Support","email":"support@hoorayhr.io","url":"https://hoorayhr.io"},"description":"This is the documentation for the HoorayHR API, which can be used by partners and admins to interact with the system.\n\n### Authentication\nHoorayHR supports two authentication methods: **OAuth** and **Personal API Keys**.\n\n#### Personal API Keys for admins\nIntended for internal use within a company a personal API key will allow you to interact with the system as the user who created the key.\n\n##### Pre-requisites\n- Requires the user to have the `admin` role within the company\n\n##### Step 1. Obtaining a personal API key\n\n1. Navigate to the [API Keys](https://app.hoorayhr.io/settings/api-keys) page\n   - If this page doesn't load for you, please ensure the pre-requisites are met.\n2. Obtain a personal API key by clicking the \"New API Key\" button and filling in the fields.\n   - `Name`: the name of the API key\n   - `Expiration date`: the date the API key will expire (recommended)\n   - `Scopes`: the scopes needed for the intent of the API key\n\n**Note:** After creating the API key, you cannot edit its scopes or expiration date. The key will be shown only once, please copy and __store it securely.__\n\n##### Step 2. Making requests with the personal API key\n\nUse the personal API key to make requests to the API by including it in the `Authorization` header as `Bearer <api_key>`\n   - The `api_key` is always prefixed with `pk_`\n\n#### OAuth for partners\nIntended for partners. OAuth allows partners to create applications that can access the HoorayHR API on behalf of users.\n\n##### Pre-requisites production\n- Requires OAuth client information (provided by HoorayHR)\n   - `client_id`: Your client ID\n   - `client_secret`: Your client secret\n   - `redirect_uri`: Your redirect URI\n\n##### Pre-requisites development\n- You can use a test OAuth client ID and secret for development purposes. Note: this client only works on the preview environment.\n  - `api url`: https://api.preview.hoorayhr.io\n  - `app url`: https://preview.hoorayhr.io\n   - `client_id`: `test_client`\n   - `client_secret`: `test_client`\n   - `redirect_uri`: Your redirect URI\n\n##### Step 1. Obtaining client ID and secret\n\nYou can obtain a client ID and secret by contacting us at [support@hoorayhr.io](mailto:support@hoorayhr.io) or by using the test client information provided above.\n\n##### Step 2. Retrieving the authorization code\n\nObtain an OAuth code by redirecting the user to the <span>front-end</span> `/oauth/authorize` endpoint (`https://app.hoorayhr.io/oauth/authorize`) with the following parameters:\n   - `response_type`: `code`\n   - `client_id`: Your client ID\n   - `redirect_uri`: Your redirect URI\n   - `scope`: The scopes you want to request as a space-separated list\n\n**Structure:**\n\n`https://app.hoorayhr.io/oauth/authorize?response_type=code&client_id=<CLIENT_ID>&redirect_uri=<REDIRECT_URI>&scope=<SCOPE>`\n\n**Example:**\n\n`https://app.hoorayhr.io/oauth/authorize?response_type=code&client_id=123123123123123123123123&redirect_uri=https:%2F%2Fexample.com&scope=profile_read%20profile_write`\n\n##### Step 3. HoorayHR requests consent from the user\n\nA prompt will appear to the user asking for permission to access the requested scopes. The user can either accept or deny the request. After the user has made a choice, they will be redirected back to your redirect URI with a code in the query string.\n\n##### Step 4. Exchanging the authorization code for an access token\n\nObtain an access token by sending a POST request to the `/oauth/token` endpoint (`https://api.hoorayhr.io/oauth/token`) with the following parameters:\n   - `grant_type`: `authorization_code`\n   - `code`: The code you obtained (in step 3)\n   - `client_id`: Your client ID\n   - `client_secret`: Your client secret\n   - `redirect_uri`: Your redirect URI (must match the one used in step 2)\n\n**Structure:**\n\n`https://api.hoorayhr.io/oauth/token/?grant_type=authorization_code&code=<AUTHORIZATION_CODE>&client_id=<CLIENT_ID>&client_secret=<CLIENT_SECRET>&redirect_uri=<REDIRECT_URI>`\n\n##### Step 5. Making requests with the access token\nUse the `access_token` (from step 4) to make requests to the API by including it in the `Authorization` header as `Bearer <access_token>`\n\n### Filtering\n\nThe following options are available on all* endpoints for filtering:\n\n- $in\n- $gt (greater than)\n- $gte (greater than or equal to)\n- $lt (less than)\n- $lte (less than or equal to)\n\nTo use the $gt, $gte, $lt or $lte options, pass them in the query as following: `?start[$gte]=2023-01-01`. This example will only return items where the start date is greater than or equal to 2023-01-01. These options can also be used to filter numbers such as `?percentage[$lte]=60`. It is also possible to filter items using the ISO 8601 datetime format:\n`?createdAt[$gte]=2023-05-10T12:00:00Z&createdAt[$lte]=2023-05-10T15:00:00Z`\nPlease check that the dates that are sent are valid dates. For example when sending 2023-02-29, the result will be empty.\n\nThe $in operator is used to specify multiple values in the where clause, like: `?id[$in]=52&id[$in]=54`.\n\n\n* The `users` endpoints only support filtering with `$in` on the `id` field.\n\n### Inactive companies\n\nWhen a company is inactive, all endpoints will return a 403 Forbidden error.\n The response body always contains the following JSON (alongside other properties):\n\n```json\n{\n  \"code\": 403,\n  \"data\": {\n    \"errorCode\": \"INACTIVE_COMPANY\"\n  }\n}\n```\n### Companies with overdue payments\n\nWhen a company's payment is overdue, all endpoints will return a 403 Forbidden error.\n The response body always contains the following JSON (alongside other properties):\n\n```json\n{\n  \"code\": 403,\n  \"data\": {\n    \"errorCode\": \"PAYMENT_OVERDUE\"\n  }\n}\n```"},"servers":[{"url":"https://api.hoorayhr.io","description":"HoorayHR API server"},{"url":"https://api.preview.hoorayhr.io","description":"HoorayHR API preview server"}],"components":{"securitySchemes":{"jwt_token":{"description":"JWT token used for authentication of internal request. Provide a valid JWT.","type":"apiKey","name":"authorization","in":"header"},"access_token":{"description":"Access token used for external request. \n \n <b>Note:</b> when using OAuth or Personal API Keys, the token should be prefixed with `Bearer`. \n \n e.g. `Bearer <access_token>`","type":"apiKey","name":"authorization","in":"header"}},"schemas":{"labels":{"type":"object","required":["name","type"],"properties":{"id":{"type":"integer","description":"ID of the label","example":5,"readOnly":true},"documentCategoryId":{"type":"integer","description":"ID of the parent document category","nullable":true},"workflowCategoryId":{"type":"integer","description":"ID of the parent workflow category","nullable":true},"name":{"description":"Either an object containing the translated name per locale or a simple string with name of the label.\n\n**DEPRECATION NOTICE**: The object variant (containing the translated name per locale) for labels is deprecated and will be removed in the future.\nUse the simple string variant instead. Switching to the new string variant can be done by providing `useTranslatedLabels=true` as query parameter.","oneOf":[{"type":"string","description":"Only for requests providing `useTranslatedLabels=true` as query parameter","example":"Long term leave"},{"type":"object","description":"Only for requests that do not provide `useTranslatedLabels=true` as query parameter","example":{"en":"Wedding","nl":"Bruiloft","de":"Hochzeit"}}]},"type":{"type":"string","description":"Enum of the service the label is assigned to","enum":["ASSETS","CONTRACTS","DOCUMENTS","EXPENSE_CLAIMS","HOURS","LEAVE","SICK_LEAVE_PHASE","TIME_TRACKING","TRAVEL_EXPENSES","WORKFLOWS"],"example":"LEAVE"},"systemCategoryType":{"type":"string","description":"System pre-defined labels get type","enum":["car","computer","key","tablet","cell phone","license","fixed-term","internship","permanent","parking costs","food and drinks","promotional gift","office supplies","cost of studies","travel expenses","commuting","customer visit","conference"],"example":"car","nullable":true,"readOnly":true},"archivedAt":{"type":"string","format":"date-time","description":"Timestamp of label being archived","example":null,"nullable":true},"createdAt":{"type":"string","format":"date-time","description":"Creation date of the label","example":"2022-02-23T14:01:17.516Z","readOnly":true},"updatedAt":{"type":"string","format":"date-time","description":"Last updated date of the label","example":"2022-02-23T14:01:17.516Z","readOnly":true},"deletedAt":{"type":"string","format":"date-time","description":"Deleted date of the label","example":null,"nullable":true,"readOnly":true}}},"labelsList":{"title":"labels list","type":"array","items":{"$ref":"#/components/schemas/labels"}},"labelWithStringName":{"type":"object","required":["name","type"],"properties":{"id":{"type":"integer","description":"ID of the label","example":5,"readOnly":true},"documentCategoryId":{"type":"integer","description":"ID of the parent document category","nullable":true},"workflowCategoryId":{"type":"integer","description":"ID of the parent workflow category","nullable":true},"name":{"type":"string","description":"The name of the label","example":"Project epsilon"},"type":{"type":"string","description":"Enum of the service the label is assigned to","enum":["ASSETS","CONTRACTS","DOCUMENTS","EXPENSE_CLAIMS","HOURS","LEAVE","SICK_LEAVE_PHASE","PARTNER_COMPANY","TIME_TRACKING","TRAVEL_EXPENSES","WORKFLOWS"],"example":"TIME_TRACKING"},"systemCategoryType":{"type":"string","description":"System pre-defined labels get type","enum":["car","computer","key","tablet","cell phone","license","fixed-term","internship","permanent","parking costs","food and drinks","promotional gift","office supplies","cost of studies","travel expenses","commuting","customer visit","conference"],"example":"car","nullable":true,"readOnly":true},"archivedAt":{"type":"string","format":"date-time","description":"Timestamp of label being archived","example":null,"nullable":true},"createdAt":{"type":"string","format":"date-time","description":"Creation date of the label","example":"2022-02-23T14:01:17.516Z","readOnly":true},"updatedAt":{"type":"string","format":"date-time","description":"Last updated date of the label","example":"2022-02-23T14:01:17.516Z","readOnly":true},"deletedAt":{"type":"string","format":"date-time","description":"Deleted date of the label","example":null,"nullable":true,"readOnly":true}}},"availability_response":{"type":"object","required":["userId","start","schedule","workweek"],"properties":{"id":{"type":"integer","description":"ID of the item","example":5,"readOnly":true},"userId":{"type":"integer","description":"Unique id of the user.","example":1},"start":{"type":"string","format":"date","description":"Start of the work schedule","example":"2022-02-15"},"end":{"type":"string","format":"date","description":"End of the work schedule","example":"2022-02-16"},"schedule":{"type":"object","description":"The actual work schedule, showing you how long someone works in a day","allOf":[{"$ref":"#/components/schemas/schedule"}]},"workweek":{"type":"integer","description":"The amount of minutes in `schedule`. If the odd and even weeks are different, it is the average of both","example":2400},"calendarSchedule":{"type":"object","description":"The schedule used to tell what an actual calendar day looks like, which is used, among other things, to determine how much leave budget should be calculated for a day of leave","nullable":true,"allOf":[{"$ref":"#/components/schemas/schedule"}]},"calendarScheduleWorkweek":{"type":"integer","description":"The amount of minutes in `calendarSchedule`. If the odd and even weeks are different, it is the average of both","nullable":true,"example":2400},"createdAt":{"type":"string","format":"date-time","description":"Creation date of the availability item","example":"2022-02-15T14:01:17.516Z","readOnly":true},"updatedAt":{"type":"string","format":"date-time","description":"Last updated date of the availability item","example":"2022-02-23T14:01:17.516Z","readOnly":true}}},"schedule":{"required":["even","odd"],"properties":{"even":{"description":"Array containing the working minutes per day for even weeks","type":"array","items":{"type":"integer"},"minItems":7,"maxItems":7,"example":[480,480,480,480,480,0,0]},"odd":{"description":"Array containing the working minutes per day for odd weeks","oneOf":[{"type":"array","items":{"type":"integer"},"minItems":7,"maxItems":7,"example":[480,480,480,480,480,0,0]},{"description":"Supply `false` if the schedule for odd weeks should match that of the even weeks.","type":"boolean","example":false}]}}},"contracts":{"type":"object","properties":{"id":{"type":"integer","description":"ID of the contract","example":5,"readOnly":true},"userId":{"type":"integer","description":"Unique id of the user.","example":1},"userIdApproved":{"type":"integer","description":"Unique id of the user that added the contract","example":52,"nullable":true},"contractStartDate":{"type":"string","format":"date","description":"Start date of the contract in ISO Date format","example":"2022-02-15"},"contractEndDate":{"type":"string","format":"date","description":"End date of the contract in ISO Date format","example":"2022-02-15","nullable":true},"probationEndDate":{"type":"string","format":"date-time","description":"End date of the probation period of the contract","example":"2022-02-15 00:00:00","nullable":true},"signedContract":{"type":"integer","minimum":0,"maximum":1,"description":"Tiny-int indicating if the contract has been signed.","example":1,"nullable":true},"notes":{"type":"string","format":"long-text","description":"Optional text field for remarks about the contract","example":"Important transfer cases","nullable":true},"labelIds":{"type":"array","description":"List of id's belonging to labels","example":[],"writeOnly":true,"items":{"type":"integer","description":"ID of the label","example":1}},"labels":{"type":"array","description":"**DEPRECATION NOTICE**: The object variant (containing the translated name per locale) for labels is deprecated and will be removed in the future.\nUse the simple string variant instead. Switching to the new string variant can be done by providing `useTranslatedLabels=true` as query parameter.","items":{"$ref":"#/components/schemas/labels"},"readOnly":true},"status":{"type":"string","description":"Status of the contract","enum":["ACTIVE","FUTURE","INACTIVE"],"example":"ACTIVE"},"type":{"type":"integer","minimum":1,"maximum":3,"description":"The type of contract. 1 = fixed-term, 2 = permanent, 3 = internship","example":2,"readOnly":true,"deprecated":true},"createdAt":{"type":"string","format":"date-time","description":"Creation date of the contract","example":"2022-02-15T14:01:17.516Z","readOnly":true},"updatedAt":{"type":"string","format":"date-time","description":"Last updated date of the contract","example":"2022-02-23T14:01:17.516Z","readOnly":true}}},"contractsList":{"title":"contracts list","type":"array","items":{"$ref":"#/components/schemas/contracts"}},"documentUpload":{"type":"object","properties":{"userId":{"type":"integer","description":"ID of the user this document belongs to. Null for company-wide documents.","example":42,"nullable":true},"categoryId":{"type":"integer","description":"ID of the document category","example":1},"fileName":{"type":"string","description":"The name of the document. Must be a valid filename with extension.\n\nSupported extensions: doc, docx, txt, rtf, xls, xlsx, jpg, jpeg, png, pdf","example":"contract-2024.pdf"},"displayName":{"type":"string","description":"Display name of the document shown to users. If not provided, the fileName will be used as the display name.","example":"Employment Contract 2024","nullable":true},"note":{"type":"string","description":"Optional note attached to the document","example":"Signed by both parties","nullable":true},"status":{"type":"string","enum":["INTERNAL","PUBLISHED"],"description":"Status of the document. INTERNAL = \"Not yet visible to the user\", PUBLISHED = \"Visible to the user\"","example":"PUBLISHED"},"fileData":{"type":"string","description":"The file to upload (in base64 format)","example":"data:application/pdf;base64,JVBERi0...=="},"labelId":{"type":"number","nullable":true,"description":"ID of the label to attach to the document. Omit or provide `null` to not attach a label.","example":1},"expirationDate":{"type":"string","format":"date","description":"Expiration date of the document","example":"2025-12-31","nullable":true},"reminder":{"type":"object","description":"Reminder settings for the document based on the expiration date","optional":true,"nullable":true,"properties":{"days_0":{"type":"boolean","description":"Send reminder 0 days before expiration","example":false},"days_7":{"type":"boolean","description":"Send reminder 7 days before expiration","example":false},"days_14":{"type":"boolean","description":"Send reminder 14 days before expiration","example":false},"days_21":{"type":"boolean","description":"Send reminder 21 days before expiration","example":false},"month_1":{"type":"boolean","description":"Send reminder 1 month before expiration","example":false},"month_2":{"type":"boolean","description":"Send reminder 2 months before expiration","example":false},"month_3":{"type":"boolean","description":"Send reminder 3 months before expiration","example":false},"month_4":{"type":"boolean","description":"Send reminder 4 months before expiration","example":false}}}}},"document-categories":{"type":"object","properties":{"id":{"type":"integer","description":"ID of the document category","example":1,"readOnly":true},"name":{"type":"string","description":"Name of the category","example":"Contracts"},"color":{"type":"string","enum":["BLUE","CYAN","GREEN","ORANGE","YELLOW","RED"],"description":"Display color of the category","example":"CYAN"},"icon":{"type":"string","description":"Icon identifier","example":"company"},"type":{"type":"string","enum":["COMPANY","PERSONAL"],"description":"Category type. COMPANY categories hold shared documents (optionally scoped to teams). PERSONAL categories hold per-user documents.","example":"PERSONAL"},"teams":{"type":"array","description":"Team IDs linked to this category. Only present on COMPANY categories. An empty array means the category is visible to the whole company.","example":[1,2],"items":{"type":"integer"},"readOnly":true},"createdAt":{"type":"string","format":"date-time","description":"Creation date","example":"2024-03-23T08:55:02.000Z","readOnly":true},"updatedAt":{"type":"string","format":"date-time","description":"Last updated date","example":"2024-03-23T08:55:02.000Z","readOnly":true}}},"document-categoriesList":{"title":"document-categories list","type":"array","items":{"$ref":"#/components/schemas/document-categories"}},"sick_leave_dossiers_response":{"type":"object","properties":{"id":{"type":"integer","description":"Unique id of the sick leave dossier","example":1},"userId":{"type":"integer","description":"Unique id of the user that the dossier is about","example":2},"timezone":{"type":"string","description":"The time zone of the sick leave dossier. This will automatically be set to the time zone of the provided user through the \"userId\" field. Use the [time-zones](#/time-zones/get_time_zones) endpoint to fetch all supported timezones.","example":"Europe/Amsterdam","maxLength":100,"readOnly":true},"createdAt":{"type":"string","format":"date-time","description":"The creation date of the dossier","example":"2022-02-15T14:01:17.516Z"},"updatedAt":{"type":"string","format":"date-time","description":"The date that the dossier or any of the phases was last updated","example":"2022-02-23T14:01:17.516Z"},"phases":{"type":"array","items":{"$ref":"#/components/schemas/sick_leave_phases_response"}}}},"dossier_sick_phase":{"type":"object","required":["percentage","startDate","status"],"properties":{"percentage":{"type":"number","minimum":1,"maximum":100,"description":"The percentage of hours worked during the period up to 2 decimals, which is used in the calculation of the hours"},"startDate":{"type":"string","format":"date-time","description":"The start date and time of the phase","example":"2025-02-01T15:00:00.000Z"},"startDateEndTime":{"type":"string","format":"date-time","description":"The so called end time of the phase's first day. It can be used to indicate being absent for a part of the day, if left empty the entire day will be used (based on \"startDate\")","example":"2025-02-01T17:00:00.000Z","nullable":true},"expectedReturn":{"type":"string","format":"date","description":"The expected return date, as ISO date format (YYYY-MM-DD)","example":"2025-02-05","nullable":true},"status":{"type":"string","enum":["REPORTED_SICK","REPORTED_RECOVERY","RECOVERED"],"description":"The type of phase","example":"REPORTED_SICK"},"notes":{"type":"string","format":"long-text","description":"A text field for storing things related to the phase","example":"I've gotten food poisoning while staying at a hotel in Tokyo for the conference. I've sent an email to my direct colleagues to hand over some important work.","nullable":true},"labelIds":{"type":"array","description":"List of id's belonging to labels","nullable":true,"items":{"type":"integer","example":5}}}},"dossier_recover_phase":{"type":"object","description":"A recover phase won't allow configuring \"percentage\" and \"expectedReturn\" like a sick phase would.","required":["startDate","status"],"properties":{"startDate":{"type":"string","format":"date-time","description":"The start date and time of the phase","example":"2025-02-20T09:00:00.000Z"},"startDateEndTime":{"type":"string","format":"date-time","description":"The so called end time of the phase's first day. It can be used to indicate being absent for a part of the day, if left empty the entire day will be used (based on \"startDate\")","example":"2025-02-20T12:00:00.000Z","nullable":true},"status":{"type":"string","enum":["REPORTED_SICK","REPORTED_RECOVERY","RECOVERED"],"description":"The type of phase","example":"RECOVERED"},"notes":{"type":"string","format":"long-text","description":"A text field for storing things related to the phase","example":"I'm working again, but only from home for now","nullable":true}}},"sick_leave_phases_response":{"type":"object","required":["sickLeaveDossierId","percentage","startDate","status"],"properties":{"id":{"type":"integer","description":"Unique id of the sick leave phase","example":1,"readOnly":true},"sickLeaveDossierId":{"type":"integer","description":"Unique id of the sick leave dossier","example":1},"userIdReported":{"type":"integer","description":"Unique id of the user who reported the REPORTED_SICK phase","example":5,"nullable":true,"readOnly":true},"userIdConfirmed":{"type":"integer","description":"Unique id of the user who confirmed the REPORTED_RECOVERY phase","example":5,"nullable":true,"readOnly":true},"percentage":{"type":"number","minimum":1,"maximum":100,"description":"The percentage of hours worked during the period up to 2 decimals, which is used in the calculation of the hours"},"expectedTotal":{"type":"number","description":"The amount of minutes the phase is expected to last based on the start date and expected return date","example":480,"nullable":true,"readOnly":true},"calculatedExpectedTotal":{"type":"number","description":"Equal to \"actualTotal\" when set, otherwise equal to \"expectedTotal\" when set on create. This value is updated every night as long as \"calculatedEndDate\" isn't set","example":960,"nullable":true,"readOnly":true},"actualTotal":{"type":"number","description":"The amount of minutes the phase lasts based on the start date and end date","example":960,"nullable":true,"readOnly":true},"startDate":{"type":"string","format":"date-time","description":"The start date and time of the phase","example":"2025-02-01T15:00:00.000Z"},"startDateEndTime":{"type":"string","format":"date-time","description":"The so called end time of the phase's first day. It can be used to indicate being absent for a part of the day, if left empty the entire day will be used (based on \"startDate\")","example":"2025-02-01T17:00:00.000Z","nullable":true},"expectedReturn":{"type":"string","format":"date","description":"The expected return date, as ISO date format (YYYY-MM-DD)","example":"2025-02-05","nullable":true},"calculatedExpectedReturn":{"type":"string","format":"date","description":"A date only version of \"calculatedEndDate\" when set, otherwise equal to \"expectedReturn\" when set on create. This value is updated to the current date every night as long as \"calculatedEndDate\" isn't set","example":"2025-02-20","nullable":true,"readOnly":true},"calculatedEndDate":{"type":"string","format":"date-time","description":"The end date and time of the phase","example":"2025-02-20T09:00:00.000Z","nullable":true,"readOnly":true},"calculatedEndDateEndTime":{"type":"string","format":"date-time","description":"The so called end time of the phase's end day. It can be used to indicate being absent for a part of the day, if left empty the \"calculatedEndDate\" should be seen as the end date of the phase","example":"2025-02-20T12:00:00.000Z","nullable":true,"readOnly":true},"status":{"type":"string","enum":["REPORTED_SICK","REPORTED_RECOVERY","RECOVERED"],"description":"The type of phase","example":"REPORTED_SICK"},"notes":{"type":"string","format":"long-text","description":"A text field for storing things related to the phase","example":"I've gotten food poisoning while staying at a hotel in Tokyo for the conference. I've sent an email to my direct colleagues to hand over some important work.","nullable":true},"createdAt":{"type":"string","format":"date-time","description":"The creation date of the phase","example":"2025-02-01T14:57:17.000Z","readOnly":true},"updatedAt":{"type":"string","format":"date-time","description":"The date that the phase was last updated","example":"2022-02-20T15:01:52.000Z","readOnly":true},"labels":{"type":"array","description":"**DEPRECATION NOTICE**: The object variant (containing the translated name per locale) for labels is deprecated and will be removed in the future.\nUse the simple string variant instead. Switching to the new string variant can be done by providing `useTranslatedLabels=true` as query parameter.","items":{"$ref":"#/components/schemas/labels"},"readOnly":true}}},"sick_phase":{"type":"object","required":["sickLeaveDossierId","percentage","startDate","status"],"properties":{"sickLeaveDossierId":{"type":"integer","description":"Unique id of the sick leave dossier","example":1},"percentage":{"type":"number","minimum":1,"maximum":100,"description":"The percentage of hours worked during the period up to 2 decimals, which is used in the calculation of the hours"},"startDate":{"type":"string","format":"date-time","description":"The start date and time of the phase","example":"2025-02-01T15:00:00.000Z"},"startDateEndTime":{"type":"string","format":"date-time","description":"The so called end time of the phase's first day. It can be used to indicate being absent for a part of the day, if left empty the entire day will be used (based on \"startDate\")","example":"2025-02-01T17:00:00.000Z","nullable":true},"expectedReturn":{"type":"string","format":"date","description":"The expected return date, as ISO date format (YYYY-MM-DD)","example":"2025-02-05","nullable":true},"status":{"type":"string","enum":["REPORTED_SICK","REPORTED_RECOVERY","RECOVERED"],"description":"The type of phase","example":"REPORTED_SICK"},"notes":{"type":"string","format":"long-text","description":"A text field for storing things related to the phase","example":"I've gotten food poisoning while staying at a hotel in Tokyo for the conference. I've sent an email to my direct colleagues to hand over some important work.","nullable":true},"labelIds":{"type":"array","description":"List of id's belonging to labels","nullable":true,"items":{"type":"integer","example":5}}}},"recover_phase":{"type":"object","description":"A recover phase won't allow configuring \"percentage\" and \"expectedReturn\" like a sick phase would.","required":["sickLeaveDossierId","startDate","status"],"properties":{"sickLeaveDossierId":{"type":"integer","description":"Unique id of the sick leave dossier","example":1},"startDate":{"type":"string","format":"date-time","description":"The start date and time of the phase","example":"2025-02-20T09:00:00.000Z"},"startDateEndTime":{"type":"string","format":"date-time","description":"The so called end time of the phase's first day. It can be used to indicate being absent for a part of the day, if left empty the entire day will be used (based on \"startDate\")","example":"2025-02-20T12:00:00.000Z","nullable":true},"status":{"type":"string","enum":["REPORTED_SICK","REPORTED_RECOVERY","RECOVERED"],"description":"The type of phase","example":"RECOVERED"},"notes":{"type":"string","format":"long-text","description":"A text field for storing things related to the phase","example":"I'm working again, but only from home for now","nullable":true}}},"time-off":{"type":"object","required":["userId","start","end","timeOffType","timezone"],"properties":{"id":{"type":"integer","description":"ID of the time-off item","example":5,"readOnly":true},"userId":{"type":"integer","description":"Unique id of the user.","example":1},"isPrivate":{"type":"integer","minimum":0,"maximum":1,"description":"Tiny-int indicating if the time-off item is private","example":0},"budgetCalculated":{"type":"integer","description":"The calculated time for a time-off item in hours","example":8,"readOnly":true},"budgetAdjustment":{"type":"integer","description":"When the time-off item is a mutation, this value indicates the amount of time that should be subtracted or added to the user's budget. Time in hours.","example":2,"readOnly":true},"budgetTotal":{"type":"integer","description":"The total time-off budget of a user in hours for this year","example":480,"readOnly":true},"isNotCalculated":{"type":"integer","minimum":0,"maximum":1,"description":"Tiny-int indicating if the time should be subtracted from the user's budget","example":0},"notes":{"type":"string","format":"long-text","description":"Optional text field for mentioning a reason for the time-off request","example":"I would like to attend the wedding of my sister","nullable":true},"start":{"type":"string","format":"date-time","description":"Start date and time of the time-off in JS DateTime format","example":"2022-02-15T14:01:17.516Z"},"end":{"type":"string","format":"date-time","description":"End date and time of the time-off in JS DateTime format","example":"2022-02-15T18:01:17.516Z"},"pause":{"type":"integer","description":"Applies to hours module only. Pause time in minutes","example":30,"nullable":true},"tags":{"type":"array","description":"Applies to hours module only. Stringified array of hour tags","example":[{"id":2,"name":"Hours","archived":null}],"nullable":true,"items":{"type":"object","properties":{"id":{"type":"integer","example":2},"name":{"type":"string","example":"Hours"},"archived":{"type":"boolean","nullable":true,"example":null}}}},"status":{"type":"integer","minimum":1,"maximum":4,"description":"Status of the time-off item. 1 = \"REQUESTED\", 2 = \"DENIED\", 3 = \"APPROVED\", 4 = \"WITHDRAWN\"","example":1},"leaveTypeId":{"type":"integer","description":"ID of the corresponding leave type. Can be `null` in case of holidays","nullable":true,"example":1},"leaveTypeRuleId":{"type":"integer","nullable":true,"description":"ID of the corresponding leave type rule. Can be `null` if item does not correspond to a specific rule.","example":2},"timeOffType":{"type":"string","enum":["HOLIDAY","LEAVE","OVERTIME_NONE","OVERTIME_PAYOUT","OVERTIME_TIME_OFF_IN_LIEU","TRANSACTION_SPENT","TRANSACTION_LEGACY","TRANSACTION_CORRECTION"],"description":"Enum describing the type of time off item.","example":"LEAVE"},"leaveUnit":{"type":"string","description":"The unit of the time off item","enum":["PARTIAL_DAY","FULL_DAY","HALF_DAY","MULTIPLE_DAYS"],"readOnly":true},"integrationCategoryId":{"type":"integer","description":"ID of the integration category associated with the time-off item.","example":null,"nullable":true},"holidayId":{"type":"integer","description":"If the time-off item was created from a holiday, this value indicates the id of the holiday","example":null,"nullable":true,"readOnly":true},"labelIds":{"type":"array","description":"List of id's belonging to labels","example":[1,2,3],"nullable":true,"writeOnly":true,"items":{"type":"integer","example":1}},"labels":{"type":"array","description":"**DEPRECATION NOTICE**: The object variant (containing the translated name per locale) for labels is deprecated and will be removed in the future.\nUse the simple string variant instead. Switching to the new string variant can be done by providing `useTranslatedLabels=true` as query parameter.","items":{"$ref":"#/components/schemas/labels"},"readOnly":true},"timezone":{"type":"string","description":"The time zone of the time-off item. This will automatically be set to the time zone of the provided user through the \"userId\" field. Use the [time-zones](#/time-zones/get_time_zones) endpoint to fetch all supported timezones.","example":"Europe/Amsterdam","maxLength":100,"readOnly":true},"createdAt":{"type":"string","format":"date-time","description":"Creation date of the time-off item","example":"2022-02-15T14:01:17.516Z","readOnly":true},"updatedAt":{"type":"string","format":"date-time","description":"Last updated date of the time-off item","example":"2022-02-23T14:01:17.516Z","readOnly":true},"userIdApproved":{"type":"integer","description":"Unique id of the user that approved the document. A document is marked as approved when the status is no longer \"INTERNAL\"","example":3,"nullable":true,"readOnly":true},"reply":{"type":"string","format":"long-text","description":"Optional text with reason for approval/denial of the time-off request","example":"Enjoy the wedding!","nullable":true}}},"time-offList":{"title":"time-off list","type":"array","items":{"$ref":"#/components/schemas/time-off"}},"leave-types":{"type":"object","required":["name","color","icon","budget","calculationMethod"],"properties":{"id":{"type":"integer","description":"ID of the leave type","example":5,"readOnly":true},"updatedBy":{"type":"integer","description":"ID user who updated item last","nullable":true,"readOnly":true},"name":{"type":"string","description":"Name of the leave type"},"color":{"type":"string","description":"Color of the leave type","enum":["DARK_BLUE","LIGHT_BLUE","GREEN","ORANGE","YELLOW","RED"]},"icon":{"type":"string","description":"Icon of the leave type","enum":["PALMTREE","LEAVE-GENERAL","BACKPACK","SUITCASE","CLOCK","PRAM","PLANE","CAR","BIKE","EDUCATION","CERTIFICATE","BOOK","MISC","REVIEW","AGREEMENT","ADDENDUM","MUTATION","USER","TEAM","PRESENT","FLAG","GOALS"]},"budget":{"type":"integer","description":"Default budget for the leave type","minimum":0},"default":{"type":"integer","description":"Tiny-int indicating whether the leave type should be assigned automatically to new users"},"calculationMethod":{"type":"string","enum":["WORK_SCHEDULE","INFINITE_BUDGET","OVERTIME","ONCE","TIME_OFF_IN_LIEU","RECURRING_FIXED_BUDGET"],"description":"Enum describing the way the budget should be calculated"},"periodOffset":{"type":"integer","minimum":0,"maximum":11,"description":"Amount of offset months the leave period should have. \"0\" starts with january. \"5\" start with june. \"11\" starts with december."},"budgetReleaseRecurrence":{"type":"string","enum":["YEARLY","QUARTERLY","MONTHLY","WEEKLY"],"description":"The time between recurring budget releases"},"budgetReleaseTiming":{"type":"string","enum":["LEAVE_PERIOD_START","BUDGET_RELEASE_RECURRENCE_END"],"description":"The moment the budget should be released"},"accumulateBudgetWhenAbsent":{"type":"string","description":"Tiny-int indicating whether a correction should be applied when the user is on sick-leave. \"0\" a correction is applied. \"1\" a correction is NOT applied."},"overtimePercentage":{"type":"integer","minimum":0,"maximum":100,"description":"Percentage of overtime hours that should be provided as budget"},"autoApproveLimit":{"type":"integer","minimum":0,"description":"Maximum amount of minutes a leave request should have for automatic approval"},"invisibleInCalendar":{"type":"integer","description":"Tiny-int indicating if the items should be invisible/anonymized in the calendar"},"unpaidLeave":{"type":"integer","description":"Tiny-int indicating whether the time of leave should be marked as \"unpaid\""},"leaveInDays":{"type":"integer","description":"Tiny-int indicating if the budgets are defined in days instead of minutes"},"leaveTypeSystemCategory":{"type":"string","description":"Enum describing a pre-defined leave type","readOnly":true},"subtractHolidays":{"type":"integer","description":"Tiny-int indicating whether a correction for holidays should be applied"},"useLeaveBudgetOnHoliday":{"type":"integer","description":"Tiny-int indicating whether a leave items should ignore holidays and deduct from the budget"},"returnLeaveWhileSick":{"type":"integer","description":"Tiny-int indicating whether the hours you're sick during leave should be returned/compensated to your budget"},"sendExpirationNotifications":{"type":"integer","description":"Tiny-int indicating whether expiration notifications should be sent for this leave type"},"preventNegativeBudgetOnRequest":{"type":"integer","description":"Tiny-int indicating whether regular users can request leave that would result in a negative budget."},"isLegacy":{"type":"integer","description":"Tiny-int indicating whether the leave type is considered a legacy leave type","readOnly":true},"archivedAt":{"type":"string","format":"date-time","description":"Timestamp of leave type being archived","example":"2022-02-23T14:01:17.516Z","readOnly":true},"createdAt":{"type":"string","format":"date-time","description":"Creation date of the leave type","example":"2022-02-23T14:01:17.516Z","readOnly":true},"updatedAt":{"type":"string","format":"date-time","description":"Last updated date of the leave type","example":"2022-02-23T14:01:17.516Z","readOnly":true}}},"leave-typesList":{"title":"leave-types list","type":"array","items":{"$ref":"#/components/schemas/leave-types"}},"external-leave-types":{"type":"object","required":["name"],"properties":{"id":{"type":"integer","description":"ID of the external leave type","example":5,"readOnly":true},"name":{"type":"string","description":"Name of the external leave type, unique per company"},"color":{"type":"string","description":"Color of the external leave type","enum":["DARK_BLUE","LIGHT_BLUE","GREEN","ORANGE","YELLOW","RED"],"default":"DARK_BLUE"},"icon":{"type":"string","description":"Icon of the external leave type","enum":["PALMTREE","LEAVE-GENERAL","BACKPACK","SUITCASE","CLOCK","PRAM","PLANE","CAR","BIKE","EDUCATION","CERTIFICATE","BOOK","MISC","REVIEW","AGREEMENT","ADDENDUM","MUTATION","USER","TEAM","PRESENT","FLAG","GOALS"],"default":"LEAVE-GENERAL"},"leaveInDays":{"type":"integer","description":"Tiny-int indicating if the budgets are defined in days instead of minutes","default":0},"clientId":{"type":"string","description":"Client ID of OAuth client that created the external leave type","readOnly":true},"createdAt":{"type":"string","format":"date-time","description":"Creation date of the contract","example":"2022-02-15T14:01:17.516Z","readOnly":true},"updatedAt":{"type":"string","format":"date-time","description":"Last updated date of the contract","example":"2022-02-23T14:01:17.516Z","readOnly":true}}},"external-leave-typesList":{"title":"external-leave-types list","type":"array","items":{"$ref":"#/components/schemas/external-leave-types"}},"external-leave-budgets":{"type":"object","required":["externalLeaveTypeId","userId"],"properties":{"id":{"type":"integer","description":"ID of the external-leave-budget record","example":5,"readOnly":true},"externalLeaveTypeId":{"type":"integer","description":"ID of the external-leave-type","example":5},"userId":{"type":"integer","description":"Unique id of the user of the external-leave-budget record","example":2},"year":{"type":"integer","description":"Year of the external-leave-budget record","example":2024,"default":2026},"transferred":{"type":"number","description":"Budget transferred from the previous year (in minutes or days, depending on the leaveInDays value of the related external-leave-type)","example":120,"default":0},"received":{"type":"number","description":"Budget received this year (in minutes or days, depending on the leaveInDays value of the related external-leave-type)","example":12000,"default":0},"expired":{"type":"number","description":"Budget expired this year (in minutes or days, depending on the leaveInDays value of the related external-leave-type)","example":120,"default":0},"spent":{"type":"number","description":"Budget spent this year (in minutes or days, depending on the leaveInDays value of the related external-leave-type)","example":8000,"default":0},"available":{"type":"number","description":"Budget available this year (in minutes or days, depending on the leaveInDays value of the related external-leave-type)","example":4000,"default":0},"createdAt":{"type":"string","format":"date-time","description":"Creation date of the contract","example":"2022-02-15T14:01:17.516Z","readOnly":true},"updatedAt":{"type":"string","format":"date-time","description":"Last updated date of the contract","example":"2022-02-23T14:01:17.516Z","readOnly":true}}},"external-leave-budgetsList":{"title":"external-leave-budgets list","type":"array","items":{"$ref":"#/components/schemas/external-leave-budgets"}},"users":{"type":"object","required":["email"],"properties":{"id":{"type":"integer","description":"Unique id of the user.","example":1,"readOnly":true},"entityId":{"type":"integer","nullable":true,"description":"Unique id of the entity the user belongs to.","example":1},"isDemoData":{"type":"boolean","description":"Indicates if the user is demo data. Demo data can be optionally created during a company's trial period. After the trial period is over, demo data is removed.","example":false,"readOnly":true},"email":{"type":"string","description":"E-mail address of the user.","format":"email","maxLength":254,"example":"user@domain.nl"},"status":{"type":"integer","minimum":0,"maximum":3,"description":"Status of the user. Users added through the API always get status 'NOT INVITED'. Inviting users can be done by admin users in the application. 0 = NOT INVITED, 1 = INVITED, 2 = ACTIVATED, 3 = ARCHIVED.","example":2,"readOnly":true},"isAdmin":{"type":"integer","minimum":0,"maximum":1,"description":"Tiny-int indicating if the user has admin rights. 0 = NON-ADMIN, 1 = ADMIN.","example":0},"isHidden":{"type":"boolean","description":"Hidden users are not visible in the application to non-admins.","example":false},"timezone":{"type":"string","description":"Timezone of the user.","example":"Europe/Amsterdam"},"teams":{"type":"string","description":"Stringified array containing the team-ids the user is part of.","example":"[1, 2, 3]","nullable":true},"companyStartDate":{"type":"string","format":"date","description":"Start of employment date","example":"2021-01-30","nullable":true},"companyEndDate":{"type":"string","format":"date","description":"End of employment date","example":"2021-01-30","nullable":true},"seniorityDate":{"type":"string","format":"date","description":"Historical start date of employment","example":"2017-01-30","nullable":true},"initials":{"type":"string","description":"Initials of the user.","maxLength":15,"example":"John","nullable":true},"firstName":{"type":"string","description":"First name of the user.","maxLength":100,"example":"John","nullable":true},"insertion":{"type":"string","description":"Last name affix of the user.","maxLength":50,"example":"von","nullable":true},"lastName":{"type":"string","description":"Last name of the user.","maxLength":100,"example":"Doe","nullable":true},"insertionPartner":{"type":"string","description":"Last name affix of the user's partner.","maxLength":50,"example":"of","nullable":true},"lastNamePartner":{"type":"string","description":"Last name of the user's partner.","maxLength":100,"example":"Smith","nullable":true},"lastNameUsage":{"type":"string","enum":["OWN","PARTNER","OWN_PARTNER","PARTNER_OWN"],"description":"The way a user’s last name is displayed.","example":"PARTNER_OWN"},"nickName":{"type":"string","description":"Nickname of the user.","maxLength":100,"example":"Johny","nullable":true},"formattedLastName":{"type":"string","description":"Generated formatted last name combining own and partner sides based on lastNameUsage.","maxLength":350,"example":"de Vries - Boompjes","nullable":true,"readOnly":true},"displayName":{"type":"string","description":"Generated full display name of the user based on name fields and lastNameUsage.","maxLength":500,"example":"John Doe","nullable":true,"readOnly":true},"birthdate":{"type":"string","description":"Birthdate of the user.","format":"date","example":"2021-01-30","nullable":true},"birthPlace":{"type":"string","description":"Birth place of the user.","maxLength":150,"example":"Amsterdam","nullable":true},"birthCountry":{"type":"string","description":"Birth country of the user. A full list of country codes can be found [here](https://helpcenter.hoorayhr.io/nl/articles/8052332-api-list-of-country-codes).","maxLength":2,"example":"NL","nullable":true},"gender":{"type":"string","enum":["UNKNOWN","MALE","FEMALE","OTHER","NOT_SPECIFIED"],"description":"Gender of the user.","example":"FEMALE"},"nationality":{"type":"string","description":"Nationality of the user. A full list of nationality codes can be found [here](https://helpcenter.hoorayhr.io/nl/articles/8052325-api-list-of-nationality-codes).","maxLength":2,"example":"NL"},"civilStatus":{"type":"string","enum":["UNKNOWN","UNMARRIED","MARRIED","REGISTERED_PARTNERSHIP","PERMANENTLY_DIVORCED","WIDOWHOOD","COHABITING","DIVORCED","PARTNERSHIP_ENDED","ABANDONED_PARTNER"],"description":"Civil status of the user.","example":"UNMARRIED"},"jobTitle":{"type":"string","description":"Job title of the user.","maxLength":150,"example":"Developer","nullable":true},"biography":{"type":"string","description":"Biography of the user.","format":"long-text","example":"Hello! I am John Doe.","nullable":true},"phone":{"type":"string","description":"Phone number of the user.","maxLength":25,"example":"0655203256","nullable":true},"emailPrivate":{"type":"string","description":"Private e-mail address of the user.","format":"email","maxLength":254,"example":"user@domain.nl","nullable":true},"addressStreet":{"type":"string","description":"Address street of the user.","maxLength":150,"example":"John Doe Street","nullable":true},"addressNumber":{"type":"string","description":"Address number of the user.","maxLength":25,"example":"102","nullable":true},"addressAddition":{"type":"string","description":"Address addition of the user.","maxLength":50,"example":"BIS","nullable":true},"zipcode":{"type":"string","description":"Zipcode of the user.","maxLength":10,"example":"3411 XX","nullable":true},"city":{"type":"string","description":"City of the user.","maxLength":50,"example":"Amsterdam","nullable":true},"country":{"type":"string","description":"The current country of the user. A full list of country codes can be found [here](https://helpcenter.hoorayhr.io/nl/articles/8052332-api-list-of-country-codes).","maxLength":2,"example":"NL","nullable":true},"bankAccountNumber":{"type":"string","description":"Bank account number is only visible for the user and admins.","maxLength":50,"nullable":true},"bankAccountNumberOnBehalfOf":{"type":"string","description":"Bank account number on behalf of is only visible for the user and admins.","maxLength":150,"nullable":true},"citizenServiceNumber":{"type":"string","description":"Citizen service number is only visible for the user and admins.","maximum":50,"nullable":true},"employeeNumber":{"type":"string","description":"Employee number of the user.","maximum":50,"nullable":true},"emergencyName":{"type":"string","description":"Emergency contact name","maxLength":150,"example":"Darlene Doe","nullable":true},"emergencyRelation":{"type":"string","description":"Emergency contact relation","maxLength":150,"example":"Mother","nullable":true},"emergencyPersonalPhone":{"type":"string","description":"Emergency contact personal phone number","maxLength":50,"example":"0655203256","nullable":true},"emergencyWorkPhone":{"type":"string","description":"Emergency contact work phone number","maxLength":50,"example":"0655203256","nullable":true},"locale":{"type":"string","enum":["nl","en","de"],"description":"The user's language preference","example":"nl"},"invitedByUserId":{"type":"integer","description":"Unique user id of the inviter.","example":100,"readOnly":true},"invitedAt":{"type":"string","format":"date","example":"2021-01-30","readOnly":true},"inviteAcceptedAt":{"type":"string","format":"date","example":"2021-01-30","readOnly":true},"inviteRemindedAt":{"type":"string","format":"date","example":"2021-01-30","readOnly":true},"onBoardedAt":{"type":"string","format":"date","description":"Date the user completed the onboarding wizard after the first login.","example":"2021-01-30","readOnly":true},"currency":{"type":"string","description":"A [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) string indicating the user's currency. This is used as the default for things like expense claims and salaries. It'll be set based on the default currency of the company if it isn't set.","minLength":3,"maxLength":3,"example":"EUR"},"travelAllowanceCurrency":{"type":"string","description":"A [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) string indicating the user's currency. This is used specifically as the default for travel expenses. It'll be set based on the default travel allowance currency of the company if it isn't set.","minLength":3,"maxLength":3,"example":"EUR"},"travelAllowance":{"type":"number","format":"double","description":"The amount of travel allowance a user gets per kilometer by default for travel expenses. Will be set based on the default travel allowance of the company if it isn't set.","example":0.23},"createdAt":{"type":"string","format":"date-time","description":"Creation date of the user","example":"2022-02-15T14:01:17.516Z","readOnly":true},"updatedAt":{"type":"string","format":"date-time","description":"Last updated date of the user","example":"2022-02-23T14:01:17.516Z","readOnly":true},"extraFields":{"description":"A list of the company's extra fields and their values for this user.\n\n**NOTE**: This field is only returned when the `includeExtraFields` query parameter is set to `true` or `1`.","type":"array","readOnly":true,"items":{"type":"object","properties":{"fieldName":{"type":"string","description":"Name of the extra field.","example":"T-shirt size"},"value":{"description":"Value of the extra field for this user. The type of this is based type of extra field (string, number, array of strings)","example":"M","nullable":true,"oneOf":[{"type":"string","example":"XL"},{"type":"string","format":"date","example":"2025-05-08"},{"type":"number","example":36},{"type":"array","description":"Array of values if the extra field is a select or multi-select field.","items":{"type":"string","example":"L"}}]}}}}}},"usersList":{"title":"users list","type":"array","items":{"$ref":"#/components/schemas/users"}},"work-location-categories":{"type":"object","properties":{"id":{"type":"integer","description":"Unique id of the work location category","example":1,"readOnly":true},"name":{"type":"string","description":"Name of the work location category","example":"Home office"},"systemCategoryType":{"type":"string","description":"enum with valid system category types","enum":["home"],"nullable":true},"icon":{"type":"string","description":"enum with valid icons for use in HoorayHR","enum":["home","office","office1","office2","location-car","location"]},"archivedAt":{"type":"string","format":"date-time","description":"Date when the work location category was archived","example":"2022-02-23T14:00:15.000Z","nullable":true},"createdAt":{"type":"string","format":"date-time","description":"Creation date of the item","example":"2022-02-15T14:01:17.516Z","readOnly":true},"updatedAt":{"type":"string","format":"date-time","description":"Last updated date of the item","example":"2022-02-23T14:01:17.516Z","readOnly":true}}},"work-location-categoriesList":{"title":"work-location-categories list","type":"array","items":{"$ref":"#/components/schemas/work-location-categories"}},"working-today":{"type":"object","properties":{"userId":{"type":"integer","description":"ID of the user","example":1,"readOnly":true},"workLocationCategoryId":{"type":"integer","description":"ID of the work location category","example":1,"readOnly":true,"nullable":true},"isWorkingToday":{"type":"boolean","description":"Whether the user is working today","example":true,"readOnly":true}}},"working-todayList":{"title":"working-today list","type":"array","items":{"$ref":"#/components/schemas/working-today"}},"attendance-report":{"type":"object","properties":{"userId":{"type":"number","description":"The user's unique ID","example":1},"scheduledHours":{"type":"number","description":"Total hours to be worked according to work schedule","example":176},"leaveHours":{"type":"number","description":"Total of approved leave and holidays","example":16},"sickLeaveHours":{"type":"number","description":"Total sick leave time","example":4},"writtenHours":{"type":"number","description":"Total of approved time items (time-off) and time tracking entries","example":140},"balanceHours":{"type":"number","description":"Difference between scheduled hours and the actual hours. Negative amount means less hours worked than scheduled.","example":-16}}},"attendance-reportList":{"title":"attendance-report list","type":"array","items":{"$ref":"#/components/schemas/attendance-report"}},"employment-terms":{"type":"object","properties":{"id":{"type":"integer","description":"Unique id of the employment term","example":1,"readOnly":true},"title":{"type":"string","description":"Title of the employment term. For system terms, this cannot be changed by users","example":"Salary"},"type":{"type":"string","description":"Determines the type of the values for assignments for this employment term","enum":["TEXT","CURRENCY","NUMBER","BOOLEAN"],"example":"CURRENCY"},"frequency":{"type":"string","description":"Frequency of the employment term","enum":["CONTINUOUS","ONE_OFF"],"example":"CONTINUOUS"},"systemType":{"type":"string","description":"System type of the employment term.","enum":["SALARY","WORKING_HOURS","WAGE_TAX"],"example":"SALARY","nullable":true},"createdAt":{"type":"string","format":"date-time","description":"Creation date of the employment term","example":"2022-02-15T14:01:17.516Z","readOnly":true},"updatedAt":{"type":"string","format":"date-time","description":"Last updated date of the employment term","example":"2022-02-23T14:01:17.516Z","readOnly":true},"salarySubTypes":{"description":"A list of the salary sub types (only set for the employment term with system type \"SALARY\")","type":"array","readOnly":true,"optional":true,"items":{"type":"object","properties":{"id":{"type":"integer","description":"Unique id of the employment term salary sub type","example":1,"readOnly":true},"name":{"type":"string","description":"Name of the salary sub type. System types have the same name as the system type and cannot be changed by users","example":"Holiday allowance"},"systemType":{"type":"string","enum":["FULLTIME_GROSS","PARTTIME_GROSS","HOURLY_GROSS"],"description":"System type of the salary sub type. A company always has at least these system types: \"FULLTIME_GROSS\", \"PARTTIME_GROSS\", \"HOURLY_GROSS\"","nullable":true},"createdAt":{"type":"string","format":"date-time","description":"Creation date of the employment term salary sub type","example":"2022-02-15T14:01:17.516Z","readOnly":true},"updatedAt":{"type":"string","format":"date-time","description":"Last updated date of the employment term salary sub type","example":"2022-02-23T14:01:17.516Z","readOnly":true}}}}}},"employment-termsList":{"title":"employment-terms list","type":"array","items":{"$ref":"#/components/schemas/employment-terms"}},"employment-term-assignments":{"type":"object","properties":{"id":{"type":"integer","description":"Unique id of the employment term assignment","example":1,"readOnly":true},"userId":{"type":"integer","description":"The user the employment term is assigned to","example":14},"employmentTermId":{"type":"integer","description":"The ID of the employment term","example":16},"startDate":{"type":"string","format":"date","description":"The start date of the employment term assignment. Or the termination date, if `isTerminated` is set to `true`","example":"2025-09-20"},"currency":{"type":"string","description":"A [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) string indicating the currency of the employment term assignment. It's only required for employment terms of type 'CURRENCY'.","minLength":3,"maxLength":3,"example":"EUR","nullable":true},"value":{"description":"Value of the employment term assignment. Terminated assignments do not have a value","oneOf":[{"nullable":true,"description":"Only for employment terms of type: `TEXT`","type":"string","example":"XL"},{"nullable":true,"description":"Only for employment terms of type: `BOOLEAN`","type":"boolean","example":true},{"nullable":true,"description":"Only for employment terms of type: `NUMBER` or `CURRENCY`","type":"number","example":36}]},"isTerminated":{"type":"boolean","description":"Whether the employment term assignment is terminated","example":false},"status":{"type":"string","description":"Status of the employment term assignment. Assignments that start in the future have status `FUTURE`. All other assignments are `ACTIVE`, unless they either precede another assignment, or if the user's employment has finished, in which case they are `INACTIVE`.","enum":["INACTIVE","ACTIVE","FUTURE"],"example":"ACTIVE"},"salarySubTypeId":{"type":"integer","description":"The salary sub type ID the employment term assignment is linked to. Only applicable for assignments linked to the `SALARY` system employment term. See the `salarySubTypes` list on the salary employment term for a list of possible values","example":4,"nullable":true},"note":{"type":"string","description":"Optional note for the employment term assignment","example":null,"nullable":true},"createdAt":{"type":"string","format":"date-time","description":"Creation date of the employment term assignment","example":"2022-02-15T14:01:17.516Z","readOnly":true},"updatedAt":{"type":"string","format":"date-time","description":"Last updated date of the employment term assignment","example":"2022-02-23T14:01:17.516Z","readOnly":true}}},"employment-term-assignmentsList":{"title":"employment-term-assignments list","type":"array","items":{"$ref":"#/components/schemas/employment-term-assignments"}},"time-zones":{"type":"object","properties":{"value":{"type":"string","description":"An IANA timezone string","example":"Europe/Amsterdam","readOnly":true},"name":{"type":"string","description":"The name of the timezone","example":"Europe - Amsterdam"}}},"time-zonesList":{"title":"time-zones list","type":"array","items":{"$ref":"#/components/schemas/time-zones"}},"entities":{"type":"object","required":["id","name"],"properties":{"id":{"type":"integer","description":"ID of the entity","example":5,"readOnly":true},"name":{"type":"string","description":"Name of the entity","maxLength":255,"example":"Acme Group","readOnly":true},"createdAt":{"type":"string","format":"date-time","description":"Creation date of the entity","example":"2022-02-23T14:01:17.516Z","readOnly":true},"updatedAt":{"type":"string","format":"date-time","description":"Last updated date of the entity","example":"2022-02-23T14:01:17.516Z","readOnly":true}}},"entitiesList":{"title":"entities list","type":"array","items":{"$ref":"#/components/schemas/entities"}},"time_tracking_entry_response":{"type":"object","properties":{"id":{"type":"integer"},"userId":{"type":"integer"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"period":{"type":"string","enum":["DAY","WEEK"]},"status":{"type":"string","enum":["NOT_LOGGED","CONCEPT","REQUEST","APPROVED","DENIED"]},"activities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"timezone":{"type":"string","description":"The time zone of the activity. This will automatically be set to the time zone of the provided user through the \"userId\" field. Use the [time-zones](#/time-zones/get_time_zones) endpoint to fetch all supported timezones.","example":"Europe/Amsterdam","maxLength":100,"readOnly":true},"type":{"type":"string","enum":["WORK","BREAK"]},"notes":{"type":["string","null"],"example":"Optional notes for the activity"},"labels":{"type":"array","items":{"$ref":"#/components/schemas/labelWithStringName"},"readOnly":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","start","end","timezone","type","notes","labels","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","userId","startDate","endDate","period","status","activities","createdAt","updatedAt"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"time_tracking_entry_payload":{"anyOf":[{"type":"object","properties":{"userId":{"type":"integer"},"date":{"type":"string","format":"date"},"status":{"type":"string","enum":["NOT_LOGGED","CONCEPT","REQUEST","APPROVED","DENIED"]},"activities":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"timezone":{"type":"string","description":"The time zone of the activity. This will automatically be set to the time zone of the provided user through the \"userId\" field. Use the [time-zones](#/time-zones/get_time_zones) endpoint to fetch all supported timezones.","example":"Europe/Amsterdam","maxLength":100,"readOnly":true},"type":{"type":"string","const":"WORK"},"notes":{"type":["string","null"],"nullable":true,"example":"Optional notes for the activity"},"labelIds":{"type":"array","items":{"type":"integer","exclusiveMinimum":0}}},"required":["start","end","timezone","type"],"additionalProperties":false},{"type":"object","properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"timezone":{"type":"string","description":"The time zone of the activity. This will automatically be set to the time zone of the provided user through the \"userId\" field. Use the [time-zones](#/time-zones/get_time_zones) endpoint to fetch all supported timezones.","example":"Europe/Amsterdam","maxLength":100,"readOnly":true},"type":{"type":"string","const":"BREAK"}},"required":["start","end","timezone","type"],"additionalProperties":false}]},"minItems":1}},"required":["userId","date","status","activities"],"additionalProperties":false},{"type":"array","items":{"$ref":"#/anyOf/0"},"minItems":1,"maxItems":70}],"example":{"userId":1,"date":"2025-08-18","status":"CONCEPT","activities":[{"type":"WORK","start":"2025-08-18T07:00:00.000Z","end":"2025-08-18T09:00:00.000Z","timezone":"Europe/Amsterdam"},{"type":"BREAK","start":"2025-08-18T09:00:00.000Z","end":"2025-08-18T09:30:00.000Z","timezone":"Europe/Amsterdam"},{"type":"WORK","start":"2025-08-18T09:30:00.000Z","end":"2025-08-18T13:00:00.000Z","timezone":"Europe/Amsterdam"}]},"$schema":"http://json-schema.org/draft-07/schema#"},"public-holidays":{"type":"object","properties":{"id":{"type":"number","description":"The holiday unique ID","example":1},"name":{"type":"string","description":"The name of the holiday","example":"New Year"},"date":{"type":"string","format":"date","description":"The date of the holiday. Format: YYYY-MM-DD","example":"2025-01-01"},"subtractFromBudget":{"type":"boolean","description":"Whether the holiday is subtracted from the leave budget","example":false},"userIds":{"type":"array","items":{"type":"number"},"description":"Ids of the active users the holiday applies to","example":[1,2,3]}}},"public-holidaysList":{"title":"public-holidays list","type":"array","items":{"$ref":"#/components/schemas/public-holidays"}}}},"paths":{"/labels":{"get":{"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/labelsList"}}}},"401":{"description":"not authenticated"},"500":{"description":"general error"}},"description":"Retrieves a list of all resources from the service.","summary":"Find labels","tags":["labels"],"security":[{"access_token":[]}],"operationId":"findLabels"}},"/labels/{id}":{"get":{"parameters":[{"in":"path","name":"id","description":"ID of labels to return","schema":{"type":"integer"},"required":true}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/labels"}}}},"401":{"description":"not authenticated"},"404":{"description":"not found"},"500":{"description":"general error"}},"description":"Retrieves a single resource with the given id from the service.","summary":"Get label","tags":["labels"],"security":[{"access_token":[]}],"operationId":"getLabel"}},"/availability":{"get":{"responses":{"200":{"description":"List of availabilities","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/availability_response"}}}}},"401":{"description":"Not authenticated"},"500":{"description":"General error"}},"description":"Retrieves all availabilities.","summary":"Find availability","tags":["availability"],"security":[{"access_token":[]}],"operationId":"findAvailability"}},"/availability/{id}":{"get":{"parameters":[{"name":"id","in":"path","required":true,"description":"The id of the availability to retrieve","schema":{"type":"integer"}}],"responses":{"200":{"description":"A single availability","content":{"application/json":{"schema":{"$ref":"#/components/schemas/availability_response"}}}},"401":{"description":"Not authenticated"},"404":{"description":"Not found"},"500":{"description":"General error"}},"description":"Retrieves a single availability based on the given id.","summary":"Get availability","tags":["availability"],"security":[{"access_token":[]}],"operationId":"getAvailability"}},"/contracts":{"get":{"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/contractsList"}}}},"401":{"description":"not authenticated"},"500":{"description":"general error"}},"description":"Retrieves a list of all resources from the service.","summary":"Find contracts","tags":["contracts"],"security":[{"access_token":[]}],"operationId":"findContracts"}},"/contracts/{id}":{"get":{"parameters":[{"in":"path","name":"id","description":"ID of contracts to return","schema":{"type":"integer"},"required":true}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/contracts"}}}},"401":{"description":"not authenticated"},"404":{"description":"not found"},"500":{"description":"general error"}},"description":"Retrieves a single resource with the given id from the service.","summary":"Get contract","tags":["contracts"],"security":[{"access_token":[]}],"operationId":"getContract"}},"/documents":{"post":{"parameters":[],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"ID of the created document","example":1}}}}}}},"description":"Create a new document. See the schema for more information on the uploaded file requirements.","summary":"Create a document","tags":["documents"],"security":[{"access_token":[]}],"requestBody":{"required":true,"description":"This is an example body for creating a document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/documentUpload"}}}},"operationId":"createDocument"}},"/document-categories":{"get":{"parameters":[{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["COMPANY","PERSONAL"]},"description":"Filter by category type"}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/document-categoriesList"}}}},"401":{"description":"not authenticated"},"500":{"description":"general error"}},"description":"Retrieve all document categories.\n\nDocument categories are split into two types:\n\n**COMPANY**: Documents that are shared across the organization. By default they are visible to everyone in the company. They can optionally be linked to one or more teams via the `teams` array — when teams are set, only members and leads of those teams can see the category and its documents.\n\n**PERSONAL**: Documents that belong to individual users (contracts, payslips, etc.). The `teams` field is never present on personal categories.","summary":"Find document categories","tags":["document-categories"],"security":[{"access_token":[]}],"operationId":"findDocumentCategories"}},"/document-categories/{id}":{"get":{"parameters":[{"in":"path","name":"id","description":"ID of document-categories to return","schema":{"type":"integer"},"required":true}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/document-categories"}}}},"401":{"description":"not authenticated"},"404":{"description":"not found"},"500":{"description":"general error"}},"description":"Retrieve a single document category.\n\nDocument categories are split into two types:\n\n**COMPANY**: Documents that are shared across the organization. By default they are visible to everyone in the company. They can optionally be linked to one or more teams via the `teams` array — when teams are set, only members and leads of those teams can see the category and its documents.\n\n**PERSONAL**: Documents that belong to individual users (contracts, payslips, etc.). The `teams` field is never present on personal categories.","summary":"Get document category","tags":["document-categories"],"security":[{"access_token":[]}],"operationId":"getDocumentCategory"}},"/sick-leave-dossiers":{"get":{"responses":{"200":{"description":"List of sick leave dossiers","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/sick_leave_dossiers_response"}}}}},"401":{"description":"Not authenticated"},"500":{"description":"General error"}},"description":"Retrieves all sick leave dossiers.","summary":"Find sick leave dossiers","tags":["sick-leave-dossiers"],"security":[{"access_token":[]}],"operationId":"findSickLeaveDossiers"},"post":{"parameters":[],"responses":{"201":{"description":"The created sick leave dossier","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sick_leave_dossiers_response"}}}},"401":{"description":"Not authenticated"},"500":{"description":"General error"}},"description":"Creates a new sick leave dossier with 1 or 2 phases.","summary":"Create sick leave dossier","tags":["sick-leave-dossiers"],"security":[{"access_token":[]}],"requestBody":{"required":true,"description":"This is an example body for creating a dossier with both a sick phase and recover phase.","content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"integer","description":"Unique id of the user that the dossier is about","example":2},"phases":{"type":"array","description":"The phases of the sick leave dossier. The first phase has to be a REPORTED_SICK phase, while the optional second phase has to be a RECOVERED phase when present.","minItems":1,"maxItems":2,"items":{"anyOf":[{"$ref":"#/components/schemas/dossier_sick_phase"},{"$ref":"#/components/schemas/dossier_recover_phase"}]}}}}}}},"operationId":"createSickLeaveDossier"}},"/sick-leave-dossiers/{id}":{"get":{"parameters":[{"in":"path","name":"id","schema":{"type":"integer"},"required":true,"description":"The id of the dossier to retrieve."}],"responses":{"200":{"description":"A single sick leave dossier","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sick_leave_dossiers_response"}}}},"401":{"description":"Not authenticated"},"404":{"description":"Not found"},"500":{"description":"General error"}},"description":"Retrieves a single sick leave dossier based on the given id.","summary":"Get sick leave dossier","tags":["sick-leave-dossiers"],"security":[{"access_token":[]}],"operationId":"getSickLeaveDossier"},"delete":{"parameters":[{"in":"path","name":"id","schema":{"type":"integer"},"required":true,"description":"The id of the dossier to remove."}],"responses":{"200":{"description":"The deleted sick leave dossier","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sick_leave_dossiers_response"}}}},"401":{"description":"Not authenticated"},"404":{"description":"Not found"},"500":{"description":"General error"}},"description":"Removes a sick leave dossier based on the given id.","summary":"Remove sick leave dossier","tags":["sick-leave-dossiers"],"security":[{"access_token":[]}],"operationId":"removeSickLeaveDossier"}},"/sick-leave-phases":{"get":{"parameters":[],"responses":{"200":{"description":"List of sick leave phases","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/sick_leave_phases_response"}}}}},"401":{"description":"Not authenticated"},"500":{"description":"General error"}},"description":"Retrieves all sick leave phases.","summary":"Find sick leave phases","tags":["sick-leave-phases"],"security":[{"access_token":[]}],"operationId":"findSickLeavePhases"},"post":{"parameters":[],"responses":{"201":{"description":"The created sick leave phase","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sick_leave_phases_response"}}}},"401":{"description":"Not authenticated"},"500":{"description":"General error"}},"description":"Creates a new sick leave phase.","summary":"Create sick leave phase","tags":["sick-leave-phases"],"security":[{"access_token":[]}],"requestBody":{"required":true,"description":"This is an example body for creating a sick phase.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sick_phase"}}}},"operationId":"createSickLeavePhase"}},"/sick-leave-phases/{id}":{"get":{"parameters":[{"in":"path","name":"id","schema":{"type":"integer"},"required":true,"description":"The id of the phase to retrieve."}],"responses":{"200":{"description":"A single sick leave phase","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sick_leave_phases_response"}}}},"401":{"description":"Not authenticated"},"404":{"description":"Not found"},"500":{"description":"General error"}},"description":"Retrieves a single sick leave phase based on the given id.","summary":"Get sick leave phase","tags":["sick-leave-phases"],"security":[{"access_token":[]}],"operationId":"getSickLeavePhase"},"patch":{"parameters":[{"in":"path","name":"id","schema":{"type":"integer"},"required":true,"description":"The id of the phase to patch."}],"responses":{"201":{"description":"The patched sick leave phase","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sick_leave_phases_response"}}}},"401":{"description":"Not authenticated"},"404":{"description":"Not found"},"500":{"description":"General error"}},"description":"Patches an existing sick leave phase based on the given id.","summary":"Patch sick leave phase","tags":["sick-leave-phases"],"security":[{"access_token":[]}],"requestBody":{"required":true,"description":"This is an example body for patching a phase.","content":{"application/json":{"schema":{"type":"object","properties":{"startDate":{"type":"string","format":"date-time","description":"The start date and time of the phase","example":"2025-02-01T15:00:00.000Z"}}}}}},"operationId":"patchSickLeavePhase"},"delete":{"parameters":[{"in":"path","name":"id","schema":{"type":"integer"},"required":true,"description":"The id of the phase to remove."}],"responses":{"200":{"description":"The deleted sick leave phase","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sick_leave_phases_response"}}}},"401":{"description":"Not authenticated"},"404":{"description":"Not found"},"500":{"description":"General error"}},"description":"Removes a sick leave phase based on the given id.","summary":"Remove sick leave phase","tags":["sick-leave-phases"],"security":[{"access_token":[]}],"operationId":"removeSickLeavePhase"}},"/time-off":{"get":{"parameters":[{"name":"timeOffType","schema":{"type":"string","example":"LEAVE","enum":["HOLIDAY","LEAVE","OVERTIME_NONE","OVERTIME_PAYOUT","OVERTIME_TIME_OFF_IN_LIEU","TRANSACTION_SPENT","TRANSACTION_LEGACY","TRANSACTION_CORRECTION"]},"description":"Use the exact query from the example to fetch all leave items.","required":false,"in":"query"}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/time-offList"}}}},"401":{"description":"not authenticated"},"500":{"description":"general error"}},"description":"Retrieves a list of all resources from the service.","summary":"Find time off","tags":["time-off"],"security":[{"access_token":[]}],"operationId":"findTimeOff"},"post":{"parameters":[],"responses":{"201":{"description":"created","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/time-off"},{"$ref":"#/components/schemas/time-offList"}]}}}},"401":{"description":"not authenticated"},"500":{"description":"general error"}},"description":"Creates a new resource with data.","summary":"Create time off","tags":["time-off"],"security":[{"access_token":[]}],"requestBody":{"required":true,"description":"This is an example body for creating an overtime item, make sure you replace the userId and leaveTypeId before you click \"Execute\".","content":{"application/json":{"schema":{"type":"object","properties":{"notes":{"type":"string","nullable":true,"example":"Worked hours on 05-03"},"userId":{"type":"integer"},"leaveTypeId":{"type":"integer"},"timeOffType":{"type":"string","enum":["HOLIDAY","LEAVE","OVERTIME_NONE","OVERTIME_PAYOUT","OVERTIME_TIME_OFF_IN_LIEU","TRANSACTION_SPENT","TRANSACTION_LEGACY","TRANSACTION_CORRECTION"],"example":"OVERTIME_PAYOUT"},"start":{"type":"string","format":"date-time","example":"2023-05-03T07:00:00.000Z"},"end":{"type":"string","format":"date-time","example":"2023-05-03T14:59:59.999Z"},"status":{"type":"integer","example":3},"labelIds":{"type":"array","description":"List of id's belonging to labels","example":[],"items":{"type":"integer","example":1}}}}}}},"operationId":"createTimeOff"}},"/time-off/{id}":{"get":{"parameters":[{"in":"path","name":"id","schema":{"type":"integer","minimum":1},"required":true}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/time-off"}}}},"401":{"description":"not authenticated"},"404":{"description":"not found"},"500":{"description":"general error"}},"description":"Retrieves a single resource with the given id from the service.","summary":"Get time off","tags":["time-off"],"security":[{"access_token":[]}],"operationId":"getTimeOff"},"patch":{"parameters":[{"in":"path","name":"id","schema":{"type":"integer","minimum":1},"required":true}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/time-off"}}}},"401":{"description":"not authenticated"},"404":{"description":"not found"},"500":{"description":"general error"}},"description":"Updates the resource identified by id using data.","summary":"Patch time off","tags":["time-off"],"security":[{"access_token":[]}],"requestBody":{"required":true,"description":"This is an example body for patching an overtime item. You can edit it by adding other fields before you click \"Execute\".","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer","example":5}}}}}},"operationId":"patchTimeOff"}},"/leave-types":{"get":{"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/leave-typesList"}}}},"401":{"description":"not authenticated"},"500":{"description":"general error"}},"description":"Retrieves a list of all resources from the service.","summary":"Find leave types","tags":["leave-types"],"security":[{"access_token":[]}],"operationId":"findLeaveTypes"}},"/leave-types/{id}":{"get":{"parameters":[{"in":"path","name":"id","description":"ID of leave-types to return","schema":{"type":"integer"},"required":true}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/leave-types"}}}},"401":{"description":"not authenticated"},"404":{"description":"not found"},"500":{"description":"general error"}},"description":"Retrieves a single resource with the given id from the service.","summary":"Get leave type","tags":["leave-types"],"security":[{"access_token":[]}],"operationId":"getLeaveType"}},"/external-leave-types":{"get":{"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/external-leave-typesList"}}}},"401":{"description":"not authenticated"},"500":{"description":"general error"}},"description":"Retrieves a list of all resources from the service.","summary":"Find external leave types","tags":["external-leave-types"],"security":[{"access_token":[]}],"operationId":"findExternalLeaveTypes"},"post":{"parameters":[],"responses":{"201":{"description":"created","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/external-leave-types"},{"$ref":"#/components/schemas/external-leave-typesList"}]}}}},"401":{"description":"not authenticated"},"500":{"description":"general error"}},"description":"Creates a new resource with data.","summary":"Create external leave type","tags":["external-leave-types"],"security":[{"access_token":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/external-leave-types"},{"$ref":"#/components/schemas/external-leave-typesList"}]}}}},"operationId":"createExternalLeaveType"},"delete":{"parameters":[{"description":"Query parameters to filter","in":"query","name":"filter","style":"form","explode":true,"schema":{"$ref":"#/components/schemas/external-leave-types"}}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/external-leave-typesList"}}}},"401":{"description":"not authenticated"},"500":{"description":"general error"}},"description":"Removes multiple resources queried by given filters.","summary":"Remove multiple external leave types","tags":["external-leave-types"],"security":[{"access_token":[]}],"operationId":"removeMultiExternalLeaveType"}},"/external-leave-types/{id}":{"get":{"parameters":[{"in":"path","name":"id","description":"ID of external-leave-types to return","schema":{"type":"integer"},"required":true}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/external-leave-types"}}}},"401":{"description":"not authenticated"},"404":{"description":"not found"},"500":{"description":"general error"}},"description":"Retrieves a single resource with the given id from the service.","summary":"Get external leave type","tags":["external-leave-types"],"security":[{"access_token":[]}],"operationId":"getExternalLeaveType"},"patch":{"parameters":[{"in":"path","name":"id","description":"ID of external-leave-types to update","schema":{"type":"integer"},"required":true}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/external-leave-types"}}}},"401":{"description":"not authenticated"},"404":{"description":"not found"},"500":{"description":"general error"}},"description":"Updates the resource identified by id using data.","summary":"Patch external leave type","tags":["external-leave-types"],"security":[{"access_token":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/external-leave-types"}}}},"operationId":"patchExternalLeaveType"},"delete":{"parameters":[{"in":"path","name":"id","description":"ID of external-leave-types to remove","schema":{"type":"integer"},"required":true}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/external-leave-types"}}}},"401":{"description":"not authenticated"},"404":{"description":"not found"},"500":{"description":"general error"}},"description":"Removes the resource with id.","summary":"Remove external leave type","tags":["external-leave-types"],"security":[{"access_token":[]}],"operationId":"removeExternalLeaveType"}},"/external-leave-budgets":{"get":{"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/external-leave-budgetsList"}}}},"401":{"description":"not authenticated"},"500":{"description":"general error"}},"description":"Retrieves a list of all resources from the service.","summary":"Find external leave budgets","tags":["external-leave-budgets"],"security":[{"access_token":[]}],"operationId":"findExternalLeaveBudgets"},"post":{"parameters":[],"responses":{"201":{"description":"created","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/external-leave-budgets"},{"$ref":"#/components/schemas/external-leave-budgetsList"}]}}}},"401":{"description":"not authenticated"},"500":{"description":"general error"}},"description":"Creates a new resource with data.","summary":"Create external leave budget","tags":["external-leave-budgets"],"security":[{"access_token":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/external-leave-budgets"},{"$ref":"#/components/schemas/external-leave-budgetsList"}]}}}},"operationId":"createExternalLeaveBudget"},"delete":{"parameters":[{"description":"Query parameters to filter","in":"query","name":"filter","style":"form","explode":true,"schema":{"$ref":"#/components/schemas/external-leave-budgets"}}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/external-leave-budgetsList"}}}},"401":{"description":"not authenticated"},"500":{"description":"general error"}},"description":"Removes multiple resources queried by given filters.","summary":"Remove multiple external leave budgets","tags":["external-leave-budgets"],"security":[{"access_token":[]}],"operationId":"removeMultiExternalLeaveBudget"}},"/external-leave-budgets/{id}":{"get":{"parameters":[{"in":"path","name":"id","description":"ID of external-leave-budgets to return","schema":{"type":"integer"},"required":true}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/external-leave-budgets"}}}},"401":{"description":"not authenticated"},"404":{"description":"not found"},"500":{"description":"general error"}},"description":"Retrieves a single resource with the given id from the service.","summary":"Get external leave budget","tags":["external-leave-budgets"],"security":[{"access_token":[]}],"operationId":"getExternalLeaveBudget"},"delete":{"parameters":[{"in":"path","name":"id","description":"ID of external-leave-budgets to remove","schema":{"type":"integer"},"required":true}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/external-leave-budgets"}}}},"401":{"description":"not authenticated"},"404":{"description":"not found"},"500":{"description":"general error"}},"description":"Removes the resource with id.","summary":"Remove external leave budget","tags":["external-leave-budgets"],"security":[{"access_token":[]}],"operationId":"removeExternalLeaveBudget"}},"/users":{"get":{"parameters":[{"name":"includeExtraFields","in":"query","description":"Include extra fields in the response. Extra fields without a value for this user will be `null`.","required":false,"schema":{"type":"string","enum":["true","1","false","0"],"default":"false"}}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/usersList"}}}},"401":{"description":"not authenticated"},"500":{"description":"general error"}},"description":"Retrieves a list of all resources from the service.","summary":"Find users","tags":["users"],"security":[{"access_token":[]}],"operationId":"findUsers"},"post":{"parameters":[],"responses":{"201":{"description":"created","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/users"},{"$ref":"#/components/schemas/usersList"}]}}}},"401":{"description":"not authenticated"},"500":{"description":"general error"}},"description":"Creates a new resource with data.","summary":"Create user","tags":["users"],"security":[{"access_token":[]}],"requestBody":{"required":true,"description":"This is a minimal example body for creating a user, you can add more based on the definition below. Users added through the API always get status 'NOT INVITED'. Inviting users can be done by admin users in the application.","content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","example":"test-user@yourdomain.com"}}}}}},"operationId":"createUser"}},"/users/{id}":{"get":{"parameters":[{"in":"path","name":"id","description":"ID of users to return","schema":{"type":"integer"},"required":true}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/users"}}}},"401":{"description":"not authenticated"},"404":{"description":"not found"},"500":{"description":"general error"}},"description":"Retrieves a single resource with the given id from the service.","summary":"Get user","tags":["users"],"security":[{"access_token":[]}],"operationId":"getUser"}},"/work-location-categories":{"get":{"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/work-location-categoriesList"}}}},"401":{"description":"not authenticated"},"500":{"description":"general error"}},"description":"Retrieves a list of all resources from the service.","summary":"Find work location categories","tags":["work-location-categories"],"security":[{"access_token":[]}],"operationId":"findWorkLocationCategories"}},"/working-today":{"get":{"parameters":[{"name":"date","schema":{"type":"string","format":"date","example":"2025-05-01"},"description":"The day to get work locations for. Format: YYYY-MM-DD","required":true,"in":"query"},{"name":"includeArchivedUsers","schema":{"type":"boolean"},"description":"Whether archived users should be included in the response","default":false,"required":false,"in":"query"},{"name":"includeInactiveEmployment","schema":{"type":"boolean"},"description":"Whether to include users without an active employment for the provided date","required":false,"default":true,"in":"query"}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/working-todayList"}}}},"401":{"description":"not authenticated"},"500":{"description":"general error"}},"description":"Get an overview of who is working at which location for a specific date.\n\nThe names of work location categories can be retrieved via the `/work-location-categories` endpoint.\n\nIf a user works on the day, but has not set a work location, the value of `workLocationCategoryId` will be `null`.\n\nFor users that are absent due to a holiday, leave (only full day), sick leave (only 100%), or work schedule, the `isWorking` value will be `false`.","summary":"Find working today","tags":["working-today"],"security":[{"access_token":[]}],"operationId":"findWorkingToday"}},"/oauth/authorize":{"post":{"parameters":[{"name":"response_type","required":true,"in":"query","description":"Expected response type. Only \"code\" is supported for now","schema":{"type":"string","example":"code"}},{"name":"redirect_uri","required":true,"in":"query","description":"the url to redirect back to once after permission is granted or denied. The url should be registered with Hooray.","schema":{"type":"string","format":"uri","example":"https://www.integration-partner.com"}},{"name":"client_id","required":true,"in":"query","description":"Unique id of the client that performs the request.","schema":{"type":"string","example":"00D26507EEA436A3DA9E70B135189A6F"}},{"name":"scope","required":true,"in":"query","description":"space separated scopes to request access for. Valid scopes include: \"availability_read\", \"contract_read\", \"label_read\", \"leave_type_read\", \"profile_read\", \"profile_write\", \"sick_leave_read\", \"team_information\", \"time_off_read\", \"time_off_write\"","schema":{"type":"string","example":"profile_read profile_write"}},{"name":"state","in":"query","description":"String representing an opaque value used by the client to main the state between the request and the callback. Used to prevent CSRF attacks.","schema":{"type":"string","example":"xcoivjuywkdkhvusuye3kch"}}],"responses":{"200":{"description":"A successful request results in a redirect, leading the user back to the original application and adding an authorization code - in case the user granted access - the the query params. The code has a lifetime of 60 seconds and can be used just once. The code can be exchanged for an access token using the \"oauth/token\" endpoint.","content":{"application/json":{"schema":{"type":"string","format":"uri","example":"https://www.integration-partner.com/?code=342037d593e90005ce18d49426526fda7b3ca813db3fde00c1bdb674da7205e7&state=xcoivjuywkdkhvusuye3kch"}}}}},"description":"OAuth2 post request that - if the user grants access - results in a redirect containing an authorization code. The authorization code can be used to create an access token (/oauth/token), which provides access to API. This endpoint is accessed by directing the user to the authorization URL: \"https://app.hoorayhr.io/oauth/authorize\" adding  the query params as described below. For example: \"https://app.hoorayhr.io/oauth/authorize/oauth/authorize?response_type=code&client_id=1E2E2E8834912E3DCB5F267042E3EB74&redirect_uri=https:%2F%2Fintegration-partner.com&scope=profile_read%20profile_write&state=xcoivjuywkdkhvusuye3kch\"","summary":"Create OAuth2 authorization request","tags":["oauth-authorize"],"security":[{"jwt_token":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"allowAccess":{"type":"boolean","example":true,"description":"boolean indicating if the user allows access."}},"required":["allowAccess"]},"example":{"allowAccess":true}}},"description":"Boolean in the request body indicating if the user allows access."},"operationId":"createOauthAuthorize"}},"/oauth/token":{"post":{"parameters":[{"name":"grant_type","required":true,"in":"query","description":"the grant_type of the request. Since the API only handles authorization codes, provide the value \"authorization_code\"","schema":{"type":"string","example":"authorization_code"}},{"name":"code","required":true,"in":"query","description":"the authorization code to exchange. Use the \"/oauth/authorize\" endpoint to get an authorization code.","schema":{"type":"string","example":"dd7c1a3d9d5627da9aea5415e3d07202bfb5925e"}},{"name":"redirect_uri","required":true,"in":"query","description":"the redirect_uri that was used to get the authorization code. The uri must be identical to the value provided earlier.","schema":{"type":"string","format":"url","example":"https://www.integration-partner.com/hooray-hr-integration"}},{"name":"client_id","required":true,"in":"query","description":"Unique id of the client that performs the request. The id should be valid and identical to the client_id used to get the authorization code.","schema":{"type":"string","example":"00D26507EEA436A3DA9E70B135189A6F"}},{"name":"client_secret","required":true,"in":"query","description":"Secret key of the client that performs te request. The secret must match the client_id. Keep this value secret and secure at all times.","schema":{"type":"string","example":"73B67F38F527859521767EBBE6CDE5D9"}}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"type":"object","properties":{"access_token":{"type":"string","description":"512 bit hexadecimal access token that grants access to the API. Store this token securely!","example":"aeae379a6e857728e44164267fdb7a0e27b205d757cc19899586c89dbb221930f1813d02ff93a661859bc17065eac4d6edf3c38a034e6283a84754d52917e5b0"},"token_type":{"type":"string","description":"Indicates what kind of token is given. In this case, the access_token is a Bearer token. Meaning everyone who owns the token has access.","example":"bearer"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"error":{"type":"string","description":"enum with OAuth2 error types","enum":["invalid_request","invalid_client","invalid_grant","invalid_scope"],"example":"invalid_request"},"message":{"type":"string","example":"Client_id is invalid"}}}}}}},"description":"Post request to create an access token. The access token can be used the authorize external requests.","summary":"Create OAuth2 access token","tags":["oauth-token"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"operationId":"createOauthToken"}},"/teams-information":{"get":{"parameters":[],"responses":{"200":{"description":"A list of teams, team members, and team leaders","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"teamId":{"type":"number","description":"The team id","example":1},"teamName":{"type":"string","description":"The team name","example":"Team 1"},"teamLeadersIds":{"type":"array","description":"The team leaders user ids","example":[1,2],"items":{"type":"number"}},"teamMembersIds":{"type":"array","description":"The team members user ids","example":[1,2,3,4],"items":{"type":"number"}}}}}}}}},"description":"Get company teams, team members, and team leaders","summary":"Find teams information","tags":["teams-information"],"security":[{"access_token":[]},{"jwt_token":[]}],"operationId":"findTeamsInformation"}},"/teams-information/{id}":{"get":{"parameters":[{"name":"id","in":"path","required":true,"description":"The user id","schema":{"type":"integer"}}],"responses":{"200":{"description":"A list of teams, and the roles of the user in each team","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"number","description":"The user id","example":1},"teamId":{"type":"number","description":"The team id","example":1},"teamName":{"type":"string","description":"The team name","example":"Team 1"},"isLeader":{"type":"boolean","description":"Indicates if the user is a team leader","example":true},"isMember":{"type":"boolean","description":"Indicates if the user is a team member","example":false}}}}}}}},"description":"Get company teams, team members, and team leaders by userId","summary":"Get teams information by userId","tags":["teams-information"],"security":[{"access_token":[]},{"jwt_token":[]}],"operationId":"getTeamsInformation"}},"/attendance-report":{"get":{"parameters":[{"name":"startDate","schema":{"type":"string","format":"date","example":"2025-05-01"},"description":"Start date of the report. Format: YYYY-MM-DD","required":true,"in":"query"},{"name":"endDate","schema":{"type":"string","format":"date","example":"2025-05-31"},"description":"End date of the report. Format: YYYY-MM-DD. The end date cannot be more than 31 days after the start date","required":true,"in":"query"},{"name":"includeInactiveEmployment","schema":{"type":"boolean"},"description":"Whether to include users without an active employment in the provided date range","required":false,"default":true,"in":"query"}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/attendance-reportList"}}}},"401":{"description":"not authenticated"},"500":{"description":"general error"}},"description":"**NOTE:** The response for this endpoint is cached for 12 hours per API token and query parameters to avoid heavy load on our API. Updates will not be reflected immediately.","summary":"Find attendance report","tags":["attendance-report"],"security":[{"access_token":[]}],"operationId":"findAttendanceReport"}},"/employment-terms":{"get":{"parameters":[],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/employment-termsList"}}}},"401":{"description":"not authenticated"},"500":{"description":"general error"}},"description":"Retrieves a list of all resources from the service.","summary":"Find employment terms","tags":["employment-terms"],"security":[{"access_token":[]}]}},"/employment-terms/{id}":{"get":{"parameters":[{"in":"path","name":"id","description":"ID of employment-terms to return","schema":{"type":"integer"},"required":true}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/employment-terms"}}}},"401":{"description":"not authenticated"},"404":{"description":"not found"},"500":{"description":"general error"}},"description":"Retrieves a single resource with the given id from the service.","summary":"Get employment term","tags":["employment-terms"],"security":[{"access_token":[]}]}},"/employment-term-assignments":{"get":{"parameters":[],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/employment-term-assignmentsList"}}}},"401":{"description":"not authenticated"},"500":{"description":"general error"}},"description":"Retrieves a list of all resources from the service.","summary":"Find employment term assignments","tags":["employment-term-assignments"],"security":[{"access_token":[]}]}},"/employment-term-assignments/{id}":{"get":{"parameters":[{"in":"path","name":"id","description":"ID of employment-term-assignments to return","schema":{"type":"integer"},"required":true}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/employment-term-assignments"}}}},"401":{"description":"not authenticated"},"404":{"description":"not found"},"500":{"description":"general error"}},"description":"Retrieves a single resource with the given id from the service.","summary":"Get a single employment term assignment","tags":["employment-term-assignments"],"security":[{"access_token":[]}]}},"/time-zones":{"get":{"parameters":[],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/time-zonesList"}}}},"401":{"description":"not authenticated"},"500":{"description":"general error"}},"description":"Retrieves a list of all resources from the service.","summary":"Find time zones","tags":["time-zones"],"security":[{"access_token":[]}],"operationId":"findTimeZones"}},"/entities":{"get":{"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entitiesList"}}}},"401":{"description":"not authenticated"},"500":{"description":"general error"}},"description":"Retrieves all entities. This always includes at least one entity, even for companies without multi-entity enabled.","summary":"Find entities","tags":["entities"],"security":[{"access_token":[]}],"operationId":"findEntities"}},"/time-tracking":{"get":{"parameters":[{"name":"id[$in]","description":"Filter entries by specific IDs","required":false,"in":"query","schema":{"type":"array","items":{"type":"number"}}},{"name":"status","description":"Filter entries by a specific status","required":false,"in":"query","schema":{"type":"string","enum":["NOT_LOGGED","CONCEPT","REQUEST","APPROVED","DENIED"]}},{"name":"userId","description":"Filter entries by a specific user","required":false,"in":"query","schema":{"type":"number"}},{"name":"startDate","description":"Filter entries by a specific start date","required":false,"in":"query","schema":{"type":"string","format":"date"}},{"name":"endDate","description":"Filter entries by a specific end date","required":false,"in":"query","schema":{"type":"string","format":"date"}},{"name":"createdAt","description":"Filter entries by a specific creation date","required":false,"in":"query","schema":{"type":"string","format":"date"}},{"name":"updatedAt","description":"Filter entries by a specific update date","required":false,"in":"query","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"List of time entries","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/time_tracking_entry_response"}}}}},"401":{"description":"Not authenticated"},"500":{"description":"General error"}},"description":"Get an overview of time entries.\n\n**Time Tracking explained**\n\n\n\nHoorayHR Time Tracking works by dividing time into entries. Each time entry spans a single day or a week (Mon-Sun). The time span of an entry is determined by the time tracking policy of the user.\n\nEach entry has a list of activities. Activities are like work periods or breaks. Activities cannot overlap, but one can start at the same time as the previous one ends to create a continuous work period.\n\nActivities of type `WORK` can have labels and notes attached, while activities of type `BREAK` cannot.\n\nTime entries are created automatically based on the provided dates of the activities. It is only possible to create activities and entries within active time tracking policies for users.","summary":"View time entries","tags":["time-tracking"],"security":[{"access_token":[]}],"operationId":"findTimeEntries"},"put":{"parameters":[],"responses":{"200":{"description":"The IDs of the created time entries. The order of the IDs matches the order of the request.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"timeTrackingEntryId":{"type":"integer","exclusiveMinimum":0}},"required":["timeTrackingEntryId"],"additionalProperties":false,"example":[{"timeTrackingEntryId":1302}],"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"400":{"description":"Invalid request. The response contains more information about the error. Specifically what went wrong for which item of the payload (for multi only, via the `path` property, which contains the index of the payload item). See the schema for additional error shapes.\n\nKnown error codes are: `GENERAL_ERROR`, `OVERLAPPING_ITEMS`, `MISSING_PERMISSIONS`, `USER_NOT_FOUND`, `NO_TIME_TRACKING_POLICY`. Please keep in mind that other error codes might exist if the request doesn't pass pre-validation. The error code is provided under `errors[0].error.code`.","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"code":{"type":"number"},"className":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":1},"userId":{"type":"integer"},"date":{"type":"string"},"error":{"type":"object","properties":{"code":{"anyOf":[{"type":"string"},{"type":"string","enum":["GENERAL_ERROR","OVERLAPPING_ITEMS","MISSING_PERMISSIONS","USER_NOT_FOUND","NO_TIME_TRACKING_POLICY"]}]},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["path","userId","date","error"],"additionalProperties":false}}},"required":["name","message","code","className","errors"],"additionalProperties":false,"example":{"name":"BadRequest","message":"The provided data is invalid. Please try again.","code":400,"className":"bad-request","errors":[{"path":[0],"userId":1,"date":"2025-08-18","error":{"code":"NO_TIME_TRACKING_POLICY","message":"<Translated message>"}}]},"$schema":"http://json-schema.org/draft-07/schema#"},{"type":"object","properties":{"name":{"type":"string","const":"BadRequest"},"code":{"type":"number","const":400},"message":{"description":"A human readable message","type":"string"},"className":{"type":"string","const":"bad-request"},"data":{"description":"Additional data that can be used to identify the error. Usually an empty object","type":"object","optional":true},"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"description":"A human readable message","type":"string"},"expected":{"description":"The type of value that was expected","type":"string","optional":true},"received":{"description":"The type of value that was received","type":"string","optional":true},"path":{"description":"The path to the field that caused the error","type":"array","items":{"type":"string"}}}}}}}]}}}},"401":{"description":"Not authenticated"},"403":{"description":"Forbidden"},"500":{"description":"General error"}},"description":"Create or update one or multiple time entries with activities for multiple users / dates. A maximum of 70 entries can be processed at once. Either the entire request succeeds or the entire request fails. If creating of the entries fail, the entire request fails and no entries are created. Any existing entries will be restored.","summary":"Insert one or more time entries with activities for multiples users / dates","tags":["time-tracking"],"security":[{"access_token":[]}],"requestBody":{"required":true,"description":"This is an example body for creating multiple time entries. You can edit it by adding other fields before you click \"Execute\".","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/time_tracking_entry_payload"}}}}},"operationId":"createOrUpdateTimeEntries"},"patch":{"parameters":[{"name":"id[$in]","description":"The IDs of the entries to patch","required":true,"in":"query","schema":{"type":"array","items":{"type":"integer"}}}],"responses":{"200":{"description":"The patched time entries","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/time_tracking_entry_response"}}}}},"401":{"description":"Not authenticated"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"500":{"description":"General error"}},"description":"Updates multiple resources queried by given filters.","summary":"Change the status of multiple time entries","tags":["time-tracking"],"security":[{"access_token":[]}],"requestBody":{"required":true,"description":"This is an example body for patching multiple time entries. You can edit it by adding other fields before you click \"Execute\".","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["NOT_LOGGED","CONCEPT","REQUEST","APPROVED","DENIED"]}},"required":["status"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"operationId":"patchTimeEntriesMulti"},"delete":{"parameters":[{"name":"id[$in]","description":"The IDs of the entries to delete","required":true,"in":"query","schema":{"type":"array","items":{"type":"integer"}}}],"responses":{"200":{"description":"The deleted time entries","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/time_tracking_entry_response"}}}}},"401":{"description":"Not authenticated"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"500":{"description":"General error"}},"description":"Deletes multiple time entries and all associated activities.","summary":"Delete multiple time entries.","tags":["time-tracking"],"security":[{"access_token":[]}],"operationId":"deleteMultipleTimeEntries"}},"/time-tracking/{id}":{"get":{"parameters":[{"in":"path","name":"id","schema":{"type":"integer","minimum":1},"required":true}],"responses":{"200":{"description":"A single time entry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/time_tracking_entry_response"}}}},"401":{"description":"Not authenticated"},"404":{"description":"Not found"},"500":{"description":"General error"}},"description":"Retrieves a single resource with the given id from the service.","summary":"Get a single time entry with activities","tags":["time-tracking"],"security":[{"access_token":[]}],"operationId":"getTimeEntry"},"patch":{"parameters":[{"in":"path","name":"id","schema":{"type":"integer","minimum":1},"required":true}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/time-tracking"}}}},"401":{"description":"not authenticated"},"404":{"description":"not found"},"500":{"description":"general error"}},"description":"Updates the resource identified by id using data.","summary":"Change the status of one time entry","tags":["time-tracking"],"security":[{"access_token":[]}],"requestBody":{"required":true,"description":"This is an example body for patching a time entry. You can edit it by adding other fields before you click \"Execute\".","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["NOT_LOGGED","CONCEPT","REQUEST","APPROVED","DENIED"]}},"required":["status"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"operationId":"patchTimeEntry"},"delete":{"parameters":[{"in":"path","name":"id","schema":{"type":"integer","minimum":1},"required":true}],"responses":{"200":{"description":"The deleted time entry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/time_tracking_entry_response"}}}},"401":{"description":"Not authenticated"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"500":{"description":"General error"}},"description":"Deletes a time entry and all associated activities.","summary":"Delete a time entry.","tags":["time-tracking"],"security":[{"access_token":[]}],"operationId":"deleteTimeEntry"}},"/public-holidays":{"get":{"parameters":[{"name":"date[$gte]","schema":{"type":"string","format":"date","example":"2025-01-01"},"description":"Start of the date range (inclusive). Format: YYYY-MM-DD","required":true,"in":"query"},{"name":"date[$lte]","schema":{"type":"string","format":"date","example":"2025-12-31"},"description":"End of the date range (inclusive). Format: YYYY-MM-DD. Cannot be more than one year after date[$gte]","required":true,"in":"query"},{"name":"userId","schema":{"type":"number","example":1},"description":"Optional. Only return the holidays applying to this user.","required":false,"in":"query"}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/public-holidaysList"}}}},"401":{"description":"not authenticated"},"500":{"description":"general error"}},"description":"Returns the company public holidays within the provided date range. A `date` range is **required**: provide both `date[$gte]` and `date[$lte]` (format YYYY-MM-DD). The maximum range is **one year**. Holidays whose policy has no active users are omitted, and `userIds` only contains active (non-archived) users. A public holiday that belongs to multiple policies is returned as a separate record per policy, each carrying its own `userIds` (the active users of that policy). The same holiday can therefore appear more than once in the response, once for each policy it belongs to. Holiday names are localized to the language of the user the OAuth integration is linked to. Provide an optional `userId` to only return the holidays applying to that user.","summary":"Find public holidays","tags":["public-holidays"],"security":[{"access_token":[]}],"operationId":"findPublicHolidays"}}},"openapi":"3.0.3","tags":[{"name":"labels","description":"HoorayHR labels. OAuth2 scope: \"label_read\"\n\n**DEPRECATION NOTICE**: The object variant (containing the translated name per locale) for labels is deprecated and will be removed in the future.\nUse the simple string variant instead. Switching to the new string variant can be done by providing `useTranslatedLabels=true` as query parameter."},{"name":"availability","description":"HoorayHR work schedule / availability items. OAuth2 scopes: \"availability_read\""},{"name":"contracts","description":"HoorayHR contracts. OAuth2 scope: \"contract_read\"\n\n**DEPRECATION NOTICE**: The object variant (containing the translated name per locale) for labels is deprecated and will be removed in the future.\nUse the simple string variant instead. Switching to the new string variant can be done by providing `useTranslatedLabels=true` as query parameter."},{"name":"documents","description":"HoorayHR documents. OAuth2 scopes: \"documents_write\""},{"name":"document-categories","description":"HoorayHR document categories. OAuth2 scope \"documents_write\""},{"name":"sick-leave-dossiers","description":"HoorayHR sick leave dossiers. OAuth2 scopes: \"sick_leave_read\", \"sick_leave_write\"\n\n**DEPRECATION NOTICE**: The object variant (containing the translated name per locale) for labels is deprecated and will be removed in the future.\nUse the simple string variant instead. Switching to the new string variant can be done by providing `useTranslatedLabels=true` as query parameter."},{"name":"sick-leave-phases","description":"HoorayHR sick leave phases. OAuth2 scopes: \"sick_leave_read\", \"sick_leave_write\"\n\n**DEPRECATION NOTICE**: The object variant (containing the translated name per locale) for labels is deprecated and will be removed in the future.\nUse the simple string variant instead. Switching to the new string variant can be done by providing `useTranslatedLabels=true` as query parameter."},{"name":"time-off","description":"HoorayHR time-off items. OAuth2 scopes: \"time_off_read\", \"time_off_write\"\n\n**DEPRECATION NOTICE**: The object variant (containing the translated name per locale) for labels is deprecated and will be removed in the future.\nUse the simple string variant instead. Switching to the new string variant can be done by providing `useTranslatedLabels=true` as query parameter."},{"name":"leave-types","description":"HoorayHR leave types. OAuth2 scopes: \"leave_type_read\""},{"name":"external-leave-types","description":"HoorayHR external leave types. OAuth2 scopes: \"external_leave_write\""},{"name":"external-leave-budgets","description":"HoorayHR external leave budgets. OAuth2 scopes: \"external_leave_write\""},{"name":"users","description":"HoorayHR user profiles. OAuth2 scopes: \"profile_read\", \"profile_write\""},{"name":"work-location-categories","description":"HoorayHR work location categories. OAuth2 scopes: \"working_today_read\""},{"name":"working-today","description":"HoorayHR working today. OAuth2 scopes: \"working_today_read\""},{"name":"oauth-authorize","description":"OAuth2 authorize endpoint. This endpoint is accessed by directing the user to the authorization URL: \"https://app.hoorayhr.io/oauth/authorize\" adding  the query params as described."},{"name":"oauth-token","description":"OAuth2 token endpoint. Used to exchange an authorization code for an access token that provides access to the HoorayHR API. The request follows the OAuth2 spec."},{"name":"teams-information","description":"A service to get information about teams, their members, and their leaders for the company or user. OAuth2 scopes: \"team_information\""},{"name":"attendance-report","description":"Attendance report. OAuth2 scope: \"report_attendance_read\""},{"name":"employment-terms","description":"HoorayHR employment terms. OAuth2 scopes: \"employment_terms_read.\"\n\nNote: the `salarySubTypes` field is only present for the employment term with system type `\"SALARY\"`"},{"name":"employment-term-assignments","description":"HoorayHR employment term assignments. OAuth2 scopes: \"employment_terms_read\""},{"name":"time-zones","description":"HoorayHR supported time zones. OAuth2 scopes: *"},{"name":"entities","description":"HoorayHR entities. OAuth2 scopes: \"profile_read\""},{"name":"time-tracking","description":"HoorayHR Time Tracking. OAuth2 scopes: \"time_tracking_read\", \"time_tracking_write\".\n\nRefer to the `GET /time-tracking` endpoint for general information about the time tracking feature."},{"name":"public-holidays","description":"Public holidays. OAuth2 scope: \"time_off_read\""}]}