{"openapi":"3.0.3","info":{"title":"Tanda API","description":"## Getting Started\n\nWelcome to the Tanda API! This documentation steps you through authenticating to the API, as well as the various endpoints and methods supported.\n\nNot sure where to start? Check out the [quick start guide](https://github.com/TandaHQ/api-v2-code-samples/blob/master/user_guides/getting_started/README.md), or browse some [code samples](https://github.com/TandaHQ/api-v2-code-samples) on GitHub.\n\nThere's two ways to connect to the API. Use Authorization Code) if you're making an add-on for other Tanda users to use, or use Password) if you're building an integration just for your own account.\n\n## Authentication (Authorization Code)\n\n**Use Authorization Code authentication if you're making an add-on for other Tanda customers to use**. For example, if you are building an integration that connects your custom reporting platform to Tanda data, you'll probably want to let lots of Tanda customers use it. This is the approach for you.\n\nIf you have a log in for the Tanda platform you have access to an Authorization code. This code is linked to your organisation and permission levels. Just like using an account in Tanda the permission levels will give you the same access in the API, e.g. if you don't have permission to approve a timesheet in Tanda, you won't be able to do so via the API.\n\nOnce you have permission and a working Tanda account, you can get an application ID, secret, and redirect URI. You can get all of these from the [applications page](/api/oauth/applications). With those details, follow these steps to authenticate a user using the Authorization Code authentication flow.\n\nThe Authorization Code approach uses the OAuth 2 **authorization code grant type**. If you aren't familiar with it, [this is a good, practical introduction](https://www.digitalocean.com/community/tutorials/an-introduction-to-oauth-2).\n\n\u003e [!NOTE]\n\u003e Tokens are encrypted, and the encryption key is different between environments. If you are testing in an environment that is not production, the tokens will not work.\n\n\n#### 1. Redirect the user to the authorize endpoint\n\nAllow users on your website to authenticate themselves with Tanda by redirecting them to the following URL. Where `APPLICATION_ID` and `REDIRECT_URI` are the values specific to your app, and the scope parameter is the relevant Tanda OAuth2 scopes you want access to (more information: Scopes).\n\n```\nhttps://my.tanda.co/api/oauth/authorize?scope=SCOPE1+SCOPE2\u0026client_id=YOUR_APPLICATION_ID\u0026redirect_uri=YOUR_REDIRECT_URI\u0026response_type=code\n```\n\n#### 2. Catch the request to your redirect URI\n\nThe Tanda server will then redirect the request back to your redirect URI, with a request code in the URL parameters. So if your redirect URI is `https://mysite.com/callback` then the request will be made to `https://mysite.com/callback?code=AUTHORIZATION_CODE`.\n\nFor local testing, as the browser gets redirected to the URI, it is possible to set it to a local address (i.e. `http://localhost:3000/callback`) to allow you to test your OAuth web app before deploying your code.\n\n#### 3. Make a POST request to the token endpoint\n\nNow that you've got your authorization code, you can finally make the `POST` request to get your access token (don't worry, this is the last step).\n\nFrom your server/application make a `POST` request to `https://my.tanda.co/api/oauth/token`.\n\nThe response should look something like this:\n\n```javascript\n{\n  \"access_token\": \"6833b9ecaa84ce420da3cafaa43124d241cb28b5287b72d131f6b38bcb64cd91\",\n  \"token_type\": \"bearer\",\n  \"expires_in\": 7200,\n  \"refresh_token\": \"ddeb6480f06247e3635826dd5e3875ece6f64a27044516731a914897431ab446\",\n  \"scope\": \"me\",\n  \"created_at\": 1457304578\n}\n```\n\n\u003e [!NOTE]\n\u003e `expires_in` is in seconds, so your token will last 2 hours. To learn how to refresh your token, see Refreshing your Token.\n\n```bash\ncurl https://my.tanda.co/api/oauth/token -X POST -H \"Cache-Control: no-cache\" \\\n-F \"client_id=YOUR_APPLICATION_ID\" \\\n-F \"client_secret=YOUR_SECRET\" \\\n-F \"code=AUTHORIZATION_CODE\" \\\n-F \"redirect_uri=YOUR_REDIRECT_URI\" \\\n-F \"grant_type=authorization_code\"\n```\n\n### Refreshing your Token\n\nIf you got your token using the Authorization Code) authentication flow, and it expires, then using the `refresh_token` you got above, you are able to refresh it by making a `POST` request to `https://my.tanda.co/api/oauth/token`.\n\nThe response should look something like this:\n\n```javascript\n{\n  \"access_token\": \"ddeb6480f06247e3635826dd5e3875ece6f64a27044516731a914897431ab446\",\n  \"token_type\": \"bearer\",\n  \"expires_in\": 7200,\n  \"refresh_token\": \"d0692903972ff6559ec5f0e3165cabd5b87f47e3613431ad53805b5397268206\",\n  \"scope\": \"me\",\n  \"created_at\": 1457311778\n}\n```\n\nYou can now go on using this new access token for another 2 hours.\n\n\u003e [!WARNING]\n\u003e If your application's access is revoked by the user, then you will need to run through the authentication process again to obtain a new access token.\n\n\n\u003e [!NOTE]\n\u003e Although the tokens only last for 2 hours, you can refresh your token as many times as you want. The refresh token has no expiry but can only be used once.\n\n```bash\ncurl https://my.tanda.co/api/oauth/token -X POST -H \"Cache-Control: no-cache\" \\\n-F \"client_id=YOUR_APPLICATION_ID\" \\\n-F \"client_secret=YOUR_SECRET\" \\\n-F \"refresh_token=REFRESH_TOKEN\" \\\n-F \"redirect_uri=YOUR_REDIRECT_URI\" \\\n-F \"grant_type=refresh_token\"\n```\n\n## Authentication (Password)\n\n**Use Password authentication if you're building an integration just for your own account**. For example, if you're building an integration for a specific customer - either as an in-house developer or as a consultant - this is the approach for you.\n\nIf you're using the API for a single account, the Password authentication flow is an easier way to get set up. You can authenticate via the command line using your Tanda login details, or you can just [set up an access token through the Tanda API management page](/api/oauth/access_tokens).\n\nAccess tokens generated using Password authentication **never** expire, but can be revoked from the API management page.\n\n#### 1. Make a POST request to the token endpoint\n\nFrom your server/application make a `POST` request to `https://my.tanda.co/api/oauth/token` with the user's email and password.\n\nThe response should look something like this:\n\n```javascript\n{\n  \"access_token\": \"6833b9ecaa84ce420da3cafaa43124d241cb28b5287b72d131f6b38bcb64cd91\",\n  \"token_type\": \"bearer\",\n  \"scope\": \"me\",\n  \"created_at\": 1457304578\n}\n```\n\n\u003e [!NOTE]\n\u003e Password authenticated tokens have no expiry. They can also be created and revoked from the [access tokens](/api/oauth/access_tokens) page.\n\n```bash\ncurl https://my.tanda.co/api/oauth/token -X POST -H \"Cache-Control: no-cache\" \\\n-F \"username=USER_EMAIL\" \\\n-F \"password=USER_PASSWORD\" \\\n-F \"scope=SCOPE1 SCOPE2\" \\\n-F \"grant_type=password\"\n```\n\n## Making Requests\n\nOnce either of the above authentication methods have been completed, you'll have an access token (in the case of Authorization Code) authentication, the token will only last for 2 hours).\n\nYour access token will look something like this: `6833b9ecaa84ce420da3cafaa43124d241cb28b5287b72d131f6b38bcb64cd91`.\nFrom here on out all requests you make to the Tanda v2 API must include the token in the header like so:\n\n```http\nAuthorization: bearer 6833b9ecaa84ce420da3cafaa43124d241cb28b5287b72d131f6b38bcb64cd91\n```\n\nHere's an example of a request that gets information about the user that just authenticated.\n\n```bash\ncurl --header \"Authorization: bearer 6833b9ecaa84ce420da3cafaa43124d241cb28b5287b72d131f6b38bcb64cd91\" \\\nhttps://my.tanda.co/api/v2/users/me\n```\n\n## Invalid Subscriptions\n\nIf you receive a `402` response status with this message:\n\n```http\nYour account is locked out for billing purposes, and cannot use the API!\n```\n\nThis indicates that the customer's account does not have a valid credit card or other billing method set, and their free trial has ended. Therefore they will not be able to access some components of Tanda either through the website or the API.\n\nYou can query the current user endpoint to check if a user has a valid subscription.\n\n## Rate Limiting\nRequests to the API are rate limited to **200 requests**, per **1 minute** for each **requester**.\n\nA **requester** is defined through the following workflow:\n- Is the request using a Password Access Token?\n  - Yes? Then the requester is the current user (meaning all requests made though **any** of my password tokens are counted together).\n  - No? Then the requester is the combination of the OAuth app and current user.\n\nWhen making requests to the API, the following headers will be added to the response:\n```http\nX-RateLimit-Limit:     200\nX-RateLimit-Remaining: 52\nX-RateLimit-Reset:     1461211225\n```\n\n\n- `X-RateLimit-Limit` is the your rate limit\n- `X-RateLimit-Remaining` is the remaining number of requests you can make before you will be rate limited\n- `X-RateLimit-Reset` is when the rate limit will be reset\n\nIf have reached the rate limit, then an additional header will be present:\n```http\nX-RateLimit-RateLimited: true\n```\n\n\nHere's an example to make things a little clearer:\n- I have multiple Password Access Tokens with different scopes, `token_1`, `token_2`.\n- I have an OAuth app, which is used by `user_1`, `user_2` and myself.\n- `user_2` has also created an OAuth app which I am using.\n\nThis is the maximum number of requests that can be made in a single minute:\n- 199 requests with `token_1`\n- 1 request with `token_2` (I have 200 requests/min for **all** my Password Access Tokens)\n- 200 requests on my behalf through `user_2`'s OAuth app\n- 200 requests on my behalf through my OAuth app\n- 200 requests on `user_1`'s behalf through my OAuth app\n- 200 requests on `user_2`'s behalf through my OAuth app\n\n\nIn summary the distinct **requesters** in this example are:\n- Me through my Password Access Tokens\n- Me through `user_2`'s OAuth app\n- Me through my OAuth app\n- `user_1` through my OAuth app\n- `user_2` through my OAuth app\n\n**If you reach the rate limit, you'll get the following `429` response:**\n\nHeaders\n```\nX-RateLimit-Limit:       200\nX-RateLimit-RateLimited: true\nX-RateLimit-Remaining:   0\nX-RateLimit-Reset:       1461211225\n```\n\nBody\n```\n{\n  \"error\": \"API rate limit exceeded!\"\n}\n```\n\n## Caching\nThe Tanda API supports the [`If-None-Match`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-None-Match) HTTP header. All API responses will include an `ETag` response header. You can use the value of this header in future requests to the same endpoint by passing it to the `If-None-Match` request header. If the content the API would return has not changed, you will get back a [`304` Not Modified](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/304) response.\n\nThe example below shows an ETag being included in a request. For more information about ETags and If-None-Match, see [Mozilla's guide](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-None-Match).\n\n```bash\ncurl --header \"If-None-Match: 17f1542065ae37d0963a608fd632b4615a288ceb\" --header \"Authorization: bearer 6833b9ecaa84ce420da3cafaa43124d241cb28b5287b72d131f6b38bcb64cd91\" \\\nhttps://my.tanda.co/api/v2/users/me\n```\n\n## TLS Version\n\nThe Tanda API only supports TLS version 1.2 or higher. If your API client attempts to connect with a lower version of TLS or SSL then you will receive a TLS handshake error.\n\n## Scopes\n\nIn both the Authorization Code) and Password) authentication methods, you are required to include a `scope` parameter. Here is a complete list of the scopes in the Tanda API, additionally, in this documentation each endpoint specifies which scope/s it requires.\n\n| Scope | Endpoints | Description |\n|---|---|---|\n| `me` | Users, Shift Reminders | Access information about the current user |\n| `roster` | Rosters, Schedules, Schedule Swap Plans, Custom Events | Manage roster, schedule information, shift swaps and custom events |\n| `timesheet` | Timesheets, Shifts | Manage timesheet and shift information |\n| `department` | Locations, Teams (Departments), Shift Details, Custom Events | Manage location, department (team), and shift detail information |\n| `user` | Users, Award Tags, Clock Ins | Manage personal information about your employees (without wages) |\n| `cost` | Users, Timesheets, Shifts, Rosters, Schedules, WageComparisons | Manage information about your employee's wage, and see costs for timesheets and rosters |\n| `leave` | Leave Requests, Leave Balances | Manage leave requests and balances |\n| `unavailability` | Availability, Unavailability | Manage availability and unavailability |\n| `datastream` | Data Streams, Data Stream Joins, Store Stats | Manage your data streams and store stats |\n| `device` | Devices, Clock Ins | Manage timeclock information, and read clock ins for devices |\n| `qualifications` | Qualifications | Manage qualifications |\n| `training` | Training Templates, Trainings | Read training courses and who has been assigned them |\n| `settings` | Settings, Award Templates | Manage account settings and award related configuration |\n| `organisation` | Organisations | View \u0026 create client organisations |\n| `sms` | SMS | Send SMS |\n| `personal` | Personal Details | Manage your personal details (without Bank Details, TFN, etc) |\n| `financial` | Personal Details, Users | Access financial data about your employees (Bank Details, TFN, etc) |\n| `communication` | Announcements | Manage announcements |\n| `platform` | Platform | Get platform data\n\n\u003e [!NOTE]\n\u003e Not only will you need the relevant scopes to access the endpoints, but also the correct system permissions in Tanda. For more information see each endpoint group.\n\n\n\u003e [!NOTE]\n\u003e By selecting only the bare minimum scopes that your application needs, users will feel more comfortable authorizing your application.\n\u003e\n\u003e For example: If you had all scopes selected but your application simply collects information about users (using the User endpoint, and `user` scope) people will question why your application needs to have access to timesheet data (`timesheet` scope) and will be less likely to approve it.\n\n\n## Dates and Times\n\nAll dates in the Tanda API are rendered in [YYYY-MM-DD](https://en.wikipedia.org/wiki/ISO_8601#Calendar_dates) format. Any request you make must use YYYY-MM-DD format for all dates.\n\nAll times in the Tanda API are rendered as [Unix time](https://en.wikipedia.org/wiki/Unix_timestamp), this is to avoid confusion as there can be users with different timezones in the same organisation. A user's timezone can be retrieved from the both the User endpoint and the Current User endpoint. Any request you make must use Unix time for all times.\n\n\u003e [!NOTE]\n\u003e Our [user guide](https://github.com/TandaHQ/api-v2-code-samples/tree/master/user_guides/times) has more information on working with unix times through the API.\n\n\n## Update Timestamps\n\nAs well as the fields listed in the API examples below, every API response will also include an `updated_at` timestamp. This represents the last time that an object was updated. Like all other times returned by the API, it will be formatted as a Unix timestamp.\n\nMany GET endpoints support an `updated_after` querystring parameter. Use this to filter results API-side by the `updated_at` field. Some endpoints *also* support a `show_costs` parameter, and return a `last_costed_at` field. If you pass both `show_costs` and `updated_after`, we will compare to both the `updated_at` and `last_costed_at` field when filtering.\n\nAn example may illustrate this better. Say you have a shift, and at 10am you change its start time. Then, at 11am, costing details for the shift's employee are changed, which causes the cost of the shift to update. The shift's `updated_at` will be 10am, while its `last_costed_at` will be 11am. If you make a call to the shift GET endpoint with `updated_after` of 10:30am, the shift will not be returned. But if you include the `show_costs` parameter when making the call, the shift *will* be returned since it was last costed after 10:30am.\n\n## Audit Trails\n\nEvery change made in Tanda through the API is logged and added to the in-Tanda audit trail. By default, changes will be marked as being made by \"API v2\", with the user ID that corresponds to the authenticated user. If you're building an integration that requires more fine tuned auditing (for example, a token is shared by multiple users, but you're able to identify which user is responsible for a particular action), you can customise the user ID and audit trail name that are displayed. Email developers@tanda.co and we can help you set this up.\n\n## MCP\n\nThe Tanda MCP server currently exposes a limited list of read-only tools to AI assistants (Claude Code, Cursor, Claude.ai, and other MCP clients), covering employees, teams and locations, rosters and shifts, timesheets, leave, and payslips. It does not expose the whole REST API, and it cannot create or change anything.\n\nEach tool reads through the REST API using your OAuth token, so permissions and scoping work exactly as they do for direct API access.\n\nThe server endpoint is `https://my.tanda.co/mcp`.\n\nMCP requests are rate limited to **100 requests per minute** per user.\n\nDuring sign-in, grant the scopes for the data you want the assistant to access (see Scopes above).\n\n### Available tools\n\n| Tool | What it does |\n| --- | --- |\n| `compare_pay_runs` | Compare the organisation's most recent pay run against the one before it and summarise the variances. |\n| `get_award_tags` | List the award tags set up for the organisation. |\n| `get_award_templates` | List the award templates set up for the organisation. |\n| `get_payslips` | Retrieve payslips for an employee. |\n| `get_leave_balances` | Retrieve leave balances (annual leave, sick leave, etc.) for an employee. |\n| `get_leave_requests` | Retrieve leave requests. |\n| `get_locations` | List the locations (sites) available to you. |\n| `get_on_calls` | Retrieve on call periods. |\n| `get_customer_organisations` | Retrieve the organisations available to you (the customer organisations managed by your partner organisation). |\n| `get_positions` | List the current positions set up for the organisation, by name. |\n| `get_qualifications` | List the qualifications set up for the organisation. |\n| `get_roster` | Retrieve the roster that contains a given date. |\n| `get_rostered_days_off` | Retrieve rostered days off (RDOs). |\n| `get_schedules` | Retrieve rostered schedules (planned shifts). |\n| `get_shifts` | Retrieve shifts. |\n| `get_sleepovers` | Retrieve sleepover periods. |\n| `get_teams` | List the teams (departments) in the organisation. |\n| `get_timesheets` | Retrieve timesheets (weekly work records) for an employee. |\n| `get_trainings` | Retrieve the trainings assigned to staff. |\n| `get_user_versions` | Retrieve the change history (audit trail) for one employee. |\n| `get_users` | List the active employees (users) in the organisation. |\n| `get_users_inactive` | List the inactive employees (users) in the organisation. |\n| `get_users_me` | Retrieve the profile of the authenticated user (the caller). |\n| `list_my_organisations` | List the organisations available to the authenticated user. |\n\n### Claude Code\n\nAdd the server from the command line:\n\n```bash\nclaude mcp add --transport http tanda https://my.tanda.co/mcp\n```\n\nThen run `/mcp` in Claude Code and authenticate with your Tanda account when prompted. Claude Code discovers OAuth settings automatically from the well-known endpoints.\n\n### Cursor\n\nAdd the server to your MCP configuration.\n\n```json\n{\n  \"mcpServers\": {\n    \"tanda\": {\n      \"url\": \"https://my.tanda.co/mcp\"\n    }\n  }\n}\n```\n\nOpen **Cursor Settings → Tools \u0026 MCP**, enable the Tanda server, and complete the OAuth sign-in flow in your browser when prompted.\n\n### Claude.ai\n\nIn Claude.ai, add a custom MCP connector pointing at `https://my.tanda.co/mcp`. Claude.ai handles OAuth registration and sign-in automatically.\n\n## Code Samples\n\nWe have a repository of code samples available [on GitHub](https://github.com/TandaHQ/api-v2-code-samples). Here's some guides you might find helpful:\n\n- [Getting started](https://github.com/TandaHQ/api-v2-code-samples/tree/master/user_guides/getting_started)\n- [Building a connection to Salesforce](https://github.com/TandaHQ/api-v2-code-samples/tree/master/user_guides/salesforce_integration)\n\n## Show us what you built!\n\nIf you've built something neat using the API, we'd love to see it. If you've already been chatting to someone from our team, odds are they'd love to see a demo of your integration. Or if you haven't met any of our team before, a good way to introduce yourself is to email developers@tanda.co.\n","version":"v2"},"servers":[{"url":"/api"}],"tags":[{"name":"schedule_acceptance","description":"Operations about schedule_acceptances"},{"name":"unavailability","description":"Operations about unavailabilities"},{"name":"pay_groups","description":"Operations about pay_groups"},{"name":"super_funds","description":"Operations about super_funds"},{"name":"temporary_files","description":"Operations about temporary_files"},{"name":"onboarding_forms","description":"Operations about onboarding_forms"},{"name":"organisation_questions","description":"Operations about organisation_questions"},{"name":"user_contracts","description":"Operations about user_contracts"},{"name":"custom_events","description":"Operations about custom_events"},{"name":"announcement_rooms","description":"Operations about announcement_rooms"},{"name":"announcements","description":"Announcements are messages posted to announcement rooms within your organisation. Use these endpoints to manage announcements and announcement rooms."},{"name":"ats","description":"The Tanda Hire endpoints allow you to manage job postings, applications, candidate data, and hiring workflows.\n\n\u003e [!NOTE]\n\u003e All Tanda Hire endpoints require users to have appropriate Tanda Hire permissions. The specific permission requirements are noted for each endpoint."},{"name":"availability","description":"Availability supersedes [Unavailability](#unavailability) for organisations that have migrated to the availability model.\n\n\u003e [!WARNING]\n\u003e All availability endpoints require the `unavailability` scope (see [Scopes](#header-scopes) for more information).\n\n\n\u003e [!NOTE]\n\u003e Callers only see users they can already see via [Users](#tag/users) — `user_ids` is filtered against the caller's visible-users scope. Unknown or hidden ids are silently dropped. Inactive (terminated) users are included when requested by explicit id, so reports covering past staff keep working.\n\nUnavailability is an employee's way to notify the person building the roster that they are not going to be available during a certain time period. Unavailability is most used by casual staff or employees with flexible hours.\n\nFor specifying times when an employee formally took time off, or to request time off (most often for part time and full time employees), please see [Leave](#tag/leave).\n\n\u003e [!WARNING]\n\u003e This endpoint group is deprecated and will be removed in a future release. Organisations that have migrated to the new availability model should read from [/api/v2/availability/effective](#tag/availability) instead. For migrated organisations this endpoint reflects the legacy unavailability data only and will not include records created in the new availability model.\n\n\n\u003e [!NOTE]\n\u003e If the organisation has unavailability [enabled](https://my.tanda.co/settings#leave), then all employees can CRUD unavailability about themselves. Roster managers, and admins can CRUD unavailability for everyone and department managers can CRUD unavailability for users they can manage."},{"name":"award_tags","description":"\u003e [!NOTE]\n\u003e No special permissions are required to read award tags."},{"name":"award_templates","description":"Use the award templates endpoint to read and update which managed awards an organisation has enabled.\n\n\u003e [!WARNING]\n\u003e Only admins are able to access this endpoint."},{"name":"clockins","description":"Clock ins represent actual times that the employee arrived and left from a location (most often a work site or office).\n\n\u003e [!NOTE]\n\u003e You must be able to manage the user to make a clock in for them. To read clock ins for a user or device, the user must be able to manage the the user, or read the device respectively."},{"name":"cognitive_creator_configuration","description":"Either the `department_id` or `cognitive_creator_configuration_id` fields are required to for creating or updating a cognitive creator configuration.\n\n\u003e [!WARNING]\n\u003e Cognitive creator configuration requires the `department` scope (see [Scopes](#header-scopes) for more information)."},{"name":"datastreamjoins","description":"\u003e [!NOTE]\n\u003e Our [user guide](https://github.com/TandaHQ/api-v2-code-samples/tree/master/user_guides/data_streams) has more information on working with data streams through the API.\n\n\nData Stream Joins connect [Data Streams](#tag/datastreams) to the object which owns the stream's data. For example, data from a stream may be relate to a Team, Location, or to the Organisation itself.\n\nIf a data stream is joined to the organisation, it will show its store stats in the context of the whole organisation. Similarly, if it is joined to one or many teams, it will show its store stats when looking at stats for each of those teams. Data streams that are joined to a team, but *not* the organisation, will show their store stats in the context of the teams, but will *not* show when looking at the organisation as a whole (this is often useful for team specific stats).\n\nData Stream Joins also connect a single 'stat_type' from a data stream. You should specify which stat_type you want to join from the data stream to the Organisation, Location, or Department. For example, your data stream might have both 'sales' data and 'transaction' data in it. If you want to attach sales data to a team, then you must specify the stat_type_id for sales in the payload.\n\nIf you do not specify a stat_type, one will be inferred by what kind of data your datastream has. Eg if your data stream only has sales data in it, the join will automatically be given the sales stat type.\n\n\u003e [!NOTE]\n\u003e Only admins can manage data stream joins.\n\n\nAs well as managing this relationship, a Data Stream Join can also be given a rostering ratio, which is used to calculate how many staff should be rostered into the join's object (the \"streamable\") based on stream data. For example, a data stream might have a total value of 30 (values themselves are provided using [Store Stats](#tag/storestats)) for a half hour period, and the data stream's join to a team might have a rostering ratio of 8. In this case Tanda would recommend that 4 staff be rostered for that half hour period."},{"name":"datastreams","description":"\u003e [!NOTE]\n\u003e Our [user guide](https://github.com/TandaHQ/api-v2-code-samples/tree/master/user_guides/data_streams) has more information on working with data streams through the API.\n\n\nA data stream is a container for many [Store Stats](#tag/storestats). The data stream specifies the origin of the data, an identifier for the origin (if any), and the interval of the data. All store stats added to a data stream should be totaled data for a time period equal to the `data_interval`.\n\nData streams themselves are nice for holding data, but they are made useful by joining them to other objects. See [Data Stream Joins](#tag/datastreamjoins) for more on how this works. The Data Streams endpoint provides some functionality for quickly creating joins, but you should use the Data Stream Joins endpoint if you need more control over their structure or additional attributes.\n\n\u003e [!NOTE]\n\u003e Team managers can read data streams that are joined to their team. General managers and payroll officers can read all data streams, and admins can create read and update all data streams."},{"name":"departments","description":"\u003e [!NOTE]\n\u003e **Departments** are often referred to as **Teams** inside Tanda. Teams belong to a Location.\n\u003e\n\u003e Department managers can read and update information about the departments they manage. Admins can CRUD departments.  Employees can read the departments that they belong to, with a subset of fields (see below)\n\u003e\n\u003e The department group / team group [Feature](/settings/feature_management) needs to be enabled before you can access this field.\n\u003e The assisting teams [Feature](/settings/feature_management) needs to be enabled before you can access this field."},{"name":"devices","description":"Devices are physical time clocks that are used by employees for clocking in and out, a device has many [Clock Ins](#tag/clockins).\n\n\u003e [!NOTE]\n\u003e Admins and department managers can read devices, and admins can and update all devices."},{"name":"leave","description":"Leave is time formally not worked by an employee, due to things like public holidays, sickness, or by accruing annual leave.\n\nFor specifying times when an employee requests not to be rostered, please see [Unavailability](#unavailability).\n\n\u003e [!NOTE]\n\u003e Admins, payroll officers, and roster managers can create, read and update leave requests for all users, and department managers can create, read and update leave requests for users that they manage. Other users are able to create, read and update leave requests for themself. Note that the current user may not update status for their own leave requests unless they are an Admin, payroll officer or roster manager. Deletion of leave requests is not supported."},{"name":"leave_balances","description":"Leave balances denote how much leave (of each type) someone has accrued.\n\n\u003e [!NOTE]\n\u003e Leave balance interactions require the same permissions as [leave requests](#tag/leave)."},{"name":"locations","description":"\u003e [!NOTE]\n\u003e Admins and general managers can CRUD locations. Team managers can read locations which contain teams they manage."},{"name":"on_calls","description":"On calls represent periods where an employee is rostered to be on call. They are used within rosters alongside regular schedules and rostered days off.\n\nOn calls are utilised for:\n- Quick building of rosters.\n- Automatic application of overtime rules where applicable.\n\n\u003e [!NOTE]\n\u003e To view or manage on calls, the user must be a team manager, roster manager, or admin. In the case of the team manager, the shift must be for someone in the user's managed teams."},{"name":"organisations","description":"Use the organisations endpoint to get a list of clients you manage, and register new clients. If you have access to this endpoint, you can also get access tokens for clients you manage.\n\n\u003e [!WARNING]\n\u003e To get access to this endpoint, please contact Tanda.\n\n### Getting an access token for a client\n\nTo act on behalf of a client you manage, ask for a token for them. Send a `POST` to `/api/oauth/token` — the\nsame path you use for a regular password token — with:\n\n| Field | |\n| --- | --- |\n| `access_token` | your own valid token, the one you use to list organisations |\n| `organisation_id` | the client you want a token for, taken from that list |\n| `scope` | one or more scopes, separated by spaces |\n| `grant_type` | must be `partner_token` |\n\nThe token you get back gives you access to that one organisation."},{"name":"payroll","description":"Payslips contain information about an employee's earnings for a specific pay period. They include details about gross pay, tax, deductions, superannuation, and net pay.\n\nDeduction types define categories of deductions that can be applied to employee pay. They include information about tax reduction effects and payment details.\n\nPayroll accounts are used to track different types of financial transactions related to payroll, such as expense accounts and liability accounts.\n\nDepartment tracking categories link departments (teams) to payroll tracking categories, allowing you to assign specific values to each department for payroll reporting.\n\nPay runs represent a complete payroll processing cycle. They include information about the pay period, payment date, and current status.\n\nTracking categories are used in payroll systems to categorize expenses and income for reporting purposes. They can be linked to departments via department tracking categories.\n\nDeduction templates define specific deductions that apply to individual employees. They can be fixed amounts or percentage-based deductions.\n\nCompany files represent Tanda payroll integrations within your organisation. Each company file corresponds to a separate legal entity or payroll structure and determines which locations or employees are included in its payroll processing."},{"name":"personal_details","description":"View \u0026 update personal details.\n\nThese details apply to every account linked under your profile, not just the one you are signed in to.\n\n\u003e [!WARNING]\n\u003e All endpoints here require the `personal` scope.\n\u003e Some endpoints require the `financial` scope to view financial data,\n\u003e or the `user` scope to view data about an employee."},{"name":"positions","description":"Positions are the roles an employee can be assigned. To assign one when creating or updating a user, send its `name` as `position_template_name` on the [Users](#tag/users) endpoints. A user returns that same name as `position_title`.\n\nA position with `department_ids` can only be assigned to a user in at least one of those departments. A position with no `department_ids` can be assigned to anyone.\n\nWithout `page` and `page_size` the list returns every current position, so replace your stored list with each response. With them, read pages until one comes back with fewer than `page_size` positions. Archived positions are left out and can no longer be assigned.\n\n\u003e [!NOTE]\n\u003e Reading positions requires permission to view positions."},{"name":"predicted_storestats","description":"\u003e [!NOTE]\n\u003e Our [user guide](https://github.com/TandaHQ/api-v2-code-samples/tree/master/user_guides/data_streams) has more information on working with data streams through the API.\n\n\nPredicted store stats are identical to the `Store Stats` model, however, instead of being for what actually happened, they are the **prediction** of what will happen. All predicted store stats for a data stream should be totaled data for a time period equal to the data stream's `data_interval`, ending at a predicted store stat's `time`.\n\nOnly predicted store stats where the `type` parameter is equal to \"sales\" will be displayed on the weekly planner on the [dashboard](/dashboard). You're able to store a wide variety of stats in Tanda, and differentiate them using the `type` parameter, but be aware of this special case.\n\n\u003e [!NOTE]\n\u003e Predicted store stats can be read by a user, if that user is able to read the data stream that the store stat belongs to.\n\u003e\n\u003e Only admins can create predicted store stats. They are able to do this for any data stream.\n\u003e\n\u003e The api currently only supports `POST` and `GET` methods  of Predicted Store Stats."},{"name":"public_holidays","description":"Here is a list of public holiday regions supported:\n\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\u003cth\u003eRegion Code\u003c/th\u003e\u003cth\u003eRegion Name\u003c/th\u003e\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\u003ctd\u003eau\u003c/td\u003e\u003ctd\u003eAustralia (national holidays only)\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eau_act\u003c/td\u003e\u003ctd\u003eAustralian Capital Territory\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eau_nsw\u003c/td\u003e\u003ctd\u003eNew South Wales\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eau_nt\u003c/td\u003e\u003ctd\u003eNorthern Territory\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eau_qld\u003c/td\u003e\u003ctd\u003eQueensland\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eau_sa\u003c/td\u003e\u003ctd\u003eSouth Australia\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eau_tas\u003c/td\u003e\u003ctd\u003eTasmania\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eau_vic\u003c/td\u003e\u003ctd\u003eVictoria\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eau_wa\u003c/td\u003e\u003ctd\u003eWestern Australia\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003ecy\u003c/td\u003e\u003ctd\u003eCyprus (national holidays)\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003edo\u003c/td\u003e\u003ctd\u003eDominican Republic (national holidays)\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eel\u003c/td\u003e\u003ctd\u003eGreece (national holidays)\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003efi\u003c/td\u003e\u003ctd\u003eFinland (Finnish) (national holidays)\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003egb\u003c/td\u003e\u003ctd\u003eUnited Kingdom (national holidays only)\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003egb_eng\u003c/td\u003e\u003ctd\u003eEngland\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003egb_nir\u003c/td\u003e\u003ctd\u003eNorthern Island\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003egb_sct\u003c/td\u003e\u003ctd\u003eScotland\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003egb_wls\u003c/td\u003e\u003ctd\u003eWales\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003ejp\u003c/td\u003e\u003ctd\u003eJapan (national holidays)\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003elr\u003c/td\u003e\u003ctd\u003eLiberia (national holidays)\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003enz\u003c/td\u003e\u003ctd\u003eNew Zealand (national holidays)\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003emm\u003c/td\u003e\u003ctd\u003eMyanmar (national holidays)\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003emt_en\u003c/td\u003e\u003ctd\u003eMalta (English) (national holidays)\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003emu\u003c/td\u003e\u003ctd\u003eMauritius (national holidays)\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eus\u003c/td\u003e\u003ctd\u003eUnited States of America (national holidays)\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eza\u003c/td\u003e\u003ctd\u003eSouth Africa (national holidays)\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eph\u003c/td\u003e\u003ctd\u003eThe Philippines (national holidays)\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003evi\u003c/td\u003e\u003ctd\u003eVietnam (national holidays)\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eca\u003c/td\u003e\u003ctd\u003eCanada (national holidays)\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003ebe_fr\u003c/td\u003e\u003ctd\u003eBelgium (national holidays in French)\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003ebe_nl\u003c/td\u003e\u003ctd\u003eBelgium (national holidays in Dutch)\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eth\u003c/td\u003e\u003ctd\u003eThailand (national holidays only)\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003euy\u003c/td\u003e\u003ctd\u003eUruguay (national holidays only)\u003c/td\u003e\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c!-- make sure this list is kept in sync with /config/initializers/03_post_config_patches/holidays_enhancements.rb --\u003e\nYou can see holiday dates in your [System Settings](/settings#public_show_holidays)."},{"name":"qualifications","description":"\u003e [!NOTE]\n\u003e The Qualifications [Feature](/settings/feature_management) needs to be enabled before you can access this endpoint."},{"name":"recommended_hours","description":"Recommended Hours refer to the optimal number of hours a roster should have dependent on Tanda's congitive tool suite."},{"name":"reports","description":"The reports endpoint contains read-only endpoints to answer questions that get asked a lot where the answer is better off automated.\n\n\u003e [!WARNING]\n\u003e All reports require the `cost` scope (see [Scopes](#header-scopes) for more information)."},{"name":"rosters","description":"Rosters are the container for scheduled shifts, each roster runs for 1 week and contains [Schedules](#tag/schedules). For actual times worked, please see [Timesheets](#tag/timesheets) or [Shifts](#tag/shifts).\n\nRosters are not created directly. Instead a roster will be created when creating through the [Schedules](#tag/schedules) endpoint.\n\n\u003e [!NOTE]\n\u003e No special Tanda permissions are required to use the roster endpoint.\n\n\n\u003e [!NOTE]\n\u003e **On-cost amounts are estimates**\n\u003e\n\u003e On-cost amounts are estimates. They are calculated by applying the organisation's on-cost configurations to award-interpreted wage costs, consistent with Tanda's cost reports. They are not statutory payroll calculations. For example, employer National Insurance is estimated as the configured percentage of all eligible cost rather than HMRC's banded calculation on earnings above the threshold, and superannuation rules that depend on age or contribution caps are not applied. Use payroll data for exact figures.\n\u003e\n\u003e Some on-cost configurations only apply once an employee's earnings pass a threshold (such as employer National Insurance). Eligibility can only be assessed against the employee's full pay period, so these configurations are not included in on-cost amounts on the rosters endpoint for UK organisations. Use the [timesheets endpoint](#tag/timesheets) for threshold-aware on-costs."},{"name":"rostered_days_off","description":"Rostered Days Off (RDOs) represent planned days off for employees. They can be paid or unpaid and are used within rosters to streamline scheduling and ensure compliance with overtime rules.\n\nRostered Days Off are utilised for:\n- Quick building of rosters.\n- Automatic application of overtime rules where applicable.\n\n\u003e [!NOTE]\n\u003e To view or manage rostered days off, the user must be a team manager, roster manager, or admin. In the case of the team manager, the shift must be for someone in the user's managed teams."},{"name":"schedule_swap_plans","description":"#### About\nModels the life cycle of swapping a shift between two people. The two people involved in a swap are referred to as the sender (the original staff member) and the recipient (the new staff member).\n\n#### Strategies\nSchedule swap plans can be handled with different strategies. The strategy states include `undecided`, `broadcasted` and `curated`. Schedule swap plans in an `undecided` state, represent a plan that is new and has not had a strategy selected.\n\nWhen a schedule swap plan is using the `broadcasted` strategy, managers will need to approve a person offering to cover the schedule.\n\nWhen a schedule swap plan is using the `curated` strategy, the swap will be assigned to the first person accepting to cover the schedule.\n\n\u003e [!NOTE]\n\u003e Schedule swap plans created less than 3 days in advance of a schedule's start are automatically `broadcated`.\n\n\n#### States\nA schedule swap plan can be in 3 states. The states are `pending`, `approved` and `rejected`."},{"name":"schedule_swap_proposals","description":"#### About\nModels the life cycle of vetting one potential recipient for a schedule swap plan.\n\n#### States\nUsed to specify where a proposal is in its life cycle:\n\n  * Schedule swap proposals which are `concealed` are only visible to managers. and are visible to enable a manager to curate a schedule swap plan.\n\n  * Schedule swap proposals which are `pending` are new and have not been actioned by a user.\n\n  * Schedule swap proposals which are `seen` have been marked as viewed by the users (e.g. a swap can be marked as seen through the API, or by the [Tanda App](https://www.tanda.co/tanda-mobile-scheduling-app/))\n\n  * Schedule swap proposals which are `accepted` have had a user offer to cover the shift but are awaiting approval by a manager.\n\n  * Schedule swap proposals which are `approved` have been accepted, and the user of this proposal is now scheduled to work the shift.\n\n  * Schedule swap proposals which are `rejected` have been declined by either the user or a manager of the user"},{"name":"schedules","description":"Schedules represent planned shifts for a user and are contained in a [Roster](#tag/rosters), for actual times worked please see [Timesheets](#tag/timesheets) or [Shifts](#tag/shifts).\n\n\u003e [!NOTE]\n\u003e No special Tanda permissions are required to view schedules, however only the schedules that would be visible through the UI are visible through the API.\n\u003e\n\u003e To create or change schedules, the user must be a team manager, roster manager, or admin. In the case of the team manager, the shift must be for someone in the user's managed teams.\n\u003e\n\u003e Employees can only see published schedules. Specifying ids of unpublished schedules, or using the `published_only` flag will not change this.\n\n\n\u003e [!NOTE]\n\u003e Looking to just get the roster for an individual employee? Check out our [user guide](https://github.com/TandaHQ/api-v2-code-samples/tree/master/user_guides/my_roster) for a workflow."},{"name":"settings","description":"System settings are accessible through the API if they are visible on the Tanda [settings page](/settings). Please refer to the settings page inside Tanda for up to date documentation on each setting and the options available.\n\n\u003e [!NOTE]\n\u003e Only admins are able to access settings."},{"name":"shift_details","description":"\u003e [!NOTE]\n\u003e Shift details belong to a Team, and can be assigned on Schedules within that team.\n\u003e\n\u003e Teams managers can read and update information about the shift details from the teams they manage. Admins can CRUD shift details."},{"name":"shift_ratings","description":"Either the `user_id` or `employee_number` fields are required to submit a shift rating. The `user_id` is the systems unique id (`id` field from /users) and the employee_number is the employee payroll_number (`employee_number` from /users).\n\nPosting another shift rating for a user for that day will override the current shift rating.\n\n\u003e [!WARNING]\n\u003e Shift Rating requires the `timesheet` scope (see [Scopes](#header-scopes) for more information)."},{"name":"shift_reminders","description":"Shift Reminders are sent as push notifications to the [Tanda App](https://www.tanda.co/tanda-mobile-scheduling-app/) before a [schedule](#tag/schedules) is set to start. Use this endpoint to configure reminders.\n\nThe `minutes_before_shift_start` param, used to control when reminders send, must be a multiple of 5, and must be between 5 and 1435 (ie. it can't be more than 1 day). You can set up as many reminders as you like. Reminders are tied to the current [authenticated user](#tag/users), which means they work across all organisations the user works at."},{"name":"shifts","description":"Shifts represent actual times worked for a user and are contained in a [Timesheet](#tag/timesheets). For rostered times, please see [Rosters](#tag/rosters) or [Schedules](#tag/schedules).\n\n\u003e [!NOTE]\n\u003e A user can see all the shifts on each timesheet that they can see. Shifts can be created, updated and deleted by staff if they have the ability to see their own timesheets (a system setting). All shifts can be created, updated and deleted by roster managers and admins, and department managers can create, update and delete shifts for staff that they manage.\n\n\n\u003e [!NOTE]\n\u003e **On-cost amounts are estimates**\n\u003e\n\u003e On-cost amounts are estimates. They are calculated by applying the organisation's on-cost configurations to award-interpreted wage costs, consistent with Tanda's cost reports. They are not statutory payroll calculations. For example, employer National Insurance is estimated as the configured percentage of all eligible cost rather than HMRC's banded calculation on earnings above the threshold, and superannuation rules that depend on age or contribution caps are not applied. Use payroll data for exact figures.\n\u003e\n\u003e Some on-cost configurations only apply once an employee's earnings pass a threshold (such as employer National Insurance). Eligibility can only be assessed against the employee's full pay period, so these configurations are not included in `oncosts_breakdown` or `cost_with_oncosts` on the shifts endpoint for UK organisations. Use the [timesheets endpoint](#tag/timesheets) for threshold-aware on-costs.\n\u003e\n\u003e On-cost configurations restricted to ordinary hours return `0.0` for leave shifts. Configurations that are not restricted still apply to leave shifts."},{"name":"sleepovers","description":"Sleepovers represent periods where an employee is rostered for a sleepover shift, typically in care services. They are used within rosters alongside regular schedules and rostered days off.\n\nSleepovers are utilised for:\n- Quick building of rosters.\n- Automatic application of overtime rules where applicable.\n\n\u003e [!NOTE]\n\u003e To view or manage sleepovers, the user must be a team manager, roster manager, or admin. In the case of the team manager, the shift must be for someone in the user's managed teams."},{"name":"stat_types","description":"Stat Types connect [Data Streams](#tag/datastreams) to the object which owns the stream's data. For example, data from a stream may be relate to a Team, Location, or to the Organisation itself."},{"name":"storestats","description":"\u003e [!NOTE]\n\u003e Our [user guide](https://github.com/TandaHQ/api-v2-code-samples/tree/master/user_guides/data_streams) has more information on working with data streams through the API.\n\n\nStore stats are the individual statistics that belong to a [Data Stream](#tag/datastreams). All store stats for a data stream should be totaled data for a time period equal to the data stream's `data_interval`, starting at the store stat's `time`.\n\nOnly store stats where the `type` parameter is equal to \"sales\" will be displayed on the weekly planner on the [dashboard](/dashboard). You're able to store a wide variety of stats in Tanda, and differentiate them using the `type` parameter, but be aware of this special case.\n\n\u003e [!NOTE]\n\u003e Store stats can be read by a user, if that user is able to read the data stream that the store stat belongs to.\n\u003e\n\u003e Only admins can create store stats. They are able to do this for any data stream."},{"name":"timeclock_questions","description":"Use Timeclock Questions to create workflows around [clocking in](#tag/clockins). There are currently\nthree types of questions. The types are `allowance`, `shift_tag` and `shift_note`. Answering the\nquestions will perform the following:\n  * An allowance question will apply an allowance to the shift\n  * A shift_tag question will set the tag on the shift\n  * A shift_note question will add a note to the shift\n\n\u003e [!NOTE]\n\u003e These triggers are available:\n\u003e   * start – question is asked when a staff member enters a clockin.\n\u003e   * finish – question is asked when a staff member enters a clockout.\n\n\n\u003e [!NOTE]\n\u003e These conditions are available:\n\u003e   * early – question is only asked when a trigger is early for its corresponding\n\u003e     schedule.\n\u003e   * late – question is only asked when a trigger is late for its corresponding\n\u003e     schedule.\n\u003e   * unscheduled – question is only asked when a trigger has no corresponding\n\u003e     schedule.\n\u003e   * schedule_needs_acceptance - question is asked if the schedule still needs acceptance or if the\n\u003e     schedule is accepted, but the clock in is early or late.\n\u003e   * shift_length_over - question is only asked if the shift length exceeds the condition threshold in hours\n\n\n\u003e [!WARNING]\n\u003e All methods require the `device` scope (see [Scopes](#header-scopes) for more information)."},{"name":"timesheets","description":"Timesheets are the container for actual shifts worked, a timesheet can be for a period of 1 or 2 weeks depending on how the organisation pays their staff. Each timesheet contains many [Shifts](#tag/shifts). For rostered times, please see [Rosters](#tag/rosters) or [Schedules](#tag/schedules).\n\nTimesheets are not created directly. Instead a timesheet will be created when creating through the [Shifts](#tag/shifts) endpoint.\n\n\u003e [!NOTE]\n\u003e Regular employees can only see their own timesheets, roster managers and admins can see all timesheets, and department managers can only see timesheets for staff that they manage.\n\n\n\u003e [!WARNING]\n\u003e All methods require the `timesheet` scope (see [Scopes](#header-scopes) for more information).\n\n\n#### Exporting Timesheets\n\nYou can download a timesheet in an export format to be imported into a payroll system by providing the `export_format` URI parameter. This works with any of the timesheet endpoints.\n\nFor example, making a call to `/api/v2/timesheets/7007?export_format=myob` will return a MYOB-compatible export of the timesheet, and `/api/v2/timesheets/on/2016-03-02?export_format=myob` will return a MYOB-compatible export of all timesheets for that date range.\n\nBy default all timesheets will be returned. Provide the `approved_only` parameter to limit your export to approved timesheets (this is the default behaviour in the Tanda UI). For example, `/api/v2/timesheets/7007?export_format=myob\u0026approved_only=true`.\n\nThe content-type of these responses will not be `application/json` as they are for other API calls - it will depend on the export format requested, but will generally be `text/plain` or `text/csv`.\n\nTimesheets will have their status set to exported when accessed through this endpoint. If you don't want this to happen, include the `skip_status_update` parameter - eg. `/api/v2/timesheets/7007?export_format=myob\u0026skip_status_update=true`. Alternatively, use the [update timesheeet](#tag/timesheets) endpoint to reset their status.\n\n\u003e [!NOTE]\n\u003e **On-cost amounts are estimates**\n\u003e\n\u003e On-cost amounts are estimates. They are calculated by applying the organisation's on-cost configurations to award-interpreted wage costs, consistent with Tanda's cost reports. They are not statutory payroll calculations. For example, employer National Insurance is estimated as the configured percentage of all eligible cost rather than HMRC's banded calculation on earnings above the threshold, and superannuation rules that depend on age or contribution caps are not applied. Use payroll data for exact figures.\n\u003e\n\u003e For UK organisations, some on-cost configurations (such as employer National Insurance) only apply when an employee's projected monthly earnings exceed the applicable HMRC Secondary Threshold. When `include_oncosts=true` is set, the timesheets endpoint determines threshold eligibility from the employee's total pay-period earnings normalised to a 28-day monthly equivalent, matching the logic used in Tanda's cost reports. This works for all pay period lengths. The shifts and rosters endpoints cannot assess threshold eligibility, so they do not include these configurations for UK organisations.\n\u003e\n\u003e On-cost configurations restricted to ordinary hours return `0.0` for leave shifts. Configurations that are not restricted still apply to leave shifts.\n\u003e\n\u003e For non-UK organisations, on-costs are applied at the flat rate regardless of earnings."},{"name":"training_templates","description":"A training template is a course that staff can be assigned, such as an induction or a food safety\ncertificate. It holds the pass mark, whether the training expires, and how the course is delivered.\nYour courses are listed under [Training](/hris/training_templates).\n\nThese endpoints read the courses themselves, not anyone's progress through them. Archived courses are\nnever returned, and neither are the ready-made courses Tanda supplies in the content library — these\nendpoints cover the courses your account built or uploaded, the same ones the Training page lists.\n\n\u003e [!NOTE]\n\u003e Your account needs an HR subscription before you can access these endpoints."},{"name":"trainings","description":"A training is one staff member's record of one course: when it was assigned, how far through it they\nare, whether they passed, and when it expires. Courses themselves are read through\n[Training Templates](#tag/training_templates).\n\nYou only see the trainings your own permissions cover, so a manager sees their team and a staff member\nsees their own. Trainings that have been unassigned are never returned.\n\nTraining completed elsewhere can be recorded by picking the course and attaching the certificate. That\ncreates a training, and is returned here with a `training_type` of `file`.\n\nTwo things are not returned. Training documents uploaded to a staff member's profile are stored as user\nfiles rather than trainings. Notes, files and linked documents added to an existing training are not\npart of the training itself, so only the training they hang off is returned.\n\nListing trainings is paged, 1000 at a time by id. Read `page` by `page` to get through the rest.\n\n\u003e [!NOTE]\n\u003e Your account needs an HR subscription before you can access these endpoints."},{"name":"user_files","description":"User files are documents that can be attached to a user's profile. These files are visible to the user and their managers.\n\n\u003e [!NOTE]\n\u003e Only users with appropriate permissions can upload files. The user making the request must have permission to update the target user.\n\n\nUnlike most endpoints, this endpoint does not accept JSON. Instead it expects multipart form data containing both the user_id and the file.\n\n* If you're writing JavaScript, use the [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData/Using_FormData_Objects) API.\n* If you're using CURL, use the [`-F` (`--form`)](https://medium.com/@petehouston/upload-files-with-curl-93064dcccc76) flag.\n* If you're using Postman, use the [Form-data](https://www.getpostman.com/docs/v6/postman/sending_api_requests/requests) option.\n\nFiles must not be larger than 5mb."},{"name":"user_pay_fields","description":"\u003e [!NOTE]\n\u003e There are no special system permissions required.\n\u003e To access most of these endpoints, you will need the cost scope for your api token.\n\u003e The user the token is generated for must also have custom permissions `edit_wages` on for the staff members they wish to edit pay fields for."},{"name":"users","description":"\u003e [!NOTE]\n\u003e There are no special system permissions to see information about the current user `/users/me`. However, to CRUD users in the organisation, the user will need to be a payroll officer, department manager, roster manager, or admin."},{"name":"wage_comparisons","description":"Wage Comparisons are used to compare the wage cost of employees under different rates of pay."},{"name":"webhooks","description":"Get notified when things happen inside Tanda.\n\n\u003e [!NOTE]\n\u003e Check out our [user guide](https://github.com/TandaHQ/api-v2-code-samples/tree/master/user_guides/webhooks) to walk you through setting up a Webhook - there's no programming knowledge required!\n\n\nThere are three concepts to understand when working with webhooks:\n\n- **Topics**: a topic is a type of event that can happen inside Tanda, for example \"user.created\" or \"clockin.updated\" - a full list of topics can be found below.\n- **Subscriptions**: a subscription is comprised of a URL (where we send the notification payload) and the specific events in Tanda (topics) you want sent to the URL, think of these as the events you have subscribed to be notified about.\n- **Notifications**: a notification is a HTTP POST request we make to the URL you configure in the subscription. All notifications received will follow the format outlined in the notification payload section below.\n\n### Notification Payload\n\n**Headers**\n```http\nContent-Length: 475\nContent-Type: application/json\nX-Webhook-Signature: g7LZCBPlwBg1vid0dOHgt7HToR0=\n```\n\n**Payload**\n```javascript\n{\n  \"hook_key\": \"\",\n  \"hook_time\": \"\",\n  \"payload\": {\n    \"organisation_id\": \"\",\n    \"body\": {},\n    \"topic\": \"\"\n  }\n}\n```\n\n- **hook_key**: The `hook_key` is a UUID associated with the webhook event, if you're worried about duplications interfering with your integration, use this to dedup.\n- **hook_time**: The `hook_time` is the time the event was emitted in epoch format.\n- **body**: The contents of the `payload.body` depend upon what _topic_ the _subscription_ is for, for each topic you can generally find the payload body under the corresponding API endpoint documentation e.g. a subscription to the leaverequest.created event will have the same fields as the response to the endpoint to create a leave request.\n- **topic**: This is the topic name as detailed in the 'Topic' column below.\n\n### Available Topics\n\n| Topic | Description |\n| --- | --- |\n| `clockin.updated` | Sent when a clock in is updated, for example to get a shift ID attached post-processing. **Not** sent when a clock in with a photo is processed — use `clockin.photo` for that. |\n| `clockin.photo` | Sent when a clock in with a photo is processed. Not all clock ins have photos, so this is a subset of `clockin.updated`. |\n| `department.created` | Sent when a team is created. |\n| `department.updated` | Sent when a team is updated. |\n| `department.destroyed` | Sent when a team is destroyed. |\n| `leavebalance.created` | Sent when a leave balance is created. |\n| `leavebalance.updated` | Sent when a leave balance is updated. |\n| `leaverequest.approved` | Sent when a leave request is approved. |\n| `leaverequest.created` | Sent when a leave request is created. |\n| `leaverequest.rejected` | Sent when a leave request is rejected. |\n| `leaverequest.updated` | Sent when a leave request is updated. This includes approval and rejection. |\n| `platform_record.created` | Sent when a platform record is created. |\n| `platform_record.updated` | Sent when a platform record is updated. |\n| `platform_record.destroyed` | Sent when a platform record is destroyed. |\n| `qualification.created` | Sent when a qualification is created. |\n| `qualification.updated` | Sent when a qualification is changed. |\n| `qualification.destroyed` | Sent when a qualification is deleted. |\n| `schedule.created` | Sent when a schedule is created. Not sent for roster templates. |\n| `schedule.updated` | Sent when a schedule is changed. Not sent for roster templates. |\n| `schedule.destroyed` | Sent when a schedule is deleted. Not sent for roster templates. |\n| `schedule.published` | Sent when a schedule is sent to an employee by email or SMS, or when it is printed. |\n| `setting.updated` | Sent when an organisation's settings are changed. |\n| `shift.approved` | Sent when a shift is approved. |\n| `shift.unapproved` | Sent when a shift is unapproved. |\n| `shift.updated` | Sent when a shift is changed. This includes approval. |\n| `super_fund_membership.updated` | Sent when a user's super fund membership is changed. |\n| `timesheet.approved` | Sent when a timesheet is approved. |\n| `timesheet.exported` | Sent when a timesheet is exported. |\n| `timesheet.costed` | Sent when a timesheet is recalculated because something changed elsewhere. Only sent when the recalculation changes the `total_cost` field. |\n| `unavailability.created` | Sent when an unavailability is created. |\n| `user.created` | Sent when a user is created, either manually, by API, or by bulk import. |\n| `user.updated` | Sent when a user is changed. |\n| `user.deactivated` | Sent when a user is deactivated, either manually or via the API. |\n| `user.reactivated` | Sent when a user is reactivated, either manually or via the API. |\n| `user.onboarding_complete` | Sent when a user has completed their onboarding. |\n| `userqualificationversion.created` | Sent when a version of a user's qualification is created. |\n| `ats_jobapplication.stage_changed` | Sent when a job application stage is updated. |\n\nWant to see other topics added to this list? [Let us know](mailto:developers@tanda.co).\n\n### Creating Webhooks\n\nYou can manage webhooks through the API if this is part of a more complicated integration, or through the UI if the\nuse case is simple enough.\n\nManaging them through the API needs an Admin user, and uses the subscription endpoints below.\n\nThrough the UI, the [Webhooks portal](/api/webhooks/new) manages existing subscriptions and creates new ones. Enter a\nURL and a security token, then pick the topics you want sent to that URL.\n\n### Securing Webhooks\n\nTo check a webhook came from us and not someone else, we attach a signature to every request in the\n`X-Webhook-Signature` header. It is built from a secret you give us when you create the subscription.\n\nThe signature is HMAC SHA1. Your secret is the key, and the entire request body is the message:\n\n```\nX-Webhook-Signature = HMACSHA1(Secret Token, Request Body)\n```\n\nIf the signature you compute matches the one we sent, the request came from us and nothing has been altered on the way.\n\n\u003e [!WARNING]\n\u003e Check the value in the `X-Webhook-Signature` header. Other headers may also be present — `X-Hook-Signature` in\n\u003e particular — but they are deprecated and should not be used.\n\nSample code for verifying the signature:\n\n- [NodeJS](https://github.com/TandaHQ/api-v2-code-samples/blob/master/user_guides/webhooks/verify_webhook_samples/node/webhook.js)\n- [Python](https://github.com/TandaHQ/api-v2-code-samples/blob/master/user_guides/webhooks/verify_webhook_samples/python/webhook.py)\n- [Ruby](https://github.com/TandaHQ/api-v2-code-samples/blob/master/user_guides/webhooks/verify_webhook_samples/ruby/webhook.rb)\n\n### Delivery\n\nEvents are sent as best effort. There is no guarantee an event leaves our systems within any particular timeframe, so\ndelivery times vary. Events are also not guaranteed to arrive in the order they happened, so build your receiver to\ncope with that.\n\n### Failures and Retries\n\nWe expect a `200` back within 30 seconds. If we do not get one, we treat the notification as failed and start retrying:\n12 times at roughly five minute intervals, then another 24 times at roughly hourly intervals. We stop as soon as we\nget a `200`.\n\nIf all 36 attempts fail, we stop sending new events to that URL. Events already in flight keep retrying up to their\nown 36 attempts. To start receiving again, re-enable the webhook from the [Webhooks portal](/api/webhooks).\n\n### Best Practices\n\nTest your integration before going live.\n\nAcknowledge receipt immediately by returning a `200`. If your receiver does heavy computation, or waits on the network,\nit may otherwise time out before it answers us.\n\nExpect the same payload more than once. If your logic depends on receiving an event exactly once, make your receiver\nidempotent — storing the `hook_key` for a while and discarding repeats is one way.\n\nExpect events out of order, for the same reason as above.\n\nUse a security token, and verify it."}],"paths":{"/v2/payroll/accounts":{"get":{"summary":"Get Accounts","description":"Get all payroll accounts for the current organisation.\n","security":[{"tanda_oauth":["payroll"]}],"tags":["payroll"],"operationId":"getV2PayrollAccounts","responses":{"200":{"description":"Get Accounts","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PayrollAccount"}}}}}}}},"/v2/payroll/company_files":{"get":{"summary":"Get Company Files","description":"Get all Tanda payroll company files for the current organisation.\n","security":[{"tanda_oauth":["payroll"]}],"tags":["payroll"],"operationId":"getV2PayrollCompanyFiles","responses":{"200":{"description":"Get Company Files","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PayrollCompanyFile"}}}}}}}},"/v2/payroll/company_files/{id}":{"get":{"summary":"Get Company File","description":"Get a single Tanda payroll company file by ID.\n","security":[{"tanda_oauth":[]}],"tags":["payroll"],"operationId":"getV2PayrollCompanyFilesId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Company File","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayrollCompanyFile"}}}}}}},"/v2/payroll/deduction_templates":{"get":{"summary":"Get Deduction Templates","description":"Get all deduction templates for the current organisation.\n","security":[{"tanda_oauth":["payroll"]}],"tags":["payroll"],"operationId":"getV2PayrollDeductionTemplates","responses":{"200":{"description":"Get Deduction Templates","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PayrollDeductionTemplate"}}}}}}},"post":{"summary":"Create Deduction Template","description":"Create a new deduction template.\n","security":[{"tanda_oauth":["payroll"]}],"tags":["payroll"],"operationId":"postV2PayrollDeductionTemplates","requestBody":{"content":{"application/json":{"schema":{"type":"object"},"examples":{"Default":{"value":{"user_id":456,"payroll_deduction_type_id":789,"fixed_amount":100.5,"include_in_aba":true,"aba_reference":"REF123"}}}}}},"responses":{"201":{"description":"Create Deduction Template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayrollDeductionTemplate"}}}}}}},"/v2/payroll/deduction_templates/{id}":{"get":{"summary":"Get Specific Deduction Template","description":"Get a specific deduction template by ID.\n","security":[{"tanda_oauth":["payroll"]}],"tags":["payroll"],"operationId":"getV2PayrollDeductionTemplatesId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Specific Deduction Template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayrollDeductionTemplate"}}}}}},"put":{"summary":"Update Deduction Template","description":"Update an existing deduction template.\n","security":[{"tanda_oauth":["payroll"]}],"tags":["payroll"],"operationId":"putV2PayrollDeductionTemplatesId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"},"examples":{"Default":{"value":{"user_id":456,"payroll_deduction_type_id":789,"percent_of_income":5.0,"fixed_amount":null,"include_in_aba":false,"aba_reference":null}}}}}},"responses":{"200":{"description":"Update Deduction Template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayrollDeductionTemplate"}}}}}},"delete":{"summary":"Delete Deduction Template","description":"Delete a deduction template.\n","security":[{"tanda_oauth":["payroll"]}],"tags":["payroll"],"operationId":"deleteV2PayrollDeductionTemplatesId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"Delete Deduction Template"}}}},"/v2/payroll/deduction_templates/for/{user_id}":{"get":{"summary":"Get Deduction Templates For User","description":"Get all deduction templates for a specific user.\n","security":[{"tanda_oauth":["payroll"]}],"tags":["payroll"],"operationId":"getV2PayrollDeductionTemplatesForUserId","parameters":[{"in":"path","name":"user_id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Deduction Templates For User","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PayrollDeductionTemplate"}}}}}}}},"/v2/payroll/deduction_types":{"get":{"summary":"Get Deduction Types","description":"Get all deduction types for the current organisation.\n","security":[{"tanda_oauth":["payroll"]}],"tags":["payroll"],"operationId":"getV2PayrollDeductionTypes","responses":{"200":{"description":"Get Deduction Types","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PayrollDeductionType"}}}}}}},"post":{"summary":"Create Deduction Type","description":"Create a new deduction type for the organisation.\n","security":[{"tanda_oauth":["payroll"]}],"tags":["payroll"],"operationId":"postV2PayrollDeductionTypes","requestBody":{"content":{"application/json":{"schema":{"type":"object"},"examples":{"Default":{"value":{"name":"Salary Sacrifice","stp_category":"O","reduces_tax":true,"reduces_workcover":false,"reduces_payroll_tax":false,"payroll_account_id":123,"bank_detail":{"bsb":"123456","account_name":"Salary Sacrifice Ltd","account_number":"12345678"}}}}}}},"responses":{"201":{"description":"Create Deduction Type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayrollDeductionType"}}}}}}},"/v2/payroll/deduction_types/{id}":{"get":{"summary":"Get Specific Deduction Type","description":"Get a specific deduction type by ID.\n","security":[{"tanda_oauth":["payroll"]}],"tags":["payroll"],"operationId":"getV2PayrollDeductionTypesId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Specific Deduction Type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayrollDeductionType"}}}}}},"put":{"summary":"Update Deduction Type","description":"Update an existing deduction type.\n","security":[{"tanda_oauth":["payroll"]}],"tags":["payroll"],"operationId":"putV2PayrollDeductionTypesId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"},"examples":{"Default":{"value":{"name":"Updated Salary Sacrifice","reduces_tax":false,"bank_detail":{"bsb":"654321","account_name":"New Salary Sacrifice Ltd","account_number":"87654321"}}}}}}},"responses":{"200":{"description":"Update Deduction Type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayrollDeductionType"}}}}}},"delete":{"summary":"Delete Deduction Type","description":"Delete a deduction type.\n","security":[{"tanda_oauth":["payroll"]}],"tags":["payroll"],"operationId":"deleteV2PayrollDeductionTypesId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"Delete Deduction Type"}}}},"/v2/payroll/pay_runs":{"get":{"summary":"Get Pay Runs","description":"Get all pay runs for the current organisation, with optional filtering by date range, status, or pay group.\n","security":[{"tanda_oauth":["payroll"]}],"tags":["payroll"],"operationId":"getV2PayrollPayRuns","parameters":[{"in":"query","name":"from","description":"Start date for filtering pay runs","required":false,"schema":{"type":"string","format":"date","example":"2016-03-15"}},{"in":"query","name":"to","description":"End date for filtering pay runs. Must be provided if `from` is provided","required":false,"schema":{"type":"string","format":"date","example":"2016-03-17"}},{"in":"query","name":"status","description":"Filter by pay run status","required":false,"schema":{"type":"string","enum":["draft","posting","posting_failed","posted","reverting","reverting_failed","disbursing","disbursed"],"example":"open"}},{"in":"query","name":"pay_group_id","description":"Filter by pay group ID","required":false,"schema":{"type":"integer","format":"int32","example":12345}}],"responses":{"200":{"description":"Get Pay Runs","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PayrollPayRun"}}}}}}}},"/v2/payroll/pay_runs/{id}":{"get":{"summary":"Get Pay Run","description":"Get a specific pay run by ID.\n","security":[{"tanda_oauth":["payroll"]}],"tags":["payroll"],"operationId":"getV2PayrollPayRunsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Pay Run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayrollPayRun"}}}}}}},"/v2/payroll/pay_runs/{id}/journal":{"get":{"summary":"Get Pay Run Journal","description":"Get the accounting journal entries for a specific pay run. The journal includes all debit and credit lines that would be posted to your accounting system for this pay run.\n","security":[{"tanda_oauth":["payroll"]}],"tags":["payroll"],"operationId":"getV2PayrollPayRunsIdJournal","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Pay Run Journal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayrollPayRunJournal"}}}}}}},"/v2/payroll/pay_runs/{id}/payslips":{"get":{"summary":"Get Payslips for Pay Run","description":"Get all payslips belonging to a specific pay run. Results are paginated and sorted by payslip ID for consistent ordering.\n","security":[{"tanda_oauth":["payroll"]}],"tags":["payroll"],"operationId":"getV2PayrollPayRunsIdPayslips","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"page_size","required":false,"schema":{"type":"integer","format":"int32","minimum":1,"maximum":100}},{"in":"query","name":"show_lines","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Get Payslips for Pay Run","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PayrollPayslip"}}}}}}}},"/v2/payroll/payslips":{"get":{"summary":"Get Payslips","description":"Get all payslips for the current organisation. Results are paginated and sorted by pay run start date (newest first), then by payslip ID for consistent ordering within the same pay run.\n","security":[{"tanda_oauth":["payroll"]}],"tags":["payroll"],"operationId":"getV2PayrollPayslips","parameters":[{"in":"query","name":"page","required":false,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"page_size","required":false,"schema":{"type":"integer","format":"int32","minimum":1,"maximum":100}},{"in":"query","name":"pay_run_id","description":"Filter payslips by pay run ID. When provided, only payslips belonging to the specified pay run will be returned.","required":false,"schema":{"type":"integer","format":"int32","example":12345}},{"in":"query","name":"show_lines","description":"Include the `user`, `net_pay_lines` and `liability_lines` breakdown on each payslip","required":false,"schema":{"type":"boolean","example":true}}],"responses":{"200":{"description":"Get Payslips","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PayrollPayslip"}}}}}}}},"/v2/payroll/payslips/{id}":{"get":{"summary":"Get Specific Payslip","description":"Get a specific payslip by ID.\n","security":[{"tanda_oauth":["payroll"]}],"tags":["payroll"],"operationId":"getV2PayrollPayslipsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"show_lines","description":"Include the `user`, `net_pay_lines` and `liability_lines` breakdown on the payslip","required":false,"schema":{"type":"boolean","example":true}}],"responses":{"200":{"description":"Get Specific Payslip","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayrollPayslip"}}}}}}},"/v2/payroll/payslips/for/{user_id}":{"get":{"summary":"Get Payslips For User","description":"Get all payslips for a specific user.\n","security":[{"tanda_oauth":["payroll"]}],"tags":["payroll"],"operationId":"getV2PayrollPayslipsForUserId","parameters":[{"in":"path","name":"user_id","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"show_lines","description":"Include the `user`, `net_pay_lines` and `liability_lines` breakdown on each payslip","required":false,"schema":{"type":"boolean","example":true}}],"responses":{"200":{"description":"Get Payslips For User","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PayrollPayslip"}}}}}}}},"/v2/payroll/tracking_categories":{"get":{"summary":"Get Tracking Categories","description":"Get all tracking categories for the current organisation.\n","security":[{"tanda_oauth":["payroll"]}],"tags":["payroll"],"operationId":"getV2PayrollTrackingCategories","responses":{"200":{"description":"Get Tracking Categories","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PayrollTrackingCategory"}}}}}}}},"/v2/payroll/department_tracking_categories":{"get":{"summary":"Get Department Tracking Categories","description":"Get all department tracking categories for the current organisation.\n","security":[{"tanda_oauth":["payroll"]}],"tags":["payroll"],"operationId":"getV2PayrollDepartmentTrackingCategories","responses":{"200":{"description":"Get Department Tracking Categories","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PayrollDepartmentTrackingCategory"}}}}}}},"post":{"summary":"Create Department Tracking Category","description":"Create a new department tracking category.\n","security":[{"tanda_oauth":["payroll"]}],"tags":["payroll"],"operationId":"postV2PayrollDepartmentTrackingCategories","requestBody":{"content":{"application/json":{"schema":{"type":"object"},"examples":{"Default":{"value":{"payroll_tracking_categories_id":123,"department_id":456,"value":"Management"}}}}}},"responses":{"201":{"description":"Create Department Tracking Category","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayrollDepartmentTrackingCategory"}}}}}}},"/v2/payroll/department_tracking_categories/{id}":{"put":{"summary":"Update Department Tracking Category","description":"Update an existing department tracking category.\n","security":[{"tanda_oauth":["payroll"]}],"tags":["payroll"],"operationId":"putV2PayrollDepartmentTrackingCategoriesId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"},"examples":{"Default":{"value":{"value":"Administration"}}}}}},"responses":{"200":{"description":"Update Department Tracking Category","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayrollDepartmentTrackingCategory"}}}}}},"delete":{"summary":"Delete Department Tracking Category","description":"Delete a department tracking category.\n","security":[{"tanda_oauth":["payroll"]}],"tags":["payroll"],"operationId":"deleteV2PayrollDepartmentTrackingCategoriesId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"Delete Department Tracking Category"}}}},"/v2/ats/jobs":{"get":{"summary":"Get Jobs","description":"Gets information about all accessible job postings.\n\n\u003e [!WARNING]\n\u003e This method requires the `ats` scope and read permissions for jobs.\n","security":[{"tanda_oauth":["ats"]}],"tags":["ats"],"operationId":"getV2AtsJobs","parameters":[{"in":"query","name":"status","description":"Filter by application acceptance status. Options: `accepting`, `not_accepting`","required":false,"schema":{"type":"string","enum":["accepting","not_accepting"],"example":"status"}},{"in":"query","name":"visibility","description":"Filter by job visibility. Options: `public`, `internal`","required":false,"schema":{"type":"string","enum":["public","internal"],"example":"public"}},{"in":"query","name":"updated_after","description":"Time filter to find recently modified jobs","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}},{"in":"query","name":"page","required":false,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"page_size","required":false,"schema":{"type":"integer","format":"int32","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Get Jobs","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ATSJob"}}}}}}}},"/v2/ats/jobs/{id}":{"get":{"summary":"Get Single Job","description":"Gets information about a specific job posting.\n\n\u003e [!WARNING]\n\u003e This method requires the `ats` scope and read permissions for the specific job.\n","security":[{"tanda_oauth":["ats"]}],"tags":["ats"],"operationId":"getV2AtsJobsId","parameters":[{"in":"path","name":"id","description":"Job ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Single Job","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ATSJob"}}}}}}},"/v2/ats/jobs/{job_id}/applications":{"get":{"summary":"Get Applications for Job","description":"Gets all applications for a specific job posting.\n\n\u003e [!WARNING]\n\u003e This method requires the `ats` scope and read permissions for both the job and job applications.\n\nCandidate details in this list do not include `resume_url`. To get a candidate's resume URL, fetch the single application.\n\nThe `stage_id` filter accepts a stage id from the job's own stages (`GET /api/v2/ats/stages?job_id=`) or from the organisation's default stages (`GET /api/v2/ats/stages`).\n","security":[{"tanda_oauth":["ats"]}],"tags":["ats"],"operationId":"getV2AtsJobsJobIdApplications","parameters":[{"in":"path","name":"job_id","description":"The ID of the job","required":true,"schema":{"type":"integer","format":"int32","example":12345}},{"in":"query","name":"stage_id","description":"Filter by current application stage","required":false,"schema":{"type":"integer","format":"int32","example":12345}},{"in":"query","name":"page","required":false,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"page_size","required":false,"schema":{"type":"integer","format":"int32","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Get Applications for Job","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ATSJobApplication"}}}}}}}},"/v2/ats/applications":{"post":{"summary":"Create Job Application","description":"Creates a new job application with candidate information.\n\n\u003e [!WARNING]\n\u003e This method requires the `ats` scope and create permissions for candidates.\n\nThis endpoint creates a job application and handles candidate creation automatically:\n- If a candidate with the provided email already exists in the organisation, their information will be updated and they will be linked to the job\n- If no candidate exists, a new candidate will be created\n- The application will be created in the specified stage, or the default \"Received\" stage if no stage is provided\n- Location assignments for the candidate are handled automatically\n\nRequired fields: `job_id`, `legal_first_name`, `legal_last_name`, `email`\n\nOptional fields: `stage_id`, `candidate_message`, `source`, `skip_new_candidate_notification`, `legal_middle_names`, `phone`, `current_position`, `address`, `date_of_birth`, `right_to_work`, `location_ids`\n\nThe `source` parameter tracks where the application came from and defaults to \"API-V2\" if not provided.\nThe `skip_new_candidate_notification` parameter controls whether new candidate notification emails are sent and defaults to false.\n\n`stage_id` accepts a stage id from the job's own stages (`GET /api/v2/ats/stages?job_id=`) or from the organisation's default stages (`GET /api/v2/ats/stages`).\n","security":[{"tanda_oauth":["ats"]}],"tags":["ats"],"operationId":"postV2AtsApplications","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2AtsApplications"},"examples":{"Create Job Application":{"value":{"job_id":123,"stage_id":456,"candidate_message":"I am very interested in this position and believe I would be a great fit.","source":"Company Website","skip_new_candidate_notification":true,"legal_first_name":"Jane","legal_last_name":"Smith","email":"jane.smith@example.com","legal_middle_names":"Marie","phone":"0412345678","current_position":"Senior Software Developer","address":"123 Collins St, Melbourne VIC","date_of_birth":"1990-05-15","right_to_work":"citizen","location_ids":[123,456]}}}}}},"responses":{"201":{"description":"Create Job Application","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ATSJobApplication"}}}}}}},"/v2/ats/applications/{id}":{"get":{"summary":"Get Single Application","description":"Gets detailed information about a specific job application.\n\nThe candidate details include a `resume_url` for downloading their resume, which is `null` when the candidate has no resume.\n","security":[{"tanda_oauth":["ats"]}],"tags":["ats"],"operationId":"getV2AtsApplicationsId","parameters":[{"in":"path","name":"id","description":"Application ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Single Application","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ATSJobApplication"}}}}}},"put":{"summary":"Update Application Stage","description":"Updates the current stage of a job application.\n\n\u003e [!WARNING]\n\u003e This method requires the `ats` scope and update permissions for job applications.\n\nThis action will update the application's current stage, and trigger any configured email notifications. It will also send a webhook notification if configured.\n\n`stage_id` accepts a stage id from the job's own stages (`GET /api/v2/ats/stages?job_id=`) or from the organisation's default stages (`GET /api/v2/ats/stages`).\n","security":[{"tanda_oauth":["ats"]}],"tags":["ats"],"operationId":"putV2AtsApplicationsId","parameters":[{"in":"path","name":"id","description":"Application ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2AtsApplicationsId"},"examples":{"Update Application Stage":{"value":{"stage_id":456}}}}}},"responses":{"200":{"description":"Update Application Stage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ATSJobApplication"}}}}}}},"/v2/ats/stages":{"get":{"summary":"Get Stages","description":"Gets all available application stages for the organization.\n\n\u003e [!WARNING]\n\u003e This method requires the `ats` scope and read permissions for application stages.\n","security":[{"tanda_oauth":["ats"]}],"tags":["ats"],"operationId":"getV2AtsStages","parameters":[{"in":"query","name":"job_setting_id","description":"Scope stages to a specific job setting","required":false,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"job_id","description":"Scope stages to a job's setting","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Stages","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ATSJobApplicationStage"}}}}}}},"post":{"summary":"Create Stage","description":"Creates a new custom application stage.\n\n\u003e [!WARNING]\n\u003e This method requires the `ats` scope and manage permissions for application stages.\n","security":[{"tanda_oauth":["ats"]}],"tags":["ats"],"operationId":"postV2AtsStages","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2AtsStages"},"examples":{"Create Stage":{"value":{"name":"Technical Interview","color":"#F59E0B","sort_order":5,"email_enabled":true,"email_subject":"Next Steps - Technical Interview","sms_enabled":true,"sms_content":"Hi {{candidate_first_name}}, you've moved to the technical interview stage.","allow_interview_scheduling":true}}}}}},"responses":{"201":{"description":"Create Stage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ATSJobApplicationStage"}}}}}}},"/v2/ats/stages/{id}":{"get":{"summary":"Get Application Stage","description":"Get an application stage.\n\n\u003e [!WARNING]\n\u003e This method requires the `ats` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["ats"]}],"tags":["ats"],"operationId":"getV2AtsStagesId","parameters":[{"in":"path","name":"id","description":"Stage ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Application Stage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ATSJobApplicationStage"}}}}}},"put":{"summary":"Update Stage","description":"Updates an existing application stage.\n","security":[{"tanda_oauth":["ats"]}],"tags":["ats"],"operationId":"putV2AtsStagesId","parameters":[{"in":"path","name":"id","description":"Stage ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2AtsStagesId"},"examples":{"Update Stage":{"value":{"name":"Final Interview","color":"#10B981","email_enabled":false,"sms_enabled":true,"sms_content":"Hi {{candidate_first_name}}, you're through to the final interview.","is_active":true}}}}}},"responses":{"200":{"description":"Update Stage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ATSJobApplicationStage"}}}}}},"delete":{"summary":"Delete Stage","description":"Deletes a custom application stage.\n\n\u003e [!WARNING]\n\u003e - System stages cannot be deleted\n\u003e - Stages with active applications cannot be deleted\n\u003e - This action is permanent and cannot be undone\n","security":[{"tanda_oauth":["ats"]}],"tags":["ats"],"operationId":"deleteV2AtsStagesId","parameters":[{"in":"path","name":"id","description":"Stage ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"Delete Stage"}}}},"/v2/ats/applications/{application_id}/notes":{"get":{"summary":"Get Notes for Application","description":"Gets all notes for a specific job application.\n","security":[{"tanda_oauth":["ats"]}],"tags":["ats"],"operationId":"getV2AtsApplicationsApplicationIdNotes","parameters":[{"in":"path","name":"application_id","description":"The ID of the application","required":true,"schema":{"type":"integer","format":"int32","example":12345}},{"in":"query","name":"page","required":false,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"page_size","required":false,"schema":{"type":"integer","format":"int32","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Get Notes for Application","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ATSJobApplicationNote"}}}}}}},"post":{"summary":"Create Note","description":"Adds a new note to a job application.\n\nNotes support rich text content and file attachments. File attachments should be uploaded first using the temporary files endpoint, then referenced by their file IDs.\n\n\u003e [!WARNING]\n\u003e This method requires the `ats` scope and create permissions for application notes.\n","security":[{"tanda_oauth":["ats"]}],"tags":["ats"],"operationId":"postV2AtsApplicationsApplicationIdNotes","parameters":[{"in":"path","name":"application_id","description":"The ID of the application","required":true,"schema":{"type":"integer","format":"int32","example":12345}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2AtsApplicationsApplicationIdNotes"},"examples":{"Create Note":{"value":{"content":"Candidate showed strong technical skills during the phone screen. Recommend moving to technical interview stage.","date":"2024-01-15","file_ids":["temp-file-uuid-1","temp-file-uuid-2"]}}}}}},"responses":{"201":{"description":"Create Note","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ATSJobApplicationNote"}}}}}}},"/v2/ats/notes/{id}":{"get":{"summary":"Get Single Note","description":"Gets details of a specific application note.\n","security":[{"tanda_oauth":["ats"]}],"tags":["ats"],"operationId":"getV2AtsNotesId","parameters":[{"in":"path","name":"id","description":"The ID of the note","required":true,"schema":{"type":"integer","format":"int32","example":12345}}],"responses":{"200":{"description":"Get Single Note","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ATSJobApplicationNote"}}}}}}},"/v2/ats/candidates":{"post":{"summary":"Create Candidate","description":"Creates a new candidate in your hiring pipeline.\n\n\u003e [!WARNING]\n\u003e This method requires the `ats` scope and create permissions for candidates.\n\nRequired fields: `legal_first_name`, `legal_last_name`, `email`\nOptional fields: `phone`, `current_position`, `address`, `date_of_birth`, `right_to_work`, `location_ids`, `resume_file_id`\n\nThe `location_ids` parameter accepts an array of location IDs that the candidate is interested in. Invalid location IDs are ignored.\n\nTo attach a resume, first upload the file to `POST /api/v2/temporary_files`, then pass the returned `file_id` as `resume_file_id`.\n","security":[{"tanda_oauth":["ats"]}],"tags":["ats"],"operationId":"postV2AtsCandidates","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2AtsCandidates"},"examples":{"Create Candidate":{"value":{"legal_first_name":"Jane","legal_last_name":"Smith","email":"jane.smith@example.com","phone":"0412345678","current_position":"Software Developer","address":"123 Collins St, Melbourne VIC","date_of_birth":"1990-05-15","right_to_work":"citizen","location_ids":[123,456],"resume_file_id":"550e8400-e29b-41d4-a716-446655440000"}}}}}},"responses":{"201":{"description":"Create Candidate","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ATSCandidate"}}}}}}},"/v2/ats/candidates/{id}":{"put":{"summary":"Update Candidate","description":"Updates an existing candidate. Only the fields you send are changed.\n\n\u003e [!WARNING]\n\u003e This method requires the `ats` scope and update permissions for candidates.\n\nOptional fields: `legal_first_name`, `legal_last_name`, `legal_middle_names`, `phone`, `current_position`, `address`, `date_of_birth`, `right_to_work`, `resume_file_id`\n\nA candidate's email address can't be changed.\n\nTo attach a resume, first upload the file to `POST /api/v2/temporary_files`, then pass the returned `file_id` as `resume_file_id`.\n","security":[{"tanda_oauth":["ats"]}],"tags":["ats"],"operationId":"putV2AtsCandidatesId","parameters":[{"in":"path","name":"id","description":"Candidate ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2AtsCandidatesId"},"examples":{"Update Details":{"value":{"phone":"0412345678","date_of_birth":"1990-05-15"}},"Attach Resume":{"value":{"resume_file_id":"550e8400-e29b-41d4-a716-446655440000"}}}}}},"responses":{"200":{"description":"Update Candidate","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ATSCandidate"}}}}}}},"/v2/rosters/on/{date}":{"get":{"summary":"Get Roster that Contains Date","description":"Get the roster that contains a date, will return a `204` response if there is no roster.\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope (see [Scopes](#header-scopes) for more information).\n\u003e\n\u003e If you are using `show_costs=true`, the `cost` scope is also required.\n","security":[{"tanda_oauth":["roster"]}],"tags":["rosters"],"operationId":"getV2RostersOnDate","parameters":[{"in":"path","name":"date","description":"The date that's contained in the roster you are looking for.","required":true,"schema":{"type":"string","format":"date","example":"2016-03-02"}},{"in":"query","name":"show_costs","description":"Whether to show the costs for the roster (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"include_oncosts","description":"Whether to include on-cost additions alongside existing costs. Requires show_costs=true (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"page","required":false,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"page_size","required":false,"schema":{"type":"integer","format":"int32","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Get Roster that Contains Date","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Roster"}}}}}}},"/v2/rosters/current":{"get":{"summary":"Get the Current Roster","description":"Get the current roster.\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope (see [Scopes](#header-scopes) for more information).\n\u003e\n\u003e If you are using `show_costs=true`, the `cost` scope is also required.\n","security":[{"tanda_oauth":["roster"]}],"tags":["rosters"],"operationId":"getV2RostersCurrent","parameters":[{"in":"query","name":"show_costs","description":"Whether to show the costs for the roster (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"include_oncosts","description":"Whether to include on-cost additions alongside existing costs. Requires show_costs=true (defaults to false)","required":false,"schema":{"type":"boolean","example":true}}],"responses":{"200":{"description":"Get the Current Roster","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Roster"}}}}}}},"/v2/rosters/latest":{"get":{"summary":"Get Latest Roster","description":"Get the latest roster.\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["roster"]}],"tags":["rosters"],"operationId":"getV2RostersLatest","parameters":[{"in":"query","name":"show_costs","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"include_oncosts","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Get Latest Roster","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Roster"}}}}}}},"/v2/rosters/sales_targets/{type}/{date}":{"get":{"summary":"Get Sales Target","description":"Get the sales target for a given roster. Optionally filter to a team (`department_id`) or a location (`location_id`) — to filter you must either be an Admin or General Manager, or have read access to the team or location you are requesting.\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["roster"]}],"tags":["rosters"],"operationId":"getV2RostersSalesTargetsTypeDate","parameters":[{"in":"path","name":"type","description":"There are two possible values: `day` and `week`.","required":true,"schema":{"type":"string","enum":["day","week"]}},{"in":"path","name":"date","description":"A date within the roster you are looking for.","required":true,"schema":{"type":"string","format":"date","example":"2018-02-26"}},{"in":"query","name":"department_id","description":"The ID of a team to filter the roster to.","required":false,"schema":{"type":"integer","format":"int32","example":12345}},{"in":"query","name":"location_id","description":"The ID of a location to filter the roster to.","required":false,"schema":{"type":"integer","format":"int32","example":12345}}],"responses":{"200":{"description":"Get Sales Target","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesTargets"}}}}}}},"/v2/rosters/subscribe_url":{"get":{"summary":"Get Roster Subscribe URL","description":"Get the roster subscribe URL.\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["roster"]}],"tags":["rosters"],"operationId":"getV2RostersSubscribeUrl","parameters":[{"in":"query","name":"user_id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Roster Subscribe URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterSubscribeURL"}}}}}}},"/v2/rosters/{id}":{"get":{"summary":"Get Roster","description":"Get a roster by id.\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope (see [Scopes](#header-scopes) for more information).\n\u003e\n\u003e If you are using `show_costs=true`, the `cost` scope is also required.\n","security":[{"tanda_oauth":["roster"]}],"tags":["rosters"],"operationId":"getV2RostersId","parameters":[{"in":"path","name":"id","description":"The id of the roster","required":true,"schema":{"type":"integer","format":"int32","example":12345}},{"in":"query","name":"show_costs","description":"Whether to show the costs for the roster (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"include_oncosts","description":"Whether to include on-cost additions alongside existing costs. Requires show_costs=true (defaults to false)","required":false,"schema":{"type":"boolean","example":true}}],"responses":{"200":{"description":"Get Roster","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Roster"}}}}}}},"/v2/schedules":{"get":{"summary":"Get Schedules","description":"Get multiple schedules by id. You can also get schedules by user IDs with a from and to date — from and to date are required, while user IDs are optional. If no user IDs are provided, all visible schedules (based on the current user's permission levels) will be returned.\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope (see [Scopes](#header-scopes) for more information).\n\u003e\n\u003e If you are using `show_costs=true` or `show_award_interpretation=true`, the `cost` scope is also required.\n","security":[{"tanda_oauth":["roster"]}],"tags":["schedules"],"operationId":"getV2Schedules","parameters":[{"in":"formData","name":"ids","description":"Comma separated list of schedule ids","required":false,"schema":{"type":"array","items":{"type":"string"},"example":"1,2,31337157"}},{"in":"formData","name":"user_ids","description":"Comma separated list of user ids. You can pass user IDs from multiple different organisations, for example if you want to get all schedules for a particular person across companies.","required":false,"schema":{"type":"array","items":{"type":"string"},"example":"1,2,123456"}},{"in":"query","name":"from","description":"From date to lookup schedules in. If provided, from and to can be at most 7 days apart.","required":false,"schema":{"type":"string","format":"date","example":"2016-03-02"}},{"in":"query","name":"to","description":"To date to lookup schedules in. If provided, from and to can be at most 7 days apart.","required":false,"schema":{"type":"string","format":"date","example":"2016-03-02"}},{"in":"query","name":"show_award_interpretation","description":"Whether to show costs breakdown for the schedule (defaults to false).","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"show_activities","description":"If true, the activities within each schedule will be included in the response, each with its `activity_code`/`activity_code_id` and prorated worked `hours`. With `show_costs=true` (and the `cost` scope) each activity also includes its derived `cost`. With `include_names=true`, each activity also includes the activity code's name. Defaults to false.","required":false,"schema":{"type":"boolean","example":false}},{"in":"query","name":"show_costs","description":"Whether to show the costs for the schedule (defaults to false).","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"include_names","description":"If true, the department name and shift detail name (not just ID) will be included in the response. Defaults to false.","required":false,"schema":{"type":"boolean","example":false}},{"in":"query","name":"include_colleagues","description":"If true, shifts for colleagues will be returned. If false, only shifts for the current user will be returned. Defaults to false.","required":false,"schema":{"type":"boolean","example":false}},{"in":"query","name":"published_only","description":"Only retrieve schedules that have been published. Useful for managers to see only published schedules, where they would usually see any schedule. Defaults to false.","required":false,"schema":{"type":"boolean","example":false}},{"in":"query","name":"updated_after","description":"Time filter to find recently created or modified schedules","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}},{"in":"query","name":"platform","description":"If true, Platform data will be returned (defaults to false).","required":false,"schema":{"type":"boolean","example":false}},{"in":"query","name":"location_id","description":"The id of the schedule's location, for filtering.","required":false,"schema":{"type":"integer","format":"int32","example":12345}},{"in":"query","name":"location_ids","description":"Comma delimited location ids, for filtering.","required":false,"schema":{"type":"string","example":"111,112"}},{"in":"query","name":"show_vacant_only","description":"Only retrieve schedules that are vacant. Defaults to false.","required":false,"schema":{"type":"boolean","example":false}},{"in":"query","name":"page","required":false,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"page_size","required":false,"schema":{"type":"integer","format":"int32","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Get Schedules","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Schedule"}}}}}}},"post":{"summary":"Create Schedule","description":"This will create a [Roster](#rosters) for the given date, if it does not already exist.\n\n\u003e [!NOTE]\n\u003e Only one of `breaks` and `automatic_break_length` can be set to non-null values.\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["roster"]}],"tags":["schedules"],"operationId":"postV2Schedules","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2Schedules"},"examples":{"Create Schedule":{"value":{"user_id":123456,"start":1456903800,"finish":1456911000,"department_id":111,"automatic_break_length":30}},"Create vacant Schedule":{"value":{"start":1456903800}}}}}},"responses":{"201":{"description":"Create Schedule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Schedule"}}}}}}},"/v2/schedules/swappable":{"get":{"summary":"List Swappable Schedules","description":"List swappable schedules.\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["roster"]}],"tags":["schedules"],"operationId":"getV2SchedulesSwappable","parameters":[{"in":"query","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"List Swappable Schedules"}}}},"/v2/schedules/limits":{"get":{"summary":"Get Schedule Limits","description":"Get schedule limits.\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["roster"]}],"tags":["schedules"],"operationId":"getV2SchedulesLimits","parameters":[{"in":"formData","name":"user_ids","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"in":"query","name":"show_costs","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"include_names","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Get Schedule Limits"}}}},"/v2/schedules/publish":{"post":{"summary":"Publish Multiple Schedules","description":"Publish multiple schedules at once. Push notifications are sent to users whose schedules have changed since last publish.\n\n\u003e [!NOTE]\n\u003e Only occupied schedules (schedules with a user assigned) will be published. Vacant schedules will be filtered out. Schedules you do not have permission to update will be filtered out and not published.\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["roster"]}],"tags":["schedules"],"operationId":"postV2SchedulesPublish","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2SchedulesPublish"},"examples":{"Publish Schedules":{"value":{"schedule_ids":[123,456,789]}}}}}},"responses":{"201":{"description":"Publish Multiple Schedules","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Schedule"}}}}},"400":{"description":"Cannot publish more than 100 schedules at once!"},"403":{"description":"You do not have permission to publish schedules!"},"404":{"description":"No valid schedules found!"}}}},"/v2/schedules/{id}":{"get":{"summary":"Get Schedule","description":"Get a schedule by id.\n\n\u003e [!WARNING]\n\u003e If you are not able to see the schedule through the UI then you will not be able to see it through the API.\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope (see [Scopes](#header-scopes) for more information).\n\u003e\n\u003e If you are using `show_costs=true`, the `cost` scope is also required.\n","security":[{"tanda_oauth":["roster"]}],"tags":["schedules"],"operationId":"getV2SchedulesId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"show_award_interpretation","description":"Whether to show costs breakdown for the schedule (defaults to false).","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"show_activities","description":"If true, the activities within each schedule will be included in the response, each with its `activity_code`/`activity_code_id` and prorated worked `hours`. With `show_costs=true` (and the `cost` scope) each activity also includes its derived `cost`. With `include_names=true`, each activity also includes the activity code's name. Defaults to false.","required":false,"schema":{"type":"boolean","example":false}},{"in":"query","name":"show_costs","description":"Whether to show the costs for the schedule (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"include_names","description":"If true, the department name and shift detail name (not just ID) will be included in the response. Defaults to false.","required":false,"schema":{"type":"boolean","example":false}},{"in":"query","name":"platform","description":"If true, Platform data will be returned (defaults to false).","required":false,"schema":{"type":"boolean","example":false}}],"responses":{"200":{"description":"Get Schedule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Schedule"}}}}}},"put":{"summary":"Update Schedule","description":"\u003e [!NOTE]\n\u003e Only one of `breaks` and `automatic_break_length` can be set to non-null values. If `automatic_break_length` or `breaks` is already set, you will not be able to change the other unless the set field is cleared (can be done in the same request by setting the currently set field to `null`).\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["roster"]}],"tags":["schedules"],"operationId":"putV2SchedulesId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2SchedulesId"},"examples":{"Update Schedule":{"value":{"start":1456898400,"breaks":[{"start":1456903800,"finish":1456905600,"paid":false,"paid_meal_breaks":false,"length":30},{"start":1456909200,"finish":1456911000,"paid":true,"paid_meal_breaks":false,"length":30}],"automatic_break_length":null,"department_id":null}},"Make Schedule vacant":{"value":{"user_id":null}},"Give Schedule automatic break":{"value":{"automatic_break_length":25,"breaks":null}}}}}},"responses":{"200":{"description":"Update Schedule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Schedule"}}}}}},"delete":{"summary":"Delete Schedule","description":"\u003e [!WARNING]\n\u003e This method requires the `roster` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["roster"]}],"tags":["schedules"],"operationId":"deleteV2SchedulesId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"Delete Schedule"}}}},"/v2/schedules/{id}/versions":{"get":{"summary":"Get Schedule Versions","description":"\u003e [!WARNING]\n\u003e This method requires the `roster` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["roster"]}],"tags":["schedules"],"operationId":"getV2SchedulesIdVersions","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"updated_after","description":"Time filter to find recently created or modified schedule versions","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}}],"responses":{"200":{"description":"Get Schedule Versions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ScheduleVersion"}}}}}}}},"/v2/schedule_acceptance":{"put":{"summary":"Update Schedule Acceptance","description":"Update schedule acceptance.\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["roster"]}],"tags":["schedule_acceptance"],"operationId":"putV2ScheduleAcceptance","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2ScheduleAcceptance"}}}},"responses":{"200":{"description":"Update Schedule Acceptance"}}}},"/v2/locations":{"get":{"summary":"Get Locations","description":"\u003e [!WARNING]\n\u003e This method requires the `department` scope (see [Scopes](#header-scopes) for more information).\n\n\u003e [!NOTE]\n\u003e For business hours data, weekday '0' is Sunday, '1' is Monday, with the rest following that order till '6' which ends on Saturday.\n","security":[{"tanda_oauth":["department"]}],"tags":["locations"],"operationId":"getV2Locations","parameters":[{"in":"query","name":"updated_after","description":"Time filter to find recently created or modified locations","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}},{"in":"query","name":"platform","description":"If true, Platform data will be returned (defaults to false).","required":false,"schema":{"type":"boolean","example":false}},{"in":"query","name":"show_business_hours","description":"If true, business hours will be returned (defaults to false).","required":false,"schema":{"type":"boolean","example":false}},{"in":"query","name":"organisation_id","description":"The ID of an organisation to filter locations to.","required":false,"schema":{"type":"integer","format":"int32","example":12345}}],"responses":{"200":{"description":"Get Locations","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Location"}}}}}}},"post":{"summary":"Create Location","description":"Use this endpoint to create a Location object. Location objects *should* have addresses, but the field is not mandatory - you can create a Location with just a name (though it will not be as useful).\n\nIf an `address` is provided, `latitude` and `longitude` are also required.\n\n\u003e [!WARNING]\n\u003e This method requires the `department` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["department"]}],"tags":["locations"],"operationId":"postV2Locations","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2Locations"},"examples":{"Create Location":{"value":{"name":"Springfield","short_name":"S","latitude":-27.467004,"longitude":153.025453,"address":"Springfield Powerplant Logistics Centre","public_holiday_regions":["au"],"specific_holiday_dates":[{"date":"2016-03-14"},{"date":"2016-08-08","from":12,"to":17}]}},"Create basic Location":{"value":{"name":"Springfield"}}}}}},"responses":{"201":{"description":"Create Location","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Location"}}}}}}},"/v2/locations/{id}":{"get":{"summary":"Get Location","description":"\u003e [!WARNING]\n\u003e This method requires the `department` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["department"]}],"tags":["locations"],"operationId":"getV2LocationsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"platform","description":"If true, Platform data will be returned (defaults to false).","required":false,"schema":{"type":"boolean","example":false}},{"in":"query","name":"show_business_hours","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Get Location","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Location"}}}}}},"put":{"summary":"Update Location","description":"\u003e [!WARNING]\n\u003e This method requires the `department` scope (see [Scopes](#header-scopes) for more information).\n\n\u003e [!NOTE]\n\u003e For business hours data, weekday '0' is Sunday, '1' is Monday, with the rest following that order till '6' which ends on Saturday.\n\u003e Setting a config for a certain weekday through the API will override any existing business hours for that weekday, the rest of the week will stay the same.\n\u003e You can update multiple days at the same time with one request.\n","security":[{"tanda_oauth":["department"]}],"tags":["locations"],"operationId":"putV2LocationsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2LocationsId"},"examples":{"Update Location":{"value":{"name":"Shelbyville","short_name":"S","latitude":-27.467004,"longitude":153.025453}},"Update Business Hours":{"value":{"business_hours":[{"weekday":0,"start":"08:30","finish":"17:00"},{"weekday":1,"start":"6am","finish":"2pm"},{"weekday":1,"start":"3pm","finish":"8pm"},{"weekday":2,"start":"11:30","finish":"11:45pm"}]}}}}}},"responses":{"200":{"description":"Update Location","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Location"}}}}}},"delete":{"summary":"Delete Location","description":"\u003e [!WARNING]\n\u003e This method requires the `department` scope (see [Scopes](#header-scopes) for more information).\n\n\u003e [!NOTE]\n\u003e Locations cannot be deleted if they have any [teams](#departments).\n","security":[{"tanda_oauth":["department"]}],"tags":["locations"],"operationId":"deleteV2LocationsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"Delete Location"}}}},"/v2/locations/{id}/versions":{"get":{"summary":"Get Location Versions","description":"\u003e [!WARNING]\n\u003e This method requires the `department` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["department"]}],"tags":["locations"],"operationId":"getV2LocationsIdVersions","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"updated_after","description":"Time filter to find recently created or modified location versions","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}}],"responses":{"200":{"description":"Get Location Versions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LocationVersion"}}}}}}}},"/v2/departments":{"get":{"summary":"Get Teams","description":"\u003e [!WARNING]\n\u003e This method requires the `department` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["department"]}],"tags":["departments"],"operationId":"getV2Departments","parameters":[{"in":"query","name":"updated_after","description":"Time filter to find recently created or modified teams","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}},{"in":"query","name":"platform","description":"If true, Platform data will be returned (defaults to false).","required":false,"schema":{"type":"boolean","example":false}},{"in":"query","name":"tracking_categories","description":"If true, tracking categories for each team will be returned (defaults to false).","required":false,"schema":{"type":"boolean","example":false}},{"in":"query","name":"show_activity_codes","description":"If true, the activity codes applicable to each team will be returned (defaults to false).","required":false,"schema":{"type":"boolean","example":false}},{"in":"query","name":"location_id","description":"The id of the location, for filtering.","required":false,"schema":{"type":"integer","format":"int32","example":12345}},{"in":"query","name":"location_ids","description":"Comma delimited location ids, for filtering.","required":false,"schema":{"type":"string","example":"111,112"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"page_size","required":false,"schema":{"type":"integer","format":"int32","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Get Teams","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Department"}}}}}}},"post":{"summary":"Create Team","description":"\u003e [!WARNING]\n\u003e This method requires the `department` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["department"]}],"tags":["departments"],"operationId":"postV2Departments","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2Departments"},"examples":{"Create Team":{"value":{"name":"Waiters","location_id":111,"export_name":"WGB-32","colour":"#FBB830","team_group":"Front of House","qualification_ids":[123456],"manager_ids":[4444,5555],"user_ids":[1111,2222,3333]}},"Create Basic Team":{"value":{"name":"Waiters","location_id":"111"}}}}}},"responses":{"201":{"description":"Create Team","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Department"}}}}}}},"/v2/departments/{id}":{"get":{"summary":"Get Team","description":"\u003e [!WARNING]\n\u003e This method requires the `department` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["department"]}],"tags":["departments"],"operationId":"getV2DepartmentsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"platform","description":"If true, Platform data will be returned (defaults to false).","required":false,"schema":{"type":"boolean","example":false}},{"in":"query","name":"show_activity_codes","description":"If true, the activity codes applicable to the team will be returned (defaults to false).","required":false,"schema":{"type":"boolean","example":false}}],"responses":{"200":{"description":"Get Team","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Department"}}}}}},"put":{"summary":"Update Team","description":"\u003e [!WARNING]\n\u003e This method requires the `department` scope (see [Scopes](#header-scopes) for more information).\n\n#### Updating users \u0026 managers\n\n\u003e [!NOTE]\n\u003e Updating a department's users or managers through a PUT request will completely replace existing users and managers with the ids provided.\n\u003e It is recommended to only update users and managers on setup of an account. Users provided must also be active or your request will fail.\n\n#### Updating required team qualifications\n\n\u003e [!NOTE]\n\u003e When providing qualification ids you wish to assign as 'required' to join this team, users in the team must all have the qualification or else your request will fail.\n","security":[{"tanda_oauth":["department"]}],"tags":["departments"],"operationId":"putV2DepartmentsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2DepartmentsId"},"examples":{"Update Team Name":{"value":{"name":"Kitchen Staff"}},"Update Users \u0026 Managers":{"value":{"user_ids":[1111,2222,3333],"manager_ids":[4444,5555]}},"Update Required Qualifications":{"value":{"qualification_ids":[1001,1002]}}}}}},"responses":{"200":{"description":"Update Team","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Department"}}}}}},"delete":{"summary":"Delete Team","description":"\u003e [!WARNING]\n\u003e This method requires the `department` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["department"]}],"tags":["departments"],"operationId":"deleteV2DepartmentsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"Delete Team"}}}},"/v2/departments/{id}/versions":{"get":{"summary":"Get Team Versions","description":"\u003e [!WARNING]\n\u003e This method requires the `department` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["department"]}],"tags":["departments"],"operationId":"getV2DepartmentsIdVersions","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"updated_after","description":"Time filter to find recently created or modified team versions","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}}],"responses":{"200":{"description":"Get Team Versions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentVersion"}}}}}}}},"/v2/shift_details":{"get":{"summary":"Get Shift Details","description":"\u003e [!WARNING]\n\u003e This method requires the `department` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["department"]}],"tags":["shift_details"],"operationId":"getV2ShiftDetails","responses":{"200":{"description":"Get Shift Details","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ShiftDetail"}}}}}}},"post":{"summary":"Create Shift Detail","description":"\u003e [!WARNING]\n\u003e This method requires the `department` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["department"]}],"tags":["shift_details"],"operationId":"postV2ShiftDetails","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2ShiftDetails"},"examples":{"Create Shift Detail":{"value":{"name":"Manager","department_id":808}}}}}},"responses":{"201":{"description":"Create Shift Detail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShiftDetail"}}}}}}},"/v2/shift_details/{id}":{"get":{"summary":"Get Shift Detail","description":"\u003e [!WARNING]\n\u003e This method requires the `department` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["department"]}],"tags":["shift_details"],"operationId":"getV2ShiftDetailsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Shift Detail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShiftDetail"}}}}}},"put":{"summary":"Update Shift Detail","description":"\u003e [!WARNING]\n\u003e This method requires the `department` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["department"]}],"tags":["shift_details"],"operationId":"putV2ShiftDetailsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2ShiftDetailsId"},"examples":{"Update Shift Detail":{"value":{"name":"Shift Runner"}}}}}},"responses":{"200":{"description":"Update Shift Detail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShiftDetail"}}}}}},"delete":{"summary":"Delete Shift Detail","description":"\u003e [!WARNING]\n\u003e This method requires the `department` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["department"]}],"tags":["shift_details"],"operationId":"deleteV2ShiftDetailsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"Delete Shift Detail"}}}},"/v2/award_tags":{"get":{"summary":"Get Award Tags","description":"\u003e [!WARNING]\n\u003e This method requires the `user` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["user"]}],"tags":["award_tags"],"operationId":"getV2AwardTags","parameters":[{"in":"query","name":"updated_after","description":"Time filter to find recently created or modified award tags","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}}],"responses":{"200":{"description":"Get Award Tags","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AwardTag"}}}}}}}},"/v2/award_tags/{id}":{"get":{"summary":"Get Award Tag","description":"\u003e [!WARNING]\n\u003e This method requires the `user` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["user"]}],"tags":["award_tags"],"operationId":"getV2AwardTagsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Award Tag","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AwardTag"}}}}}}},"/v2/positions":{"get":{"summary":"Get Positions","description":"\u003e [!WARNING]\n\u003e This method requires the `user` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["user"]}],"tags":["positions"],"operationId":"getV2Positions","parameters":[{"in":"query","name":"page","required":false,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"page_size","required":false,"schema":{"type":"integer","format":"int32","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Get Positions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Position"}}}}}}}},"/v2/positions/{id}":{"get":{"summary":"Get Position","description":"\u003e [!WARNING]\n\u003e This method requires the `user` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["user"]}],"tags":["positions"],"operationId":"getV2PositionsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Position","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Position"}}}}}}},"/v2/timesheets/for/{user_id}/current":{"get":{"summary":"Get Current Timesheet for User","description":"Returns the given user's timesheet for the current pay period. `me` can be used as the user id to reference the current user.\n\n\u003e [!WARNING]\n\u003e This method requires the `timesheet` scope (see [Scopes](#header-scopes) for more information).\n\u003e\n\u003e If you are using `show_costs=true` or `show_award_interpretation=true`, the `cost` scope is also required.\n","security":[{"tanda_oauth":["timesheet"]}],"tags":["timesheets"],"operationId":"getV2TimesheetsForUserIdCurrent","parameters":[{"in":"path","name":"user_id","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"show_costs","description":"Whether to show the costs for the timesheet (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"include_oncosts","description":"Whether to include on-cost additions alongside existing costs. Requires show_costs=true (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"show_award_interpretation","description":"Whether to show award interpretation for the timesheet (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"show_notes","description":"Whether to show notes for the timesheet (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"show_variance","description":"Whether to show how far each shift ran over or under its rostered hours, and which rostered shift it was measured against. Requires the `roster` scope (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"export_format","description":"The format in which timesheet data should be exported. See the Exporting Timesheets section above for more information.","required":false,"schema":{"type":"string","example":"myob"}},{"in":"query","name":"approved_only","description":"If `true`, only approved timesheets will be returned. Default is `false`.","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"skip_status_update","description":"If `true`, timesheets will not have their status set to `exported` as part of the export. Default is `false`. Only used if `export_format` is provided.","required":false,"schema":{"type":"boolean","example":true}}],"responses":{"200":{"description":"Get Current Timesheet for User","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Timesheet"}}}}}}},"/v2/timesheets/for/{user_id}/on/{date}":{"get":{"summary":"Get Timesheet for User on Date","description":"Returns the given user's timesheet that includes the given date. `me` can be used as the user id to reference the current user.\n\n\u003e [!WARNING]\n\u003e This method requires the `timesheet` scope (see [Scopes](#header-scopes) for more information).\n\u003e\n\u003e If you are using `show_costs=true` or `show_award_interpretation=true`, the `cost` scope is also required.\n","security":[{"tanda_oauth":["timesheet"]}],"tags":["timesheets"],"operationId":"getV2TimesheetsForUserIdOnDate","parameters":[{"in":"path","name":"user_id","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"path","name":"date","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"show_costs","description":"Whether to show the costs for the timesheet (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"include_oncosts","description":"Whether to include on-cost additions alongside existing costs. Requires show_costs=true (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"show_award_interpretation","description":"Whether to show award interpretation for the timesheet (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"show_notes","description":"Whether to show notes for the timesheet (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"show_variance","description":"Whether to show how far each shift ran over or under its rostered hours, and which rostered shift it was measured against. Requires the `roster` scope (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"export_format","description":"The format in which timesheet data should be exported. See the Exporting Timesheets section above for more information.","required":false,"schema":{"type":"string","example":"myob"}},{"in":"query","name":"approved_only","description":"If `true`, only approved timesheets will be returned. Default is `false`.","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"skip_status_update","description":"If `true`, timesheets will not have their status set to `exported` as part of the export. Default is `false`. Only used if `export_format` is provided.","required":false,"schema":{"type":"boolean","example":true}}],"responses":{"200":{"description":"Get Timesheet for User on Date","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Timesheet"}}}}}}},"/v2/timesheets/on/{date}":{"get":{"summary":"Get Timesheets on Date","description":"Returns every visible timesheet that includes the given date.\n\n\u003e [!WARNING]\n\u003e This method requires the `timesheet` scope (see [Scopes](#header-scopes) for more information).\n\u003e\n\u003e If you are using `show_costs=true` or `show_award_interpretation=true`, the `cost` scope is also required.\n","security":[{"tanda_oauth":["timesheet"]}],"tags":["timesheets"],"operationId":"getV2TimesheetsOnDate","parameters":[{"in":"path","name":"date","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"show_costs","description":"Whether to show the costs for the timesheet (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"include_oncosts","description":"Whether to include on-cost additions alongside existing costs. Requires show_costs=true (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"show_award_interpretation","description":"Whether to show award interpretation for the timesheet (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"show_notes","description":"Whether to show notes for the timesheet (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"show_variance","description":"Whether to show how far each shift ran over or under its rostered hours, and which rostered shift it was measured against. Requires the `roster` scope (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"updated_after","description":"Time filter to find recently created or modified timesheets","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}},{"in":"query","name":"export_format","description":"The format in which timesheet data should be exported. See the Exporting Timesheets section above for more information.","required":false,"schema":{"type":"string","example":"myob"}},{"in":"query","name":"report_location_id","description":"The ID of a location for which to filter timesheets to. If provided, only returns timesheets if the timesheet's user's default team (`report_department_id`) is set, and it is a team within this location.","required":false,"schema":{"type":"integer","format":"int32","example":12345}},{"in":"query","name":"approved_only","description":"If `true`, only approved timesheets will be returned. Default is `false`.","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"skip_status_update","description":"If `true`, timesheets will not have their status set to `exported` as part of the export. Default is `false`. Only used if `export_format` is provided.","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"page","required":false,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"page_size","required":false,"schema":{"type":"integer","format":"int32","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Get Timesheets on Date","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Timesheet"}}}}}}}},"/v2/timesheets/current":{"get":{"summary":"Get Current Timesheets","description":"Returns every visible timesheet for the current pay period.\n\n\u003e [!WARNING]\n\u003e This method requires the `timesheet` scope (see [Scopes](#header-scopes) for more information).\n\u003e\n\u003e If you are using `show_costs=true` or `show_award_interpretation=true`, the `cost` scope is also required.\n","security":[{"tanda_oauth":["timesheet"]}],"tags":["timesheets"],"operationId":"getV2TimesheetsCurrent","parameters":[{"in":"query","name":"show_costs","description":"Whether to show the costs for the timesheet (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"include_oncosts","description":"Whether to include on-cost additions alongside existing costs. Requires show_costs=true (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"show_award_interpretation","description":"Whether to show award interpretation for the timesheet (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"show_notes","description":"Whether to show notes for the timesheet (defaults to false). Note that notes can exist at the timesheet level or the shift level, and these can be found through `notes` arrays on the respective objects.","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"show_variance","description":"Whether to show how far each shift ran over or under its rostered hours, and which rostered shift it was measured against. Requires the `roster` scope (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"updated_after","description":"Time filter to find recently created or modified timesheets","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}},{"in":"query","name":"export_format","description":"The format in which timesheet data should be exported. See the Exporting Timesheets section above for more information.","required":false,"schema":{"type":"string","example":"myob"}},{"in":"query","name":"report_location_id","description":"The ID of a location for which to filter timesheets to. If provided, only returns timesheets if the timesheet's user's default team (`report_department_id`) is set, and it is a team within this location.","required":false,"schema":{"type":"integer","format":"int32","example":12345}},{"in":"query","name":"approved_only","description":"If `true`, only approved timesheets will be returned. Default is `false`.","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"skip_status_update","description":"If `true`, timesheets will not have their status set to `exported` as part of the export. Default is `false`. Only used if `export_format` is provided.","required":false,"schema":{"type":"boolean","example":true}}],"responses":{"200":{"description":"Get Current Timesheets","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Timesheet"}}}}}}}},"/v2/timesheets/{id}":{"get":{"summary":"Get Timesheet","description":"Get a timesheet by id.\n\n\u003e [!WARNING]\n\u003e This method requires the `timesheet` scope (see [Scopes](#header-scopes) for more information).\n\u003e\n\u003e If you are using `show_costs=true` or `show_award_interpretation=true`, the `cost` scope is also required.\n","security":[{"tanda_oauth":["timesheet"]}],"tags":["timesheets"],"operationId":"getV2TimesheetsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"show_costs","description":"Whether to show the costs for the timesheet (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"include_oncosts","description":"Whether to include on-cost additions alongside existing costs. Requires show_costs=true (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"show_award_interpretation","description":"Whether to show award interpretation for the timesheet (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"show_notes","description":"Whether to show notes for the timesheet (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"show_variance","description":"Whether to show how far each shift ran over or under its rostered hours, and which rostered shift it was measured against. Requires the `roster` scope (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"export_format","description":"The format in which timesheet data should be exported. See the Exporting Timesheets section above for more information.","required":false,"schema":{"type":"string","example":"myob"}},{"in":"query","name":"approved_only","description":"If `true`, only approved timesheets will be returned. Default is `false`.","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"skip_status_update","description":"If `true`, timesheets will not have their status set to `exported` as part of the export. Default is `false`. Only used if `export_format` is provided.","required":false,"schema":{"type":"boolean","example":true}}],"responses":{"200":{"description":"Get Timesheet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Timesheet"}}}}}},"put":{"summary":"Update Timesheet","description":"Use this endpoint to change a timesheet's status. Three values are accepted: `pending`, `approved`, or `exported`.\n\nIf a timesheet is exported it cannot be edited and its costs are locked. If you are exporting data out of timesheets through the API to be costed externally, you should mark those timesheets as exported at that time.\n\n\u003e [!WARNING]\n\u003e This method requires the `timesheet` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["timesheet"]}],"tags":["timesheets"],"operationId":"putV2TimesheetsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2TimesheetsId"},"examples":{"Update Timesheet":{"value":{"status":"pending"}}}}}},"responses":{"200":{"description":"Update Timesheet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Timesheet"}}}}}}},"/v2/timesheets/{id}/esign":{"put":{"summary":"Esign Timesheet","description":"Esign a timesheet.\n\n\u003e [!WARNING]\n\u003e This method requires the `timesheet` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["timesheet"]}],"tags":["timesheets"],"operationId":"putV2TimesheetsIdEsign","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2TimesheetsIdEsign"}}}},"responses":{"200":{"description":"Esign Timesheet"}}}},"/v2/shifts":{"get":{"summary":"Get Shifts","description":"Get multiple shifts by IDs, user IDs, or from/to dates. You need to provide at least one of these parameters (`ids`, `user_ids`, or `from` + `to`). If you provide more than one, or any of the other parameters below, only shifts that meet all criteria will be returned.\n\nThis method requires the `timesheet` scope. If you are using `show_costs=true` or `show_award_interpretation=true`, the `cost` scope is also required.\n","security":[{"tanda_oauth":["timesheet"]}],"tags":["shifts"],"operationId":"getV2Shifts","parameters":[{"in":"query","name":"ids","description":"Comma separated list of shift IDs","required":false,"schema":{"type":"array","items":{"type":"integer","format":"int32"},"example":"1,2,1337"}},{"in":"query","name":"user_ids","description":"Comma separated list of user IDs","required":false,"schema":{"type":"array","items":{"type":"integer","format":"int32"},"example":"1,2,123456"}},{"in":"query","name":"from","description":"From date to lookup shifts in","required":false,"schema":{"type":"string","format":"date","example":"2016-03-02"}},{"in":"query","name":"to","description":"To date to lookup shifts in","required":false,"schema":{"type":"string","format":"date","example":"2016-03-02"}},{"in":"query","name":"show_costs","description":"Whether to show the costs for the shift (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"include_oncosts","description":"Whether to include on-cost additions alongside existing costs. Requires show_costs=true (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"show_award_interpretation","description":"Whether to show award interpretation for the shifts (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"show_activities","description":"Whether to show the activities within each shift (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"show_associated_tag","description":"Whether to show the associated tag for the shifts (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"show_notes","description":"Whether to show notes for the shifts (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"show_variance","description":"Whether to show how far each shift ran over or under its rostered hours, and which rostered shift it was measured against. Requires the `roster` scope (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"updated_after","description":"Time filter to find recently created or modified shifts","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}},{"in":"query","name":"report_location_id","description":"The ID of a location for which to filter shifts to. If provided, only returns shifts if the shifts's user's default team (`report_department_id`) is set, and it is a team within this location. Note that it is possible for a shift's user's default location to be different to the location at which a shift was worked. This parameter always filters based on the user. For example if a user can work at locations A and B, they default to A, but work at B, a call with `report_location_id=A` will return that user's shifts worked at location B.","required":false,"schema":{"type":"integer","format":"int32","example":12345}},{"in":"query","name":"show_export_name","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"include_names","description":"Whether to include the names of the shift's team, location, user, and activity codes (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"platform","description":"If true, Platform data will be returned (defaults to false).","required":false,"schema":{"type":"boolean","example":false}},{"in":"query","name":"page","required":false,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"page_size","required":false,"schema":{"type":"integer","format":"int32","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Get Shifts","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Shift"}}}}}}},"post":{"summary":"Create Shift","description":"Create a shift for a user, with specified times, on a specified date.\n\nThis will create a timesheet for the user for the given pay period, if one doesn't exist already. The shift object that is returned will have both an `id` (to use for Shift lookups) and a `timesheet_id` (for Timesheet lookups).\n\nWhen a shift is created, the times provided for the `start`, `finish`, `break_start`, and `break_finish` keys will be rounded to the nearest minute. To avoid potentially confusing, you can round them before passing them to the API.\n","security":[{"tanda_oauth":["timesheet"]}],"tags":["shifts"],"operationId":"postV2Shifts","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2Shifts"},"examples":{"Basic":{"summary":"Basic shift","value":{"user_id":123456,"date":"2016-03-12","start":1457741040,"finish":1457762640,"department_id":808,"metadata":"My special metadata"}},"With breaks":{"summary":"Shift with a break","value":{"user_id":123456,"date":"2016-03-12","start":1457741040,"finish":1457762640,"break_start":1457751660,"break_finish":1457753280,"metadata":"My special metadata"}},"Approved":{"summary":"Pre-approved shift","value":{"user_id":123456,"date":"2016-03-12","start":1457741040,"finish":1457762640,"status":"APPROVED","tag":null}},"With allowances":{"summary":"Shift with allowances applied","value":{"user_id":123456,"date":"2016-03-12","start":1457741040,"finish":1457762640,"allowances":[{"id":987654,"value":1}]}}}}}},"responses":{"201":{"description":"Create Shift","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Shift"}}}}}}},"/v2/shifts/limits":{"get":{"summary":"Get Shift Limits","description":"Gets the first and last shifts (based on start date/time) out of all shifts owned by the given users.\n","security":[{"tanda_oauth":["timesheet"]}],"tags":["shifts"],"operationId":"getV2ShiftsLimits","parameters":[{"in":"query","name":"user_ids","description":"Comma separated list of user IDs","required":false,"schema":{"type":"array","items":{"type":"integer","format":"int32"},"example":"123456,987654"}},{"in":"query","name":"include_names","description":"Whether to include the names of the shift's team, location, user, and activity codes (defaults to false)","required":false,"schema":{"type":"boolean","example":true}}],"responses":{"200":{"description":"Get Shift Limits","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Shift"}}}}}}}},"/v2/shifts/active":{"get":{"summary":"Get Active Shifts","description":"Gets a list of shifts that are taking place now. For each shift, returns the user ID, the shift ID, and the shift's current status, which could be either `clocked_in` or `on_break`. Shifts are returned if they have a start time and no finish time.\n","security":[{"tanda_oauth":["timesheet"]}],"tags":["shifts"],"operationId":"getV2ShiftsActive","parameters":[{"in":"query","name":"location_id","required":false,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"location_ids","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Get Active Shifts","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ActiveShift"}}}}}}}},"/v2/shifts/active_activity":{"get":{"summary":"Get Active Activities","description":"Gets a list of users who are currently in an activity, as determined from the activity event log. For each user, returns the user ID, the ID of the activity code they are working on, the ID of the shift the activity belongs to, and the time the activity started. A user is included if their latest activity event within the maximum shift length is a `start`.\n","security":[{"tanda_oauth":["timesheet"]}],"tags":["shifts"],"operationId":"getV2ShiftsActiveActivity","parameters":[{"in":"query","name":"location_id","required":false,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"location_ids","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Get Active Activities","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ActiveActivity"}}}}}}}},"/v2/shifts/{id}":{"get":{"summary":"Get Shift","description":"Get a shift by id.\n\nThis method requires the `timesheet` scope. If you are using `show_costs=true` or `show_award_interpretation=true`, the `cost` scope is also required.\n","security":[{"tanda_oauth":["timesheet"]}],"tags":["shifts"],"operationId":"getV2ShiftsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"show_costs","description":"Whether to show the costs for the shift (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"include_oncosts","description":"Whether to include on-cost additions alongside existing costs. Requires show_costs=true (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"show_award_interpretation","description":"Whether to show award interpretation for the shift (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"show_activities","description":"Whether to show the activities within the shift (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"show_associated_tag","description":"Whether to show the associated tag for the shifts (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"show_notes","description":"Whether to show notes for the shift (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"show_variance","description":"Whether to show how far each shift ran over or under its rostered hours, and which rostered shift it was measured against. Requires the `roster` scope (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"show_export_name","description":"Whether to show the department's export code that the employee worked on the shift (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"include_names","description":"Whether to include the names of the shift's team, location, user, and activity codes (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"platform","description":"If true, Platform data will be returned (defaults to false).","required":false,"schema":{"type":"boolean","example":false}}],"responses":{"200":{"description":"Get Shift","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Shift"}}}}}},"put":{"summary":"Update Shift","description":"When a shift is updated, the times provided for the `start` and `finish` keys will be rounded to the nearest minute. To avoid potentially confusing, you can round them before passing them to the API.\n\nAfter the parent timesheet to which a shift is attached has been exported, you can no longer update the shift.\n","security":[{"tanda_oauth":["timesheet"]}],"tags":["shifts"],"operationId":"putV2ShiftsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2ShiftsId"},"examples":{"Approve":{"summary":"Approve a shift","value":{"status":"APPROVED"}},"Update times":{"summary":"Update the start and finish times","value":{"start":1456901518,"finish":1456916886}},"New date":{"summary":"Move the shift to a new date","value":{"date":"2016-03-03","start":1456987918,"finish":1457003286,"break_start":1456994543,"break_finish":1456996212}},"Allowances":{"summary":"Apply allowances","value":{"allowances":[{"id":987654,"value":1}]}}}}}},"responses":{"200":{"description":"Update Shift","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Shift"}}}}}},"delete":{"summary":"Delete Shift","description":"Shifts can't be deleted if their timesheet has already been exported.","security":[{"tanda_oauth":["timesheet"]}],"tags":["shifts"],"operationId":"deleteV2ShiftsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"Delete Shift"}}}},"/v2/shifts/{id}/versions":{"get":{"summary":"Get Shift Versions","description":"This method requires the `timesheet` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["timesheet"]}],"tags":["shifts"],"operationId":"getV2ShiftsIdVersions","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"updated_after","description":"Time filter to find recently created or modified shift versions","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}}],"responses":{"200":{"description":"Get Shift Versions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ShiftVersion"}}}}}}}},"/v2/shifts/{id}/applicable_allowances":{"get":{"summary":"Get Shift's Applicable Allowances","description":"Get list of manually applied allowances that can apply to a shift, along with the current amount currently applied to the given shift.\n\nThe allowance IDs returned will be the same for all shifts within the organisation, but the values may differ from shift to shift.\n\nAllowances that are configured to apply automatically will not be returned by this endpoint. They will update automatically every time a shift is saved.\n","security":[{"tanda_oauth":["timesheet"]}],"tags":["shifts"],"operationId":"getV2ShiftsIdApplicableAllowances","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Shift's Applicable Allowances","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApplicableAllowance"}}}}}}}},"/v2/shifts/{id}/feedback":{"post":{"summary":"Create Shift Feedback","description":"Create shift feedback.\n\n\u003e [!WARNING]\n\u003e This method requires the `timesheet` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["timesheet"]}],"tags":["shifts"],"operationId":"postV2ShiftsIdFeedback","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2ShiftsIdFeedback"}}}},"responses":{"201":{"description":"Create Shift Feedback"}}}},"/v2/shifts/{shift_id}/breaks":{"get":{"summary":"Get Shift's Breaks","description":"Shift breaks represent a break in a Shift. A shift can have many breaks.\n\nShift breaks inherit access permissions from their parent shift.\n\nAll shift break actions require the `timesheet` scope (see Scopes for more information).\n","security":[{"tanda_oauth":["timesheet"]}],"tags":["shifts"],"operationId":"getV2ShiftsShiftIdBreaks","parameters":[{"in":"path","name":"shift_id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Shift's Breaks","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ShiftBreak"}}}}}}},"post":{"summary":"Create Shift Break","description":"Shift breaks represent a break in a Shift. A shift can have many breaks.\n\nShift breaks inherit access permissions from their parent shift.\n\nAll shift break actions require the `timesheet` scope (see Scopes for more information).\n","security":[{"tanda_oauth":["timesheet"]}],"tags":["shifts"],"operationId":"postV2ShiftsShiftIdBreaks","parameters":[{"in":"path","name":"shift_id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2ShiftsShiftIdBreaks"},"examples":{"Create with times":{"summary":"Create with times","value":{"start":1456908143,"finish":1456909812}},"Create with length":{"summary":"Create with length","value":{"length":45}},"Create with paid":{"summary":"Create with paid","value":{"paid":true}}}}}},"responses":{"201":{"description":"Create Shift Break","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShiftBreak"}}}}}}},"/v2/shifts/{shift_id}/breaks/{id}":{"get":{"summary":"Get Shift Break","description":"Shift breaks represent a break in a Shift. A shift can have many breaks.\n\nShift breaks inherit access permissions from their parent shift.\n\nAll shift break actions require the `timesheet` scope (see Scopes for more information).\n","security":[{"tanda_oauth":["timesheet"]}],"tags":["shifts"],"operationId":"getV2ShiftsShiftIdBreaksId","parameters":[{"in":"path","name":"shift_id","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Shift Break","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShiftBreak"}}}}}},"put":{"summary":"Update Shift Break","description":"When a break is updated, the times provided for the `start` and `finish` keys will be rounded to the nearest minute. To avoid potentially confusing, you can round them before passing them to the API.\n","security":[{"tanda_oauth":["timesheet"]}],"tags":["shifts"],"operationId":"putV2ShiftsShiftIdBreaksId","parameters":[{"in":"path","name":"shift_id","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2ShiftsShiftIdBreaksId"},"examples":{"update shift break":{"summary":"update shift break","value":{"start":1456908143}}}}}},"responses":{"200":{"description":"Update Shift Break","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShiftBreak"}}}}}}},"/v2/shifts/{shift_id}/breaks/{id}/versions":{"get":{"summary":"Get Shift Break Versions","description":"This method requires the `timesheet` scope (see Scopes for more information).\n","security":[{"tanda_oauth":["timesheet"]}],"tags":["shifts"],"operationId":"getV2ShiftsShiftIdBreaksIdVersions","parameters":[{"in":"path","name":"shift_id","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"updated_after","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Shift Break Versions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ShiftBreakVersion"}}}}}}}},"/v2/rostered_days_off":{"get":{"summary":"Get Rostered Days Off","description":"Get rostered days off by roster ID, user ID, or by specific rostered day off IDs. At least one filter parameter is required. Multiple parameters can be used at once.\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope (see [Scopes](#header-scopes) for more information).","security":[{"tanda_oauth":["roster"]}],"tags":["rostered_days_off"],"operationId":"getV2RosteredDaysOff","parameters":[{"in":"query","name":"roster_id","description":"ID of the roster","required":false,"schema":{"type":"integer","format":"int32","example":12345}},{"in":"query","name":"user_id","description":"ID of the user to filter rostered days off","required":false,"schema":{"type":"integer","format":"int32","example":12345}},{"in":"query","name":"ids","description":"Comma-separated list of rostered day off IDs","required":false,"schema":{"type":"array","items":{"type":"integer","format":"int32"},"example":"1,2,3"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"page_size","required":false,"schema":{"type":"integer","format":"int32","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Get Rostered Days Off","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RosteredDayOff"}}}}}}},"post":{"summary":"Create Rostered Day Off","description":"Create a new rostered day off for a user.\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope (see [Scopes](#header-scopes) for more information).","security":[{"tanda_oauth":["roster"]}],"tags":["rostered_days_off"],"operationId":"postV2RosteredDaysOff","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2RosteredDaysOff"},"examples":{"Create Rostered Day Off":{"value":{"user_id":456,"date":"2024-03-15","start":1710500400,"finish":1710522000,"department_id":789}}}}}},"responses":{"201":{"description":"Create Rostered Day Off","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosteredDayOff"}}}}}}},"/v2/rostered_days_off/{id}":{"get":{"summary":"Get Rostered Day Off","description":"Get a specific rostered day off by ID.\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope (see [Scopes](#header-scopes) for more information).","security":[{"tanda_oauth":["roster"]}],"tags":["rostered_days_off"],"operationId":"getV2RosteredDaysOffId","parameters":[{"in":"path","name":"id","description":"ID of the rostered day off","required":true,"schema":{"type":"integer","format":"int32","example":12345}}],"responses":{"200":{"description":"Get Rostered Day Off","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosteredDayOff"}}}}}},"delete":{"summary":"Delete Rostered Day Off","description":"Delete a rostered day off by ID.\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope (see [Scopes](#header-scopes) for more information).","security":[{"tanda_oauth":["roster"]}],"tags":["rostered_days_off"],"operationId":"deleteV2RosteredDaysOffId","parameters":[{"in":"path","name":"id","description":"ID of the rostered day off","required":true,"schema":{"type":"integer","format":"int32","example":12345}}],"responses":{"204":{"description":"Delete Rostered Day Off"}}}},"/v2/sleepovers":{"get":{"summary":"Get Sleepovers","description":"Get sleepovers by roster ID, user ID, or by specific sleepover IDs. At least one filter parameter is required. Multiple parameters can be used at once.\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope (see [Scopes](#header-scopes) for more information).","security":[{"tanda_oauth":["roster"]}],"tags":["sleepovers"],"operationId":"getV2Sleepovers","parameters":[{"in":"query","name":"roster_id","description":"ID of the roster","required":false,"schema":{"type":"integer","format":"int32","example":12345}},{"in":"query","name":"user_id","description":"ID of the user to filter sleepovers","required":false,"schema":{"type":"integer","format":"int32","example":12345}},{"in":"query","name":"ids","description":"Comma-separated list of sleepover IDs","required":false,"schema":{"type":"array","items":{"type":"integer","format":"int32"},"example":"1,2,3"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"page_size","required":false,"schema":{"type":"integer","format":"int32","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Get Sleepovers","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Sleepover"}}}}}}},"post":{"summary":"Create Sleepover","description":"Create a new sleepover for a user.\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope (see [Scopes](#header-scopes) for more information).","security":[{"tanda_oauth":["roster"]}],"tags":["sleepovers"],"operationId":"postV2Sleepovers","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2Sleepovers"},"examples":{"Create Sleepover":{"value":{"user_id":456,"date":"2024-03-15","start":1710500400,"finish":1710522000,"department_id":789}}}}}},"responses":{"201":{"description":"Create Sleepover","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sleepover"}}}}}}},"/v2/sleepovers/{id}":{"get":{"summary":"Get Sleepover","description":"Get a specific sleepover by ID.\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope (see [Scopes](#header-scopes) for more information).","security":[{"tanda_oauth":["roster"]}],"tags":["sleepovers"],"operationId":"getV2SleepoversId","parameters":[{"in":"path","name":"id","description":"ID of the sleepover","required":true,"schema":{"type":"integer","format":"int32","example":12345}}],"responses":{"200":{"description":"Get Sleepover","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sleepover"}}}}}},"delete":{"summary":"Delete Sleepover","description":"Delete a sleepover by ID.\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope (see [Scopes](#header-scopes) for more information).","security":[{"tanda_oauth":["roster"]}],"tags":["sleepovers"],"operationId":"deleteV2SleepoversId","parameters":[{"in":"path","name":"id","description":"ID of the sleepover","required":true,"schema":{"type":"integer","format":"int32","example":12345}}],"responses":{"204":{"description":"Delete Sleepover"}}}},"/v2/on_calls":{"get":{"summary":"Get On Calls","description":"Get on calls by roster ID, user ID, or by specific on call IDs. At least one filter parameter is required. Multiple parameters can be used at once.\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope (see [Scopes](#header-scopes) for more information).","security":[{"tanda_oauth":["roster"]}],"tags":["on_calls"],"operationId":"getV2OnCalls","parameters":[{"in":"query","name":"roster_id","description":"ID of the roster","required":false,"schema":{"type":"integer","format":"int32","example":12345}},{"in":"query","name":"user_id","description":"ID of the user to filter on calls","required":false,"schema":{"type":"integer","format":"int32","example":12345}},{"in":"query","name":"ids","description":"Comma-separated list of on call IDs","required":false,"schema":{"type":"array","items":{"type":"integer","format":"int32"},"example":"1,2,3"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"page_size","required":false,"schema":{"type":"integer","format":"int32","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Get On Calls","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OnCall"}}}}}}},"post":{"summary":"Create On Call","description":"Create a new on call for a user.\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope (see [Scopes](#header-scopes) for more information).","security":[{"tanda_oauth":["roster"]}],"tags":["on_calls"],"operationId":"postV2OnCalls","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2OnCalls"},"examples":{"Create On Call":{"value":{"user_id":456,"date":"2024-03-15","start":1710500400,"finish":1710522000,"department_id":789}}}}}},"responses":{"201":{"description":"Create On Call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnCall"}}}}}}},"/v2/on_calls/{id}":{"get":{"summary":"Get On Call","description":"Get a specific on call by ID.\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope (see [Scopes](#header-scopes) for more information).","security":[{"tanda_oauth":["roster"]}],"tags":["on_calls"],"operationId":"getV2OnCallsId","parameters":[{"in":"path","name":"id","description":"ID of the on call","required":true,"schema":{"type":"integer","format":"int32","example":12345}}],"responses":{"200":{"description":"Get On Call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnCall"}}}}}},"delete":{"summary":"Delete On Call","description":"Delete an on call by ID.\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope (see [Scopes](#header-scopes) for more information).","security":[{"tanda_oauth":["roster"]}],"tags":["on_calls"],"operationId":"deleteV2OnCallsId","parameters":[{"in":"path","name":"id","description":"ID of the on call","required":true,"schema":{"type":"integer","format":"int32","example":12345}}],"responses":{"204":{"description":"Delete On Call"}}}},"/v2/users":{"get":{"summary":"Get Users","description":"Gets information about all visible users.\n\n\u003e [!WARNING]\n\u003e This method requires the `user` scope (see [Scopes](#header-scopes) for more information).\n\u003e\n\u003e If you are using `show_wages=true`, the `cost` scope is also required.\n\u003e\n\u003e If you want to see financial data (including tax declarations, super fund memberships, and bank details), you'll need the `financial` scope. Tax file numbers are only included when using the `financial` scope.\n\u003e\n\u003e If your account contains more than 50 [Qualifications](#qualifications), per-user qualification data will not be returned by default. Include the `show_qualifications=true` option to include it in the response.\n","security":[{"tanda_oauth":["user"]}],"tags":["users"],"operationId":"getV2Users","parameters":[{"in":"query","name":"email","description":"The user's email.","required":false,"schema":{"type":"string","example":"homer.simpson@springfieldpowerplant.com"}},{"in":"query","name":"name","description":"The user's preferred name. Note, you cannot pass both name and email params.","required":false,"schema":{"type":"string","example":"Homer Simpson"}},{"in":"query","name":"show_wages","description":"Whether to show the user's wage (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"show_qualifications","description":"Should the response include qualifications for each user","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"show_inactive","description":"Include inactive staff in your response","required":false,"schema":{"type":"boolean","example":false}},{"in":"query","name":"show_automatic_break_rule_sets","description":"Whether to include each user's automatic break rule sets in the response. Defaults to false.","required":false,"schema":{"type":"boolean","example":false}},{"in":"query","name":"updated_after","description":"Time filter to find recently created or modified users","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}},{"in":"query","name":"report_location_id","description":"The ID of a location for which to filter users to. If provided, only returns users if the user's default team (`report_department_id`) is set, and it is a department, within this location.","required":false,"schema":{"type":"integer","format":"int32","example":12345}},{"in":"query","name":"employee_id","description":"Employee ID to filter by.","required":false,"schema":{"type":"string","example":"CC123"}},{"in":"query","name":"normalised_phone","description":"Normalised phone number to filter by.","required":false,"schema":{"type":"string","example":"%2B61408123654"}},{"in":"query","name":"platform","description":"If true, Platform data will be returned (defaults to false).","required":false,"schema":{"type":"boolean","example":false}},{"in":"query","name":"location_id","description":"The ID of a location  for which to filter users to. If provided, only returns user's that belong to a department assigned to that location.","required":false,"schema":{"type":"integer","format":"int32","example":12345}},{"in":"query","name":"location_ids","description":"Comma separated list of location IDs to filter users to.","required":false,"schema":{"type":"string","example":"111,112"}},{"in":"query","name":"managers_only","description":"Deprecated - use platform_role_ids instead. If true, only returns users who manage at least one team.","required":false,"schema":{"type":"boolean","example":false}},{"in":"query","name":"role_types","description":"The role type for which to filter users by. This can be a list of role types, separated by a comma (ie. `\"manager,employee\"`).","required":false,"schema":{"type":"string","example":"employee"}},{"in":"query","name":"platform_role_ids","description":"The ID of a role for which to filter users by. This can be a list of ids, separated by a comma (ie. `\"111,222,333\"`).","required":false,"schema":{"type":"string","example":"111"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"page_size","required":false,"schema":{"type":"integer","format":"int32","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Get Users","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}}}}},"post":{"summary":"Create User","description":"Creates a user. `name` is the only required field; see the request examples for common variations (tax details, bank details, regular hours).\n\nTo create a manager, give the ids of the teams they manage in `managed_department_ids`. To skip email\nvalidation, use `skip_validation=true`.\n\nEmail addresses currently have to be unique within an organisation, but do not rely on that staying true.\nFetch the list of users first and check the person does not already exist, rather than letting the\nuniqueness rule catch it for you.\n\n\u003e [!WARNING]\n\u003e This method requires the `user` scope (see [Scopes](#header-scopes) for more information).\n\u003e\n\u003e If you plan to assign wage information you will need the `cost` scope. This includes the `employee_id` field.\n\u003e\n\u003e To set financial information (tax declarations, super fund memberships, bank details), you will need the `financial` scope.\n\n\u003e [!NOTE]\n\u003e The `regular_hours` object supports optional `sleepovers`, `on_calls`, and `rostered_days_off` arrays alongside `schedules`. These follow the same format as schedules but without `breaks`. See [Sleepovers](#sleepovers), [On Calls](#on-calls), and [Rostered Days Off](#rostered-days-off) for standalone CRUD endpoints.\n","security":[{"tanda_oauth":["user"]}],"tags":["users"],"operationId":"postV2Users","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2Users"},"examples":{"Create User":{"value":{"name":"Carlton Carlson Jr.","employee_id":"CC123","passcode":"6789","phone":"+61408123654","date_of_birth":"1956-09-25","employment_start_date":"1986-09-24","email":"carl.carlson@springfieldpowerplant.com","report_department_id":111,"preferred_hours":22,"award_template_organisation_id":5324324,"award_tag_ids":[3816],"department_ids":[111],"managed_department_ids":[111],"platform_role_ids":[3816,3817],"yearly_salary":40000,"enable_login":true}},"Minimum fields required":{"value":{"name":"Carlton Carlson Jr."}},"Create Singapore User with Tax Details":{"value":{"name":"Li Wei","employee_id":"LW001","email":"li.wei@company.com.sg","phone":"+6591234567","employment_start_date":"2023-01-01","user_levels":["employee"],"department_ids":[111],"tax_declaration":{"tax_file_number":"S1234567A","employment_basis":"full_time","singapore_tax_detail":{"legal_status":"singapore_citizen","nationality":"singaporean","race":"chinese","religion":"buddhism","marital_status":"married"}}}},"Create New Zealand User with Tax Details":{"value":{"name":"Kane Williamson","employee_id":"KW001","email":"kane.williamson@company.co.nz","phone":"+6421234567","employment_start_date":"2023-01-01","user_levels":["employee"],"department_ids":[111],"tax_declaration":{"tax_file_number":"49098576","employment_basis":"full_time","nz_tax_code":"ME","nz_esct_rate":"17.5","nz_source_of_income":"primary_income"}}},"Create UK User with Tax Details":{"value":{"name":"John Smith","employee_id":"JS001","email":"john.smith@company.co.uk","phone":"+447700900123","employment_start_date":"2023-01-01","user_levels":["employee"],"department_ids":[111],"tax_declaration":{"tax_file_number":"AB123456C","tax_code":"1150L","uk_tax_year_status":"first_job","uk_national_insurance_code":"A","student_loan":false}}},"Create Singapore User with Bank Details":{"value":{"name":"Tan Wei Ming","bank_details":{"bank_name":"DBS Bank Limited","account_name":"Tan Wei Ming","account_number":"0010572841"}}},"Create Regular Hours":{"value":{"name":"Steve Barnett","regular_hours":{"start_date":"2021-01-01","schedules":[{"week":1,"day":"Monday","start":"09:00","end":"17:00","department_id":1234,"breaks":"12:00-13:00"},{"week":2,"day":"Tuesday","start":"10:00","end":"20:00","department_id":4321,"breaks":"12:00-13:00"}],"sleepovers":[{"week":1,"day":"Monday","start":"22:00","end":"06:00","department_id":1234}],"on_calls":[{"week":1,"day":"Tuesday","start":"18:00","end":"06:00","department_id":1234}],"rostered_days_off":[{"week":1,"day":"Wednesday","start":"00:00","end":"00:00"}]}}}}}}},"responses":{"201":{"description":"Create User","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"400":{"description":"Invalid parameters, such as an unknown award template, super fund, platform role, or team"},"403":{"description":"You lack permission to create users, or to set the requested roles or pay data"},"404":{"description":"A referenced record could not be found (e.g. a position template)"},"422":{"description":"Missing or invalid required fields — e.g. incomplete bank, tax declaration, super fund, or regular-hours details"}}}},"/v2/users/me":{"get":{"summary":"Get Current User","description":"Gets information about the current user (i.e. the user that has been authenticated).\n\n\u003e [!WARNING]\n\u003e This method requires the `me` scope (see [Scopes](#header-scopes) for more information).\n\n\u003e [!NOTE]\n\u003e `time_zone` uses zone names from the [IANA Time Zone Database](http://www.iana.org/time-zones). See our [user guide](https://github.com/TandaHQ/api-v2-code-samples/tree/master/user_guides/times) for more on using times with the Tanda API.\n","security":[{"tanda_oauth":["me"]}],"tags":["users"],"operationId":"getV2UsersMe","responses":{"200":{"description":"Get Current User","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentUser"}}}}}}},"/v2/users/inactive":{"get":{"summary":"Get Inactive Users","description":"\u003e [!WARNING]\n\u003e This method requires the `user` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["user"]}],"tags":["users"],"operationId":"getV2UsersInactive","parameters":[{"in":"query","name":"updated_after","description":"Time filter to find recently created or modified users","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}},{"in":"query","name":"email","description":"The user's email.","required":false,"schema":{"type":"string","example":"homer.simpson@springfieldpowerplant.com"}},{"in":"query","name":"name","description":"The user's preferred name. Note, you cannot pass both name and email params.","required":false,"schema":{"type":"string","example":"Homer Simpson"}},{"in":"query","name":"report_location_id","description":"The ID of a location for which to filter users to. If provided, only returns users if the user's default team (`report_department_id`) is set, and it is a department, within this location.","required":false,"schema":{"type":"integer","format":"int32","example":12345}},{"in":"query","name":"page","required":false,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"page_size","required":false,"schema":{"type":"integer","format":"int32","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Get Inactive Users","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}}}}}},"/v2/users/onboarding":{"post":{"summary":"Invite User for Onboarding","description":"If you are using [Tanda's employee onboarding](https://www.tanda.co/employee-onboarding/), you can use this endpoint to automatically invite new staff to be onboarded. It takes a name and email, and optionally a phone number and custom message, and sends the employee a link to a form where they can add their details.\n","security":[{"tanda_oauth":["user"]}],"tags":["users"],"operationId":"postV2UsersOnboarding","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2UsersOnboarding"},"examples":{"Create User for Onboarding":{"value":{"name":"Eddard Sheppard","email":"carl.carlson@springfieldpowerplant.com","phone":"+61408123654","custom_message":"Welcome to the company!"}}}}}},"responses":{"201":{"description":"Invite User for Onboarding"}}}},"/v2/users/create/bulk":{"post":{"summary":"Bulk Create Users","description":"Bulk create users.\n\n\u003e [!WARNING]\n\u003e This method requires the `user` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["user"]}],"tags":["users"],"operationId":"postV2UsersCreateBulk","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2UsersCreateBulk"}}}},"responses":{"201":{"description":"Bulk Create Users","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}}}}}},"/v2/users/update/bulk":{"put":{"summary":"Bulk Update Users","description":"Bulk update users.\n\n\u003e [!WARNING]\n\u003e This method requires the `user` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["user"]}],"tags":["users"],"operationId":"putV2UsersUpdateBulk","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2UsersUpdateBulk"}}}},"responses":{"200":{"description":"Bulk Update Users","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}}}}}},"/v2/users/invite/bulk":{"post":{"summary":"Bulk Invite Users","description":"Bulk invite users.\n\n\u003e [!WARNING]\n\u003e This method requires the `user` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["user"]}],"tags":["users"],"operationId":"postV2UsersInviteBulk","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2UsersInviteBulk"}}}},"responses":{"201":{"description":"Bulk Invite Users"}}}},"/v2/users/{id}":{"get":{"summary":"Get User","description":"Gets information about a user.\n\n\u003e [!WARNING]\n\u003e This method requires the `user` scope (see [Scopes](#header-scopes) for more information).\n\u003e\n\u003e If you are using `show_wages=true`, the `cost` scope is also required.\n","security":[{"tanda_oauth":["user"]}],"tags":["users"],"operationId":"getV2UsersId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"show_wages","description":"Whether to show the user's wage (defaults to false)","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"show_answers","description":"Whether to include the user's answered onboarding questions in the response. Defaults to false.","required":false,"schema":{"type":"boolean","example":false}},{"in":"query","name":"platform","description":"If true, Platform data will be returned (defaults to false)","required":false,"schema":{"type":"boolean","example":false}}],"responses":{"200":{"description":"Get User","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}}},"put":{"summary":"Update User","description":"\u003e [!WARNING]\n\u003e This method requires the `user` scope (see [Scopes](#header-scopes) for more information).\n\u003e\n\u003e If you plan to update wage information you will need the `cost` scope (this includes the `employee_id` field). To set financial information, you will need the `financial` scope.\n\nTo skip email validation when updating a user, use `skip_validation=true`. To remove a user's `department_id`s or `managed_department_id`s, pass `null`. Passing `null` for a passcode regenerates it rather than removing it. Updating a Tax File Number requires the `financial` scope; you can POST/PUT a TFN but cannot read it except for your own user record.\n\nA Tax File Number is either 8 or 9 digits, or one of the exemptions `exempt_underage`, `exempt_applied`,\n`exempt_allowance` or `exempt_pensioner`. Anything else comes back as a validation error.\n\nEmail addresses currently have to be unique within an organisation, but do not rely on that staying true.\nFetch the list of users first and check the address is not already taken.\n\n\u003e [!NOTE]\n\u003e The `regular_hours` object supports optional `sleepovers`, `on_calls`, and `rostered_days_off` arrays alongside `schedules`. These follow the same format as schedules but without `breaks`. See [Sleepovers](#sleepovers), [On Calls](#on-calls), and [Rostered Days Off](#rostered-days-off) for standalone CRUD endpoints.\n\u003e\n\u003e The UUID for uploading a `file_id` to a qualification can be found at the [create temporary file endpoint](#temporary-files).\n","security":[{"tanda_oauth":["user"]}],"tags":["users"],"operationId":"putV2UsersId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2UsersId"},"examples":{"Update User":{"value":{"name":"Lenford Leonard","legal_first_name":"Lenford","legal_middle_names":"Leonard","legal_last_name":"Leonard","employee_id":"Lenford","passcode":"0123","phone":"0404123122","date_of_birth":"1990-12-12","employment_start_date":"2016-03-01","email":"some_email@test.com","hourly_rate":12.34,"enable_login":true,"qualifications":[{"qualification_id":2345,"enabled":true,"training_provider_name":"Acme Training Ltd","state_of_completion":"QLD","license_number":"BCD234","expires":"2012-11-21","in_training":false,"file_id":"2d4ab757-637c-4be2-b2d6-5f89ae211ba4"}]}},"Deactivate User":{"value":{"active":false}},"Remove Departments":{"value":{"department_ids":null}},"Update Singapore Tax Details":{"value":{"tax_declaration":{"singapore_tax_detail":{"legal_status":"permanent_resident","nationality":"malaysian","race":"chinese","religion":"christianity","marital_status":"married","issue_date":"2022-06-01"}}}},"Update New Zealand Tax Details":{"value":{"tax_declaration":{"nz_tax_code":"ME_SL","nz_esct_rate":"30","nz_source_of_income":"secondary_income"}}},"Update UK National Insurance Code":{"value":{"tax_declaration":{"uk_national_insurance_code":"A"}}},"Update Singapore Bank Details":{"value":{"bank_details":{"bank_name":"OCBC Bank","account_name":"Tan Wei Ming","account_number":"1234567890"}}},"Update Regular Hours":{"value":{"regular_hours":{"start_date":"2021-01-01","schedules":[{"week":1,"day":"Monday","start":"09:00","end":"17:00","department_id":1234,"breaks":"12:00-13:00"}],"sleepovers":[{"week":1,"day":"Monday","start":"22:00","end":"06:00","department_id":1234}],"on_calls":[{"week":1,"day":"Tuesday","start":"18:00","end":"06:00","department_id":1234}],"rostered_days_off":[{"week":1,"day":"Wednesday","start":"00:00","end":"00:00"}]}}}}}}},"responses":{"200":{"description":"Update User","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"400":{"description":"Invalid parameters, or an action not permitted on your own user (e.g. changing your own login or active status)"},"403":{"description":"You lack permission to modify this user or the requested fields"},"404":{"description":"No known user with that ID"},"422":{"description":"Missing or invalid required fields — e.g. incomplete tax declaration or super fund details, or an invalid country"}}},"delete":{"summary":"Delete User","description":"This endpoint will just mark the user as inactive and return the user, this effectively does the same as the [deactivate user request](#users-user-put) above.\n\n\u003e [!WARNING]\n\u003e This method requires the `user` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["user"]}],"tags":["users"],"operationId":"deleteV2UsersId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Delete User","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}}}},"/v2/users/{id}/versions":{"get":{"summary":"Get User Versions","description":"\u003e [!WARNING]\n\u003e This method requires the `user` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["user"]}],"tags":["users"],"operationId":"getV2UsersIdVersions","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"updated_after","description":"Time filter to find recently created or modified user versions","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}},{"in":"query","name":"include","description":"Also return changes to the user's associated records. Accepts qualifications, emergency_contacts, address, roles, bank_details, tax_declaration, super_fund_memberships, kiwi_saver, deduction_templates, pay_condition_sets and regular_hours. roles needs a caller who can assign them; bank_details, tax_declaration, super_fund_memberships and kiwi_saver need the same access as the employee's financial details; deduction_templates needs what GET /payroll/deduction_templates needs; pay_condition_sets needs what GET /user_pay_fields needs; regular_hours needs the same access as the employee's regular hours in the product. regular_hours covers the pattern's start date, each shift's weekday, start, end, team and breaks, and each rostered day off, sleepover and on call block's weekday, start, end and team, with times in the employee's time zone; the event names which kind of item it was, and one taken out of the pattern is a destroy event. Each set of employment conditions has its own copy of the regular hours, so a regular_hours entry also carries applies_during: the from and until dates those conditions run now, not when the change was made, with until null while they are ongoing. The tax file number is never reported. Each entry carries the item_type of its own record, so a UserQualification change can be told from a User change, and a pay_condition_sets event says whether it was an employment condition set or a wage comparison.","required":false,"schema":{"type":"array","items":{"type":"string","enum":["qualifications","emergency_contacts","address","roles","bank_details","tax_declaration","super_fund_memberships","kiwi_saver","deduction_templates","pay_condition_sets","regular_hours"]},"example":["qualifications"]}},{"in":"query","name":"show_wages","description":"Whether to report changes to the user's pay rate (defaults to false)","required":false,"schema":{"type":"boolean","example":true}}],"responses":{"200":{"description":"Get User Versions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserVersion"}}}}}}}},"/v2/users/{id}/invite":{"post":{"summary":"Invite User","description":"This endpoint takes a user ID and sends that user an email invite to use Tanda.\n\nFor the invite to send, all of the following have to be true:\n\n- you have the User Invites permission\n- you can manage the user\n- the user has an email address, and it is valid\n- the user has not already signed up\n- the user does not already have a valid invitation\n\n\u003e [!WARNING]\n\u003e This method requires the `user` scope (see [Scopes](#header-scopes) for more information).\n\u003e\n\u003e Failure to meet the prerequisites will result in a returned `400`, `403` or `404`; otherwise a `201 CREATED` will be returned.\n","security":[{"tanda_oauth":["user"]}],"tags":["users"],"operationId":"postV2UsersIdInvite","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"201":{"description":"Invite User"}}}},"/v2/users/{id}/onboard":{"post":{"summary":"Invite Existing User for Onboarding","description":"If you have created a new user with the `Create User` endpoint and are using [Tanda's employee onboarding](https://www.tanda.co/employee-onboarding/), you can use this endpoint to trigger the onboarding process for the new user.\n\n\u003e [!WARNING]\n\u003e This endpoint is intended only for brand new users created from the `Create User` endpoint. If the user has already been invited to Tanda you cannot use this endpoint.\n","security":[{"tanda_oauth":["user"]}],"tags":["users"],"operationId":"postV2UsersIdOnboard","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"201":{"description":"Invite Existing User for Onboarding"}}}},"/v2/users/{id}/alternate_rates":{"get":{"summary":"Get Alternate Rates","description":"Alternate Rates are user level assigned hourly rates based on team. `employment_contract_id` is an optional param for all Alternate Rate endpoints. If no `employment_contract_id` is included, the endpoint will refrence the latest employment contract.\n\n\u003e [!WARNING]\n\u003e These endpoint actions require `Allow Additional Rates` to be enabled under your organisation's feature management settings.\n\n\u003e [!WARNING]\n\u003e This method requires the `user` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["user"]}],"tags":["users"],"operationId":"getV2UsersIdAlternateRates","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"employment_contract_id","description":"The ID of an user's employment contract","required":false,"schema":{"type":"integer","format":"int32","example":12345}}],"responses":{"200":{"description":"Get Alternate Rates","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlternateRates"}}}}}},"put":{"summary":"Update Alternate Rates","description":"To create and update a user's alternate rate(s) data, include the user's `id` and `alternate_rates` array. Alternate rates can only be assigned to teams that are scoped to the user; only one alternate rate can be assigned per team, and the rate must be different from the user's base hourly rate.\n\n\u003e [!WARNING]\n\u003e This method requires the `user` scope (see [Scopes](#header-scopes) for more information).\n\u003e\n\u003e Successfully using this endpoint will overwrite all existing alternate rates for the user.\n","security":[{"tanda_oauth":["user"]}],"tags":["users"],"operationId":"putV2UsersIdAlternateRates","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2UsersIdAlternateRates"},"examples":{"Alternate Rates":{"value":{"id":123456,"employment_contract_id":987654,"alternate_rates":[{"department_id":987654,"hourly_rate":20.01},{"department_id":987653,"hourly_rate":7.99},{"department_id":987652,"hourly_rate":8}]}}}}}},"responses":{"201":{"description":"Update Alternate Rates","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlternateRates"}}}}}},"delete":{"summary":"Delete Alternate Rates","description":"\u003e [!WARNING]\n\u003e This method requires the `user` scope (see [Scopes](#header-scopes) for more information).\n\u003e\n\u003e This method will delete ALL alternate rates for the user.\n","security":[{"tanda_oauth":["user"]}],"tags":["users"],"operationId":"deleteV2UsersIdAlternateRates","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"employment_contract_id","description":"The ID of an user's employment contract","required":false,"schema":{"type":"integer","format":"int32","example":12345}}],"responses":{"204":{"description":"Delete Alternate Rates"}}}},"/v2/leave":{"get":{"summary":"Get Leave List","description":"Lookup multiple leave requests in a single request.\n\nYour URL parameters must include:\n\n- `from` and `to`, *or*\n- `ids`, *or*\n- all 3 of the above\n\nYou can also specify `user_ids` to further filter your request.\n\n\u003e [!WARNING]\n\u003e This method requires the `leave` scope (see [Scopes](#header-scopes) for more information).\n\n\u003e [!WARNING]\n\u003e You will only be able to query up to 366 days when specifying `from` and `to`.\n\n\u003e [!WARNING]\n\u003e By default inactive users are excluded.\n","security":[{"tanda_oauth":["leave"]}],"tags":["leave"],"operationId":"getV2Leave","parameters":[{"in":"formData","name":"ids","description":"Comma separated list of leave ids to lookup","required":false,"schema":{"type":"array","items":{"type":"string"},"example":"1,2,666"}},{"in":"query","name":"from","description":"From date to lookup leave in","required":false,"schema":{"type":"string","format":"date","example":"2016-03-15"}},{"in":"query","name":"to","description":"To date to lookup leave in","required":false,"schema":{"type":"string","format":"date","example":"2016-03-17"}},{"in":"formData","name":"user_ids","description":"Comma separated list of user ids to lookup leave for","required":false,"schema":{"type":"array","items":{"type":"string"},"example":"1,2,123456"}},{"in":"query","name":"updated_after","description":"Time filter to find recently created or modified leave requests","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}},{"in":"query","name":"include_inactive","description":"Include inactive staff in your response.","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"page","required":false,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"page_size","required":false,"schema":{"type":"integer","format":"int32","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Get Leave List","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Leave"}}}}}}},"post":{"summary":"Create Leave Request","description":"Note that a status for a new Leave Request is required. Managers can create approved leave requests for their staff, and themselves if permitted by the organisation settings. Admins can create approved leave requests for all staff. Employees may only create pending leave requests. The server will respond with a 400 when a user creates a leave request violating the above requirements.\n\nLeave request status must be one of: \"pending\", \"approved\", \"rejected\".\n\nWhen a leave request is created with status \"approved\", a [Shift](#shifts) will be created for each day the leave request spans, and will be attached to the leave request. If a `department_id` is passed, these shifts will be categorised with the team corresponding to the `department_id`. Passing a `department_id` will have no consequence if the leave request status is \"pending\" or \"rejected\". Note that the `department_id` will *not* be returned by the API, since technically it is a property of the shift, not of the leave request.\n\nIf you are building a user interface for the creation of leave requests, you might like to use the [default hours endpoint](#leave-requests-default-leave-hours-get) to get recommendations for the `hours` field as the user chooses their dates.\n\nYou can attach a file when creating a leave request using the `file_id` parameter. See the [temporary files](#temporary-files) endpoint for more information. The file should be a JPEG, PNG, GIF, or PDF.\n\n\u003e [!WARNING]\n\u003e This method requires the `leave` scope (see [Scopes](#header-scopes) for more information).\n\n\u003e [!NOTE]\n\u003e New: time fields, and all_day boolean added to leave. Time fields allow leave to apply to a portion of a day, instead of a whole day. The date part of the time fields is not to be used and when returned from the API will always use the ruby default date of `2000-01-01`.\n","security":[{"tanda_oauth":["leave"]}],"tags":["leave"],"operationId":"postV2Leave","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2Leave"},"examples":{"Create Leave":{"value":{"reason":"Sick Day","department_id":2,"user_id":123456,"hours":114.0,"start":"2016-03-07","start_time":"2000-01-01 09:30:00","finish":"2016-03-07","finish_time":"2000-01-01 17:30:00","leave_type":"Sick Leave","fallback_leave_type":"Unpaid Leave","status":"pending","all_day":false,"file_id":"73fe3430-4f5d-3a0a-84a7-cffbeb5efeb2","daily_breakdown":[{"date":"2016-03-07","hours":114.0,"all_day":true,"start_time":"2016-03-07T09:30:00+1000","finish_time":"2016-03-07T17:30:00+1000"}]}}}}}},"responses":{"201":{"description":"Create Leave Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Leave"}}}}}}},"/v2/leave/types_for/{user_id}":{"get":{"summary":"Get Leave Types for User","description":"\u003e [!WARNING]\n\u003e This method requires the `leave` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["leave"]}],"tags":["leave"],"operationId":"getV2LeaveTypesForUserId","parameters":[{"in":"path","name":"user_id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Leave Types for User"}}}},"/v2/leave/types_with_details_for/{user_id}":{"get":{"summary":"Get Leave Types with details for User","description":"\u003e [!WARNING]\n\u003e This method requires the `leave` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["leave"]}],"tags":["leave"],"operationId":"getV2LeaveTypesWithDetailsForUserId","parameters":[{"in":"path","name":"user_id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Leave Types with details for User"}}}},"/v2/leave/hours_between":{"get":{"summary":"Get Default Hours for a Leave Request","description":"Use this endpoint to get a recommendation for the number of hours of leave someone should take based on the given dates. This will take into account public holidays and weekends, and the default leave hours setting in an account. For example, if given a date range of 5 days, of which 1 is a weekend and 1 is a holiday, and with a default leave hours setting of 7.6, the endpoint will return 22.8 hours.\n\n\u003e [!WARNING]\n\u003e This method requires the `leave` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["leave"]}],"tags":["leave"],"operationId":"getV2LeaveHoursBetween","parameters":[{"in":"query","name":"finish","description":"Finish date of leave request","required":true,"schema":{"type":"string","format":"date","example":"2016-03-17"}},{"in":"query","name":"start","description":"Start date of leave request","required":true,"schema":{"type":"string","format":"date","example":"2016-03-15"}},{"in":"query","name":"user_id","description":"The id of the user","required":true,"schema":{"type":"integer","format":"int32","example":12345}},{"in":"query","name":"all_day","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"view_in_days","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"finish_time","required":false,"schema":{"type":"string","format":"date-time"}},{"in":"query","name":"leave_type","description":"The leave type","required":false,"schema":{"type":"string","example":"Annual Leave"}},{"in":"query","name":"start_time","required":false,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Get Default Hours for a Leave Request"}}}},"/v2/leave/{id}":{"get":{"summary":"Get Leave Request","description":"\u003e [!WARNING]\n\u003e This method requires the `leave` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["leave"]}],"tags":["leave"],"operationId":"getV2LeaveId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Leave Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Leave"}}}}}},"put":{"summary":"Update Leave Request","description":"\u003e [!WARNING]\n\u003e This method requires the `leave` scope (see [Scopes](#header-scopes) for more information).\n\n\u003e [!WARNING]\n\u003e Employees cannot update a leave request, with the exception of rejecting their own pending leave request.\n","security":[{"tanda_oauth":["leave"]}],"tags":["leave"],"operationId":"putV2LeaveId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2LeaveId"},"examples":{"Update Leave":{"value":{"reason":"Really Really Sick"}}}}}},"responses":{"200":{"description":"Update Leave Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Leave"}}}}}},"delete":{"summary":"Delete Leave","description":"Delete a leave request.\n\n\u003e [!WARNING]\n\u003e This method requires the `leave` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["leave"]}],"tags":["leave"],"operationId":"deleteV2LeaveId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"Delete Leave"}}}},"/v2/leave/{id}/versions":{"get":{"summary":"Get Leave Request Versions","description":"\u003e [!WARNING]\n\u003e This method requires the `leave` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["leave"]}],"tags":["leave"],"operationId":"getV2LeaveIdVersions","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"updated_after","description":"Time filter to find recently created or modified leave request versions","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}}],"responses":{"200":{"description":"Get Leave Request Versions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LeaveVersion"}}}}}}}},"/v2/unavailability":{"get":{"summary":"Get Unavailabilities","description":"Lookup multiple leave requests in a single request.\n\nYou **must** specify either both `from` and `to` or `ids` (you can specify both if you want too). `user_ids` can be specified in any case.\n\n\u003e [!WARNING]\n\u003e This method requires the `unavailability` scope (see [Scopes](#header-scopes) for more information).\n\n\u003e [!WARNING]\n\u003e You will only be able to query up to 366 days when specifying `from` and `to`.\n","security":[{"tanda_oauth":["unavailability"]}],"tags":["unavailability"],"operationId":"getV2Unavailability","parameters":[{"in":"formData","name":"ids","description":"Comma separated list of unavailability ids to lookup","required":false,"schema":{"type":"array","items":{"type":"string"},"example":"1,2,42"}},{"in":"query","name":"from","description":"From date to lookup unavailability in","required":false,"schema":{"type":"string","format":"date","example":"2016-03-15"}},{"in":"query","name":"to","description":"To date to lookup unavailability in","required":false,"schema":{"type":"string","format":"date","example":"2016-04-05"}},{"in":"formData","name":"user_ids","description":"Comma separated list of user ids to lookup unavailability for","required":false,"schema":{"type":"array","items":{"type":"string"},"example":"1,2,123456"}},{"in":"query","name":"updated_after","description":"Time filter to find recently created or modified unavailability","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}}],"responses":{"200":{"description":"Get Unavailabilities"}}},"post":{"summary":"Create Unavailability","description":"\u003e [!WARNING]\n\u003e This method requires the `unavailability` scope (see [Scopes](#header-scopes) for more information).\n\nThere's two ways to create unavailabilities: using dates (for `all_day` events), or using times (for events that don't go all day).\n\nRegardless of which method you use, you should use the [unavailability minimum date from the Settings endpoint](#system-settings) to validate your dates or times locally. If you pass a time that is earlier than the minimum date (in the given user's time zone), the request will fail.  You can override the failure by setting the override_validations flag.\n\nTo create an event using dates, use these parameters. Note that `date_from` and `date_to` are inclusive. If you have an unavailability that only goes for one day, they should have the same value. If you have an unavailability that goes for two full days, they should be one day apart, etc.\n\n* `all_day`: `true`\n* `user_id` - **integer**\n* `title` - **string**\n* `repeating` - **boolean**\n* `date_from` - **string**, eg \"2016-03-15\"\n* `date_to` - **string**, eg \"2016-03-16\" - In this example, you will be unavailable on the 15th AND the 16th of March\n\nTo create an event using times, use these parameters:\n\n* `all_day`: `false`\n* `user_id` - **integer**\n* `title` - **string**\n* `repeating` - **boolean**\n* `start` - **integer**, eg 1459375200\n* `finish` - **integer**, eg 1459382400 - In this example, you will be unavailable from 2016-03-30 22:00:00 UTC to 2016-03-31 00:00:00 UTC\n\nTo bypass checking minimum date and published schedule checks, use override_validations:\n\n* `all_day`: `true`\n* `override_validations`: `true`\n* `user_id` - **integer**\n* `title` - **string**\n* `repeating` - **boolean**\n* `start` - **integer**, eg 1459375200\n* `finish` - **integer**, eg 1459382400 - In this example, you will be unavailable from 2016-03-30 22:00:00 UTC to 2016-03-31 00:00:00 UTC\n\nYou can also use the `repeating` param to tell an event to repeat. For example:\n\n* `all_day`: `false`\n* `user_id` - **integer**\n* `title` - **string**\n* `repeating` - `true`\n* `repeating_info`: `{\"interval\": \"week\",\"occurrences\": 4}`\n* `start` - **integer**, eg 1494838800\n* `finish` - **integer**, eg 1494867600 - In this example, you will be unavailable from 2017-05-15 09:00:00 UTC to 2017-05-15 17:00:00 UTC, and at the same times for the next 3 weeks after (4 weeks total).\n\nThere's more examples in the sidebar. The examples are based on a user in the AEST+10 time zone.\n","security":[{"tanda_oauth":["unavailability"]}],"tags":["unavailability"],"operationId":"postV2Unavailability","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2Unavailability"},"examples":{"Create Unavailability":{"value":{"user_id":123456,"title":"Buying a unicycle","start":1459375200,"finish":1459382400,"repeating":false}},"Create all day Unavailability":{"value":{"user_id":123456,"title":"Buying a unicycle","date_from":"2017-05-15","date_to":"2017-05-15","repeating":false,"all_day":true}},"Create repeating Unavailability":{"value":{"user_id":123456,"title":"Learning to ride my unicycle","start":1459382400,"finish":1459389600,"repeating":true,"repeating_info":{"interval":"day","occurrences":3}}}}}}},"responses":{"201":{"description":"Create Unavailability"}}}},"/v2/unavailability/{id}":{"get":{"summary":"Get Unavailability","description":"\u003e [!WARNING]\n\u003e This method requires the `unavailability` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["unavailability"]}],"tags":["unavailability"],"operationId":"getV2UnavailabilityId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Unavailability"}}},"put":{"summary":"Update Unavailability","description":"Update the unavailability's title (in the case of repeating unavailability, all of the event's titles will be updated).\n\n\u003e [!WARNING]\n\u003e This method requires the `unavailability` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["unavailability"]}],"tags":["unavailability"],"operationId":"putV2UnavailabilityId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2UnavailabilityId"},"examples":{"Update Unavailability":{"value":{"title":"Helping Grandma"}}}}}},"responses":{"200":{"description":"Update Unavailability"}}},"delete":{"summary":"Delete Unavailability","description":"\u003e [!WARNING]\n\u003e This method requires the `unavailability` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["unavailability"]}],"tags":["unavailability"],"operationId":"deleteV2UnavailabilityId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"Delete Unavailability"}}}},"/v2/unavailability/repeating_for/{id}":{"get":{"summary":"Get Repeating Unavailabilities","description":"\u003e [!WARNING]\n\u003e This method requires the `unavailability` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["unavailability"]}],"tags":["unavailability"],"operationId":"getV2UnavailabilityRepeatingForId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Repeating Unavailabilities"}}}},"/v2/availability/ongoing":{"get":{"summary":"Get Ongoing Availability","description":"Returns each user's `ongoing` patterns that are **currently active or scheduled to start in the future** — the pattern effective today plus any approved patterns with `start_date \u003e today`. Superseded historical patterns are not returned; use [Effective Availability](#effective-availability) to project day-by-day availability across the merged layers.\n\nUse this to monitor scheduled patterns: what's currently running, what's about to change, what's coming up, and how recently each pattern was edited.\n\n\u003e [!WARNING]\n\u003e This method requires the `unavailability` scope.\n","security":[{"tanda_oauth":["unavailability"]}],"tags":["availability"],"operationId":"getV2AvailabilityOngoing","parameters":[{"in":"formData","name":"user_ids","description":"Comma-separated list of user ids to fetch ongoing availability for.","required":true,"schema":{"type":"array","items":{"type":"string"},"example":"4704593"}},{"in":"query","name":"from","description":"Inclusive start of the projection window (ISO date, `YYYY-MM-DD`). Defaults to today.","required":false,"schema":{"type":"string","format":"date","example":"2016-03-15"}}],"responses":{"200":{"description":"Get Ongoing Availability","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OngoingAvailability"}}}}}}}},"/v2/availability/requests":{"get":{"summary":"Get Availability Requests","description":"Returns each user's individual availability requests.\nThis includes `ongoing` patterns and `temporary` changes.\nThis endpoint returns **all statuses by default** (`pending`, `approved`, and `rejected`), with one entry per underlying record.\nUse it to sync availability requests into external systems, mirroring what the deprecated `/api/v2/unavailability` endpoint provided.\n\nInactive (terminated) users are included when their ids are requested, so reports covering past staff keep working.\n\n\u003e [!WARNING]\n\u003e This method requires the `unavailability` scope.\n","security":[{"tanda_oauth":["unavailability"]}],"tags":["availability"],"operationId":"getV2AvailabilityRequests","parameters":[{"in":"formData","name":"user_ids","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"in":"formData","name":"ids","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"in":"query","name":"statuses","required":false,"schema":{"type":"array","items":{"type":"string","enum":["pending","approved","rejected"]}}},{"in":"query","name":"from","required":false,"schema":{"type":"string","format":"date"}},{"in":"query","name":"to","required":false,"schema":{"type":"string","format":"date"}},{"in":"query","name":"updated_after","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Availability Requests","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AvailabilityRequest"}}}}}}}},"/v2/availability/effective":{"get":{"summary":"Get Effective Availability","description":"Returns the day-by-day merged projection of a user's availability. Use this to answer the question *\"what is the availability of X users in Y date range?\"*.\n\n\u003e [!WARNING]\n\u003e This method requires the `unavailability` scope.\n\n\u003e [!NOTE]\n\u003e This endpoint returns a higher volume of data per user than [`/api/v2/unavailability`](#unavailability).\n\u003e This makes year long ranges less practical to deliver.\n\u003e When fetching effective availability for **all visible users** (i.e. `user_ids` omitted) the `from..to` range is capped at **31 days**.\n\u003e There is no date-range cap when fetching for a specific set of users.\n\u003e The upside of the larger payload is that the data is flatter and simpler to interpret than the previous unavailability format.\n","security":[{"tanda_oauth":["unavailability"]}],"tags":["availability"],"operationId":"getV2AvailabilityEffective","parameters":[{"in":"query","name":"from","description":"Inclusive start of the projection window (ISO date, `YYYY-MM-DD`).","required":true,"schema":{"type":"string","format":"date","example":"2016-03-15"}},{"in":"query","name":"to","description":"Inclusive end of the projection window (ISO date, `YYYY-MM-DD`).","required":true,"schema":{"type":"string","format":"date","example":"2016-03-17"}},{"in":"formData","name":"user_ids","description":"Comma-separated list of user ids to project availability for. When omitted, defaults to all active users the caller can see. In that \"all visible users\" mode the `from..to` window must be **31 days or fewer**. Explicit `user_ids` mode has no date range cap.","required":false,"schema":{"type":"array","items":{"type":"string"},"example":"42,123456"}}],"responses":{"200":{"description":"Get Effective Availability","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EffectiveAvailability"}}}}}}}},"/v2/leave_balances":{"get":{"summary":"Get Leave Balances","description":"Lookup leave balances for one or more `user_ids`.\n\n\u003e [!WARNING]\n\u003e This method requires the `leave` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["leave"]}],"tags":["leave_balances"],"operationId":"getV2LeaveBalances","parameters":[{"in":"formData","name":"user_ids","description":"Comma separated list of user ids to lookup leave balances for","required":true,"schema":{"type":"array","items":{"type":"string"},"example":"1,2,666"}},{"in":"query","name":"updated_after","description":"Time filter to find recently created or modified leave balances","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}}],"responses":{"200":{"description":"Get Leave Balances","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LeaveBalance"}}}}}}},"post":{"summary":"Create Leave Balance","description":"Use the [Leave Types For User](#leave-requests-leave-types-get) call to find accessible leave types for your user.\n\n\u003e [!WARNING]\n\u003e This method requires the `leave` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["leave"]}],"tags":["leave_balances"],"operationId":"postV2LeaveBalances","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2LeaveBalances"},"examples":{"Create Leave Balance":{"value":{"user_id":123456,"leave_type":"Annual Leave","hours":18.0}},"Create multiple Leave Balances":{"value":{"balances":[{"user_id":123456,"leave_type":"Annual Leave","hours":18.0},{"user_id":654321,"leave_type":"Sick Leave","hours":22.0}]}}}}}},"responses":{"201":{"description":"Create Leave Balance","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/LeaveBalance"},{"type":"array","items":{"$ref":"#/components/schemas/LeaveBalance"}}]}}}}}}},"/v2/leave_balances/{id}":{"get":{"summary":"Get Leave Balance","description":"\u003e [!WARNING]\n\u003e This method requires the `leave` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["leave"]}],"tags":["leave_balances"],"operationId":"getV2LeaveBalancesId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Leave Balance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaveBalance"}}}}}},"put":{"summary":"Update Leave Balance with ID","description":"\u003e [!WARNING]\n\u003e This method requires the `leave` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["leave"]}],"tags":["leave_balances"],"operationId":"putV2LeaveBalancesId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2LeaveBalancesId"},"examples":{"Update Leave":{"value":{"hours":22.5}}}}}},"responses":{"200":{"description":"Update Leave Balance with ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaveBalance"}}}}}}},"/v2/leave_balances/{id}/predict":{"get":{"summary":"Predict Leave Balance","description":"This endpoint takes a leave balance ID and a date, and predicts what the leave balance will be on the given date. The date must be in the future.\n\n\u003e [!WARNING]\n\u003e This method requires the `leave` scope (see [Scopes](#header-scopes) for more information).\n\nYou should make it clear when displaying the result that this is a prediction. There is no guarantee the user's actual leave balance will match this when the date comes.\n","security":[{"tanda_oauth":["leave"]}],"tags":["leave_balances"],"operationId":"getV2LeaveBalancesIdPredict","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"date","required":true,"schema":{"type":"string","format":"date","example":"2016-03-02"}}],"responses":{"200":{"description":"Predict Leave Balance"}}}},"/v2/leave_balances/user/{user_id}":{"put":{"summary":"Update Leave Balance with User ID","description":"\u003e [!WARNING]\n\u003e This method requires the `leave` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["leave"]}],"tags":["leave_balances"],"operationId":"putV2LeaveBalancesUserUserId","parameters":[{"in":"path","name":"user_id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2LeaveBalancesUserUserId"},"examples":{"Update Leave Balance with User ID":{"value":{"leave_type":"Annual Leave","hours":18.0,"should_accrue":false}},"Create multiple Leave Balances with User ID":{"value":{"balances":[{"leave_type":"Annual Leave","hours":18.0},{"leave_type":"Sick Leave","hours":22.0}]}}}}}},"responses":{"200":{"description":"Update Leave Balance with User ID","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/LeaveBalance"},{"type":"array","items":{"$ref":"#/components/schemas/LeaveBalance"}}]}}}}}}},"/v2/datastreams":{"get":{"summary":"Get Data Streams","description":"\u003e [!WARNING]\n\u003e This method requires the `datastream` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["datastream"]}],"tags":["datastreams"],"operationId":"getV2Datastreams","parameters":[{"in":"query","name":"updated_after","description":"Time filter to find recently created or modified data streams","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}}],"responses":{"200":{"description":"Get Data Streams","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DataStream"}}}}}}},"post":{"summary":"Create Data Stream","description":"You cannot create more than one data stream via the API with the same name. If you try to create a data stream with a name that already exists, that data stream will instead be updated and returned (effectively this will function as a `PUT` request).\n\nThe data interval must be either `86400`, `3600`, `1800`, or `900`. This corresponds to 1 day, 1 hour, 30 minutes, or 15 minutes.\n\nIt's highly recommended you give a data stream a 'default_stat_type'. Having this means that when the data stream is joined to locations or teams, the correct data is joined. Without this field you may see some unexpected results. For example, if your data stream houses 'sales' and 'transactions', and you mainly want to use the 'sales' data, you should set the default_stat_type to 'sales'\n\n\u003e [!WARNING]\n\u003e This method requires the `datastream` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["datastream"]}],"tags":["datastreams"],"operationId":"postV2Datastreams","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2Datastreams"},"examples":{"Create Data Stream":{"value":{"name":"My Special Data","data_interval":900,"default_stat_type":"sales"}}}}}},"responses":{"201":{"description":"Create Data Stream","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataStream"}}}}}}},"/v2/datastreams/{id}":{"get":{"summary":"Get Data Stream","description":"\u003e [!WARNING]\n\u003e This method requires the `datastream` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["datastream"]}],"tags":["datastreams"],"operationId":"getV2DatastreamsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Data Stream","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataStream"}}}}}},"put":{"summary":"Update Data Stream","description":"\u003e [!WARNING]\n\u003e This method requires the `datastream` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["datastream"]}],"tags":["datastreams"],"operationId":"putV2DatastreamsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2DatastreamsId"},"examples":{"Update Data Stream":{"value":{"name":"Foot Traffic!"}}}}}},"responses":{"200":{"description":"Update Data Stream","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataStream"}}}}}},"delete":{"summary":"Delete Data Stream","description":"Only data streams created via the API can be deleted via the API. This also deletes all associated [Data Stream Joins](#data-stream-joins) and [Store Stats](#store-stats), and cannot be reversed.\n\n\u003e [!NOTE]\n\u003e The data stream will be scheduled for deletion, but may not be removed immediately. You can [GET the data stream](#data-streams-data-stream-get) to check if it's been deleted.\n\n\u003e [!WARNING]\n\u003e This method requires the `datastream` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["datastream"]}],"tags":["datastreams"],"operationId":"deleteV2DatastreamsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"Delete Data Stream"}}}},"/v2/datastreams/{id}/versions":{"get":{"summary":"Get Data Stream Versions","description":"\u003e [!WARNING]\n\u003e This method requires the `datastream` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["datastream"]}],"tags":["datastreams"],"operationId":"getV2DatastreamsIdVersions","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"updated_after","description":"Time filter to find recently created or modified data stream versions","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}}],"responses":{"200":{"description":"Get Data Stream Versions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DataStreamVersion"}}}}}}}},"/v2/datastreamjoins":{"get":{"summary":"Get Data Stream Joins","description":"\u003e [!WARNING]\n\u003e This method requires the `datastream` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["datastream"]}],"tags":["datastreamjoins"],"operationId":"getV2Datastreamjoins","parameters":[{"in":"query","name":"updated_after","description":"Time filter to find recently created or modified data stream joins","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}}],"responses":{"200":{"description":"Get Data Stream Joins","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DataStreamJoin"}}}}}}},"post":{"summary":"Create Data Stream Join","description":"\u003e [!WARNING]\n\u003e This method requires the `datastream` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["datastream"]}],"tags":["datastreamjoins"],"operationId":"postV2Datastreamjoins","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2Datastreamjoins"},"examples":{"Create Joined to Team":{"value":{"data_stream_id":24,"data_streamable_id":111,"data_streamable_type":"Department","rostering_ratio":2.5,"stat_type_id":123}},"Create Joined to Organisation":{"value":{"data_stream_id":24,"data_streamable_type":"Organisation","stat_type_id":123}}}}}},"responses":{"201":{"description":"Create Data Stream Join","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataStreamJoin"}}}}}}},"/v2/datastreamjoins/{id}":{"get":{"summary":"Get Data Stream Join","description":"\u003e [!WARNING]\n\u003e This method requires the `datastream` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["datastream"]}],"tags":["datastreamjoins"],"operationId":"getV2DatastreamjoinsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Data Stream Join","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataStreamJoin"}}}}}},"put":{"summary":"Update Data Stream Join","description":"\u003e [!WARNING]\n\u003e This method requires the `datastream` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["datastream"]}],"tags":["datastreamjoins"],"operationId":"putV2DatastreamjoinsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2DatastreamjoinsId"},"examples":{"Update Data Stream Join":{"value":{"rostering_ratio":1.5}}}}}},"responses":{"200":{"description":"Update Data Stream Join","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataStreamJoin"}}}}}},"delete":{"summary":"Delete Data Stream Join","description":"\u003e [!WARNING]\n\u003e This method requires the `datastream` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["datastream"]}],"tags":["datastreamjoins"],"operationId":"deleteV2DatastreamjoinsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"Delete Data Stream Join"}}}},"/v2/stat_types":{"get":{"summary":"Get Stat Types","description":"\u003e [!WARNING]\n\u003e This method requires the `datastream` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["datastream"]}],"tags":["stat_types"],"operationId":"getV2StatTypes","responses":{"200":{"description":"Get Stat Types","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StatType"}}}}}}},"post":{"summary":"Create Stat Type","description":"\u003e [!WARNING]\n\u003e This method requires the `datastream` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["datastream"]}],"tags":["stat_types"],"operationId":"postV2StatTypes","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2StatTypes"},"examples":{"Create Stat Type":{"value":{"stat_type":"sales","label":"Sales","format":"currency","data_type":"sum"}},"Create stat type with custom format":{"value":{"stat_type":"deliveries","label":"Deliveries","format":"%{whole_number} 🚚","data_type":"sum"}},"Create stat type for head counts":{"value":{"stat_type":"required staff","label":"Required Staff","format":"people","data_type":"static"}}}}}},"responses":{"201":{"description":"Create Stat Type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatType"}}}}}}},"/v2/stat_types/{id}":{"get":{"summary":"Get Stat Type","description":"\u003e [!WARNING]\n\u003e This method requires the `datastream` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["datastream"]}],"tags":["stat_types"],"operationId":"getV2StatTypesId","parameters":[{"in":"path","name":"id","description":"The id of the stat type to lookup","required":true,"schema":{"type":"integer","format":"int32","example":12345}}],"responses":{"200":{"description":"Get Stat Type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatType"}}}}}},"put":{"summary":"Update Stat Type","description":"\u003e [!WARNING]\n\u003e This method requires the `datastream` scope (see [Scopes](#header-scopes) for more information).\n\u003e\n\u003e You cannot modify the `stat_type` field on a Stat Type. You must create a new stat type instead.\n","security":[{"tanda_oauth":["datastream"]}],"tags":["stat_types"],"operationId":"putV2StatTypesId","parameters":[{"in":"path","name":"id","description":"The id of the stat type to update","required":true,"schema":{"type":"integer","format":"int32","example":12345}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2StatTypesId"},"examples":{"Update Stat Type":{"value":{"format":"whole_number"}}}}}},"responses":{"200":{"description":"Update Stat Type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatType"}}}}}},"delete":{"summary":"Delete Stat Type","description":"\u003e [!WARNING]\n\u003e This method requires the `datastream` scope (see [Scopes](#header-scopes) for more information).\n\u003e\n\u003e This will delete ALL store stats, and data stream joins that have been created with this stat type. Please be careful.\n","security":[{"tanda_oauth":["datastream"]}],"tags":["stat_types"],"operationId":"deleteV2StatTypesId","parameters":[{"in":"path","name":"id","description":"The id of the stat type to delete","required":true,"schema":{"type":"integer","format":"int32","example":12345}}],"responses":{"204":{"description":"Delete Stat Type"}}}},"/v2/storestats/for_datastream":{"post":{"summary":"Create Store Stats for Multiple Datastreams","description":"Store stats can either be posted one at a time, or in bulk. When posting store stats in bulk, all the store stats must be for the same data stream.\n\nTo post store stats in bulk, simply represent them all in an array, with the datastream_id included for each stat. Note that each combination of `datastream_id`, `time` and `type` must be unique - you must not send duplicate data.\n\n\u003e [!WARNING]\n\u003e **POSSIBLE DATA DELETION**: All existing store stats on the data stream within the newly posted store stats' `time` parameter range **will be replaced** with the newly posted store stats.\n\u003e\n\u003e Please see the general Store Stat information [above](#store-stats) for an example.\n\n\u003e [!NOTE]\n\u003e Pass the optional top-level `update_tips` parameter as `true` to recompute the tip jars attached to each posted data stream across that stream's affected date range once the store stats are saved. It defaults to `false`, so tip jar amounts are only refreshed when you explicitly opt in.\n","security":[{"tanda_oauth":["datastream"]}],"tags":["storestats"],"operationId":"postV2StorestatsForDatastream","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2StorestatsForDatastream"},"examples":{"Create single Store Stat":{"value":{"datastream_id":123457,"time":1459296900,"stat":3.5,"type":"sales"}},"Create multiple Store Stats":{"value":{"stats":[{"datastream_id":123456,"time":1459296900,"stat":7.5,"type":"sales"},{"datastream_id":123456,"time":1459296900,"stat":3,"type":"transactions"},{"datastream_id":123457,"time":1459297800,"stat":3.5,"type":"sales"},{"datastream_id":123457,"time":1459297800,"stat":1,"type":"transactions"}]}}}}}},"responses":{"201":{"description":"Create Store Stats for Multiple Datastreams","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/StoreStat"},{"type":"array","items":{"$ref":"#/components/schemas/StoreStat"}}]}}}}}}},"/v2/storestats/for_datastream/{datastream_id}":{"get":{"summary":"Store Stats for Datastream","description":"\u003e [!WARNING]\n\u003e This method requires the `datastream` scope (see [Scopes](#header-scopes) for more information).\n\n\u003e [!WARNING]\n\u003e You will only be able to query up to 31 days using the `from` and `to` parameters.\n","security":[{"tanda_oauth":["datastream"]}],"tags":["storestats"],"operationId":"getV2StorestatsForDatastreamDatastreamId","parameters":[{"in":"path","name":"datastream_id","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"type","description":"The type of store stats to look up. All types are returned when this is not set.","required":false,"schema":{"type":"string","example":"sales"}},{"in":"query","name":"from","description":"The first date to look up store stats for.","required":true,"schema":{"type":"string","format":"date","example":"2016-03-15"}},{"in":"query","name":"to","description":"The last date to look up store stats for.","required":true,"schema":{"type":"string","format":"date","example":"2016-03-17"}}],"responses":{"200":{"description":"Store Stats for Datastream","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StoreStat"}}}}}}},"post":{"summary":"Create Store Stats for Datastream","description":"Store stats can either be posted one at a time, or in bulk. When posting store stats in bulk, all the store stats must be for the same data stream.\n\nTo post store stats in bulk, simply represent them all in an array, under the **stats** key. Note that each combination of `time` and `type` must be unique - you must not send duplicate data.\n\n\u003e [!WARNING]\n\u003e **POSSIBLE DATA DELETION**: All existing store stats on the data stream within the newly posted store stats' `time` parameter range **will be replaced** with the newly posted store stats.\n\u003e\n\u003e Please see the general Store Stat information [above](#store-stats) for an example.\n\n\u003e [!NOTE]\n\u003e Pass the optional top-level `update_tips` parameter as `true` to recompute any tip jars attached to this data stream across the affected date range once the store stats are saved. It defaults to `false`, so tip jar amounts are only refreshed when you explicitly opt in.\n\n\u003e [!WARNING]\n\u003e This method requires the `datastream` scope (see [Scopes](#header-scopes) for more information).\n\nTo remove store stats generated through the API for a time period, you will need to make a POST, and provide store stats with a 0 as the `stat` for the start and end of that period.\n\nFor example, if you wanted to remove `sales` and `transactions` store stats for the period of `1459296900` to `1459383300` then posting the following data to the [Create Store Stats endpoint](#store-stats-create-store-stats-for-datastream) would \"delete\" that data. This is becuase each post actually overrides existing store stat data for the period.\n","security":[{"tanda_oauth":["datastream"]}],"tags":["storestats"],"operationId":"postV2StorestatsForDatastreamDatastreamId","parameters":[{"in":"path","name":"datastream_id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2StorestatsForDatastreamDatastreamId"},"examples":{"Create single Store Stat":{"value":{"time":1459296900,"stat":3.5,"type":"sales"}},"Create multiple Store Stats":{"value":{"stats":[{"time":1459296900,"stat":3.5,"type":"sales"},{"time":1459296900,"stat":1,"type":"transactions"},{"time":1459297800,"stat":20.1,"type":"sales"}]}}}}}},"responses":{"201":{"description":"Create Store Stats for Datastream","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/StoreStat"},{"type":"array","items":{"$ref":"#/components/schemas/StoreStat"}}]}}}}}}},"/v2/storestats/for_datastream/{datastream_id}/from/{from}/to/{to}":{"get":{"summary":"Get Store Stats for Datastream","description":"Get store stats for a datastream.\n\n\u003e [!WARNING]\n\u003e This method requires the `datastream` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["datastream"]}],"tags":["storestats"],"operationId":"getV2StorestatsForDatastreamDatastreamIdFromFromToTo","parameters":[{"in":"path","name":"datastream_id","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"path","name":"from","required":true,"schema":{"type":"string","format":"date"}},{"in":"path","name":"to","required":true,"schema":{"type":"string","format":"date"}},{"in":"query","name":"type","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Get Store Stats for Datastream","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StoreStat"}}}}}}}},"/v2/predicted_storestats/for_datastream":{"post":{"summary":"Predicted Store Stats for Multiple Datastreams","description":"To post predicted store stats in bulk, simply represent them all in an array, with the datastream_id included for each stat. Note that each combination of `datastream_id`, `time` and `type` must be unique - you must not send duplicate data.\n\n\u003e [!WARNING]\n\u003e **POSSIBLE DATA DELETION**: All existing predicted store stats on the data stream within the newly posted store stats' `time` parameter range **will be replaced** with the newly posted predicted store stats.\n\u003e\n\u003e Please see the general Store Stat information [above](#store-stats) for an example.\n","security":[{"tanda_oauth":["datastream"]}],"tags":["predicted_storestats"],"operationId":"postV2PredictedStorestatsForDatastream","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2PredictedStorestatsForDatastream"},"examples":{"Create single Predicted Store Stat":{"value":{"datastream_id":123457,"time":1459296900,"stat":3.5,"type":"sales"}},"Create multiple Store Stats":{"value":{"stats":[{"datastream_id":123456,"time":1459296900,"stat":7.5,"type":"sales"},{"datastream_id":123456,"time":1459296900,"stat":3,"type":"transactions"},{"datastream_id":123457,"time":1459297800,"stat":3.5,"type":"sales"},{"datastream_id":123457,"time":1459297800,"stat":1,"type":"transactions"}]}}}}}},"responses":{"201":{"description":"Predicted Store Stats for Multiple Datastreams"}}}},"/v2/predicted_storestats/for_datastream/{datastream_id}":{"get":{"summary":"Predicted Store Stats for Datastream","description":"\u003e [!WARNING]\n\u003e This method requires the `datastream` scope (see [Scopes](#header-scopes) for more information).\n\n\u003e [!WARNING]\n\u003e You will only be able to query up to 31 days using the `from` and `to` parameters.\n","security":[{"tanda_oauth":["datastream"]}],"tags":["predicted_storestats"],"operationId":"getV2PredictedStorestatsForDatastreamDatastreamId","parameters":[{"in":"path","name":"datastream_id","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"type","description":"The type of store stats to lookup (if not specified, all stats are returned)","required":false,"schema":{"type":"string","example":"sales"}},{"in":"query","name":"from","description":"The start date of the range to lookup store stats in","required":true,"schema":{"type":"string","format":"date","example":"2016-03-15"}},{"in":"query","name":"to","description":"The end date of the range to lookup store stats in","required":true,"schema":{"type":"string","format":"date","example":"2016-03-17"}}],"responses":{"200":{"description":"Predicted Store Stats for Datastream","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PredictedStoreStat"}}}}}}},"delete":{"summary":"Delete Predicted Store Stats","description":"\u003e [!WARNING]\n\u003e This method requires the `datastream` scope (see [Scopes](#header-scopes) for more information).\n\n\u003e [!WARNING]\n\u003e You will only be able to query up to 31 days using the `from` and `to` parameters.\n","security":[{"tanda_oauth":["datastream"]}],"tags":["predicted_storestats"],"operationId":"deleteV2PredictedStorestatsForDatastreamDatastreamId","parameters":[{"in":"path","name":"datastream_id","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"type","description":"The type of store stats to lookup (if not specified, all stats are returned)","required":false,"schema":{"type":"string","example":"sales"}},{"in":"query","name":"from","description":"The start date of the range to lookup store stats in.","required":true,"schema":{"type":"string","format":"date","example":"2016-03-15"}},{"in":"query","name":"to","description":"The end of the date range of to lookup store stats in. We will crop the data to the nearest business day, eg if the location is open 8am -\u003e midnight, then we will set the cuttoff time for the data to be 4am. Data before then will go to the previous business day, data after will come in for this business day.","required":true,"schema":{"type":"string","format":"date","example":"2016-03-17"}}],"responses":{"204":{"description":"Delete Predicted Store Stats"}}}},"/v2/predicted_storestats/for_location/{location_id}":{"get":{"summary":"Predicted Store Stats for Location","description":"\u003e [!WARNING]\n\u003e This method requires the `datastream` scope (see [Scopes](#header-scopes) for more information).\n\n\u003e [!WARNING]\n\u003e You will only be able to query up to 31 days using the `from` and `to` parameters.\n","security":[{"tanda_oauth":["datastream"]}],"tags":["predicted_storestats"],"operationId":"getV2PredictedStorestatsForLocationLocationId","parameters":[{"in":"path","name":"location_id","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"from","description":"The start date of the range to lookup store stats in.","required":true,"schema":{"type":"string","format":"date","example":"2016-03-15"}},{"in":"query","name":"to","description":"The end date of the range to lookup store stats in. We will crop the data to the nearest business day, eg if the location is open 8am -\u003e midnight, then we will set the cuttoff time for the data to be 4am. Data before then will go to the previous business day, data after will come in for this business day.","required":true,"schema":{"type":"string","format":"date","example":"2016-03-17"}}],"responses":{"200":{"description":"Predicted Store Stats for Location"}}}},"/v2/cognitive_creator_configuration":{"get":{"summary":"Get Cognitive Creator Configurations","description":"Gets all your Cognitive Creator Configurations.\n","security":[{"tanda_oauth":["department"]}],"tags":["cognitive_creator_configuration"],"operationId":"getV2CognitiveCreatorConfiguration","parameters":[{"in":"query","name":"updated_after","description":"Time filter to find recently created or modified users","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}}],"responses":{"200":{"description":"Get Cognitive Creator Configurations","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CognitiveCreatorConfiguration"}}}}}}}},"/v2/cognitive_creator_configuration/{id}":{"get":{"summary":"Get Cognitive Creator Configuration","description":"Gets the specified Cognitive Creator Configuration by ID.\n","security":[{"tanda_oauth":["department"]}],"tags":["cognitive_creator_configuration"],"operationId":"getV2CognitiveCreatorConfigurationId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Cognitive Creator Configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CognitiveCreatorConfiguration"}}}}}},"put":{"summary":"Put Cognitive Creator Configuration","description":"Update the specified Cognitive Creator Configuration by ID.\n","security":[{"tanda_oauth":["department"]}],"tags":["cognitive_creator_configuration"],"operationId":"putV2CognitiveCreatorConfigurationId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2CognitiveCreatorConfigurationId"},"examples":{"Cognitive Creator Configuration":{"value":{"minimum_staff":0,"maximum_staff":3,"max_concurrent_start":2,"min_length":3.5,"max_length":8,"time_to_open":0.5,"time_to_close":0.5,"undercoverage_penalty_ratio":1.3,"round_down_head_count":true,"consolidate_shift_count":true}}}}}},"responses":{"200":{"description":"Put Cognitive Creator Configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CognitiveCreatorConfiguration"}}}}}},"delete":{"summary":"Delete Cognitive Creator Configuration","description":"Delete the specified Cognitive Creator Configuration by ID. This will effectively reset the settings to default.\n","security":[{"tanda_oauth":["department"]}],"tags":["cognitive_creator_configuration"],"operationId":"deleteV2CognitiveCreatorConfigurationId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"Delete Cognitive Creator Configuration"}}}},"/v2/cognitive_creator_configuration/for_department/{department_id}":{"get":{"summary":"Get Cognitive Creator Configuration For Department","description":"Get Cognitive Creator Configuration for a department.\n","security":[{"tanda_oauth":["department"]}],"tags":["cognitive_creator_configuration"],"operationId":"getV2CognitiveCreatorConfigurationForDepartmentDepartmentId","parameters":[{"in":"path","name":"department_id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Cognitive Creator Configuration For Department","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CognitiveCreatorConfiguration"}}}}}},"post":{"summary":"Post Cognitive Creator Configuration","description":"Create cognitive creator configuration for a department. Posting another cognitive creator configuration for a department will override the current configuration.\n","security":[{"tanda_oauth":["department"]}],"tags":["cognitive_creator_configuration"],"operationId":"postV2CognitiveCreatorConfigurationForDepartmentDepartmentId","parameters":[{"in":"path","name":"department_id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2CognitiveCreatorConfigurationForDepartmentDepartmentId"},"examples":{"Cognitive Creator Configuration":{"value":{"minimum_staff":0,"maximum_staff":3,"max_concurrent_start":2,"min_length":3.5,"max_length":8,"time_to_open":0.5,"time_to_close":0.5,"undercoverage_penalty_ratio":1.3,"round_down_head_count":true,"consolidate_shift_count":true}}}}}},"responses":{"201":{"description":"Post Cognitive Creator Configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CognitiveCreatorConfiguration"}}}}}}},"/v2/devices":{"get":{"summary":"Get Devices","description":"\u003e [!WARNING]\n\u003e This method requires the `device` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["device"]}],"tags":["devices"],"operationId":"getV2Devices","parameters":[{"in":"query","name":"updated_after","description":"Time filter to find recently created or modified devices","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}}],"responses":{"200":{"description":"Get Devices","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Device"}}}}}}},"post":{"summary":"Create Device","description":"\u003e [!WARNING]\n\u003e This method requires the `device` scope (see [Scopes](#header-scopes) for more information).\n\nProvide one or both of `location_id` and `nickname` when registering a time clock. If a `location_id` is provided, but a `nickname` isn't, the location's name is used as a nickname.\n","security":[{"tanda_oauth":["device"]}],"tags":["devices"],"operationId":"postV2Devices","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2Devices"},"examples":{"Create new timeclock":{"value":{"nickname":"Old Reactor Timeclock","location_id":111}}}}}},"responses":{"201":{"description":"Create Device","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Device"}}}}}}},"/v2/devices/returned":{"get":{"summary":"Get Returned Devices","description":"\u003e [!WARNING]\n\u003e This method requires the `device` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["device"]}],"tags":["devices"],"operationId":"getV2DevicesReturned","parameters":[{"in":"query","name":"updated_after","description":"Time filter to find recently created or modified returned devices","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}}],"responses":{"200":{"description":"Get Returned Devices","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Device"}}}}}}}},"/v2/devices/reset_access_code":{"post":{"summary":"Reset Device Access Code","description":"\u003e [!WARNING]\n\u003e This method requires the `device` scope (see [Scopes](#header-scopes) for more information).\n\nThe access code is used by admins when setting up a device as an alternative to entering their username and password.\n","security":[{"tanda_oauth":["device"]}],"tags":["devices"],"operationId":"postV2DevicesResetAccessCode","responses":{"201":{"description":"Reset Device Access Code","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceAccessCode"}}}}}}},"/v2/devices/{id}":{"get":{"summary":"Get Device","description":"\u003e [!WARNING]\n\u003e This method requires the `device` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["device"]}],"tags":["devices"],"operationId":"getV2DevicesId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Device","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Device"}}}}}},"put":{"summary":"Update Device","description":"\u003e [!WARNING]\n\u003e This method requires the `device` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["device"]}],"tags":["devices"],"operationId":"putV2DevicesId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2DevicesId"},"examples":{"Update device information":{"value":{"nickname":"Old Reactor Timeclock","location_id":111}}}}}},"responses":{"200":{"description":"Update Device","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Device"}}}}}}},"/v2/devices/{id}/versions":{"get":{"summary":"Get Device Versions","description":"\u003e [!WARNING]\n\u003e This method requires the `device` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["device"]}],"tags":["devices"],"operationId":"getV2DevicesIdVersions","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"updated_after","description":"Time filter to find recently created or modified device versions","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}}],"responses":{"200":{"description":"Get Device Versions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeviceVersion"}}}}}}}},"/v2/devices/{id}/return":{"post":{"summary":"Return Device","description":"\u003e [!WARNING]\n\u003e This method requires the `device` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["device"]}],"tags":["devices"],"operationId":"postV2DevicesIdReturn","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"201":{"description":"Return Device"}}}},"/v2/clockins":{"get":{"summary":"Clock Ins for User","description":"Both `from` and `to` are required, and at least one of `user_id` and `device_id` are required.\n\nTo get a list of users who are clocked in *right now*, use the Get Clocked In Users endpoint.\n\n\u003e [!WARNING]\n\u003e This method requires the `device` scope (see [Scopes](#header-scopes) for more information).\n\n\u003e [!WARNING]\n\u003e You will only be able to query up to 31 days using the `from` and `to` parameters.\n","security":[{"tanda_oauth":["device"]}],"tags":["clockins"],"operationId":"getV2Clockins","parameters":[{"in":"query","name":"from","description":"The first date to look up clock ins for.","required":true,"schema":{"type":"string","format":"date","example":"2016-03-15"}},{"in":"query","name":"to","description":"The last date to look up clock ins for.","required":true,"schema":{"type":"string","format":"date","example":"2016-03-17"}},{"in":"query","name":"device_id","description":"The id of the device to look up clock ins for.","required":false,"schema":{"type":"integer","format":"int32","example":12345}},{"in":"query","name":"user_id","description":"The id of the user to look up clock ins for.","required":false,"schema":{"type":"integer","format":"int32","example":12345}},{"in":"query","name":"updated_after","description":"Time filter to find recently created or modified clock ins","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}},{"in":"query","name":"include_inactive","description":"User filter to return data for inactive staff","required":false,"schema":{"type":"boolean","default":false,"example":true}}],"responses":{"200":{"description":"Clock Ins for User","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClockIn"}}}}}}},"post":{"summary":"Perform Clock In for User","description":"Use this endpoint to send clock ins to Tanda in \"real time\" as employees clock in or out of work. The clock in will be stored as a distinct object in Tanda, but will also be copied to a [Shift](#tag/shifts), which will then be visible on a [Timesheets](#tag/timesheets). When posting clockins to Tanda, here's a few things to be aware of:\n\nIt is possible in Tanda to configure rounding settings, to do things like round clock in times to the nearest 5 minutes. At the very least, the clock in `time` will be rounded to the `floor` of the minute when processed. Therefore, you should not expect that you will find a Shift in Tanda with exactly the same start or end time as the `time` that you provide here. Employees in Tanda are paid based on the output of Timesheets \u0026 Shifts, *not* of Clock Ins, so if you want to adjust a clocked time later you should adjust the relevant Shift instead.\n\nIf two very similar clock ins are posted one after the other (eg. two clock ins with the same type, and times within a few minutes of each other) then it is possible that Tanda will discard one. The intent of this logic is to prevent issues like people \"misclicking\" on physical time clocks. If you want complete control over how a Shift will be displayed in Tanda, use the [Shifts](#tag/shifts) endpoint. When querying for Clock Ins directly, any Clock In with `true` in its `removed` field has been removed from the Shift as another Clock In has replaced it.\n\nThis endpoint will return a `201` HTTP status with the newly created Clock In if the request was valid. At this point the `shift_id` will be `null`. There will be a short delay between the Clock In being created, and it being processed. This processing entails adding the Clock In to a Timesheet, and recalculating the Timesheet's costs. Once the Clock In has been processed, the `shift_id` field will be updated to be the ID of the Shift that the Clock In was applied to. During processing, if the Clock In is considered to be a duplicate, or needs to be discarded for any other reason, it may never be applied to a Shift. If this is the case, the `removed` field will be `true`.\n\nUse the [Timesheets](#tag/timesheets) and [Shifts](#tag/shifts) endpoints to see the net result of your Clock Ins on staff timesheets. You can lookup clock ins using the Get Clock In endpoint, and once the clock in has been processed, you can use its `shift_id` to lookup the shift it applied to. Additionally, you can use either the Clock Ins for User, or the Clock Ins for Device methods, to view raw Clock Ins created through this endpoint.\n\nImages on Clock Ins are optional. However, if you wish to include an image with a Clock In, the image **must** be a base64 PNG or JPEG using the [Data URI scheme](https://en.wikipedia.org/wiki/Data_URI_scheme). An example encoded image can be seen below:\n```\ndata:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAAAAAA6fptVAAAACklEQVQYV2P4DwABAQEAWk1v8QAAAABJRU5ErkJggg==\n```\nIf you do choose to provide an image, and the image isn't in the correct format, you will receive a response with a `400` HTTP status. An example of the response can be seen on the right.\n\nClock Ins with times more than 10 minutes into the future (as computed at the server’s time) will be rejected. Ensure your client's time is correct.\n\n\u003e [!WARNING]\n\u003e This method requires the `device` scope (see [Scopes](#header-scopes) for more information).\n\n\u003e [!WARNING]\n\u003e You will only be able to clock in for users you can manage, on devices you can see.\n","security":[{"tanda_oauth":["device"]}],"tags":["clockins"],"operationId":"postV2Clockins","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2Clockins"},"examples":{"Clock In":{"value":{"user_id":123456,"type":"start","time":1459296192}},"Clock Out":{"value":{"user_id":123456,"type":"finish","time":1459296192}},"Specific Photo \u0026 Time Clock":{"value":{"user_id":123456,"type":"start","time":1459296192,"device_id":1234,"photo":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAaCAI..."}},"Specific Team":{"value":{"user_id":123456,"type":"start","time":1459296192,"department_id":808}},"Bad Image":{"value":{"user_id":123456,"type":"start","time":1459296192,"department_id":808,"photo":"non-base64 png string"}},"Image Too Large":{"value":{"user_id":123456,"type":"start","time":1459296192,"department_id":808,"photo":"very large base64 string"}},"Answer to TC Question":{"value":{"user_id":123456,"type":"finish","time":1459296192,"answers":[{"timeclock_question_id":42,"answer":63.4,"trigger":"finish"}]}}}}}},"responses":{"201":{"description":"Perform Clock In for User","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClockIn"}}}}}}},"/v2/clockins/{id}":{"get":{"summary":"Get Clock In","description":"For information about how clock ins work, please see the Perform Clock In for User endpoint.\n\n\u003e [!WARNING]\n\u003e This method requires the `device` scope (see [Scopes](#header-scopes) for more information).\n\n\u003e [!WARNING]\n\u003e You will only be able to see clock ins for users you can manage, or for devices you can see.\n","security":[{"tanda_oauth":["device"]}],"tags":["clockins"],"operationId":"getV2ClockinsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Clock In","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClockIn"}}}}}}},"/v2/settings":{"get":{"summary":"Get Settings","description":"\u003e [!WARNING]\n\u003e This method requires the `settings` scope (see [Scopes](#header-scopes) for more information).\n\nThe full range of properties that are returned may vary on a per-user basis. To the right is a sample, to illustrate the structure of responses. Therefore, your code should gracefully handle the condition where a particular key is not present.\n","security":[{"tanda_oauth":["settings"]}],"tags":["settings"],"operationId":"getV2Settings","parameters":[{"in":"query","name":"pay_period_info","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Get Settings"}}}},"/v2/settings/versions":{"get":{"summary":"Get Settings Versions","description":"\u003e [!WARNING]\n\u003e This method requires the `settings` scope (see [Scopes](#header-scopes) for more information).\n\nThe full range of properties that are returned may vary on a per-user basis. To the right is a sample, to illustrate the structure of responses. Therefore, your code should gracefully handle the condition where a particular key is not present.\n","security":[{"tanda_oauth":["settings"]}],"tags":["settings"],"operationId":"getV2SettingsVersions","parameters":[{"in":"query","name":"updated_after","description":"Time filter to find recently created or modified settings versions","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}}],"responses":{"200":{"description":"Get Settings Versions"}}}},"/v2/settings/version":{"get":{"summary":"Get Version","description":"Get the version.\n","security":[{"tanda_oauth":[]}],"tags":["settings"],"operationId":"getV2SettingsVersion","responses":{"200":{"description":"Get Version"}}}},"/v2/settings/domain":{"get":{"summary":"Get Domain","description":"Get the domain.\n","security":[{"tanda_oauth":[]}],"tags":["settings"],"operationId":"getV2SettingsDomain","responses":{"200":{"description":"Get Domain"}}}},"/v2/pay_groups":{"get":{"summary":"List Pay Groups","description":"List pay groups.\n\n\u003e [!WARNING]\n\u003e This method requires the `settings` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["settings"]}],"tags":["pay_groups"],"operationId":"getV2PayGroups","responses":{"200":{"description":"List Pay Groups"}}}},"/v2/qualifications":{"get":{"summary":"Get Qualifications","description":"\u003e [!WARNING]\n\u003e This method requires the `qualifications` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["qualifications"]}],"tags":["qualifications"],"operationId":"getV2Qualifications","responses":{"200":{"description":"Get Qualifications","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Qualification"}}}}}}},"post":{"summary":"Create Qualification","description":"Once created, a qualification will be visible in your [qualifications list](/qualifications). Use its ID to add it to staff profiles, and to teams.\n\n\u003e [!WARNING]\n\u003e This method requires the `qualifications` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["qualifications"]}],"tags":["qualifications"],"operationId":"postV2Qualifications","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2Qualifications"},"examples":{"Default":{"value":{"name":"Responsible Service of Alcohol","maximum_hours":20.5}}}}}},"responses":{"201":{"description":"Create Qualification","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Qualification"}}}}}}},"/v2/qualifications/{id}":{"get":{"summary":"Get Qualification","description":"\u003e [!WARNING]\n\u003e This method requires the `qualifications` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["qualifications"]}],"tags":["qualifications"],"operationId":"getV2QualificationsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Qualification","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Qualification"}}}}}},"put":{"summary":"Update Qualification","description":"\u003e [!WARNING]\n\u003e This method requires the `qualifications` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["qualifications"]}],"tags":["qualifications"],"operationId":"putV2QualificationsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2QualificationsId"},"examples":{"Default":{"value":{"name":"RSA v2"}}}}}},"responses":{"200":{"description":"Update Qualification","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Qualification"}}}}}},"delete":{"summary":"Delete Qualification","description":"Deleting a qualification will also remove it from associated staff and teams.\n\n\u003e [!WARNING]\n\u003e This method requires the `qualifications` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["qualifications"]}],"tags":["qualifications"],"operationId":"deleteV2QualificationsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"Delete Qualification"}}}},"/v2/organisations":{"get":{"summary":"Get Organisations","description":"\u003e [!WARNING]\n\u003e This method requires the `organisation` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["organisation"]}],"tags":["organisations"],"operationId":"getV2Organisations","parameters":[{"in":"query","name":"updated_after","description":"Time filter to find recently created or modified organisations","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}}],"responses":{"200":{"description":"Get Organisations","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Organisation"}}}}}}},"post":{"summary":"Create Organisation","description":"\u003e [!WARNING]\n\u003e This method requires the `organisation` scope (see [Scopes](#header-scopes) for more information).\n\nThe following fields can be used when creating a new organisation:\n\n* `name` - **required, string** - the organisation's name.\n* `country` - **required, string** - the country the organisation is legally established in.\n* `timesheet_interval` - **required, integer** - 1 for weekly timesheets, 2 for fortnightly timesheets.\n* `week_start_day` - **required, integer** - the day of the week that timesheets should start on. 0 is Sunday, 1 is Monday, and so on.\n* `locale` - **optional, string** - the language tag for system translation. Defaults to `en`. [Click here](https://www.w3.org/International/articles/language-tags/) for more information.\n* `time_zone` - **optional, string** - the time zone for the new organisation. If not provided, defaults to authenticated user's time zone. Uses zone names from [here](http://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html), eg \"Brisbane\" or \"Perth\".\n* `award_template_ids` - **optional, array[integer]** - IDs of [award templates](#award-templates-award-templates-list-get-1) you'd like to make available to this organisation. Note that you'll still need to [enable](#award-templates-award-templates-list-post) the award template once the organisation is created.\n* `industry` - **optional, string** - the industry the organisation belongs to. e.g. 'Aged Care'.\n* `customer_ids` - **optional, array[integer]** - IDs of other organisations which are customers of this organisation. This organisation will be able to access its customers and impersonate users within them through the Tanda UI.\n","security":[{"tanda_oauth":["organisation"]}],"tags":["organisations"],"operationId":"postV2Organisations","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2Organisations"},"examples":{"Create Organisation":{"value":{"name":"Vandelay Industries","country":"New Zealand","locale":"en-NZ","timesheet_interval":1,"week_start_day":0,"time_zone":"Auckland","award_template_ids":[1,2,3],"customer_ids":[]}}}}}},"responses":{"201":{"description":"Create Organisation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organisation"}}}}}}},"/v2/organisations/{id}":{"get":{"summary":"Get Organisation","description":"Get an organisation by id.\n\n\u003e [!WARNING]\n\u003e This method requires the `organisation` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["organisation"]}],"tags":["organisations"],"operationId":"getV2OrganisationsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Organisation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organisation"}}}}}},"put":{"summary":"Update Organisation","description":"\u003e [!WARNING]\n\u003e This method requires the `organisation` scope (see [Scopes](#header-scopes) for more information).\n\nThe following fields can be updated using this endpoint:\n\n* `name` - **required, string** - the organisation's name.\n* `country` - **required, string** - the country the organisation is legally established in.\n* `locale` - **optional, string** - the language tag for system translation. Defaults to `en`. [Click here](https://www.w3.org/International/articles/language-tags/) for more information.\n* `award_template_ids` - **optional, array[integer]** - IDs of [award templates](#award-templates-award-templates-list-get-1) you'd like to make available to this organisation. Note that you'll still need to [enable](#award-templates-award-templates-list-post) the award template once the organisation is created.\n* `industry` - **optional, string** - the industry the organisation belongs to. e.g. 'Aged Care'.\n* `customer_ids` - **optional, array[integer]** - IDs of other organisations which are customers of this organisation. This organisation will be able to access its customers and impersonate users within them through the Tanda UI.\n","security":[{"tanda_oauth":["organisation"]}],"tags":["organisations"],"operationId":"putV2OrganisationsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2OrganisationsId"},"examples":{"Add Customer":{"value":{"customer_ids":[737,727]}},"Clear Customers":{"value":{"customer_ids":[]}}}}}},"responses":{"200":{"description":"Update Organisation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organisation"}}}}}}},"/v2/organisations/{id}/build_status":{"get":{"summary":"Get Organisation Build Status","description":"Get the organisation build status.\n\n\u003e [!WARNING]\n\u003e This method requires the `organisation` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["organisation"]}],"tags":["organisations"],"operationId":"getV2OrganisationsIdBuildStatus","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Organisation Build Status"}}}},"/v2/award_templates":{"get":{"summary":"Get Enabled Award Templates","description":"This method returns a list of award templates enabled for the API user's organisation.\n\n\u003e [!WARNING]\n\u003e This method requires the `settings` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["settings"]}],"tags":["award_templates"],"operationId":"getV2AwardTemplates","parameters":[{"in":"query","name":"include_custom_award_templates","description":"If true, award template organisation will be included in the response. Defaults to false.","required":false,"schema":{"type":"boolean","example":false}},{"in":"query","name":"include_custom_payroll_setup","description":"If true, the organisation's unnamed custom payroll setup is included in the response. Defaults to false.","required":false,"schema":{"type":"boolean","example":false}},{"in":"query","name":"updated_after","description":"Time filter to find recently created or modified award templates","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}}],"responses":{"200":{"description":"Get Enabled Award Templates","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AwardTemplate"}}}}}}},"post":{"summary":"Enable Award Template","description":"Use this method to enable an award template for a particular organisation. A single field, the `award_template_id`, is required. This field is unique across Tanda. You can get a list of valid IDs by making a call to the [available award templates](#award-templates-award-templates-list-get-1) method.\n\nThis method enables the award template, then triggers a background job to populate the Tanda organisation with the relevant payroll rules and allowances. It may take up to several hours for those to be created and costing information to be updated.\n\nIf you include the `extract_leave_types` parameter with a value of `true`, any leave types included in the template will be made user-visible and user-editable. The default is `false` which means that leave types will be managed by the template after it's created.\n\nIf you include the `replace_leave_types` parameter with a value of `true`, any existing leave types in the organisation prior to the award template's being added will be removed. The default is `false` which will not alter existing leave types.\n\n\u003e [!WARNING]\n\u003e This method requires the `settings` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["settings"]}],"tags":["award_templates"],"operationId":"postV2AwardTemplates","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2AwardTemplates"},"examples":{"Enable Award Template":{"value":{"award_template_id":990}},"Enable Award Template With Leave Types Extracted":{"value":{"award_template_id":990,"extract_leave_types":true,"replace_leave_types":true}}}}}},"responses":{"201":{"description":"Enable Award Template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AwardTemplate"}}}}}}},"/v2/award_templates/available":{"get":{"summary":"Get Available Award Templates","description":"This method returns a full list of award templates available in Tanda.\n\n\u003e [!WARNING]\n\u003e This method requires the `settings` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["settings"]}],"tags":["award_templates"],"operationId":"getV2AwardTemplatesAvailable","responses":{"200":{"description":"Get Available Award Templates","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AwardTemplate"}}}}}}}},"/v2/super_funds":{"get":{"summary":"List Super Funds","description":"List super funds.\n\n\u003e [!WARNING]\n\u003e This method requires the `financial` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["financial"]}],"tags":["super_funds"],"operationId":"getV2SuperFunds","responses":{"200":{"description":"List Super Funds"}}}},"/v2/super_funds/{id}":{"get":{"summary":"Get Super Fund","description":"Get a super fund.\n\n\u003e [!WARNING]\n\u003e This method requires the `financial` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["financial"]}],"tags":["super_funds"],"operationId":"getV2SuperFundsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Super Fund"}}}},"/v2/personal_details":{"get":{"summary":"Get Personal Details","description":"Gets the personal details of the currently authenticated user\n\n\u003e [!WARNING]\n\u003e This method requires the `personal` scope.\n\u003e\n\u003e To retrieve financial information, such as a Tax File Number, you must also have the `financial` scope.\n","security":[{"tanda_oauth":["personal"]}],"tags":["personal_details"],"operationId":"getV2PersonalDetails","responses":{"200":{"description":"Get Personal Details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalDetails"}}}}}},"put":{"summary":"Update Personal Details","description":"Update the currently authenticated user's personal details.\n\n\u003e [!WARNING]\n\u003e Any `emergency_contacts` provided will be appended to existing emergency contacts.\n","security":[{"tanda_oauth":["personal"]}],"tags":["personal_details"],"operationId":"putV2PersonalDetails","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2PersonalDetails"}}}},"responses":{"200":{"description":"Update Personal Details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalDetails"}}}}}}},"/v2/personal_details/{id}":{"get":{"summary":"Get Employee's Personal Details","description":"\u003e [!WARNING]\n\u003e This endpoint requires the `user` and `personal` scopes.\n\u003e The authenticated user must also be a manager of the employee identified by `user_id`.\n\u003e The `financial` scope is required to see financial data.\n","security":[{"tanda_oauth":["personal"]}],"tags":["personal_details"],"operationId":"getV2PersonalDetailsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Employee's Personal Details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalDetails"}}}}}},"put":{"summary":"Update Employee's Personal Details","description":"Update a user's personal details.\n\n\u003e [!WARNING]\n\u003e This endpoint requires the `user` and `personal` scopes.\n\u003e The authenticated user must also be a manager of the employee identified by `user_id`.\n\u003e The `financial` scope is required to see financial data.\n\n\u003e [!WARNING]\n\u003e Any `emergency_contacts` provided will be appended to existing emergency contacts.\n","security":[{"tanda_oauth":["personal"]}],"tags":["personal_details"],"operationId":"putV2PersonalDetailsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2PersonalDetailsId"}}}},"responses":{"200":{"description":"Update Employee's Personal Details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalDetails"}}}}}}},"/v2/webhooks":{"get":{"summary":"Get Subscriptions","description":"Only admin users are able to access these endpoints. Webhook configuration is common across an organisation.\n","security":[{"tanda_oauth":[]}],"tags":["webhooks"],"operationId":"getV2Webhooks","responses":{"200":{"description":"Get Subscriptions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Subscription"}}}}}}},"post":{"summary":"Create Subscription","description":"We will send a notification with the topic `created` when a webhook is first created.\n\nOnly admin users are able to access these endpoints. Webhook configuration is common across an organisation.\n","security":[{"tanda_oauth":[]}],"tags":["webhooks"],"operationId":"postV2Webhooks","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2Webhooks"},"examples":{"Default":{"value":{"url":"https://requestb.in/TaNdA","token":"IaMaOptionalSeCrEt","topics":["user.created","clockin.updated"]}}}}}},"responses":{"201":{"description":"Create Subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}}}}}},"/v2/webhooks/{id}":{"get":{"summary":"Get Subscription","description":"Fetch a single webhook subscription by ID.\n\nOnly admin users are able to access these endpoints. Webhook configuration is common across an organisation.\n","security":[{"tanda_oauth":[]}],"tags":["webhooks"],"operationId":"getV2WebhooksId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}}}}},"delete":{"summary":"Delete Subscription","description":"Delete a webhook subscription by ID.\n\nOnly admin users are able to access these endpoints. Webhook configuration is common across an organisation.\n","security":[{"tanda_oauth":[]}],"tags":["webhooks"],"operationId":"deleteV2WebhooksId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"Delete Subscription"}}}},"/v2/public_holidays":{"get":{"summary":"Get Public Holidays","description":"Given a list of regions, and years, returns a list of public holidays in those regions in those years.\n","security":[{"tanda_oauth":[]}],"tags":["public_holidays"],"operationId":"getV2PublicHolidays","parameters":[{"in":"formData","name":"regions","description":"one or more comma separated public holiday regions","required":true,"schema":{"type":"array","items":{"type":"string"},"example":"au,au_qld"}},{"in":"formData","name":"years","description":"one or more comma separated public holiday years","required":true,"schema":{"type":"array","items":{"type":"string"},"example":"2018,2019"}}],"responses":{"200":{"description":"Get Public Holidays"}}}},"/v2/temporary_files":{"post":{"summary":"Create Temporary File","description":"Use this endpoint to upload files that will then be called by other endpoints. This allows you to process files \"in the background\" while a user is doing other things in your app. For example, if you are building a form for a user to [request time off](#leave-requests-leave-list-post), you might start uploading to the temporary files endpoint as soon as the user chooses a verification photo. That way, when they submit the form, you have already uploaded the file and they don't need to wait for it to upload.\n\nFiles must not be larger than 5mb.\n\nUnlike other endpoints, this endpoint does not accept JSON. Instead it expects binary file data.\n\n* If you're writing JavaScript, use the [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData/Using_FormData_Objects) API.\n* If you're using CURL, use the [`-F` (`--form`)](https://medium.com/@petehouston/upload-files-with-curl-93064dcccc76) flag.\n* If you're using Postman, use the [Form-data](https://www.getpostman.com/docs/v6/postman/sending_api_requests/requests) option, with a param of type \"File\" and key `file`.\n\nIf you like, you can pass a comma separated list of content types to the `content_types` param. If provided, the API will validate these against the uploaded file, and you will get a `400` status back if the file is invalid.\n\nIf the upload is successful, you'll get back a `file_id`. Use this ID with endpoints that support file attachments. There's a few things you should know about file IDs:\n\n* A file ID can only be used once. It will be deleted once the uploaded file has successfully been linked via another endpoint.\n* If a file ID isn't used for a week it will be deleted.\n","security":[{"tanda_oauth":[]}],"tags":["temporary_files"],"operationId":"postV2TemporaryFiles","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2TemporaryFiles"}}}},"responses":{"201":{"description":"Create Temporary File","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemporaryFile"}}}}}}},"/v2/onboarding_forms":{"get":{"summary":"List Onboarding Forms","description":"List onboarding forms.\n\n\u003e [!WARNING]\n\u003e This method requires the `user` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["user"]}],"tags":["onboarding_forms"],"operationId":"getV2OnboardingForms","responses":{"200":{"description":"List Onboarding Forms","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OnboardingForm"}}}}}}}},"/v2/onboarding_forms/sign":{"post":{"summary":"Sign Onboarding Form","description":"Sign an onboarding form.\n\n\u003e [!WARNING]\n\u003e This method requires the `user` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["user"]}],"tags":["onboarding_forms"],"operationId":"postV2OnboardingFormsSign","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2OnboardingFormsSign"}}}},"responses":{"201":{"description":"Sign Onboarding Form"}}}},"/v2/organisation_questions":{"get":{"summary":"List Organisation Questions","description":"List organisation questions.\n\n\u003e [!WARNING]\n\u003e This method requires the `user` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["user"]}],"tags":["organisation_questions"],"operationId":"getV2OrganisationQuestions","responses":{"200":{"description":"List Organisation Questions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganisationQuestion"}}}}}}}},"/v2/organisation_questions/answers":{"post":{"summary":"Answer Organisation Questions","description":"Answer organisation questions.\n\n\u003e [!WARNING]\n\u003e This method requires the `user` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["user"]}],"tags":["organisation_questions"],"operationId":"postV2OrganisationQuestionsAnswers","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2OrganisationQuestionsAnswers"}}}},"responses":{"201":{"description":"Answer Organisation Questions"}}}},"/v2/user_contracts/to_be_signed":{"get":{"summary":"List Contracts to be Signed","description":"List contracts to be signed.\n\n\u003e [!WARNING]\n\u003e This method requires the `user` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["user"]}],"tags":["user_contracts"],"operationId":"getV2UserContractsToBeSigned","responses":{"200":{"description":"List Contracts to be Signed","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserContract"}}}}}}}},"/v2/user_contracts/sign":{"post":{"summary":"Sign User Contract","description":"Sign a user contract.\n\n\u003e [!WARNING]\n\u003e This method requires the `user` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["user"]}],"tags":["user_contracts"],"operationId":"postV2UserContractsSign","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2UserContractsSign"}}}},"responses":{"201":{"description":"Sign User Contract"}}}},"/v2/shift_reminders":{"get":{"summary":"Get Shift Reminders","description":"\u003e [!WARNING]\n\u003e This method requires the `me` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["me"]}],"tags":["shift_reminders"],"operationId":"getV2ShiftReminders","responses":{"200":{"description":"Get Shift Reminders","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ShiftReminder"}}}}}}},"post":{"summary":"Create Shift Reminder","description":"\u003e [!WARNING]\n\u003e This method requires the `me` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["me"]}],"tags":["shift_reminders"],"operationId":"postV2ShiftReminders","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2ShiftReminders"},"examples":{"Create Shift Reminder":{"value":{"minutes_before_shift_start":120}}}}}},"responses":{"201":{"description":"Create Shift Reminder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShiftReminder"}}}}}}},"/v2/shift_reminders/{id}":{"get":{"summary":"Get Shift Reminder","description":"\u003e [!WARNING]\n\u003e This method requires the `me` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["me"]}],"tags":["shift_reminders"],"operationId":"getV2ShiftRemindersId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Shift Reminder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShiftReminder"}}}}}},"put":{"summary":"Update Shift Reminder","description":"\u003e [!WARNING]\n\u003e This method requires the `me` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["me"]}],"tags":["shift_reminders"],"operationId":"putV2ShiftRemindersId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2ShiftRemindersId"},"examples":{"Update Shift Reminder":{"value":{"minutes_before_shift_start":45}}}}}},"responses":{"200":{"description":"Update Shift Reminder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShiftReminder"}}}}}},"delete":{"summary":"Delete Shift Reminder","description":"\u003e [!WARNING]\n\u003e This method requires the `me` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["me"]}],"tags":["shift_reminders"],"operationId":"deleteV2ShiftRemindersId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"Delete Shift Reminder"}}}},"/v2/schedule_swap_plans":{"get":{"summary":"Get Schedule Swap Plans","description":"Returns a list of schedule swap plans. Gets all plans by default, but you may specify which plans you would like to return using the `statuses` parameter. Schedule Swap Plans that are visible include:\n  - Schedule swap plans where you are the sender\n  - Schedule swap plans where you are a manager of the sender\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope. (see [Scopes](#header-scopes) for more information)\n","security":[{"tanda_oauth":["roster"]}],"tags":["schedule_swap_plans"],"operationId":"getV2ScheduleSwapPlans","parameters":[{"in":"query","name":"statuses","required":false,"schema":{"type":"array","items":{"type":"string","enum":["pending","approved","rejected"]},"example":"pending,approved,rejected"}}],"responses":{"200":{"description":"Get Schedule Swap Plans","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ScheduleSwapPlan"}}}}}}},"post":{"summary":"Create Schedule Swap Plan","description":"Creates a new schedule swap plan. If the schedule's start is more than 3 days away, the schedule swap plan will have a strategy of `undecided`, else it will automatically be `broadcasted` - unless the request is sent with the `prepare_auto_broadcast: false` parameter.\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope. (see [Scopes](#header-scopes) for more information)\n\n\u003e [!WARNING]\n\u003e Schedule swap plans can only be created for yourself or someone you manage\n\n\u003e [!WARNING]\n\u003e Schedule swap plans can only be created for schedules that meet the following criteria:\n\u003e   - Is in the future\n\u003e   - Has a start\n\u003e   - Has a team\n","security":[{"tanda_oauth":["roster"]}],"tags":["schedule_swap_plans"],"operationId":"postV2ScheduleSwapPlans","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2ScheduleSwapPlans"},"examples":{"Default":{"value":{"schedule_id":10203834}}}}}},"responses":{"201":{"description":"Create Schedule Swap Plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleSwapPlan"}}}}}}},"/v2/schedule_swap_plans/{id}/curate":{"put":{"summary":"Curate A Swap","description":"Transistions a schedule swap plan from `undecided` to `curated` making all specified `concealed` schedule swap proposals transition to `pending`. This schedule swap plan will transition directly to approved when a user accepts to cover the schedule\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope. (see [Scopes](#header-scopes) for more information)\n","security":[{"tanda_oauth":["roster"]}],"tags":["schedule_swap_plans"],"operationId":"putV2ScheduleSwapPlansIdCurate","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2ScheduleSwapPlansIdCurate"},"examples":{"Curate A Swap":{"value":{"proposal_ids":[12312983,12890371]}}}}}},"responses":{"200":{"description":"Curate A Swap","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleSwapPlan"}}}}}}},"/v2/schedule_swap_plans/{id}/broadcast":{"put":{"summary":"Broadcast A Swap","description":"Transistions a swap from `undecided` to `broadcasted` making all `concealed` schedule swap proposals transition to `pending`. A schedule swap proposal will still require to be approved for this schedule swap plan to transition to `approved`\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope. (see [Scopes](#header-scopes) for more information)\n","security":[{"tanda_oauth":["roster"]}],"tags":["schedule_swap_plans"],"operationId":"putV2ScheduleSwapPlansIdBroadcast","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Broadcast A Swap","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleSwapPlan"}}}}}}},"/v2/schedule_swap_plans/{id}/reject":{"put":{"summary":"Reject A Swap","description":"Transitions a schedule swap plan to `rejected` making all its schedule swap proposals also transition to `rejected`\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope. (see [Scopes](#header-scopes) for more information)\n\n\u003e [!WARNING]\n\u003e Schedule swap plans can only be rejected yourself or for someone you manage\n","security":[{"tanda_oauth":["roster"]}],"tags":["schedule_swap_plans"],"operationId":"putV2ScheduleSwapPlansIdReject","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Reject A Swap","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleSwapPlan"}}}}}}},"/v2/schedule_swap_plans/{id}/notify":{"put":{"summary":"Notify Everyone Who Can Cover","description":"Will send a notification to all users available to cover this shift through the [Tanda App](https://www.tanda.co/tanda-mobile-scheduling-app/)\n\n\u003e [!NOTE]\n\u003e Notifications will only be sent to users who have a schedule swap proposals in a `pending` or `seen` state.\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope. (see [Scopes](#header-scopes) for more information)\n\n\u003e [!WARNING]\n\u003e Only a manager of a swap can notify the users available\n","security":[{"tanda_oauth":["roster"]}],"tags":["schedule_swap_plans"],"operationId":"putV2ScheduleSwapPlansIdNotify","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Notify Everyone Who Can Cover","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleSwapPlan"}}}}}}},"/v2/schedule_swap_proposals":{"get":{"summary":"Schedule Swap Proposals","description":"Returns a list of schedule swap proposals. Gets all proposals by default, but you may specify which proposals to return using the `statuses` parameter. Schedule swap proposals that are visible include:\n  - schedule swap proposals of users you manage\n  - schedule swap proposals for yourself (that are not `concealed`)\n\n\u003e [!NOTE]\n\u003e If a user has another commitment at the same time as the proposed schedule. There will be no proposal for this user\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope. (see [Scopes](#header-scopes) for more information)\n","security":[{"tanda_oauth":["roster"]}],"tags":["schedule_swap_proposals"],"operationId":"getV2ScheduleSwapProposals","parameters":[{"in":"query","name":"statuses","required":false,"schema":{"type":"array","items":{"type":"string","enum":["concealed","pending","seen","accepted","approved","rejected"]},"example":"concealed,seen,pending,approved,rejected,accepted"}}],"responses":{"200":{"description":"Schedule Swap Proposals","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ScheduleSwapProposal"}}}}}}}},"/v2/schedule_swap_proposals/{id}/status":{"put":{"summary":"Schedule Swap Proposal","description":"Useful to transition a proposal between states.\n\n\u003e [!WARNING]\n\u003e Proposals are only eligible for transitions under specific circumstances. The conditions are:\n\u003e\n\u003e   * Transition to `seen`\n\u003e     - proposal must currently be `pending` or `accepted`\n\u003e     - proposal must be your own\n\u003e\n\u003e   * Transition to `acccepted`\n\u003e     - proposal must currently be `pending` or `seen`\n\u003e     - proposal must be your own\n\u003e\n\u003e   * Transition to `approved`\n\u003e     - proposal must be `accepted`\n\u003e     - plan must be `pending`\n\u003e\n\u003e   * Transition to `rejected`\n\u003e     - proposal must be `pending`, `seen` or `accepted`\n\u003e     - proposal must be your own, or someones who you manage\n","security":[{"tanda_oauth":["roster"]}],"tags":["schedule_swap_proposals"],"operationId":"putV2ScheduleSwapProposalsIdStatus","parameters":[{"in":"path","name":"id","description":"The ID of the schedule swap proposal to update","required":true,"schema":{"type":"integer","format":"int32","example":12345}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2ScheduleSwapProposalsIdStatus"}}}},"responses":{"200":{"description":"Schedule Swap Proposal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleSwapProposal"}}}}}}},"/v2/custom_events":{"get":{"summary":"Get Custom Events List","description":"Get a full list of custom events in a single request.\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` and `department` scopes (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["roster"]}],"tags":["custom_events"],"operationId":"getV2CustomEvents","parameters":[{"in":"query","name":"from","description":"From date to lookup custom events","required":true,"schema":{"type":"string","format":"date","example":"2016-03-15"}},{"in":"query","name":"to","description":"To date to lookup custom events","required":true,"schema":{"type":"string","format":"date","example":"2016-03-17"}}],"responses":{"200":{"description":"Get Custom Events List","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomEvent"}}}}}}},"post":{"summary":"Create Custom Events List","description":"Creates a custom event under the current organisation and placed under the specified location\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` and `department` scopes (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["roster"]}],"tags":["custom_events"],"operationId":"postV2CustomEvents","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2CustomEvents"},"examples":{"Create Custom Event":{"value":{"name":"Tanda Panda Day","start":"2018-09-01","finish":"2018-09-01","discourage_time_off":true,"custom_event_joins_attributes":[{"location_id":2002},{"location_id":2003},{"location_id":2004}]}}}}}},"responses":{"201":{"description":"Create Custom Events List","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomEvent"}}}}}}},"/v2/custom_events/{id}":{"put":{"summary":"Update Custom Event Request","description":"\u003e [!WARNING]\n\u003e This method requires the `roster` and `department` scopes (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["roster"]}],"tags":["custom_events"],"operationId":"putV2CustomEventsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2CustomEventsId"},"examples":{"Update Custom Event":{"value":{"name":"Tanda Panda Month","start":"2018-09-01","finish":"2018-09-30","discourage_time_off":true}}}}}},"responses":{"200":{"description":"Update Custom Event Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomEvent"}}}}}},"delete":{"summary":"Delete Custom Event","description":"\u003e [!WARNING]\n\u003e This method requires the `roster` and `department` scopes (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["roster"]}],"tags":["custom_events"],"operationId":"deleteV2CustomEventsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"Delete Custom Event"}}}},"/v2/custom_events/{id}/locations":{"put":{"summary":"Update Custom Event Locations","description":"\u003e [!WARNING]\n\u003e This method requires the `roster` and `department` scopes (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["roster"]}],"tags":["custom_events"],"operationId":"putV2CustomEventsIdLocations","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2CustomEventsIdLocations"},"examples":{"Update Custom Event locations":{"value":{"location_ids":[2007]}}}}}},"responses":{"200":{"description":"Update Custom Event Locations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomEvent"}}}}}},"delete":{"summary":"Delete Custom Event Location","description":"\u003e [!WARNING]\n\u003e This method requires the `roster` and `department` scopes (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["roster"]}],"tags":["custom_events"],"operationId":"deleteV2CustomEventsIdLocations","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"location_ids","required":true,"schema":{"type":"array","items":{"type":"integer","format":"int32"},"example":[12345,12346]}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"},"examples":{"Update Custom Event locations":{"value":{"location_ids":[2005,2007]}}}}}},"responses":{"200":{"description":"Delete Custom Event Location","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomEvent"}}}}}}},"/v2/reports/live_wage_tracker":{"get":{"summary":"Get Live Wage Tracker","description":"Get the live wage tracker.\n\n\u003e [!WARNING]\n\u003e This method requires the `cost` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["cost"]}],"tags":["reports"],"operationId":"getV2ReportsLiveWageTracker","parameters":[{"in":"query","name":"location_id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Live Wage Tracker"}}}},"/v2/reports/adoption_metrics":{"get":{"summary":"Get Adoption Metrics","description":"Provides a summary of adoption of key product features across the organisation.\n","security":[{"tanda_oauth":["cost"]}],"tags":["reports"],"operationId":"getV2ReportsAdoptionMetrics","parameters":[{"in":"query","name":"weeks","description":"1 | 2 | 4 - number of weeks to aggregate data for","required":true,"schema":{"type":"integer","format":"int32","example":1}},{"in":"query","name":"include_user_ids","description":"if true, include user IDs for every property. Defaults to `false`.","required":false,"schema":{"type":"boolean","example":false}}],"responses":{"200":{"description":"Get Adoption Metrics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdoptionMetrics"}}}}}}},"/v2/announcements":{"get":{"summary":"Get Announcements","description":"\u003e [!WARNING]\n\u003e This method requires the `communication` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["communication"]}],"tags":["announcements"],"operationId":"getV2Announcements","parameters":[{"in":"query","name":"communication_room_id","description":"Filter by announcement room ID","required":false,"schema":{"type":"integer","format":"int32","example":12345}},{"in":"query","name":"updated_after","description":"Only return announcements updated after this unix timestamp","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}},{"in":"query","name":"page","required":false,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"page_size","required":false,"schema":{"type":"integer","format":"int32","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Get Announcements","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Announcement"}}}}}}},"post":{"summary":"Create Announcement","description":"\u003e [!WARNING]\n\u003e This method requires the `communication` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["communication"]}],"tags":["announcements"],"operationId":"postV2Announcements","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2Announcements"},"examples":{"Default":{"value":{"communication_room_id":456,"title":"Office Closure","content":"The office will be closed on Friday for maintenance.","sender_id":123456,"created_at":1456902000,"notify":false}}}}}},"responses":{"201":{"description":"Create Announcement","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Announcement"}}}}}}},"/v2/announcements/{id}":{"get":{"summary":"Get Announcement","description":"\u003e [!WARNING]\n\u003e This method requires the `communication` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["communication"]}],"tags":["announcements"],"operationId":"getV2AnnouncementsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Announcement","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Announcement"}}}}}}},"/v2/announcement_rooms":{"get":{"summary":"Get Announcement Rooms","description":"Returns all announcement rooms accessible to the authenticated user.\n\n\u003e [!WARNING]\n\u003e This method requires the `communication` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["communication"]}],"tags":["announcement_rooms"],"operationId":"getV2AnnouncementRooms","parameters":[{"in":"query","name":"updated_after","description":"Only return rooms updated after this unix timestamp","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}},{"in":"query","name":"page","required":false,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"page_size","required":false,"schema":{"type":"integer","format":"int32","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Get Announcement Rooms","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AnnouncementRoom"}}}}}}},"post":{"summary":"Create Announcement Room","description":"Creates a new announcement room for the authenticated user's organisation. Specify\neither `team_ids` or `location_ids` (not both) to define which teams or locations the\nroom is visible to.\n\nThe caller must have permission to create announcement rooms in their organisation.\n`description` is optional.\n\n\u003e [!WARNING]\n\u003e This method requires the `communication` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["communication"]}],"tags":["announcement_rooms"],"operationId":"postV2AnnouncementRooms","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2AnnouncementRooms"},"examples":{"Default":{"value":{"name":"Warehouse Announcements","team_ids":[123,456]}}}}}},"responses":{"201":{"description":"Create Announcement Room","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnouncementRoom"}}}}}}},"/v2/announcement_rooms/{id}":{"get":{"summary":"Get Announcement Room","description":"Returns a single announcement room by ID.\n\n\u003e [!WARNING]\n\u003e This method requires the `communication` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["communication"]}],"tags":["announcement_rooms"],"operationId":"getV2AnnouncementRoomsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Announcement Room","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnouncementRoom"}}}}}},"put":{"summary":"Update Announcement Room","description":"Updates an existing announcement room. Specify either `team_ids` or `location_ids`\n(not both) to redefine which teams or locations the room is visible to. `description`\nis optional; omit it to leave the current description unchanged. Cannot update\narchived or organisation-wide rooms.\n\n\u003e [!WARNING]\n\u003e This method requires the `communication` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["communication"]}],"tags":["announcement_rooms"],"operationId":"putV2AnnouncementRoomsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2AnnouncementRoomsId"},"examples":{"Default":{"value":{"name":"Updated Warehouse Announcements","team_ids":[123,789]}}}}}},"responses":{"200":{"description":"Update Announcement Room","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnouncementRoom"}}}}}}},"/v2/shift_ratings":{"post":{"summary":"Post Shift Ratings","description":"Allows for a shift rating from 1 to 5 to be added to a users shift in Tanda if they worked on that day.\n","security":[{"tanda_oauth":["timesheet"]}],"tags":["shift_ratings"],"operationId":"postV2ShiftRatings","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2ShiftRatings"},"examples":{"Submit Shift Rating with `user_id`":{"value":{"user_id":12345,"date":"2020-07-22","rating":5}},"Submit Shift Rating with `employee_number`":{"value":{"employee_number":"abc123","date":"2020-07-22","rating":5}}}}}},"responses":{"200":{"description":"Post Shift Ratings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Shift"}}}}}}},"/v2/wage_comparisons":{"get":{"summary":"Get Wage Comparisons","description":"\u003e [!WARNING]\n\u003e This method requires the `cost` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["cost"]}],"tags":["wage_comparisons"],"operationId":"getV2WageComparisons","responses":{"200":{"description":"Get Wage Comparisons","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PayConditionSet"}}}}}}},"post":{"summary":"Create Wage Comparison","description":"To post a wage comparison for an employee, include the `user_id` and `from_date` along with any required optional parameters. Note that `from_date` and `to_date` must not overlap for different wage comparisons for the same user.\n\n\u003e [!WARNING]\n\u003e This method requires the `cost` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["cost"]}],"tags":["wage_comparisons"],"operationId":"postV2WageComparisons","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2WageComparisons"},"examples":{"Create Wage Comparison":{"value":{"user_id":123456,"from_date":"2016-03-12","to_date":"2017-04-12","hourly_rate":22.36,"salary":808,"award_tags":"full time, meal break","award_template_organisation_id":4}}}}}},"responses":{"201":{"description":"Create Wage Comparison","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayConditionSet"}}}}}}},"/v2/wage_comparisons/{id}":{"get":{"summary":"Get Wage Comparison","description":"\u003e [!WARNING]\n\u003e This method requires the `cost` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["cost"]}],"tags":["wage_comparisons"],"operationId":"getV2WageComparisonsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Wage Comparison","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayConditionSet"}}}}}},"put":{"summary":"Update Wage Comparison","description":"\u003e [!WARNING]\n\u003e This method requires the `cost` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["cost"]}],"tags":["wage_comparisons"],"operationId":"putV2WageComparisonsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2WageComparisonsId"},"examples":{"Update Wage Comparison":{"value":{"user_id":123456,"from_date":"2016-03-12","to_date":"2017-04-12","hourly_rate":22.36,"salary":808,"award_tags":"full time, meal break","award_template_organisation_id":4}}}}}},"responses":{"200":{"description":"Update Wage Comparison","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayConditionSet"}}}}}},"delete":{"summary":"Delete Wage Comparison","description":"\u003e [!WARNING]\n\u003e This method requires the `cost` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["cost"]}],"tags":["wage_comparisons"],"operationId":"deleteV2WageComparisonsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"Delete Wage Comparison"}}}},"/v2/wage_comparisons/{id}/outer_limits":{"get":{"summary":"Get Wage Comparison Outer Limits User Setting","description":"\u003e [!WARNING]\n\u003e This method requires the `cost` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["cost"]}],"tags":["wage_comparisons"],"operationId":"getV2WageComparisonsIdOuterLimits","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Wage Comparison Outer Limits User Setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OuterLimitsUserSetting"}}}}}}},"/v2/wage_comparisons/{wage_comparison_id}/outer_limits":{"post":{"summary":"Create Wage Comparison Outer Limits User Setting","description":"If a wage comparison does not have outer limits set, this endpoint creates them. If the wage comparison already has outer limits, an error will be returned.\n\nThe outer limit user setting that is created will also be returned in the response.\n\nThe request fields are as follows:\n\n+ **penalty_hours** `number`: (required) Example: `6`.\u003cbr/\u003e\n    The outer limit of penalty hours.\n+ **overtime_hours** `number`: (required) Example: `6`.\u003cbr/\u003e\n    The outer limit of overtime hours.\n+ **averaging_cadence** `string`: (required) Example: `pay_cycle`.\u003cbr/\u003e\n    The averaging cadence to use. Must be one of `pay_cycle`, `overtime_averaging`, or `other`.\n+ **custom_cycle_length** `string`: (optional) Example: `weekly`.\u003cbr/\u003e\n    If `averaging_cadence` is set to `other`, this value is required and is the cycle length that will be used. Otherwise, the value is ignored. Must be one of `weekly`, `fortnightly`, `three_weekly`, or `four_weekly`.\n+ **custom_anchor_date** `date`: (optional) Example: `2022-01-24`.\u003cbr/\u003e\n    If `averaging_cadence` is set to `other`, this value is required and is used as the anchor for each cycle. For example, if the anchor date is set to Monday 24th January and the cycle length is weekly, the outer limit test period will be each Monday to the following Sunday.\n\n\u003e [!WARNING]\n\u003e This method requires the `cost` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["cost"]}],"tags":["wage_comparisons"],"operationId":"postV2WageComparisonsWageComparisonIdOuterLimits","parameters":[{"in":"path","name":"wage_comparison_id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2WageComparisonsWageComparisonIdOuterLimits"},"examples":{"Default":{"value":{"penalty_hours":6,"overtime_hours":6,"averaging_cadence":"other","custom_cycle_length":"weekly","custom_anchor_date":"2022-01-24"}}}}}},"responses":{"201":{"description":"Create Wage Comparison Outer Limits User Setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OuterLimitsUserSetting"}}}}}},"put":{"summary":"Update Wage Comparison Outer Limits User Setting","description":"Updates an existing outer limits user setting with new data. This endpoint supports partial updates - you only need to specify the fields that you wish to update.\n\nThe full outer limits user setting will be returned in the response.\n\nSee [Create Wage Comparison Outer Limits User Settings](#wage-comparison-wage-comparison-outer-limits-user-setting-post) for more information about the request fields.\n\n\u003e [!WARNING]\n\u003e This method requires the `cost` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["cost"]}],"tags":["wage_comparisons"],"operationId":"putV2WageComparisonsWageComparisonIdOuterLimits","parameters":[{"in":"path","name":"wage_comparison_id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2WageComparisonsWageComparisonIdOuterLimits"},"examples":{"Default":{"value":{"penalty_hours":9}}}}}},"responses":{"200":{"description":"Update Wage Comparison Outer Limits User Setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OuterLimitsUserSetting"}}}}}},"delete":{"summary":"Delete Wage Comparison Outer Limits User Setting","description":"This endpoint deletes the outer limits settings for a wage comparison. If the deletion was successful, the response is empty.\n\n\u003e [!WARNING]\n\u003e This method requires the `cost` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["cost"]}],"tags":["wage_comparisons"],"operationId":"deleteV2WageComparisonsWageComparisonIdOuterLimits","parameters":[{"in":"path","name":"wage_comparison_id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"Delete Wage Comparison Outer Limits User Setting"}}}},"/v2/wage_comparisons/reporting_periods/user/{user_id}":{"get":{"summary":"Get User Reporting Periods","description":"Get user reporting periods.\n\nA user has at most one of these. It sets how often wage compare runs for them, and from it we work out\nwhich period is the current one and which is next.\n\n\u003e [!WARNING]\n\u003e This method requires the `cost` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["cost"]}],"tags":["wage_comparisons"],"operationId":"getV2WageComparisonsReportingPeriodsUserUserId","parameters":[{"in":"path","name":"user_id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get User Reporting Periods","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WageCompareReportingPeriod"}}}}}},"post":{"summary":"Create User Reporting Period","description":"Create a user reporting period, and get it back in the response.\n\nA user can only have one, so this returns an error if they already have one.\n\n\u003e [!WARNING]\n\u003e This method requires the `cost` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["cost"]}],"tags":["wage_comparisons"],"operationId":"postV2WageComparisonsReportingPeriodsUserUserId","parameters":[{"in":"path","name":"user_id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2WageComparisonsReportingPeriodsUserUserId"}}}},"responses":{"201":{"description":"Create User Reporting Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WageCompareReportingPeriod"}}}}}},"put":{"summary":"Update User Reporting Period","description":"Update a user reporting period, and get the whole thing back in the response.\n\nThe fields are the same ones you send when creating it.\n\n\u003e [!WARNING]\n\u003e This method requires the `cost` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["cost"]}],"tags":["wage_comparisons"],"operationId":"putV2WageComparisonsReportingPeriodsUserUserId","parameters":[{"in":"path","name":"user_id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2WageComparisonsReportingPeriodsUserUserId"}}}},"responses":{"200":{"description":"Update User Reporting Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WageCompareReportingPeriod"}}}}}},"delete":{"summary":"Delete User Reporting Period","description":"Delete a user's reporting period.\n\n\u003e [!WARNING]\n\u003e This method requires the `cost` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["cost"]}],"tags":["wage_comparisons"],"operationId":"deleteV2WageComparisonsReportingPeriodsUserUserId","parameters":[{"in":"path","name":"user_id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"Delete User Reporting Period"}}}},"/v2/user_pay_fields":{"get":{"summary":"Get Payfields For All Users","description":"Retrieves all pay field objects belonging to the users of the organisation. This endpoint can be paginated.\n\n\u003e [!WARNING]\n\u003e This method requires the `cost` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["cost"]}],"tags":["user_pay_fields"],"operationId":"getV2UserPayFields","parameters":[{"in":"query","name":"page","required":false,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"page_size","required":false,"schema":{"type":"integer","format":"int32","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Get Payfields For All Users","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserPayField"}}}}}}},"post":{"summary":"Create Payfield","description":"`user_id` and `from_date` are all that are required in the request body to create a new payfield entry.\n\n\u003e [!WARNING]\n\u003e If no `to_date` is provided as a parameter, this payfield record will apply forever.\n","security":[{"tanda_oauth":["cost"]}],"tags":["user_pay_fields"],"operationId":"postV2UserPayFields","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2UserPayFields"},"examples":{"Create Payfield":{"value":{"user_id":654321,"from_date":"1970-1-1","to_date":"2020-1-1","hourly_rate":0.0,"award_tags":"Casual,Level 1","yearly_salary":60000,"contracted_weekly_hours":38,"award_template_organisation_id":12345}}}}}},"responses":{"201":{"description":"Create Payfield","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPayField"}}}},"400":{"description":"Missing user ID, or invalid award template organisation ID"},"401":{"description":"You do not have access to this user's pay information"},"404":{"description":"Invalid user ID"}}}},"/v2/user_pay_fields/user/{user_id}":{"get":{"summary":"Get Payfields By User","description":"This endpoint takes a user ID and returns an array of all the users pay field objects.\n\n\u003e [!WARNING]\n\u003e This method requires the `cost` scope (see [Scopes](#header-scopes) for more information).\n\u003e\n\u003e It also requires the user to exist — failure to meet this pre-req will result in a returned `400`, `403` or `404`. Otherwise an array of `UserPayFieldData` will be returned.\n","security":[{"tanda_oauth":["cost"]}],"tags":["user_pay_fields"],"operationId":"getV2UserPayFieldsUserUserId","parameters":[{"in":"path","name":"user_id","description":"The id of the user","required":true,"schema":{"type":"integer","format":"int32","example":12345}}],"responses":{"200":{"description":"Get Payfields By User","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserPayField"}}}}}}},"post":{"summary":"Create \u0026 Update Multiple Pay Fields For A User","description":"This endpoint can be used through a POST request to manage a specific user's pay field objects in bulk. This method requires a `user_id` to be given, and requires the `cost` scope.\n\nYou do not have to provide every pay field in the request body. The ones you do provide will form the new value of the updated pay field object. The only limitation to updating behaviour is — you cannot update a user's first pay field object's `from_date`.\n\nIf you provide an `id` to a pay field object in the array, the request will look for the existing record and update the corresponding fields. You must provide a valid `id` in doing so; the whole request will fail if there is a non-existent pay field `id`. If you do not provide an `id`, the request will create a new pay field record for the user with the provided fields.\n","security":[{"tanda_oauth":["cost"]}],"tags":["user_pay_fields"],"operationId":"postV2UserPayFieldsUserUserId","parameters":[{"in":"path","name":"user_id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2UserPayFieldsUserUserId"},"examples":{"Create / Update Pay Fields":{"value":{"pay_fields":[{"id":654321,"regular_hours":"Pay Increase Jan 2022","from_date":"2020-1-1","to_date":"2021-1-1","hourly_rate":0.0,"award_tags":"Casual,Level 1","yearly_salary":60000,"contracted_weekly_hours":38,"award_template_organisation_id":12345}]}}}}}},"responses":{"201":{"description":"Create \u0026 Update Multiple Pay Fields For A User","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserPayField"}}}}},"400":{"description":"Missing user ID, or invalid award template organisation ID"},"401":{"description":"You do not have access to this user's pay information"},"404":{"description":"Invalid user ID"}}}},"/v2/user_pay_fields/user/{user_id}/verify":{"get":{"summary":"Verify Payfields By User","description":"This endpoint conducts a check on a specific user's pay field records. The check will ensure correct sequence of dates, and return any errors that might be evident.\n\n\u003e [!WARNING]\n\u003e This method requires the `cost` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["cost"]}],"tags":["user_pay_fields"],"operationId":"getV2UserPayFieldsUserUserIdVerify","parameters":[{"in":"path","name":"user_id","description":"The id of the user","required":true,"schema":{"type":"integer","format":"int32","example":12345}}],"responses":{"200":{"description":"Verify Payfields By User","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserPayFieldVerification"}}}}}}}},"/v2/user_pay_fields/{id}":{"get":{"summary":"Get Payfields By Payfield ID","description":"Retrieves one pay field object by it's unique `id`.\n\n\u003e [!WARNING]\n\u003e This method requires the `cost` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["cost"]}],"tags":["user_pay_fields"],"operationId":"getV2UserPayFieldsId","parameters":[{"in":"path","name":"id","description":"The id of the payfield","required":true,"schema":{"type":"integer","format":"int32","example":12345}}],"responses":{"200":{"description":"Get Payfields By Payfield ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPayField"}}}}}},"put":{"summary":"Update Payfield","description":"\u003e [!WARNING]\n\u003e Update a specific param for a single payfield entry. This method requires an `id` to be given, and requires the `cost` scope (see [Scopes](#header-scopes) for more information).\n\n\u003e [!NOTE]\n\u003e You do not have to provide every pay field in the request body. The ones you do provide will form the new value of the updated pay field object.\n\u003e\n\u003e The only limitation to updating behaviour is — you cannot update a user's first pay field object's `from_date`. You can identify which pay field object is the first by it's from date. This should be represented as `start`.\n","security":[{"tanda_oauth":["cost"]}],"tags":["user_pay_fields"],"operationId":"putV2UserPayFieldsId","parameters":[{"in":"path","name":"id","description":"The ID of payfield entry.","required":true,"schema":{"type":"integer","format":"int32","example":12345}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/putV2UserPayFieldsId"},"examples":{"Update Payfield":{"value":{"id":54321,"user_id":654321,"from_date":"1970-1-1","to_date":"2020-1-1","hourly_rate":0.0,"award_tags":"Casual,Level 1","contracted_weekly_hours":38,"yearly_salary":60000,"award_template_organisation_id":12345}}}}}},"responses":{"200":{"description":"Update Payfield","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPayField"}}}},"400":{"description":"Invalid award template organisation ID"},"401":{"description":"You do not have access to this user's pay information"},"404":{"description":"No known pay field with that ID, or invalid user ID"}}},"delete":{"summary":"Delete Payfield By Id","description":"\u003e [!WARNING]\n\u003e Delete a specific payfield entry. This method requires an `id` to be given, and requires the `cost` scope (see [Scopes](#header-scopes) for more information).\n\nYou cannot remove the earliest payfield record; there should ALWAYS be a single payfield record. If this isn't the case, costing and award interpretation will not work as intended.\n","security":[{"tanda_oauth":["cost"]}],"tags":["user_pay_fields"],"operationId":"deleteV2UserPayFieldsId","parameters":[{"in":"path","name":"id","description":"The ID of payfield entry.","required":true,"schema":{"type":"integer","format":"int32","example":12345}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"},"examples":{"Delete Payfield":{"value":{"id":54321}}}}}},"responses":{"204":{"description":"Delete Payfield By Id"}}}},"/v2/recommended_hours":{"get":{"summary":"Get Recommended Hours","description":"Get the recommended hours of work for a department, for a given date range.\nYou need to provide all the listed paramters below (`department_id`, `from_date`, and `to_date`).\n\n\u003e [!NOTE]\n\u003e The endpoint recommends hours by date and dependent on your cognitive configurations for the department you are requesting.\n\u003e In cases where your business hours end after midnight, you can use the `from_time` and `to_time` parameters to specific a time range alongside the dates.\n\u003e The `from_time` will be used in conjunction with the `from_date`, `to_time` with the `to_date`.\n\n\u003e [!WARNING]\n\u003e This method requires the `roster` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["roster"]}],"tags":["recommended_hours"],"operationId":"getV2RecommendedHours","parameters":[{"in":"query","name":"department_id","description":"The ID of the department.","required":true,"schema":{"type":"integer","format":"int32","example":12345}},{"in":"query","name":"from_date","description":"The starting date of the range.","required":true,"schema":{"type":"string","format":"date","example":"2016-03-02"}},{"in":"query","name":"to_date","description":"The date the range will go to.","required":true,"schema":{"type":"string","format":"date","example":"2016-03-02"}},{"in":"query","name":"full_increments","description":"This will show recommended hours by 15 minute increments.","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"in_minutes","description":"This will show recommended hours as minute values.","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"from_time","description":"The starting time of the range.","required":false,"schema":{"type":"string","example":"09:00"}},{"in":"query","name":"to_time","description":"The time the range will go to.","required":false,"schema":{"type":"string","example":"17:00"}}],"responses":{"200":{"description":"Get Recommended Hours","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecommendedHours"}}}}}}},"/v2/user_files":{"post":{"summary":"Upload User File","description":"Upload a file to be attached to a user's profile.\n\n\u003e [!WARNING]\n\u003e This method requires the `user` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["user"]}],"tags":["user_files"],"operationId":"postV2UserFiles","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postV2UserFiles"}}}},"responses":{"200":{"description":"Upload User File","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserFile"}}}}}}},"/v2/training_templates":{"get":{"summary":"Get Training Templates","description":"\u003e [!WARNING]\n\u003e This method requires the `training` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["training"]}],"tags":["training_templates"],"operationId":"getV2TrainingTemplates","parameters":[{"in":"query","name":"active","description":"If given, only courses with this active state are returned.","required":false,"schema":{"type":"boolean","example":true}},{"in":"query","name":"template_type","description":"If given, only courses of this type are returned.","required":false,"schema":{"type":"string","enum":["native","scorm"],"example":"native"}},{"in":"query","name":"updated_after","description":"Time filter to find recently created or modified courses.","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}},{"in":"query","name":"page","required":false,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"page_size","required":false,"schema":{"type":"integer","format":"int32","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Get Training Templates","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TrainingTemplate"}}}}}}}},"/v2/training_templates/{id}":{"get":{"summary":"Get Training Template","description":"\u003e [!WARNING]\n\u003e This method requires the `training` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["training"]}],"tags":["training_templates"],"operationId":"getV2TrainingTemplatesId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Training Template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingTemplate"}}}}}}},"/v2/trainings":{"get":{"summary":"Get Trainings","description":"\u003e [!WARNING]\n\u003e This method requires the `training` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["training"]}],"tags":["trainings"],"operationId":"getV2Trainings","parameters":[{"in":"query","name":"user_id","description":"Only this staff member's trainings.","required":false,"schema":{"type":"integer","format":"int32","example":12345}},{"in":"query","name":"training_template_id","description":"Only trainings of this course.","required":false,"schema":{"type":"integer","format":"int32","example":12345}},{"in":"query","name":"status","description":"Only trainings at this stage.","required":false,"schema":{"type":"string","enum":["created","assigned","in_progress","completed","expired"],"example":"completed"}},{"in":"query","name":"result_status","description":"Only trainings with this result.","required":false,"schema":{"type":"string","enum":["passed","failed","na"],"example":"passed"}},{"in":"query","name":"assigned_after","description":"Only trainings assigned on or after this date.","required":false,"schema":{"type":"string","format":"date","example":"2016-03-15"}},{"in":"query","name":"assigned_before","description":"Only trainings assigned on or before this date.","required":false,"schema":{"type":"string","format":"date","example":"2016-03-17"}},{"in":"query","name":"finished_after","description":"Only trainings finished on or after this date.","required":false,"schema":{"type":"string","format":"date","example":"2016-03-15"}},{"in":"query","name":"finished_before","description":"Only trainings finished on or before this date.","required":false,"schema":{"type":"string","format":"date","example":"2016-03-17"}},{"in":"query","name":"expires_after","description":"Only trainings expiring on or after this date.","required":false,"schema":{"type":"string","format":"date","example":"2016-03-15"}},{"in":"query","name":"expires_before","description":"Only trainings expiring on or before this date.","required":false,"schema":{"type":"string","format":"date","example":"2016-03-17"}},{"in":"query","name":"updated_after","description":"Time filter to find recently created or modified trainings.","required":false,"schema":{"type":"integer","format":"int32","example":1456988518}},{"in":"query","name":"page","description":"Which page of trainings to read.","required":false,"schema":{"type":"integer","format":"int32","default":1}},{"in":"query","name":"page_size","description":"How many trainings to read per page.","required":false,"schema":{"type":"integer","format":"int32","default":1000,"minimum":1,"maximum":1000}}],"responses":{"200":{"description":"Get Trainings","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Training"}}}}}}}},"/v2/trainings/{id}":{"get":{"summary":"Get Training","description":"\u003e [!WARNING]\n\u003e This method requires the `training` scope (see [Scopes](#header-scopes) for more information).\n","security":[{"tanda_oauth":["training"]}],"tags":["trainings"],"operationId":"getV2TrainingsId","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get Training","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Training"}}}}}}}},"components":{"schemas":{"PayrollAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the payroll account."},"name":{"type":"string","example":"Wages Expense","description":"The name of the payroll account."},"code":{"type":"string","example":"6000","description":"The account code."},"payroll_super_expense_account_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the linked superannuation expense account, or null if none is set."}},"required":["id","name","code","payroll_super_expense_account_id"],"description":"PayrollAccount model"},"PayrollCompanyFile":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the company file."},"legal_name":{"type":"string","example":"ACME Organisation Pty Ltd","description":"The legal registered name of the entity, or null if it has not been set."},"trading_name":{"type":"string","example":"ACME Org","description":"The trading name of the entity, or null if it has not been set."},"applies_to":{"type":"string","enum":["noone","everyone","reporting_location","pay_group"],"example":"reporting_location","description":"Which employees the company file covers."},"applies_to_location_ids":{"type":"array","items":{"type":"integer","format":"int32"},"example":[12345,12346],"description":"The location ids the company file covers when `applies_to` is `reporting_location`, otherwise an empty array."}},"required":["id","legal_name","trading_name","applies_to","applies_to_location_ids"],"description":"PayrollCompanyFile model"},"PayrollDeductionTemplate":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the deduction template."},"user_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the employee the deduction template applies to."},"payroll_deduction_type_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the deduction type being deducted."},"fixed_amount":{"type":"number","format":"float","example":100.5,"description":"The fixed amount deducted each pay, or null (mutually exclusive with `percent_of_income`)."},"percent_of_income":{"type":"number","format":"float","example":5.0,"description":"The percentage of income deducted each pay, or null (mutually exclusive with `fixed_amount`)."},"include_in_aba":{"type":"boolean","example":true,"description":"Whether the deduction is included in the ABA file."},"aba_reference":{"type":"string","example":"REF123","description":"The reference written against the deduction in the ABA file."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the deduction template was last updated."}},"required":["id","user_id","payroll_deduction_type_id","fixed_amount","percent_of_income","include_in_aba","aba_reference","updated_at"],"description":"PayrollDeductionTemplate model"},"PayrollDeductionType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the deduction type."},"name":{"type":"string","example":"Salary Sacrifice","description":"The name of the deduction type."},"stp_category":{"type":"string","enum":["F","W","G","D","O"],"example":"O","description":"The STP reporting code for the deduction type, or null if it is not reported. `F` is union and professional association, `W` workplace giving, `G` child support garnishee, `D` child support deduction, and `O` salary sacrifice other."},"reduces_tax":{"type":"boolean","example":true,"description":"Whether the deduction reduces taxable income."},"reduces_workcover":{"type":"boolean","example":false,"description":"Whether the deduction reduces the workcover calculation."},"reduces_payroll_tax":{"type":"boolean","example":false,"description":"Whether the deduction reduces the payroll tax calculation."},"payroll_account_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the payroll account the deduction is posted to."},"bank_detail":{"allOf":[{"$ref":"#/components/schemas/PayrollDeductionTypeBankDetail"}],"description":"The bank account the deduction is paid to, or an empty object if none is set."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the deduction type was last updated."}},"required":["id","name","stp_category","reduces_tax","reduces_workcover","reduces_payroll_tax","payroll_account_id","bank_detail","updated_at"],"description":"PayrollDeductionType model"},"PayrollDeductionTypeBankDetail":{"type":"object","properties":{"bsb":{"type":"string","example":"123456","description":"The BSB the deduction is paid to."},"account_name":{"type":"string","example":"Salary Sacrifice Ltd","description":"The name on the bank account the deduction is paid to."},"account_number":{"type":"string","example":"12345678","description":"The number of the bank account the deduction is paid to."}}},"PayrollPayRun":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the pay run."},"company_file_name":{"type":"string","example":"My Company","description":"The name of the payroll company file the pay run belongs to."},"company_file_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the payroll company file the pay run belongs to."},"pay_group_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the pay group the pay run belongs to."},"start_date":{"type":"string","example":"2016-03-15","description":"The first day of the pay period."},"finish_date":{"type":"string","example":"2016-03-17","description":"The last day of the pay period."},"payment_date":{"type":"string","example":"2016-03-02","description":"The date when payment will be made."},"status":{"type":"string","enum":["draft","posting","posting_failed","posted","reverting","reverting_failed","disbursing","disbursed"],"example":"posted","description":"The current status of the pay run."}},"required":["id","company_file_name","company_file_id","pay_group_id","start_date","finish_date","payment_date","status"],"description":"PayrollPayRun model"},"PayrollPayRunJournal":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the pay run."},"company_file_name":{"type":"string","example":"My Company","description":"The name of the payroll company file the pay run belongs to."},"company_file_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the payroll company file the pay run belongs to."},"pay_group_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the pay group the pay run belongs to."},"start_date":{"type":"string","example":"2016-03-15","description":"The first day of the pay period."},"finish_date":{"type":"string","example":"2016-03-17","description":"The last day of the pay period."},"payment_date":{"type":"string","example":"2016-03-02","description":"The date when payment will be made."},"status":{"type":"string","enum":["draft","posting","posting_failed","posted","reverting","reverting_failed","disbursing","disbursed"],"example":"posted","description":"The current status of the pay run."},"debit_lines":{"type":"array","items":{"$ref":"#/components/schemas/PayrollPayRunJournalLine"}},"credit_lines":{"type":"array","items":{"$ref":"#/components/schemas/PayrollPayRunJournalLine"}}},"required":["id","company_file_name","company_file_id","pay_group_id","start_date","finish_date","payment_date","status","debit_lines","credit_lines"],"description":"PayrollPayRunJournal model"},"PayrollPayRunJournalLine":{"type":"object","properties":{"account":{"$ref":"#/components/schemas/PayrollPayRunJournalAccount"},"amount":{"type":"string","example":"2500.00"},"tracking_categories":{"type":"array","items":{"type":"string"},"example":["Sydney",""]},"narration":{"type":"string","example":"Wages for pay period ending 2016-03-17"}},"required":["account","amount","tracking_categories","narration"]},"PayrollPayRunJournalAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the payroll account."},"name":{"type":"string","example":"Wages Expense","description":"The name of the account."},"code":{"type":"string","example":"WAG-01","description":"The account code."}},"required":["id","name","code"]},"PayrollPayslip":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the payslip."},"pay_run_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the pay run this payslip belongs to."},"user_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the employee this payslip is for."},"from_date":{"type":"string","example":"2016-03-15","description":"The start date of the pay period."},"to_date":{"type":"string","example":"2016-03-17","description":"The end date of the pay period."},"payment_date":{"type":"string","example":"2016-03-02","description":"The date when payment will be made."},"gross_pay":{"type":"number","format":"float","example":1500.0,"description":"The total gross pay amount."},"tax":{"type":"number","format":"float","example":300.0,"description":"The total tax amount."},"deductions":{"type":"number","format":"float","example":100.0,"description":"The total deductions amount."},"super":{"type":"number","format":"float","example":142.5,"description":"The total superannuation amount."},"net_pay":{"type":"number","format":"float","example":1100.0,"description":"The net pay amount, after tax and deductions."},"email_sent":{"type":"boolean","example":true,"description":"Whether the payslip has been emailed to the employee."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the payslip was last updated."},"kiwi_saver":{"type":"number","format":"float","example":90.0,"description":"New Zealand organisations only. The total KiwiSaver amount, employee deduction plus employer contribution."},"employee_kiwi_saver_deduction":{"type":"number","format":"float","example":45.0,"description":"New Zealand organisations only. The total KiwiSaver amount deducted from the employee."},"employer_kiwi_saver_contribution":{"type":"number","format":"float","example":45.0,"description":"New Zealand organisations only. The total KiwiSaver amount contributed by the employer."},"user":{"allOf":[{"$ref":"#/components/schemas/PayrollPayslipUser"}],"description":"The employee this payslip belongs to. Only present if the `show_lines=true` parameter is set."},"net_pay_lines":{"type":"array","items":{"$ref":"#/components/schemas/PayrollPayslipLine"},"description":"The individual lines that compose the employee's payment. Amounts are signed - withholdings such as tax and deductions are negative - and sum to `net_pay`, give or take per-line rounding. Only present if the `show_lines=true` parameter is set."},"liability_lines":{"type":"array","items":{"$ref":"#/components/schemas/PayrollPayslipLine"},"description":"Obligations created by this payslip that are not funded from the employee's pay, such as employer super contributions and leave accruals. Salary sacrifice and post-tax employee super appear in `net_pay_lines` instead, since they reduce the employee's payment. Only present if the `show_lines=true` parameter is set."}},"required":["id","pay_run_id","user_id","from_date","to_date","payment_date","gross_pay","tax","deductions","super","net_pay","email_sent","updated_at"],"description":"PayrollPayslip model"},"PayrollPayslipUser":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the employee the payslip belongs to."},"report_department":{"allOf":[{"$ref":"#/components/schemas/PayrollPayslipReference"}],"description":"The employee's reporting team, or null if they do not have one."}},"required":["id","report_department"]},"PayrollPayslipReference":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the referenced record."},"name":{"type":"string","example":"Annual Leave","description":"The name of the referenced record."}},"required":["id","name"]},"PayrollPayslipLine":{"type":"object","properties":{"type":{"type":"string","example":"earnings","description":"The type of payslip line, e.g. `earnings`, `deduction`, `tax`, `super`, `leave`, `leave_accrual`. Varies by region and line type."},"amount":{"type":"number","format":"float","example":500.0,"description":"The signed amount of the line. For `leave_accrual` lines this is the estimated dollar value of the accrued hours; `hours` is the source of truth."},"units":{"type":"number","format":"float","example":7.6,"description":"The quantity the line was paid for, in the earnings rate's units (usually hours). `earnings` lines only."},"quantity":{"type":"number","format":"float","example":15.2,"description":"The quantity of leave taken, in hours, or days or weeks for fixed-rate leave types. `leave` lines only."},"hours":{"type":"number","format":"float","example":5.7,"description":"The hours of leave accrued. `leave_accrual` lines only."},"payment_type":{"type":"string","enum":["standard","cashed_out_leave","unused_leave_on_termination"],"example":"standard","description":"What the payment is for. `earnings` and `leave` lines only."},"tax_type":{"type":"string","example":"payg","description":"The type of tax withheld, such as `payg` or `stsl`. `tax` lines only."},"super_type":{"type":"string","enum":["super_guarantee","employer_contribution","salary_sacrifice","voluntary_super_contribution"],"example":"super_guarantee","description":"Which kind of contribution the line is. `super` lines only."},"earnings_rate":{"allOf":[{"$ref":"#/components/schemas/PayrollPayslipReference"}],"description":"The earnings rate the line was paid at. `earnings` and `back_payment` lines only."},"leave_type":{"allOf":[{"$ref":"#/components/schemas/PayrollPayslipReference"}],"description":"The leave type paid or accrued. `leave` and `leave_accrual` lines only."},"deduction_type":{"allOf":[{"$ref":"#/components/schemas/PayrollPayslipReference"}],"description":"The deduction type the line belongs to. `deduction` lines only."},"lump_sum_type":{"allOf":[{"$ref":"#/components/schemas/PayrollPayslipReference"}],"description":"The lump sum type the line belongs to. `lump_sum` lines only."},"termination_type":{"allOf":[{"$ref":"#/components/schemas/PayrollPayslipReference"}],"description":"The termination type the line belongs to. `termination_payment` lines only."},"department":{"allOf":[{"$ref":"#/components/schemas/PayrollPayslipReference"}],"description":"The team this line is attributed to. Omitted when the line has no team."}},"required":["type","amount"]},"PayrollTrackingCategory":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the tracking category."},"payroll_integration_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the company file the tracking category belongs to."},"name":{"type":"string","example":"Cost Centre","description":"The name of the tracking category."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the tracking category was last updated."}},"required":["id","payroll_integration_id","name","updated_at"],"description":"PayrollTrackingCategory model"},"PayrollDepartmentTrackingCategory":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the team's tracking category."},"department_id":{"type":"integer","format":"int32","example":12345,"description":"The id of this tracking category's team."},"payroll_tracking_categories_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the payroll tracking category."},"value":{"type":"string","example":"WGB-32","description":"The value of the tracking category for this team."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the department tracking category was last updated."}},"required":["id","department_id","payroll_tracking_categories_id","value","updated_at"],"description":"PayrollDepartmentTrackingCategory model"},"ATSJob":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the job."},"title":{"type":"string","example":"Senior Bartender","description":"The title of the job listing."},"description":{"type":"string","example":"We are looking for an experienced bartender to join our team.","description":"The job description, with all rich text formatting stripped."},"employment_basis":{"type":"string","enum":["full_time","part_time","casual"],"example":"full_time","description":"The kind of employment the job is offered on."},"visibility":{"type":"string","enum":["public","internal"],"example":"public","description":"Who the job listing is advertised to."},"accepting_applicants":{"type":"boolean","example":true,"description":"Whether the job is currently accepting applications."},"location":{"allOf":[{"$ref":"#/components/schemas/ATSJobLocation"}],"description":"The location the job is based at."},"position":{"allOf":[{"$ref":"#/components/schemas/ATSJobPosition"}],"description":"The position the job hires for, or null if the job is not tied to a position."},"minimum_pay":{"type":"number","format":"float","example":28.5,"description":"The bottom of the advertised pay range, in the organisation's currency."},"maximum_pay":{"type":"number","format":"float","example":34.75,"description":"The top of the advertised pay range, in the organisation's currency."},"pay_type":{"type":"string","enum":["hour","day","week","month","year"],"example":"hour","description":"The period the pay range is quoted over."},"pay_info":{"type":"string","example":"Plus penalty rates on weekends","description":"Free text notes about the pay on offer."},"expires_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the job listing stops being advertised."},"created_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the job was created."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the job was last updated."}},"required":["id","title","description","employment_basis","visibility","accepting_applicants","location","position","minimum_pay","maximum_pay","pay_type","pay_info","expires_at","created_at","updated_at"],"description":"ATSJob model"},"ATSJobLocation":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the location."},"name":{"type":"string","example":"Brisbane CBD","description":"The name of the location."},"address":{"type":"string","example":"2 George St, Brisbane QLD 4000","description":"The location's street address."},"city":{"type":"string","example":"Brisbane","description":"The city the location is in, or null when its address has no city recorded."}},"required":["id","name","address","city"]},"ATSJobPosition":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the position."},"name":{"type":"string","example":"Bartender","description":"The name of the position."}},"required":["id","name"]},"ATSJobApplication":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the application."},"current_stage_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the stage the application is currently in, resolved against the organisation's default job setting where one exists. Stages that only exist on the job return the job's own stage id."},"job_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the job the candidate applied for."},"candidate":{"allOf":[{"$ref":"#/components/schemas/ATSJobApplicationCandidate"}],"description":"Contact details for the candidate who applied."},"created_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the application was submitted."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the application was last updated."}},"required":["id","current_stage_id","job_id","candidate","created_at","updated_at"],"description":"ATSJobApplication model"},"ATSJobApplicationCandidate":{"type":"object","properties":{"name":{"type":"string","example":"Lenny Leonard","description":"The candidate's full name."},"email":{"type":"string","example":"lenny.leonard@springfieldpowerplant.com","description":"The candidate's email address."},"phone":{"type":"string","example":"0400 000 000","description":"The candidate's phone number."},"resume_url":{"type":"string","example":"https://example.com/resume.pdf","description":"Short-lived link to download the candidate's resume. Only returned when fetching a single application, not in the applications list."}},"required":["name","email","phone"]},"postV2AtsApplications":{"type":"object","properties":{"job_id":{"type":"integer","format":"int32","description":"Job ID to apply for"},"stage_id":{"type":"integer","format":"int32","description":"Initial stage ID for the application (defaults to 'received')"},"candidate_message":{"type":"string","description":"Cover letter or message from candidate"},"legal_first_name":{"type":"string","description":"Candidate's legal first name"},"legal_last_name":{"type":"string","description":"Candidate's legal last name"},"email":{"type":"string","description":"Candidate's email address"},"legal_middle_names":{"type":"string","description":"Candidate's legal middle names"},"phone":{"type":"string","description":"Candidate's phone number"},"current_position":{"type":"string","description":"Candidate's current job position"},"address":{"type":"string","description":"Candidate's address"},"date_of_birth":{"type":"string","format":"date","description":"Candidate's date of birth"},"right_to_work":{"type":"string","description":"Candidate's right to work status","enum":["citizen","visa"]},"location_ids":{"type":"array","description":"Array of location IDs the candidate is interested in","items":{"type":"integer","format":"int32"}},"source":{"type":"string","description":"Source of the application (defaults to 'API-V2')"},"skip_new_candidate_notification":{"type":"boolean","description":"Skip sending candidate and job application notifications (defaults to false)"}},"required":["job_id","legal_first_name","legal_last_name","email"],"description":"Create Job Application"},"putV2AtsApplicationsId":{"type":"object","properties":{"stage_id":{"type":"integer","format":"int32","description":"The ID of the new stage","example":12345}},"required":["stage_id"],"description":"Update Application Stage"},"ATSJobApplicationStage":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the stage."},"name":{"type":"string","example":"Technical Interview","description":"The name of the stage."},"is_active":{"type":"boolean","example":true,"description":"Whether applications can currently be moved into this stage."},"created_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the stage was created."},"job_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the job this stage belongs to, or null when the stage belongs to the organisation's default job setting."}},"required":["id","name","is_active","created_at","job_id"],"description":"ATSJobApplicationStage model"},"postV2AtsStages":{"type":"object","properties":{"name":{"type":"string","description":"Stage name"},"color":{"type":"string","description":"Hex color"},"sort_order":{"type":"integer","format":"int32","description":"Position within the setting"},"email_enabled":{"type":"boolean"},"email_subject":{"type":"string"},"sms_enabled":{"type":"boolean"},"sms_content":{"type":"string","description":"Text message sent to candidates moved into this stage"},"allow_interview_scheduling":{"type":"boolean"},"job_setting_id":{"type":"integer","format":"int32","description":"Scope to a specific job setting"},"job_id":{"type":"integer","format":"int32","description":"Scope to a job's setting"}},"required":["name"],"description":"Create Stage"},"putV2AtsStagesId":{"type":"object","properties":{"name":{"type":"string","description":"Stage name"},"color":{"type":"string","description":"Hex color"},"email_enabled":{"type":"boolean"},"email_subject":{"type":"string"},"sms_enabled":{"type":"boolean"},"sms_content":{"type":"string","description":"Text message sent to candidates moved into this stage"},"allow_interview_scheduling":{"type":"boolean"},"is_active":{"type":"boolean","description":"Whether stage is active"}},"description":"Update Stage"},"ATSJobApplicationNote":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the note."},"content":{"type":"string","example":"Candidate showed strong technical skills during the phone screen.","description":"The note's contents, with all rich text formatting stripped."},"date":{"type":"string","example":"2016-03-02","description":"The date the note applies to."},"author_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the user who wrote the note, or null if the note has no author."},"has_attachments":{"type":"boolean","example":false,"description":"Whether the note has files attached to it."},"created_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the note was created."}},"required":["id","content","date","author_id","has_attachments","created_at"],"description":"ATSJobApplicationNote model"},"postV2AtsApplicationsApplicationIdNotes":{"type":"object","properties":{"content":{"type":"string","description":"Note content"},"date":{"type":"string","format":"date","description":"Note date (defaults to today)"},"file_ids":{"type":"array","description":"Array of file attachment IDs","items":{"type":"string"}}},"required":["content"],"description":"Create Note"},"postV2AtsCandidates":{"type":"object","properties":{"legal_first_name":{"type":"string","description":"Candidate's legal first name"},"legal_last_name":{"type":"string","description":"Candidate's legal last name"},"email":{"type":"string","description":"Candidate's email address"},"legal_middle_names":{"type":"string","description":"Candidate's legal middle names"},"phone":{"type":"string","description":"Candidate's phone number"},"current_position":{"type":"string","description":"Candidate's current job position"},"address":{"type":"string","description":"Candidate's address"},"date_of_birth":{"type":"string","format":"date","description":"Candidate's date of birth"},"right_to_work":{"type":"string","description":"Candidate's right to work status","enum":["citizen","visa"]},"location_ids":{"type":"array","description":"Array of location IDs the candidate is interested in","items":{"type":"integer","format":"int32"}},"position_ids":{"type":"array","description":"Array of position IDs the candidate is interested in","items":{"type":"integer","format":"int32"}},"resume_file_id":{"type":"string","description":"Temporary file ID of the candidate's resume, from POST /api/v2/temporary_files"}},"required":["legal_first_name","legal_last_name","email"],"description":"Create Candidate"},"ATSCandidate":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the candidate."},"name":{"type":"string","example":"Lenny Leonard","description":"The candidate's full name."},"email":{"type":"string","example":"lenny.leonard@springfieldpowerplant.com","description":"The candidate's email address."},"phone":{"type":"string","example":"0400 000 000","description":"The candidate's phone number."},"legal_first_name":{"type":"string","example":"Lenny","description":"The candidate's legal first name."},"legal_last_name":{"type":"string","example":"Leonard","description":"The candidate's legal last name."},"legal_middle_names":{"type":"string","example":"James","description":"The candidate's legal middle names."},"current_position":{"type":"string","example":"Senior Software Developer","description":"The role the candidate currently holds."},"address":{"type":"string","example":"123 Collins St, Melbourne VIC","description":"The candidate's address."},"date_of_birth":{"type":"string","example":"1990-05-15","description":"The candidate's date of birth."},"right_to_work":{"type":"string","enum":["citizen","visa"],"example":"citizen","description":"How the candidate is entitled to work in the country."},"resume_url":{"type":"string","example":"https://example.com/resume.pdf","description":"Short-lived link to download the candidate's resume."},"age":{"type":"integer","format":"int32","example":34,"description":"The candidate's age in years, or 0 when no date of birth is recorded."},"created_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the candidate was created."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the candidate was last updated."}},"required":["id","name","email","phone","legal_first_name","legal_last_name","legal_middle_names","current_position","address","date_of_birth","right_to_work","resume_url","age","created_at","updated_at"],"description":"ATSCandidate model"},"putV2AtsCandidatesId":{"type":"object","properties":{"legal_first_name":{"type":"string","description":"Candidate's legal first name"},"legal_last_name":{"type":"string","description":"Candidate's legal last name"},"legal_middle_names":{"type":"string","description":"Candidate's legal middle names"},"phone":{"type":"string","description":"Candidate's phone number"},"current_position":{"type":"string","description":"Candidate's current job position"},"address":{"type":"string","description":"Candidate's address"},"date_of_birth":{"type":"string","format":"date","description":"Candidate's date of birth"},"right_to_work":{"type":"string","description":"Candidate's right to work status","enum":["citizen","visa"]},"resume_file_id":{"type":"string","description":"Temporary file ID of the candidate's resume, from POST /api/v2/temporary_files"}},"description":"Update Candidate"},"Roster":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the roster."},"schedules":{"type":"array","items":{"$ref":"#/components/schemas/DailySchedule"},"description":"The roster broken down by days."},"start":{"type":"string","example":"2016-02-29","description":"The date of the first day of the roster."},"finish":{"type":"string","example":"2016-03-07","description":"The date of the last day of the roster."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the roster was last updated."},"cost":{"type":"number","format":"float","example":1200.2,"description":"The total cost of the roster, if `show_costs=true` parameter is set."},"total_oncosts_breakdown":{"type":"array","items":{"$ref":"#/components/schemas/OncostBreakdownEntry"},"description":"The total on-cost breakdown, if `show_costs=true` and on-costs are requested."},"cost_with_oncosts":{"type":"number","format":"float","description":"The total cost including on-costs, if `show_costs=true` and on-costs are requested."},"meta":{"allOf":[{"$ref":"#/components/schemas/PaginationMeta"}],"description":"The pagination metadata, if `page` and `page_size` parameters are set."}},"required":["id","schedules","start","finish","updated_at"],"description":"Roster model"},"DailySchedule":{"type":"object","properties":{"date":{"type":"string","example":"2016-03-02","description":"The date of the schedules."},"schedules":{"type":"array","items":{"$ref":"#/components/schemas/Schedule"},"description":"The schedules on this day."}},"required":["date","schedules"]},"Schedule":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the schedule."},"roster_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the roster."},"user_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the user who is assigned the schedule."},"start":{"type":"integer","format":"int32","example":1456902000,"description":"The start of the schedule."},"finish":{"type":"integer","format":"int32","example":1456916400,"description":"The end of the schedule."},"breaks":{"type":"array","items":{"$ref":"#/components/schemas/ScheduleBreak"},"description":"The breaks taken in the schedule."},"automatic_break_length":{"type":"integer","format":"int32","example":30,"description":"Length of automatic break in minutes."},"department_id":{"type":"integer","format":"int32","example":12345,"description":"The department (team) id for the schedule."},"shift_detail_id":{"type":"integer","format":"int32","example":12345,"description":"The shift detail id for the schedule."},"last_published_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the schedule was last published to its given employee."},"acceptance_status":{"type":"string","example":"not_accepted","description":"The current status of the schedule."},"last_acknowledged_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the schedule was last accepted by the employee, or null."},"time_zone":{"type":"string","example":"Australia/Brisbane","description":"The time zone of the schedule."},"needs_acceptance":{"type":"boolean","example":true,"description":"Has the schedule been accepted by the employee?"},"utc_offset":{"type":"integer","format":"int32","example":36000,"description":"The schedule time zone's offset from UTC, in seconds."},"creation_method":{"type":"string","example":"manual","description":"How the schedule was created."},"creation_platform":{"type":"string","example":"web","description":"Where the schedule was created."},"record_id":{"type":"integer","format":"int32","example":12345,"description":"The record ID, for use with Platform endpoints."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the schedule was last updated."},"platform":{"allOf":[{"$ref":"#/components/schemas/PlatformFieldValue"}],"description":"Platform field values, if `show_platform=true` parameter is set."},"department_name":{"type":"string","example":"Front of House","description":"The name of the team, if `include_names=true` parameter is set."},"location_name":{"type":"string","example":"Brisbane CBD","description":"The name of the location, if `include_names=true` parameter is set."},"shift_detail_name":{"type":"string","example":"Bar","description":"The name of the shift detail, if `include_names=true` parameter is set."},"user_name":{"type":"string","example":"Jane Smith","description":"The name of the assigned user, if `include_names=true` parameter is set."},"cost":{"type":"number","format":"float","example":20.19,"description":"The cost of the schedule, if `show_costs=true` parameter is set."},"oncosts_breakdown":{"type":"array","items":{"$ref":"#/components/schemas/OncostBreakdownEntry"},"description":"The on-cost breakdown, if `show_costs=true` and on-costs are requested."},"cost_with_oncosts":{"type":"number","format":"float","description":"The cost including on-costs, if `show_costs=true` and on-costs are requested."},"last_costed_at":{"type":"integer","format":"int32","description":"When the schedule was last costed, if `show_costs=true` parameter is set."},"award_interpretation":{"type":"array","items":{"$ref":"#/components/schemas/AwardInterpretation"},"description":"Award interpretation output, if `show_award_interpretation=true` parameter is set."},"activity_code_id":{"type":"integer","format":"int32","example":12345,"description":"The schedule's own (fallback) activity code id, applied to worked time not covered by any activity, or null, if `show_activities=true` parameter is set."},"activity_code":{"type":"string","example":"CLEAN","description":"The schedule's own (fallback) activity code, or null, if `show_activities=true` parameter is set."},"activity_code_name":{"type":"string","example":"Cleaning","description":"The schedule's own (fallback) activity code name, if `show_activities=true` and `include_names=true` are set."},"activities":{"type":"array","items":{"$ref":"#/components/schemas/ScheduleActivity"},"description":"The activities within the schedule, if `show_activities=true` parameter is set."}},"required":["id","roster_id","user_id","start","finish","breaks","automatic_break_length","department_id","shift_detail_id","last_published_at","acceptance_status","last_acknowledged_at","time_zone","needs_acceptance","utc_offset","creation_method","creation_platform","record_id","updated_at"],"description":"Schedule model"},"ScheduleBreak":{"type":"object","properties":{"start":{"type":"integer","format":"int32","example":1456902000,"description":"The start of the break."},"finish":{"type":"integer","format":"int32","example":1456916400,"description":"The end of the break."},"paid":{"type":"boolean","example":false,"description":"Whether the break is paid."},"paid_meal_break":{"type":"boolean","example":false,"description":"Whether the break is a paid meal break."},"length":{"type":"integer","format":"int32","example":30,"description":"The length of the break in minutes."}},"required":["start","finish","paid","paid_meal_break","length"]},"PlatformFieldValue":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the platform record."},"model_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the platform model the record belongs to."},"uuid":{"type":"string","example":"73fe3430-4f5d-3a0a-84a7-cffbeb5efeb2","description":"The record's platform uuid."},"attributes":{"type":"array","items":{"$ref":"#/components/schemas/PlatformFieldValueAttribute"},"description":"The platform fields and associations you have permission to read."},"native_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the Tanda record this platform record describes, or null."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the platform record was last updated."}},"required":["id","model_id","uuid","attributes","native_id","updated_at"]},"PlatformFieldValueAttribute":{"type":"object","properties":{"field_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the platform field, present when this entry describes a field."},"association_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the platform association, present when this entry describes an association."},"key":{"type":"string","example":"employee_number","description":"The field's key, as used when writing to the platform API."},"name":{"type":"string","example":"Employee Number","description":"The field's display name."},"value":{"type":"string","description":"The value held for this field. Its type follows `type` below, so it is a boolean for `boolean` fields and a number for `float` and `currency` fields rather than a string."},"type":{"type":"string","example":"text","description":"One of `text`, `long_text`, `date`, `boolean`, `float`, `currency`, `linked_field`."}},"required":["key","name","value","type"]},"OncostBreakdownEntry":{"type":"object","properties":{"name":{"type":"string","example":"Superannuation","description":"The name of the on-cost configuration this amount came from."},"amount":{"type":"number","format":"float","example":17.55,"description":"The amount this on-cost contributes."}},"required":["name","amount"]},"AwardInterpretation":{"type":"object","properties":{"units":{"type":"number","format":"float","example":6.45,"description":"Number of units (hours for award rules, or units for allowances)."},"date":{"type":"string","example":"2016-02-29","description":"Date on which award interpretation output applies."},"name":{"type":"string","example":"Base Hourly","description":"Name of the award rule applying."},"export_name":{"type":"string","example":"ORD 1x","description":"Export name for external system matching."},"secondary_export_name":{"type":"string","example":"LOAD","description":"Optional secondary export name."},"pay_class":{"type":"string","example":"P1","description":"Optional salary / pay class name."},"ordinary_hours":{"type":"boolean","example":true,"description":"If the time is ordinary (false means it's overtime)."},"cost":{"type":"number","format":"float","example":16.125,"description":"Cost of award interpretation structure, if `show_costs=true` parameter is set."},"base_rate_name":{"type":"string","example":"09.232403.06 Base Hourly Level 1 20+ Years"},"base_rate_export_name":{"type":"string","example":"Base Hourly Level 1 20+ Years"},"base_rate":{"type":"number","format":"float","example":23.23},"from":{"type":"integer","format":"int32","example":1456902000,"description":"Time that this costing applies from."},"to":{"type":"integer","format":"int32","example":1456916400,"description":"Time that this costing applies until."}},"required":["units","date","name","export_name","secondary_export_name","pay_class","ordinary_hours"]},"ScheduleActivity":{"type":"object","properties":{"start":{"type":"integer","format":"int32","example":1456902000,"description":"The start of the activity. `null` for the fallback entry covering uncovered worked time."},"finish":{"type":"integer","format":"int32","example":1456916400,"description":"The end of the activity. `null` for the fallback entry covering uncovered worked time."},"activity_code_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the assigned activity code, or null if none is assigned."},"activity_code":{"type":"string","example":"CLEAN","description":"The assigned activity code's code, or null if none is assigned. Always included."},"hours":{"type":"number","format":"float","example":2.0,"description":"The worked hours attributed to this activity, prorated from the schedule's award interpretation. Included when `show_activities=true`."},"cost":{"type":"number","format":"float","example":42.12,"description":"The cost attributed to this activity, prorated from the schedule's award interpretation. Included only when `show_costs=true` (requires the `cost` scope and permission to see the user's wages)."},"activity_code_name":{"type":"string","example":"Cleaning","description":"The assigned activity code's name, included only if `include_names=true`."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the activity was last updated (absent for the fallback entry)."}},"required":["start","finish","activity_code_id","activity_code"]},"PaginationMeta":{"type":"object","properties":{"page":{"type":"integer","format":"int32","example":1,"description":"The page number of the days returned."},"page_size":{"type":"integer","format":"int32","example":100,"description":"The number of days returned per page."},"total":{"type":"integer","format":"int32","example":53360,"description":"The total number of days matching the query."},"total_pages":{"type":"integer","format":"int32","example":534,"description":"The total number of pages of days matching the query."}},"required":["page","page_size","total","total_pages"]},"SalesTargets":{"type":"object","properties":{"target":{"type":"number","format":"float","example":1234.56,"description":"Value of the sales target. null if there is no roster for the given date."},"created_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the user-entered sales target was first created, if there is one. Otherwise null."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the user-entered sales target was last updated, if there is one. Otherwise null."},"user_entered":{"type":"boolean","example":true,"description":"Whether or not the default projection was overridden with a user-entered value."}},"required":["target","created_at","updated_at","user_entered"],"description":"SalesTargets model"},"RosterSubscribeURL":{"type":"object","properties":{"url":{"type":"string","example":"https://my.tanda.co/rosters/subscription/abc123.ics","description":"The calendar feed URL for this user's published shifts."}},"required":["url"],"description":"RosterSubscribeURL model"},"postV2Schedules":{"type":"object","properties":{"user_id":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"finish":{"type":"integer","format":"int32"},"breaks":{"type":"array","items":{"type":"object","properties":{"start":{"type":"integer","format":"int32"},"finish":{"type":"integer","format":"int32"},"paid":{"type":"boolean"},"paid_meal_break":{"type":"boolean"}},"required":["start","finish"]}},"automatic_break_length":{"type":"integer","format":"int32"},"department_id":{"type":"integer","format":"int32"},"shift_detail_id":{"type":"integer","format":"int32"},"activity_code_id":{"type":"integer","format":"int32"},"last_published_at":{"type":"integer","format":"int32"},"activities":{"type":"array","items":{"type":"object","properties":{"start":{"type":"integer","format":"int32"},"finish":{"type":"integer","format":"int32"},"activity_code_id":{"type":"integer","format":"int32"}}}}},"required":["start"],"description":"Create Schedule"},"postV2SchedulesPublish":{"type":"object","properties":{"schedule_ids":{"type":"array","example":[12345,12346],"items":{"type":"integer","format":"int32"}}},"required":["schedule_ids"],"description":"Publish Multiple Schedules"},"ScheduleVersion":{"type":"object","properties":{"version_id":{"type":"integer","format":"int32","example":12345},"time":{"type":"integer","format":"int32","example":1456988518},"event":{"type":"string","example":"update","description":"What happened to the record. Usually `create`, `update` or `destroy`, though some resources return a longer phrase such as `update shift break`."},"author":{"allOf":[{"$ref":"#/components/schemas/VersionAuthor"}],"description":"The author of the change."},"item_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the record this version belongs to."},"item_type":{"type":"string","description":"The type of record this version belongs to, such as `Shift` or `Schedule`."},"changes":{"type":"array","items":{"$ref":"#/components/schemas/ScheduleVersionChange"},"description":"The fields that changed in this version."}},"required":["version_id","time","event","author","item_id","item_type","changes"],"description":"ScheduleVersion model"},"VersionAuthor":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345},"name":{"type":"string","example":"API v2"}},"required":["id","name"]},"ScheduleVersionChange":{"type":"object","properties":{"field":{"type":"string","example":"start"},"previous":{"type":"integer","format":"int32","example":1456988518,"description":"The value before the change. The type mirrors the field being changed, so this is a Unix timestamp for `start` and `finish`, a string for fields such as `acceptance_status`, and a boolean for `needs_acceptance`."},"updated":{"type":"integer","format":"int32","example":1456988518,"description":"The value after the change, typed the same way as `previous` above."}},"required":["field","previous","updated"]},"putV2SchedulesId":{"type":"object","properties":{"user_id":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"finish":{"type":"integer","format":"int32"},"breaks":{"type":"array","items":{"type":"object","properties":{"start":{"type":"integer","format":"int32"},"finish":{"type":"integer","format":"int32"}},"required":["start","finish"]}},"automatic_break_length":{"type":"integer","format":"int32"},"department_id":{"type":"integer","format":"int32"},"shift_detail_id":{"type":"integer","format":"int32"},"activity_code_id":{"type":"integer","format":"int32"},"last_published_at":{"type":"integer","format":"int32"},"include_names":{"type":"boolean"},"activities":{"type":"array","items":{"type":"object","properties":{"start":{"type":"integer","format":"int32"},"finish":{"type":"integer","format":"int32"},"activity_code_id":{"type":"integer","format":"int32"}}}}},"description":"Update Schedule"},"putV2ScheduleAcceptance":{"type":"object","properties":{"user_id":{"type":"integer","format":"int32"},"accepted_schedule_ids":{"type":"array","items":{"type":"string"}},"declined_schedule_ids":{"type":"array","items":{"type":"string"}},"mark_unavailable":{"type":"boolean","default":false}},"required":["user_id"],"description":"Update Schedule Acceptance"},"Location":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the location."},"name":{"type":"string","example":"Springfield","description":"The name of the location."},"short_name":{"type":"string","example":"S","description":"The abbreviated form of the location's name."},"latitude":{"type":"number","format":"float","example":-27.459687,"description":"The latitude of the location."},"longitude":{"type":"number","format":"float","example":153.032108,"description":"The longitude of the location."},"organisation_id":{"type":"integer","format":"int32","example":12345,"description":"The id of this location's organisation."},"address":{"type":"string","example":"Springfield Powerplant Reactors","description":"The address of the location."},"time_zone":{"type":"string","example":"Australia/Brisbane","description":"The location's time zone."},"utc_offset":{"type":"integer","format":"int32","example":36000,"description":"The UTC offset of the location's time zone."},"business_day_cutoff":{"type":"integer","format":"int32","example":5,"description":"The hour of the day before which data is treated as part of the previous business day. For example, 5 means data from before 5am belongs to the previous business day."},"public_holiday_regions":{"type":"array","items":{"type":"string"},"example":["au","au_qld"],"description":"Public holiday regions (see the Locations section for the list of options)."},"specific_holiday_dates":{"type":"array","items":{"$ref":"#/components/schemas/SpecificHolidayDate"},"description":"The dates and times of specific holidays for the location."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the location was last updated, as a Unix timestamp."},"record_id":{"type":"integer","format":"int32","example":12345,"description":"The record ID, for use with Platform endpoints."},"business_hours":{"type":"array","items":{"$ref":"#/components/schemas/BusinessHours"},"description":"The business hours of the location, if `show_business_hours=true` parameter is set."},"platform":{"allOf":[{"$ref":"#/components/schemas/PlatformFieldValue"}],"description":"Platform field values, if `platform=true` parameter is set."}},"required":["id","name","short_name","latitude","longitude","organisation_id","address","time_zone","utc_offset","business_day_cutoff","public_holiday_regions","specific_holiday_dates","updated_at","record_id"],"description":"Location model"},"SpecificHolidayDate":{"type":"object","properties":{"date":{"type":"string","example":"2016-03-02","description":"The date of the holiday."},"from":{"type":"number","format":"float","example":8.5,"description":"The start hour of the holiday."},"to":{"type":"number","format":"float","example":17.0,"description":"The end hour of the holiday."}},"required":["date","from","to"]},"BusinessHours":{"type":"object","properties":{"weekday":{"type":"integer","format":"int32","example":0,"description":"The weekday these hours cover, where 0 is Sunday and 6 is Saturday."},"start":{"type":"string","example":"09:00","description":"The start time of a location's business hours."},"finish":{"type":"string","example":"17:00","description":"The finish time of a location's business hours."}},"required":["weekday","start","finish"]},"postV2Locations":{"type":"object","properties":{"name":{"type":"string"},"short_name":{"type":"string"},"latitude":{"type":"number","format":"float"},"longitude":{"type":"number","format":"float"},"address":{"type":"string"},"time_zone":{"type":"string","enum":["Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmara","Africa/Asmera","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Timbuktu","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/Buenos_Aires","America/Argentina/Catamarca","America/Argentina/ComodRivadavia","America/Argentina/Cordoba","America/Argentina/Jujuy","America/Argentina/La_Rioja","America/Argentina/Mendoza","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Atikokan","America/Atka","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Buenos_Aires","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Catamarca","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Ciudad_Juarez","America/Coral_Harbour","America/Cordoba","America/Costa_Rica","America/Coyhaique","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Ensenada","America/Fort_Nelson","America/Fort_Wayne","America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Indianapolis","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Indianapolis","America/Inuvik","America/Iqaluit","America/Jamaica","America/Jujuy","America/Juneau","America/Kentucky/Louisville","America/Kentucky/Monticello","America/Knox_IN","America/Kralendijk","America/La_Paz","America/Lima","America/Los_Angeles","America/Louisville","America/Lower_Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Mendoza","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montreal","America/Montserrat","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Nuuk","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Acre","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Rosario","America/Santa_Isabel","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Shiprock","America/Sitka","America/St_Barthelemy","America/St_Johns","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Virgin","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Palmer","Antarctica/Rothera","Antarctica/South_Pole","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Ashkhabad","Asia/Atyrau","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Calcutta","Asia/Chita","Asia/Choibalsan","Asia/Chongqing","Asia/Chungking","Asia/Colombo","Asia/Dacca","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Harbin","Asia/Hebron","Asia/Ho_Chi_Minh","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Istanbul","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Kashgar","Asia/Kathmandu","Asia/Katmandu","Asia/Khandyga","Asia/Kolkata","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macao","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Rangoon","Asia/Riyadh","Asia/Saigon","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Tel_Aviv","Asia/Thimbu","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ujung_Pandang","Asia/Ulaanbaatar","Asia/Ulan_Bator","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yangon","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faeroe","Atlantic/Faroe","Atlantic/Jan_Mayen","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena","Atlantic/Stanley","Australia/ACT","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Canberra","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/LHI","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/NSW","Australia/North","Australia/Perth","Australia/Queensland","Australia/South","Australia/Sydney","Australia/Tasmania","Australia/Victoria","Australia/West","Australia/Yancowinna","Brazil/Acre","Brazil/DeNoronha","Brazil/East","Brazil/West","CET","CST6CDT","Canada/Atlantic","Canada/Central","Canada/Eastern","Canada/Mountain","Canada/Newfoundland","Canada/Pacific","Canada/Saskatchewan","Canada/Yukon","Chile/Continental","Chile/EasterIsland","Cuba","EET","EST","EST5EDT","Egypt","Eire","Etc/GMT","Etc/GMT+0","Etc/GMT+1","Etc/GMT+10","Etc/GMT+11","Etc/GMT+12","Etc/GMT+2","Etc/GMT+3","Etc/GMT+4","Etc/GMT+5","Etc/GMT+6","Etc/GMT+7","Etc/GMT+8","Etc/GMT+9","Etc/GMT-0","Etc/GMT-1","Etc/GMT-10","Etc/GMT-11","Etc/GMT-12","Etc/GMT-13","Etc/GMT-14","Etc/GMT-2","Etc/GMT-3","Etc/GMT-4","Etc/GMT-5","Etc/GMT-6","Etc/GMT-7","Etc/GMT-8","Etc/GMT-9","Etc/GMT0","Etc/Greenwich","Etc/UCT","Etc/UTC","Etc/Universal","Etc/Zulu","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belfast","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Kyiv","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Nicosia","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Saratov","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Tiraspol","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zaporozhye","Europe/Zurich","Factory","GB","GB-Eire","GMT","GMT+0","GMT-0","GMT0","Greenwich","HST","Hongkong","Iceland","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Iran","Israel","Jamaica","Japan","Kwajalein","Libya","MET","MST","MST7MDT","Mexico/BajaNorte","Mexico/BajaSur","Mexico/General","NZ","NZ-CHAT","Navajo","PRC","PST8PDT","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Chuuk","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Johnston","Pacific/Kanton","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Pohnpei","Pacific/Ponape","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Samoa","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Truk","Pacific/Wake","Pacific/Wallis","Pacific/Yap","Poland","Portugal","ROC","ROK","Singapore","Turkey","UCT","US/Alaska","US/Aleutian","US/Arizona","US/Central","US/East-Indiana","US/Eastern","US/Hawaii","US/Indiana-Starke","US/Michigan","US/Mountain","US/Pacific","US/Samoa","UTC","Universal","W-SU","WET","Zulu","GMT-12","International Date Line West","American Samoa","Midway Island","Aleutian Islands","Hawaii","Marquesas Islands","Alaska","Anchorage","Gambier Islands","Pacific Time (Canada)","Pacific Time (US \u0026 Canada)","Pitcairn Islands","Tijuana","Vancouver","Alberta","Arizona","Mazatlan","Mountain Time (US \u0026 Canada)","Central America","Central Time (US \u0026 Canada)","Chihuahua","Easter Islands","Guadalajara","Mexico City","Monterrey","Saskatchewan","Winnipeg","Bogota","Eastern Time (US \u0026 Canada)","Indiana (East)","Lima","Quito","Atlantic Time (Canada)","Caracas","Georgetown","La Paz","Puerto Rico","Santiago","Santo Domingo","Newfoundland","Asuncion","Brasilia","Buenos Aires","Montevideo","GMT-2","Greenland","Mid-Atlantic","Noronha","Azores","Cape Verde Is.","Casablanca","Edinburgh","Lisbon","London","Monrovia","Amsterdam","Belgrade","Berlin","Bern","Bratislava","Brussels","Budapest","Copenhagen","Dublin","Ljubljana","Madrid","Paris","Prague","Rome","Sarajevo","Skopje","Stockholm","Vienna","Warsaw","West Africa","West Central Africa","Zagreb","Zurich","Athens","Beirut","Bucharest","Cairo","Harare","Helsinki","Jerusalem","Kaliningrad","Kyiv","Pretoria","Riga","Sofia","Tallinn","Vilnius","Windhoek","Baghdad","Istanbul","Kuwait","Minsk","Moscow","Nairobi","Riyadh","St. Petersburg","Volgograd","Tehran","Abu Dhabi","Baku","Dubai","Muscat","Samara","Tbilisi","Yerevan","Kabul","Almaty","Astana","Ekaterinburg","Islamabad","Karachi","Tashkent","Calcutta","Chennai","Kolkata","Mumbai","New Delhi","Sri Jayawardenepura","Kathmandu","Dhaka","Omsk","Urumqi","Rangoon","Bangkok","Hanoi","Jakarta","Krasnoyarsk","Novosibirsk","Beijing","Chongqing","Hong Kong","Irkutsk","Kuala Lumpur","Perth","Taipei","Ulaanbaatar","Eucla","Osaka","Sapporo","Seoul","Tokyo","Yakutsk","Adelaide","Darwin","Brisbane","Canberra","Guam","Hobart","Melbourne","Port Moresby","Sydney","Vladivostok","Lord Howe Island","Magadan","New Caledonia","Norfolk Island","Solomon Is.","Srednekolymsk","Auckland","Fiji","Gilbert Islands","Kamchatka","Marshall Is.","Wellington","Chatham Is.","Nuku'alofa","Samoa","Tokelau Is.","Line Islands"]},"public_holiday_regions":{"type":"array","items":{"type":"string","enum":["au","au_act","au_nsw","au_nt","au_qld","au_sa","au_tas","au_vic","au_wa","us","us_al","us_ak","us_az","us_ar","us_ca","us_co","us_ct","us_de","us_dc","us_fl","us_ga","us_hi","us_id","us_il","us_in","us_ia","us_ks","us_ky","us_la","us_me","us_md","us_ma","us_mi","us_mn","us_ms","us_mo","us_mt","us_ne","us_nv","us_nh","us_nj","us_nm","us_ny","us_nc","us_nd","us_oh","us_ok","us_or","us_pa","us_ri","us_sc","us_sd","us_tn","us_tx","us_ut","us_vt","us_va","us_wa","us_wv","us_wi","us_wy","gb","gb_eng","gb_nir","gb_sct","gb_wls","ar","at","be_fr","be_nl","br","ca","ca_ab","ca_bc","ca_mb","ca_nb","ca_nl","ca_ns","ca_on","ca_pe","ca_qc","ca_sk","cl","co","cr","cy","hr","cz","dk","do","ee","el","fi","fr","ge","de","hk","hu","is","ie","it","jp","lr","li","lt","lu","mt_en","my","mx","ma","mz","mm","mu","na","nl","nz2_calendar_dates","nz","nf","no","pk","pe","ph","pl","pt","ro","ru","sg","sk","si","uy","za","kr","es","se","ch","th","tn","tr","vi","ve"]}},"specific_holiday_dates":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"from":{"type":"number","format":"float"},"to":{"type":"number","format":"float"}},"required":["date"]}},"business_day_cutoff":{"type":"integer","format":"int32"}},"required":["name"],"description":"Create Location"},"LocationVersion":{"type":"object","properties":{"version_id":{"type":"integer","format":"int32","example":12345},"time":{"type":"integer","format":"int32","example":1456988518},"event":{"type":"string","example":"update","description":"What happened to the record. Usually `create`, `update` or `destroy`, though some resources return a longer phrase such as `update shift break`."},"author":{"allOf":[{"$ref":"#/components/schemas/VersionAuthor"}],"description":"The author of the change."},"item_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the record this version belongs to."},"item_type":{"type":"string","description":"The type of record this version belongs to, such as `Shift` or `Schedule`."},"changes":{"type":"array","items":{"$ref":"#/components/schemas/LocationVersionChange"},"description":"The fields that changed in this version."}},"required":["version_id","time","event","author","item_id","item_type","changes"],"description":"LocationVersion model"},"LocationVersionChange":{"type":"object","properties":{"field":{"type":"string","example":"name","description":"The name of the field that changed."},"previous":{"type":"string","example":"Spring field","description":"The value before the change."},"updated":{"type":"string","example":"Springfield","description":"The value after the change."}},"required":["field","previous","updated"]},"putV2LocationsId":{"type":"object","properties":{"name":{"type":"string"},"short_name":{"type":"string"},"latitude":{"type":"number","format":"float"},"longitude":{"type":"number","format":"float"},"address":{"type":"string"},"time_zone":{"type":"string","enum":["Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmara","Africa/Asmera","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Timbuktu","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/Buenos_Aires","America/Argentina/Catamarca","America/Argentina/ComodRivadavia","America/Argentina/Cordoba","America/Argentina/Jujuy","America/Argentina/La_Rioja","America/Argentina/Mendoza","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Atikokan","America/Atka","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Buenos_Aires","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Catamarca","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Ciudad_Juarez","America/Coral_Harbour","America/Cordoba","America/Costa_Rica","America/Coyhaique","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Ensenada","America/Fort_Nelson","America/Fort_Wayne","America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Indianapolis","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Indianapolis","America/Inuvik","America/Iqaluit","America/Jamaica","America/Jujuy","America/Juneau","America/Kentucky/Louisville","America/Kentucky/Monticello","America/Knox_IN","America/Kralendijk","America/La_Paz","America/Lima","America/Los_Angeles","America/Louisville","America/Lower_Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Mendoza","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montreal","America/Montserrat","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Nuuk","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Acre","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Rosario","America/Santa_Isabel","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Shiprock","America/Sitka","America/St_Barthelemy","America/St_Johns","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Virgin","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Palmer","Antarctica/Rothera","Antarctica/South_Pole","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Ashkhabad","Asia/Atyrau","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Calcutta","Asia/Chita","Asia/Choibalsan","Asia/Chongqing","Asia/Chungking","Asia/Colombo","Asia/Dacca","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Harbin","Asia/Hebron","Asia/Ho_Chi_Minh","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Istanbul","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Kashgar","Asia/Kathmandu","Asia/Katmandu","Asia/Khandyga","Asia/Kolkata","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macao","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Rangoon","Asia/Riyadh","Asia/Saigon","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Tel_Aviv","Asia/Thimbu","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ujung_Pandang","Asia/Ulaanbaatar","Asia/Ulan_Bator","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yangon","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faeroe","Atlantic/Faroe","Atlantic/Jan_Mayen","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena","Atlantic/Stanley","Australia/ACT","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Canberra","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/LHI","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/NSW","Australia/North","Australia/Perth","Australia/Queensland","Australia/South","Australia/Sydney","Australia/Tasmania","Australia/Victoria","Australia/West","Australia/Yancowinna","Brazil/Acre","Brazil/DeNoronha","Brazil/East","Brazil/West","CET","CST6CDT","Canada/Atlantic","Canada/Central","Canada/Eastern","Canada/Mountain","Canada/Newfoundland","Canada/Pacific","Canada/Saskatchewan","Canada/Yukon","Chile/Continental","Chile/EasterIsland","Cuba","EET","EST","EST5EDT","Egypt","Eire","Etc/GMT","Etc/GMT+0","Etc/GMT+1","Etc/GMT+10","Etc/GMT+11","Etc/GMT+12","Etc/GMT+2","Etc/GMT+3","Etc/GMT+4","Etc/GMT+5","Etc/GMT+6","Etc/GMT+7","Etc/GMT+8","Etc/GMT+9","Etc/GMT-0","Etc/GMT-1","Etc/GMT-10","Etc/GMT-11","Etc/GMT-12","Etc/GMT-13","Etc/GMT-14","Etc/GMT-2","Etc/GMT-3","Etc/GMT-4","Etc/GMT-5","Etc/GMT-6","Etc/GMT-7","Etc/GMT-8","Etc/GMT-9","Etc/GMT0","Etc/Greenwich","Etc/UCT","Etc/UTC","Etc/Universal","Etc/Zulu","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belfast","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Kyiv","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Nicosia","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Saratov","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Tiraspol","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zaporozhye","Europe/Zurich","Factory","GB","GB-Eire","GMT","GMT+0","GMT-0","GMT0","Greenwich","HST","Hongkong","Iceland","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Iran","Israel","Jamaica","Japan","Kwajalein","Libya","MET","MST","MST7MDT","Mexico/BajaNorte","Mexico/BajaSur","Mexico/General","NZ","NZ-CHAT","Navajo","PRC","PST8PDT","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Chuuk","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Johnston","Pacific/Kanton","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Pohnpei","Pacific/Ponape","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Samoa","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Truk","Pacific/Wake","Pacific/Wallis","Pacific/Yap","Poland","Portugal","ROC","ROK","Singapore","Turkey","UCT","US/Alaska","US/Aleutian","US/Arizona","US/Central","US/East-Indiana","US/Eastern","US/Hawaii","US/Indiana-Starke","US/Michigan","US/Mountain","US/Pacific","US/Samoa","UTC","Universal","W-SU","WET","Zulu","GMT-12","International Date Line West","American Samoa","Midway Island","Aleutian Islands","Hawaii","Marquesas Islands","Alaska","Anchorage","Gambier Islands","Pacific Time (Canada)","Pacific Time (US \u0026 Canada)","Pitcairn Islands","Tijuana","Vancouver","Alberta","Arizona","Mazatlan","Mountain Time (US \u0026 Canada)","Central America","Central Time (US \u0026 Canada)","Chihuahua","Easter Islands","Guadalajara","Mexico City","Monterrey","Saskatchewan","Winnipeg","Bogota","Eastern Time (US \u0026 Canada)","Indiana (East)","Lima","Quito","Atlantic Time (Canada)","Caracas","Georgetown","La Paz","Puerto Rico","Santiago","Santo Domingo","Newfoundland","Asuncion","Brasilia","Buenos Aires","Montevideo","GMT-2","Greenland","Mid-Atlantic","Noronha","Azores","Cape Verde Is.","Casablanca","Edinburgh","Lisbon","London","Monrovia","Amsterdam","Belgrade","Berlin","Bern","Bratislava","Brussels","Budapest","Copenhagen","Dublin","Ljubljana","Madrid","Paris","Prague","Rome","Sarajevo","Skopje","Stockholm","Vienna","Warsaw","West Africa","West Central Africa","Zagreb","Zurich","Athens","Beirut","Bucharest","Cairo","Harare","Helsinki","Jerusalem","Kaliningrad","Kyiv","Pretoria","Riga","Sofia","Tallinn","Vilnius","Windhoek","Baghdad","Istanbul","Kuwait","Minsk","Moscow","Nairobi","Riyadh","St. Petersburg","Volgograd","Tehran","Abu Dhabi","Baku","Dubai","Muscat","Samara","Tbilisi","Yerevan","Kabul","Almaty","Astana","Ekaterinburg","Islamabad","Karachi","Tashkent","Calcutta","Chennai","Kolkata","Mumbai","New Delhi","Sri Jayawardenepura","Kathmandu","Dhaka","Omsk","Urumqi","Rangoon","Bangkok","Hanoi","Jakarta","Krasnoyarsk","Novosibirsk","Beijing","Chongqing","Hong Kong","Irkutsk","Kuala Lumpur","Perth","Taipei","Ulaanbaatar","Eucla","Osaka","Sapporo","Seoul","Tokyo","Yakutsk","Adelaide","Darwin","Brisbane","Canberra","Guam","Hobart","Melbourne","Port Moresby","Sydney","Vladivostok","Lord Howe Island","Magadan","New Caledonia","Norfolk Island","Solomon Is.","Srednekolymsk","Auckland","Fiji","Gilbert Islands","Kamchatka","Marshall Is.","Wellington","Chatham Is.","Nuku'alofa","Samoa","Tokelau Is.","Line Islands"]},"public_holiday_regions":{"type":"array","items":{"type":"string","enum":["au","au_act","au_nsw","au_nt","au_qld","au_sa","au_tas","au_vic","au_wa","us","us_al","us_ak","us_az","us_ar","us_ca","us_co","us_ct","us_de","us_dc","us_fl","us_ga","us_hi","us_id","us_il","us_in","us_ia","us_ks","us_ky","us_la","us_me","us_md","us_ma","us_mi","us_mn","us_ms","us_mo","us_mt","us_ne","us_nv","us_nh","us_nj","us_nm","us_ny","us_nc","us_nd","us_oh","us_ok","us_or","us_pa","us_ri","us_sc","us_sd","us_tn","us_tx","us_ut","us_vt","us_va","us_wa","us_wv","us_wi","us_wy","gb","gb_eng","gb_nir","gb_sct","gb_wls","ar","at","be_fr","be_nl","br","ca","ca_ab","ca_bc","ca_mb","ca_nb","ca_nl","ca_ns","ca_on","ca_pe","ca_qc","ca_sk","cl","co","cr","cy","hr","cz","dk","do","ee","el","fi","fr","ge","de","hk","hu","is","ie","it","jp","lr","li","lt","lu","mt_en","my","mx","ma","mz","mm","mu","na","nl","nz2_calendar_dates","nz","nf","no","pk","pe","ph","pl","pt","ro","ru","sg","sk","si","uy","za","kr","es","se","ch","th","tn","tr","vi","ve"]}},"specific_holiday_dates":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"from":{"type":"number","format":"float"},"to":{"type":"number","format":"float"}},"required":["date"]}},"business_day_cutoff":{"type":"integer","format":"int32"},"business_hours":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string"},"finish":{"type":"string"},"weekday":{"type":"integer","format":"int32"}},"required":["start","finish","weekday"]}}},"description":"Update Location"},"Department":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the team."},"location_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the team's location."},"name":{"type":"string","example":"Waiters","description":"The name of the team."},"colour":{"type":"string","example":"#FBB830","description":"The colour of the team."},"export_name":{"type":"string","example":"WGB-32","description":"The team's export name, or null if it has none."},"staff":{"type":"array","items":{"type":"integer","format":"int32"},"example":[12345,12346],"description":"The ids of the users who are members of the team."},"managers":{"type":"array","items":{"type":"integer","format":"int32"},"example":[12345,12346],"description":"The ids of the users who manage the team."},"associated_tags":{"type":"array","items":{"type":"string"},"example":["Senior"],"description":"The tags associated with the team."},"qualifications":{"type":"array","items":{"type":"integer","format":"int32"},"example":[12345,12346],"description":"The ids of the qualifications required to join the team."},"record_id":{"type":"integer","format":"int32","example":12345,"description":"The record ID, for use with Platform endpoints."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the team was last updated, as a Unix timestamp."},"platform":{"allOf":[{"$ref":"#/components/schemas/PlatformFieldValue"}],"description":"Platform field values, if `platform=true` parameter is set."},"team_group":{"type":"string","example":"Front of House","description":"The name of the team's group, if the team groups feature is enabled."},"assisting_teams":{"type":"array","items":{"type":"integer","format":"int32"},"example":[12345,12346],"description":"The ids of the teams this team assists, if the assisting teams feature is enabled."},"tracking_categories":{"type":"array","items":{"$ref":"#/components/schemas/TrackingCategory"},"description":"The team's tracking categories, if `tracking_categories=true` parameter is set."},"activity_codes":{"type":"array","items":{"$ref":"#/components/schemas/ActivityCode"},"description":"The activity codes applicable to the team, if `show_activity_codes=true` parameter is set."}},"required":["id","location_id","name","colour","export_name","staff","managers","associated_tags","qualifications","record_id","updated_at"],"description":"Department model"},"TrackingCategory":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the team's tracking category."},"department_id":{"type":"integer","format":"int32","example":12345,"description":"The id of this tracking category's team."},"payroll_tracking_categories_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the payroll tracking category."},"value":{"type":"string","example":"WGB-32","description":"The value of the tracking category for this team."}},"required":["id","department_id","payroll_tracking_categories_id","value"]},"ActivityCode":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the activity code."},"name":{"type":"string","example":"Cleaning","description":"The name of the activity code."},"colour":{"type":"string","example":"#FBB830","description":"The colour of the activity code."}},"required":["id","name","colour"]},"postV2Departments":{"type":"object","properties":{"name":{"type":"string"},"location_id":{"type":"integer","format":"int32"},"export_name":{"type":"string"},"colour":{"type":"string"},"team_group":{"type":"string"},"associated_tags":{"type":"array","items":{"type":"string"}},"assisting_team_ids":{"type":"array","items":{"type":"integer","format":"int32"}},"qualification_ids":{"type":"array","items":{"type":"integer","format":"int32"}},"manager_ids":{"type":"array","items":{"type":"integer","format":"int32"}},"user_ids":{"type":"array","items":{"type":"integer","format":"int32"}}},"required":["name","location_id"],"description":"Create Team"},"DepartmentVersion":{"type":"object","properties":{"version_id":{"type":"integer","format":"int32","example":12345},"time":{"type":"integer","format":"int32","example":1456988518},"event":{"type":"string","example":"update","description":"What happened to the record. Usually `create`, `update` or `destroy`, though some resources return a longer phrase such as `update shift break`."},"author":{"allOf":[{"$ref":"#/components/schemas/VersionAuthor"}],"description":"The author of the change."},"item_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the record this version belongs to."},"item_type":{"type":"string","description":"The type of record this version belongs to, such as `Shift` or `Schedule`."},"changes":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentVersionChange"},"description":"The fields that changed in this version."}},"required":["version_id","time","event","author","item_id","item_type","changes"],"description":"DepartmentVersion model"},"DepartmentVersionChange":{"type":"object","properties":{"field":{"type":"string","example":"name","description":"The name of the field that changed."},"previous":{"type":"string","example":"Wait staff","description":"The value before the change."},"updated":{"type":"string","example":"Waiters","description":"The value after the change."}},"required":["field","previous","updated"]},"putV2DepartmentsId":{"type":"object","properties":{"name":{"type":"string"},"location_id":{"type":"integer","format":"int32"},"export_name":{"type":"string"},"colour":{"type":"string"},"team_group":{"type":"string"},"associated_tags":{"type":"array","items":{"type":"string"}},"assisting_team_ids":{"type":"array","items":{"type":"integer","format":"int32"}},"user_ids":{"type":"array","items":{"type":"integer","format":"int32"}},"manager_ids":{"type":"array","items":{"type":"integer","format":"int32"}},"qualification_ids":{"type":"array","items":{"type":"integer","format":"int32"}}},"description":"Update Team"},"ShiftDetail":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345},"department_id":{"type":"integer","format":"int32","example":12345},"name":{"type":"string","example":"Manager"},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the shift detail was last updated, as a Unix timestamp."}},"required":["id","department_id","name","updated_at"],"description":"ShiftDetail model"},"postV2ShiftDetails":{"type":"object","properties":{"name":{"type":"string"},"department_id":{"type":"integer","format":"int32"}},"required":["name","department_id"],"description":"Create Shift Detail"},"putV2ShiftDetailsId":{"type":"object","properties":{"name":{"type":"string"},"department_id":{"type":"integer","format":"int32"}},"description":"Update Shift Detail"},"AwardTag":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345},"name":{"type":"string","example":"Senior"},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the award tag was last updated, as a Unix timestamp."}},"required":["id","name","updated_at"],"description":"AwardTag model"},"Position":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345},"name":{"type":"string","example":"Bartender Casual","description":"Send this as `position_template_name` when creating or updating a user."},"position_group":{"type":"string","example":"Bartender","description":"The name of the group this position belongs to, if any."},"department_ids":{"type":"array","items":{"type":"integer","format":"int32"},"example":[12345],"description":"The departments this position can be assigned in. Empty means any department."}},"required":["id","name","position_group","department_ids"],"description":"Position model"},"Timesheet":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the timesheet."},"user_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the user who worked the shift."},"start":{"type":"string","example":"2016-02-29","description":"The start date of the timesheet."},"finish":{"type":"string","example":"2016-03-14","description":"The end date of the timesheet."},"status":{"type":"string","example":"approved","description":"One of `pending`, `approved`, `exported`."},"shifts":{"type":"array","items":{"$ref":"#/components/schemas/Shift"},"description":"The shifts on the timesheet."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the timesheet was last updated."},"total_cost":{"type":"number","format":"float","example":102.15,"description":"The total cost of the timesheet, if `show_costs=true` parameter is set."},"total_oncosts_breakdown":{"type":"array","items":{"$ref":"#/components/schemas/OncostBreakdownEntry"},"description":"The total on-cost breakdown, if `show_costs=true` and on-costs are requested."},"total_cost_with_oncosts":{"type":"number","format":"float","description":"The total cost including on-costs, if `show_costs=true` and on-costs are requested."},"notes":{"type":"array","items":{"$ref":"#/components/schemas/Note"},"description":"Notes on the timesheet, if `show_notes=true` parameter is set."}},"required":["id","user_id","start","finish","status","shifts","updated_at"],"description":"Timesheet model"},"Shift":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the shift."},"timesheet_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the timesheet that the shift belongs on."},"user_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the user who worked the shift."},"date":{"type":"string","example":"2016-03-02","description":"The date the shift was worked."},"start":{"type":"integer","format":"int32","example":1456902000,"description":"The start of the shift."},"break_start":{"type":"integer","format":"int32","example":1456902000,"description":"The start of the break."},"break_finish":{"type":"integer","format":"int32","example":1456916400,"description":"The end of the break."},"break_length":{"type":"integer","format":"int32","example":27,"description":"The length of the break in minutes (NOTE: this can be different to `(break_start - break_finish) / 60`, see Shifts section)."},"breaks":{"type":"array","items":{"$ref":"#/components/schemas/ShiftBreak"},"description":"The shift's breaks."},"finish":{"type":"integer","format":"int32","example":1456916400,"description":"The end of the shift."},"department_id":{"type":"integer","format":"int32","example":12345,"description":"The ID for the team this shift was worked in."},"sub_cost_centre":{"type":"string","description":"Deprecated; always null."},"tag":{"type":"string","example":"Head Technician","description":"The name of the tag on the shift (can use `tag_id` instead)."},"tag_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the tag on the shift (can use `tag` instead)."},"status":{"type":"string","example":"PENDING","description":"One of `PENDING`, `APPROVED`."},"metadata":{"type":"string","example":"My special metadata","description":"Custom string field that holds up to 500 characters."},"leave_request_id":{"type":"integer","format":"int32","example":12345,"description":"The ID for the leave request, if leave was taken, otherwise null."},"allowances":{"type":"array","items":{"$ref":"#/components/schemas/Allowance"},"description":"The allowances that apply to the shift."},"approved_by":{"type":"integer","format":"int32","example":12345,"description":"The ID of the user that approved the shift."},"approved_at":{"type":"integer","format":"int32","example":1456988518,"description":"The time the shift was approved."},"record_id":{"type":"integer","format":"int32","example":12345,"description":"The record ID, for use with Platform endpoints."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the shift was last updated."},"platform":{"allOf":[{"$ref":"#/components/schemas/PlatformFieldValue"}],"description":"Platform field values, if `show_platform=true` parameter is set."},"department_name":{"type":"string","example":"Front of House","description":"The name of the team this shift was worked in, if `include_names=true` parameter is set."},"location_name":{"type":"string","example":"Brisbane CBD","description":"The name of the location this shift was worked at, if `include_names=true` parameter is set."},"user_name":{"type":"string","example":"Jane Smith","description":"The name of the user who worked the shift, if `include_names=true` parameter is set."},"award_interpretation":{"type":"array","items":{"$ref":"#/components/schemas/AwardInterpretation"},"description":"Award interpretation output, if `show_award_interpretation=true` parameter is set."},"associated_tag":{"type":"string","description":"A tag inferred from the team's associated tags, if `show_associated_tag=true` parameter is set."},"notes":{"type":"array","items":{"$ref":"#/components/schemas/Note"},"description":"Notes on the shift, if `show_notes=true` parameter is set."},"cost":{"type":"number","format":"float","example":182.45,"description":"The cost of the shift, if `show_costs=true` parameter is set."},"cost_breakdown":{"allOf":[{"$ref":"#/components/schemas/ShiftCostBreakdown"}],"description":"The award and allowance cost breakdown, if `show_costs=true` parameter is set."},"oncosts_breakdown":{"type":"array","items":{"$ref":"#/components/schemas/OncostBreakdownEntry"},"description":"The on-cost breakdown, if `show_costs=true` and on-costs are requested."},"cost_with_oncosts":{"type":"number","format":"float","example":200.0,"description":"The cost of the shift including on-costs, if `show_costs=true` and on-costs are requested."},"hours_over_roster":{"type":"number","format":"float","example":0.65,"description":"Decimal hours worked beyond the matching rostered shift, if `show_variance=true` parameter is set."},"hours_under_roster":{"type":"number","format":"float","example":0.0,"description":"Decimal hours short of the matching rostered shift, if `show_variance=true` parameter is set."},"matched_schedule_id":{"type":"integer","format":"int32","example":31337157,"description":"The id of the schedule the shift was measured against, if `show_variance=true` parameter is set."},"department_export_name":{"type":"string","description":"The export name of the team, if `show_export_name=true` parameter is set."},"employee_id":{"type":"string","description":"The employee number, if `show_award_interpretation=true` parameter is set."},"rating":{"type":"integer","format":"int32","description":"The shift rating, if `show_rating=true` parameter is set."},"last_rated_by":{"type":"integer","format":"int32","description":"The id of the user who last rated the shift, if `show_rating=true` parameter is set."},"last_costed_at":{"type":"integer","format":"int32","description":"When the shift was last costed, if `show_costs=true` parameter is set."},"activity_code_id":{"type":"integer","format":"int32","example":12345,"description":"The shift's own (fallback) activity code id, applied to worked time not covered by any activity, or null, if `show_activities=true` parameter is set."},"activity_code":{"type":"string","example":"CLEAN","description":"The shift's own (fallback) activity code, if `show_activities=true` parameter is set."},"activity_code_name":{"type":"string","example":"Cleaning","description":"The activity code name, if `show_activities=true` and `include_names=true` are set."},"activities":{"type":"array","items":{"$ref":"#/components/schemas/ShiftActivity"},"description":"The activities within the shift, if `show_activities=true` parameter is set."}},"required":["id","timesheet_id","user_id","date","start","break_start","break_finish","break_length","breaks","finish","department_id","sub_cost_centre","tag","tag_id","status","metadata","leave_request_id","allowances","approved_by","approved_at","record_id","updated_at"],"description":"Shift model"},"ShiftBreak":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the break."},"shift_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the break's shift."},"start":{"type":"integer","format":"int32","example":1456902000,"description":"The start of the break."},"finish":{"type":"integer","format":"int32","example":1456916400,"description":"The end of the break."},"length":{"type":"integer","format":"int32","example":27,"description":"The length of the break in minutes (NOTE: this can be different to `(break_start - break_finish) / 60`, see Shifts section)."},"paid":{"type":"boolean","example":false,"description":"Whether the break is a paid break."},"selected_automatic_break_rule_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the automatic break rule chosen to correspond to this shift break by the employee when they clocked in."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the break was last updated."}},"required":["id","shift_id","start","finish","length","paid","selected_automatic_break_rule_id","updated_at"],"description":"ShiftBreak model"},"Allowance":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the allowance."},"name":{"type":"string","example":"Hazardous Environment Allowance","description":"The name of the allowance."},"value":{"type":"number","format":"float","example":0.5,"description":"The amount of the allowance being applied."},"cost":{"type":"number","format":"float","example":1.75,"description":"The cost of the allowance, if `show_costs=true` parameter is set."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the allowance was last updated."}},"required":["id","name","value","updated_at"]},"Note":{"type":"object","properties":{"body":{"type":"string","example":"Goals were kicked this shift 💪","description":"The note's contents."},"author":{"type":"string","example":"Mike Richards","description":"Who wrote the note - if the note was generated automatically it will say so here."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the note was last updated."}},"required":["body","author","updated_at"]},"ShiftCostBreakdown":{"type":"object","properties":{"award_cost":{"type":"number","format":"float","example":150.0,"description":"What the shift's award interpretation costs, excluding allowances."},"allowance_cost":{"type":"number","format":"float","example":32.45,"description":"What the shift's allowances cost."}},"required":["award_cost","allowance_cost"]},"ShiftActivity":{"type":"object","properties":{"start":{"type":"integer","format":"int32","example":1456902000,"description":"The start of the activity. `null` for the fallback entry (see below)."},"finish":{"type":"integer","format":"int32","example":1456916400,"description":"The end of the activity. `null` for the fallback entry (see below)."},"activity_code_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the assigned activity code, or null if none is assigned."},"activity_code":{"type":"string","example":"CLEAN","description":"The assigned activity code's code, or null if none is assigned. Always included."},"hours":{"type":"number","format":"float","example":2.0,"description":"The worked hours attributed to this activity, prorated from the shift's award interpretation. Included when `show_activities=true`."},"cost":{"type":"number","format":"float","example":42.12,"description":"The cost attributed to this activity, prorated from the shift's award interpretation. Included only when `show_costs=true` (requires the `cost` scope and permission to see staff costs)."},"activity_code_name":{"type":"string","example":"Cleaning","description":"The assigned activity code's name, included only if `include_names=true`."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the activity was last updated (absent for the fallback entry)."}},"required":["start","finish","activity_code_id","activity_code"]},"putV2TimesheetsId":{"type":"object","properties":{"status":{"type":"string","enum":["pending","approved","exported"],"example":"pending"}},"description":"Update Timesheet"},"putV2TimesheetsIdEsign":{"type":"object","properties":{"amendment_request":{"type":"string"},"dont_show_again":{"type":"boolean"}},"description":"Esign Timesheet"},"postV2Shifts":{"type":"object","properties":{"user_id":{"type":"integer","format":"int32"},"date":{"type":"string","format":"date"},"start":{"type":"integer","format":"int32"},"finish":{"type":"integer","format":"int32"},"break_start":{"type":"integer","format":"int32"},"break_finish":{"type":"integer","format":"int32"},"break_length":{"type":"integer","format":"int32"},"status":{"type":"string","enum":["PENDING","APPROVED"]},"department_id":{"type":"integer","format":"int32"},"tag":{"type":"string"},"tag_id":{"type":"integer","format":"int32"},"metadata":{"type":"string"},"allowances":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"value":{"type":"number","format":"float"}},"required":["id","value"]}},"activity_code_id":{"type":"integer","format":"int32"},"activities":{"type":"array","items":{"type":"object","properties":{"start":{"type":"integer","format":"int32"},"finish":{"type":"integer","format":"int32"},"activity_code_id":{"type":"integer","format":"int32"}}}}},"required":["user_id","date"],"description":"Create Shift"},"ActiveShift":{"type":"object","properties":{"user_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the user who is working the shift."},"shift_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the shift."},"status":{"type":"string","example":"clocked_in","description":"The shift's current status, either `clocked_in` or `on_break`."}},"required":["user_id","shift_id","status"],"description":"ActiveShift model"},"ActiveActivity":{"type":"object","properties":{"user_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the user who is currently in an activity."},"shift_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the shift the activity belongs to."},"activity_code_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the activity code the user is working on, if one was reported."},"start_time":{"type":"integer","format":"int32","example":1456902000,"description":"The time the activity started, as a Unix timestamp."},"status":{"type":"string","example":"in_activity","description":"The user's current activity status, always `in_activity`."}},"required":["user_id","shift_id","activity_code_id","start_time","status"],"description":"ActiveActivity model"},"ShiftVersion":{"type":"object","properties":{"version_id":{"type":"integer","format":"int32","example":12345},"time":{"type":"integer","format":"int32","example":1456988518},"event":{"type":"string","example":"update","description":"What happened to the record. Usually `create`, `update` or `destroy`, though some resources return a longer phrase such as `update shift break`."},"author":{"allOf":[{"$ref":"#/components/schemas/VersionAuthor"}],"description":"The author of the change."},"item_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the record this version belongs to."},"item_type":{"type":"string","description":"The type of record this version belongs to, such as `Shift` or `Schedule`."},"changes":{"type":"array","items":{"$ref":"#/components/schemas/ShiftVersionChange"},"description":"The fields that changed in this version."}},"required":["version_id","time","event","author","item_id","item_type","changes"],"description":"ShiftVersion model"},"ShiftVersionChange":{"type":"object","properties":{"field":{"type":"string","example":"finish","description":"The name of the field that changed."},"previous":{"type":"integer","format":"int32","example":1456988518,"description":"The value before the change."},"updated":{"type":"integer","format":"int32","example":1456988518,"description":"The value after the change."}},"required":["field","previous","updated"]},"putV2ShiftsId":{"type":"object","properties":{"date":{"type":"string","format":"date"},"start":{"type":"integer","format":"int32"},"finish":{"type":"integer","format":"int32"},"break_start":{"type":"integer","format":"int32"},"break_finish":{"type":"integer","format":"int32"},"break_length":{"type":"integer","format":"int32"},"status":{"type":"string","enum":["PENDING","APPROVED"]},"department_id":{"type":"integer","format":"int32"},"tag":{"type":"string"},"tag_id":{"type":"integer","format":"int32"},"metadata":{"type":"string"},"allowances":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"value":{"type":"number","format":"float"}},"required":["id","value"]}},"activity_code_id":{"type":"integer","format":"int32"},"activities":{"type":"array","items":{"type":"object","properties":{"start":{"type":"integer","format":"int32"},"finish":{"type":"integer","format":"int32"},"activity_code_id":{"type":"integer","format":"int32"}}}}},"description":"Update Shift"},"ApplicableAllowance":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the allowance."},"name":{"type":"string","example":"Hazardous Environment Allowance","description":"The name of the allowance."},"export_name":{"type":"string","example":"HE Allowance","description":"The export name of the allowance."},"current_value":{"type":"number","format":"float","example":0.5,"description":"How much of this allowance is currently applied to the shift."}},"required":["id","name","export_name","current_value"],"description":"ApplicableAllowance model"},"postV2ShiftsIdFeedback":{"type":"object","properties":{"anonymous":{"type":"boolean"},"choices":{"type":"array","items":{"type":"object","properties":{"option_id":{"type":"integer","format":"int32"},"is_good":{"type":"boolean"}},"required":["option_id","is_good"]}},"comment":{"type":"string"}},"required":["choices"],"description":"Create Shift Feedback"},"postV2ShiftsShiftIdBreaks":{"type":"object","properties":{"start":{"type":"integer","format":"int32"},"finish":{"type":"integer","format":"int32"},"length":{"type":"integer","format":"int32"},"paid":{"type":"boolean"}},"description":"Create Shift Break"},"putV2ShiftsShiftIdBreaksId":{"type":"object","properties":{"start":{"type":"integer","format":"int32"},"finish":{"type":"integer","format":"int32"},"length":{"type":"integer","format":"int32"},"paid":{"type":"boolean"}},"description":"Update Shift Break"},"ShiftBreakVersion":{"type":"object","properties":{"version_id":{"type":"integer","format":"int32","example":12345},"time":{"type":"integer","format":"int32","example":1456988518},"event":{"type":"string","example":"update","description":"What happened to the record. Usually `create`, `update` or `destroy`, though some resources return a longer phrase such as `update shift break`."},"author":{"allOf":[{"$ref":"#/components/schemas/VersionAuthor"}],"description":"The author of the change."},"item_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the record this version belongs to."},"item_type":{"type":"string","description":"The type of record this version belongs to, such as `Shift` or `Schedule`."},"changes":{"type":"array","items":{"$ref":"#/components/schemas/ShiftBreakVersionChange"},"description":"The fields that changed in this version."}},"required":["version_id","time","event","author","item_id","item_type","changes"],"description":"ShiftBreakVersion model"},"ShiftBreakVersionChange":{"type":"object","properties":{"field":{"type":"string","example":"break_finish"},"previous":{"type":"integer","format":"int32","example":1456988518,"description":"The value before the change, as a Unix timestamp."},"updated":{"type":"integer","format":"int32","example":1456988518,"description":"The value after the change, as a Unix timestamp."}},"required":["field","previous","updated"]},"RosteredDayOff":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the record."},"user_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the user the record is for."},"daily_schedule_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the daily schedule (the roster's day) the record sits on."},"start":{"type":"integer","format":"int32","example":1456902000,"description":"When the record starts, in unix time."},"finish":{"type":"integer","format":"int32","example":1456916400,"description":"When the record finishes, in unix time."},"department_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the department the record is assigned to."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the record was last updated, in unix time."}},"required":["id","user_id","daily_schedule_id","start","finish","department_id","updated_at"],"description":"RosteredDayOff model"},"postV2RosteredDaysOff":{"type":"object","properties":{"user_id":{"type":"integer","format":"int32"},"date":{"type":"string","format":"date"},"start":{"type":"integer","format":"int32"},"finish":{"type":"integer","format":"int32"},"department_id":{"type":"integer","format":"int32"}},"required":["user_id","date","start","finish"],"description":"Create Rostered Day Off"},"Sleepover":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the record."},"user_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the user the record is for."},"daily_schedule_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the daily schedule (the roster's day) the record sits on."},"start":{"type":"integer","format":"int32","example":1456902000,"description":"When the record starts, in unix time."},"finish":{"type":"integer","format":"int32","example":1456916400,"description":"When the record finishes, in unix time."},"department_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the department the record is assigned to."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the record was last updated, in unix time."}},"required":["id","user_id","daily_schedule_id","start","finish","department_id","updated_at"],"description":"Sleepover model"},"postV2Sleepovers":{"type":"object","properties":{"user_id":{"type":"integer","format":"int32"},"date":{"type":"string","format":"date"},"start":{"type":"integer","format":"int32"},"finish":{"type":"integer","format":"int32"},"department_id":{"type":"integer","format":"int32"}},"required":["user_id","date","start","finish"],"description":"Create Sleepover"},"OnCall":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the record."},"user_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the user the record is for."},"daily_schedule_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the daily schedule (the roster's day) the record sits on."},"start":{"type":"integer","format":"int32","example":1456902000,"description":"When the record starts, in unix time."},"finish":{"type":"integer","format":"int32","example":1456916400,"description":"When the record finishes, in unix time."},"department_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the department the record is assigned to."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the record was last updated, in unix time."}},"required":["id","user_id","daily_schedule_id","start","finish","department_id","updated_at"],"description":"OnCall model"},"postV2OnCalls":{"type":"object","properties":{"user_id":{"type":"integer","format":"int32"},"date":{"type":"string","format":"date"},"start":{"type":"integer","format":"int32"},"finish":{"type":"integer","format":"int32"},"department_id":{"type":"integer","format":"int32"}},"required":["user_id","date","start","finish"],"description":"Create On Call"},"User":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the user."},"name":{"type":"string","example":"Lenny Leonard","description":"The user's preferred name."},"legal_first_name":{"type":"string","example":"Lenny","description":"The user's first name."},"legal_middle_names":{"type":"string","example":"James","description":"The user's middle name/s."},"legal_last_name":{"type":"string","example":"Leonard","description":"The user's last name."},"date_of_birth":{"type":"string","example":"1955-05-12","description":"The user's date of birth."},"employment_start_date":{"type":"string","example":"1989-12-17","description":"The user's employment start date."},"employment_end_date":{"type":"string","example":"1995-07-12","description":"The users employment end date."},"employee_id":{"type":"string","example":"LL1","description":"The user's employee id, used for external systems."},"passcode":{"type":"string","example":"0456","description":"The user's system passcode (used for clocking in and out)."},"user_levels":{"type":"array","items":{"type":"string"},"example":["organisation_admin"],"description":"The user's permission levels."},"platform_role_ids":{"type":"array","items":{"type":"integer","format":"int32"},"example":[12345,12346],"description":"IDs of the user's roles (see Access \u0026 Roles)."},"department_ids":{"type":"array","items":{"type":"integer","format":"int32"},"example":[12345,12346],"description":"The department (team) ids that the user is a member of."},"preferred_hours":{"type":"number","format":"float","example":20,"description":"The preferred number of hours to be rostered each week."},"award_template_id":{"type":"integer","format":"int32","example":12345,"description":"The ID of the award template the user is on."},"award_template_organisation_id":{"type":"integer","format":"int32","example":12345,"description":"The internal ID of the award template the user is on."},"award_tag_ids":{"type":"array","items":{"type":"integer","format":"int32"},"example":[12345,12346],"description":"The award tag ids that apply to the user."},"report_department_id":{"type":"integer","format":"int32","example":12345,"description":"The user's default team."},"managed_department_ids":{"type":"array","items":{"type":"integer","format":"int32"},"example":[12345,12346],"description":"The department ids that this user manages."},"active":{"type":"boolean","example":true,"description":"Whether the user is active in the system."},"payroll_cessation_code":{"type":"string","example":"voluntary_cessation","description":"The payroll cessation code set when the user's employment has ended, otherwise null."},"enable_login":{"type":"boolean","example":true,"description":"Can the user login?"},"can_see_costs":{"type":"boolean","example":false,"description":"Can the user see costing data?"},"email":{"type":"string","example":"lenny.leonard@springfieldpowerplant.com","description":"The user's email."},"payslip_email":{"type":"string","example":"lenny.personal@example.com","description":"The user's payslip email address. Null if not explicitly set."},"photo":{"type":"string","example":"http://vignette1.wikia.nocookie.net/family-guyamerican-dadthe-simpsons-and-futurama/images/f/ff/250px-Lenny_Leonard.png","description":"An avatar for the user."},"phone":{"type":"string","example":"0400 000 000","description":"Phone number for the user."},"normalised_phone":{"type":"string","example":"+61400000000","description":"Phone number for user with international dialing code."},"salary":{"type":"number","format":"float","example":1234.12,"description":"The weekly salary of the user, if `show_wages=true` parameter is set."},"hourly_rate":{"type":"number","format":"float","example":32.47,"description":"The hourly rate of the user, if `show_wages=true` parameter is set, will not show if the salary exists."},"time_zone":{"type":"string","example":"Australia/Brisbane","description":"The user's time zone."},"utc_offset":{"type":"integer","format":"int32","example":36000,"description":"The user's time zone's UTC offset."},"contracted_weekly_hours":{"type":"number","format":"float","example":38.0,"description":"The number of hours per week a user must work. Working under or over this number of hours may incur overtime or additional costs."},"part_time_fixed_hours":{"type":"number","format":"float","example":20,"description":"Deprecated. This value will always be the same as contracted_weekly_hours."},"expected_hours_in_pay_period":{"type":"number","format":"float","example":38,"description":"Readonly: for salaried staff, defines expected number of hours worked per pay period."},"days_overtime_averaged_over":{"type":"number","format":"float","example":7,"description":"Date range (weekly, fortnightly, or 4-weekly) over which overtime calculations should run."},"overtime_calculated_over_period_start":{"type":"string","example":"2016-09-12","description":"Date from which overtime averaging periods should commence."},"super_fund":{"allOf":[{"$ref":"#/components/schemas/UserSuperFund"}],"description":"Information about the employees super fund."},"super_fund_membership":{"allOf":[{"$ref":"#/components/schemas/UserSuperFundMembership"}],"description":"Information about the employees super fund membership."},"bank_details":{"allOf":[{"$ref":"#/components/schemas/BankDetails"}],"description":"The bank details of the employee."},"address":{"allOf":[{"$ref":"#/components/schemas/Address"}],"description":"The user's address."},"tax_declaration":{"allOf":[{"$ref":"#/components/schemas/UserTaxDeclaration"}],"description":"The tax declaration information of the employee."},"onboarding_status":{"type":"string","example":"not_applicable","description":"The status of the employee onboarding progress. One of: `not_applicable`, `pending`, `invited`, `in_progress`, `completed`, `invitation_failed`."},"kiwi_saver":{"allOf":[{"$ref":"#/components/schemas/UserKiwiSaver"}],"description":"NZ only. The employee's KiwiSaver settings. Only present for NZ employees who have KiwiSaver configured."},"qualifications":{"type":"array","items":{"$ref":"#/components/schemas/UserQualification"},"description":"Information about qualifications the user holds, if Qualifications are enabled."},"regular_hours":{"allOf":[{"$ref":"#/components/schemas/RegularHours"}],"description":"Information about the employees regular hours of work."},"minimum_base_hours":{"type":"number","format":"float","example":38,"description":"The minimum base hours over the regular hours template, only returned when `show_regular_hours` is set."},"created_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the user's Tanda profile was created."},"record_id":{"type":"integer","format":"int32","example":12345,"description":"The record ID, for use with Platform endpoints."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the user was last updated."},"next_pay_group_id":{"type":"integer","format":"int32","example":12345,"description":"The ID for the pay group of the user's next timesheet."},"last_synced_mobile_app":{"type":"integer","format":"int32","example":1456988518,"description":"Read only: when the user last opened the mobile app."},"automatic_break_rule_set_id":{"type":"integer","format":"int32","example":12345,"description":"Read only: the ID for the user's automatic break rule set."},"temporary_employee_type":{"type":"string","example":"no_agency","description":"Type of a temporary employee user. This field only exists if Enable Temporary Staff setting is turned on. One of: `no_agency`, `limber`."},"position_title":{"type":"string","example":"Bartender","description":"Read only."},"position_template":{"type":"string","example":"Bartender (Hourly)"},"ssn":{"type":"string","example":"123456789","description":"Read only."},"emergency_contacts":{"type":"array","items":{"$ref":"#/components/schemas/EmergencyContact"},"description":"Read only."},"employment_basis":{"type":"string","example":"full_time","description":"The employee's employment basis from their tax declaration; only returned when `show_financial_details` is set."},"answered_questions":{"type":"array","items":{"$ref":"#/components/schemas/UserAnsweredQuestion"},"description":"The employee's answers to the organisation's onboarding questions; only returned when `show_answers` is set."},"custom_fields":{"type":"object","description":"The employee's HRIS custom field values, keyed by the organisation's own field names; only returned to users who can read sensitive data and when the organisation has active custom fields."},"platform":{"allOf":[{"$ref":"#/components/schemas/PlatformFieldValue"}],"description":"The employee's Platform field values; only returned when `platform` is set and the token has the platform scope."},"_qualifications_dev_warning":{"type":"string","description":"Present instead of `qualifications` when the organisation has too many qualifications to return inline; pass `show_qualifications=true` to retrieve them."}},"required":["id","name","legal_first_name","legal_middle_names","legal_last_name","date_of_birth","employment_start_date","employment_end_date","employee_id","passcode","user_levels","platform_role_ids","department_ids","preferred_hours","award_template_id","award_template_organisation_id","award_tag_ids","report_department_id","managed_department_ids","active","payroll_cessation_code","enable_login","can_see_costs","email","payslip_email","photo","phone","normalised_phone","time_zone","utc_offset","contracted_weekly_hours","part_time_fixed_hours","created_at","record_id","updated_at","next_pay_group_id","last_synced_mobile_app","automatic_break_rule_set_id","position_title","position_template","emergency_contacts"],"description":"User model"},"UserSuperFund":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The unique ID of the employees fund."},"fund_name":{"type":"string","example":"FUND NAME","description":"The name of the fund."},"product_name":{"type":"string","example":"FUND PRODUCT","description":"The name of the fund product."},"smsf":{"type":"boolean","example":true,"description":"Is the fund a self managed fund?"},"abn":{"type":"string","example":"123456789","description":"The number of the fund."},"usi":{"type":"string","example":"40022701955001","description":"The unique superannuation identifier of a regulated (non self managed) fund."},"bank_details":{"allOf":[{"$ref":"#/components/schemas/BankDetails"}],"description":"The bank details of a self managed fund, null if none are set."},"electronic_service_address":{"type":"string","example":"SMSFESA123","description":"The electronic service address of a self managed fund."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the fund was last updated."}},"required":["id","fund_name","product_name","smsf","abn","updated_at"]},"BankDetails":{"type":"object","properties":{"account_name":{"type":"string","example":"Test Team Member","description":"The account name of the employees bank account."},"account_number":{"type":"string","example":"12345678","description":"The account number of the employees bank account."},"bsb":{"type":"string","example":"014018","description":"The bsb of the employees bank account. Australian organisations only, and null for organisations banking by IBAN."},"bank_name":{"type":"string","example":"Barclays","description":"The name of the employees bank. Always an empty string for Australian organisations, and absent for New Zealand ones."},"particular":{"type":"string","example":"Wages","description":"The particular shown on the payment. New Zealand organisations only."},"code":{"type":"string","example":"PAY","description":"The code shown on the payment. New Zealand organisations only."},"iban":{"type":"string","example":"GB33BUKB20201555555555","description":"The international bank account number. Organisations banking by IBAN only."},"bic":{"type":"string","example":"BUKBGB22","description":"The bank identifier code. Organisations banking by IBAN only."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the bank account was last updated."}},"required":["account_name","account_number","updated_at"]},"UserSuperFundMembership":{"type":"object","properties":{"super_contribution_type":{"type":"string","example":"arpa","description":"The type of the employees super contribution."},"member_number":{"type":"string","example":"123ACB","description":"The membership number of the employees super fund."},"occupational_rating":{"type":"string","example":"A1","description":"The occupational rating of the employees super fund."},"super_fund_id":{"type":"integer","format":"int32","example":12345,"description":"The record ID of the employees super fund."},"employer_preferred":{"type":"string","example":"not_applicable","description":"Indication of an employers preferred super fund."},"employer_default":{"type":"string","example":"not_applicable","description":"Indication of an employers default super fund."},"employer_generic":{"type":"string","example":"not_applicable","description":"Indication of an employers generic super fund."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the super fund membership was last updated."}},"required":["super_contribution_type","member_number","occupational_rating","super_fund_id","employer_preferred","employer_default","employer_generic","updated_at"]},"Address":{"type":"object","properties":{"street_line_one":{"type":"string","example":"742 Evergreen Terrace"},"street_line_two":{"type":"string","description":"Apartment, Suite, etc."},"city":{"type":"string","example":"Springfield"},"state":{"type":"string","example":"Oregon"},"country":{"type":"string","example":"United States of America"},"postcode":{"type":"string","example":"97475"}},"required":["street_line_one","street_line_two","city","state","country","postcode"]},"UserTaxDeclaration":{"type":"object","properties":{"previous_family_name":{"type":"string","example":"Smith","description":"The previous family name of the employee."},"australian_tax_resident":{"type":"boolean","example":true,"description":"Is the user an Australian resident for tax purposes?"},"australian_tax_residency_status":{"type":"string","example":"resident","description":"The normalised Australian tax residency status."},"tax_free_threshold":{"type":"boolean","example":true,"description":"Is the employee under the tax free threshold?"},"senior_tax_offset":{"type":"boolean","example":false,"description":"Can the employee claim a senior tax offset?"},"zone_overseas_carer":{"type":"boolean","example":false,"description":"Can the employee claim a zone or overseas tax offset?"},"student_loan":{"type":"boolean","example":true,"description":"Does the employee have a student loan?"},"financial_supplement_debt":{"type":"boolean","example":true,"description":"Does the employee have a financial supplement debt?"},"tax_code":{"type":"string","example":"1150L","description":"The employee's tax code for tax services."},"uk_tax_year_status":{"type":"string","example":"first_job","description":"For UK residents, the stage of the employee's career."},"uk_national_insurance_code":{"type":"string","example":"A","description":"For UK residents, the National Insurance category letter (e.g., A, B, C, D, E, F, H, I, J, K, L, M, N, S, V, X, Z)."},"employment_basis":{"type":"string","example":"full_time","description":"The employment type the employee has specified on their TFN declaration."},"tax_scale_type":{"type":"string","example":"regular","description":"The tax scale type used for calculations."},"income_type":{"type":"string","example":"salary_and_wages","description":"The type of income for tax purposes."},"employment_type":{"type":"string","example":"employee","description":"The type of employment."},"senior_marital_status":{"type":"string","example":"single","description":"Marital status for senior tax offset purposes."},"home_country":{"type":"string","example":"France","description":"The employee's home country (required for working holiday makers)."},"nz_tax_code":{"type":"string","example":"M","description":"For NZ residents, the tax code."},"nz_esct_rate":{"type":"string","example":"17.5","description":"For NZ residents, the ESCT rate."},"nz_source_of_income":{"type":"string","example":"primary_income","description":"For NZ residents, the source of income."},"nz_varied_tax_rate":{"type":"number","format":"float","example":25.0,"description":"For NZ residents, the varied tax rate (required for WT, STC, STC_SL tax codes)."},"singapore_tax_detail":{"allOf":[{"$ref":"#/components/schemas/SingaporeTaxDetail"}],"description":"Singapore-specific tax information. **Only available for Singapore organisations**."},"tax_file_number":{"type":"string","example":"123456789","description":"The employee's tax file number, only returned when the `include_tax_file_number` param is set."},"national_insurance_number":{"type":"string","example":"QQ123456C","description":"For UK residents, the National Insurance number, only returned when the `include_national_insurance_number` param is set."},"italian_fiscal_code":{"type":"string","example":"RSSMRA80A01H501U","description":"The employee's Italian Fiscal Code (Codice Fiscale). Returns with the `financial` scope, to the employee themselves or anyone who can read their sensitive data. **Only available for Italian organisations**."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the tax declaration was last updated."}},"required":["previous_family_name","australian_tax_resident","australian_tax_residency_status","tax_free_threshold","senior_tax_offset","zone_overseas_carer","student_loan","financial_supplement_debt","tax_code","uk_tax_year_status","employment_basis","tax_scale_type","income_type","employment_type","senior_marital_status","home_country","updated_at"]},"SingaporeTaxDetail":{"type":"object","properties":{"legal_status":{"type":"string","example":"singapore_citizen","description":"The legal status in Singapore. One of: `singapore_citizen`, `permanent_resident`, `work_permit`, `e_pass`, `s_pass`, `student_pass`."},"nationality":{"type":"string","example":"singaporean","description":"The nationality. One of: `singaporean`, `malaysian`, `indian`, `filipino`, `indonesian`, `chinese`, `vietnamese`, `others`."},"race":{"type":"string","example":"chinese","description":"The race. One of: `chinese`, `malay`, `indian`, `eurasian`, `filipino`, `vietnamese`, `others`."},"religion":{"type":"string","example":"buddhism","description":"The religion. One of: `buddhism`, `christianity`, `catholicism`, `islam`, `hinduism`, `free_thinker`, `atheism`."},"marital_status":{"type":"string","example":"single","description":"The marital status. One of: `single`, `married`, `other`."},"issue_date":{"type":"string","example":"2023-01-15","description":"The issue date for identification document. Required for permanent residents and foreign worker passes."},"expiry_date":{"type":"string","example":"2025-01-15","description":"The expiry date for identification document. Required for foreign worker passes."}},"required":["legal_status","nationality","race","religion","marital_status","issue_date","expiry_date"]},"UserKiwiSaver":{"type":"object","properties":{"status":{"type":"string","example":"active_member","description":"The employee's KiwiSaver enrolment status. One of: `active_member`, `automatically_enrolled`, `opted_in`, `not_eligible`, `opted_out`, `employed_less_than_28_days`, `not_required_to_be_automatically_enrolled`."},"ird_status_code":{"type":"string","example":"AK","description":"The IRD status code derived from the status (e.g. AK, AE, OK, NK); null when no code applies."},"employee_deduction_rate":{"type":"number","format":"float","example":3.0,"description":"The employee's contribution rate as a percentage of gross pay."},"employer_deduction_rate":{"type":"number","format":"float","example":3.5,"description":"The employer's contribution rate as a percentage of gross pay; may be null."},"savings_suspension":{"type":"boolean","example":false,"description":"Whether the employee is currently on a savings suspension."},"opted_out_date":{"type":"string","example":"2024-01-15","description":"The date the employee opted out, if applicable; null otherwise."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the KiwiSaver record was last updated."}},"required":["status","ird_status_code","employee_deduction_rate","employer_deduction_rate","savings_suspension","opted_out_date","updated_at"]},"UserQualification":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345},"qualification_id":{"type":"integer","format":"int32","example":12345},"enabled":{"type":"boolean","example":true},"training_provider_name":{"type":"string","example":"Acme Training Ltd"},"state_of_completion":{"type":"string","example":"QLD"},"license_number":{"type":"string","example":"ABC123"},"expires":{"type":"string","example":"2012-10-20"},"in_training":{"type":"boolean","example":false},"date_ranges":{"type":"object","description":"The date ranges over which the qualification applies, keyed by position (`\"1\"`, `\"2\"`, …), each holding a `start_date` and an `end_date`."},"attained":{"type":"string","example":"2012-10-20","description":"The date the qualification was attained (ISO 8601), null if not set."},"image":{"type":"string","description":"URL of the most recent attachment for the qualification, null if none."},"platform_records":{"type":"object","description":"Platform field values associated with the qualification, keyed by field name."}},"required":["id","qualification_id","enabled","training_provider_name","state_of_completion","license_number","expires","in_training","date_ranges","attained","image","platform_records"]},"RegularHours":{"type":"object","properties":{"start_date":{"type":"string","example":"2021-01-01","description":"The anchor date of the regular hours."},"schedules":{"type":"array","items":{"$ref":"#/components/schemas/RegularHoursSchedule"},"description":"The work schedules that make up the regular hours."},"sleepovers":{"type":"array","items":{"$ref":"#/components/schemas/RegularHoursPeriod"},"description":"Sleepover periods within the regular hours."},"on_calls":{"type":"array","items":{"$ref":"#/components/schemas/RegularHoursPeriod"},"description":"On call periods within the regular hours."},"rostered_days_off":{"type":"array","items":{"$ref":"#/components/schemas/RegularHoursRosteredDayOff"},"description":"Rostered days off within the regular hours."}},"required":["start_date","schedules","sleepovers","on_calls","rostered_days_off"]},"RegularHoursSchedule":{"type":"object","properties":{"week":{"type":"integer","format":"int32","example":1,"description":"Which week does the schedule fall in."},"day":{"type":"string","example":"Monday","description":"What day is the schedule for."},"start":{"type":"string","example":"09:00","description":"What time does the schedule start."},"end":{"type":"string","example":"17:00","description":"What time does the schedule finish."},"breaks":{"type":"string","example":"12:00-13:00","description":"What breaks apply to this schedule."},"department_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the department the schedule is for."}},"required":["week","day","start","end","breaks","department_id"]},"RegularHoursPeriod":{"type":"object","properties":{"week":{"type":"integer","format":"int32","example":1,"description":"Which week does the period fall in."},"day":{"type":"string","example":"Tuesday","description":"What day is the period for."},"start":{"type":"string","example":"18:00","description":"What time does the period start."},"end":{"type":"string","example":"06:00","description":"What time does the period finish."},"department_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the department the period is for."}},"required":["week","day","start","end","department_id"]},"RegularHoursRosteredDayOff":{"type":"object","properties":{"week":{"type":"integer","format":"int32","example":1,"description":"Which week does the rostered day off fall in."},"day":{"type":"string","example":"Wednesday","description":"What day is the rostered day off for."},"start":{"type":"string","example":"00:00","description":"What time does the rostered day off start."},"end":{"type":"string","example":"00:00","description":"What time does the rostered day off finish."},"department_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the department the rostered day off is for."}},"required":["week","day","start","end","department_id"]},"EmergencyContact":{"type":"object","properties":{"name":{"type":"string","example":"Marge Simpson","description":"The name of the emergency contact."},"relationship":{"type":"string","example":"Wife","description":"The emergency contact's relationship to the user."},"phone":{"type":"string","example":"0400 000 000","description":"The phone number of the emergency contact."}},"required":["name","relationship","phone"]},"UserAnsweredQuestion":{"type":"object","properties":{"question":{"type":"string","example":"What size shirt do you wear?","description":"The onboarding question the organisation asked."},"answer":{"type":"string","example":"Medium","description":"The employee's answer to it."}},"required":["question","answer"]},"postV2Users":{"type":"object","properties":{"skip_validation":{"type":"boolean","description":"Skip the email-in-use validation when saving."},"name":{"type":"string"},"legal_first_name":{"type":"string"},"legal_middle_names":{"type":"string"},"legal_last_name":{"type":"string"},"employee_id":{"type":"string"},"passcode":{"type":"string"},"phone":{"type":"string"},"date_of_birth":{"type":"string","format":"date"},"employment_start_date":{"type":"string","format":"date"},"email":{"type":"string"},"preferred_hours":{"type":"number","format":"float"},"contracted_weekly_hours":{"type":"number","format":"float"},"contracted_weekly_days":{"type":"number","format":"float"},"part_time_fixed_hours":{"type":"number","format":"float"},"days_overtime_averaged_over":{"type":"integer","format":"int32"},"overtime_calculated_over_period_start":{"type":"string","format":"date"},"award_tag_ids":{"type":"array","items":{"type":"integer","format":"int32"}},"department_ids":{"type":"array","items":{"type":"integer","format":"int32"}},"report_department_id":{"type":"integer","format":"int32"},"managed_department_ids":{"type":"array","items":{"type":"integer","format":"int32"}},"can_see_costs":{"type":"boolean"},"temporary_employee_type":{"type":"string"},"payroll_cessation_code":{"type":"string"},"user_levels":{"type":"array","items":{"type":"string"}},"platform_role_ids":{"type":"array","items":{"type":"integer","format":"int32"}},"hourly_rate":{"type":"number","format":"float"},"yearly_salary":{"type":"number","format":"float"},"position_template_name":{"type":"string"},"award_template_id":{"type":"integer","format":"int32"},"award_template_organisation_id":{"type":"integer","format":"int32"},"next_pay_group_id":{"type":"integer","format":"int32"},"address":{"type":"object","properties":{"street_line_one":{"type":"string"},"street_line_two":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"postcode":{"type":"string"}}},"tax_declaration":{"type":"object","properties":{"previous_family_name":{"type":"string"},"australian_tax_resident":{"type":"boolean"},"australian_tax_residency_status":{"type":"string"},"tax_free_threshold":{"type":"boolean"},"senior_tax_offset":{"type":"boolean"},"zone_overseas_carer":{"type":"boolean"},"financial_supplement_debt":{"type":"boolean"},"student_loan":{"type":"boolean"},"tax_code":{"type":"string"},"student_loan_plans":{"type":"array","items":{"type":"string"}},"uk_tax_year_status":{"type":"string"},"tax_file_number":{"type":"string"},"employment_basis":{"type":"string","enum":["full_time","part_time","casual"]},"tax_scale_type":{"type":"string"},"income_type":{"type":"string"},"home_country":{"type":"string"},"employment_type":{"type":"string"},"senior_marital_status":{"type":"string"},"nz_tax_code":{"type":"string"},"nz_esct_rate":{"type":"string"},"nz_source_of_income":{"type":"string"},"nz_varied_tax_rate":{"type":"number","format":"double"},"singapore_tax_detail":{"type":"object","properties":{"legal_status":{"type":"string","enum":["singapore_citizen","permanent_resident","work_permit","e_pass","s_pass","student_pass"]},"nationality":{"type":"string","enum":["singaporean","malaysian","indian","filipino","indonesian","chinese","vietnamese","others"]},"race":{"type":"string","enum":["chinese","malay","indian","eurasian","filipino","vietnamese","others"]},"religion":{"type":"string","enum":["buddhism","christianity","catholicism","islam","hinduism","free_thinker","atheism"]},"marital_status":{"type":"string","enum":["single","married","other"]},"issue_date":{"type":"string"},"expiry_date":{"type":"string"}},"required":["legal_status","nationality","race","religion","marital_status"]}}},"bank_details":{"type":"object","properties":{"bsb":{"type":"string"},"account_number":{"type":"string"},"bank_name":{"type":"string"},"account_name":{"type":"string"},"particular":{"type":"string"},"code":{"type":"string"}},"required":["account_number","account_name"]},"super_fund_membership":{"type":"object","properties":{"request":{"type":"object","properties":{"employer_default":{"type":"boolean"},"ioof":{"type":"boolean"},"own_choice":{"type":"boolean"},"elevate":{"type":"boolean"}},"required":["employer_default","ioof","own_choice","elevate"]},"config":{"type":"object","properties":{"super_contribution_type":{"type":"string"},"member_number":{"type":"string"},"occupational_rating":{"type":"string"},"super_fund_id":{"type":"integer","format":"int32"},"usi":{"type":"string"},"super_fund":{"type":"object","properties":{"fund_name":{"type":"string"},"abn":{"type":"string"},"electronic_service_address":{"type":"string"},"bank_details":{"type":"object","properties":{"bsb":{"type":"string"},"account_number":{"type":"string"},"account_name":{"type":"string"},"bank_name":{"type":"string"}},"required":["bsb","account_number","account_name"]}},"required":["fund_name","abn","electronic_service_address","bank_details"]}}}},"required":["request","config"]},"regular_hours":{"type":"object","properties":{"start_date":{"type":"string","format":"date"},"schedules":{"type":"array","items":{"type":"object","properties":{"week":{"type":"integer","format":"int32"},"day":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"department_id":{"type":"integer","format":"int32"},"breaks":{"type":"string"}},"required":["week","day","start","end"]}},"sleepovers":{"type":"array","items":{"type":"object","properties":{"week":{"type":"integer","format":"int32"},"day":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"department_id":{"type":"integer","format":"int32"}},"required":["week","day","start","end"]}},"on_calls":{"type":"array","items":{"type":"object","properties":{"week":{"type":"integer","format":"int32"},"day":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"department_id":{"type":"integer","format":"int32"}},"required":["week","day","start","end"]}},"rostered_days_off":{"type":"array","items":{"type":"object","properties":{"week":{"type":"integer","format":"int32"},"day":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"department_id":{"type":"integer","format":"int32"}},"required":["week","day","start","end"]}}},"required":["start_date","schedules"]},"custom_fields":{"type":"object"}},"required":["name"],"description":"Create User"},"CurrentUser":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345},"name":{"type":"string","example":"Lenny Leonard"},"legal_first_name":{"type":"string","example":"Lenny"},"legal_middle_names":{"type":"string","example":"James"},"legal_last_name":{"type":"string","example":"Leonard"},"email":{"type":"string","example":"lenny.leonard@springfieldpowerplant.com","description":"The current user's login email."},"phone":{"type":"string","example":"0400 000 000"},"address":{"type":"string","example":"742 Evergreen Terrace, Springfield QLD 4305","description":"The current user's address as a human-readable string."},"date_of_birth":{"type":"string","example":"12/05/1955","description":"The current user's date of birth (dd/mm/YYYY), empty string if not set."},"photo":{"type":"string","description":"An avatar for the current user, if present."},"time_zone":{"type":"string","example":"Australia/Brisbane"},"utc_offset":{"type":"integer","format":"int32","example":36000},"organisation":{"type":"string","example":"Moe's Tavern","description":"The current user's organisation (company) name."},"organisation_id":{"type":"integer","format":"int32","example":12345},"permissions":{"type":"array","items":{"type":"string"},"example":["organisation_admin"],"description":"The current user's native permission levels."},"platform_role_ids":{"type":"array","items":{"type":"integer","format":"int32"},"example":[12345,12346],"description":"IDs of the user's roles (see Access \u0026 Roles)."},"valid_subscription":{"type":"boolean","example":true,"description":"If true, the user will be able to access other API endpoints."},"locale":{"type":"string","example":"en"},"country":{"type":"string","example":"AU"},"emergency_contact_name":{"type":"string","description":"Deprecated. The first emergency contact's name; see the user's `emergency_contacts` instead."},"emergency_contact_phone":{"type":"string","description":"Deprecated. The first emergency contact's phone."},"emergency_contact_relationship":{"type":"string","description":"Deprecated. The first emergency contact's relationship."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the underlying auth user was last updated."},"user_ids":{"type":"array","items":{"type":"integer","format":"int32"},"example":[12345,12346],"description":"User IDs associated with this user; more than one when the user has profiles at several organisations."},"organisations":{"type":"array","items":{"$ref":"#/components/schemas/CurrentUserOrganisation"},"description":"Organisations at which this user has profiles."}},"required":["id","name","legal_first_name","legal_middle_names","legal_last_name","email","phone","address","date_of_birth","photo","time_zone","utc_offset","organisation","organisation_id","permissions","platform_role_ids","valid_subscription","locale","country","emergency_contact_name","emergency_contact_phone","emergency_contact_relationship","updated_at","user_ids","organisations"],"description":"CurrentUser model"},"CurrentUserOrganisation":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345},"name":{"type":"string","example":"Moe's Tavern"},"locale":{"type":"string","example":"en"},"country":{"type":"string","example":"AU"},"user_id":{"type":"integer","format":"int32","example":12345,"description":"The user's id at this organisation."}},"required":["id","name","locale","country","user_id"]},"postV2UsersOnboarding":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"custom_message":{"type":"string"}},"required":["name","email"],"description":"Invite User for Onboarding"},"postV2UsersCreateBulk":{"type":"object","properties":{"users":{"type":"array","items":{"type":"object","properties":{"skip_validation":{"type":"boolean","description":"Skip the email-in-use validation when saving."},"name":{"type":"string"},"legal_first_name":{"type":"string"},"legal_middle_names":{"type":"string"},"legal_last_name":{"type":"string"},"employee_id":{"type":"string"},"passcode":{"type":"string"},"phone":{"type":"string"},"date_of_birth":{"type":"string","format":"date"},"employment_start_date":{"type":"string","format":"date"},"email":{"type":"string"},"preferred_hours":{"type":"number","format":"float"},"contracted_weekly_hours":{"type":"number","format":"float"},"contracted_weekly_days":{"type":"number","format":"float"},"part_time_fixed_hours":{"type":"number","format":"float"},"days_overtime_averaged_over":{"type":"integer","format":"int32"},"overtime_calculated_over_period_start":{"type":"string","format":"date"},"award_tag_ids":{"type":"array","items":{"type":"integer","format":"int32"}},"department_ids":{"type":"array","items":{"type":"integer","format":"int32"}},"report_department_id":{"type":"integer","format":"int32"},"managed_department_ids":{"type":"array","items":{"type":"integer","format":"int32"}},"can_see_costs":{"type":"boolean"},"temporary_employee_type":{"type":"string"},"payroll_cessation_code":{"type":"string"},"user_levels":{"type":"array","items":{"type":"string"}},"platform_role_ids":{"type":"array","items":{"type":"integer","format":"int32"}},"hourly_rate":{"type":"number","format":"float"},"yearly_salary":{"type":"number","format":"float"},"position_template_name":{"type":"string"},"award_template_id":{"type":"integer","format":"int32"},"award_template_organisation_id":{"type":"integer","format":"int32"},"next_pay_group_id":{"type":"integer","format":"int32"},"address":{"type":"object","properties":{"street_line_one":{"type":"string"},"street_line_two":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"postcode":{"type":"string"}}},"tax_declaration":{"type":"object","properties":{"previous_family_name":{"type":"string"},"australian_tax_resident":{"type":"boolean"},"australian_tax_residency_status":{"type":"string"},"tax_free_threshold":{"type":"boolean"},"senior_tax_offset":{"type":"boolean"},"zone_overseas_carer":{"type":"boolean"},"financial_supplement_debt":{"type":"boolean"},"student_loan":{"type":"boolean"},"tax_code":{"type":"string"},"student_loan_plans":{"type":"array","items":{"type":"string"}},"uk_tax_year_status":{"type":"string"},"tax_file_number":{"type":"string"},"employment_basis":{"type":"string","enum":["full_time","part_time","casual"]},"tax_scale_type":{"type":"string"},"income_type":{"type":"string"},"home_country":{"type":"string"},"employment_type":{"type":"string"},"senior_marital_status":{"type":"string"},"nz_tax_code":{"type":"string"},"nz_esct_rate":{"type":"string"},"nz_source_of_income":{"type":"string"},"nz_varied_tax_rate":{"type":"number","format":"double"},"singapore_tax_detail":{"type":"object","properties":{"legal_status":{"type":"string","enum":["singapore_citizen","permanent_resident","work_permit","e_pass","s_pass","student_pass"]},"nationality":{"type":"string","enum":["singaporean","malaysian","indian","filipino","indonesian","chinese","vietnamese","others"]},"race":{"type":"string","enum":["chinese","malay","indian","eurasian","filipino","vietnamese","others"]},"religion":{"type":"string","enum":["buddhism","christianity","catholicism","islam","hinduism","free_thinker","atheism"]},"marital_status":{"type":"string","enum":["single","married","other"]},"issue_date":{"type":"string"},"expiry_date":{"type":"string"}},"required":["legal_status","nationality","race","religion","marital_status"]}}},"bank_details":{"type":"object","properties":{"bsb":{"type":"string"},"account_number":{"type":"string"},"bank_name":{"type":"string"},"account_name":{"type":"string"},"particular":{"type":"string"},"code":{"type":"string"}},"required":["account_number","account_name"]},"super_fund_membership":{"type":"object","properties":{"request":{"type":"object","properties":{"employer_default":{"type":"boolean"},"ioof":{"type":"boolean"},"own_choice":{"type":"boolean"},"elevate":{"type":"boolean"}},"required":["employer_default","ioof","own_choice","elevate"]},"config":{"type":"object","properties":{"super_contribution_type":{"type":"string"},"member_number":{"type":"string"},"occupational_rating":{"type":"string"},"super_fund_id":{"type":"integer","format":"int32"},"usi":{"type":"string"},"super_fund":{"type":"object","properties":{"fund_name":{"type":"string"},"abn":{"type":"string"},"electronic_service_address":{"type":"string"},"bank_details":{"type":"object","properties":{"bsb":{"type":"string"},"account_number":{"type":"string"},"account_name":{"type":"string"},"bank_name":{"type":"string"}},"required":["bsb","account_number","account_name"]}},"required":["fund_name","abn","electronic_service_address","bank_details"]}}}},"required":["request","config"]},"regular_hours":{"type":"object","properties":{"start_date":{"type":"string","format":"date"},"schedules":{"type":"array","items":{"type":"object","properties":{"week":{"type":"integer","format":"int32"},"day":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"department_id":{"type":"integer","format":"int32"},"breaks":{"type":"string"}},"required":["week","day","start","end"]}},"sleepovers":{"type":"array","items":{"type":"object","properties":{"week":{"type":"integer","format":"int32"},"day":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"department_id":{"type":"integer","format":"int32"}},"required":["week","day","start","end"]}},"on_calls":{"type":"array","items":{"type":"object","properties":{"week":{"type":"integer","format":"int32"},"day":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"department_id":{"type":"integer","format":"int32"}},"required":["week","day","start","end"]}},"rostered_days_off":{"type":"array","items":{"type":"object","properties":{"week":{"type":"integer","format":"int32"},"day":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"department_id":{"type":"integer","format":"int32"}},"required":["week","day","start","end"]}}},"required":["start_date","schedules"]},"custom_fields":{"type":"object"}},"required":["name"]}}},"required":["users"],"description":"Bulk Create Users"},"putV2UsersUpdateBulk":{"type":"object","properties":{"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"skip_validation":{"type":"boolean","description":"Skip the email-in-use validation when saving."},"name":{"type":"string"},"employee_id":{"type":"string"},"passcode":{"type":"string"},"phone":{"type":"string"},"date_of_birth":{"type":"string","format":"date"},"employment_start_date":{"type":"string","format":"date"},"employment_end_date":{"type":"string","format":"date"},"email":{"type":"string"},"payslip_email":{"type":"string"},"preferred_hours":{"type":"number","format":"float"},"contracted_weekly_hours":{"type":"number","format":"float"},"contracted_weekly_days":{"type":"number","format":"float"},"minimum_base_hours":{"type":"number","format":"float"},"part_time_fixed_hours":{"type":"number","format":"float"},"days_overtime_averaged_over":{"type":"integer","format":"int32"},"overtime_calculated_over_period_start":{"type":"string","format":"date"},"award_tag_ids":{"type":"array","items":{"type":"integer","format":"int32"}},"department_ids":{"type":"array","items":{"type":"integer","format":"int32"}},"report_department_id":{"type":"integer","format":"int32"},"managed_department_ids":{"type":"array","items":{"type":"integer","format":"int32"}},"can_see_costs":{"type":"boolean"},"temporary_employee_type":{"type":"string"},"payroll_cessation_code":{"type":"string"},"user_levels":{"type":"array","items":{"type":"string"}},"platform_role_ids":{"type":"array","items":{"type":"integer","format":"int32"}},"hourly_rate":{"type":"number","format":"float"},"yearly_salary":{"type":"number","format":"float"},"position_template_name":{"type":"string"},"active":{"type":"boolean"},"award_template_id":{"type":"integer","format":"int32"},"award_template_organisation_id":{"type":"integer","format":"int32"},"next_pay_group_id":{"type":"integer","format":"int32"},"address":{"type":"object","properties":{"street_line_one":{"type":"string"},"street_line_two":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"postcode":{"type":"string"}}},"tax_declaration":{"type":"object","properties":{"previous_family_name":{"type":"string"},"australian_tax_resident":{"type":"boolean"},"australian_tax_residency_status":{"type":"string"},"tax_free_threshold":{"type":"boolean"},"senior_tax_offset":{"type":"boolean"},"zone_overseas_carer":{"type":"boolean"},"financial_supplement_debt":{"type":"boolean"},"student_loan":{"type":"boolean"},"tax_code":{"type":"string"},"student_loan_plans":{"type":"array","items":{"type":"string"}},"uk_tax_year_status":{"type":"string"},"tax_file_number":{"type":"string"},"employment_basis":{"type":"string","enum":["full_time","part_time","casual"]},"tax_scale_type":{"type":"string"},"income_type":{"type":"string"},"home_country":{"type":"string"},"employment_type":{"type":"string"},"senior_marital_status":{"type":"string"},"nz_tax_code":{"type":"string"},"nz_esct_rate":{"type":"string"},"nz_source_of_income":{"type":"string"},"nz_varied_tax_rate":{"type":"number","format":"double"},"singapore_tax_detail":{"type":"object","properties":{"legal_status":{"type":"string","enum":["singapore_citizen","permanent_resident","work_permit","e_pass","s_pass","student_pass"]},"nationality":{"type":"string","enum":["singaporean","malaysian","indian","filipino","indonesian","chinese","vietnamese","others"]},"race":{"type":"string","enum":["chinese","malay","indian","eurasian","filipino","vietnamese","others"]},"religion":{"type":"string","enum":["buddhism","christianity","catholicism","islam","hinduism","free_thinker","atheism"]},"marital_status":{"type":"string","enum":["single","married","other"]},"issue_date":{"type":"string"},"expiry_date":{"type":"string"}}}}},"bank_details":{"type":"object","properties":{"bsb":{"type":"string"},"account_number":{"type":"string"},"bank_name":{"type":"string"},"account_name":{"type":"string"},"particular":{"type":"string"},"code":{"type":"string"}}},"super_fund_membership":{"type":"object","properties":{"request":{"type":"object","properties":{"employer_default":{"type":"boolean"},"ioof":{"type":"boolean"},"own_choice":{"type":"boolean"},"elevate":{"type":"boolean"},"qsuper":{"type":"boolean"}},"required":["employer_default","ioof","own_choice"]},"config":{"type":"object","properties":{"super_contribution_type":{"type":"string"},"member_number":{"type":"string"},"occupational_rating":{"type":"string"},"super_fund_id":{"type":"integer","format":"int32"},"usi":{"type":"string"},"super_fund":{"type":"object","properties":{"fund_name":{"type":"string"},"abn":{"type":"string"},"electronic_service_address":{"type":"string"},"bank_details":{"type":"object","properties":{"bsb":{"type":"string"},"account_number":{"type":"string"},"account_name":{"type":"string"},"bank_name":{"type":"string"}},"required":["bsb","account_number","account_name"]}},"required":["fund_name","abn","electronic_service_address","bank_details"]}}}},"required":["request","config"]},"qualifications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"qualification_id":{"type":"integer","format":"int32"},"enabled":{"type":"string"},"training_provider_name":{"type":"string"},"state_of_completion":{"type":"string"},"license_number":{"type":"string"},"expires":{"type":"string","format":"date"},"attained":{"type":"string","format":"date"},"in_training":{"type":"boolean"},"date_ranges":{"type":"object","description":"The date ranges the qualification applies over, keyed by position.","additionalProperties":{"type":"object","properties":{"start_date":{"type":"string","format":"date","example":"2026-01-01"},"end_date":{"type":"string","format":"date","example":"2026-12-31"}}},"example":{"1":{"start_date":"2026-01-01","end_date":"2026-06-30"},"2":{"start_date":"2026-07-01","end_date":"2026-12-31"}}},"file_id":{"type":"string"}},"required":["qualification_id"]}},"answered_questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"question":{"type":"string"},"answer":{"type":"string"}}}},"regular_hours":{"type":"object","properties":{"start_date":{"type":"string","format":"date"},"schedules":{"type":"array","items":{"type":"object","properties":{"week":{"type":"integer","format":"int32"},"day":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"department_id":{"type":"integer","format":"int32"},"breaks":{"type":"string"}},"required":["week","day","start","end"]}},"sleepovers":{"type":"array","items":{"type":"object","properties":{"week":{"type":"integer","format":"int32"},"day":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"department_id":{"type":"integer","format":"int32"}},"required":["week","day","start","end"]}},"on_calls":{"type":"array","items":{"type":"object","properties":{"week":{"type":"integer","format":"int32"},"day":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"department_id":{"type":"integer","format":"int32"}},"required":["week","day","start","end"]}},"rostered_days_off":{"type":"array","items":{"type":"object","properties":{"week":{"type":"integer","format":"int32"},"day":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"department_id":{"type":"integer","format":"int32"}},"required":["week","day","start","end"]}}},"required":["start_date","schedules"]},"custom_fields":{"type":"object"}},"required":["id"]}}},"required":["users"],"description":"Bulk Update Users"},"postV2UsersInviteBulk":{"type":"object","properties":{"user_ids":{"type":"array","items":{"type":"integer","format":"int32"}}},"required":["user_ids"],"description":"Bulk Invite Users"},"putV2UsersId":{"type":"object","properties":{"skip_validation":{"type":"boolean","description":"Skip the email-in-use validation when saving."},"name":{"type":"string"},"employee_id":{"type":"string"},"passcode":{"type":"string"},"phone":{"type":"string"},"date_of_birth":{"type":"string","format":"date"},"employment_start_date":{"type":"string","format":"date"},"employment_end_date":{"type":"string","format":"date"},"email":{"type":"string"},"payslip_email":{"type":"string"},"preferred_hours":{"type":"number","format":"float"},"contracted_weekly_hours":{"type":"number","format":"float"},"contracted_weekly_days":{"type":"number","format":"float"},"minimum_base_hours":{"type":"number","format":"float"},"part_time_fixed_hours":{"type":"number","format":"float"},"days_overtime_averaged_over":{"type":"integer","format":"int32"},"overtime_calculated_over_period_start":{"type":"string","format":"date"},"award_tag_ids":{"type":"array","items":{"type":"integer","format":"int32"}},"department_ids":{"type":"array","items":{"type":"integer","format":"int32"}},"report_department_id":{"type":"integer","format":"int32"},"managed_department_ids":{"type":"array","items":{"type":"integer","format":"int32"}},"can_see_costs":{"type":"boolean"},"temporary_employee_type":{"type":"string"},"payroll_cessation_code":{"type":"string"},"user_levels":{"type":"array","items":{"type":"string"}},"platform_role_ids":{"type":"array","items":{"type":"integer","format":"int32"}},"hourly_rate":{"type":"number","format":"float"},"yearly_salary":{"type":"number","format":"float"},"position_template_name":{"type":"string"},"active":{"type":"boolean"},"award_template_id":{"type":"integer","format":"int32"},"award_template_organisation_id":{"type":"integer","format":"int32"},"next_pay_group_id":{"type":"integer","format":"int32"},"address":{"type":"object","properties":{"street_line_one":{"type":"string"},"street_line_two":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"postcode":{"type":"string"}}},"tax_declaration":{"type":"object","properties":{"previous_family_name":{"type":"string"},"australian_tax_resident":{"type":"boolean"},"australian_tax_residency_status":{"type":"string"},"tax_free_threshold":{"type":"boolean"},"senior_tax_offset":{"type":"boolean"},"zone_overseas_carer":{"type":"boolean"},"financial_supplement_debt":{"type":"boolean"},"student_loan":{"type":"boolean"},"tax_code":{"type":"string"},"student_loan_plans":{"type":"array","items":{"type":"string"}},"uk_tax_year_status":{"type":"string"},"tax_file_number":{"type":"string"},"employment_basis":{"type":"string","enum":["full_time","part_time","casual"]},"tax_scale_type":{"type":"string"},"income_type":{"type":"string"},"home_country":{"type":"string"},"employment_type":{"type":"string"},"senior_marital_status":{"type":"string"},"nz_tax_code":{"type":"string"},"nz_esct_rate":{"type":"string"},"nz_source_of_income":{"type":"string"},"nz_varied_tax_rate":{"type":"number","format":"double"},"singapore_tax_detail":{"type":"object","properties":{"legal_status":{"type":"string","enum":["singapore_citizen","permanent_resident","work_permit","e_pass","s_pass","student_pass"]},"nationality":{"type":"string","enum":["singaporean","malaysian","indian","filipino","indonesian","chinese","vietnamese","others"]},"race":{"type":"string","enum":["chinese","malay","indian","eurasian","filipino","vietnamese","others"]},"religion":{"type":"string","enum":["buddhism","christianity","catholicism","islam","hinduism","free_thinker","atheism"]},"marital_status":{"type":"string","enum":["single","married","other"]},"issue_date":{"type":"string"},"expiry_date":{"type":"string"}}}}},"bank_details":{"type":"object","properties":{"bsb":{"type":"string"},"account_number":{"type":"string"},"bank_name":{"type":"string"},"account_name":{"type":"string"},"particular":{"type":"string"},"code":{"type":"string"}}},"super_fund_membership":{"type":"object","properties":{"request":{"type":"object","properties":{"employer_default":{"type":"boolean"},"ioof":{"type":"boolean"},"own_choice":{"type":"boolean"},"elevate":{"type":"boolean"},"qsuper":{"type":"boolean"}},"required":["employer_default","ioof","own_choice"]},"config":{"type":"object","properties":{"super_contribution_type":{"type":"string"},"member_number":{"type":"string"},"occupational_rating":{"type":"string"},"super_fund_id":{"type":"integer","format":"int32"},"usi":{"type":"string"},"super_fund":{"type":"object","properties":{"fund_name":{"type":"string"},"abn":{"type":"string"},"electronic_service_address":{"type":"string"},"bank_details":{"type":"object","properties":{"bsb":{"type":"string"},"account_number":{"type":"string"},"account_name":{"type":"string"},"bank_name":{"type":"string"}},"required":["bsb","account_number","account_name"]}},"required":["fund_name","abn","electronic_service_address","bank_details"]}}}},"required":["request","config"]},"qualifications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"qualification_id":{"type":"integer","format":"int32"},"enabled":{"type":"string"},"training_provider_name":{"type":"string"},"state_of_completion":{"type":"string"},"license_number":{"type":"string"},"expires":{"type":"string","format":"date"},"attained":{"type":"string","format":"date"},"in_training":{"type":"boolean"},"date_ranges":{"type":"object","description":"The date ranges the qualification applies over, keyed by position.","additionalProperties":{"type":"object","properties":{"start_date":{"type":"string","format":"date","example":"2026-01-01"},"end_date":{"type":"string","format":"date","example":"2026-12-31"}}},"example":{"1":{"start_date":"2026-01-01","end_date":"2026-06-30"},"2":{"start_date":"2026-07-01","end_date":"2026-12-31"}}},"file_id":{"type":"string"}},"required":["qualification_id"]}},"answered_questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"question":{"type":"string"},"answer":{"type":"string"}}}},"regular_hours":{"type":"object","properties":{"start_date":{"type":"string","format":"date"},"schedules":{"type":"array","items":{"type":"object","properties":{"week":{"type":"integer","format":"int32"},"day":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"department_id":{"type":"integer","format":"int32"},"breaks":{"type":"string"}},"required":["week","day","start","end"]}},"sleepovers":{"type":"array","items":{"type":"object","properties":{"week":{"type":"integer","format":"int32"},"day":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"department_id":{"type":"integer","format":"int32"}},"required":["week","day","start","end"]}},"on_calls":{"type":"array","items":{"type":"object","properties":{"week":{"type":"integer","format":"int32"},"day":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"department_id":{"type":"integer","format":"int32"}},"required":["week","day","start","end"]}},"rostered_days_off":{"type":"array","items":{"type":"object","properties":{"week":{"type":"integer","format":"int32"},"day":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"department_id":{"type":"integer","format":"int32"}},"required":["week","day","start","end"]}}},"required":["start_date","schedules"]},"custom_fields":{"type":"object"}},"description":"Update User"},"UserVersion":{"type":"object","properties":{"version_id":{"type":"integer","format":"int32","example":12345},"time":{"type":"integer","format":"int32","example":1456988518},"event":{"type":"string","example":"update","description":"What happened to the record. Usually `create`, `update` or `destroy`, though some resources return a longer phrase such as `update shift break`."},"author":{"allOf":[{"$ref":"#/components/schemas/VersionAuthor"}],"description":"The author of the change."},"item_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the record this version belongs to."},"item_type":{"type":"string","description":"The type of record this version belongs to, such as `Shift` or `Schedule`."},"applies_during":{"allOf":[{"$ref":"#/components/schemas/UserVersionAppliesDuring"}],"description":"Only on regular_hours entries: the dates of the employment conditions this copy of the regular hours belongs to, as they run now."},"changes":{"type":"array","items":{"$ref":"#/components/schemas/UserVersionChange"},"description":"The fields that changed in this version."}},"required":["version_id","time","event","author","item_id","item_type","changes"],"description":"UserVersion model"},"UserVersionAppliesDuring":{"type":"object","properties":{"from":{"type":"string","example":"2016-03-15","description":"The date the employment conditions start."},"until":{"type":"string","example":"2016-03-17","description":"The date the employment conditions end, or null while they are ongoing."}},"required":["from","until"]},"UserVersionChange":{"type":"object","properties":{"field":{"type":"string","example":"name"},"previous":{"type":"string","example":"Lenny L Leonard"},"updated":{"type":"string","example":"Lenny Leonard"}},"required":["field","previous","updated"]},"AlternateRates":{"type":"object","properties":{"alternate_rates":{"type":"array","items":{"$ref":"#/components/schemas/AlternateRate"}}},"required":["alternate_rates"],"description":"AlternateRates model"},"AlternateRate":{"type":"object","properties":{"department_id":{"type":"string","example":"123456"},"hourly_rate":{"type":"string","example":"20.01"}},"required":["department_id","hourly_rate"]},"putV2UsersIdAlternateRates":{"type":"object","properties":{"alternate_rates":{"type":"array","items":{"type":"object","properties":{"department_id":{"type":"integer","format":"int32"},"hourly_rate":{"type":"number","format":"float"}},"required":["department_id","hourly_rate"]}},"employment_contract_id":{"type":"integer","format":"int32"}},"required":["alternate_rates"],"description":"Update Alternate Rates"},"Leave":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the leave request."},"user_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the user this leave request is for."},"reason":{"type":"string","example":"Going to the doctor","description":"The reason given for the leave."},"leave_type":{"type":"string","example":"Annual Leave","description":"The type of leave requested."},"fallback_leave_type":{"type":"string","example":"Annual Leave","description":"The leave type used once the requested type's balance runs out."},"hours":{"type":"number","format":"float","example":7.6,"description":"The total number of leave hours."},"start":{"type":"string","example":"2016-03-15","description":"The first date of the leave."},"finish":{"type":"string","example":"2016-03-17","description":"The last date of the leave."},"status":{"type":"string","example":"approved","description":"One of `pending`, `approved`, `rejected`."},"multitagging":{"type":"boolean","example":false,"description":"Whether the leave spans multiple teams."},"all_day":{"type":"boolean","example":true,"description":"Whether the leave is for whole days rather than specific times."},"start_time":{"type":"string","example":"2016-03-15T09:00:00","description":"The start time of the leave, or null for all day leave."},"finish_time":{"type":"string","example":"2016-03-15T17:00:00","description":"The finish time of the leave, or null for all day leave."},"verification":{"type":"string","example":"https://my.tanda.co/rails/active_storage/blobs/verification.pdf","description":"A link to the uploaded verification document, or null if none was attached."},"daily_breakdown":{"type":"array","items":{"$ref":"#/components/schemas/DailyBreakdown"},"description":"The per-day breakdown of the leave hours."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the leave request was last updated, as a Unix timestamp."}},"required":["id","user_id","reason","leave_type","fallback_leave_type","hours","start","finish","status","multitagging","all_day","start_time","finish_time","verification","daily_breakdown","updated_at"],"description":"Leave model"},"DailyBreakdown":{"type":"object","properties":{"id":{"type":"string","example":"12345"},"date":{"type":"string","example":"2016-03-15","description":"The date for this part of the breakdown."},"hours":{"type":"number","format":"float","example":7.6,"description":"The number of leave hours taken on this date."},"times":{"allOf":[{"$ref":"#/components/schemas/PartialHolidayTimes"}],"description":"The hours the partial public holiday covers on this date. Empty when the date is not a partial public holiday."},"all_day":{"type":"boolean","example":true,"description":"Whether leave was taken for the whole day."},"is_holiday":{"type":"boolean","example":false,"description":"Whether this date is a public holiday."},"department_id":{"type":"string","example":"12345","description":"The id of the team for this part of the breakdown."},"start_time":{"type":"string","example":"2016-03-15T09:00:00","description":"The start time of the leave on this date, or null for all day leave."},"finish_time":{"type":"string","example":"2016-03-15T17:00:00","description":"The finish time of the leave on this date, or null for all day leave."},"timesheet_on_this_day_is_exported":{"type":"boolean","example":false,"description":"Whether the timesheet covering this date has been exported."},"filled_from":{"type":"string","example":"shift","description":"The source of the hours for this date."},"pattern_detail":{"allOf":[{"$ref":"#/components/schemas/RecentPatternDetail"}],"description":"How the hours were calculated when this date used a recent pattern, or null."}},"required":["id","date","hours","times","all_day","is_holiday","department_id","start_time","finish_time","timesheet_on_this_day_is_exported","filled_from","pattern_detail"]},"PartialHolidayTimes":{"type":"object","properties":{"from":{"type":"number","format":"float","example":8.5,"description":"The hour of the day the holiday starts."},"to":{"type":"number","format":"float","example":17.0,"description":"The hour of the day the holiday ends."}}},"RecentPatternDetail":{"type":"object","properties":{"shifts":{"type":"array","items":{"$ref":"#/components/schemas/PatternShift"}},"raw_average_hours":{"type":"number","format":"float","example":7.6},"average_hours":{"type":"number","format":"float","example":7.6},"capped":{"type":"boolean","example":false},"weeks_reviewed":{"type":"integer","format":"int32","example":4},"minimum_weeks_required":{"type":"integer","format":"int32","example":2}},"required":["shifts","raw_average_hours","average_hours","capped","weeks_reviewed","minimum_weeks_required"]},"PatternShift":{"type":"object","properties":{"date":{"type":"string","example":"2016-03-02"},"hours":{"type":"number","format":"float","example":7.6}},"required":["date","hours"]},"postV2Leave":{"type":"object","properties":{"reason":{"type":"string"},"department_id":{"type":"integer","format":"int32"},"all_day":{"type":"boolean"},"finish_time":{"type":"string","format":"date-time"},"start_time":{"type":"string","format":"date-time"},"file_id":{"type":"string"},"fallback_leave_type":{"type":"string"},"daily_breakdown":{"type":"array","items":{"type":"string"}},"view_in_days":{"type":"boolean"},"user_id":{"type":"integer","format":"int32"},"hours":{"type":"number","format":"float"},"start":{"type":"string","format":"date"},"finish":{"type":"string","format":"date"},"leave_type":{"type":"string"},"status":{"type":"string","enum":["pending","approved","rejected"]}},"required":["user_id","start","finish","leave_type","status"],"description":"Create Leave Request"},"LeaveVersion":{"type":"object","properties":{"version_id":{"type":"integer","format":"int32","example":12345},"time":{"type":"integer","format":"int32","example":1456988518},"event":{"type":"string","example":"update","description":"What happened to the record. Usually `create`, `update` or `destroy`, though some resources return a longer phrase such as `update shift break`."},"author":{"allOf":[{"$ref":"#/components/schemas/VersionAuthor"}],"description":"The author of the change."},"item_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the record this version belongs to."},"item_type":{"type":"string","description":"The type of record this version belongs to, such as `Shift` or `Schedule`."},"changes":{"type":"array","items":{"$ref":"#/components/schemas/LeaveVersionChange"},"description":"The fields that changed in this version."}},"required":["version_id","time","event","author","item_id","item_type","changes"],"description":"LeaveVersion model"},"LeaveVersionChange":{"type":"object","properties":{"field":{"type":"string","example":"status","description":"The name of the field that changed."},"previous":{"type":"string","example":"pending","description":"The value before the change."},"updated":{"type":"string","example":"approved","description":"The value after the change."}},"required":["field","previous","updated"]},"putV2LeaveId":{"type":"object","properties":{"leave_type":{"type":"string"},"fallback_leave_type":{"type":"string"},"multitagging":{"type":"boolean"},"department_id":{"type":"integer","format":"int32"},"start":{"type":"string"},"finish":{"type":"string"},"hours":{"type":"number","format":"float"},"status":{"type":"string","enum":["pending","approved","rejected"]},"reason":{"type":"string"},"all_day":{"type":"boolean"},"finish_time":{"type":"string","format":"date-time"},"start_time":{"type":"string","format":"date-time"},"daily_breakdown":{"type":"array","items":{"type":"string"}}},"description":"Update Leave Request"},"postV2Unavailability":{"type":"object","properties":{"user_id":{"type":"integer","format":"int32"},"title":{"type":"string"},"repeating":{"type":"boolean"},"repeating_info":{"type":"object","properties":{"interval":{"type":"string","enum":["day","week","fortnight","month","year"]},"occurrences":{"type":"integer","format":"int32"},"days_of_week":{"type":"string"},"upto":{"type":"string","format":"date"}},"required":["interval"]},"all_day":{"type":"boolean","default":false},"override_validations":{"type":"boolean","default":false},"start":{"type":"integer","format":"int32"},"finish":{"type":"integer","format":"int32"},"date_from":{"type":"string","format":"date"},"date_to":{"type":"string","format":"date"}},"required":["user_id","title","repeating","repeating_info"],"description":"Create Unavailability"},"putV2UnavailabilityId":{"type":"object","properties":{"title":{"type":"string","example":"Helping Grandma"}},"required":["title"],"description":"Update Unavailability"},"OngoingAvailability":{"type":"object","properties":{"user_id":{"type":"integer","format":"int32","example":12345},"ongoing":{"type":"array","items":{"$ref":"#/components/schemas/OngoingRecord"},"description":"The user's active and upcoming recurring availability patterns."}},"required":["user_id","ongoing"],"description":"OngoingAvailability model"},"OngoingRecord":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345},"start_date":{"type":"string","example":"2016-03-15","description":"The date the recurring pattern takes effect (ISO date)."},"frequency":{"type":"string","example":"weekly","description":"How often the pattern repeats (e.g. weekly, fortnightly)."},"updated_at":{"type":"string","example":"2016-03-15T09:00:00+10:00","description":"When the record was last updated (ISO8601)."},"days":{"type":"array","items":{"$ref":"#/components/schemas/PatternDay"},"description":"One entry per day in the recurring pattern."}},"required":["id","start_date","frequency","updated_at","days"]},"PatternDay":{"type":"object","properties":{"day_in_pattern":{"type":"integer","format":"int32","example":0,"description":"Zero-based day offset within a recurring pattern."},"time_blocks":{"type":"array","items":{"$ref":"#/components/schemas/TimeBlock"},"description":"The available windows on this day."}},"required":["day_in_pattern","time_blocks"]},"TimeBlock":{"type":"object","properties":{"start":{"type":"string","example":"09:00","description":"The start of the available window, as a clock time (HH:MM)."},"finish":{"type":"string","example":"17:00","description":"The finish of the available window, as a clock time (HH:MM). A window that ends at the next midnight is `24:00`."}},"required":["start","finish"]},"AvailabilityRequest":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345},"user_id":{"type":"integer","format":"int32","example":12345},"type":{"type":"string","example":"ongoing","description":"Whether the record is a recurring pattern (ongoing) or a one-off (temporary)."},"status":{"type":"string","example":"approved","description":"The approval workflow state. One of `pending`, `approved`, `rejected`."},"reason":{"type":"string","example":"Studying on Fridays","description":"The title the requester gave the record."},"start_date":{"type":"string","example":"2016-03-15","description":"The date the availability takes effect (ISO date)."},"finish_date":{"type":"string","example":"2016-03-17","description":"The date the availability ends (ISO date), or null if open-ended."},"all_day":{"type":"boolean","example":false,"description":"Whether the availability covers whole days rather than specific time windows."},"created_at":{"type":"string","example":"2016-03-15T09:00:00+10:00"},"updated_at":{"type":"string","example":"2016-03-15T09:00:00+10:00"},"frequency":{"type":"string","example":"weekly","description":"How often a recurring pattern repeats (present only for ongoing records)."},"days":{"type":"array","items":{"$ref":"#/components/schemas/AvailabilityDay"},"description":"The availability windows (present for recurring patterns and specific-time one-offs)."}},"required":["id","user_id","type","status","reason","start_date","finish_date","all_day","created_at","updated_at"],"description":"AvailabilityRequest model"},"AvailabilityDay":{"type":"object","properties":{"day_in_pattern":{"type":"integer","format":"int32","example":0,"description":"The zero-based day offset in the pattern, for a recurring request."},"date":{"type":"string","example":"2016-03-02","description":"The date for this entry, on a one-off request."},"time_blocks":{"type":"array","items":{"$ref":"#/components/schemas/TimeBlock"},"description":"The available windows on this day."}},"required":["time_blocks"]},"EffectiveAvailability":{"type":"object","properties":{"user_id":{"type":"integer","format":"int32","example":12345},"availability":{"type":"array","items":{"$ref":"#/components/schemas/DatedDay"},"description":"One entry per date in the requested range, with the available times on that date."}},"required":["user_id","availability"],"description":"EffectiveAvailability model"},"DatedDay":{"type":"object","properties":{"date":{"type":"string","example":"2016-03-02","description":"The date for this entry."},"time_blocks":{"type":"array","items":{"$ref":"#/components/schemas/TimeBlock"},"description":"The available windows on this day."}},"required":["date","time_blocks"]},"LeaveBalance":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345},"user_id":{"type":"integer","format":"int32","example":12345},"leave_type":{"type":"string","example":"Annual Leave","description":"The type of leave."},"hours":{"type":"number","format":"float","example":76.5,"description":"The number of hours of leave accrued."},"should_accrue":{"type":"boolean","example":true,"description":"Whether Tanda accrues this balance itself. When false, you keep it up to date. Defaults to false."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the leave balance was last updated, as a Unix timestamp."}},"required":["id","user_id","leave_type","hours","should_accrue","updated_at"],"description":"LeaveBalance model"},"postV2LeaveBalances":{"type":"object","properties":{"balances":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"integer","format":"int32"},"hours":{"type":"number","format":"float"},"leave_type":{"type":"string"},"award_id":{"type":"integer","format":"int32"},"should_accrue":{"type":"boolean"}},"required":["user_id","hours"]}},"user_id":{"type":"integer","format":"int32"},"hours":{"type":"number","format":"float"},"leave_type":{"type":"string"},"award_id":{"type":"integer","format":"int32"},"should_accrue":{"type":"boolean"}},"description":"Create Leave Balance"},"putV2LeaveBalancesId":{"type":"object","properties":{"hours":{"type":"number","format":"float"},"should_accrue":{"type":"boolean"}},"required":["hours"],"description":"Update Leave Balance with ID"},"putV2LeaveBalancesUserUserId":{"type":"object","properties":{"balances":{"type":"array","items":{"type":"object","properties":{"leave_type":{"type":"string"},"hours":{"type":"number","format":"float"},"should_accrue":{"type":"boolean"}},"required":["leave_type","hours"]}},"leave_type":{"type":"string"},"hours":{"type":"number","format":"float"},"should_accrue":{"type":"boolean"}},"description":"Update Leave Balance with User ID"},"DataStream":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the data stream."},"name":{"type":"string","example":"Foot Traffic","description":"The name of the data stream."},"source":{"type":"string","example":"api","description":"Where the data stream's data comes from."},"data_interval":{"type":"integer","format":"int32","example":900,"description":"The time between the data stream's store stats, in seconds."},"enabled":{"type":"boolean","example":true,"description":"Whether the data stream is enabled."},"print_mode":{"type":"string","example":"values","description":"How the data stream prints on the roster. One of `hidden`, `values`, `cumulative_sum`."},"roster_display_mode":{"type":"string","example":"values","description":"How the data stream displays on the roster. One of `hidden`, `values`, `cumulative_sum`."},"section_identifer":{"type":"string","example":"boo-urns","description":"The source section identifier, for sources that have one."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the data stream was last updated, as a Unix timestamp."}},"required":["id","name","source","data_interval","enabled","print_mode","roster_display_mode","updated_at"],"description":"DataStream model"},"postV2Datastreams":{"type":"object","properties":{"name":{"type":"string"},"data_interval":{"type":"integer","format":"int32","enum":[86400,3600,1800,900]},"joined_to_organisation":{"type":"boolean"},"department_joins":{"type":"array","items":{"type":"integer","format":"int32"}},"location_joins":{"type":"array","items":{"type":"integer","format":"int32"}},"default_stat_type":{"type":"string"},"print_mode":{"type":"string","enum":["hidden","values","cumulative_sum"]},"roster_display_mode":{"type":"string","enum":["hidden","values","cumulative_sum"]}},"required":["name","data_interval"],"description":"Create Data Stream"},"DataStreamVersion":{"type":"object","properties":{"version_id":{"type":"integer","format":"int32","example":12345},"time":{"type":"integer","format":"int32","example":1456988518},"event":{"type":"string","example":"update","description":"What happened to the record. Usually `create`, `update` or `destroy`, though some resources return a longer phrase such as `update shift break`."},"author":{"allOf":[{"$ref":"#/components/schemas/VersionAuthor"}],"description":"The author of the change."},"item_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the record this version belongs to."},"item_type":{"type":"string","description":"The type of record this version belongs to, such as `Shift` or `Schedule`."},"changes":{"type":"array","items":{"$ref":"#/components/schemas/DataStreamVersionChange"},"description":"The fields that changed in this version."}},"required":["version_id","time","event","author","item_id","item_type","changes"],"description":"DataStreamVersion model"},"DataStreamVersionChange":{"type":"object","properties":{"field":{"type":"string","example":"data_interval","description":"The name of the field that changed."},"previous":{"type":"integer","format":"int32","example":900,"description":"The value before the change."},"updated":{"type":"integer","format":"int32","example":1800,"description":"The value after the change."}},"required":["field","previous","updated"]},"putV2DatastreamsId":{"type":"object","properties":{"name":{"type":"string","example":"Foot Traffic!"},"joined_to_organisation":{"type":"boolean"},"department_joins":{"type":"array","items":{"type":"integer","format":"int32"}},"location_joins":{"type":"array","items":{"type":"integer","format":"int32"}},"enabled":{"type":"boolean"},"default_stat_type":{"type":"string"},"print_mode":{"type":"string","enum":["hidden","values","cumulative_sum"]},"roster_display_mode":{"type":"string","enum":["hidden","values","cumulative_sum"]}},"description":"Update Data Stream"},"DataStreamJoin":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the data stream join."},"data_stream_id":{"type":"integer","format":"int32","example":12345,"description":"The id of this join's data stream."},"rostering_ratio":{"type":"number","format":"float","example":1.5,"description":"For every N units the data stream reports, one worker is rostered. Null if the join has no ratio."},"head_count_map":{"type":"string","example":"5,5,5,5","description":"The legacy head count curve. Returned only when it is the same across the whole join, and null otherwise."},"data_streamable_type":{"type":"string","enum":["Department","Location","Organisation","DepartmentGroup","LocationArea"],"example":"Location","description":"The type of the joined object."},"stat_type_id":{"type":"integer","format":"int32","example":12345,"description":"The id of this join's stat type."},"data_streamable_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the joined object. Null when the join is on the organisation."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the data stream join was last updated, as a Unix timestamp."}},"required":["id","data_stream_id","rostering_ratio","head_count_map","data_streamable_type","stat_type_id","data_streamable_id","updated_at"],"description":"DataStreamJoin model"},"postV2Datastreamjoins":{"type":"object","properties":{"data_stream_id":{"type":"integer","format":"int32"},"data_streamable_id":{"type":"integer","format":"int32"},"data_streamable_type":{"type":"string","enum":["Department","Location","Organisation","DepartmentGroup","LocationArea"]},"rostering_ratio":{"type":"number","format":"float"},"head_count_map":{"type":"string"},"stat_type_id":{"type":"integer","format":"int32"}},"required":["data_stream_id","data_streamable_type"],"description":"Create Data Stream Join"},"putV2DatastreamjoinsId":{"type":"object","properties":{"data_stream_id":{"type":"integer","format":"int32"},"data_streamable_id":{"type":"integer","format":"int32"},"data_streamable_type":{"type":"string","enum":["Department","Location","Organisation","DepartmentGroup","LocationArea"]},"rostering_ratio":{"type":"number","format":"float","example":1.5},"head_count_map":{"type":"string"},"stat_type_id":{"type":"integer","format":"int32"}},"description":"Update Data Stream Join"},"StatType":{"type":"object","properties":{"data_type":{"type":"string","enum":["sum","static"],"example":"sum","description":"What kind of data this is."},"format":{"type":"string","example":"currency","description":"How this stat type is formatted."},"label":{"type":"string","example":"Sales","description":"The human readable name for this stat type."},"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the stat type."},"stat_type":{"type":"string","example":"sales","description":"The key of the stat type. This must exactly match what is uploaded to Store Stats."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the stat type was last updated, in unix time."}},"required":["data_type","format","label","id","stat_type","updated_at"],"description":"StatType model"},"postV2StatTypes":{"type":"object","properties":{"data_type":{"type":"string"},"label":{"type":"string"},"stat_type":{"type":"string"},"format":{"type":"string"}},"required":["data_type","label","stat_type"],"description":"Create Stat Type"},"putV2StatTypesId":{"type":"object","properties":{"data_type":{"type":"string"},"label":{"type":"string"},"stat_type":{"type":"string"},"format":{"type":"string","example":"whole_number"}},"description":"Update Stat Type"},"postV2StorestatsForDatastream":{"type":"object","properties":{"stats":{"type":"array","items":{"type":"object","properties":{"datastream_id":{"type":"integer","format":"int32"},"time":{"type":"integer","format":"int32"},"stat":{"type":"number","format":"float"},"type":{"type":"string"}},"required":["datastream_id","time","stat","type"]}},"datastream_id":{"type":"integer","format":"int32"},"time":{"type":"integer","format":"int32"},"stat":{"type":"number","format":"float"},"type":{"type":"string"},"update_tips":{"type":"boolean","default":false}},"description":"Create Store Stats for Multiple Datastreams"},"StoreStat":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the store stat."},"time":{"type":"integer","format":"int32","example":1456988518,"description":"The Unix timestamp for the start of the store stat's time period."},"stat":{"type":"number","format":"float","example":3.5,"description":"The value of the store stat."},"type":{"type":"string","example":"sales","description":"The type of the store stat."},"datastream_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the data stream the store stat belongs to."}},"required":["id","time","stat","type","datastream_id"],"description":"StoreStat model"},"postV2StorestatsForDatastreamDatastreamId":{"type":"object","properties":{"stats":{"type":"array","items":{"type":"object","properties":{"time":{"type":"integer","format":"int32"},"stat":{"type":"number","format":"float"},"type":{"type":"string"}},"required":["time","stat","type"]}},"time":{"type":"integer","format":"int32"},"stat":{"type":"number","format":"float"},"type":{"type":"string"},"update_tips":{"type":"boolean","default":false}},"description":"Create Store Stats for Datastream"},"postV2PredictedStorestatsForDatastream":{"type":"object","properties":{"stats":{"type":"array","items":{"type":"object","properties":{"datastream_id":{"type":"integer","format":"int32"},"time":{"type":"integer","format":"int32"},"stat":{"type":"number","format":"float"},"type":{"type":"string"}},"required":["datastream_id","time","stat","type"]}},"datastream_id":{"type":"integer","format":"int32"},"time":{"type":"integer","format":"int32"},"stat":{"type":"number","format":"float"},"type":{"type":"string"}},"description":"Predicted Store Stats for Multiple Datastreams"},"PredictedStoreStat":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the predicted store stat."},"time":{"type":"integer","format":"int32","example":1456988518,"description":"The time of the predicted store stat, in unix time."},"stat":{"type":"number","format":"float","example":3.5,"description":"The value of the predicted store stat."},"original_stat":{"type":"number","format":"float","description":"Deprecated; always null."},"type":{"type":"string","example":"sales","description":"The type of the predicted store stat."}},"required":["id","time","stat","original_stat","type"],"description":"PredictedStoreStat model"},"CognitiveCreatorConfiguration":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the configuration. `null` when the department has no saved configuration yet."},"department_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the department the configuration applies to."},"minimum_staff":{"type":"integer","format":"int32","example":2,"description":"The fewest employees that may be rostered on at once."},"maximum_staff":{"type":"integer","format":"int32","example":12,"description":"The most employees that may be rostered on at once."},"max_concurrent_start":{"type":"integer","format":"int32","example":3,"description":"The most shifts that may start at the same time."},"min_length":{"type":"number","format":"float","example":3.0,"description":"The shortest shift that may be created, in hours."},"max_length":{"type":"number","format":"float","example":8.0,"description":"The longest shift that may be created, in hours."},"time_to_open":{"type":"number","format":"float","example":0.5,"description":"How long before the department opens the first shift should start, in hours."},"time_to_close":{"type":"number","format":"float","example":0.25,"description":"How long after the department closes the last shift should finish, in hours."},"undercoverage_penalty_ratio":{"type":"number","format":"float","example":1.5,"description":"How heavily understaffing is penalised relative to overstaffing."},"round_down_head_count":{"type":"boolean","example":false,"description":"Whether fractional staffing requirements are rounded down rather than up."},"consolidate_shift_count":{"type":"boolean","example":true,"description":"Whether the required hours are covered by fewer, longer shifts."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the configuration was last updated, as a Unix timestamp. `0` when it has not been saved yet."}},"required":["id","department_id","minimum_staff","maximum_staff","max_concurrent_start","min_length","max_length","time_to_open","time_to_close","undercoverage_penalty_ratio","round_down_head_count","consolidate_shift_count","updated_at"],"description":"CognitiveCreatorConfiguration model"},"postV2CognitiveCreatorConfigurationForDepartmentDepartmentId":{"type":"object","properties":{"minimum_staff":{"type":"integer","format":"int32"},"maximum_staff":{"type":"integer","format":"int32"},"max_concurrent_start":{"type":"integer","format":"int32"},"min_length":{"type":"number","format":"float"},"max_length":{"type":"number","format":"float"},"time_to_open":{"type":"number","format":"float"},"time_to_close":{"type":"number","format":"float"},"undercoverage_penalty_ratio":{"type":"number","format":"float"},"round_down_head_count":{"type":"boolean"},"consolidate_shift_count":{"type":"boolean"}},"description":"Post Cognitive Creator Configuration"},"putV2CognitiveCreatorConfigurationId":{"type":"object","properties":{"minimum_staff":{"type":"integer","format":"int32"},"maximum_staff":{"type":"integer","format":"int32"},"max_concurrent_start":{"type":"integer","format":"int32"},"min_length":{"type":"number","format":"float"},"max_length":{"type":"number","format":"float"},"time_to_open":{"type":"number","format":"float"},"time_to_close":{"type":"number","format":"float"},"undercoverage_penalty_ratio":{"type":"number","format":"float"},"round_down_head_count":{"type":"boolean"},"consolidate_shift_count":{"type":"boolean"}},"description":"Put Cognitive Creator Configuration"},"Device":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the device."},"uuid":{"type":"string","example":"73fe3430-4f5d-3a0a-84a7-cffbeb5efeb2","description":"The identifier the time clock itself reports when it contacts Tanda."},"location_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the time clock's location, or null when it is not assigned to one."},"nickname":{"type":"string","example":"Reactor Timeclock","description":"The nickname of the device. If not provided, the location's name is used."},"last_heard_from":{"type":"integer","format":"int32","example":1456988518,"description":"The time that the device last communicated with the Tanda server."},"dispatch_date":{"type":"string","example":"2016-03-02","description":"The date that the device was sent out."},"location_specific":{"type":"boolean","example":false,"description":"Whether the device is specific to the assigned location or not."},"location_ids":{"type":"array","items":{"type":"integer","format":"int32"},"example":[12345,12346],"description":"The ids of every location the device may be used at."},"returned":{"type":"boolean","example":true,"description":"Whether the device has been returned. Only sent when looking up a single device or listing returned ones."},"return_date":{"type":"string","example":"2016-03-02","description":"The date the device was returned."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the device was last updated, as a Unix timestamp."}},"required":["id","uuid","location_id","nickname","last_heard_from","dispatch_date","location_specific","location_ids","updated_at"],"description":"Device model"},"DeviceAccessCode":{"type":"object","properties":{"access_code":{"type":"string","example":"12345678","description":"A randomly generated eight digit code, used to set up a device without entering a username and password."}},"required":["access_code"],"description":"DeviceAccessCode model"},"DeviceVersion":{"type":"object","properties":{"version_id":{"type":"integer","format":"int32","example":12345},"time":{"type":"integer","format":"int32","example":1456988518},"event":{"type":"string","example":"update","description":"What happened to the record. Usually `create`, `update` or `destroy`, though some resources return a longer phrase such as `update shift break`."},"author":{"allOf":[{"$ref":"#/components/schemas/VersionAuthor"}],"description":"The author of the change."},"item_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the record this version belongs to."},"item_type":{"type":"string","description":"The type of record this version belongs to, such as `Shift` or `Schedule`."},"changes":{"type":"array","items":{"$ref":"#/components/schemas/DeviceVersionChange"},"description":"The fields that changed in this version."}},"required":["version_id","time","event","author","item_id","item_type","changes"],"description":"DeviceVersion model"},"DeviceVersionChange":{"type":"object","properties":{"field":{"type":"string","example":"nickname","description":"The name of the field that changed."},"previous":{"type":"string","example":"Breakroom","description":"The value before the change."},"updated":{"type":"string","example":"Reactor Timeclock","description":"The value after the change."}},"required":["field","previous","updated"]},"putV2DevicesId":{"type":"object","properties":{"location_id":{"type":"integer","format":"int32"},"location_ids":{"type":"string"},"nickname":{"type":"string"}},"description":"Update Device"},"postV2Devices":{"type":"object","properties":{"location_id":{"type":"integer","format":"int32"},"location_ids":{"type":"string"},"nickname":{"type":"string"}},"description":"Create Device"},"ClockIn":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the clock in."},"user_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the user who clocked in."},"device_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the device the user clocked in on."},"time":{"type":"integer","format":"int32","example":1456988518,"description":"When the clock in happened, as a Unix timestamp."},"type":{"type":"string","enum":["clockin","clockout","start","finish","break_start","break_finish"],"example":"clockin","description":"What the user did."},"latitude":{"type":"number","format":"float","example":-27.459687,"description":"Where the clock in happened, or null when the device did not report a location."},"longitude":{"type":"number","format":"float","example":153.032108,"description":"Where the clock in happened, or null when the device did not report a location."},"photo":{"type":"string","description":"A link to the photo taken at the clock in, or null when there is none."},"department_id":{"type":"integer","format":"int32","example":12345,"description":"The team the clock in was attributed to, or null when it was not attributed to one."},"shift_id":{"type":"integer","format":"int32","example":12345,"description":"The shift the clock in was applied to. This is null until the clock in has been processed, and stays null if it was discarded instead of applied to one."},"removed":{"type":"boolean","example":false,"description":"Whether the clock in was discarded rather than applied to a shift. The usual reason is another clock in replacing it."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the clock in was last updated, as a Unix timestamp."}},"required":["id","user_id","device_id","time","type","latitude","longitude","photo","department_id","shift_id","removed","updated_at"],"description":"ClockIn model"},"postV2Clockins":{"type":"object","properties":{"user_id":{"type":"integer","format":"int32","description":"The id of the user clocking in or out.","example":12345},"type":{"type":"string","description":"What the user is doing.","enum":["clockin","clockout","start","finish","break_start","break_finish"],"example":"clockin"},"time":{"type":"integer","format":"int32","description":"When it happened. This cannot be in the future.","example":1456988518},"device_id":{"type":"integer","format":"int32","description":"The id of the device the user clocked in on.","example":12345},"department_id":{"type":"string","description":"The team to attribute the clock in to. Ignored if the user is not already in this team.","example":12345},"photo":{"type":"string","description":"A base64 encoded PNG or JPEG. Once decoded it must not exceed 5MB."},"relaxed_time_constraint":{"type":"boolean","description":"Whether to allow a time that would otherwise be rejected as too far from now.","example":true},"latitude":{"type":"number","format":"float","description":"Where the clock in happened, used to verify the location."},"longitude":{"type":"number","format":"float","description":"Where the clock in happened, used to verify the location."},"mobile_clockin":{"type":"boolean","description":"Whether the clock in came from the mobile app.","example":true},"automatic_break_rule_id":{"type":"integer","format":"int32","description":"The automatic break rule to apply to the shift.","example":12345},"confirmed":{"type":"boolean","description":"Whether the clock in is confirmed rather than awaiting review.","default":true,"example":true},"answers":{"type":"array","description":"Answers to the timeclock questions shown at this clock in. These are not validated, and an invalid answer is ignored without telling you. Send them to the timeclock question answers endpoint instead if you need validation.","items":{"type":"object","properties":{"timeclock_question_id":{"type":"integer","format":"int32"},"trigger":{"type":"string"},"answer":{"type":"number","format":"float"}},"required":["timeclock_question_id","trigger"]}}},"required":["user_id","type","time"],"description":"Perform Clock In for User"},"Qualification":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the qualification."},"name":{"type":"string","example":"Responsible Service of Alcohol","description":"The name of the qualification."},"maximum_hours":{"type":"number","format":"float","example":20.5,"description":"The maximum number of hours per week a staff member with this qualification can be rostered for."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the qualification was last updated, as a Unix timestamp."}},"required":["id","name","maximum_hours","updated_at"],"description":"Qualification model"},"postV2Qualifications":{"type":"object","properties":{"name":{"type":"string"},"maximum_hours":{"type":"number","format":"float"}},"required":["name"],"description":"Create Qualification"},"putV2QualificationsId":{"type":"object","properties":{"name":{"type":"string"},"maximum_hours":{"type":"number","format":"float"}},"required":["name"],"description":"Update Qualification"},"Organisation":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The organisation's unique ID."},"name":{"type":"string","example":"Tom's Restaurant","description":"The organisation's name."},"country":{"type":"string","example":"Australia","description":"The country in which the organisation is legally based."},"locale":{"type":"string","example":"en","description":"The i18n locale for the organisation."},"customer_ids":{"type":"array","items":{"type":"integer","format":"int32"},"example":[748,749],"description":"The ids of this organisation's customers."},"private_award_template_ids":{"type":"array","items":{"type":"integer","format":"int32"},"example":[1,2,3],"description":"The ids of the private award templates this organisation can use."},"industry":{"type":"string","example":"Aged Care","description":"The industry the organisation belongs to."},"payroll_system":{"type":"string","example":"myob,xero","description":"The payroll software the organisation uses."},"time_zone":{"type":"string","example":"Australia/Brisbane","description":"The organisation's time zone name."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the organisation was last updated, as a Unix timestamp."}},"required":["id","name","country","locale","customer_ids","private_award_template_ids","industry","payroll_system","time_zone","updated_at"],"description":"Organisation model"},"postV2Organisations":{"type":"object","properties":{"name":{"type":"string"},"country":{"type":"string","enum":["Afghanistan","Albania","Algeria","American Samoa","Andorra","Angola","Anguilla","Antarctica","Antigua and Barbuda","Argentina","Armenia","Aruba","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bolivia (Plurinational State of)","Bonaire, Sint Eustatius and Saba","Bosnia and Herzegovina","Botswana","Bouvet Island","Brazil","British Indian Ocean Territory","British Virgin Islands","Brunei","Brunei Darussalam","Bulgaria","Burkina Faso","Burundi","Cabo Verde","Cambodia","Cameroon","Canada","Cape Verde","Caribbean Netherlands","Cayman Islands","Central African Republic","Chad","Chile","China","Christmas Island","Cocos (Keeling) Islands","Colombia","Comoros","Congo","Congo (Democratic Republic of the)","Cook Islands","Costa Rica","Croatia","Cuba","Curaçao","Cyprus","Czech Republic","Czechia","CÃ´te dâ€™Ivoire","Côte d'Ivoire","Côte d’Ivoire","Denmark","Djibouti","Dominica","Dominican Republic","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Eswatini","Ethiopia","Falkland Islands","Falkland Islands (Malvinas)","Faroe Islands","Fiji","Finland","France","French Guiana","French Polynesia","French Southern Territories","Gabon","Gambia","Georgia","Germany","Ghana","Gibraltar","Greece","Greenland","Grenada","Guadeloupe","Guam","Guatemala","Guernsey","Guinea","Guinea-Bissau","Guyana","Haiti","Heard Island and McDonald Islands","Holy See","Honduras","Hong Kong","Hungary","Iceland","India","Indonesia","Iran","Iran (Islamic Republic of)","Iran, Islamic Republic Of","Iraq","Ireland","Isle of Man","Israel","Italy","Ivory Coast","Jamaica","Japan","Jersey","Jordan","Kazakhstan","Kenya","Kiribati","Korea (Democratic People's Republic of)","Korea (Republic of)","Korea, Republic of","Kosovo","Kuwait","Kyrgyzstan","Lao People's Democratic Republic","Laos","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","Lithuania","Luxembourg","Macao","Macau","Macedonia","Macedonia (the former Yugoslav Republic of)","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Martinique","Mauritania","Mauritius","Mayotte","Mexico","Micronesia","Micronesia (Federated States of)","Moldova","Moldova (Republic of)","Monaco","Mongolia","Montenegro","Montserrat","Morocco","Mozambique","Myanmar","Namibia","Nauru","Nepal","Netherlands","New Caledonia","New Zealand","Nicaragua","Niger","Nigeria","Niue","Norfolk Island","North Korea","North Macedonia","Northern Mariana Islands","Norway","Oman","Pakistan","Palau","Palestine","Palestine, State of","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Pitcairn","Poland","Portugal","Puerto Rico","Qatar","Romania","Russia","Russian Federation","Rwanda","RÃ©union","Réunion","Saint Barthélemy","Saint Helena, Ascension and Tristan da Cunha","Saint Kitts and Nevis","Saint Lucia","Saint Martin (French part)","Saint Pierre and Miquelon","Saint Vincent and the Grenadines","Samoa","San Marino","Sao Tome and Principe","Saudi Arabia","Senegal","Serbia","Seychelles","Sierra Leone","Singapore","Sint Maarten","Sint Maarten (Dutch part)","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","South Georgia and the South Sandwich Islands","South Korea","South Sudan","Spain","Sri Lanka","Sudan","Suriname","Svalbard and Jan Mayen","Swaziland","Sweden","Switzerland","Syria","Syrian Arab Republic","SÃ£o TomÃ© and PrÃ­ncipe","Taiwan","Taiwan, Province of China","Tajikistan","Tanzania","Tanzania, United Republic of","Thailand","Timor-Leste","Togo","Tokelau","Tonga","Trinidad and Tobago","Tunisia","Turkey","Turkmenistan","Turks and Caicos Islands","Tuvalu","Türkiye","U.S. Virgin Islands","Uganda","Ukraine","United Arab Emirates","United Kingdom","United States","United States Minor Outlying Islands","Uruguay","Uzbekistan","Vanuatu","Venezuela","Venezuela (Bolivarian Republic of)","Viet Nam","Vietnam","Virgin Islands (British)","Virgin Islands (U.S.)","Wallis and Futuna","Western Sahara","Yemen","Zambia","Zimbabwe","Åland Islands"]},"time_zone":{"type":"string","enum":["Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmara","Africa/Asmera","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Timbuktu","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/Buenos_Aires","America/Argentina/Catamarca","America/Argentina/ComodRivadavia","America/Argentina/Cordoba","America/Argentina/Jujuy","America/Argentina/La_Rioja","America/Argentina/Mendoza","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Atikokan","America/Atka","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Buenos_Aires","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Catamarca","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Ciudad_Juarez","America/Coral_Harbour","America/Cordoba","America/Costa_Rica","America/Coyhaique","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Ensenada","America/Fort_Nelson","America/Fort_Wayne","America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Indianapolis","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Indianapolis","America/Inuvik","America/Iqaluit","America/Jamaica","America/Jujuy","America/Juneau","America/Kentucky/Louisville","America/Kentucky/Monticello","America/Knox_IN","America/Kralendijk","America/La_Paz","America/Lima","America/Los_Angeles","America/Louisville","America/Lower_Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Mendoza","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montreal","America/Montserrat","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Nuuk","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Acre","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Rosario","America/Santa_Isabel","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Shiprock","America/Sitka","America/St_Barthelemy","America/St_Johns","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Virgin","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Palmer","Antarctica/Rothera","Antarctica/South_Pole","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Ashkhabad","Asia/Atyrau","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Calcutta","Asia/Chita","Asia/Choibalsan","Asia/Chongqing","Asia/Chungking","Asia/Colombo","Asia/Dacca","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Harbin","Asia/Hebron","Asia/Ho_Chi_Minh","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Istanbul","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Kashgar","Asia/Kathmandu","Asia/Katmandu","Asia/Khandyga","Asia/Kolkata","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macao","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Rangoon","Asia/Riyadh","Asia/Saigon","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Tel_Aviv","Asia/Thimbu","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ujung_Pandang","Asia/Ulaanbaatar","Asia/Ulan_Bator","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yangon","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faeroe","Atlantic/Faroe","Atlantic/Jan_Mayen","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena","Atlantic/Stanley","Australia/ACT","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Canberra","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/LHI","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/NSW","Australia/North","Australia/Perth","Australia/Queensland","Australia/South","Australia/Sydney","Australia/Tasmania","Australia/Victoria","Australia/West","Australia/Yancowinna","Brazil/Acre","Brazil/DeNoronha","Brazil/East","Brazil/West","CET","CST6CDT","Canada/Atlantic","Canada/Central","Canada/Eastern","Canada/Mountain","Canada/Newfoundland","Canada/Pacific","Canada/Saskatchewan","Canada/Yukon","Chile/Continental","Chile/EasterIsland","Cuba","EET","EST","EST5EDT","Egypt","Eire","Etc/GMT","Etc/GMT+0","Etc/GMT+1","Etc/GMT+10","Etc/GMT+11","Etc/GMT+12","Etc/GMT+2","Etc/GMT+3","Etc/GMT+4","Etc/GMT+5","Etc/GMT+6","Etc/GMT+7","Etc/GMT+8","Etc/GMT+9","Etc/GMT-0","Etc/GMT-1","Etc/GMT-10","Etc/GMT-11","Etc/GMT-12","Etc/GMT-13","Etc/GMT-14","Etc/GMT-2","Etc/GMT-3","Etc/GMT-4","Etc/GMT-5","Etc/GMT-6","Etc/GMT-7","Etc/GMT-8","Etc/GMT-9","Etc/GMT0","Etc/Greenwich","Etc/UCT","Etc/UTC","Etc/Universal","Etc/Zulu","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belfast","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Kyiv","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Nicosia","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Saratov","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Tiraspol","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zaporozhye","Europe/Zurich","Factory","GB","GB-Eire","GMT","GMT+0","GMT-0","GMT0","Greenwich","HST","Hongkong","Iceland","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Iran","Israel","Jamaica","Japan","Kwajalein","Libya","MET","MST","MST7MDT","Mexico/BajaNorte","Mexico/BajaSur","Mexico/General","NZ","NZ-CHAT","Navajo","PRC","PST8PDT","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Chuuk","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Johnston","Pacific/Kanton","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Pohnpei","Pacific/Ponape","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Samoa","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Truk","Pacific/Wake","Pacific/Wallis","Pacific/Yap","Poland","Portugal","ROC","ROK","Singapore","Turkey","UCT","US/Alaska","US/Aleutian","US/Arizona","US/Central","US/East-Indiana","US/Eastern","US/Hawaii","US/Indiana-Starke","US/Michigan","US/Mountain","US/Pacific","US/Samoa","UTC","Universal","W-SU","WET","Zulu","GMT-12","International Date Line West","American Samoa","Midway Island","Aleutian Islands","Hawaii","Marquesas Islands","Alaska","Anchorage","Gambier Islands","Pacific Time (Canada)","Pacific Time (US \u0026 Canada)","Pitcairn Islands","Tijuana","Vancouver","Alberta","Arizona","Mazatlan","Mountain Time (US \u0026 Canada)","Central America","Central Time (US \u0026 Canada)","Chihuahua","Easter Islands","Guadalajara","Mexico City","Monterrey","Saskatchewan","Winnipeg","Bogota","Eastern Time (US \u0026 Canada)","Indiana (East)","Lima","Quito","Atlantic Time (Canada)","Caracas","Georgetown","La Paz","Puerto Rico","Santiago","Santo Domingo","Newfoundland","Asuncion","Brasilia","Buenos Aires","Montevideo","GMT-2","Greenland","Mid-Atlantic","Noronha","Azores","Cape Verde Is.","Casablanca","Edinburgh","Lisbon","London","Monrovia","Amsterdam","Belgrade","Berlin","Bern","Bratislava","Brussels","Budapest","Copenhagen","Dublin","Ljubljana","Madrid","Paris","Prague","Rome","Sarajevo","Skopje","Stockholm","Vienna","Warsaw","West Africa","West Central Africa","Zagreb","Zurich","Athens","Beirut","Bucharest","Cairo","Harare","Helsinki","Jerusalem","Kaliningrad","Kyiv","Pretoria","Riga","Sofia","Tallinn","Vilnius","Windhoek","Baghdad","Istanbul","Kuwait","Minsk","Moscow","Nairobi","Riyadh","St. Petersburg","Volgograd","Tehran","Abu Dhabi","Baku","Dubai","Muscat","Samara","Tbilisi","Yerevan","Kabul","Almaty","Astana","Ekaterinburg","Islamabad","Karachi","Tashkent","Calcutta","Chennai","Kolkata","Mumbai","New Delhi","Sri Jayawardenepura","Kathmandu","Dhaka","Omsk","Urumqi","Rangoon","Bangkok","Hanoi","Jakarta","Krasnoyarsk","Novosibirsk","Beijing","Chongqing","Hong Kong","Irkutsk","Kuala Lumpur","Perth","Taipei","Ulaanbaatar","Eucla","Osaka","Sapporo","Seoul","Tokyo","Yakutsk","Adelaide","Darwin","Brisbane","Canberra","Guam","Hobart","Melbourne","Port Moresby","Sydney","Vladivostok","Lord Howe Island","Magadan","New Caledonia","Norfolk Island","Solomon Is.","Srednekolymsk","Auckland","Fiji","Gilbert Islands","Kamchatka","Marshall Is.","Wellington","Chatham Is.","Nuku'alofa","Samoa","Tokelau Is.","Line Islands"]},"locale":{"type":"string","enum":["en-US","en-AU","en","en-GB","en-NZ-dominos","en-NZ","en-PH","de","en-CA","en-AU-dominos","en-AU-HRA","en-MM","ja","tl","mt","en-IN","en-IE","en-ZA","en-AU-AAM","es-MX","id","fr","es","ar","en-TH","es-PE","ja-dominos","es-CO","nl","es-US","en-AU-club","en-JA","he","sv","th","da","es-CL","es-CR","es-NI","es-PA","fr-CA","ms","ro","sr","tr","vi","zh-CN","cy","de-CH","en-AR","en-NL","es-EC","es-ES","fi","fr-FR","fr-SN","hi-IN","hu","is","jmc","ksh","mn","pl","ru","sg","shi","sw","tt","en-CY","en-HE","it","pt","el","fr-dominos","nl-dominos","de-dominos","da-dominos","es-spain","sa"]},"timesheet_interval":{"type":"integer","format":"int32","enum":[1,2]},"week_start_day":{"type":"integer","format":"int32","enum":[0,1,2,3,4,5,6]},"award_template_ids":{"type":"array","items":{"type":"integer","format":"int32"}},"industry":{"type":"string"},"customer_ids":{"type":"array","items":{"type":"integer","format":"int32"}}},"required":["name","country","timesheet_interval","week_start_day"],"description":"Create Organisation"},"putV2OrganisationsId":{"type":"object","properties":{"name":{"type":"string"},"country":{"type":"string","enum":["Afghanistan","Albania","Algeria","American Samoa","Andorra","Angola","Anguilla","Antarctica","Antigua and Barbuda","Argentina","Armenia","Aruba","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bolivia (Plurinational State of)","Bonaire, Sint Eustatius and Saba","Bosnia and Herzegovina","Botswana","Bouvet Island","Brazil","British Indian Ocean Territory","British Virgin Islands","Brunei","Brunei Darussalam","Bulgaria","Burkina Faso","Burundi","Cabo Verde","Cambodia","Cameroon","Canada","Cape Verde","Caribbean Netherlands","Cayman Islands","Central African Republic","Chad","Chile","China","Christmas Island","Cocos (Keeling) Islands","Colombia","Comoros","Congo","Congo (Democratic Republic of the)","Cook Islands","Costa Rica","Croatia","Cuba","Curaçao","Cyprus","Czech Republic","Czechia","CÃ´te dâ€™Ivoire","Côte d'Ivoire","Côte d’Ivoire","Denmark","Djibouti","Dominica","Dominican Republic","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Eswatini","Ethiopia","Falkland Islands","Falkland Islands (Malvinas)","Faroe Islands","Fiji","Finland","France","French Guiana","French Polynesia","French Southern Territories","Gabon","Gambia","Georgia","Germany","Ghana","Gibraltar","Greece","Greenland","Grenada","Guadeloupe","Guam","Guatemala","Guernsey","Guinea","Guinea-Bissau","Guyana","Haiti","Heard Island and McDonald Islands","Holy See","Honduras","Hong Kong","Hungary","Iceland","India","Indonesia","Iran","Iran (Islamic Republic of)","Iran, Islamic Republic Of","Iraq","Ireland","Isle of Man","Israel","Italy","Ivory Coast","Jamaica","Japan","Jersey","Jordan","Kazakhstan","Kenya","Kiribati","Korea (Democratic People's Republic of)","Korea (Republic of)","Korea, Republic of","Kosovo","Kuwait","Kyrgyzstan","Lao People's Democratic Republic","Laos","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","Lithuania","Luxembourg","Macao","Macau","Macedonia","Macedonia (the former Yugoslav Republic of)","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Martinique","Mauritania","Mauritius","Mayotte","Mexico","Micronesia","Micronesia (Federated States of)","Moldova","Moldova (Republic of)","Monaco","Mongolia","Montenegro","Montserrat","Morocco","Mozambique","Myanmar","Namibia","Nauru","Nepal","Netherlands","New Caledonia","New Zealand","Nicaragua","Niger","Nigeria","Niue","Norfolk Island","North Korea","North Macedonia","Northern Mariana Islands","Norway","Oman","Pakistan","Palau","Palestine","Palestine, State of","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Pitcairn","Poland","Portugal","Puerto Rico","Qatar","Romania","Russia","Russian Federation","Rwanda","RÃ©union","Réunion","Saint Barthélemy","Saint Helena, Ascension and Tristan da Cunha","Saint Kitts and Nevis","Saint Lucia","Saint Martin (French part)","Saint Pierre and Miquelon","Saint Vincent and the Grenadines","Samoa","San Marino","Sao Tome and Principe","Saudi Arabia","Senegal","Serbia","Seychelles","Sierra Leone","Singapore","Sint Maarten","Sint Maarten (Dutch part)","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","South Georgia and the South Sandwich Islands","South Korea","South Sudan","Spain","Sri Lanka","Sudan","Suriname","Svalbard and Jan Mayen","Swaziland","Sweden","Switzerland","Syria","Syrian Arab Republic","SÃ£o TomÃ© and PrÃ­ncipe","Taiwan","Taiwan, Province of China","Tajikistan","Tanzania","Tanzania, United Republic of","Thailand","Timor-Leste","Togo","Tokelau","Tonga","Trinidad and Tobago","Tunisia","Turkey","Turkmenistan","Turks and Caicos Islands","Tuvalu","Türkiye","U.S. Virgin Islands","Uganda","Ukraine","United Arab Emirates","United Kingdom","United States","United States Minor Outlying Islands","Uruguay","Uzbekistan","Vanuatu","Venezuela","Venezuela (Bolivarian Republic of)","Viet Nam","Vietnam","Virgin Islands (British)","Virgin Islands (U.S.)","Wallis and Futuna","Western Sahara","Yemen","Zambia","Zimbabwe","Åland Islands"]},"locale":{"type":"string","enum":["en-US","en-AU","en","en-GB","en-NZ-dominos","en-NZ","en-PH","de","en-CA","en-AU-dominos","en-AU-HRA","en-MM","ja","tl","mt","en-IN","en-IE","en-ZA","en-AU-AAM","es-MX","id","fr","es","ar","en-TH","es-PE","ja-dominos","es-CO","nl","es-US","en-AU-club","en-JA","he","sv","th","da","es-CL","es-CR","es-NI","es-PA","fr-CA","ms","ro","sr","tr","vi","zh-CN","cy","de-CH","en-AR","en-NL","es-EC","es-ES","fi","fr-FR","fr-SN","hi-IN","hu","is","jmc","ksh","mn","pl","ru","sg","shi","sw","tt","en-CY","en-HE","it","pt","el","fr-dominos","nl-dominos","de-dominos","da-dominos","es-spain","sa"]},"award_template_ids":{"type":"array","items":{"type":"integer","format":"int32"}},"industry":{"type":"string"},"customer_ids":{"type":"array","items":{"type":"integer","format":"int32"}}},"description":"Update Organisation"},"AwardTemplate":{"type":"object","properties":{"name":{"type":"string","example":"Clerks Private Sector","description":"The name of the award or EBA."},"identifier":{"type":"string","example":"MA000002","description":"An identifier for the award or EBA."},"award_template_id":{"type":"integer","format":"int32","example":12345,"description":"The award template ID, or null when the template is one the organisation created."},"award_template_organisation_id":{"type":"integer","format":"int32","example":12345,"description":"The id linking this template to the organisation, or null when the template is a standard one."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the award template was last updated, as a Unix timestamp."}},"required":["name","identifier","award_template_id","award_template_organisation_id","updated_at"],"description":"AwardTemplate model"},"postV2AwardTemplates":{"type":"object","properties":{"award_template_id":{"type":"integer","format":"int32"},"extract_leave_types":{"type":"boolean"},"replace_leave_types":{"type":"boolean"}},"required":["award_template_id"],"description":"Enable Award Template"},"PersonalDetails":{"type":"object","properties":{"email":{"type":"string","example":"lenny.leonard@springfieldpowerplant.com","description":"The user's email address."},"gender":{"type":"string","example":"male","description":"The user's gender."},"emergency_contacts":{"type":"array","items":{"$ref":"#/components/schemas/PersonalDetailsEmergencyContact"},"description":"The user's emergency contacts."},"residential_address":{"allOf":[{"$ref":"#/components/schemas/Address"}],"description":"The user's residential address, or null. Deprecated in favour of the Users endpoint."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the personal details were last updated, as a Unix timestamp."},"tax_file_number":{"type":"string","example":"123456789","description":"The tax identifier the organisation's region uses — a tax file number in Australia, a National Insurance number in the UK. Only present when the `financial` scope is granted. Deprecated in favour of the Users endpoint."}},"required":["email","gender","emergency_contacts","residential_address","updated_at"],"description":"PersonalDetails model"},"PersonalDetailsEmergencyContact":{"type":"object","properties":{"name":{"type":"string","example":"Marge Simpson","description":"The name of the emergency contact."},"relationship":{"type":"string","example":"Wife","description":"The emergency contact's relationship to the user."},"phone":{"type":"string","example":"0400 000 000","description":"The phone number of the emergency contact."},"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the emergency contact."}},"required":["name","relationship","phone","id"]},"putV2PersonalDetails":{"type":"object","properties":{"gender":{"type":"string","enum":["male","female","non_binary"]},"emergency_contacts":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"relationship":{"type":"string"},"phone":{"type":"string"}},"required":["name","relationship","phone"]}}},"description":"Update Personal Details"},"putV2PersonalDetailsId":{"type":"object","properties":{"gender":{"type":"string","enum":["male","female","non_binary"]},"emergency_contacts":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"relationship":{"type":"string"},"phone":{"type":"string"}},"required":["name","relationship","phone"]}}},"description":"Update Employee's Personal Details"},"Subscription":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The Tanda defined ID for this subscription."},"url":{"type":"string","example":"https://requestb.in/TaNdA","description":"The URL to send notifications to."},"topics":{"type":"array","items":{"type":"string"},"example":["user.created","clockin.updated"],"description":"A list of topics to get notifications for."},"token":{"type":"string","example":"IaMaSeCrEt","description":"A secret used to verify notification authenticity."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the subscription was last updated, as a Unix timestamp."}},"required":["id","url","topics","updated_at"],"description":"Subscription model"},"postV2Webhooks":{"type":"object","properties":{"url":{"type":"string"},"topics":{"type":"array","items":{"type":"string"}},"token":{"type":"string"},"target_url":{"type":"string"},"event":{"type":"array","items":{"type":"string"}}},"description":"Create Subscription"},"postV2TemporaryFiles":{"type":"object","properties":{"file":{"type":"file"},"content_types":{"type":"array","description":"a comma separated list of content types to validate against","example":"image/gif,image/png","items":{"type":"string"}}},"required":["file"],"description":"Create Temporary File"},"TemporaryFile":{"type":"object","properties":{"file_id":{"type":"string","example":"73fe3430-4f5d-3a0a-84a7-cffbeb5efeb2","description":"The id of the uploaded file, to be passed to whichever endpoint the file is being attached through."}},"required":["file_id"],"description":"TemporaryFile model"},"OnboardingForm":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the onboarding form."},"name":{"type":"string","example":"Employee Handbook","description":"The name of the onboarding form."},"attachment":{"type":"string","example":"https://example.com/employee-handbook.pdf","description":"A link to download the form."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the onboarding form was last updated, as a Unix timestamp."}},"required":["id","name","attachment","updated_at"],"description":"OnboardingForm model"},"postV2OnboardingFormsSign":{"type":"object","properties":{"forms":{"type":"array","items":{"type":"object","properties":{"form_id":{"type":"integer","format":"int32","description":"The id of the onboarding form being signed.","example":12345}},"required":["form_id"]}}},"required":["forms"],"description":"Sign Onboarding Form"},"OrganisationQuestion":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the question."},"question":{"type":"string","example":"What is your shirt size?","description":"The question the employee is asked."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the question was last updated, as a Unix timestamp."}},"required":["id","question","updated_at"],"description":"OrganisationQuestion model"},"postV2OrganisationQuestionsAnswers":{"type":"object","properties":{"answers":{"type":"array","items":{"type":"object","properties":{"organisation_question_id":{"type":"integer","format":"int32","description":"The id of the question being answered.","example":12345},"answer":{"type":"string","description":"The employee's answer to the question.","example":"Medium"}},"required":["organisation_question_id","answer"]}}},"required":["answers"],"description":"Answer Organisation Questions"},"UserContract":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the contract."},"user_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the employee the contract is for."},"template_name":{"type":"string","example":"Casual Employment Agreement","description":"The name of the template the contract was made from."},"final_content":{"type":"string","example":"\u003cdiv\u003eThis agreement is made between Lenny Leonard and ...\u003c/div\u003e","description":"The contract as the employee sees it, as HTML."},"contract_template_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the template the contract was made from, or null when it came from a built-in template."},"fixture":{"type":"string","description":"The built-in template the contract was made from, or null when it came from the organisation's own template."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the contract was last updated, as a Unix timestamp."}},"required":["id","user_id","template_name","final_content","contract_template_id","fixture","updated_at"],"description":"UserContract model"},"postV2UserContractsSign":{"type":"object","properties":{"user_contracts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"The id of the contract being signed.","example":12345}},"required":["id"]}}},"required":["user_contracts"],"description":"Sign User Contract"},"ShiftReminder":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the shift reminder."},"minutes_before_shift_start":{"type":"integer","format":"int32","example":120,"description":"How long before the shift starts the reminder is sent, in minutes."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the shift reminder was last updated, as a Unix timestamp."}},"required":["id","minutes_before_shift_start","updated_at"],"description":"ShiftReminder model"},"postV2ShiftReminders":{"type":"object","properties":{"minutes_before_shift_start":{"type":"integer","format":"int32","example":120}},"required":["minutes_before_shift_start"],"description":"Create Shift Reminder"},"putV2ShiftRemindersId":{"type":"object","properties":{"minutes_before_shift_start":{"type":"integer","format":"int32","example":45}},"required":["minutes_before_shift_start"],"description":"Update Shift Reminder"},"ScheduleSwapPlan":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the swap plan."},"schedule_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the schedule being given away."},"sender_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the user giving the schedule away."},"recipient_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the user taking the schedule on, once the swap has been settled."},"status":{"type":"string","enum":["pending","approved","rejected"],"example":"pending","description":"The state of the swap plan."},"strategy":{"type":"string","enum":["undecided","broadcasted","curated","swap"],"example":"broadcasted","description":"The strategy for finding someone to take the shift."},"reason":{"type":"string","example":"Away that weekend","description":"Why the schedule is being given away."},"schedule_to_swap_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the schedule offered in exchange, for a direct swap."},"organisation_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the organisation the swap plan belongs to."},"incentive_amount":{"type":"string","example":"25.0","description":"The bonus offered for taking the schedule on, as a decimal string."},"availability_choice":{"type":"string","enum":["pending","mark_unavailable","stay_available"],"example":"pending","description":"How the sender's availability should be treated once the swap settles."},"created_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the swap plan was created, as a Unix timestamp."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the swap plan was last updated, as a Unix timestamp."}},"required":["id","schedule_id","sender_id","recipient_id","status","strategy","reason","schedule_to_swap_id","organisation_id","incentive_amount","availability_choice","created_at","updated_at"],"description":"ScheduleSwapPlan model"},"postV2ScheduleSwapPlans":{"type":"object","properties":{"schedule_id":{"type":"integer","format":"int32"},"prepare_auto_broadcast":{"type":"boolean"},"reason":{"type":"string"}},"required":["schedule_id"],"description":"Create Schedule Swap Plan"},"putV2ScheduleSwapPlansIdCurate":{"type":"object","properties":{"proposal_ids":{"type":"array","example":[12345,12346],"items":{"type":"integer","format":"int32"}}},"required":["proposal_ids"],"description":"Curate A Swap"},"ScheduleSwapProposal":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the proposal."},"schedule_swap_plan_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the swap plan this proposal belongs to."},"user_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the employee the schedule is being offered to."},"status":{"type":"string","enum":["concealed","pending","seen","accepted","approved","rejected"],"example":"pending","description":"The state of the proposal."},"strategy":{"type":"string","enum":["undecided","broadcasted","curated","swap"],"example":"broadcasted","description":"The strategy of the parent swap plan."},"response":{"type":"string","example":"Happy to pick this up","description":"The employee's note when responding to the offer."},"complete":{"type":"boolean","example":false,"description":"Whether the proposal's roster and schedule details have finished being calculated."},"roster_details":{"allOf":[{"$ref":"#/components/schemas/RosterDetails"}],"description":"How taking the schedule on would affect this employee's roster."},"schedule_details":{"allOf":[{"$ref":"#/components/schemas/ScheduleDetails"}],"description":"The schedule being offered."},"created_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the proposal was created, as a Unix timestamp."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the proposal was last updated, as a Unix timestamp."}},"required":["id","schedule_swap_plan_id","user_id","status","strategy","response","complete","roster_details","schedule_details","created_at","updated_at"],"description":"ScheduleSwapProposal model"},"RosterDetails":{"type":"object","properties":{"hours_in_week":{"type":"number","format":"float","example":32.5,"description":"How many hours the employee would work that week if they took the schedule on, counting the schedule itself."},"errors":{"type":"array","items":{"$ref":"#/components/schemas/RosterError"},"description":"The roster validation rules this employee would break by taking the schedule on."}},"required":["hours_in_week","errors"]},"RosterError":{"type":"object","properties":{"rule":{"type":"number","format":"float","example":180.0,"description":"The limit the broken rule enforces. A `rule` of 180 with a `type` of `earliest_start` means the employee must not start before 03:00."},"type":{"type":"string","example":"max_shifts_in_day","description":"Which roster validation rule was broken."},"message":{"type":"string","example":"More than 1 shift in a day","description":"A description of the broken rule, suitable for showing to the employee."}},"required":["rule","type","message"]},"ScheduleDetails":{"type":"object","properties":{"automatic_break_length":{"type":"number","format":"float","example":30.0,"description":"The length of the schedule's automatic break, in minutes."},"breaks":{"type":"array","items":{"$ref":"#/components/schemas/SwapProposalScheduleBreak"},"description":"The schedule's breaks."},"cost":{"type":"number","format":"float","example":240.5,"description":"What the schedule would cost. `0` unless the caller can see wages."},"department_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the schedule's department."},"finish":{"type":"integer","format":"int32","example":1456916400,"description":"The end of the schedule, as a Unix timestamp."},"shift_detail_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the schedule's shift detail."},"start":{"type":"integer","format":"int32","example":1456902000,"description":"The start of the schedule, as a Unix timestamp."}},"required":["automatic_break_length","breaks","cost","department_id","finish","shift_detail_id","start"]},"SwapProposalScheduleBreak":{"type":"object","properties":{"start":{"type":"integer","format":"int32","example":1456902000,"description":"The start of the break, as a Unix timestamp."},"finish":{"type":"integer","format":"int32","example":1456916400,"description":"The end of the break, as a Unix timestamp."}},"required":["start","finish"]},"putV2ScheduleSwapProposalsIdStatus":{"type":"object","properties":{"status":{"type":"string","description":"Must be one of 'seen', 'accepted', 'approved', 'rejected'","enum":["seen","accepted","approved","rejected"],"example":"seen"}},"required":["status"],"description":"Schedule Swap Proposal"},"CustomEvent":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the custom event."},"organisation_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the organisation the custom event belongs to."},"name":{"type":"string","example":"Christmas Trading","description":"The name of the custom event."},"start":{"type":"string","format":"date","example":"2016-03-15","description":"The first day of the custom event."},"finish":{"type":"string","format":"date","example":"2016-03-17","description":"The last day of the custom event."},"discourage_time_off":{"type":"boolean","example":true,"description":"Whether employees are discouraged from taking leave during the custom event."},"locations":{"type":"array","items":{"type":"integer","format":"int32"},"example":[12345,12346],"description":"The ids of the locations the custom event applies to."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the custom event was last updated, as a Unix timestamp."}},"required":["id","organisation_id","name","start","finish","discourage_time_off","locations","updated_at"],"description":"CustomEvent model"},"postV2CustomEvents":{"type":"object","properties":{"name":{"type":"string"},"start":{"type":"string","format":"date"},"finish":{"type":"string","format":"date"},"discourage_time_off":{"type":"boolean"},"custom_event_joins_attributes":{"type":"array","items":{"type":"object","properties":{"location_id":{"type":"integer","format":"int32"}}}}},"required":["name","start","finish","discourage_time_off","custom_event_joins_attributes"],"description":"Create Custom Events List"},"putV2CustomEventsId":{"type":"object","properties":{"name":{"type":"string"},"start":{"type":"string","format":"date"},"finish":{"type":"string","format":"date"},"discourage_time_off":{"type":"boolean"}},"description":"Update Custom Event Request"},"putV2CustomEventsIdLocations":{"type":"object","properties":{"location_ids":{"type":"array","example":[12345,12346],"items":{"type":"integer","format":"int32"}}},"required":["location_ids"],"description":"Update Custom Event Locations"},"AdoptionMetrics":{"type":"object","properties":{"last_sign_in":{"type":"integer","format":"int32","example":1456988518,"description":"When an administrator last signed in, as a Unix timestamp."},"active_employees":{"type":"integer","format":"int32","example":120,"description":"How many active employees the organisation has."},"app":{"allOf":[{"$ref":"#/components/schemas/AppAdoptionMetric"}],"description":"How many employees have signed in to the mobile app."},"timesheets":{"allOf":[{"$ref":"#/components/schemas/TimesheetAdoptionMetric"}],"description":"How many employees had a timesheet exported over the period."},"approved_timesheets":{"allOf":[{"$ref":"#/components/schemas/TimesheetAdoptionMetric"}],"description":"How many employees had a timesheet approved over the period."},"clockins":{"allOf":[{"$ref":"#/components/schemas/ClockinAdoptionMetric"}],"description":"How many employees clocked in over the period."},"rostering":{"allOf":[{"$ref":"#/components/schemas/RosteringAdoptionMetric"}],"description":"How many employees were rostered over the period."},"onboarding":{"allOf":[{"$ref":"#/components/schemas/OnboardingMetric"}],"description":"Employees added over the period and how they were onboarded."}},"required":["last_sign_in","active_employees","app","timesheets","approved_timesheets","clockins","rostering","onboarding"],"description":"AdoptionMetrics model"},"AppAdoptionMetric":{"type":"object","properties":{"average":{"type":"integer","format":"int32","example":42,"description":"How many active employees the metric applied to over the requested period."},"delta":{"type":"number","format":"float","example":0.0,"description":"Always 0. Mobile app usage is not compared against the preceding period."},"with_app":{"type":"array","items":{"type":"integer","format":"int32"},"example":[12345,12346],"description":"The ids of employees who have used the mobile app. Only present when `include_user_ids` is set."},"without_app":{"type":"array","items":{"type":"integer","format":"int32"},"example":[12345,12346],"description":"The ids of employees who have not used the mobile app. Only present when `include_user_ids` is set."}},"required":["average","delta"]},"TimesheetAdoptionMetric":{"type":"object","properties":{"average":{"type":"integer","format":"int32","example":42,"description":"How many active employees the metric applied to over the requested period."},"delta":{"type":"number","format":"float","example":12.5,"description":"The change against the preceding period of the same length, as a percentage of active employees."},"recent_timesheets":{"type":"array","items":{"type":"integer","format":"int32"},"example":[12345,12346],"description":"The ids of employees with a timesheet in the period. Only present when `include_user_ids` is set."}},"required":["average","delta"]},"ClockinAdoptionMetric":{"type":"object","properties":{"average":{"type":"integer","format":"int32","example":42,"description":"How many active employees the metric applied to over the requested period."},"delta":{"type":"number","format":"float","example":12.5,"description":"The change against the preceding period of the same length, as a percentage of active employees."},"clocked_in_recently":{"type":"array","items":{"type":"integer","format":"int32"},"example":[12345,12346],"description":"The ids of employees who clocked in during the period. Only present when `include_user_ids` is set."}},"required":["average","delta"]},"RosteringAdoptionMetric":{"type":"object","properties":{"average":{"type":"integer","format":"int32","example":42,"description":"How many active employees the metric applied to over the requested period."},"delta":{"type":"number","format":"float","example":12.5,"description":"The change against the preceding period of the same length, as a percentage of active employees."},"scheduled_recently":{"type":"array","items":{"type":"integer","format":"int32"},"example":[12345,12346],"description":"The ids of employees who were rostered during the period. Only present when `include_user_ids` is set."}},"required":["average","delta"]},"OnboardingMetric":{"type":"object","properties":{"completed":{"type":"integer","format":"int32","example":12,"description":"How many employees finished onboarding in the period, or their ids when `include_user_ids` is set."},"added_manually":{"type":"integer","format":"int32","example":3,"description":"How many employees were added without onboarding, or their ids when `include_user_ids` is set."},"new":{"type":"integer","format":"int32","example":15,"description":"How many employees were added in the period, or their ids when `include_user_ids` is set."}},"required":["completed","added_manually","new"]},"Announcement":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the announcement."},"title":{"type":"string","example":"Office Closure","description":"The title of the announcement."},"content":{"type":"string","example":"The office will be closed on Friday for maintenance.","description":"The plain text body of the announcement."},"rich_content":{"type":"string","example":"\u003cdiv\u003eThe office will be closed on \u003cstrong\u003eFriday\u003c/strong\u003e for maintenance.\u003c/div\u003e","description":"The rich text HTML body of the announcement, or `null` when the announcement has no rich content."},"sender_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the user who posted the announcement."},"communication_room_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the announcement room the announcement was posted to."},"communication_room_name":{"type":"string","example":"Company Announcements","description":"The name of the announcement room the announcement was posted to."},"created_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the announcement was created."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the announcement was last updated."}},"required":["id","title","content","rich_content","sender_id","communication_room_id","communication_room_name","created_at","updated_at"],"description":"Announcement model"},"postV2Announcements":{"type":"object","properties":{"communication_room_id":{"type":"integer","format":"int32"},"title":{"type":"string"},"content":{"type":"string"},"rich_content":{"type":"string"},"sender_id":{"type":"integer","format":"int32"},"created_at":{"type":"integer","format":"int32"},"notify":{"type":"boolean","default":true}},"required":["communication_room_id","title"],"description":"Create Announcement"},"AnnouncementRoom":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the announcement room."},"name":{"type":"string","example":"Warehouse Announcements","description":"The name of the announcement room."},"description":{"type":"string","example":"Updates for the warehouse team","description":"A short explanation of what the announcement room is for."},"organisation_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the organisation the announcement room belongs to."},"team_ids":{"type":"array","items":{"type":"integer","format":"int32"},"example":[12345,12346],"description":"The ids of the teams the announcement room is assigned to."},"location_ids":{"type":"array","items":{"type":"integer","format":"int32"},"example":[12345,12346],"description":"The ids of the locations the announcement room is assigned to."},"archived":{"type":"boolean","example":false,"description":"Whether the announcement room has been archived."},"created_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the announcement room was created."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the announcement room was last updated."}},"required":["id","name","description","organisation_id","team_ids","location_ids","archived","created_at","updated_at"],"description":"AnnouncementRoom model"},"postV2AnnouncementRooms":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","description":"A short explanation of what the group is for. At most 200 characters.","example":"Updates for the warehouse team"},"team_ids":{"type":"array","items":{"type":"integer","format":"int32"}},"location_ids":{"type":"array","items":{"type":"integer","format":"int32"}}},"required":["name"],"description":"Create Announcement Room"},"putV2AnnouncementRoomsId":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","description":"A short explanation of what the group is for. At most 200 characters.","example":"Updates for the warehouse team"},"team_ids":{"type":"array","items":{"type":"integer","format":"int32"}},"location_ids":{"type":"array","items":{"type":"integer","format":"int32"}}},"required":["name"],"description":"Update Announcement Room"},"postV2ShiftRatings":{"type":"object","properties":{"employee_number":{"type":"string"},"user_id":{"type":"integer","format":"int32"},"date":{"type":"string","format":"date"},"rating":{"type":"integer","format":"int32","minimum":1,"maximum":5}},"required":["date","rating"],"description":"Post Shift Ratings"},"PayConditionSet":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the pay condition set."},"reason_for_change":{"type":"string","example":"Annual pay review","description":"Why these pay conditions were put in place."},"from_date":{"type":"string","format":"date","example":"2016-03-15","description":"The date these pay conditions start applying from."},"to_date":{"type":"string","format":"date","example":"2016-03-17","description":"The date these pay conditions stop applying, or null if they apply indefinitely."},"hourly_rate":{"type":"number","format":"float","example":32.47,"description":"The hourly rate of the employee."},"award_tags":{"type":"string","example":"Level 8,Full Time,First Aid Certificate","description":"A comma separated list of the award tags that apply to the employee."},"yearly_salary":{"type":"number","format":"float","example":64212.16,"description":"The salary of the employee, annualised from the weekly salary that is stored."},"contracted_weekly_hours":{"type":"number","format":"float","example":38.0,"description":"The number of hours the employee is contracted to work each week."},"user_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the user these pay conditions belong to."},"award_template_organisation_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the award template organisation these pay conditions are interpreted against."},"created_at":{"type":"string","format":"date-time","example":"2016-03-15T09:00:00+10:00","description":"When the pay condition set was created (NOTE: an ISO8601 date-time string, not the unix timestamp used elsewhere in this API)."},"updated_at":{"type":"string","format":"date-time","example":"2016-03-15T09:00:00+10:00","description":"When the pay condition set was last updated (NOTE: an ISO8601 date-time string, not the unix timestamp used elsewhere in this API)."}},"required":["id","reason_for_change","from_date","to_date","hourly_rate","award_tags","yearly_salary","contracted_weekly_hours","user_id","award_template_organisation_id","created_at","updated_at"],"description":"PayConditionSet model"},"postV2WageComparisons":{"type":"object","properties":{"user_id":{"type":"integer","format":"int32","description":"The ID of the user being compared.","example":12345},"from_date":{"type":"string","format":"date","description":"The date comparison starts from.","example":"2016-03-02"},"to_date":{"type":"string","format":"date","description":"The date the comparison goes to, will go forever and ever, if it's left blank.","example":"2016-03-02"},"award_template_organisation_id":{"type":"integer","format":"int32","description":"the relevant award template organisation id.","example":12345},"hourly_rate":{"type":"number","format":"float","description":"The hourly rate of the comparison.","example":22.56},"salary":{"type":"number","format":"float","description":"the salary of the comparison.","example":70592},"award_tags":{"type":"string","description":"A comma separated list of award tags that apply to the comparison.","example":"full time, meal break"}},"required":["user_id","from_date"],"description":"Create Wage Comparison"},"putV2WageComparisonsId":{"type":"object","properties":{"user_id":{"type":"integer","format":"int32","description":"The ID of the user being compared.","example":12345},"from_date":{"type":"string","format":"date","description":"The date comparison starts from.","example":"2016-03-02"},"to_date":{"type":"string","format":"date","description":"The date the comparison goes to, will go forever and ever, if it's left blank.","example":"2016-03-02"},"award_template_organisation_id":{"type":"integer","format":"int32","description":"the relevant award template organisation id.","example":12345},"hourly_rate":{"type":"number","format":"float","description":"The hourly rate of the comparison.","example":22.56},"salary":{"type":"number","format":"float","description":"the salary of the comparison.","example":70592},"award_tags":{"type":"string","description":"A comma separated list of award tags that apply to the comparison.","example":"full time, meal break"}},"description":"Update Wage Comparison"},"OuterLimitsUserSetting":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the outer limits user setting."},"penalty_hours":{"type":"number","format":"float","example":6.0,"description":"The outer limit of penalty hours."},"overtime_hours":{"type":"number","format":"float","example":6.0,"description":"The outer limit of overtime hours."},"averaging_cadence":{"type":"string","enum":["pay_cycle","overtime_averaging","other"],"example":"pay_cycle","description":"The averaging cadence to use."},"custom_cycle_length":{"type":"string","enum":["weekly","fortnightly","three_weekly","four_weekly"],"example":"weekly","description":"The cycle length used when `averaging_cadence` is `other`, otherwise null."},"custom_anchor_date":{"type":"string","format":"date","example":"2016-03-02","description":"The date each cycle is anchored to when `averaging_cadence` is `other`, otherwise null."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the outer limits user setting was last updated, in unix time."}},"required":["id","penalty_hours","overtime_hours","averaging_cadence","custom_cycle_length","custom_anchor_date","updated_at"],"description":"OuterLimitsUserSetting model"},"postV2WageComparisonsWageComparisonIdOuterLimits":{"type":"object","properties":{"penalty_hours":{"type":"number","format":"float"},"overtime_hours":{"type":"number","format":"float"},"averaging_cadence":{"type":"string","enum":["pay_cycle","overtime_averaging","other"]},"custom_cycle_length":{"type":"string","enum":["weekly","fortnightly","three_weekly","four_weekly"]},"custom_anchor_date":{"type":"string","format":"date"}},"required":["penalty_hours","overtime_hours","averaging_cadence","custom_cycle_length","custom_anchor_date"],"description":"Create Wage Comparison Outer Limits User Setting"},"putV2WageComparisonsWageComparisonIdOuterLimits":{"type":"object","properties":{"penalty_hours":{"type":"number","format":"float"},"overtime_hours":{"type":"number","format":"float"},"averaging_cadence":{"type":"string","enum":["pay_cycle","overtime_averaging","other"]},"custom_cycle_length":{"type":"string","enum":["weekly","fortnightly","three_weekly","four_weekly"]},"custom_anchor_date":{"type":"string","format":"date"}},"description":"Update Wage Comparison Outer Limits User Setting"},"WageCompareReportingPeriod":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the reporting period."},"user_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the user the reporting period belongs to."},"period_type":{"type":"string","enum":["pay_cycle","quarterly","six_monthly","yearly"],"example":"quarterly","description":"The reporting cadence."},"anchor_date_type":{"type":"string","enum":["employment_start_date","earliest_wage_comparison_from_date","custom","not_applicable"],"example":"custom","description":"How the anchor date is determined. Always `not_applicable` when `period_type` is `pay_cycle`."},"custom_anchor_date":{"type":"string","format":"date","example":"2016-03-02","description":"The anchor date used when `anchor_date_type` is `custom`, otherwise null."},"anchor_date":{"type":"string","format":"date","example":"2016-03-02","description":"The resolved anchor date the reporting cadence is calculated from."},"current_reporting_period":{"type":"array","items":{"type":"string","format":"date"},"example":["2016-03-15","2016-03-17"],"description":"The start and end dates of the reporting period the user is currently in."},"next_reporting_date":{"type":"string","format":"date","example":"2016-03-17","description":"The date the next wage compare report is due."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the reporting period was last updated, in unix time."}},"required":["id","user_id","period_type","anchor_date_type","custom_anchor_date","anchor_date","current_reporting_period","next_reporting_date","updated_at"],"description":"WageCompareReportingPeriod model"},"postV2WageComparisonsReportingPeriodsUserUserId":{"type":"object","properties":{"period_type":{"type":"string","enum":["pay_cycle","quarterly","six_monthly","yearly"]},"anchor_date_type":{"type":"string","enum":["employment_start_date","earliest_wage_comparison_from_date","custom","not_applicable"]},"custom_anchor_date":{"type":"string","format":"date"}},"required":["period_type","custom_anchor_date"],"description":"Create User Reporting Period"},"putV2WageComparisonsReportingPeriodsUserUserId":{"type":"object","properties":{"period_type":{"type":"string","enum":["pay_cycle","quarterly","six_monthly","yearly"]},"anchor_date_type":{"type":"string","enum":["employment_start_date","earliest_wage_comparison_from_date","custom","not_applicable"]},"custom_anchor_date":{"type":"string","format":"date"}},"description":"Update User Reporting Period"},"UserPayField":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the payfield."},"reason_for_change":{"type":"string","example":"Pay Fields Update Jan 2022","description":"The name of a pay field change, usually specifying the reason."},"from_date":{"type":"string","example":"1970-1-1","description":"The effective date that the grouping of payfields applies after."},"to_date":{"type":"string","example":"1970-1-1","description":"The effective date that the grouping of payfields applies until."},"hourly_rate":{"type":"number","format":"float","example":0.0,"description":"Hourly rate of the employee for the effective date."},"award_tags":{"type":"string","example":"Casual,Level 1","description":"Comma-separated award tags applied to the employee for the effective date."},"yearly_salary":{"type":"number","format":"float","example":60000,"description":"Yearly Salary of the employee for the effective date."},"contracted_weekly_hours":{"type":"number","format":"float","example":38,"description":"The number of hours per week the employee is contracted to work for the effective date."},"user_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the user these payfields apply to."},"award_template_organisation_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the award template organisation that is attached to this user."},"created_at":{"type":"string","example":"2022-01-01T00:00:00Z","description":"When the payfield record was created."},"updated_at":{"type":"string","example":"2022-01-01T00:00:00Z","description":"When the payfield record was last updated."}},"required":["id","reason_for_change","from_date","to_date","hourly_rate","award_tags","yearly_salary","contracted_weekly_hours","user_id","award_template_organisation_id","created_at","updated_at"],"description":"UserPayField model"},"UserPayFieldVerification":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the payfield."},"from":{"allOf":[{"$ref":"#/components/schemas/UserPayFieldVerificationDate"}],"description":"Validity window start."},"to":{"allOf":[{"$ref":"#/components/schemas/UserPayFieldVerificationDate"}],"description":"Validity window end."},"errors":{"type":"array","items":{"type":"string"},"example":["Something is wrong","Something else is wrong"]}},"required":["id","from","to","errors"],"description":"UserPayFieldVerification model"},"UserPayFieldVerificationDate":{"type":"object","properties":{"date":{"type":"string","example":"2022-01-01","description":"When the pay conditions took effect. For a user's base pay conditions this is their employment start date, and falls back to a label such as `Employment Start` when no start date is recorded, so this is not always parseable as a date."},"valid":{"type":"boolean","example":true,"description":"Whether this end of the range meets the neighbouring pay field without leaving a gap or overlapping it. This says nothing about whether `date` above is a usable date."}},"required":["date","valid"]},"postV2UserPayFields":{"type":"object","properties":{"user_id":{"type":"integer","format":"int32"},"from_date":{"type":"string","format":"date"},"to_date":{"type":"string","format":"date"},"reason_for_change":{"type":"string"},"award_template_organisation_id":{"type":"integer","format":"int32"},"hourly_rate":{"type":"number","format":"float"},"yearly_salary":{"type":"number","format":"float"},"contracted_weekly_hours":{"type":"number","format":"float"},"award_tags":{"type":"string"}},"required":["user_id","from_date"],"description":"Create Payfield"},"putV2UserPayFieldsId":{"type":"object","properties":{"user_id":{"type":"integer","format":"int32"},"from_date":{"type":"string","format":"date"},"to_date":{"type":"string","format":"date"},"reason_for_change":{"type":"string"},"award_template_organisation_id":{"type":"integer","format":"int32"},"hourly_rate":{"type":"number","format":"float"},"yearly_salary":{"type":"number","format":"float"},"contracted_weekly_hours":{"type":"number","format":"float"},"award_tags":{"type":"string"}},"description":"Update Payfield"},"postV2UserPayFieldsUserUserId":{"type":"object","properties":{"pay_fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"from_date":{"type":"string","format":"date"},"to_date":{"type":"string","format":"date"},"reason_for_change":{"type":"string"},"award_template_organisation_id":{"type":"integer","format":"int32"},"hourly_rate":{"type":"number","format":"float"},"yearly_salary":{"type":"number","format":"float"},"contracted_weekly_hours":{"type":"number","format":"float"},"award_tags":{"type":"string"}}}}},"required":["pay_fields"],"description":"Create \u0026 Update Multiple Pay Fields For A User"},"RecommendedHours":{"type":"object","properties":{"department_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the department."},"department_name":{"type":"string","example":"Delivery Team","description":"The name of the department."},"total_recommended_hours_for_date_range":{"type":"number","format":"float","example":66.0,"description":"The total recommended hours across the whole date range. Returned in minutes when `in_minutes=true`."},"recommended_hours_by_date":{"type":"object","example":{"2016-04-01":31.0,"2016-04-02":10.0,"2016-04-03":25.0},"description":"A free-form object whose keys are the dates in the requested range. By default each date maps to a single number, the recommended hours for that date, e.g. `{\"2016-04-01\": 31.0}`. When `full_increments=true` each date instead maps to a nested object of 15 minute increment start times to their own value, e.g. `{\"2016-04-01\": {\"2016-04-01T06:00:00.000+10:00\": 0.25}}`. `in_minutes=true` returns minutes instead of hours without changing either shape."}},"required":["department_id","department_name","total_recommended_hours_for_date_range","recommended_hours_by_date"],"description":"RecommendedHours model"},"postV2UserFiles":{"type":"object","properties":{"file":{"type":"file","description":"The file to upload"},"user_id":{"type":"integer","format":"int32","description":"The ID of the user to attach the file to","example":12345},"document_type":{"type":"string","description":"How the file is classified. Defaults to `other`.","enum":["warning","contract","document","performance_review","training","form","file_note","other"],"example":"contract"},"viewable_by_attached_user":{"type":"boolean","description":"Whether the attached user can see the file. Defaults to `true`.","example":true},"viewable_by_attached_users_managers":{"type":"boolean","description":"Whether the attached user's managers can see the file. Defaults to `true`.","example":true}},"required":["file","user_id"],"description":"Upload User File"},"UserFile":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the uploaded user file."}},"required":["id"],"description":"UserFile model"},"TrainingTemplate":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the training course."},"name":{"type":"string","example":"Food Safety Level 1","description":"The name of the training course."},"active":{"type":"boolean","example":true,"description":"The on/off switch for the course. Switching it off stops it being assigned, but a course that is switched on is not necessarily ready to assign yet."},"template_type":{"type":"string","enum":["native","scorm"],"example":"native","description":"How the course is delivered. `native` is built and answered in Tanda, `scorm` is an uploaded SCORM package."},"categories":{"type":"array","items":{"type":"string"},"example":["compliance"],"description":"The categories the course is tagged with."},"allow_retry":{"type":"boolean","example":false,"description":"Whether staff can attempt the course again after failing it."},"scoring_rule":{"type":"string","enum":["overall_score","per_section_score"],"example":"overall_score","description":"Whether the pass mark applies to the course as a whole or to each of its sections."},"required_pass_percentage":{"type":"integer","format":"int32","example":80,"description":"The percentage a staff member must score to pass. Null when the course is not scored."},"triggers_roster_validations":{"type":"boolean","example":false,"description":"Whether rostering a staff member who has not completed this course raises a roster warning."},"expiry_type":{"type":"string","enum":["never_expires","expires_on_date","expires_on_interval"],"example":"never_expires","description":"When a completed training expires. `expires_on_date` uses `expires_on_month` and `expires_on_day`, `expires_on_interval` uses `expires_after_months`."},"expires_after_months":{"type":"integer","format":"int32","example":12,"description":"Months after completion that the training expires, when `expiry_type` is `expires_on_interval`."},"expires_on_month":{"type":"integer","format":"int32","example":6,"description":"Month of the year the training expires on, when `expiry_type` is `expires_on_date`."},"expires_on_day":{"type":"integer","format":"int32","example":30,"description":"Day of the month the training expires on, when `expiry_type` is `expires_on_date`."},"created_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the course was created, as a Unix timestamp."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the course was last updated, as a Unix timestamp."}},"required":["id","name","active","template_type","categories","allow_retry","scoring_rule","required_pass_percentage","triggers_roster_validations","expiry_type","expires_after_months","expires_on_month","expires_on_day","created_at","updated_at"],"description":"TrainingTemplate model"},"Training":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12345,"description":"The id of the training."},"user_id":{"type":"integer","format":"int32","example":12345,"description":"The staff member it belongs to."},"training_template_id":{"type":"integer","format":"int32","example":12345,"description":"The id of the course this training came from. Null once that course has been deleted."},"name":{"type":"string","example":"Food Safety Level 1","description":"The name of the course, as it was when the training was assigned."},"status":{"type":"string","enum":["created","assigned","in_progress","completed","expired"],"example":"completed","description":"How far through the training the staff member is."},"result_status":{"type":"string","enum":["passed","failed","na"],"example":"passed","description":"The outcome. `na` means the training was not scored, or is not finished yet."},"training_type":{"type":"string","enum":["native","scorm","file"],"example":"native","description":"How it was delivered: answered in Tanda, completed in a SCORM package, or recorded against an uploaded certificate."},"score_percentage":{"type":"number","format":"float","example":92.5,"description":"The percentage scored, out of 100. Null until finished, and when nothing has a correct answer."},"required_pass_percentage":{"type":"integer","format":"int32","example":80,"description":"The percentage needed to pass, set when it was assigned."},"expiry_date":{"type":"string","example":"2016-03-02","description":"The date it stops counting as complete. Null when it never expires, or is unfinished."},"assigned_by_id":{"type":"integer","format":"int32","example":12345,"description":"Who assigned the training."},"started_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the staff member opened the training, as a Unix timestamp."},"finished_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the staff member finished the training, as a Unix timestamp."},"created_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the training was assigned, as a Unix timestamp."},"updated_at":{"type":"integer","format":"int32","example":1456988518,"description":"When the training was last updated, as a Unix timestamp."}},"required":["id","user_id","training_template_id","name","status","result_status","training_type","score_percentage","required_pass_percentage","expiry_date","assigned_by_id","started_at","finished_at","created_at","updated_at"],"description":"Training model"}},"securitySchemes":{"tanda_oauth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/oauth/authorize","tokenUrl":"/oauth/token","scopes":{"roster":"roster","timesheet":"timesheet","department":"department","role":"role","user":"user","cost":"cost","leave":"leave","unavailability":"unavailability","datastream":"datastream","device":"device","sms":"sms","me":"me","right_to_work":"right_to_work","settings":"settings","organisation":"organisation","qualifications":"qualifications","training":"training","financial":"financial","personal":"personal","platform":"platform","payroll":"payroll","ats":"ats","communication":"communication"}}}}}},"x-tagGroups":[{"name":"API Reference","tags":["schedule_acceptance","unavailability","pay_groups","super_funds","temporary_files","onboarding_forms","organisation_questions","user_contracts","custom_events","announcement_rooms","announcements","ats","availability","award_tags","award_templates","clockins","cognitive_creator_configuration","datastreamjoins","datastreams","departments","devices","leave","leave_balances","locations","on_calls","organisations","payroll","personal_details","positions","predicted_storestats","public_holidays","qualifications","recommended_hours","reports","rosters","rostered_days_off","schedule_swap_plans","schedule_swap_proposals","schedules","settings","shift_details","shift_ratings","shift_reminders","shifts","sleepovers","stat_types","storestats","timesheets","training_templates","trainings","user_files","user_pay_fields","users","wage_comparisons","webhooks"]}]}