> ## Documentation Index
> Fetch the complete documentation index at: https://nango-marcin-get-deployments-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Timetastic

> Integrate your application with the Timetastic API

## 🚀 Quickstart

Connect to Timetastic with Nango and see data flow in 2 minutes. Timetastic uses a static bearer token generated directly in your Timetastic account.

<Steps>
  <Step title="Create the integration">
    In Nango ([free signup](https://app.nango.dev)), go to [Integrations](https://app.nango.dev/dev/integrations) -> *Configure New Integration* -> *Timetastic*.
  </Step>

  <Step title="Connect your Timetastic account">
    Go to [Connections](https://app.nango.dev/dev/connections) -> *Add Test Connection*. Enter your API key, then save.
  </Step>

  <Step title="Call the Timetastic API">
    Let's make your first request to the Timetastic API. Replace the placeholders below with your [secret key](https://app.nango.dev/dev/environment-settings), [integration ID](https://app.nango.dev/dev/integrations), and [connection ID](https://app.nango.dev/dev/connections):

    <Tabs>
      <Tab title="cURL">
        ```bash theme={null}
        curl "https://api.nango.dev/proxy/users" \
          -H "Authorization: Bearer <NANGO-SECRET-KEY>" \
          -H "Provider-Config-Key: <INTEGRATION-ID>" \
          -H "Connection-Id: <CONNECTION-ID>"
        ```
      </Tab>

      <Tab title="Node">
        Install Nango's backend SDK with `npm i @nangohq/node`. Then run:

        ```typescript theme={null}
        import { Nango } from '@nangohq/node';

        const nango = new Nango({ secretKey: '<NANGO-SECRET-KEY>' });

        const res = await nango.get({
            endpoint: '/users',
            providerConfigKey: '<INTEGRATION-ID>',
            connectionId: '<CONNECTION-ID>'
        });

        console.log(res.data);
        ```
      </Tab>
    </Tabs>

    Or fetch credentials with the [Node SDK](/reference/sdks/node#get-a-connection-with-credentials) or [API](/reference/api/connection/get).

    ✅ You're connected! Check the [Logs](https://app.nango.dev/dev/logs) tab in Nango to inspect requests.
  </Step>

  <Step title="Implement Nango in your app">
    Follow our [Auth implementation guide](/guides/auth/auth-guide) to integrate Nango in your app.

    To obtain an API key, follow the setup guide linked below.
  </Step>
</Steps>

## 📚 Timetastic integration guides

Nango maintained guides for common use cases.

* [How to connect your Timetastic account](/api-integrations/timetastic/connect)\
  Generate an API key in Timetastic and connect it to Nango

Official docs: [Timetastic API docs](https://app.timetastic.co.uk/api-docs/index.html)

## 🧩 Pre-built syncs & actions for Timetastic

Enable them in your dashboard. Extend and customize to fit your needs.

### Others

| Function name                   | Description                                                                    | Type                                           | Source code                                                                                                                              |
| ------------------------------- | ------------------------------------------------------------------------------ | ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `action-holiday`                | Approve, decline, cancel, or delete a leave request.                           | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/action-holiday.ts)                |
| `add-department`                | Create a new department.                                                       | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/add-department.ts)                |
| `add-locked-date`               | Create a locked date period that blocks leave requests.                        | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/add-locked-date.ts)               |
| `add-user-toil`                 | Add a Time Off In Lieu entry for a user for a year.                            | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/add-user-toil.ts)                 |
| `add-user`                      | Create a new user, optionally sending a welcome email.                         | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/add-user.ts)                      |
| `archive-user`                  | Archive a user, immediately logging them out and blocking further login.       | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/archive-user.ts)                  |
| `assign-user-public-holidays`   | Turn on and assign a public holiday set (country/region) to a user             | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/assign-user-public-holidays.ts)   |
| `create-leave-type`             | Create a new leave type. Admin only.                                           | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/create-leave-type.ts)             |
| `delete-department`             | Delete a department.                                                           | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/delete-department.ts)             |
| `delete-leave-type`             | Delete a leave type. Admin only.                                               | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/delete-leave-type.ts)             |
| `delete-locked-date`            | Remove a locked date period. Admin/manager only.                               | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/delete-locked-date.ts)            |
| `delete-user-toil`              | Delete a TOIL entry for a user.                                                | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/delete-user-toil.ts)              |
| `edit-department`               | Update a department's settings.                                                | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/edit-department.ts)               |
| `edit-user`                     | Update fields on an existing user.                                             | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/edit-user.ts)                     |
| `get-department`                | Retrieve a single department.                                                  | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/get-department.ts)                |
| `get-holiday`                   | Retrieve a single leave request.                                               | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/get-holiday.ts)                   |
| `get-leave-type`                | Retrieve a single leave type.                                                  | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/get-leave-type.ts)                |
| `get-public-holiday`            | Retrieve a single public holiday.                                              | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/get-public-holiday.ts)            |
| `get-user-allowance-for-year`   | Get the allowance, TOIL, and carry-forward for one user for one year.          | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/get-user-allowance-for-year.ts)   |
| `get-user-allowances`           | Get allowance, TOIL, and carry-forward records for one user across all years.  | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/get-user-allowances.ts)           |
| `get-user`                      | Retrieve a single user, including their work schedule and per-year allowances. | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/get-user.ts)                      |
| `list-absences`                 | Get a chronological, day-by-day list of who is off within a date range.        | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/list-absences.ts)                 |
| `list-departments`              | List all departments for the organisation.                                     | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/list-departments.ts)              |
| `list-holidays`                 | Query leave requests for the organisation with rich filters.                   | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/list-holidays.ts)                 |
| `list-leave-type-colors`        | List valid color hex codes for leave types.                                    | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/list-leave-type-colors.ts)        |
| `list-leave-type-icons`         | List valid icon names for leave types.                                         | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/list-leave-type-icons.ts)         |
| `list-leave-types`              | List leave types for the organisation.                                         | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/list-leave-types.ts)              |
| `list-locked-dates`             | List all locked date periods for the organisation.                             | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/list-locked-dates.ts)             |
| `list-public-holiday-countries` | List all countries with public holiday sets available.                         | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/list-public-holiday-countries.ts) |
| `list-public-holidays`          | List public holidays for the organisation.                                     | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/list-public-holidays.ts)          |
| `list-user-allowances-for-year` | List allowances, TOIL, and carry-forwards for every user for a single year     | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/list-user-allowances-for-year.ts) |
| `list-user-allowances`          | List allowances, TOIL, and carry-forwards for every user across all years.     | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/list-user-allowances.ts)          |
| `list-users`                    | List users for the organisation.                                               | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/list-users.ts)                    |
| `list-webhook-events`           | List recent webhook delivery events.                                           | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/list-webhook-events.ts)           |
| `request-holiday`               | Submit a leave request for a user, department, or the whole organisation       | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/request-holiday.ts)               |
| `restore-user`                  | Restore an archived user so they can log in again.                             | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/restore-user.ts)                  |
| `update-leave-type`             | Update an existing leave type. Admin only.                                     | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/update-leave-type.ts)             |
| `update-user-allowance`         | Update a user's annual leave allowance for a year.                             | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/update-user-allowance.ts)         |
| `update-user-carryforward`      | Update a user's carried-forward allowance for a year.                          | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/update-user-carryforward.ts)      |
| `update-user-toil`              | Update an existing TOIL entry for a user for a year.                           | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/actions/update-user-toil.ts)              |
| `departments`                   | Sync departments.                                                              | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/syncs/departments.ts)                     |
| `holidays`                      | Sync leave requests.                                                           | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/syncs/holidays.ts)                        |
| `leave-types`                   | Sync leave types.                                                              | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/syncs/leave-types.ts)                     |
| `locked-dates`                  | Sync locked date periods.                                                      | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/syncs/locked-dates.ts)                    |
| `public-holidays`               | Sync public holidays.                                                          | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/syncs/public-holidays.ts)                 |
| `user-allowances`               | Sync user allowances, TOIL, and carry-forwards.                                | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/syncs/user-allowances.ts)                 |
| `users`                         | Sync users.                                                                    | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/timetastic/syncs/users.ts)                           |

***
