Time Doctor provides an API that can be used to retrieve most of its reports and resources.
Please reach out to support@timedoctor.com if you need any help with the API or have any suggestions regarding it.
The APIs use REST principles to create a standard and familiar interface. REST, which stands for REpresentational State Transformation, defines a set of principles for organizing web services using the HTTP protocol and a specific set of HTTP verbs or methods. The methods used in the Time Doctor API are:
Together these are often known as CRUD operations – Create, Read, Update, and Delete.
Time doctor API calls use the HTTPS protocol, the secure form of HTTP. All calls for version 1.0 begin with the prefix:
The request header for all API calls must include the following parameters:
"Accept: application/json""Content-Type: application/json" (for requests sending the body)If the request body is not empty, it consists of a sequence of parameters given in JSON format. If a response body is returned, its content is given in JSON format as well.
Note: Every call to a Time Doctor API must be authenticated using a "bearer token" based on OAuth 2.0. Tokens are generated by the following APIs:
The token is valid for six months. After this, you will need to create a new token.
Once your token is generated, it must be provided as a header parameter under "Authorization"
in every subsequent API call, with format JWT {token}.
Related Operations:
2019-08-24T14:15:22Znull or empty string instead of being omittedTime Doctor API supports ISO 8601 date and time format
i.e. YYYY-MM-DDT00:00:00Z (Z refers to UTC timezone)
Having timezone offset can result in performance issues for reasons such as
daylight savings changes.
Time Doctor stores and returns data only in the UTC timezone.
You will need to convert the local time into UTC timezone before you pass it as a query parameter in the API call.
For example: Jul 2nd, 2021 06:36 AM UTC+8 = Jul 1st, 2021 10:36 PM UTC time.
Related Operations:
Time Doctor API supports ISO date and time format. If you are running the report for the same day, you'll need to provide the date range as in example below:
from=2021-07-02T00:00:00Z&to=2021-07-03T00:00:00Z for Jul 2, 2021 UTC.
Related Operations:
This could be due to an issue with the specific application permissions that the data wasn't captured. It could also be that the web & app tracking was disabled before it was enabled, so the blank titles are from the time when the setting was disabled.
Related Operations:
Tags refer to Groups in Time Doctor - organizational units for managing users.
Related Operations:
Files refer to the screencasts (screenshots and screen videos) in Time Doctor.
Related Operations:
Categories refer to the productivity ratings in Time Doctor - classifications of applications and websites as productive, unproductive, neutral, or unrated.
Related Operations:
The Disconnectivity report works with Time Doctor application v3.4.8 and above.
Please make sure the users are using this app version or the newest.
Send an email to support@timedoctor.com in case
you still experience any issues after upgrading the application version.
Related Operations:
We don't currently have webhooks.
You may create custom scripts to call the API endpoints.
Feel free to email support@timedoctor.com in case you have any questions.
Alternative Approaches:
Time Doctor API supports the filtering of data in some of the API calls.
You can specify using the filter keyword and provide multiple data points that you want to get in the response,
i.e., filter[name], filter[email], etc.
You will see the filters query parameters in some of the API calls where you can use them.
Common Filtering Operations:
Authenticate user credentials and obtain an access token for API requests.
Authentication Flow:
Related Endpoints:
| email required | string Email address used for registration and login |
| password required | string User password. Must be at least 6 characters long |
| totpCode | string Six-digit time-based one-time password from authenticator app (required if 2FA enabled) |
| permissions | string Default: "write" API token permissions. Possible values:
|
{- "email": "string",
- "password": "string",
- "totpCode": "string",
- "permissions": "write"
}{- "data": {
- "token": "string",
- "expires": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z"
}
}Create a new user account using an invitation token.
This endpoint is used when a user has been invited to join an existing company. It creates a user profile and associates it with the company from the invitation.
Use Cases:
Related Endpoints:
| name required | string User full name |
| email required | string Email address for new user account |
| timezone | string User timezone identifier (e.g., "America/New_York") |
| password required | string Desired password. Must be at least 6 characters long |
| twoFactorAuth | boolean Default: false When true, enables two-factor authentication for this account |
| referrer | string If specified, a referrer, where the user was brought from |
{- "name": "string",
- "email": "string",
- "timezone": "string",
- "password": "string",
- "twoFactorAuth": false,
- "referrer": "string"
}{- "data": {
- "token": "string",
- "expires": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z"
}
}Create a new user account and company simultaneously.
This endpoint is used for new company owners who want to start using TimeDoctor. It creates both a user profile and a new company in a single operation.
Use Cases:
Related Endpoints:
| name required | string User full name |
| email required | string Email address for new user account |
| timezone | string Company timezone identifier. Default: "Etc/UTC" |
| password required | string Desired password. Must be at least 6 characters long |
| referrer | string If specified, a referrer, where the user was brought from |
| company | string Name for newly created company. Default: "Someone's company" |
| trackingMode required | string Time tracking mode for the company |
| interactiveTrackingMode | string Interactive time tracking mode for the company |
| pricingPlan | string Default: "standard_new" Pricing plan of company |
{- "name": "string",
- "email": "string",
- "timezone": "string",
- "password": "string",
- "referrer": "string",
- "company": "string",
- "trackingMode": "mixed",
- "interactiveTrackingMode": "manual",
- "pricingPlan": "standard_new"
}{- "data": {
- "token": "string",
- "expires": "string",
- "createdAt": "string",
- "userId": "string",
- "companyId": "string"
}
}Update user profile information (personal data not tied to any specific company).
This endpoint allows users to modify their personal information such as email, password, name, and timezone. Changes apply across all companies the user belongs to.
Updatable Fields:
Authentication: Requires valid access token.
Related Endpoints:
apiKey) | name required | string User full name |
| email required | string Email address for new user account |
| timezone | string User timezone identifier (e.g., "America/New_York") |
| password required | string Desired password. Must be at least 6 characters long |
| twoFactorAuth | boolean Default: false When true, enables two-factor authentication for this account |
| referrer | string If specified, a referrer, where the user was brought from |
{- "name": "string",
- "email": "string",
- "timezone": "string",
- "password": "string",
- "twoFactorAuth": false,
- "referrer": "string"
}{- "data": { }
}Request a password reset email.
This endpoint sends a password reset link to the specified email address. The user can then follow the link to create a new password.
Process:
Related Endpoints:
| email required | string |
const fetch = require('node-fetch'); const query = new URLSearchParams({email: 'string'}).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.0/profile/restore-password?${query}`, {method: 'GET'} ); const data = await resp.text(); console.log(data);
{- "data": { }
}End the current session and invalidate the access token.
This endpoint terminates the user session and makes the current access token unusable for future API requests. The user will need to login again to obtain a new token.
Security: Always call this endpoint when the user explicitly logs out to ensure proper session termination.
Related Endpoints:
apiKey) const fetch = require('node-fetch'); const resp = await fetch( `https://api2.timedoctor.com/api/1.0/logout`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": { }
}Invalidate a specific access token by its unique identifier.
This endpoint allows users to terminate specific sessions without affecting other active sessions. Useful for managing multiple devices or revoking access from specific locations.
Use Cases:
Related Endpoints:
apiKey) | id | string token ID, returned by GET |
const fetch = require('node-fetch'); const query = new URLSearchParams({id: 'string'}).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.0/logout/by-id?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": { }
}Generate a new TOTP (Time-based One-Time Password) secret for two-factor authentication setup.
This endpoint initiates the 2FA setup process by generating a secret key and QR code. Users can scan the QR code with authenticator apps like Google Authenticator, Authy, or Microsoft Authenticator.
Setup Process:
Returns:
Authentication: Requires valid access token.
Related Endpoints:
apiKey) const fetch = require('node-fetch'); const resp = await fetch( `https://api2.timedoctor.com/api/1.0/login/2fa/new`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "qrUrl": "string",
- "totpKey": "string"
}Complete two-factor authentication setup by verifying the TOTP code.
After generating a 2FA secret using Generate 2FA Key and configuring your authenticator app, use this endpoint to verify the setup by providing a valid TOTP code.
Activation Process:
Important: Once activated, all future logins will require a TOTP code from your authenticator app in addition to your password.
Authentication: Requires valid access token.
Related Endpoints:
apiKey) | totpCode required | string Six-digit time-based one-time password from authenticator app |
{- "totpCode": "string"
}{- "success": true
}Retrieve list of companies where the authenticated user has administrative access.
This endpoint returns all companies that the user owns or administers. If the user has no administrative access to any company, an empty list is returned.
Use Cases:
Related Endpoints:
apiKey) const fetch = require('node-fetch'); const resp = await fetch( `https://api2.timedoctor.com/api/1.0/companies`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- {
- "role": "string",
- "hiredAt": "string",
- "lastSeen": {
- "updatedAt": "string",
- "online": true,
- "ip": "string"
}, - "tagIds": [
- "string"
], - "onlyProjectIds": [
- "string"
], - "name": "string",
- "company": {
- "id": "string",
- "name": "string",
- "createdAt": "string",
- "oldCompanyId": "string",
- "timezone": "string",
- "locked": true,
- "userCount": 0,
- "userDiscount": 0,
- "forceUserCount": 0,
- "minBillableUsers": 0,
- "allUsersTagId": "string",
- "hasManagedApprovals": true,
- "subscription": {
- "plan": "string",
- "status": "string",
- "expires": "string"
}, - "settings": {
- "name": "string",
- "employeeId": "string",
- "exists": true,
- "active": true,
- "screenshots": 0,
- "videos": "string",
- "workCheckInterval": 0,
- "canEditTime": "string",
- "poorTimeusePopup": true,
- "allowDeleteScreenshots": true,
- "tasksMode": "string",
- "trackingMode": "string",
- "interactiveTrackingMode": "string",
- "emailSubCount": 0,
- "showOnReports": true,
- "emailReports": "string",
- "weeklyEmailReports": true,
- "jobTitle": "string",
- "blurScreenshots": true,
- "allowNoBreak": true,
- "trackInternetConnectivity": true,
- "signupStep": 0,
- "stripUrlQuery": true,
- "allowAdminSID": true,
- "hideScreencasts": true,
- "payrollAccess": true,
- "payrollFeature": true,
- "workScheduleFeature": true,
- "trackConnectivity": true,
- "allowManagerTagCategories": true,
- "allowManagerProjectsTasks": true,
- "allowManagerInviteUsers": true,
- "allowManagerWorkSchedules": true,
- "allowUsersActivitySummaryReport": true,
- "allowLeavesForRegularUsers": true,
- "forceAutostart": true,
- "firstDayOfWeek": true,
- "custom": {
- "browserExtensionEnabled": true,
- "completedStep": {
- "manageUsers": true,
- "setupGroups": true,
- "companySettings": true
}
}, - "webAndAppTracking": "off",
- "mobileAppTracking": "on",
- "allowMobileAppTracking": true
}, - "splitTest": [
- {
- "name": "string",
- "value": "string"
}
], - "pricingPlan": "string"
}, - "custom": {
- "completedStep": {
- "addEmployee": true,
- "employeeTrack": true,
- "confirmEmail": true,
- "companySettings": true
}
}, - "isSilent": true,
- "isInteractive": true,
- "allowManual": true
}
]
}Create a new company with the authenticated user as owner.
This endpoint creates a new company and automatically assigns the current user as the company owner with full administrative privileges.
Initial Setup:
Related Endpoints:
apiKey) | company | string If specified, ID of Company, user refers to. If omitted, the operation refers to global |
| name required | string Name of the company |
| description | string Optional description of the company |
| creator | string Unique identifier of the user who created the company |
| timezone | string IANA timezone name for the company (defaults to "Etc/UTC") |
| pricingPlan | string Pricing plan tier for the company |
| newOwnerId | string Unique identifier of the new company owner for ownership transfer |
object Tracking time information for silent companies | |
| whoCanAccessScreenshots | string Minimum access level required to view the screenshots page |
| whoCanAccessPayroll | string Minimum access level required to view the payroll page |
| allowLeavesForRegularUsers | boolean When true, regular users can apply for leaves without manager approval |
| mobileAppTracking | string Mobile app tracking mode: "on" (always enabled), "off" (always disabled), "user" (user-controlled) |
{- "name": "string",
- "description": "string",
- "creator": "string",
- "timezone": "string",
- "pricingPlan": "basic",
- "newOwnerId": "string",
- "silentTrackingTimes": {
- "days": [
- 1,
- 2,
- 3,
- 4,
- 5
], - "hours": [
- [
- "8:00",
- "13:00"
], - [
- "14:00",
- "17:00"
]
], - "timezone": "UTC"
}, - "whoCanAccessScreenshots": "none",
- "whoCanAccessPayroll": "none",
- "allowLeavesForRegularUsers": true,
- "mobileAppTracking": "on"
}{- "data": {
- "id": "string",
- "name": "string",
- "createdAt": "string",
- "creatorId": "string",
- "oldCompanyId": "string",
- "timezone": "string",
- "locked": true,
- "userCount": 0,
- "userDiscount": 0,
- "forceUserCount": 0,
- "minBillableUsers": 0,
- "uniqueUserCount": 0,
- "allUsersTagId": "string",
- "hasManagedApprovals": true,
- "subscription": {
- "plan": "string",
- "status": "string",
- "expires": "string"
}, - "settings": {
- "name": "string",
- "employeeId": "string",
- "exists": true,
- "active": true,
- "screenshots": 0,
- "videos": "string",
- "workCheckInterval": 0,
- "canEditTime": "string",
- "poorTimeusePopup": true,
- "allowDeleteScreenshots": true,
- "tasksMode": "string",
- "trackingMode": "string",
- "interactiveTrackingMode": "string",
- "emailSubCount": 0,
- "showOnReports": true,
- "emailReports": "string",
- "weeklyEmailReports": true,
- "jobTitle": "string",
- "blurScreenshots": true,
- "allowNoBreak": true,
- "trackInternetConnectivity": true,
- "signupStep": 0,
- "stripUrlQuery": true,
- "allowAdminSID": true,
- "hideScreencasts": true,
- "payrollAccess": true,
- "payrollFeature": true,
- "workScheduleFeature": true,
- "trackConnectivity": true,
- "allowManagerTagCategories": true,
- "allowManagerProjectsTasks": true,
- "allowManagerInviteUsers": true,
- "allowManagerWorkSchedules": true,
- "allowUsersActivitySummaryReport": true,
- "allowLeavesForRegularUsers": true,
- "forceAutostart": true,
- "firstDayOfWeek": true,
- "custom": {
- "browserExtensionEnabled": true,
- "completedStep": {
- "manageUsers": true,
- "setupGroups": true,
- "companySettings": true
}
}, - "webAndAppTracking": "off",
- "mobileAppTracking": "on",
- "allowMobileAppTracking": true
}, - "splitTest": [
- {
- "name": "string",
- "value": "string"
}
], - "pricingPlan": "string"
}
}Retrieve detailed information about a specific company.
This endpoint returns comprehensive company data including settings, configuration, and administrative information.
Related Endpoints:
apiKey) | companyId required | string Unique identifier of the company |
const fetch = require('node-fetch'); const companyId = 'YOUR_companyId_PARAMETER'; const resp = await fetch( `https://api2.timedoctor.com/api/1.0/companies/${companyId}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": {
- "id": "string",
- "name": "string",
- "createdAt": "string",
- "creatorId": "string",
- "oldCompanyId": "string",
- "timezone": "string",
- "locked": true,
- "userCount": 0,
- "userDiscount": 0,
- "forceUserCount": 0,
- "minBillableUsers": 0,
- "uniqueUserCount": 0,
- "allUsersTagId": "string",
- "hasManagedApprovals": true,
- "subscription": {
- "plan": "string",
- "status": "string",
- "expires": "string"
}, - "settings": {
- "name": "string",
- "employeeId": "string",
- "exists": true,
- "active": true,
- "screenshots": 0,
- "videos": "string",
- "workCheckInterval": 0,
- "canEditTime": "string",
- "poorTimeusePopup": true,
- "allowDeleteScreenshots": true,
- "tasksMode": "string",
- "trackingMode": "string",
- "interactiveTrackingMode": "string",
- "emailSubCount": 0,
- "showOnReports": true,
- "emailReports": "string",
- "weeklyEmailReports": true,
- "jobTitle": "string",
- "blurScreenshots": true,
- "allowNoBreak": true,
- "trackInternetConnectivity": true,
- "signupStep": 0,
- "stripUrlQuery": true,
- "allowAdminSID": true,
- "hideScreencasts": true,
- "payrollAccess": true,
- "payrollFeature": true,
- "workScheduleFeature": true,
- "trackConnectivity": true,
- "allowManagerTagCategories": true,
- "allowManagerProjectsTasks": true,
- "allowManagerInviteUsers": true,
- "allowManagerWorkSchedules": true,
- "allowUsersActivitySummaryReport": true,
- "allowLeavesForRegularUsers": true,
- "forceAutostart": true,
- "firstDayOfWeek": true,
- "custom": {
- "browserExtensionEnabled": true,
- "completedStep": {
- "manageUsers": true,
- "setupGroups": true,
- "companySettings": true
}
}, - "webAndAppTracking": "off",
- "mobileAppTracking": "on",
- "allowMobileAppTracking": true
}, - "splitTest": [
- {
- "name": "string",
- "value": "string"
}
], - "pricingPlan": "string"
}
}Update company information and settings.
This endpoint allows modification of company details such as name, settings, tracking preferences, and other configuration options.
Updatable Settings:
Related Endpoints:
apiKey) | companyId required | string Unique identifier of the company |
| name required | string Name of the company |
| description | string Optional description of the company |
| creator | string Unique identifier of the user who created the company |
| timezone | string IANA timezone name for the company (defaults to "Etc/UTC") |
| pricingPlan | string Pricing plan tier for the company |
| newOwnerId | string Unique identifier of the new company owner for ownership transfer |
object Tracking time information for silent companies | |
| whoCanAccessScreenshots | string Minimum access level required to view the screenshots page |
| whoCanAccessPayroll | string Minimum access level required to view the payroll page |
| allowLeavesForRegularUsers | boolean When true, regular users can apply for leaves without manager approval |
| mobileAppTracking | string Mobile app tracking mode: "on" (always enabled), "off" (always disabled), "user" (user-controlled) |
{- "name": "string",
- "description": "string",
- "creator": "string",
- "timezone": "string",
- "pricingPlan": "basic",
- "newOwnerId": "string",
- "silentTrackingTimes": {
- "days": [
- 1,
- 2,
- 3,
- 4,
- 5
], - "hours": [
- [
- "8:00",
- "13:00"
], - [
- "14:00",
- "17:00"
]
], - "timezone": "UTC"
}, - "whoCanAccessScreenshots": "none",
- "whoCanAccessPayroll": "none",
- "allowLeavesForRegularUsers": true,
- "mobileAppTracking": "on"
}{- "data": { }
}Retrieve timezone information for all users in the company.
This endpoint returns the timezone settings for each user in the company, useful for scheduling, reporting, and time-based operations across different regions.
Use Cases:
Related Endpoints:
apiKey) | companyId required | string Unique identifier of the company |
| sort-tz | string When true, sorts timezones with company timezone listed first |
const fetch = require('node-fetch'); const query = new URLSearchParams({'sort-tz': 'true'}).toString(); const companyId = 'YOUR_companyId_PARAMETER'; const resp = await fetch( `https://api2.timedoctor.com/api/1.0/companies/${companyId}/timezones?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": {
- "timezones": [
- "string"
]
}
}Retrieve directory synchronization configuration for the company.
This endpoint returns settings for automatic user provisioning and synchronization with external directory services (e.g., Active Directory, LDAP, SCIM).
Returns:
Related Endpoints:
apiKey) | companyId required | string Unique identifier of the company |
const fetch = require('node-fetch'); const companyId = 'YOUR_companyId_PARAMETER'; const resp = await fetch( `https://api2.timedoctor.com/api/1.0/companies/${companyId}/directory-sync`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": { }
}Configure or update directory synchronization settings for the company.
This endpoint sets up automatic user provisioning and synchronization with external directory services, enabling seamless user management across systems.
Configuration Options:
Related Endpoints:
apiKey) | companyId required | string Unique identifier of the company |
{ }{- "data": { }
}Retrieve list of users managed by the specified user.
This endpoint returns all users that the specified user has administrative rights over. Useful for managers and administrators to see their team members.
Use Cases:
Related Endpoints:
apiKey) | userId required | string Unique identifier of user (use "me" or empty string to reference caller) |
| company required | string ID of Company, user refers to. |
| self | string When true, returns user data of userId in self reply field |
| detail | string Level of detail in reply (controls which fields are included) |
| task-project-names | string When true, resolves task and project names instead of returning only IDs |
| no-tag | string When true, returns only users without any tag assignments |
| include-archived-users | boolean Default: false When true, includes archived users in results. Archived users are hidden by default |
| page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| filter[id] | string "string" -- exact match |
| filter[email] | string "string" -- starts with |
| filter[name] | string "string" -- starts with |
| filter[tag] | string "string" -- exact match |
| filter[keywords] | string match string |
| filter[role] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[showOnReports] | boolean boolean value |
| filter[invitePending] | boolean boolean value |
| filter[inviteAccepted] | boolean boolean value |
| filter[payrollAccess] | boolean boolean value |
| filter[screenshots] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[videos] | string "string" -- exact match |
| filter[created] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[hostName] | string "string" -- starts with |
| filter[os] | string "string" -- exact match |
| filter[hiredAt] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[lastTrack] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[lastActiveTrack] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[clientVersion] | string "string" -- exact match |
| filter[ip] | string "string" -- starts with |
| filter[show-on-reports] | boolean boolean value |
| filter[payroll-access] | boolean boolean value |
| filter[host-name] | string "string" -- starts with |
| filter[hired-at] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[last-track] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[last-active-track] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[client-version] | string "string" -- exact match |
| filter[invite-pending] | boolean boolean value |
| filter[invite-accepted] | boolean boolean value |
| filter[tag-count] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', self: 'true', detail: 'id', 'task-project-names': 'true', 'no-tag': 'true', 'include-archived-users': 'false', page: 'string', limit: 'string', sort: 'id', 'filter[id]': 'string', 'filter[email]': 'string', 'filter[name]': 'string', 'filter[tag]': 'string', 'filter[keywords]': 'string', 'filter[role]': 'string', 'filter[showOnReports]': 'true', 'filter[invitePending]': 'true', 'filter[inviteAccepted]': 'true', 'filter[payrollAccess]': 'true', 'filter[screenshots]': 'string', 'filter[videos]': 'string', 'filter[created]': 'string', 'filter[hostName]': 'string', 'filter[os]': 'string', 'filter[hiredAt]': 'string', 'filter[lastTrack]': 'string', 'filter[lastActiveTrack]': 'string', 'filter[clientVersion]': 'string', 'filter[ip]': 'string', 'filter[show-on-reports]': 'true', 'filter[payroll-access]': 'true', 'filter[host-name]': 'string', 'filter[hired-at]': 'string', 'filter[last-track]': 'string', 'filter[last-active-track]': 'string', 'filter[client-version]': 'string', 'filter[invite-pending]': 'true', 'filter[invite-accepted]': 'true', 'filter[tag-count]': 'string' }).toString(); const userId = 'YOUR_userId_PARAMETER'; const resp = await fetch( `https://api2.timedoctor.com/api/1.0/users/${userId}/managed?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- {
- "hiredAt": "string",
- "timezone": "string",
- "active": true,
- "profileTimezone": "string",
- "status": "string",
- "createdAt": "string",
- "id": "string",
- "twoFactorAuth": true,
- "email": "string",
- "emailConfirmed": true,
- "reportIn24HourFormat": true,
- "managerBannerDismissed": "notShown",
- "name": "string",
- "role": "owner",
- "onlyProjectIds": [
- "string"
]
}
], - "paging": {
- "cur": "string",
- "next": "string",
- "limit": 0,
- "totalCount": 0
}, - "self": {
- "hiredAt": "string",
- "timezone": "string",
- "active": true,
- "profileTimezone": "string",
- "status": "string",
- "createdAt": "string",
- "id": "string",
- "twoFactorAuth": true,
- "email": "string",
- "emailConfirmed": true,
- "reportIn24HourFormat": true,
- "managerBannerDismissed": "notShown",
- "name": "string",
- "role": "owner",
- "onlyProjectIds": [
- "string"
]
}
}Retrieve a list of users in the company with optional filtering and pagination.
This endpoint supports multiple query options to filter and customize the user list. You can search by email, name, or other criteria, and control the level of detail returned.
Features:
Related Endpoints:
apiKey) | company | string If specified, ID of Company, user refers to. If omitted, the operation refers to global |
| user | string Comma-separated list of user IDs to resolve. Reply array indexes match input list indexes (alias: id) |
| manager | string Unique identifier of manager. When specified, returns only users managed by this manager |
| tag | string Unique identifier of tag. When specified, returns only users assigned to this tag |
| self | string When true, returns user data of userId in self reply field |
| detail | string Level of detail in reply (controls which fields are included) |
| task-project-names | string When true, resolves task and project names instead of returning only IDs |
| no-tag | string When true, returns only users without any tag assignments |
| include-archived-users | boolean Default: false When true, includes archived users in results. Archived users are hidden by default |
| deleted | string When true, operates on disabled (deleted) users. When false, operates on active users |
| page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| filter[id] | string "string" -- exact match |
| filter[email] | string "string" -- starts with |
| filter[name] | string "string" -- starts with |
| filter[tag] | string "string" -- exact match |
| filter[keywords] | string match string |
| filter[role] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[showOnReports] | boolean boolean value |
| filter[invitePending] | boolean boolean value |
| filter[inviteAccepted] | boolean boolean value |
| filter[payrollAccess] | boolean boolean value |
| filter[screenshots] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[videos] | string "string" -- exact match |
| filter[created] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[hostName] | string "string" -- starts with |
| filter[os] | string "string" -- exact match |
| filter[hiredAt] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[lastTrack] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[lastActiveTrack] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[clientVersion] | string "string" -- exact match |
| filter[ip] | string "string" -- starts with |
| filter[show-on-reports] | boolean boolean value |
| filter[payroll-access] | boolean boolean value |
| filter[host-name] | string "string" -- starts with |
| filter[hired-at] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[last-track] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[last-active-track] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[client-version] | string "string" -- exact match |
| filter[invite-pending] | boolean boolean value |
| filter[invite-accepted] | boolean boolean value |
| filter[tag-count] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', user: 'string', manager: 'string', tag: 'string', self: 'true', detail: 'id', 'task-project-names': 'true', 'no-tag': 'true', 'include-archived-users': 'false', deleted: 'true', page: 'string', limit: 'string', sort: 'id', 'filter[id]': 'string', 'filter[email]': 'string', 'filter[name]': 'string', 'filter[tag]': 'string', 'filter[keywords]': 'string', 'filter[role]': 'string', 'filter[showOnReports]': 'true', 'filter[invitePending]': 'true', 'filter[inviteAccepted]': 'true', 'filter[payrollAccess]': 'true', 'filter[screenshots]': 'string', 'filter[videos]': 'string', 'filter[created]': 'string', 'filter[hostName]': 'string', 'filter[os]': 'string', 'filter[hiredAt]': 'string', 'filter[lastTrack]': 'string', 'filter[lastActiveTrack]': 'string', 'filter[clientVersion]': 'string', 'filter[ip]': 'string', 'filter[show-on-reports]': 'true', 'filter[payroll-access]': 'true', 'filter[host-name]': 'string', 'filter[hired-at]': 'string', 'filter[last-track]': 'string', 'filter[last-active-track]': 'string', 'filter[client-version]': 'string', 'filter[invite-pending]': 'true', 'filter[invite-accepted]': 'true', 'filter[tag-count]': 'string' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.0/users?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- {
- "hiredAt": "string",
- "timezone": "string",
- "active": true,
- "profileTimezone": "string",
- "status": "string",
- "createdAt": "string",
- "id": "string",
- "twoFactorAuth": true,
- "email": "string",
- "emailConfirmed": true,
- "reportIn24HourFormat": true,
- "managerBannerDismissed": "notShown",
- "name": "string",
- "role": "owner",
- "onlyProjectIds": [
- "string"
]
}
], - "paging": {
- "cur": "string",
- "next": "string",
- "limit": 0,
- "totalCount": 0
}, - "self": {
- "hiredAt": "string",
- "timezone": "string",
- "active": true,
- "profileTimezone": "string",
- "status": "string",
- "createdAt": "string",
- "id": "string",
- "twoFactorAuth": true,
- "email": "string",
- "emailConfirmed": true,
- "reportIn24HourFormat": true,
- "managerBannerDismissed": "notShown",
- "name": "string",
- "role": "owner",
- "onlyProjectIds": [
- "string"
]
}
}Retrieve detailed information about a specific user by their ID.
This endpoint returns comprehensive user information including profile data, company-specific settings, and permissions.
Related Endpoints:
apiKey) | userId required | string Unique identifier of user (use "me" or empty string to reference caller) |
| company | string If specified, ID of Company, user refers to. If omitted, the operation refers to global |
| detail | string Level of detail in reply (controls which fields are included) |
| task-project-names | string When true, resolves task and project names instead of returning only IDs |
| no-tag | string When true, returns only users without any tag assignments |
| include-archived-users | boolean Default: false When true, includes archived users in results. Archived users are hidden by default |
| deleted | string When true, operates on disabled (deleted) users. When false, operates on active users |
| page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| filter[id] | string "string" -- exact match |
| filter[email] | string "string" -- starts with |
| filter[name] | string "string" -- starts with |
| filter[tag] | string "string" -- exact match |
| filter[keywords] | string match string |
| filter[role] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[showOnReports] | boolean boolean value |
| filter[invitePending] | boolean boolean value |
| filter[inviteAccepted] | boolean boolean value |
| filter[payrollAccess] | boolean boolean value |
| filter[screenshots] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[videos] | string "string" -- exact match |
| filter[created] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[hostName] | string "string" -- starts with |
| filter[os] | string "string" -- exact match |
| filter[hiredAt] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[lastTrack] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[lastActiveTrack] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[clientVersion] | string "string" -- exact match |
| filter[ip] | string "string" -- starts with |
| filter[show-on-reports] | boolean boolean value |
| filter[payroll-access] | boolean boolean value |
| filter[host-name] | string "string" -- starts with |
| filter[hired-at] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[last-track] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[last-active-track] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[client-version] | string "string" -- exact match |
| filter[invite-pending] | boolean boolean value |
| filter[invite-accepted] | boolean boolean value |
| filter[tag-count] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', detail: 'id', 'task-project-names': 'true', 'no-tag': 'true', 'include-archived-users': 'false', deleted: 'true', page: 'string', limit: 'string', sort: 'id', 'filter[id]': 'string', 'filter[email]': 'string', 'filter[name]': 'string', 'filter[tag]': 'string', 'filter[keywords]': 'string', 'filter[role]': 'string', 'filter[showOnReports]': 'true', 'filter[invitePending]': 'true', 'filter[inviteAccepted]': 'true', 'filter[payrollAccess]': 'true', 'filter[screenshots]': 'string', 'filter[videos]': 'string', 'filter[created]': 'string', 'filter[hostName]': 'string', 'filter[os]': 'string', 'filter[hiredAt]': 'string', 'filter[lastTrack]': 'string', 'filter[lastActiveTrack]': 'string', 'filter[clientVersion]': 'string', 'filter[ip]': 'string', 'filter[show-on-reports]': 'true', 'filter[payroll-access]': 'true', 'filter[host-name]': 'string', 'filter[hired-at]': 'string', 'filter[last-track]': 'string', 'filter[last-active-track]': 'string', 'filter[client-version]': 'string', 'filter[invite-pending]': 'true', 'filter[invite-accepted]': 'true', 'filter[tag-count]': 'string' }).toString(); const userId = 'YOUR_userId_PARAMETER'; const resp = await fetch( `https://api2.timedoctor.com/api/1.0/users/${userId}?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": {
- "hiredAt": "string",
- "timezone": "string",
- "active": true,
- "profileTimezone": "string",
- "status": "string",
- "createdAt": "string",
- "id": "string",
- "twoFactorAuth": true,
- "email": "string",
- "emailConfirmed": true,
- "reportIn24HourFormat": true,
- "managerBannerDismissed": "notShown",
- "name": "string",
- "role": "owner",
- "onlyProjectIds": [
- "string"
], - "employeeId": "string",
- "exists": true,
- "screenshots": 0,
- "videos": "string",
- "workCheckInterval": 0,
- "canEditTime": "string",
- "poorTimeusePopup": true,
- "allowDeleteScreenshots": true,
- "tasksMode": "string",
- "trackingMode": "string",
- "interactiveTrackingMode": "string",
- "emailSubCount": 0,
- "showOnReports": true,
- "emailReports": "string",
- "weeklyEmailReports": true,
- "jobTitle": "string",
- "blurScreenshots": true,
- "allowNoBreak": true,
- "trackInternetConnectivity": true,
- "signupStep": 0,
- "stripUrlQuery": true,
- "allowAdminSID": true,
- "hideScreencasts": true,
- "payrollAccess": true,
- "payrollFeature": true,
- "workScheduleFeature": true,
- "trackConnectivity": true,
- "allowManagerTagCategories": true,
- "allowManagerProjectsTasks": true,
- "allowManagerInviteUsers": true,
- "allowManagerWorkSchedules": true,
- "allowUsersActivitySummaryReport": true,
- "allowLeavesForRegularUsers": true,
- "forceAutostart": true,
- "firstDayOfWeek": true,
- "custom": {
- "browserExtensionEnabled": true,
- "completedStep": {
- "manageUsers": true,
- "setupGroups": true,
- "companySettings": true
}
}, - "webAndAppTracking": "off",
- "mobileAppTracking": "on",
- "allowMobileAppTracking": true,
- "managerIds": [
- "string"
], - "tagIds": [
- "string"
], - "silentInfo": [
- "string"
]
}
}Update user settings and configuration within a company.
This endpoint allows modification of company-specific user settings such as role, permissions, work schedule, tracking settings, and other company-related configurations.
Updatable Settings:
Note: For personal profile updates (email, password, name), use Update Profile.
Related Endpoints:
apiKey) | userId required | string Unique identifier of user (use "me" or empty string to reference caller) |
| company required | string ID of Company, user refers to. |
| deleted | string When true, operates on disabled (deleted) users. When false, operates on active users |
| name | string User's name |
| role | string User role in company (user, manager, admin, or owner) |
| onlyProjectIds | Array of strings Project access restriction: array of project IDs user can access, or empty array to allow all projects. When set, user can only view/work on specified projects |
| employeeId | string The ID of the employee at the company where they work |
| exists | boolean |
| active | boolean Determines if the invited user is ready to work without post-confirmaton |
| screenshots | integer <int32> The interval (in seconds) at which screenshots are taken of the user's screen(s) while they're working. |
| videos | string "Video" means that a continuous video of the user's computer screen(s) will be taken while working, broken into 3-minute chunks. "Off" means that no videos will be recorded. |
| workCheckInterval | integer <int32> How many seconds interval before checking if the user is working |
| canEditTime | string Regular users edit their own time, managers edit their own time and the time of the people they manage while admins edit anyone's time. |
| poorTimeusePopup | boolean Show pop up if the user is not making proper use of their time |
| allowDeleteScreenshots | boolean Allows users to delete screenshots and video recordings that are taken of their screen. When one is deleted, the associated work time is also removed. |
| tasksMode | string Determines if a user is allowed to track tasks or not. There are two options: "preset" and "off" |
| trackingMode | string Determines how the user's time is tracked. There are two settings: "silent" and "interactive". Interactive mode allows the user select the tasks to track time on. Silent mode just records all activities non-stop. |
| interactiveTrackingMode | string Determines how the user's time is tracked. There are two settings: "automated" and "manual". Manual mode allows the user select the tasks to track time on. Automated mode start time tracking automatically. |
| emailSubCount | integer <int32> Count of email subscriptions |
| showOnReports | boolean Sets if the user should show on the report like the Daily Report email |
| emailReports | string Sets if the admin will get email report |
| weeklyEmailReports | boolean Sets if the user will get weekly email report |
| jobTitle | string The job title of the employee at the company |
| blurScreenshots | boolean Screenshots taken of the user's computer and activity will be blurred. |
| allowNoBreak | boolean When a user is using certain call/video applications like Zoom for work, do not put the user on break |
| trackInternetConnectivity | boolean Monitor user internet connectivity and notify them if it is poor |
| stripUrlQuery | boolean This removes query parameters from visited URLs (everything after “?”) that are stored and shown in reports. You might want to enable it due to privacy and security concerns. |
| allowAdminSID | boolean Allow app to run on administrator accounts |
| hideScreencasts | boolean Allow the user see screencasts or not |
| payrollAccess | boolean Allow the user access the payroll feature. Only the company owner can set this for a user |
| payrollFeature | boolean Only the company owner can turn the Payroll feature on or off. |
| workScheduleFeature | boolean Turn the Work Schedule feature on or off for a company. |
| trackConnectivity | boolean Start tracking connectivity data for the company. |
| allowManagerTagCategories | boolean Allow managers to set productivity ratings |
| allowManagerProjectsTasks | boolean Allow managers to create projects and tasks |
| allowManagerInviteUsers | boolean Allow managers to invite new users |
| allowManagerWorkSchedules | boolean Allow managers to set their work schedules and the schedules of people they manage |
| allowUsersActivitySummaryReport | boolean Allow end-users to see Activity Summary reports |
| allowLeavesForRegularUsers | boolean Allow regular users to apply for the leaves |
| forceAutostart | boolean Force desktop apps to start tracking automatically at the start of each day |
| firstDayOfWeek | boolean Set first day of week (0=Sunday; 1 by default) |
| webAndAppTracking | string Set tracking type (extended by default) |
| mobileAppTracking | string Controls mobile app tracking settings. "on" - always enabled, "off" - always disabled, "user" - controlled by user settings |
| allowMobileAppTracking | boolean Indicates if mobile app tracking is allowed based on mobileAppTracking setting |
{- "name": "string",
- "role": "owner",
- "onlyProjectIds": [
- "string"
], - "employeeId": "string",
- "exists": true,
- "active": true,
- "screenshots": 0,
- "videos": "string",
- "workCheckInterval": 0,
- "canEditTime": "string",
- "poorTimeusePopup": true,
- "allowDeleteScreenshots": true,
- "tasksMode": "string",
- "trackingMode": "string",
- "interactiveTrackingMode": "string",
- "emailSubCount": 0,
- "showOnReports": true,
- "emailReports": "string",
- "weeklyEmailReports": true,
- "jobTitle": "string",
- "blurScreenshots": true,
- "allowNoBreak": true,
- "trackInternetConnectivity": true,
- "stripUrlQuery": true,
- "allowAdminSID": true,
- "hideScreencasts": true,
- "payrollAccess": true,
- "payrollFeature": true,
- "workScheduleFeature": true,
- "trackConnectivity": true,
- "allowManagerTagCategories": true,
- "allowManagerProjectsTasks": true,
- "allowManagerInviteUsers": true,
- "allowManagerWorkSchedules": true,
- "allowUsersActivitySummaryReport": true,
- "allowLeavesForRegularUsers": true,
- "forceAutostart": true,
- "firstDayOfWeek": true,
- "webAndAppTracking": "off",
- "mobileAppTracking": "on",
- "allowMobileAppTracking": true
}{- "data": { }
}Remove a user from the company or permanently delete their data.
This endpoint supports two deletion modes:
Important: Permanent deletion cannot be undone. Use with caution.
Related Endpoints:
apiKey) | userId required | string Unique identifier of user (use "me" or empty string to reference caller) |
| company required | string ID of Company, user refers to. |
| deleted | string When true, operates on disabled (deleted) users. When false, operates on active users |
| delete-permanently | string When true, permanently deletes user and all associated data from system (irreversible) |
| reason | string Reason for deleting user (for audit trail) |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', deleted: 'true', 'delete-permanently': 'true', reason: 'string' }).toString(); const userId = 'YOUR_userId_PARAMETER'; const resp = await fetch( `https://api2.timedoctor.com/api/1.0/users/${userId}?${query}`, { method: 'DELETE', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": { }
}Send an invitation email to a new user to join the company.
This endpoint creates an invitation token and sends an email to the specified address. The recipient can use the token to register and join the company.
Process:
Billing Note: If you have paid for the month and add more users later, you'll be charged a prorated amount for the remainder of the month for each new user.
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| name | string Full name of invited user (optional, can be set during registration) |
| email required | string Email address of invited user (required, used for invitation delivery) |
| role | string Role to assign to invited user in company (user, manager, admin, or owner) |
| employeeId | string Employee ID of invited user (optional, for HR integration) |
| noSendEmail | string When true, creates invitation without sending email (user must be invited manually) |
| onlyProjectIds | Array of strings Project access restriction for invited user. When specified, user can only access these projects |
{- "name": "string",
- "email": "string",
- "role": "owner",
- "employeeId": "string",
- "noSendEmail": "true",
- "onlyProjectIds": [
- "string"
]
}{- "data": {
- "userId": "string"
}
}Check if an invitation exists for a specific email address.
This endpoint verifies whether a user has been invited to the company and returns the invitation status.
Use Cases:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| email required | string Email address of user to query |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', email: 'string' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.0/invitations/exists?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": {
- "name": "string",
- "invitePending": true,
- "id": "string"
}
}Send multiple user invitations in a single request.
This endpoint allows you to invite multiple users to the company simultaneously, which is more efficient than sending individual invitations.
Features:
Use Cases:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
required | Array of objects Array of users to invite in bulk operation |
| noSendEmail | string When true, creates all invitations without sending emails (users must be invited manually) |
| onlyProjectIds | Array of strings Project access restriction applied to all invited users. When specified, users can only access these projects |
| tagIds | Array of strings Array of tag IDs to assign to all invited users |
{- "users": [
- {
- "name": "string",
- "email": "string",
- "password": "string",
- "role": "owner",
- "employeeId": "string"
}
], - "noSendEmail": "true",
- "onlyProjectIds": [
- "string"
], - "tagIds": [
- "string"
]
}{- "data": [
- {
- "status": "sent",
- "userId": "string",
- "reason": "string",
- "error": {
- "message": "string"
}
}
]
}Retrieve comprehensive configuration details for all users in the company.
This endpoint returns detailed settings and configurations for all company users, useful for administrative overview and bulk configuration management.
Returns:
Related Endpoints:
apiKey) | company | string If specified, ID of Company, user refers to. If omitted, the operation refers to global |
| self | string When true, returns user data of userId in self reply field |
| detail | string Level of detail in reply (controls which fields are included) |
| task-project-names | string When true, resolves task and project names instead of returning only IDs |
| no-tag | string When true, returns only users without any tag assignments |
| include-archived-users | boolean Default: false When true, includes archived users in results. Archived users are hidden by default |
| page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| filter[id] | string "string" -- exact match |
| filter[email] | string "string" -- starts with |
| filter[name] | string "string" -- starts with |
| filter[tag] | string "string" -- exact match |
| filter[keywords] | string match string |
| filter[role] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[showOnReports] | boolean boolean value |
| filter[invitePending] | boolean boolean value |
| filter[inviteAccepted] | boolean boolean value |
| filter[payrollAccess] | boolean boolean value |
| filter[screenshots] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[videos] | string "string" -- exact match |
| filter[created] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[hostName] | string "string" -- starts with |
| filter[os] | string "string" -- exact match |
| filter[hiredAt] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[lastTrack] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[lastActiveTrack] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[clientVersion] | string "string" -- exact match |
| filter[ip] | string "string" -- starts with |
| filter[show-on-reports] | boolean boolean value |
| filter[payroll-access] | boolean boolean value |
| filter[host-name] | string "string" -- starts with |
| filter[hired-at] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[last-track] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[last-active-track] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[client-version] | string "string" -- exact match |
| filter[invite-pending] | boolean boolean value |
| filter[invite-accepted] | boolean boolean value |
| filter[tag-count] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', self: 'true', detail: 'id', 'task-project-names': 'true', 'no-tag': 'true', 'include-archived-users': 'false', page: 'string', limit: 'string', sort: 'id', 'filter[id]': 'string', 'filter[email]': 'string', 'filter[name]': 'string', 'filter[tag]': 'string', 'filter[keywords]': 'string', 'filter[role]': 'string', 'filter[showOnReports]': 'true', 'filter[invitePending]': 'true', 'filter[inviteAccepted]': 'true', 'filter[payrollAccess]': 'true', 'filter[screenshots]': 'string', 'filter[videos]': 'string', 'filter[created]': 'string', 'filter[hostName]': 'string', 'filter[os]': 'string', 'filter[hiredAt]': 'string', 'filter[lastTrack]': 'string', 'filter[lastActiveTrack]': 'string', 'filter[clientVersion]': 'string', 'filter[ip]': 'string', 'filter[show-on-reports]': 'true', 'filter[payroll-access]': 'true', 'filter[host-name]': 'string', 'filter[hired-at]': 'string', 'filter[last-track]': 'string', 'filter[last-active-track]': 'string', 'filter[client-version]': 'string', 'filter[invite-pending]': 'true', 'filter[invite-accepted]': 'true', 'filter[tag-count]': 'string' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.0/users/totals?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- {
- "hiredAt": "string",
- "timezone": "string",
- "active": true,
- "profileTimezone": "string",
- "status": "string",
- "createdAt": "string",
- "id": "string",
- "twoFactorAuth": true,
- "email": "string",
- "emailConfirmed": true,
- "reportIn24HourFormat": true,
- "managerBannerDismissed": "notShown",
- "name": "string",
- "role": "owner",
- "onlyProjectIds": [
- "string"
]
}
], - "paging": {
- "cur": "string",
- "next": "string",
- "limit": 0,
- "totalCount": 0
}, - "self": {
- "hiredAt": "string",
- "timezone": "string",
- "active": true,
- "profileTimezone": "string",
- "status": "string",
- "createdAt": "string",
- "id": "string",
- "twoFactorAuth": true,
- "email": "string",
- "emailConfirmed": true,
- "reportIn24HourFormat": true,
- "managerBannerDismissed": "notShown",
- "name": "string",
- "role": "owner",
- "onlyProjectIds": [
- "string"
]
}
}Retrieve information about all active authentication tokens for the current user.
This endpoint lists all active sessions/tokens, including details about when and where each token was created. Useful for security auditing and session management.
Returns:
Use Cases:
Related Endpoints:
apiKey) | page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| filter[createdAt] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[expiresAt] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
const fetch = require('node-fetch'); const query = new URLSearchParams({ page: 'string', limit: 'string', sort: 'createdAt', 'filter[createdAt]': 'string', 'filter[expiresAt]': 'string' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.0/users/tokens?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- {
- "id": "string",
- "token": "string",
- "ip": "string",
- "userAgent": "string",
- "createdAt": "string",
- "expiresAt": "string"
}
]
}Retrieve a list of users with enhanced features including idle status information.
This is an enhanced version of Get Users that includes additional real-time information about user activity status.
Enhanced Features:
Use Cases:
Related Endpoints:
apiKey) | company | string If specified, ID of Company, user refers to. If omitted, the operation refers to global |
| user | string Comma-separated list of user IDs to resolve. Reply array indexes match input list indexes (alias: id) |
| manager | string Unique identifier of manager. When specified, returns only users managed by this manager |
| tag | string Unique identifier of tag. When specified, returns only users assigned to this tag |
| self | string When true, returns user data of userId in self reply field |
| detail | string Level of detail in reply (controls which fields are included) |
| task-project-names | string When true, resolves task and project names instead of returning only IDs |
| no-tag | string When true, returns only users without any tag assignments |
| include-archived-users | boolean Default: false When true, includes archived users in results. Archived users are hidden by default |
| deleted | string When true, operates on disabled (deleted) users. When false, operates on active users |
| page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| filter[id] | string "string" -- exact match |
| filter[email] | string "string" -- starts with |
| filter[name] | string "string" -- starts with |
| filter[tag] | string "string" -- exact match |
| filter[keywords] | string match string |
| filter[role] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[showOnReports] | boolean boolean value |
| filter[invitePending] | boolean boolean value |
| filter[inviteAccepted] | boolean boolean value |
| filter[payrollAccess] | boolean boolean value |
| filter[screenshots] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[videos] | string "string" -- exact match |
| filter[created] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[hostName] | string "string" -- starts with |
| filter[os] | string "string" -- exact match |
| filter[hiredAt] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[lastTrack] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[lastActiveTrack] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[clientVersion] | string "string" -- exact match |
| filter[ip] | string "string" -- starts with |
| filter[show-on-reports] | boolean boolean value |
| filter[payroll-access] | boolean boolean value |
| filter[host-name] | string "string" -- starts with |
| filter[hired-at] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[last-track] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[last-active-track] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[client-version] | string "string" -- exact match |
| filter[invite-pending] | boolean boolean value |
| filter[invite-accepted] | boolean boolean value |
| filter[tag-count] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| include_idle_status | string When true, includes idle status by joining with stats collection (adds 30-min window analysis) |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', user: 'string', manager: 'string', tag: 'string', self: 'true', detail: 'id', 'task-project-names': 'true', 'no-tag': 'true', 'include-archived-users': 'false', deleted: 'true', page: 'string', limit: 'string', sort: 'id', 'filter[id]': 'string', 'filter[email]': 'string', 'filter[name]': 'string', 'filter[tag]': 'string', 'filter[keywords]': 'string', 'filter[role]': 'string', 'filter[showOnReports]': 'true', 'filter[invitePending]': 'true', 'filter[inviteAccepted]': 'true', 'filter[payrollAccess]': 'true', 'filter[screenshots]': 'string', 'filter[videos]': 'string', 'filter[created]': 'string', 'filter[hostName]': 'string', 'filter[os]': 'string', 'filter[hiredAt]': 'string', 'filter[lastTrack]': 'string', 'filter[lastActiveTrack]': 'string', 'filter[clientVersion]': 'string', 'filter[ip]': 'string', 'filter[show-on-reports]': 'true', 'filter[payroll-access]': 'true', 'filter[host-name]': 'string', 'filter[hired-at]': 'string', 'filter[last-track]': 'string', 'filter[last-active-track]': 'string', 'filter[client-version]': 'string', 'filter[invite-pending]': 'true', 'filter[invite-accepted]': 'true', 'filter[tag-count]': 'string', include_idle_status: 'true' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.1/users?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- {
- "hiredAt": "string",
- "timezone": "string",
- "active": true,
- "profileTimezone": "string",
- "status": "string",
- "createdAt": "string",
- "id": "string",
- "twoFactorAuth": true,
- "email": "string",
- "emailConfirmed": true,
- "reportIn24HourFormat": true,
- "managerBannerDismissed": "notShown",
- "name": "string",
- "role": "owner",
- "onlyProjectIds": [
- "string"
], - "idleStatus": {
- "idleWindowStart": "2019-08-24T14:15:22Z",
- "idleWindowEnd": "2019-08-24T14:15:22Z",
- "windowDurationMins": 0,
- "idleSecs": 0,
- "idleMins": 0
}
}
], - "paging": {
- "cur": "string",
- "next": "string",
- "limit": 0,
- "totalCount": 0
}, - "self": {
- "hiredAt": "string",
- "timezone": "string",
- "active": true,
- "profileTimezone": "string",
- "status": "string",
- "createdAt": "string",
- "id": "string",
- "twoFactorAuth": true,
- "email": "string",
- "emailConfirmed": true,
- "reportIn24HourFormat": true,
- "managerBannerDismissed": "notShown",
- "name": "string",
- "role": "owner",
- "onlyProjectIds": [
- "string"
], - "idleStatus": {
- "idleWindowStart": "2019-08-24T14:15:22Z",
- "idleWindowEnd": "2019-08-24T14:15:22Z",
- "windowDurationMins": 0,
- "idleSecs": 0,
- "idleMins": 0
}
}
}Retrieve detailed user information with enhanced idle status data.
This is an enhanced version of Get User that includes additional real-time activity and idle status information.
Enhanced Features:
Related Endpoints:
apiKey) | userId required | string Unique identifier of user (use "me" or empty string to reference caller) |
| company | string If specified, ID of Company, user refers to. If omitted, the operation refers to global |
| detail | string Level of detail in reply (controls which fields are included) |
| task-project-names | string When true, resolves task and project names instead of returning only IDs |
| no-tag | string When true, returns only users without any tag assignments |
| include-archived-users | boolean Default: false When true, includes archived users in results. Archived users are hidden by default |
| deleted | string When true, operates on disabled (deleted) users. When false, operates on active users |
| page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| filter[id] | string "string" -- exact match |
| filter[email] | string "string" -- starts with |
| filter[name] | string "string" -- starts with |
| filter[tag] | string "string" -- exact match |
| filter[keywords] | string match string |
| filter[role] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[showOnReports] | boolean boolean value |
| filter[invitePending] | boolean boolean value |
| filter[inviteAccepted] | boolean boolean value |
| filter[payrollAccess] | boolean boolean value |
| filter[screenshots] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[videos] | string "string" -- exact match |
| filter[created] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[hostName] | string "string" -- starts with |
| filter[os] | string "string" -- exact match |
| filter[hiredAt] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[lastTrack] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[lastActiveTrack] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[clientVersion] | string "string" -- exact match |
| filter[ip] | string "string" -- starts with |
| filter[show-on-reports] | boolean boolean value |
| filter[payroll-access] | boolean boolean value |
| filter[host-name] | string "string" -- starts with |
| filter[hired-at] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[last-track] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[last-active-track] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[client-version] | string "string" -- exact match |
| filter[invite-pending] | boolean boolean value |
| filter[invite-accepted] | boolean boolean value |
| filter[tag-count] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| include_idle_status | string When true, includes idle status by joining with stats collection (adds 30-min window analysis) |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', detail: 'id', 'task-project-names': 'true', 'no-tag': 'true', 'include-archived-users': 'false', deleted: 'true', page: 'string', limit: 'string', sort: 'id', 'filter[id]': 'string', 'filter[email]': 'string', 'filter[name]': 'string', 'filter[tag]': 'string', 'filter[keywords]': 'string', 'filter[role]': 'string', 'filter[showOnReports]': 'true', 'filter[invitePending]': 'true', 'filter[inviteAccepted]': 'true', 'filter[payrollAccess]': 'true', 'filter[screenshots]': 'string', 'filter[videos]': 'string', 'filter[created]': 'string', 'filter[hostName]': 'string', 'filter[os]': 'string', 'filter[hiredAt]': 'string', 'filter[lastTrack]': 'string', 'filter[lastActiveTrack]': 'string', 'filter[clientVersion]': 'string', 'filter[ip]': 'string', 'filter[show-on-reports]': 'true', 'filter[payroll-access]': 'true', 'filter[host-name]': 'string', 'filter[hired-at]': 'string', 'filter[last-track]': 'string', 'filter[last-active-track]': 'string', 'filter[client-version]': 'string', 'filter[invite-pending]': 'true', 'filter[invite-accepted]': 'true', 'filter[tag-count]': 'string', include_idle_status: 'true' }).toString(); const userId = 'YOUR_userId_PARAMETER'; const resp = await fetch( `https://api2.timedoctor.com/api/1.1/users/${userId}?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": {
- "hiredAt": "string",
- "timezone": "string",
- "active": true,
- "profileTimezone": "string",
- "status": "string",
- "createdAt": "string",
- "id": "string",
- "twoFactorAuth": true,
- "email": "string",
- "emailConfirmed": true,
- "reportIn24HourFormat": true,
- "managerBannerDismissed": "notShown",
- "name": "string",
- "role": "owner",
- "onlyProjectIds": [
- "string"
], - "employeeId": "string",
- "exists": true,
- "screenshots": 0,
- "videos": "string",
- "workCheckInterval": 0,
- "canEditTime": "string",
- "poorTimeusePopup": true,
- "allowDeleteScreenshots": true,
- "tasksMode": "string",
- "trackingMode": "string",
- "interactiveTrackingMode": "string",
- "emailSubCount": 0,
- "showOnReports": true,
- "emailReports": "string",
- "weeklyEmailReports": true,
- "jobTitle": "string",
- "blurScreenshots": true,
- "allowNoBreak": true,
- "trackInternetConnectivity": true,
- "signupStep": 0,
- "stripUrlQuery": true,
- "allowAdminSID": true,
- "hideScreencasts": true,
- "payrollAccess": true,
- "payrollFeature": true,
- "workScheduleFeature": true,
- "trackConnectivity": true,
- "allowManagerTagCategories": true,
- "allowManagerProjectsTasks": true,
- "allowManagerInviteUsers": true,
- "allowManagerWorkSchedules": true,
- "allowUsersActivitySummaryReport": true,
- "allowLeavesForRegularUsers": true,
- "forceAutostart": true,
- "firstDayOfWeek": true,
- "custom": {
- "browserExtensionEnabled": true,
- "completedStep": {
- "manageUsers": true,
- "setupGroups": true,
- "companySettings": true
}
}, - "webAndAppTracking": "off",
- "mobileAppTracking": "on",
- "allowMobileAppTracking": true,
- "managerIds": [
- "string"
], - "tagIds": [
- "string"
], - "silentInfo": [
- "string"
], - "idleStatus": {
- "idleWindowStart": "2019-08-24T14:15:22Z",
- "idleWindowEnd": "2019-08-24T14:15:22Z",
- "windowDurationMins": 0,
- "idleSecs": 0,
- "idleMins": 0
}
}
}Retrieve a list of all projects in the company.
This endpoint returns all projects with optional filtering and pagination. Projects are used to organize and categorize work activities.
Features:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| projects | string Comma-separated list of project IDs to retrieve. When specified, only these projects are returned |
| all | string When true, returns all projects in the company instead of only assigned projects |
| show-integration | string When true, includes projects synced from external integrations (e.g., Jira, Asana) |
| allow-unassigned | string When true, includes projects that the user is not explicitly assigned to |
| detail | string Level of detail to include in the response. Defaults to "basic" |
| user | string Comma-separated list of user IDs to retrieve accessible projects for. Defaults to the authenticated user |
| page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| filter[keyphrase] | string A keyphrase for searching by keywords |
| filter[id] | string "string" -- exact match |
| filter[name] | string "string" -- starts with |
| filter[keywords] | string set of keywords to be matched |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', projects: 'string', all: 'true', 'show-integration': 'true', 'allow-unassigned': 'true', detail: 'basic', user: 'string', page: 'string', limit: 'string', sort: 'id', 'filter[keyphrase]': 'string', 'filter[id]': 'string', 'filter[name]': 'string', 'filter[keywords]': 'string' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.0/projects?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- {
- "integration": {
- "provider": "string",
- "data": { }
}, - "name": "string",
- "description": "string",
- "deleted": true,
- "weight": 0
}
], - "paging": {
- "cur": "string",
- "next": "string",
- "limit": 0,
- "totalCount": 0
}
}Create a new project in the company.
Projects help organize work by grouping related tasks and activities. You can assign users to projects and track time spent on project-related work.
Project Features:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| scope | string Access scope level: user (specific users only), company (all company users), or global (system-wide) |
Array of objects Array of users with their roles who have access to this user-scoped project. Only applicable when scope is "user" | |
| cloneTasksFromId | string When specified, all tasks from the project with this ID will be cloned to the new project |
| cloneAccessFromId | string When specified, user access permissions will be copied from the project with this ID |
| name | string Display name of the project |
| description | string Detailed description of the project purpose and scope |
| deleted | boolean Whether the project has been deleted (archived). Deleted projects are hidden by default |
| weight | number Priority weight for sorting projects. Higher values indicate higher priority |
{- "scope": "workspace",
- "users": [
- {
- "id": "string",
- "role": "tag"
}
], - "cloneTasksFromId": "string",
- "cloneAccessFromId": "string",
- "name": "string",
- "description": "string",
- "deleted": true,
- "weight": 0
}{- "data": {
- "integration": {
- "provider": "string",
- "data": { }
}, - "name": "string",
- "description": "string",
- "deleted": true,
- "weight": 0
}
}Retrieve detailed information about a specific project.
This endpoint returns comprehensive project data including settings, assigned users, and access permissions.
Related Endpoints:
apiKey) | projectId required | string Unique identifier of the project |
| company required | string ID of Company, user refers to. |
| deleted | string When true, operates on a deleted (archived) project instead of an active one |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', deleted: 'true' }).toString(); const projectId = 'YOUR_projectId_PARAMETER'; const resp = await fetch( `https://api2.timedoctor.com/api/1.0/projects/${projectId}?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": {
- "integration": {
- "provider": "string",
- "data": { }
}, - "name": "string",
- "description": "string",
- "deleted": true,
- "weight": 0
}
}Update project information and settings.
This endpoint allows modification of project details such as name, description, status, and other configuration options.
Updatable Fields:
Related Endpoints:
apiKey) | projectId required | string Unique identifier of the project |
| company required | string ID of Company, user refers to. |
| deleted | string When true, operates on a deleted (archived) project instead of an active one |
| name | string Display name of the project |
| description | string Detailed description of the project purpose and scope |
| deleted | boolean Whether the project has been deleted (archived). Deleted projects are hidden by default |
| weight | number Priority weight for sorting projects. Higher values indicate higher priority |
{- "name": "string",
- "description": "string",
- "deleted": true,
- "weight": 0
}{- "data": { }
}Remove a project from the company.
Deleting a project will remove it from the system. Ensure all necessary data is backed up before deletion.
Important: Consider archiving instead of deleting to preserve historical data.
Related Endpoints:
apiKey) | projectId required | string Unique identifier of the project |
| company required | string ID of Company, user refers to. |
| deleted | string When true, operates on a deleted (archived) project instead of an active one |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', deleted: 'true' }).toString(); const projectId = 'YOUR_projectId_PARAMETER'; const resp = await fetch( `https://api2.timedoctor.com/api/1.0/projects/${projectId}?${query}`, { method: 'DELETE', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{ }Grant or modify user access to a private project.
This endpoint makes the project private (if not already) and assigns specific access permissions to a user. Only users with explicit access can view and work on private projects.
Access Control:
Related Endpoints:
apiKey) | projectId required | string Unique identifier of the project |
| userId required | string Unique identifier of the user whose project access will be modified |
| company required | string ID of Company, user refers to. |
| deleted | string When true, operates on a deleted (archived) project instead of an active one |
| role | string User's role within the project. Defaults to "user" if not specified |
{- "role": "user"
}{ }Revoke a specific user's access to a private project.
This endpoint removes the user from the project's access list. The user will no longer be able to view or work on this project.
Related Endpoints:
apiKey) | projectId required | string Unique identifier of the project |
| userId required | string Unique identifier of the user whose project access will be modified |
| company required | string ID of Company, user refers to. |
| deleted | string When true, operates on a deleted (archived) project instead of an active one |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', deleted: 'true' }).toString(); const projectId = 'YOUR_projectId_PARAMETER'; const userId = 'YOUR_userId_PARAMETER'; const resp = await fetch( `https://api2.timedoctor.com/api/1.0/projects/${projectId}/users/${userId}?${query}`, { method: 'DELETE', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{ }Convert a private project to public access.
This endpoint removes all user-specific access restrictions, making the project visible and accessible to all company members.
Effect:
Related Endpoints:
apiKey) | projectId required | string Unique identifier of the project |
| company required | string ID of Company, user refers to. |
| deleted | string When true, operates on a deleted (archived) project instead of an active one |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', deleted: 'true' }).toString(); const projectId = 'YOUR_projectId_PARAMETER'; const resp = await fetch( `https://api2.timedoctor.com/api/1.0/projects/${projectId}/users?${query}`, { method: 'DELETE', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{ }Retrieve projects list with enhanced streaming support.
This is an enhanced version of Get Projects that supports socket-based streaming for large datasets, improving performance when dealing with many projects.
Enhanced Features:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| projects | string Comma-separated list of project IDs to retrieve. When specified, only these projects are returned |
| all | string When true, returns all projects in the company instead of only assigned projects |
| show-integration | string When true, includes projects synced from external integrations (e.g., Jira, Asana) |
| allow-unassigned | string When true, includes projects that the user is not explicitly assigned to |
| detail | string Level of detail to include in the response. Defaults to "basic" |
| user | string Comma-separated list of user IDs to retrieve accessible projects for. Defaults to the authenticated user |
| page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| filter[keyphrase] | string A keyphrase for searching by keywords |
| filter[id] | string "string" -- exact match |
| filter[name] | string "string" -- starts with |
| filter[keywords] | string set of keywords to be matched |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', projects: 'string', all: 'true', 'show-integration': 'true', 'allow-unassigned': 'true', detail: 'basic', user: 'string', page: 'string', limit: 'string', sort: 'id', 'filter[keyphrase]': 'string', 'filter[id]': 'string', 'filter[name]': 'string', 'filter[keywords]': 'string' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.1/projects?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- {
- "integration": {
- "provider": "string",
- "data": { }
}, - "name": "string",
- "description": "string",
- "deleted": true,
- "weight": 0
}
], - "paging": {
- "cur": "string",
- "next": "string",
- "limit": 0,
- "totalCount": 0
}
}Retrieve a list of all tasks in the company.
Tasks represent specific work items or activities that can be assigned to projects. This endpoint returns all tasks with optional filtering and pagination.
Features:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| tasks | string Comma-separated list of task IDs to retrieve. When specified, only these tasks are returned |
| projects | string Comma-separated list of project IDs to filter tasks by. Returns only tasks belonging to these projects |
| folders | string Comma-separated list of folder IDs to filter tasks by. Returns only tasks in these folders |
| show-integration | string When true, includes tasks synced from external integrations (e.g., Jira, Asana) |
| public-only | string When true, returns only public tasks that are visible to all users |
| deleted | string When true, returns deleted (archived) tasks instead of active tasks |
| projectless | string When true, returns only tasks that are not assigned to any project |
| page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| filter[keyphrase] | string A keyphrase for searching by keywords |
| filter[id] | string "string" -- exact match |
| filter[name] | string "string" -- starts with |
| filter[folder] | string "string" -- exact match |
| filter[project] | string "string" -- exact match |
| filter[keywords] | string set of keywords to be matched |
| filter[status] | string options from open, closed |
| filter[assignedTo] | string "string" -- exact match |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', tasks: 'string', projects: 'string', folders: 'string', 'show-integration': 'true', 'public-only': 'true', deleted: 'true', projectless: 'true', page: 'string', limit: 'string', sort: 'id', 'filter[keyphrase]': 'string', 'filter[id]': 'string', 'filter[name]': 'string', 'filter[folder]': 'string', 'filter[project]': 'string', 'filter[keywords]': 'string', 'filter[status]': 'string', 'filter[assignedTo]': 'string' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.0/tasks?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- {
- "id": "string",
- "status": "string",
- "reporterId": "string",
- "deleted": true,
- "deletedAt": "string",
- "folders": { },
- "project": {
- "id": "string",
- "weight": 0
}, - "name": "string",
- "description": "string",
- "integration": {
- "provider": "string",
- "data": { }
}
}
], - "paging": {
- "cur": "string",
- "next": "string",
- "limit": 0,
- "totalCount": 0
}
}Create a new task in the company.
Tasks help organize and categorize work activities. They can be assigned to projects and used to track time spent on specific work items.
Task Features:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
object | |
| name | string Display name of the task |
| description | string Detailed description of what the task involves |
| weight | number Priority weight for sorting tasks. Higher values indicate higher priority |
| deleted | boolean Whether the task has been deleted (archived). Deleted tasks are hidden by default |
| status | string Current status of the task (e.g., open, in-progress, completed). Used for filtering and tracking |
| public | boolean When true, makes the task visible to all users. Only admins, managers, or owners can set this |
{- "project": {
- "id": "string",
- "weight": 0
}, - "name": "string",
- "description": "string",
- "weight": 0,
- "deleted": true,
- "status": "string",
- "public": true
}{- "data": {
- "id": "string",
- "status": "string",
- "reporterId": "string",
- "deleted": true,
- "deletedAt": "string",
- "folders": { },
- "project": {
- "id": "string",
- "weight": 0
}, - "name": "string",
- "description": "string",
- "integration": {
- "provider": "string",
- "data": { }
}
}
}Retrieve detailed information about a specific task.
This endpoint returns comprehensive task data including name, project assignment, and archive status.
Related Endpoints:
apiKey) | taskId required | string Unique identifier of the task |
| company required | string ID of Company, user refers to. |
const fetch = require('node-fetch'); const query = new URLSearchParams({company: 'string'}).toString(); const taskId = 'YOUR_taskId_PARAMETER'; const resp = await fetch( `https://api2.timedoctor.com/api/1.0/tasks/${taskId}?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": {
- "id": "string",
- "status": "string",
- "reporterId": "string",
- "deleted": true,
- "deletedAt": "string",
- "folders": { },
- "project": {
- "id": "string",
- "weight": 0
}, - "name": "string",
- "description": "string",
- "integration": {
- "provider": "string",
- "data": { }
}
}
}Update task information and settings.
This endpoint allows modification of task details such as name, project assignment, and other configuration options.
Updatable Fields:
Related Endpoints:
apiKey) | taskId required | string Unique identifier of the task |
| company required | string ID of Company, user refers to. |
object | |
| name | string Display name of the task |
| description | string Detailed description of what the task involves |
| weight | number Priority weight for sorting tasks. Higher values indicate higher priority |
| deleted | boolean Whether the task has been deleted (archived). Deleted tasks are hidden by default |
| status | string Current status of the task (e.g., open, in-progress, completed). Used for filtering and tracking |
| public | boolean When true, makes the task visible to all users. Only admins, managers, or owners can set this |
{- "project": {
- "id": "string",
- "weight": 0
}, - "name": "string",
- "description": "string",
- "weight": 0,
- "deleted": true,
- "status": "string",
- "public": true
}{- "data": { }
}Archive or restore a task.
This endpoint archives a task (soft delete) or restores a previously archived task. Archived tasks are hidden from normal listings but can be restored if needed.
Operations:
Note: Tasks are not permanently deleted, only archived for data preservation.
Related Endpoints:
apiKey) | taskId required | string Unique identifier of the task |
| company required | string ID of Company, user refers to. |
| deleted | string When true, restores (unarchives) the task instead of archiving it |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', deleted: 'true' }).toString(); const taskId = 'YOUR_taskId_PARAMETER'; const resp = await fetch( `https://api2.timedoctor.com/api/1.0/tasks/${taskId}?${query}`, { method: 'DELETE', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": { }
}Retrieve tasks list with enhanced streaming support.
This is an enhanced version of Get Tasks that supports socket-based streaming for large datasets, improving performance when dealing with many tasks.
Enhanced Features:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| tasks | string Comma-separated list of task IDs to retrieve. When specified, only these tasks are returned |
| projects | string Comma-separated list of project IDs to filter tasks by. Returns only tasks belonging to these projects |
| folders | string Comma-separated list of folder IDs to filter tasks by. Returns only tasks in these folders |
| show-integration | string When true, includes tasks synced from external integrations (e.g., Jira, Asana) |
| public-only | string When true, returns only public tasks that are visible to all users |
| deleted | string When true, returns deleted (archived) tasks instead of active tasks |
| projectless | string When true, returns only tasks that are not assigned to any project |
| page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| filter[id] | string "string" -- exact match |
| filter[name] | string "string" -- starts with |
| filter[folder] | string "string" -- exact match |
| filter[project] | string "string" -- exact match |
| filter[keywords] | string set of keywords to be matched |
| filter[status] | string options from open, closed |
| filter[assignedTo] | string "string" -- exact match |
| page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| filter[keyphrase] | string A keyphrase for searching by keywords |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', tasks: 'string', projects: 'string', folders: 'string', 'show-integration': 'true', 'public-only': 'true', deleted: 'true', projectless: 'true', page: ['string', 'string'], limit: ['string', 'string'], sort: ['id', 'keyphrase'], 'filter[id]': 'string', 'filter[name]': 'string', 'filter[folder]': 'string', 'filter[project]': 'string', 'filter[keywords]': 'string', 'filter[status]': 'string', 'filter[assignedTo]': 'string', 'filter[keyphrase]': 'string' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.1/tasks?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- {
- "id": "string",
- "status": "string",
- "reporterId": "string",
- "deleted": true,
- "deletedAt": "string",
- "folders": { },
- "project": {
- "id": "string",
- "weight": 0
}, - "name": "string",
- "description": "string",
- "integration": {
- "provider": "string",
- "data": { }
}
}
], - "paging": {
- "cur": "string",
- "next": "string",
- "limit": 0,
- "totalCount": 0
}
}Retrieve detailed work activity log for a user within a specified time range.
This endpoint returns comprehensive work session data including start/end times, tasks, projects, and activity levels for each work period.
Performance Note: For optimal performance, limit queries to 7 days at a time. Larger date ranges may result in slower response times.
Use Cases:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| user | string Comma-separated list of user IDs to filter results. If omitted, returns data for the authenticated user |
| from | string <date-time> ISO 8601 date-time for the start of the query range (inclusive). Defaults to 30 minutes before the |
| to | string <date-time> ISO 8601 date-time for the end of the query range (exclusive). Defaults to the current time |
| detail | string When set to true, returns detailed activity information including device IDs and user comments |
| exclude-fields | string Comma-separated list of field names to exclude from the response. Specified fields will be omitted from the returned data |
| include-modes | string Comma-separated list of additional worklog modes to include in results (e.g., unpaidLeave). By default, only standard modes are included |
| task-project-names | string If specified, the method will resolve the names for tasks and projects |
| include-meeting | string If specified, the method will include meeting time in the results |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', user: 'string', from: '2019-08-24T14:15:22Z', to: '2019-08-24T14:15:22Z', detail: 'true', 'exclude-fields': 'string', 'include-modes': 'string', 'task-project-names': 'true', 'include-meeting': 'true' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.0/activity/worklog?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- {
- "taskId": "string",
- "projectId": "string",
- "mode": "offline",
- "date": "2019-08-24T14:15:22Z",
- "start": "2019-08-24T14:15:22Z",
- "time": 0,
- "userId": "string",
- "taskName": "string",
- "projectName": "string",
- "deviceId": "string"
}
]
}Retrieve aggregated statistics about application and website usage.
This endpoint provides summarized timeuse data, showing total time spent on different applications and websites, grouped by productivity category.
Returns:
Use Cases:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| from | string <date-time> ISO 8601 date-time for the start of the query range (inclusive). Defaults to 30 minutes before the |
| to | string <date-time> ISO 8601 date-time for the end of the query range (exclusive). Defaults to the current time |
| user | string Comma-separated list of user IDs to filter results. If omitted, returns data for the authenticated user |
| category | string Category to fetch report for |
| page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| filter[time] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[score] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[category] | string "string" -- exact match |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', from: '2019-08-24T14:15:22Z', to: '2019-08-24T14:15:22Z', user: 'string', category: 'string', page: 'string', limit: 'string', sort: 'time', 'filter[time]': 'string', 'filter[score]': 'string', 'filter[category]': 'string' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.0/activity/timeuse/stats?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- {
- "type": "string",
- "value": "string",
- "title": "string",
- "score": 0,
- "time": 0,
- "category": "string",
- "start": "2019-08-24T14:15:22Z",
- "end": "2019-08-24T14:15:22Z"
}
], - "paging": {
- "cur": "string",
- "next": "string",
- "limit": 0,
- "totalCount": 0,
- "nItems": 0
}
}Retrieve manual time edits and adjustments for user(s).
This endpoint returns all manual time entries and modifications made to work logs, including added time, deleted time, and time corrections.
Returns:
Use Cases:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| user | string Comma-separated list of user IDs to filter results. If omitted, returns data for the authenticated user |
| from | string <date-time> ISO 8601 date-time for the start of the query range (inclusive). Defaults to 30 minutes before the |
| to | string <date-time> ISO 8601 date-time for the end of the query range (exclusive). Defaults to the current time |
| exclude-fields | string Comma-separated list of field names to exclude from the response. Specified fields will be omitted from the returned data |
| include-modes | string Comma-separated list of additional worklog modes to include in results (e.g., unpaidLeave). By default, only standard modes are included |
| approved | string If specified, the method will filter by approval |
| tag | string comma separated value of tag ids |
| include-auto-approved | boolean Default: true include auto approved edit time records |
| resolve-names | boolean Default: false include reviewer name, project name, task name & user name |
| page-user | string continue listing from the user with specified ID |
| sort-user | string sort users by specified field ("_" prefix = descending) |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', user: 'string', from: '2019-08-24T14:15:22Z', to: '2019-08-24T14:15:22Z', 'exclude-fields': 'string', 'include-modes': 'string', approved: 'pending', tag: 'string', 'include-auto-approved': 'true', 'resolve-names': 'false', 'page-user': 'string', 'sort-user': 'name' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.0/activity/edit-time?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- {
- "id": "string",
- "userId": "string",
- "start": "2019-08-24T14:15:22Z",
- "taskId": "string",
- "projectId": "string",
- "end": "2019-08-24T14:15:22Z",
- "operation": "add",
- "reason": "string",
- "approved": true
}
]
}Create a manual time entry or adjustment for a user.
This endpoint allows adding time that wasn't automatically tracked, correcting tracking errors, or making other manual adjustments to work logs.
Use Cases:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| userId | string ID of the user |
| start required | string <date-time> ISO 8601 date-time marking the beginning of the time interval (inclusive) |
| taskId required | string Unique identifier of the task being tracked |
| projectId required | string Unique identifier of the project associated with the task |
| end | string <date-time> ISO 8601 date-time marking the end of the time interval (exclusive, represents the moment when the interval ends) |
| operation required | string Edit Time Operation |
| reason required | string |
| approved required | boolean |
{- "userId": "string",
- "start": "2019-08-24T14:15:22Z",
- "taskId": "string",
- "projectId": "string",
- "end": "2019-08-24T14:15:22Z",
- "operation": "add",
- "reason": "string",
- "approved": true
}{- "data": {
- "id": "string",
- "userId": "string",
- "start": "2019-08-24T14:15:22Z",
- "taskId": "string",
- "projectId": "string",
- "end": "2019-08-24T14:15:22Z",
- "operation": "add",
- "reason": "string",
- "approved": true
}
}Update multiple time edit records in a single request.
This endpoint allows efficient bulk modification of manual time entries, useful for batch corrections or adjustments.
Use Cases:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| userId | string ID of the user |
| start required | string <date-time> ISO 8601 date-time marking the beginning of the time interval (inclusive) |
| taskId required | string Unique identifier of the task being tracked |
| projectId required | string Unique identifier of the project associated with the task |
| end | string <date-time> ISO 8601 date-time marking the end of the time interval (exclusive, represents the moment when the interval ends) |
| operation required | string Edit Time Operation |
| reason required | string |
| approved required | boolean |
[- {
- "userId": "string",
- "start": "2019-08-24T14:15:22Z",
- "taskId": "string",
- "projectId": "string",
- "end": "2019-08-24T14:15:22Z",
- "operation": "add",
- "reason": "string",
- "approved": true
}
]{- "data": {
- "id": "string",
- "userId": "string",
- "start": "2019-08-24T14:15:22Z",
- "taskId": "string",
- "projectId": "string",
- "end": "2019-08-24T14:15:22Z",
- "operation": "add",
- "reason": "string",
- "approved": true
}
}Update a specific manual time entry by its ID.
This endpoint allows modification of an existing time edit, such as changing the time range, task assignment, or other details.
Updatable Fields:
Related Endpoints:
apiKey) | id required | string ID of the time to edit |
| company required | string ID of Company, user refers to. |
| userId | string ID of the user |
| start required | string <date-time> ISO 8601 date-time marking the beginning of the time interval (inclusive) |
| taskId required | string Unique identifier of the task being tracked |
| projectId required | string Unique identifier of the project associated with the task |
| end | string <date-time> ISO 8601 date-time marking the end of the time interval (exclusive, represents the moment when the interval ends) |
| operation required | string Edit Time Operation |
| reason required | string |
| approved required | boolean |
{- "userId": "string",
- "start": "2019-08-24T14:15:22Z",
- "taskId": "string",
- "projectId": "string",
- "end": "2019-08-24T14:15:22Z",
- "operation": "add",
- "reason": "string",
- "approved": true
}{- "data": {
- "id": "string",
- "mqId": "string"
}
}Retrieve periods when the user was offline or disconnected from tracking.
This endpoint returns information about gaps in activity tracking, including when the tracking application was offline, computer was shut down, or internet connection was lost.
Returns:
Use Cases:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
const fetch = require('node-fetch'); const query = new URLSearchParams({company: 'string'}).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.0/activity/disconnectivity?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- {
- "start": "2019-08-24T14:15:22Z",
- "end": "2019-08-24T14:15:22Z",
- "time": 0,
- "userId": "string"
}
]
}Get total stats v1.1.
NOTE:
This documentation uses ratio=score and sort=modeTotal as an example.
As such, you can get responses that contain score and modeTotal, depending on the parameters you specify when making the request.
It is important to understand that score will be replaced by the value you specify for the ratio param and modeTotal will be replaced by the value you specify for sort.
For work range use 1.1/stats/total?fields=start,end,workRange
apiKey) | company required | string ID of Company, user refers to. |
| from | string <date-time> ISO 8601 date-time for the start of the query range (inclusive). Defaults to 30 minutes before the |
| to | string <date-time> ISO 8601 date-time for the end of the query range (exclusive). Defaults to the current time |
| user | string Comma-separated list of user IDs to filter results. If omitted, returns data for the authenticated user. Use |
| tag | string Comma-separated list of tag IDs. When specified, filters results to include only users assigned to these tags |
| task | string Task ID to filter statistics. When specified, returns statistics only for the specified task |
| unpaid | integer Set to 1 to include unpaid time from unpaid breaks in the report. Set to 0 or omit to exclude unpaid time |
| breaks | string Specifies which types of breaks to include in results: |
| fields | string Comma-separated list of field names to include in the response. When specified, only the requested fields will be returned |
| group-by | string Field name to group results by. Results will be aggregated according to the specified field if grouping is supported for that field |
| resolve | string Optional comma-separated list of field names to resolve. |
| ratio | string Optional comma-separated list of field names to get total ratio of. |
| level | string Level of information ("user" by default) |
| timezone | string Timezone of ranges breaks. |
| period | string Default: "days" Period unit of ranges subdivision. |
| interval | integer <int32> >= 1 Number of period units. |
| paging | integer Set to |
| page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| filter[offcomputer] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[computer] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[mobile] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[manual] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[mobMan] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[paidBreak] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unpaidBreak] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[meeting] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[paidLeave] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unpaidLeave] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[offcomputerRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[computerRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[mobileRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[manualRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[mobManRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[paidBreakRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unpaidBreakRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[meetingRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[paidLeaveRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unpaidLeaveRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unratedHis] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unprodHis] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[neutralHis] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[prodHis] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unratedHisRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unprodHisRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[neutralHisRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[prodHisRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unrated] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unprod] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[neutral] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[prod] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unratedRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unprodRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[neutralRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[prodRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[standardActiveSec] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[activeBias] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[activeBiasRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[standardActiveSecRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[clicks] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleSec] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleSecMeeting] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[keys] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[moves] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[totalSec] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[activeSec] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[clicksRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleSecRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleSecMeetingRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[keysRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[movesRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[totalSecRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[activeSecRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[totalMins] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleMins] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleMinsMeeting] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleMinsRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleOutsideMeetingSec] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleOutsideMeetingMins] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleSecDuringMeetingRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleSecOutsideMeetingRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleMinsDuringMeetingRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleMinsOutsideMeetingRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[outShift] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[outShiftRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[project] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[task] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[shift] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[projectRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[taskRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[shiftRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[comCat] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[comCatRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[scoreTotal] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[scoreTotalRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[workRange] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[workRangeRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[modeTotal] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[total] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[meetingCount] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[avgMeetingDuration] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[avgIdleTimePerMeeting] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[userId] | string "string" -- exact match |
| prefilter[userObjPrePos] | string "string" -- exact match |
| prefilter[userObjPos] | string "string" -- exact match |
| prefilter[userName] | string "string" -- exact match |
| prefilter[userNameNorm] | string unknown API-defined value |
| prefilter[userArchived] | string "string" -- exact match |
| prefilter[currentTagId] | string "string" -- exact match |
| prefilter[currentTagObj] | string "string" -- exact match |
| prefilter[currentTagName] | string "string" -- exact match |
| prefilter[currentTagNameNorm] | string "string" -- exact match |
| prefilter[projectId] | string "string" -- exact match |
| prefilter[projectObj] | string "string" -- exact match |
| prefilter[projectName] | string "string" -- exact match |
| prefilter[projectNameNorm] | string "string" -- exact match |
| prefilter[projectIntegrationProvider] | string "string" -- exact match |
| prefilter[projectIntegrationName] | string "string" -- exact match |
| prefilter[projectIntegrationNameNorm] | string "string" -- exact match |
| prefilter[taskId] | string "string" -- exact match |
| prefilter[taskObj] | string "string" -- exact match |
| prefilter[taskName] | string "string" -- exact match |
| prefilter[taskNameNorm] | string "string" -- exact match |
| prefilter[taskIntegrationProvider] | string "string" -- exact match |
| prefilter[taskIntegrationName] | string "string" -- exact match |
| prefilter[taskIntegrationNameNorm] | string "string" -- exact match |
| prefilter[taskIntegrationLink] | string "string" -- exact match |
| prefilter[taskIntegrationLastTracked] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[date] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[timezone] | string "string" -- exact match |
| prefilter[start] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[end] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[item] | string "string" -- exact match |
| filter[ratio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[ratioTotal] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[count] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[quants] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[offsets] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[quant0] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[quant1] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[quant2] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| ratio-page | string When specified, defines how many resulting first items to skip |
| ratio-limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| ratio-sort | string Which field to sort by, prepend it with "_" for descending sorting |
| ratio-filter[total] | string Prefilter ratio totals. |
| ratio-field | string A field to specify for "ratio" paging. Default is first specified in "ratio" param |
| ratio-id | string ID of ratio item for "ratio" paging. Default is top first in ratio array. |
| date-page | string When specified, defines how many resulting first items to skip |
| date-limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', from: '2019-08-24T14:15:22Z', to: '2019-08-24T14:15:22Z', user: 'string', tag: 'string', task: 'string', unpaid: '0', breaks: 'all', fields: 'string', 'group-by': 'string', resolve: 'string', ratio: 'string', level: 'company', timezone: 'string', period: 'days', interval: '1', paging: '0', page: 'string', limit: 'string', sort: 'offcomputer', 'filter[offcomputer]': 'string', 'filter[computer]': 'string', 'filter[mobile]': 'string', 'filter[manual]': 'string', 'filter[mobMan]': 'string', 'filter[paidBreak]': 'string', 'filter[unpaidBreak]': 'string', 'filter[meeting]': 'string', 'filter[paidLeave]': 'string', 'filter[unpaidLeave]': 'string', 'filter[offcomputerRatio]': 'string', 'filter[computerRatio]': 'string', 'filter[mobileRatio]': 'string', 'filter[manualRatio]': 'string', 'filter[mobManRatio]': 'string', 'filter[paidBreakRatio]': 'string', 'filter[unpaidBreakRatio]': 'string', 'filter[meetingRatio]': 'string', 'filter[paidLeaveRatio]': 'string', 'filter[unpaidLeaveRatio]': 'string', 'filter[unratedHis]': 'string', 'filter[unprodHis]': 'string', 'filter[neutralHis]': 'string', 'filter[prodHis]': 'string', 'filter[unratedHisRatio]': 'string', 'filter[unprodHisRatio]': 'string', 'filter[neutralHisRatio]': 'string', 'filter[prodHisRatio]': 'string', 'filter[unrated]': 'string', 'filter[unprod]': 'string', 'filter[neutral]': 'string', 'filter[prod]': 'string', 'filter[unratedRatio]': 'string', 'filter[unprodRatio]': 'string', 'filter[neutralRatio]': 'string', 'filter[prodRatio]': 'string', 'filter[standardActiveSec]': 'string', 'filter[activeBias]': 'string', 'filter[activeBiasRatio]': 'string', 'filter[standardActiveSecRatio]': 'string', 'filter[clicks]': 'string', 'filter[idleSec]': 'string', 'filter[idleSecMeeting]': 'string', 'filter[keys]': 'string', 'filter[moves]': 'string', 'filter[totalSec]': 'string', 'filter[activeSec]': 'string', 'filter[clicksRatio]': 'string', 'filter[idleSecRatio]': 'string', 'filter[idleSecMeetingRatio]': 'string', 'filter[keysRatio]': 'string', 'filter[movesRatio]': 'string', 'filter[totalSecRatio]': 'string', 'filter[activeSecRatio]': 'string', 'filter[totalMins]': 'string', 'filter[idleMins]': 'string', 'filter[idleMinsMeeting]': 'string', 'filter[idleMinsRatio]': 'string', 'filter[idleOutsideMeetingSec]': 'string', 'filter[idleOutsideMeetingMins]': 'string', 'filter[idleSecDuringMeetingRatio]': 'string', 'filter[idleSecOutsideMeetingRatio]': 'string', 'filter[idleMinsDuringMeetingRatio]': 'string', 'filter[idleMinsOutsideMeetingRatio]': 'string', 'filter[outShift]': 'string', 'filter[outShiftRatio]': 'string', 'filter[project]': 'string', 'filter[task]': 'string', 'filter[shift]': 'string', 'filter[projectRatio]': 'string', 'filter[taskRatio]': 'string', 'filter[shiftRatio]': 'string', 'filter[comCat]': 'string', 'filter[comCatRatio]': 'string', 'filter[scoreTotal]': 'string', 'filter[scoreTotalRatio]': 'string', 'filter[workRange]': 'string', 'filter[workRangeRatio]': 'string', 'filter[modeTotal]': 'string', 'filter[total]': 'string', 'filter[meetingCount]': 'string', 'filter[avgMeetingDuration]': 'string', 'filter[avgIdleTimePerMeeting]': 'string', 'prefilter[userId]': 'string', 'prefilter[userObjPrePos]': 'string', 'prefilter[userObjPos]': 'string', 'prefilter[userName]': 'string', 'prefilter[userNameNorm]': 'string', 'prefilter[userArchived]': 'string', 'prefilter[currentTagId]': 'string', 'prefilter[currentTagObj]': 'string', 'prefilter[currentTagName]': 'string', 'prefilter[currentTagNameNorm]': 'string', 'prefilter[projectId]': 'string', 'prefilter[projectObj]': 'string', 'prefilter[projectName]': 'string', 'prefilter[projectNameNorm]': 'string', 'prefilter[projectIntegrationProvider]': 'string', 'prefilter[projectIntegrationName]': 'string', 'prefilter[projectIntegrationNameNorm]': 'string', 'prefilter[taskId]': 'string', 'prefilter[taskObj]': 'string', 'prefilter[taskName]': 'string', 'prefilter[taskNameNorm]': 'string', 'prefilter[taskIntegrationProvider]': 'string', 'prefilter[taskIntegrationName]': 'string', 'prefilter[taskIntegrationNameNorm]': 'string', 'prefilter[taskIntegrationLink]': 'string', 'prefilter[taskIntegrationLastTracked]': 'string', 'prefilter[date]': 'string', 'prefilter[timezone]': 'string', 'prefilter[start]': 'string', 'prefilter[end]': 'string', 'prefilter[item]': 'string', 'filter[ratio]': 'string', 'filter[ratioTotal]': 'string', 'filter[count]': 'string', 'prefilter[quants]': 'string', 'prefilter[offsets]': 'string', 'filter[quant0]': 'string', 'filter[quant1]': 'string', 'filter[quant2]': 'string', 'ratio-page': 'string', 'ratio-limit': 'string', 'ratio-sort': 'offcomputer', 'ratio-filter[total]': 'string', 'ratio-field': 'string', 'ratio-id': 'string', 'date-page': 'string', 'date-limit': 'string' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.1/stats/total?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- {
- "total": 0,
- "modeTotal": 0
}
], - "paging": {
- "cur": "string",
- "next": "string",
- "limit": 0,
- "totalCount": 0,
- "nItems": 0
}
}Get category stats v1.1.
NOTE:
This documentation uses ratio=score and sort=modeTotal as an example.
As such, you can get responses that contain score and modeTotal, depending on the parameters you specify when making the request.
It is important to understand that score will be replaced by the value you specify for the ratio param and modeTotal will be replaced by the value you specify for sort.
apiKey) | company required | string ID of Company, user refers to. |
| from | string <date-time> ISO 8601 date-time for the start of the query range (inclusive). Defaults to 30 minutes before the |
| to | string <date-time> ISO 8601 date-time for the end of the query range (exclusive). Defaults to the current time |
| user | string Comma-separated list of user IDs to filter results. If omitted, returns data for the authenticated user. Use |
| tag | string Comma-separated list of tag IDs. When specified, filters results to include only users assigned to these tags |
| task | string Task ID to filter statistics. When specified, returns statistics only for the specified task |
| unpaid | integer Set to 1 to include unpaid time from unpaid breaks in the report. Set to 0 or omit to exclude unpaid time |
| breaks | string Specifies which types of breaks to include in results: |
| fields | string Comma-separated list of field names to include in the response. When specified, only the requested fields will be returned |
| group-by | string Field name to group results by. Results will be aggregated according to the specified field if grouping is supported for that field |
| resolve | string Optional comma-separated list of field names to resolve. |
| ratio | string Optional comma-separated list of field names to get total ratio of. |
| level | string Level of information ("user" by default) |
| timezone | string Timezone of ranges breaks. |
| period | string Default: "days" Period unit of ranges subdivision. |
| interval | integer <int32> >= 1 Number of period units. |
| paging | integer Set to |
| page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| prefilter[userId] | string "string" -- exact match |
| prefilter[userObjPrePos] | string "string" -- exact match |
| prefilter[userObjPos] | string "string" -- exact match |
| prefilter[userName] | string "string" -- exact match |
| prefilter[userNameNorm] | string unknown API-defined value |
| prefilter[userArchived] | string "string" -- exact match |
| prefilter[currentTagId] | string "string" -- exact match |
| prefilter[currentTagObj] | string "string" -- exact match |
| prefilter[currentTagName] | string "string" -- exact match |
| prefilter[currentTagNameNorm] | string "string" -- exact match |
| prefilter[projectId] | string "string" -- exact match |
| prefilter[projectObj] | string "string" -- exact match |
| prefilter[projectName] | string "string" -- exact match |
| prefilter[projectNameNorm] | string "string" -- exact match |
| prefilter[projectIntegrationProvider] | string "string" -- exact match |
| prefilter[projectIntegrationName] | string "string" -- exact match |
| prefilter[projectIntegrationNameNorm] | string "string" -- exact match |
| prefilter[taskId] | string "string" -- exact match |
| prefilter[taskObj] | string "string" -- exact match |
| prefilter[taskName] | string "string" -- exact match |
| prefilter[taskNameNorm] | string "string" -- exact match |
| prefilter[taskIntegrationProvider] | string "string" -- exact match |
| prefilter[taskIntegrationName] | string "string" -- exact match |
| prefilter[taskIntegrationNameNorm] | string "string" -- exact match |
| prefilter[taskIntegrationLink] | string "string" -- exact match |
| prefilter[taskIntegrationLastTracked] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[date] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[timezone] | string "string" -- exact match |
| prefilter[start] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[end] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[item] | string "string" -- exact match |
| filter[ratio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[ratioTotal] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[count] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[quants] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[offsets] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[quant0] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[quant1] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[quant2] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[total] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[meetingTotal] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[comCat] | string "string" -- exact match |
| filter[comCatObj] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[entity] | string "string" -- exact match |
| prefilter[name] | string unknown API-defined value |
| prefilter[score] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[tagId] | string "string" -- exact match |
| prefilter[userCat] | string "string" -- exact match |
| filter[clicks] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[moves] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[keys] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[totalMins] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleSec] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleSecRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleMins] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleMinsRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[totalSec] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[activeSec] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[activeSecRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[standardActiveSec] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[activeBias] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[activeBiasRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[standardActiveSecRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| ratio-page | string When specified, defines how many resulting first items to skip |
| ratio-limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| ratio-sort | string Which field to sort by, prepend it with "_" for descending sorting |
| ratio-filter[total] | string Prefilter ratio totals. |
| ratio-field | string A field to specify for "ratio" paging. Default is first specified in "ratio" param |
| ratio-id | string ID of ratio item for "ratio" paging. Default is top first in ratio array. |
| date-page | string When specified, defines how many resulting first items to skip |
| date-limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', from: '2019-08-24T14:15:22Z', to: '2019-08-24T14:15:22Z', user: 'string', tag: 'string', task: 'string', unpaid: '0', breaks: 'all', fields: 'string', 'group-by': 'string', resolve: 'string', ratio: 'string', level: 'company', timezone: 'string', period: 'days', interval: '1', paging: '0', page: 'string', limit: 'string', sort: 'userId', 'prefilter[userId]': 'string', 'prefilter[userObjPrePos]': 'string', 'prefilter[userObjPos]': 'string', 'prefilter[userName]': 'string', 'prefilter[userNameNorm]': 'string', 'prefilter[userArchived]': 'string', 'prefilter[currentTagId]': 'string', 'prefilter[currentTagObj]': 'string', 'prefilter[currentTagName]': 'string', 'prefilter[currentTagNameNorm]': 'string', 'prefilter[projectId]': 'string', 'prefilter[projectObj]': 'string', 'prefilter[projectName]': 'string', 'prefilter[projectNameNorm]': 'string', 'prefilter[projectIntegrationProvider]': 'string', 'prefilter[projectIntegrationName]': 'string', 'prefilter[projectIntegrationNameNorm]': 'string', 'prefilter[taskId]': 'string', 'prefilter[taskObj]': 'string', 'prefilter[taskName]': 'string', 'prefilter[taskNameNorm]': 'string', 'prefilter[taskIntegrationProvider]': 'string', 'prefilter[taskIntegrationName]': 'string', 'prefilter[taskIntegrationNameNorm]': 'string', 'prefilter[taskIntegrationLink]': 'string', 'prefilter[taskIntegrationLastTracked]': 'string', 'prefilter[date]': 'string', 'prefilter[timezone]': 'string', 'prefilter[start]': 'string', 'prefilter[end]': 'string', 'prefilter[item]': 'string', 'filter[ratio]': 'string', 'filter[ratioTotal]': 'string', 'filter[count]': 'string', 'prefilter[quants]': 'string', 'prefilter[offsets]': 'string', 'filter[quant0]': 'string', 'filter[quant1]': 'string', 'filter[quant2]': 'string', 'filter[total]': 'string', 'filter[meetingTotal]': 'string', 'prefilter[comCat]': 'string', 'filter[comCatObj]': 'string', 'prefilter[entity]': 'string', 'prefilter[name]': 'string', 'prefilter[score]': 'string', 'prefilter[tagId]': 'string', 'prefilter[userCat]': 'string', 'filter[clicks]': 'string', 'filter[moves]': 'string', 'filter[keys]': 'string', 'filter[totalMins]': 'string', 'filter[idleSec]': 'string', 'filter[idleSecRatio]': 'string', 'filter[idleMins]': 'string', 'filter[idleMinsRatio]': 'string', 'filter[totalSec]': 'string', 'filter[activeSec]': 'string', 'filter[activeSecRatio]': 'string', 'filter[standardActiveSec]': 'string', 'filter[activeBias]': 'string', 'filter[activeBiasRatio]': 'string', 'filter[standardActiveSecRatio]': 'string', 'ratio-page': 'string', 'ratio-limit': 'string', 'ratio-sort': 'userId', 'ratio-filter[total]': 'string', 'ratio-field': 'string', 'ratio-id': 'string', 'date-page': 'string', 'date-limit': 'string' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.1/stats/category?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- {
- "total": 0
}
], - "paging": {
- "cur": "string",
- "next": "string",
- "limit": 0,
- "totalCount": 0,
- "nItems": 0
}
}Get summary stats v1.1.
NOTE:
This documentation uses ratio=score and sort=modeTotal as an example.
As such, you can get responses that contain score and modeTotal, depending on the parameters you specify when making the request.
It is important to understand that score will be replaced by the value you specify for the ratio param and modeTotal will be replaced by the value you specify for sort.
You have to specify sort param for this API to work.
apiKey) | company required | string ID of Company, user refers to. |
| from | string <date-time> ISO 8601 date-time for the start of the query range (inclusive). Defaults to 30 minutes before the |
| to | string <date-time> ISO 8601 date-time for the end of the query range (exclusive). Defaults to the current time |
| user | string Comma-separated list of user IDs to filter results. If omitted, returns data for the authenticated user. Use |
| tag | string Comma-separated list of tag IDs. When specified, filters results to include only users assigned to these tags |
| task | string Task ID to filter statistics. When specified, returns statistics only for the specified task |
| unpaid | integer Set to 1 to include unpaid time from unpaid breaks in the report. Set to 0 or omit to exclude unpaid time |
| breaks | string Specifies which types of breaks to include in results: |
| fields | string Comma-separated list of field names to include in the response. When specified, only the requested fields will be returned |
| group-by | string Field name to group results by. Results will be aggregated according to the specified field if grouping is supported for that field |
| resolve | string Optional comma-separated list of field names to resolve. |
| ratio | string Optional comma-separated list of field names to get total ratio of. |
| level | string Level of information ("user" by default) |
| timezone | string Timezone of ranges breaks. |
| period | string Default: "days" Period unit of ranges subdivision. |
| interval | integer <int32> >= 1 Number of period units. |
| paging | integer Set to |
| page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| prefilter[userId] | string "string" -- exact match |
| prefilter[userObjPrePos] | string "string" -- exact match |
| prefilter[userObjPos] | string "string" -- exact match |
| prefilter[userName] | string "string" -- exact match |
| prefilter[userNameNorm] | string unknown API-defined value |
| prefilter[userArchived] | string "string" -- exact match |
| prefilter[currentTagId] | string "string" -- exact match |
| prefilter[currentTagObj] | string "string" -- exact match |
| prefilter[currentTagName] | string "string" -- exact match |
| prefilter[currentTagNameNorm] | string "string" -- exact match |
| prefilter[projectId] | string "string" -- exact match |
| prefilter[projectObj] | string "string" -- exact match |
| prefilter[projectName] | string "string" -- exact match |
| prefilter[projectNameNorm] | string "string" -- exact match |
| prefilter[projectIntegrationProvider] | string "string" -- exact match |
| prefilter[projectIntegrationName] | string "string" -- exact match |
| prefilter[projectIntegrationNameNorm] | string "string" -- exact match |
| prefilter[taskId] | string "string" -- exact match |
| prefilter[taskObj] | string "string" -- exact match |
| prefilter[taskName] | string "string" -- exact match |
| prefilter[taskNameNorm] | string "string" -- exact match |
| prefilter[taskIntegrationProvider] | string "string" -- exact match |
| prefilter[taskIntegrationName] | string "string" -- exact match |
| prefilter[taskIntegrationNameNorm] | string "string" -- exact match |
| prefilter[taskIntegrationLink] | string "string" -- exact match |
| prefilter[taskIntegrationLastTracked] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[date] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[timezone] | string "string" -- exact match |
| prefilter[start] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[end] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[item] | string "string" -- exact match |
| filter[ratio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[ratioTotal] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[count] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[quants] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[offsets] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[quant0] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[quant1] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[quant2] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[total] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[meetingTotal] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[comCat] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[comCatObj] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[entity] | string "string" -- exact match |
| prefilter[name] | string unknown API-defined value |
| prefilter[score] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[tagId] | string "string" -- exact match |
| prefilter[userCat] | string "string" -- exact match |
| filter[clicks] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[moves] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[keys] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[totalMins] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleSec] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleSecRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleMins] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleMinsRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[totalSec] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[activeSec] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[activeSecRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[standardActiveSec] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[activeBias] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[activeBiasRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[standardActiveSecRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[offcomputer] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[computer] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[mobile] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[manual] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[mobMan] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[paidBreak] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unpaidBreak] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[meeting] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[paidLeave] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unpaidLeave] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[offcomputerRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[computerRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[mobileRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[manualRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[mobManRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[paidBreakRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unpaidBreakRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[meetingRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[paidLeaveRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unpaidLeaveRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unratedHis] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unprodHis] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[neutralHis] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[prodHis] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unratedHisRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unprodHisRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[neutralHisRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[prodHisRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unrated] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unprod] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[neutral] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[prod] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unratedRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unprodRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[neutralRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[prodRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleSecMeeting] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[clicksRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleSecMeetingRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[keysRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[movesRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[totalSecRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleMinsMeeting] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleOutsideMeetingSec] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleOutsideMeetingMins] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleSecDuringMeetingRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleSecOutsideMeetingRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleMinsDuringMeetingRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleMinsOutsideMeetingRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[outShift] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[outShiftRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[project] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[task] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[shift] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[projectRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[taskRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[shiftRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[comCatRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[scoreTotal] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[scoreTotalRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[workRange] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[workRangeRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[modeTotal] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[meetingCount] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[avgMeetingDuration] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[avgIdleTimePerMeeting] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| ratio-page | string When specified, defines how many resulting first items to skip |
| ratio-limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| ratio-sort | string Which field to sort by, prepend it with "_" for descending sorting |
| ratio-filter[total] | string Prefilter ratio totals. |
| ratio-field | string A field to specify for "ratio" paging. Default is first specified in "ratio" param |
| ratio-id | string ID of ratio item for "ratio" paging. Default is top first in ratio array. |
| date-page | string When specified, defines how many resulting first items to skip |
| date-limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', from: '2019-08-24T14:15:22Z', to: '2019-08-24T14:15:22Z', user: 'string', tag: 'string', task: 'string', unpaid: '0', breaks: 'all', fields: 'string', 'group-by': 'string', resolve: 'string', ratio: 'string', level: 'company', timezone: 'string', period: 'days', interval: '1', paging: '0', page: 'string', limit: 'string', sort: 'userId', 'prefilter[userId]': 'string', 'prefilter[userObjPrePos]': 'string', 'prefilter[userObjPos]': 'string', 'prefilter[userName]': 'string', 'prefilter[userNameNorm]': 'string', 'prefilter[userArchived]': 'string', 'prefilter[currentTagId]': 'string', 'prefilter[currentTagObj]': 'string', 'prefilter[currentTagName]': 'string', 'prefilter[currentTagNameNorm]': 'string', 'prefilter[projectId]': 'string', 'prefilter[projectObj]': 'string', 'prefilter[projectName]': 'string', 'prefilter[projectNameNorm]': 'string', 'prefilter[projectIntegrationProvider]': 'string', 'prefilter[projectIntegrationName]': 'string', 'prefilter[projectIntegrationNameNorm]': 'string', 'prefilter[taskId]': 'string', 'prefilter[taskObj]': 'string', 'prefilter[taskName]': 'string', 'prefilter[taskNameNorm]': 'string', 'prefilter[taskIntegrationProvider]': 'string', 'prefilter[taskIntegrationName]': 'string', 'prefilter[taskIntegrationNameNorm]': 'string', 'prefilter[taskIntegrationLink]': 'string', 'prefilter[taskIntegrationLastTracked]': 'string', 'prefilter[date]': 'string', 'prefilter[timezone]': 'string', 'prefilter[start]': 'string', 'prefilter[end]': 'string', 'prefilter[item]': 'string', 'filter[ratio]': 'string', 'filter[ratioTotal]': 'string', 'filter[count]': 'string', 'prefilter[quants]': 'string', 'prefilter[offsets]': 'string', 'filter[quant0]': 'string', 'filter[quant1]': 'string', 'filter[quant2]': 'string', 'filter[total]': 'string', 'filter[meetingTotal]': 'string', 'filter[comCat]': 'string', 'filter[comCatObj]': 'string', 'prefilter[entity]': 'string', 'prefilter[name]': 'string', 'prefilter[score]': 'string', 'prefilter[tagId]': 'string', 'prefilter[userCat]': 'string', 'filter[clicks]': 'string', 'filter[moves]': 'string', 'filter[keys]': 'string', 'filter[totalMins]': 'string', 'filter[idleSec]': 'string', 'filter[idleSecRatio]': 'string', 'filter[idleMins]': 'string', 'filter[idleMinsRatio]': 'string', 'filter[totalSec]': 'string', 'filter[activeSec]': 'string', 'filter[activeSecRatio]': 'string', 'filter[standardActiveSec]': 'string', 'filter[activeBias]': 'string', 'filter[activeBiasRatio]': 'string', 'filter[standardActiveSecRatio]': 'string', 'filter[offcomputer]': 'string', 'filter[computer]': 'string', 'filter[mobile]': 'string', 'filter[manual]': 'string', 'filter[mobMan]': 'string', 'filter[paidBreak]': 'string', 'filter[unpaidBreak]': 'string', 'filter[meeting]': 'string', 'filter[paidLeave]': 'string', 'filter[unpaidLeave]': 'string', 'filter[offcomputerRatio]': 'string', 'filter[computerRatio]': 'string', 'filter[mobileRatio]': 'string', 'filter[manualRatio]': 'string', 'filter[mobManRatio]': 'string', 'filter[paidBreakRatio]': 'string', 'filter[unpaidBreakRatio]': 'string', 'filter[meetingRatio]': 'string', 'filter[paidLeaveRatio]': 'string', 'filter[unpaidLeaveRatio]': 'string', 'filter[unratedHis]': 'string', 'filter[unprodHis]': 'string', 'filter[neutralHis]': 'string', 'filter[prodHis]': 'string', 'filter[unratedHisRatio]': 'string', 'filter[unprodHisRatio]': 'string', 'filter[neutralHisRatio]': 'string', 'filter[prodHisRatio]': 'string', 'filter[unrated]': 'string', 'filter[unprod]': 'string', 'filter[neutral]': 'string', 'filter[prod]': 'string', 'filter[unratedRatio]': 'string', 'filter[unprodRatio]': 'string', 'filter[neutralRatio]': 'string', 'filter[prodRatio]': 'string', 'filter[idleSecMeeting]': 'string', 'filter[clicksRatio]': 'string', 'filter[idleSecMeetingRatio]': 'string', 'filter[keysRatio]': 'string', 'filter[movesRatio]': 'string', 'filter[totalSecRatio]': 'string', 'filter[idleMinsMeeting]': 'string', 'filter[idleOutsideMeetingSec]': 'string', 'filter[idleOutsideMeetingMins]': 'string', 'filter[idleSecDuringMeetingRatio]': 'string', 'filter[idleSecOutsideMeetingRatio]': 'string', 'filter[idleMinsDuringMeetingRatio]': 'string', 'filter[idleMinsOutsideMeetingRatio]': 'string', 'filter[outShift]': 'string', 'filter[outShiftRatio]': 'string', 'filter[project]': 'string', 'filter[task]': 'string', 'filter[shift]': 'string', 'filter[projectRatio]': 'string', 'filter[taskRatio]': 'string', 'filter[shiftRatio]': 'string', 'filter[comCatRatio]': 'string', 'filter[scoreTotal]': 'string', 'filter[scoreTotalRatio]': 'string', 'filter[workRange]': 'string', 'filter[workRangeRatio]': 'string', 'filter[modeTotal]': 'string', 'filter[meetingCount]': 'string', 'filter[avgMeetingDuration]': 'string', 'filter[avgIdleTimePerMeeting]': 'string', 'ratio-page': 'string', 'ratio-limit': 'string', 'ratio-sort': 'userId', 'ratio-filter[total]': 'string', 'ratio-field': 'string', 'ratio-id': 'string', 'date-page': 'string', 'date-limit': 'string' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.1/stats/summary?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- {
- "total": 0,
- "modeTotal": 0
}
], - "paging": {
- "cur": "string",
- "next": "string",
- "limit": 0,
- "totalCount": 0,
- "nItems": 0
}
}Get work-life stats v1.1.
NOTE:
This documentation uses ratio=score and sort=modeTotal as an example.
As such, you can get responses that contain score and modeTotal, depending on the parameters you specify when making the request.
It is important to understand that score will be replaced by the value you specify for the ratio param and modeTotal will be replaced by the value you specify for sort.
apiKey) | company required | string ID of Company, user refers to. |
| from | string <date-time> ISO 8601 date-time for the start of the query range (inclusive). Defaults to 30 minutes before the |
| to | string <date-time> ISO 8601 date-time for the end of the query range (exclusive). Defaults to the current time |
| user | string Comma-separated list of user IDs to filter results. If omitted, returns data for the authenticated user. Use |
| tag | string Comma-separated list of tag IDs. When specified, filters results to include only users assigned to these tags |
| task | string Task ID to filter statistics. When specified, returns statistics only for the specified task |
| unpaid | integer Set to 1 to include unpaid time from unpaid breaks in the report. Set to 0 or omit to exclude unpaid time |
| breaks | string Specifies which types of breaks to include in results: |
| fields | string Comma-separated list of field names to include in the response. When specified, only the requested fields will be returned |
| group-by | string Field name to group results by. Results will be aggregated according to the specified field if grouping is supported for that field |
| resolve | string Optional comma-separated list of field names to resolve. |
| ratio | string Optional comma-separated list of field names to get total ratio of. |
| level | string Level of information ("user" by default) |
| timezone | string Timezone of ranges breaks. |
| period | string Default: "days" Period unit of ranges subdivision. |
| interval | integer <int32> >= 1 Number of period units. |
| paging | integer Set to |
| page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| filter[total] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[totalHours] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[lastHour] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[outShift] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[day] | string "string" -- exact match |
| filter[tooManyHours] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[lateHours] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[outOfShiftWork] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[weekendWork] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[totalIssues] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[dailyIssues] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[userId] | string "string" -- exact match |
| prefilter[userObjPrePos] | string "string" -- exact match |
| prefilter[userObjPos] | string "string" -- exact match |
| prefilter[userName] | string "string" -- exact match |
| prefilter[userNameNorm] | string unknown API-defined value |
| prefilter[userArchived] | string "string" -- exact match |
| prefilter[currentTagId] | string "string" -- exact match |
| prefilter[currentTagObj] | string "string" -- exact match |
| prefilter[currentTagName] | string "string" -- exact match |
| prefilter[currentTagNameNorm] | string "string" -- exact match |
| prefilter[projectId] | string "string" -- exact match |
| prefilter[projectObj] | string "string" -- exact match |
| prefilter[projectName] | string "string" -- exact match |
| prefilter[projectNameNorm] | string "string" -- exact match |
| prefilter[projectIntegrationProvider] | string "string" -- exact match |
| prefilter[projectIntegrationName] | string "string" -- exact match |
| prefilter[projectIntegrationNameNorm] | string "string" -- exact match |
| prefilter[taskId] | string "string" -- exact match |
| prefilter[taskObj] | string "string" -- exact match |
| prefilter[taskName] | string "string" -- exact match |
| prefilter[taskNameNorm] | string "string" -- exact match |
| prefilter[taskIntegrationProvider] | string "string" -- exact match |
| prefilter[taskIntegrationName] | string "string" -- exact match |
| prefilter[taskIntegrationNameNorm] | string "string" -- exact match |
| prefilter[taskIntegrationLink] | string "string" -- exact match |
| prefilter[taskIntegrationLastTracked] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[date] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[timezone] | string "string" -- exact match |
| prefilter[start] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[end] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[item] | string "string" -- exact match |
| filter[ratio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[ratioTotal] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[count] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[quants] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[offsets] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[quant0] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[quant1] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[quant2] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| ratio-page | string When specified, defines how many resulting first items to skip |
| ratio-limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| ratio-sort | string Which field to sort by, prepend it with "_" for descending sorting |
| ratio-filter[total] | string Prefilter ratio totals. |
| ratio-field | string A field to specify for "ratio" paging. Default is first specified in "ratio" param |
| ratio-id | string ID of ratio item for "ratio" paging. Default is top first in ratio array. |
| date-page | string When specified, defines how many resulting first items to skip |
| date-limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', from: '2019-08-24T14:15:22Z', to: '2019-08-24T14:15:22Z', user: 'string', tag: 'string', task: 'string', unpaid: '0', breaks: 'all', fields: 'string', 'group-by': 'string', resolve: 'string', ratio: 'string', level: 'company', timezone: 'string', period: 'days', interval: '1', paging: '0', page: 'string', limit: 'string', sort: 'total', 'filter[total]': 'string', 'filter[totalHours]': 'string', 'prefilter[lastHour]': 'string', 'filter[outShift]': 'string', 'prefilter[day]': 'string', 'filter[tooManyHours]': 'string', 'filter[lateHours]': 'string', 'filter[outOfShiftWork]': 'string', 'filter[weekendWork]': 'string', 'filter[totalIssues]': 'string', 'filter[dailyIssues]': 'string', 'prefilter[userId]': 'string', 'prefilter[userObjPrePos]': 'string', 'prefilter[userObjPos]': 'string', 'prefilter[userName]': 'string', 'prefilter[userNameNorm]': 'string', 'prefilter[userArchived]': 'string', 'prefilter[currentTagId]': 'string', 'prefilter[currentTagObj]': 'string', 'prefilter[currentTagName]': 'string', 'prefilter[currentTagNameNorm]': 'string', 'prefilter[projectId]': 'string', 'prefilter[projectObj]': 'string', 'prefilter[projectName]': 'string', 'prefilter[projectNameNorm]': 'string', 'prefilter[projectIntegrationProvider]': 'string', 'prefilter[projectIntegrationName]': 'string', 'prefilter[projectIntegrationNameNorm]': 'string', 'prefilter[taskId]': 'string', 'prefilter[taskObj]': 'string', 'prefilter[taskName]': 'string', 'prefilter[taskNameNorm]': 'string', 'prefilter[taskIntegrationProvider]': 'string', 'prefilter[taskIntegrationName]': 'string', 'prefilter[taskIntegrationNameNorm]': 'string', 'prefilter[taskIntegrationLink]': 'string', 'prefilter[taskIntegrationLastTracked]': 'string', 'prefilter[date]': 'string', 'prefilter[timezone]': 'string', 'prefilter[start]': 'string', 'prefilter[end]': 'string', 'prefilter[item]': 'string', 'filter[ratio]': 'string', 'filter[ratioTotal]': 'string', 'filter[count]': 'string', 'prefilter[quants]': 'string', 'prefilter[offsets]': 'string', 'filter[quant0]': 'string', 'filter[quant1]': 'string', 'filter[quant2]': 'string', 'ratio-page': 'string', 'ratio-limit': 'string', 'ratio-sort': 'total', 'ratio-filter[total]': 'string', 'ratio-field': 'string', 'ratio-id': 'string', 'date-page': 'string', 'date-limit': 'string' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.1/stats/work-life?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": { }
}Get shift stats v1.1.
NOTE:
This documentation uses ratio=score and sort=modeTotal as an example.
As such, you can get responses that contain score and modeTotal, depending on the parameters you specify when making the request.
It is important to understand that score will be replaced by the value you specify for the ratio param and modeTotal will be replaced by the value you specify for sort.
apiKey) | company required | string ID of Company, user refers to. |
| from | string <date-time> ISO 8601 date-time for the start of the query range (inclusive). Defaults to 30 minutes before the |
| to | string <date-time> ISO 8601 date-time for the end of the query range (exclusive). Defaults to the current time |
| user | string Comma-separated list of user IDs to filter results. If omitted, returns data for the authenticated user. Use |
| tag | string Comma-separated list of tag IDs. When specified, filters results to include only users assigned to these tags |
| task | string Task ID to filter statistics. When specified, returns statistics only for the specified task |
| unpaid | integer Set to 1 to include unpaid time from unpaid breaks in the report. Set to 0 or omit to exclude unpaid time |
| breaks | string Specifies which types of breaks to include in results: |
| fields | string Comma-separated list of field names to include in the response. When specified, only the requested fields will be returned |
| group-by | string Field name to group results by. Results will be aggregated according to the specified field if grouping is supported for that field |
| resolve | string Optional comma-separated list of field names to resolve. |
| ratio | string Optional comma-separated list of field names to get total ratio of. |
| level | string Level of information ("user" by default) |
| timezone | string Timezone of ranges breaks. |
| period | string Default: "days" Period unit of ranges subdivision. |
| interval | integer <int32> >= 1 Number of period units. |
| paging | integer Set to |
| page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| prefilter[userId] | string "string" -- exact match |
| prefilter[userObjPrePos] | string "string" -- exact match |
| prefilter[userObjPos] | string "string" -- exact match |
| prefilter[userName] | string "string" -- exact match |
| prefilter[userNameNorm] | string unknown API-defined value |
| prefilter[userArchived] | string "string" -- exact match |
| prefilter[currentTagId] | string "string" -- exact match |
| prefilter[currentTagObj] | string "string" -- exact match |
| prefilter[currentTagName] | string "string" -- exact match |
| prefilter[currentTagNameNorm] | string "string" -- exact match |
| prefilter[projectId] | string "string" -- exact match |
| prefilter[projectObj] | string "string" -- exact match |
| prefilter[projectName] | string "string" -- exact match |
| prefilter[projectNameNorm] | string "string" -- exact match |
| prefilter[projectIntegrationProvider] | string "string" -- exact match |
| prefilter[projectIntegrationName] | string "string" -- exact match |
| prefilter[projectIntegrationNameNorm] | string "string" -- exact match |
| prefilter[taskId] | string "string" -- exact match |
| prefilter[taskObj] | string "string" -- exact match |
| prefilter[taskName] | string "string" -- exact match |
| prefilter[taskNameNorm] | string "string" -- exact match |
| prefilter[taskIntegrationProvider] | string "string" -- exact match |
| prefilter[taskIntegrationName] | string "string" -- exact match |
| prefilter[taskIntegrationNameNorm] | string "string" -- exact match |
| prefilter[taskIntegrationLink] | string "string" -- exact match |
| prefilter[taskIntegrationLastTracked] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[date] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[timezone] | string "string" -- exact match |
| prefilter[start] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[end] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[item] | string "string" -- exact match |
| filter[ratio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[ratioTotal] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[count] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[quants] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[offsets] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[quant0] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[quant1] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[quant2] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[total] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[shiftId] | string "string" -- exact match |
| filter[shiftObj] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[shiftStart] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[shiftEnd] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[minHours] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| ratio-page | string When specified, defines how many resulting first items to skip |
| ratio-limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| ratio-sort | string Which field to sort by, prepend it with "_" for descending sorting |
| ratio-filter[total] | string Prefilter ratio totals. |
| ratio-field | string A field to specify for "ratio" paging. Default is first specified in "ratio" param |
| ratio-id | string ID of ratio item for "ratio" paging. Default is top first in ratio array. |
| date-page | string When specified, defines how many resulting first items to skip |
| date-limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', from: '2019-08-24T14:15:22Z', to: '2019-08-24T14:15:22Z', user: 'string', tag: 'string', task: 'string', unpaid: '0', breaks: 'all', fields: 'string', 'group-by': 'string', resolve: 'string', ratio: 'string', level: 'company', timezone: 'string', period: 'days', interval: '1', paging: '0', page: 'string', limit: 'string', sort: 'userId', 'prefilter[userId]': 'string', 'prefilter[userObjPrePos]': 'string', 'prefilter[userObjPos]': 'string', 'prefilter[userName]': 'string', 'prefilter[userNameNorm]': 'string', 'prefilter[userArchived]': 'string', 'prefilter[currentTagId]': 'string', 'prefilter[currentTagObj]': 'string', 'prefilter[currentTagName]': 'string', 'prefilter[currentTagNameNorm]': 'string', 'prefilter[projectId]': 'string', 'prefilter[projectObj]': 'string', 'prefilter[projectName]': 'string', 'prefilter[projectNameNorm]': 'string', 'prefilter[projectIntegrationProvider]': 'string', 'prefilter[projectIntegrationName]': 'string', 'prefilter[projectIntegrationNameNorm]': 'string', 'prefilter[taskId]': 'string', 'prefilter[taskObj]': 'string', 'prefilter[taskName]': 'string', 'prefilter[taskNameNorm]': 'string', 'prefilter[taskIntegrationProvider]': 'string', 'prefilter[taskIntegrationName]': 'string', 'prefilter[taskIntegrationNameNorm]': 'string', 'prefilter[taskIntegrationLink]': 'string', 'prefilter[taskIntegrationLastTracked]': 'string', 'prefilter[date]': 'string', 'prefilter[timezone]': 'string', 'prefilter[start]': 'string', 'prefilter[end]': 'string', 'prefilter[item]': 'string', 'filter[ratio]': 'string', 'filter[ratioTotal]': 'string', 'filter[count]': 'string', 'prefilter[quants]': 'string', 'prefilter[offsets]': 'string', 'filter[quant0]': 'string', 'filter[quant1]': 'string', 'filter[quant2]': 'string', 'filter[total]': 'string', 'prefilter[shiftId]': 'string', 'filter[shiftObj]': 'string', 'prefilter[shiftStart]': 'string', 'prefilter[shiftEnd]': 'string', 'filter[minHours]': 'string', 'ratio-page': 'string', 'ratio-limit': 'string', 'ratio-sort': 'userId', 'ratio-filter[total]': 'string', 'ratio-field': 'string', 'ratio-id': 'string', 'date-page': 'string', 'date-limit': 'string' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.1/stats/shift?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": { }
}Get outliers stats v1.1.
NOTE:
This documentation uses ratio=score and sort=modeTotal as an example.
As such, you can get responses that contain score and modeTotal, depending on the parameters you specify when making the request.
It is important to understand that score will be replaced by the value you specify for the ratio param and modeTotal will be replaced by the value you specify for sort.
apiKey) | company required | string ID of Company, user refers to. |
| from | string <date-time> ISO 8601 date-time for the start of the query range (inclusive). Defaults to 30 minutes before the |
| to | string <date-time> ISO 8601 date-time for the end of the query range (exclusive). Defaults to the current time |
| user | string Comma-separated list of user IDs to filter results. If omitted, returns data for the authenticated user. Use |
| tag | string Comma-separated list of tag IDs. When specified, filters results to include only users assigned to these tags |
| task | string Task ID to filter statistics. When specified, returns statistics only for the specified task |
| unpaid | integer Set to 1 to include unpaid time from unpaid breaks in the report. Set to 0 or omit to exclude unpaid time |
| breaks | string Specifies which types of breaks to include in results: |
| fields | string Comma-separated list of field names to include in the response. When specified, only the requested fields will be returned |
| group-by | string Field name to group results by. Results will be aggregated according to the specified field if grouping is supported for that field |
| resolve | string Optional comma-separated list of field names to resolve. |
| ratio | string Optional comma-separated list of field names to get total ratio of. |
| level | string Level of information ("user" by default) |
| timezone | string Timezone of ranges breaks. |
| period | string Default: "days" Period unit of ranges subdivision. |
| interval | integer <int32> >= 1 Number of period units. |
| paging | integer Set to |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', from: '2019-08-24T14:15:22Z', to: '2019-08-24T14:15:22Z', user: 'string', tag: 'string', task: 'string', unpaid: '0', breaks: 'all', fields: 'string', 'group-by': 'string', resolve: 'string', ratio: 'string', level: 'company', timezone: 'string', period: 'days', interval: '1', paging: '0' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.1/stats/outliers?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": { }
}Get total stats/timesheet v1.1.
NOTE:
This documentation uses ratio=score and sort=modeTotal as an example.
As such, you can get responses that contain score and modeTotal, depending on the parameters you specify when making the request.
It is important to understand that score will be replaced by the value you specify for the ratio param and modeTotal will be replaced by the value you specify for sort.
For work range use 1.1/stats/total?fields=start,end,workRange
apiKey) | company required | string ID of Company, user refers to. |
| from | string <date-time> ISO 8601 date-time for the start of the query range (inclusive). Defaults to 30 minutes before the |
| to | string <date-time> ISO 8601 date-time for the end of the query range (exclusive). Defaults to the current time |
| user | string Comma-separated list of user IDs to filter results. If omitted, returns data for the authenticated user. Use |
| tag | string Comma-separated list of tag IDs. When specified, filters results to include only users assigned to these tags |
| task | string Task ID to filter statistics. When specified, returns statistics only for the specified task |
| unpaid | integer Set to 1 to include unpaid time from unpaid breaks in the report. Set to 0 or omit to exclude unpaid time |
| breaks | string Specifies which types of breaks to include in results: |
| fields | string Comma-separated list of field names to include in the response. When specified, only the requested fields will be returned |
| group-by | string Field name to group results by. Results will be aggregated according to the specified field if grouping is supported for that field |
| resolve | string Optional comma-separated list of field names to resolve. |
| ratio | string Optional comma-separated list of field names to get total ratio of. |
| level | string Level of information ("user" by default) |
| timezone | string Timezone of ranges breaks. |
| period | string Default: "days" Period unit of ranges subdivision. |
| interval | integer <int32> >= 1 Number of period units. |
| paging | integer Set to |
| page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| filter[offcomputer] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[computer] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[mobile] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[manual] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[mobMan] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[paidBreak] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unpaidBreak] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[meeting] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[paidLeave] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unpaidLeave] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[offcomputerRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[computerRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[mobileRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[manualRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[mobManRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[paidBreakRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unpaidBreakRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[meetingRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[paidLeaveRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unpaidLeaveRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unratedHis] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unprodHis] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[neutralHis] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[prodHis] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unratedHisRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unprodHisRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[neutralHisRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[prodHisRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unrated] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unprod] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[neutral] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[prod] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unratedRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unprodRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[neutralRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[prodRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[standardActiveSec] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[activeBias] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[activeBiasRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[standardActiveSecRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[clicks] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleSec] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleSecMeeting] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[keys] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[moves] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[totalSec] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[activeSec] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[clicksRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleSecRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleSecMeetingRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[keysRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[movesRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[totalSecRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[activeSecRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[totalMins] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleMins] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleMinsMeeting] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleMinsRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleOutsideMeetingSec] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleOutsideMeetingMins] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleSecDuringMeetingRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleSecOutsideMeetingRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleMinsDuringMeetingRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleMinsOutsideMeetingRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[outShift] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[outShiftRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[project] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[task] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[shift] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[projectRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[taskRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[shiftRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[comCat] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[comCatRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[scoreTotal] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[scoreTotalRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[workRange] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[workRangeRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[modeTotal] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[total] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[meetingCount] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[avgMeetingDuration] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[avgIdleTimePerMeeting] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[userId] | string "string" -- exact match |
| prefilter[userObjPrePos] | string "string" -- exact match |
| prefilter[userObjPos] | string "string" -- exact match |
| prefilter[userName] | string "string" -- exact match |
| prefilter[userNameNorm] | string unknown API-defined value |
| prefilter[userArchived] | string "string" -- exact match |
| prefilter[currentTagId] | string "string" -- exact match |
| prefilter[currentTagObj] | string "string" -- exact match |
| prefilter[currentTagName] | string "string" -- exact match |
| prefilter[currentTagNameNorm] | string "string" -- exact match |
| prefilter[projectId] | string "string" -- exact match |
| prefilter[projectObj] | string "string" -- exact match |
| prefilter[projectName] | string "string" -- exact match |
| prefilter[projectNameNorm] | string "string" -- exact match |
| prefilter[projectIntegrationProvider] | string "string" -- exact match |
| prefilter[projectIntegrationName] | string "string" -- exact match |
| prefilter[projectIntegrationNameNorm] | string "string" -- exact match |
| prefilter[taskId] | string "string" -- exact match |
| prefilter[taskObj] | string "string" -- exact match |
| prefilter[taskName] | string "string" -- exact match |
| prefilter[taskNameNorm] | string "string" -- exact match |
| prefilter[taskIntegrationProvider] | string "string" -- exact match |
| prefilter[taskIntegrationName] | string "string" -- exact match |
| prefilter[taskIntegrationNameNorm] | string "string" -- exact match |
| prefilter[taskIntegrationLink] | string "string" -- exact match |
| prefilter[taskIntegrationLastTracked] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[date] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[timezone] | string "string" -- exact match |
| prefilter[start] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[end] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[item] | string "string" -- exact match |
| filter[ratio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[ratioTotal] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[count] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[quants] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[offsets] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[quant0] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[quant1] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[quant2] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| ratio-page | string When specified, defines how many resulting first items to skip |
| ratio-limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| ratio-sort | string Which field to sort by, prepend it with "_" for descending sorting |
| ratio-filter[total] | string Prefilter ratio totals. |
| ratio-field | string A field to specify for "ratio" paging. Default is first specified in "ratio" param |
| ratio-id | string ID of ratio item for "ratio" paging. Default is top first in ratio array. |
| date-page | string When specified, defines how many resulting first items to skip |
| date-limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', from: '2019-08-24T14:15:22Z', to: '2019-08-24T14:15:22Z', user: 'string', tag: 'string', task: 'string', unpaid: '0', breaks: 'all', fields: 'string', 'group-by': 'string', resolve: 'string', ratio: 'string', level: 'company', timezone: 'string', period: 'days', interval: '1', paging: '0', page: 'string', limit: 'string', sort: 'offcomputer', 'filter[offcomputer]': 'string', 'filter[computer]': 'string', 'filter[mobile]': 'string', 'filter[manual]': 'string', 'filter[mobMan]': 'string', 'filter[paidBreak]': 'string', 'filter[unpaidBreak]': 'string', 'filter[meeting]': 'string', 'filter[paidLeave]': 'string', 'filter[unpaidLeave]': 'string', 'filter[offcomputerRatio]': 'string', 'filter[computerRatio]': 'string', 'filter[mobileRatio]': 'string', 'filter[manualRatio]': 'string', 'filter[mobManRatio]': 'string', 'filter[paidBreakRatio]': 'string', 'filter[unpaidBreakRatio]': 'string', 'filter[meetingRatio]': 'string', 'filter[paidLeaveRatio]': 'string', 'filter[unpaidLeaveRatio]': 'string', 'filter[unratedHis]': 'string', 'filter[unprodHis]': 'string', 'filter[neutralHis]': 'string', 'filter[prodHis]': 'string', 'filter[unratedHisRatio]': 'string', 'filter[unprodHisRatio]': 'string', 'filter[neutralHisRatio]': 'string', 'filter[prodHisRatio]': 'string', 'filter[unrated]': 'string', 'filter[unprod]': 'string', 'filter[neutral]': 'string', 'filter[prod]': 'string', 'filter[unratedRatio]': 'string', 'filter[unprodRatio]': 'string', 'filter[neutralRatio]': 'string', 'filter[prodRatio]': 'string', 'filter[standardActiveSec]': 'string', 'filter[activeBias]': 'string', 'filter[activeBiasRatio]': 'string', 'filter[standardActiveSecRatio]': 'string', 'filter[clicks]': 'string', 'filter[idleSec]': 'string', 'filter[idleSecMeeting]': 'string', 'filter[keys]': 'string', 'filter[moves]': 'string', 'filter[totalSec]': 'string', 'filter[activeSec]': 'string', 'filter[clicksRatio]': 'string', 'filter[idleSecRatio]': 'string', 'filter[idleSecMeetingRatio]': 'string', 'filter[keysRatio]': 'string', 'filter[movesRatio]': 'string', 'filter[totalSecRatio]': 'string', 'filter[activeSecRatio]': 'string', 'filter[totalMins]': 'string', 'filter[idleMins]': 'string', 'filter[idleMinsMeeting]': 'string', 'filter[idleMinsRatio]': 'string', 'filter[idleOutsideMeetingSec]': 'string', 'filter[idleOutsideMeetingMins]': 'string', 'filter[idleSecDuringMeetingRatio]': 'string', 'filter[idleSecOutsideMeetingRatio]': 'string', 'filter[idleMinsDuringMeetingRatio]': 'string', 'filter[idleMinsOutsideMeetingRatio]': 'string', 'filter[outShift]': 'string', 'filter[outShiftRatio]': 'string', 'filter[project]': 'string', 'filter[task]': 'string', 'filter[shift]': 'string', 'filter[projectRatio]': 'string', 'filter[taskRatio]': 'string', 'filter[shiftRatio]': 'string', 'filter[comCat]': 'string', 'filter[comCatRatio]': 'string', 'filter[scoreTotal]': 'string', 'filter[scoreTotalRatio]': 'string', 'filter[workRange]': 'string', 'filter[workRangeRatio]': 'string', 'filter[modeTotal]': 'string', 'filter[total]': 'string', 'filter[meetingCount]': 'string', 'filter[avgMeetingDuration]': 'string', 'filter[avgIdleTimePerMeeting]': 'string', 'prefilter[userId]': 'string', 'prefilter[userObjPrePos]': 'string', 'prefilter[userObjPos]': 'string', 'prefilter[userName]': 'string', 'prefilter[userNameNorm]': 'string', 'prefilter[userArchived]': 'string', 'prefilter[currentTagId]': 'string', 'prefilter[currentTagObj]': 'string', 'prefilter[currentTagName]': 'string', 'prefilter[currentTagNameNorm]': 'string', 'prefilter[projectId]': 'string', 'prefilter[projectObj]': 'string', 'prefilter[projectName]': 'string', 'prefilter[projectNameNorm]': 'string', 'prefilter[projectIntegrationProvider]': 'string', 'prefilter[projectIntegrationName]': 'string', 'prefilter[projectIntegrationNameNorm]': 'string', 'prefilter[taskId]': 'string', 'prefilter[taskObj]': 'string', 'prefilter[taskName]': 'string', 'prefilter[taskNameNorm]': 'string', 'prefilter[taskIntegrationProvider]': 'string', 'prefilter[taskIntegrationName]': 'string', 'prefilter[taskIntegrationNameNorm]': 'string', 'prefilter[taskIntegrationLink]': 'string', 'prefilter[taskIntegrationLastTracked]': 'string', 'prefilter[date]': 'string', 'prefilter[timezone]': 'string', 'prefilter[start]': 'string', 'prefilter[end]': 'string', 'prefilter[item]': 'string', 'filter[ratio]': 'string', 'filter[ratioTotal]': 'string', 'filter[count]': 'string', 'prefilter[quants]': 'string', 'prefilter[offsets]': 'string', 'filter[quant0]': 'string', 'filter[quant1]': 'string', 'filter[quant2]': 'string', 'ratio-page': 'string', 'ratio-limit': 'string', 'ratio-sort': 'offcomputer', 'ratio-filter[total]': 'string', 'ratio-field': 'string', 'ratio-id': 'string', 'date-page': 'string', 'date-limit': 'string' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.1/stats/timesheet/total?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- {
- "total": 0,
- "modeTotal": 0
}
], - "paging": {
- "cur": "string",
- "next": "string",
- "limit": 0,
- "totalCount": 0,
- "nItems": 0
}
}Get category stats/timesheet v1.1.
NOTE:
This documentation uses ratio=score and sort=modeTotal as an example.
As such, you can get responses that contain score and modeTotal, depending on the parameters you specify when making the request.
It is important to understand that score will be replaced by the value you specify for the ratio param and modeTotal will be replaced by the value you specify for sort.
apiKey) | company required | string ID of Company, user refers to. |
| from | string <date-time> ISO 8601 date-time for the start of the query range (inclusive). Defaults to 30 minutes before the |
| to | string <date-time> ISO 8601 date-time for the end of the query range (exclusive). Defaults to the current time |
| user | string Comma-separated list of user IDs to filter results. If omitted, returns data for the authenticated user. Use |
| tag | string Comma-separated list of tag IDs. When specified, filters results to include only users assigned to these tags |
| task | string Task ID to filter statistics. When specified, returns statistics only for the specified task |
| unpaid | integer Set to 1 to include unpaid time from unpaid breaks in the report. Set to 0 or omit to exclude unpaid time |
| breaks | string Specifies which types of breaks to include in results: |
| fields | string Comma-separated list of field names to include in the response. When specified, only the requested fields will be returned |
| group-by | string Field name to group results by. Results will be aggregated according to the specified field if grouping is supported for that field |
| resolve | string Optional comma-separated list of field names to resolve. |
| ratio | string Optional comma-separated list of field names to get total ratio of. |
| level | string Level of information ("user" by default) |
| timezone | string Timezone of ranges breaks. |
| period | string Default: "days" Period unit of ranges subdivision. |
| interval | integer <int32> >= 1 Number of period units. |
| paging | integer Set to |
| page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| prefilter[userId] | string "string" -- exact match |
| prefilter[userObjPrePos] | string "string" -- exact match |
| prefilter[userObjPos] | string "string" -- exact match |
| prefilter[userName] | string "string" -- exact match |
| prefilter[userNameNorm] | string unknown API-defined value |
| prefilter[userArchived] | string "string" -- exact match |
| prefilter[currentTagId] | string "string" -- exact match |
| prefilter[currentTagObj] | string "string" -- exact match |
| prefilter[currentTagName] | string "string" -- exact match |
| prefilter[currentTagNameNorm] | string "string" -- exact match |
| prefilter[projectId] | string "string" -- exact match |
| prefilter[projectObj] | string "string" -- exact match |
| prefilter[projectName] | string "string" -- exact match |
| prefilter[projectNameNorm] | string "string" -- exact match |
| prefilter[projectIntegrationProvider] | string "string" -- exact match |
| prefilter[projectIntegrationName] | string "string" -- exact match |
| prefilter[projectIntegrationNameNorm] | string "string" -- exact match |
| prefilter[taskId] | string "string" -- exact match |
| prefilter[taskObj] | string "string" -- exact match |
| prefilter[taskName] | string "string" -- exact match |
| prefilter[taskNameNorm] | string "string" -- exact match |
| prefilter[taskIntegrationProvider] | string "string" -- exact match |
| prefilter[taskIntegrationName] | string "string" -- exact match |
| prefilter[taskIntegrationNameNorm] | string "string" -- exact match |
| prefilter[taskIntegrationLink] | string "string" -- exact match |
| prefilter[taskIntegrationLastTracked] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[date] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[timezone] | string "string" -- exact match |
| prefilter[start] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[end] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[item] | string "string" -- exact match |
| filter[ratio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[ratioTotal] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[count] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[quants] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[offsets] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[quant0] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[quant1] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[quant2] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[total] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[meetingTotal] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[comCat] | string "string" -- exact match |
| filter[comCatObj] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[entity] | string "string" -- exact match |
| prefilter[name] | string unknown API-defined value |
| prefilter[score] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[tagId] | string "string" -- exact match |
| prefilter[userCat] | string "string" -- exact match |
| filter[clicks] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[moves] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[keys] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[totalMins] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleSec] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleSecRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleMins] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleMinsRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[totalSec] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[activeSec] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[activeSecRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[standardActiveSec] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[activeBias] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[activeBiasRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[standardActiveSecRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| ratio-page | string When specified, defines how many resulting first items to skip |
| ratio-limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| ratio-sort | string Which field to sort by, prepend it with "_" for descending sorting |
| ratio-filter[total] | string Prefilter ratio totals. |
| ratio-field | string A field to specify for "ratio" paging. Default is first specified in "ratio" param |
| ratio-id | string ID of ratio item for "ratio" paging. Default is top first in ratio array. |
| date-page | string When specified, defines how many resulting first items to skip |
| date-limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', from: '2019-08-24T14:15:22Z', to: '2019-08-24T14:15:22Z', user: 'string', tag: 'string', task: 'string', unpaid: '0', breaks: 'all', fields: 'string', 'group-by': 'string', resolve: 'string', ratio: 'string', level: 'company', timezone: 'string', period: 'days', interval: '1', paging: '0', page: 'string', limit: 'string', sort: 'userId', 'prefilter[userId]': 'string', 'prefilter[userObjPrePos]': 'string', 'prefilter[userObjPos]': 'string', 'prefilter[userName]': 'string', 'prefilter[userNameNorm]': 'string', 'prefilter[userArchived]': 'string', 'prefilter[currentTagId]': 'string', 'prefilter[currentTagObj]': 'string', 'prefilter[currentTagName]': 'string', 'prefilter[currentTagNameNorm]': 'string', 'prefilter[projectId]': 'string', 'prefilter[projectObj]': 'string', 'prefilter[projectName]': 'string', 'prefilter[projectNameNorm]': 'string', 'prefilter[projectIntegrationProvider]': 'string', 'prefilter[projectIntegrationName]': 'string', 'prefilter[projectIntegrationNameNorm]': 'string', 'prefilter[taskId]': 'string', 'prefilter[taskObj]': 'string', 'prefilter[taskName]': 'string', 'prefilter[taskNameNorm]': 'string', 'prefilter[taskIntegrationProvider]': 'string', 'prefilter[taskIntegrationName]': 'string', 'prefilter[taskIntegrationNameNorm]': 'string', 'prefilter[taskIntegrationLink]': 'string', 'prefilter[taskIntegrationLastTracked]': 'string', 'prefilter[date]': 'string', 'prefilter[timezone]': 'string', 'prefilter[start]': 'string', 'prefilter[end]': 'string', 'prefilter[item]': 'string', 'filter[ratio]': 'string', 'filter[ratioTotal]': 'string', 'filter[count]': 'string', 'prefilter[quants]': 'string', 'prefilter[offsets]': 'string', 'filter[quant0]': 'string', 'filter[quant1]': 'string', 'filter[quant2]': 'string', 'filter[total]': 'string', 'filter[meetingTotal]': 'string', 'prefilter[comCat]': 'string', 'filter[comCatObj]': 'string', 'prefilter[entity]': 'string', 'prefilter[name]': 'string', 'prefilter[score]': 'string', 'prefilter[tagId]': 'string', 'prefilter[userCat]': 'string', 'filter[clicks]': 'string', 'filter[moves]': 'string', 'filter[keys]': 'string', 'filter[totalMins]': 'string', 'filter[idleSec]': 'string', 'filter[idleSecRatio]': 'string', 'filter[idleMins]': 'string', 'filter[idleMinsRatio]': 'string', 'filter[totalSec]': 'string', 'filter[activeSec]': 'string', 'filter[activeSecRatio]': 'string', 'filter[standardActiveSec]': 'string', 'filter[activeBias]': 'string', 'filter[activeBiasRatio]': 'string', 'filter[standardActiveSecRatio]': 'string', 'ratio-page': 'string', 'ratio-limit': 'string', 'ratio-sort': 'userId', 'ratio-filter[total]': 'string', 'ratio-field': 'string', 'ratio-id': 'string', 'date-page': 'string', 'date-limit': 'string' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.1/stats/timesheet/category?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- {
- "total": 0
}
], - "paging": {
- "cur": "string",
- "next": "string",
- "limit": 0,
- "totalCount": 0,
- "nItems": 0
}
}Get summary stats/timesheet v1.1.
NOTE:
This documentation uses ratio=score and sort=modeTotal as an example.
As such, you can get responses that contain score and modeTotal, depending on the parameters you specify when making the request.
It is important to understand that score will be replaced by the value you specify for the ratio param and modeTotal will be replaced by the value you specify for sort.
You have to specify sort param for this API to work.
apiKey) | company required | string ID of Company, user refers to. |
| from | string <date-time> ISO 8601 date-time for the start of the query range (inclusive). Defaults to 30 minutes before the |
| to | string <date-time> ISO 8601 date-time for the end of the query range (exclusive). Defaults to the current time |
| user | string Comma-separated list of user IDs to filter results. If omitted, returns data for the authenticated user. Use |
| tag | string Comma-separated list of tag IDs. When specified, filters results to include only users assigned to these tags |
| task | string Task ID to filter statistics. When specified, returns statistics only for the specified task |
| unpaid | integer Set to 1 to include unpaid time from unpaid breaks in the report. Set to 0 or omit to exclude unpaid time |
| breaks | string Specifies which types of breaks to include in results: |
| fields | string Comma-separated list of field names to include in the response. When specified, only the requested fields will be returned |
| group-by | string Field name to group results by. Results will be aggregated according to the specified field if grouping is supported for that field |
| resolve | string Optional comma-separated list of field names to resolve. |
| ratio | string Optional comma-separated list of field names to get total ratio of. |
| level | string Level of information ("user" by default) |
| timezone | string Timezone of ranges breaks. |
| period | string Default: "days" Period unit of ranges subdivision. |
| interval | integer <int32> >= 1 Number of period units. |
| paging | integer Set to |
| page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| prefilter[userId] | string "string" -- exact match |
| prefilter[userObjPrePos] | string "string" -- exact match |
| prefilter[userObjPos] | string "string" -- exact match |
| prefilter[userName] | string "string" -- exact match |
| prefilter[userNameNorm] | string unknown API-defined value |
| prefilter[userArchived] | string "string" -- exact match |
| prefilter[currentTagId] | string "string" -- exact match |
| prefilter[currentTagObj] | string "string" -- exact match |
| prefilter[currentTagName] | string "string" -- exact match |
| prefilter[currentTagNameNorm] | string "string" -- exact match |
| prefilter[projectId] | string "string" -- exact match |
| prefilter[projectObj] | string "string" -- exact match |
| prefilter[projectName] | string "string" -- exact match |
| prefilter[projectNameNorm] | string "string" -- exact match |
| prefilter[projectIntegrationProvider] | string "string" -- exact match |
| prefilter[projectIntegrationName] | string "string" -- exact match |
| prefilter[projectIntegrationNameNorm] | string "string" -- exact match |
| prefilter[taskId] | string "string" -- exact match |
| prefilter[taskObj] | string "string" -- exact match |
| prefilter[taskName] | string "string" -- exact match |
| prefilter[taskNameNorm] | string "string" -- exact match |
| prefilter[taskIntegrationProvider] | string "string" -- exact match |
| prefilter[taskIntegrationName] | string "string" -- exact match |
| prefilter[taskIntegrationNameNorm] | string "string" -- exact match |
| prefilter[taskIntegrationLink] | string "string" -- exact match |
| prefilter[taskIntegrationLastTracked] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[date] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[timezone] | string "string" -- exact match |
| prefilter[start] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[end] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[item] | string "string" -- exact match |
| filter[ratio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[ratioTotal] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[count] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[quants] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[offsets] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[quant0] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[quant1] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[quant2] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[total] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[meetingTotal] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[comCat] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[comCatObj] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[entity] | string "string" -- exact match |
| prefilter[name] | string unknown API-defined value |
| prefilter[score] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[tagId] | string "string" -- exact match |
| prefilter[userCat] | string "string" -- exact match |
| filter[clicks] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[moves] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[keys] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[totalMins] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleSec] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleSecRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleMins] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleMinsRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[totalSec] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[activeSec] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[activeSecRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[standardActiveSec] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[activeBias] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[activeBiasRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[standardActiveSecRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[offcomputer] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[computer] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[mobile] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[manual] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[mobMan] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[paidBreak] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unpaidBreak] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[meeting] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[paidLeave] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unpaidLeave] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[offcomputerRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[computerRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[mobileRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[manualRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[mobManRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[paidBreakRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unpaidBreakRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[meetingRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[paidLeaveRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unpaidLeaveRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unratedHis] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unprodHis] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[neutralHis] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[prodHis] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unratedHisRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unprodHisRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[neutralHisRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[prodHisRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unrated] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unprod] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[neutral] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[prod] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unratedRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[unprodRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[neutralRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[prodRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleSecMeeting] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[clicksRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleSecMeetingRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[keysRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[movesRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[totalSecRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleMinsMeeting] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleOutsideMeetingSec] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleOutsideMeetingMins] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleSecDuringMeetingRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleSecOutsideMeetingRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleMinsDuringMeetingRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[idleMinsOutsideMeetingRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[outShift] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[outShiftRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[project] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[task] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[shift] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[projectRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[taskRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[shiftRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[comCatRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[scoreTotal] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[scoreTotalRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[workRange] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[workRangeRatio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[modeTotal] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[meetingCount] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[avgMeetingDuration] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[avgIdleTimePerMeeting] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| ratio-page | string When specified, defines how many resulting first items to skip |
| ratio-limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| ratio-sort | string Which field to sort by, prepend it with "_" for descending sorting |
| ratio-filter[total] | string Prefilter ratio totals. |
| ratio-field | string A field to specify for "ratio" paging. Default is first specified in "ratio" param |
| ratio-id | string ID of ratio item for "ratio" paging. Default is top first in ratio array. |
| date-page | string When specified, defines how many resulting first items to skip |
| date-limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', from: '2019-08-24T14:15:22Z', to: '2019-08-24T14:15:22Z', user: 'string', tag: 'string', task: 'string', unpaid: '0', breaks: 'all', fields: 'string', 'group-by': 'string', resolve: 'string', ratio: 'string', level: 'company', timezone: 'string', period: 'days', interval: '1', paging: '0', page: 'string', limit: 'string', sort: 'userId', 'prefilter[userId]': 'string', 'prefilter[userObjPrePos]': 'string', 'prefilter[userObjPos]': 'string', 'prefilter[userName]': 'string', 'prefilter[userNameNorm]': 'string', 'prefilter[userArchived]': 'string', 'prefilter[currentTagId]': 'string', 'prefilter[currentTagObj]': 'string', 'prefilter[currentTagName]': 'string', 'prefilter[currentTagNameNorm]': 'string', 'prefilter[projectId]': 'string', 'prefilter[projectObj]': 'string', 'prefilter[projectName]': 'string', 'prefilter[projectNameNorm]': 'string', 'prefilter[projectIntegrationProvider]': 'string', 'prefilter[projectIntegrationName]': 'string', 'prefilter[projectIntegrationNameNorm]': 'string', 'prefilter[taskId]': 'string', 'prefilter[taskObj]': 'string', 'prefilter[taskName]': 'string', 'prefilter[taskNameNorm]': 'string', 'prefilter[taskIntegrationProvider]': 'string', 'prefilter[taskIntegrationName]': 'string', 'prefilter[taskIntegrationNameNorm]': 'string', 'prefilter[taskIntegrationLink]': 'string', 'prefilter[taskIntegrationLastTracked]': 'string', 'prefilter[date]': 'string', 'prefilter[timezone]': 'string', 'prefilter[start]': 'string', 'prefilter[end]': 'string', 'prefilter[item]': 'string', 'filter[ratio]': 'string', 'filter[ratioTotal]': 'string', 'filter[count]': 'string', 'prefilter[quants]': 'string', 'prefilter[offsets]': 'string', 'filter[quant0]': 'string', 'filter[quant1]': 'string', 'filter[quant2]': 'string', 'filter[total]': 'string', 'filter[meetingTotal]': 'string', 'filter[comCat]': 'string', 'filter[comCatObj]': 'string', 'prefilter[entity]': 'string', 'prefilter[name]': 'string', 'prefilter[score]': 'string', 'prefilter[tagId]': 'string', 'prefilter[userCat]': 'string', 'filter[clicks]': 'string', 'filter[moves]': 'string', 'filter[keys]': 'string', 'filter[totalMins]': 'string', 'filter[idleSec]': 'string', 'filter[idleSecRatio]': 'string', 'filter[idleMins]': 'string', 'filter[idleMinsRatio]': 'string', 'filter[totalSec]': 'string', 'filter[activeSec]': 'string', 'filter[activeSecRatio]': 'string', 'filter[standardActiveSec]': 'string', 'filter[activeBias]': 'string', 'filter[activeBiasRatio]': 'string', 'filter[standardActiveSecRatio]': 'string', 'filter[offcomputer]': 'string', 'filter[computer]': 'string', 'filter[mobile]': 'string', 'filter[manual]': 'string', 'filter[mobMan]': 'string', 'filter[paidBreak]': 'string', 'filter[unpaidBreak]': 'string', 'filter[meeting]': 'string', 'filter[paidLeave]': 'string', 'filter[unpaidLeave]': 'string', 'filter[offcomputerRatio]': 'string', 'filter[computerRatio]': 'string', 'filter[mobileRatio]': 'string', 'filter[manualRatio]': 'string', 'filter[mobManRatio]': 'string', 'filter[paidBreakRatio]': 'string', 'filter[unpaidBreakRatio]': 'string', 'filter[meetingRatio]': 'string', 'filter[paidLeaveRatio]': 'string', 'filter[unpaidLeaveRatio]': 'string', 'filter[unratedHis]': 'string', 'filter[unprodHis]': 'string', 'filter[neutralHis]': 'string', 'filter[prodHis]': 'string', 'filter[unratedHisRatio]': 'string', 'filter[unprodHisRatio]': 'string', 'filter[neutralHisRatio]': 'string', 'filter[prodHisRatio]': 'string', 'filter[unrated]': 'string', 'filter[unprod]': 'string', 'filter[neutral]': 'string', 'filter[prod]': 'string', 'filter[unratedRatio]': 'string', 'filter[unprodRatio]': 'string', 'filter[neutralRatio]': 'string', 'filter[prodRatio]': 'string', 'filter[idleSecMeeting]': 'string', 'filter[clicksRatio]': 'string', 'filter[idleSecMeetingRatio]': 'string', 'filter[keysRatio]': 'string', 'filter[movesRatio]': 'string', 'filter[totalSecRatio]': 'string', 'filter[idleMinsMeeting]': 'string', 'filter[idleOutsideMeetingSec]': 'string', 'filter[idleOutsideMeetingMins]': 'string', 'filter[idleSecDuringMeetingRatio]': 'string', 'filter[idleSecOutsideMeetingRatio]': 'string', 'filter[idleMinsDuringMeetingRatio]': 'string', 'filter[idleMinsOutsideMeetingRatio]': 'string', 'filter[outShift]': 'string', 'filter[outShiftRatio]': 'string', 'filter[project]': 'string', 'filter[task]': 'string', 'filter[shift]': 'string', 'filter[projectRatio]': 'string', 'filter[taskRatio]': 'string', 'filter[shiftRatio]': 'string', 'filter[comCatRatio]': 'string', 'filter[scoreTotal]': 'string', 'filter[scoreTotalRatio]': 'string', 'filter[workRange]': 'string', 'filter[workRangeRatio]': 'string', 'filter[modeTotal]': 'string', 'filter[meetingCount]': 'string', 'filter[avgMeetingDuration]': 'string', 'filter[avgIdleTimePerMeeting]': 'string', 'ratio-page': 'string', 'ratio-limit': 'string', 'ratio-sort': 'userId', 'ratio-filter[total]': 'string', 'ratio-field': 'string', 'ratio-id': 'string', 'date-page': 'string', 'date-limit': 'string' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.1/stats/timesheet/summary?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- {
- "total": 0,
- "modeTotal": 0
}
], - "paging": {
- "cur": "string",
- "next": "string",
- "limit": 0,
- "totalCount": 0,
- "nItems": 0
}
}Get work-life stats/timesheet v1.1.
NOTE:
This documentation uses ratio=score and sort=modeTotal as an example.
As such, you can get responses that contain score and modeTotal, depending on the parameters you specify when making the request.
It is important to understand that score will be replaced by the value you specify for the ratio param and modeTotal will be replaced by the value you specify for sort.
apiKey) | company required | string ID of Company, user refers to. |
| from | string <date-time> ISO 8601 date-time for the start of the query range (inclusive). Defaults to 30 minutes before the |
| to | string <date-time> ISO 8601 date-time for the end of the query range (exclusive). Defaults to the current time |
| user | string Comma-separated list of user IDs to filter results. If omitted, returns data for the authenticated user. Use |
| tag | string Comma-separated list of tag IDs. When specified, filters results to include only users assigned to these tags |
| task | string Task ID to filter statistics. When specified, returns statistics only for the specified task |
| unpaid | integer Set to 1 to include unpaid time from unpaid breaks in the report. Set to 0 or omit to exclude unpaid time |
| breaks | string Specifies which types of breaks to include in results: |
| fields | string Comma-separated list of field names to include in the response. When specified, only the requested fields will be returned |
| group-by | string Field name to group results by. Results will be aggregated according to the specified field if grouping is supported for that field |
| resolve | string Optional comma-separated list of field names to resolve. |
| ratio | string Optional comma-separated list of field names to get total ratio of. |
| level | string Level of information ("user" by default) |
| timezone | string Timezone of ranges breaks. |
| period | string Default: "days" Period unit of ranges subdivision. |
| interval | integer <int32> >= 1 Number of period units. |
| paging | integer Set to |
| page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| filter[total] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[totalHours] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[lastHour] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[outShift] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[day] | string "string" -- exact match |
| filter[tooManyHours] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[lateHours] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[outOfShiftWork] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[weekendWork] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[totalIssues] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[dailyIssues] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[userId] | string "string" -- exact match |
| prefilter[userObjPrePos] | string "string" -- exact match |
| prefilter[userObjPos] | string "string" -- exact match |
| prefilter[userName] | string "string" -- exact match |
| prefilter[userNameNorm] | string unknown API-defined value |
| prefilter[userArchived] | string "string" -- exact match |
| prefilter[currentTagId] | string "string" -- exact match |
| prefilter[currentTagObj] | string "string" -- exact match |
| prefilter[currentTagName] | string "string" -- exact match |
| prefilter[currentTagNameNorm] | string "string" -- exact match |
| prefilter[projectId] | string "string" -- exact match |
| prefilter[projectObj] | string "string" -- exact match |
| prefilter[projectName] | string "string" -- exact match |
| prefilter[projectNameNorm] | string "string" -- exact match |
| prefilter[projectIntegrationProvider] | string "string" -- exact match |
| prefilter[projectIntegrationName] | string "string" -- exact match |
| prefilter[projectIntegrationNameNorm] | string "string" -- exact match |
| prefilter[taskId] | string "string" -- exact match |
| prefilter[taskObj] | string "string" -- exact match |
| prefilter[taskName] | string "string" -- exact match |
| prefilter[taskNameNorm] | string "string" -- exact match |
| prefilter[taskIntegrationProvider] | string "string" -- exact match |
| prefilter[taskIntegrationName] | string "string" -- exact match |
| prefilter[taskIntegrationNameNorm] | string "string" -- exact match |
| prefilter[taskIntegrationLink] | string "string" -- exact match |
| prefilter[taskIntegrationLastTracked] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[date] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[timezone] | string "string" -- exact match |
| prefilter[start] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[end] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[item] | string "string" -- exact match |
| filter[ratio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[ratioTotal] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[count] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[quants] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[offsets] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[quant0] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[quant1] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[quant2] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| ratio-page | string When specified, defines how many resulting first items to skip |
| ratio-limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| ratio-sort | string Which field to sort by, prepend it with "_" for descending sorting |
| ratio-filter[total] | string Prefilter ratio totals. |
| ratio-field | string A field to specify for "ratio" paging. Default is first specified in "ratio" param |
| ratio-id | string ID of ratio item for "ratio" paging. Default is top first in ratio array. |
| date-page | string When specified, defines how many resulting first items to skip |
| date-limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', from: '2019-08-24T14:15:22Z', to: '2019-08-24T14:15:22Z', user: 'string', tag: 'string', task: 'string', unpaid: '0', breaks: 'all', fields: 'string', 'group-by': 'string', resolve: 'string', ratio: 'string', level: 'company', timezone: 'string', period: 'days', interval: '1', paging: '0', page: 'string', limit: 'string', sort: 'total', 'filter[total]': 'string', 'filter[totalHours]': 'string', 'prefilter[lastHour]': 'string', 'filter[outShift]': 'string', 'prefilter[day]': 'string', 'filter[tooManyHours]': 'string', 'filter[lateHours]': 'string', 'filter[outOfShiftWork]': 'string', 'filter[weekendWork]': 'string', 'filter[totalIssues]': 'string', 'filter[dailyIssues]': 'string', 'prefilter[userId]': 'string', 'prefilter[userObjPrePos]': 'string', 'prefilter[userObjPos]': 'string', 'prefilter[userName]': 'string', 'prefilter[userNameNorm]': 'string', 'prefilter[userArchived]': 'string', 'prefilter[currentTagId]': 'string', 'prefilter[currentTagObj]': 'string', 'prefilter[currentTagName]': 'string', 'prefilter[currentTagNameNorm]': 'string', 'prefilter[projectId]': 'string', 'prefilter[projectObj]': 'string', 'prefilter[projectName]': 'string', 'prefilter[projectNameNorm]': 'string', 'prefilter[projectIntegrationProvider]': 'string', 'prefilter[projectIntegrationName]': 'string', 'prefilter[projectIntegrationNameNorm]': 'string', 'prefilter[taskId]': 'string', 'prefilter[taskObj]': 'string', 'prefilter[taskName]': 'string', 'prefilter[taskNameNorm]': 'string', 'prefilter[taskIntegrationProvider]': 'string', 'prefilter[taskIntegrationName]': 'string', 'prefilter[taskIntegrationNameNorm]': 'string', 'prefilter[taskIntegrationLink]': 'string', 'prefilter[taskIntegrationLastTracked]': 'string', 'prefilter[date]': 'string', 'prefilter[timezone]': 'string', 'prefilter[start]': 'string', 'prefilter[end]': 'string', 'prefilter[item]': 'string', 'filter[ratio]': 'string', 'filter[ratioTotal]': 'string', 'filter[count]': 'string', 'prefilter[quants]': 'string', 'prefilter[offsets]': 'string', 'filter[quant0]': 'string', 'filter[quant1]': 'string', 'filter[quant2]': 'string', 'ratio-page': 'string', 'ratio-limit': 'string', 'ratio-sort': 'total', 'ratio-filter[total]': 'string', 'ratio-field': 'string', 'ratio-id': 'string', 'date-page': 'string', 'date-limit': 'string' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.1/stats/timesheet/work-life?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": { }
}Get shift stats/timesheet v1.1.
NOTE:
This documentation uses ratio=score and sort=modeTotal as an example.
As such, you can get responses that contain score and modeTotal, depending on the parameters you specify when making the request.
It is important to understand that score will be replaced by the value you specify for the ratio param and modeTotal will be replaced by the value you specify for sort.
apiKey) | company required | string ID of Company, user refers to. |
| from | string <date-time> ISO 8601 date-time for the start of the query range (inclusive). Defaults to 30 minutes before the |
| to | string <date-time> ISO 8601 date-time for the end of the query range (exclusive). Defaults to the current time |
| user | string Comma-separated list of user IDs to filter results. If omitted, returns data for the authenticated user. Use |
| tag | string Comma-separated list of tag IDs. When specified, filters results to include only users assigned to these tags |
| task | string Task ID to filter statistics. When specified, returns statistics only for the specified task |
| unpaid | integer Set to 1 to include unpaid time from unpaid breaks in the report. Set to 0 or omit to exclude unpaid time |
| breaks | string Specifies which types of breaks to include in results: |
| fields | string Comma-separated list of field names to include in the response. When specified, only the requested fields will be returned |
| group-by | string Field name to group results by. Results will be aggregated according to the specified field if grouping is supported for that field |
| resolve | string Optional comma-separated list of field names to resolve. |
| ratio | string Optional comma-separated list of field names to get total ratio of. |
| level | string Level of information ("user" by default) |
| timezone | string Timezone of ranges breaks. |
| period | string Default: "days" Period unit of ranges subdivision. |
| interval | integer <int32> >= 1 Number of period units. |
| paging | integer Set to |
| page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| prefilter[userId] | string "string" -- exact match |
| prefilter[userObjPrePos] | string "string" -- exact match |
| prefilter[userObjPos] | string "string" -- exact match |
| prefilter[userName] | string "string" -- exact match |
| prefilter[userNameNorm] | string unknown API-defined value |
| prefilter[userArchived] | string "string" -- exact match |
| prefilter[currentTagId] | string "string" -- exact match |
| prefilter[currentTagObj] | string "string" -- exact match |
| prefilter[currentTagName] | string "string" -- exact match |
| prefilter[currentTagNameNorm] | string "string" -- exact match |
| prefilter[projectId] | string "string" -- exact match |
| prefilter[projectObj] | string "string" -- exact match |
| prefilter[projectName] | string "string" -- exact match |
| prefilter[projectNameNorm] | string "string" -- exact match |
| prefilter[projectIntegrationProvider] | string "string" -- exact match |
| prefilter[projectIntegrationName] | string "string" -- exact match |
| prefilter[projectIntegrationNameNorm] | string "string" -- exact match |
| prefilter[taskId] | string "string" -- exact match |
| prefilter[taskObj] | string "string" -- exact match |
| prefilter[taskName] | string "string" -- exact match |
| prefilter[taskNameNorm] | string "string" -- exact match |
| prefilter[taskIntegrationProvider] | string "string" -- exact match |
| prefilter[taskIntegrationName] | string "string" -- exact match |
| prefilter[taskIntegrationNameNorm] | string "string" -- exact match |
| prefilter[taskIntegrationLink] | string "string" -- exact match |
| prefilter[taskIntegrationLastTracked] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[date] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[timezone] | string "string" -- exact match |
| prefilter[start] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[end] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[item] | string "string" -- exact match |
| filter[ratio] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[ratioTotal] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[count] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[quants] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[offsets] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[quant0] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[quant1] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[quant2] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[total] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[shiftId] | string "string" -- exact match |
| filter[shiftObj] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[shiftStart] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| prefilter[shiftEnd] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[minHours] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| ratio-page | string When specified, defines how many resulting first items to skip |
| ratio-limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| ratio-sort | string Which field to sort by, prepend it with "_" for descending sorting |
| ratio-filter[total] | string Prefilter ratio totals. |
| ratio-field | string A field to specify for "ratio" paging. Default is first specified in "ratio" param |
| ratio-id | string ID of ratio item for "ratio" paging. Default is top first in ratio array. |
| date-page | string When specified, defines how many resulting first items to skip |
| date-limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', from: '2019-08-24T14:15:22Z', to: '2019-08-24T14:15:22Z', user: 'string', tag: 'string', task: 'string', unpaid: '0', breaks: 'all', fields: 'string', 'group-by': 'string', resolve: 'string', ratio: 'string', level: 'company', timezone: 'string', period: 'days', interval: '1', paging: '0', page: 'string', limit: 'string', sort: 'userId', 'prefilter[userId]': 'string', 'prefilter[userObjPrePos]': 'string', 'prefilter[userObjPos]': 'string', 'prefilter[userName]': 'string', 'prefilter[userNameNorm]': 'string', 'prefilter[userArchived]': 'string', 'prefilter[currentTagId]': 'string', 'prefilter[currentTagObj]': 'string', 'prefilter[currentTagName]': 'string', 'prefilter[currentTagNameNorm]': 'string', 'prefilter[projectId]': 'string', 'prefilter[projectObj]': 'string', 'prefilter[projectName]': 'string', 'prefilter[projectNameNorm]': 'string', 'prefilter[projectIntegrationProvider]': 'string', 'prefilter[projectIntegrationName]': 'string', 'prefilter[projectIntegrationNameNorm]': 'string', 'prefilter[taskId]': 'string', 'prefilter[taskObj]': 'string', 'prefilter[taskName]': 'string', 'prefilter[taskNameNorm]': 'string', 'prefilter[taskIntegrationProvider]': 'string', 'prefilter[taskIntegrationName]': 'string', 'prefilter[taskIntegrationNameNorm]': 'string', 'prefilter[taskIntegrationLink]': 'string', 'prefilter[taskIntegrationLastTracked]': 'string', 'prefilter[date]': 'string', 'prefilter[timezone]': 'string', 'prefilter[start]': 'string', 'prefilter[end]': 'string', 'prefilter[item]': 'string', 'filter[ratio]': 'string', 'filter[ratioTotal]': 'string', 'filter[count]': 'string', 'prefilter[quants]': 'string', 'prefilter[offsets]': 'string', 'filter[quant0]': 'string', 'filter[quant1]': 'string', 'filter[quant2]': 'string', 'filter[total]': 'string', 'prefilter[shiftId]': 'string', 'filter[shiftObj]': 'string', 'prefilter[shiftStart]': 'string', 'prefilter[shiftEnd]': 'string', 'filter[minHours]': 'string', 'ratio-page': 'string', 'ratio-limit': 'string', 'ratio-sort': 'userId', 'ratio-filter[total]': 'string', 'ratio-field': 'string', 'ratio-id': 'string', 'date-page': 'string', 'date-limit': 'string' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.1/stats/timesheet/shift?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": { }
}Get outliers stats/timesheet v1.1.
NOTE:
This documentation uses ratio=score and sort=modeTotal as an example.
As such, you can get responses that contain score and modeTotal, depending on the parameters you specify when making the request.
It is important to understand that score will be replaced by the value you specify for the ratio param and modeTotal will be replaced by the value you specify for sort.
apiKey) | company required | string ID of Company, user refers to. |
| from | string <date-time> ISO 8601 date-time for the start of the query range (inclusive). Defaults to 30 minutes before the |
| to | string <date-time> ISO 8601 date-time for the end of the query range (exclusive). Defaults to the current time |
| user | string Comma-separated list of user IDs to filter results. If omitted, returns data for the authenticated user. Use |
| tag | string Comma-separated list of tag IDs. When specified, filters results to include only users assigned to these tags |
| task | string Task ID to filter statistics. When specified, returns statistics only for the specified task |
| unpaid | integer Set to 1 to include unpaid time from unpaid breaks in the report. Set to 0 or omit to exclude unpaid time |
| breaks | string Specifies which types of breaks to include in results: |
| fields | string Comma-separated list of field names to include in the response. When specified, only the requested fields will be returned |
| group-by | string Field name to group results by. Results will be aggregated according to the specified field if grouping is supported for that field |
| resolve | string Optional comma-separated list of field names to resolve. |
| ratio | string Optional comma-separated list of field names to get total ratio of. |
| level | string Level of information ("user" by default) |
| timezone | string Timezone of ranges breaks. |
| period | string Default: "days" Period unit of ranges subdivision. |
| interval | integer <int32> >= 1 Number of period units. |
| paging | integer Set to |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', from: '2019-08-24T14:15:22Z', to: '2019-08-24T14:15:22Z', user: 'string', tag: 'string', task: 'string', unpaid: '0', breaks: 'all', fields: 'string', 'group-by': 'string', resolve: 'string', ratio: 'string', level: 'company', timezone: 'string', period: 'days', interval: '1', paging: '0' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.1/stats/timesheet/outliers?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": { }
}Retrieve list of all files (screenshots, webcam captures, etc.) for users.
This endpoint returns files captured during work sessions, including screenshots and webcam images based on company tracking settings.
File Types:
Use Cases:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| user | string Comma-separated list of user IDs whose files to retrieve (defaults to current user) |
| tag | string Comma-separated list of tag IDs to retrieve files for all users in those tags |
| page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| filter[date] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[entity] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[avg-activity] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[duplicate] | string match string |
| filter[isBlured] | string match string |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', user: 'string', tag: 'string', page: 'string', limit: 'string', sort: 'date', 'filter[date]': 'string', 'filter[entity]': 'string', 'filter[avg-activity]': 'string', 'filter[duplicate]': 'string', 'filter[isBlured]': 'string' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.0/files?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": {
- "userId": "string",
- "date": "2019-08-24T14:15:22Z",
- "deviceId": "string",
- "numbers": [
- {
- "number": "string",
- "mime": "string",
- "deleted": true,
- "avgActivity": 0,
- "meta": {
- "contentType": "string",
- "blur": true,
- "chunkId": "string",
- "clicks": 0,
- "movements": 0,
- "keys": 0,
- "period": 0,
- "imageSize": 0,
- "imageMd5": "string",
- "createdAt": "string",
- "h": 0,
- "w": 0,
- "projectId": "string",
- "taskId": "string",
- "screenNumber": 0,
- "type": "string"
}, - "url": "string",
- "urls": {
- "original": "string",
- "small": "string"
}, - "entity": "file"
}
]
}, - "paging": {
- "cur": "string",
- "next": "string",
- "limit": 0,
- "totalCount": 0
}
}Retrieve files filtered by specific type (screenshots, webcam, etc.).
This endpoint returns files of a specific type, allowing focused retrieval of screenshots or webcam captures separately.
File Types:
screenshot - Screen captures during workwebcam - Webcam images (if enabled)Related Endpoints:
apiKey) | type required | string Type of file to retrieve (screenshot, video, etc.) |
| company required | string ID of Company, user refers to. |
| user | string Comma-separated list of user IDs whose files to retrieve (defaults to current user) |
| tag | string Comma-separated list of tag IDs to retrieve files for all users in those tags |
| page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| filter[date] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[entity] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[avg-activity] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[duplicate] | string match string |
| filter[isBlured] | string match string |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', user: 'string', tag: 'string', page: 'string', limit: 'string', sort: 'date', 'filter[date]': 'string', 'filter[entity]': 'string', 'filter[avg-activity]': 'string', 'filter[duplicate]': 'string', 'filter[isBlured]': 'string' }).toString(); const type = 'YOUR_type_PARAMETER'; const resp = await fetch( `https://api2.timedoctor.com/api/1.0/files/${type}?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": {
- "userId": "string",
- "date": "2019-08-24T14:15:22Z",
- "deviceId": "string",
- "numbers": [
- {
- "number": "string",
- "mime": "string",
- "deleted": true,
- "avgActivity": 0,
- "meta": {
- "contentType": "string",
- "blur": true,
- "chunkId": "string",
- "clicks": 0,
- "movements": 0,
- "keys": 0,
- "period": 0,
- "imageSize": 0,
- "imageMd5": "string",
- "createdAt": "string",
- "h": 0,
- "w": 0,
- "projectId": "string",
- "taskId": "string",
- "screenNumber": 0,
- "type": "string"
}, - "url": "string",
- "urls": {
- "original": "string",
- "small": "string"
}, - "entity": "file"
}
]
}, - "paging": {
- "cur": "string",
- "next": "string",
- "limit": 0,
- "totalCount": 0
}
}Generate a temporary signed URL for secure file download.
This endpoint creates a time-limited, authenticated URL for downloading a specific file without requiring additional authentication. The URL expires after a set period.
Use Cases:
Security:
Related Endpoints:
apiKey) | type required | string Type of file to retrieve (screenshot, video, etc.) |
| date required | string <date-time> ISO 8601 timestamp when the file was captured |
| number required | integer File index number (for screenshots, corresponds to monitor number) |
| company required | string ID of Company, user refers to. |
const fetch = require('node-fetch'); const query = new URLSearchParams({company: 'string'}).toString(); const type = 'YOUR_type_PARAMETER'; const date = 'YOUR_date_PARAMETER'; const number = 'YOUR_number_PARAMETER'; const resp = await fetch( `https://api2.timedoctor.com/api/1.1/files/${type}/signed-url/${date}/${number}?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": {
- "original": "string",
- "small": "string"
}
}Create or update file metadata entry in the system.
This endpoint ensures a file entry exists in the database with the specified metadata. Used by tracking clients to register captured files.
Purpose:
Related Endpoints:
apiKey) | type required | string Type of file to retrieve (screenshot, video, etc.) |
| date required | string <date-time> ISO 8601 timestamp when the file was captured |
| number required | integer File index number (for screenshots, corresponds to monitor number) |
| company required | string ID of Company, user refers to. |
| contentType | string MIME type of the file (e.g., image/png, image/jpeg) |
| blur | boolean When true, the screenshot image is blurred for privacy |
| chunkId | string <full-date> ISO 8601 timestamp of the time chunk when the file was created |
| clicks | integer <int32> Number of mouse clicks recorded during the screenshot period |
| movements | integer <int32> Number of mouse movements recorded during the screenshot period |
| keys | integer <int32> Number of keyboard key presses recorded during the screenshot period |
| period | integer <int32> Duration of the screenshot period in seconds |
| imageSize | integer <int32> File size in bytes |
| imageMd5 | string MD5 hash of the image file for integrity verification |
| createdAt | string <full-date> ISO 8601 timestamp when the file was created |
| h | integer <int32> Image height in pixels |
| w | integer <int32> Image width in pixels |
| projectId | string Unique identifier of the project associated with this file |
| taskId | string Unique identifier of the task associated with this file |
| screenNumber | integer <int32> Monitor number for multi-monitor setups (0-based index) |
| type | string Type of file (e.g., screenshot, video) |
{- "contentType": "string",
- "blur": true,
- "chunkId": "string",
- "clicks": 0,
- "movements": 0,
- "keys": 0,
- "period": 0,
- "imageSize": 0,
- "imageMd5": "string",
- "createdAt": "string",
- "h": 0,
- "w": 0,
- "projectId": "string",
- "taskId": "string",
- "screenNumber": 0,
- "type": "string"
}{- "data": { }
}Remove a specific file entry from the system.
This endpoint deletes the metadata entry for a specific file. The actual file in storage may be removed separately based on retention policies.
Use Cases:
Related Endpoints:
apiKey) | type required | string Type of file to retrieve (screenshot, video, etc.) |
| date required | string <date-time> ISO 8601 timestamp when the file was captured |
| number required | integer File index number (for screenshots, corresponds to monitor number) |
| company required | string ID of Company, user refers to. |
const fetch = require('node-fetch'); const query = new URLSearchParams({company: 'string'}).toString(); const type = 'YOUR_type_PARAMETER'; const date = 'YOUR_date_PARAMETER'; const number = 'YOUR_number_PARAMETER'; const resp = await fetch( `https://api2.timedoctor.com/api/1.0/files/${type}/${date}/${number}?${query}`, { method: 'DELETE', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": { }
}Under this section, you can get / update / assign productivity ratings for users or groups
Entity class parameter is an enum class and can have the following values:
"default", "none", "app", "title", "URL", "domain", "keyword"
Score parameters are categorized as below:
4 = Productive 3 = Neutral 2 = Unproductive 0 = Unrated
Retrieve list of productivity categories configured in the company.
Categories classify applications and websites as productive, unproductive, or neutral. This endpoint returns all categories that have been used or configured in the company.
Category Types:
Related Endpoints:
apiKey) | company | string If specified, ID of Company, user refers to. If omitted, the operation refers to global |
| global-unrated | string When true, returns only categories that are unrated in both company and global scopes |
| page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| filter[time] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[name] | string "string" -- exact match |
| filter[entity] | string predefined value |
| filter[score] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', 'global-unrated': 'true', page: 'string', limit: 'string', sort: 'time', 'filter[time]': 'string', 'filter[name]': 'string', 'filter[entity]': 'string', 'filter[score]': 'string' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.0/categories?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- {
- "scope": "global",
- "id": "string",
- "entity": "string",
- "name": "string",
- "score": 0
}
], - "paging": {
- "cur": "string",
- "next": "string",
- "limit": 0,
- "totalCount": 0
}
}Configure productivity classification for an application or website at company level.
This endpoint sets the default productivity category (productive/unproductive/neutral) for a specific application or website across the entire company.
Configuration Scope:
Related Endpoints:
apiKey) | company | string If specified, ID of Company, user refers to. If omitted, the operation refers to global |
| id | string Unique identifier of the category (application or website) |
| entity | string Entity class name (e.g., application name, website domain) |
| name | string Display name of the entity |
| score | number Productivity score rating from 2 (unproductive) to 4 (productive), or null if unrated |
| standardActiveSecRatio | number Ratio between 0 and 1 that overrides the standard active-to-total seconds ratio. Used to calculate average activity percentage per application |
{- "id": "string",
- "entity": "string",
- "name": "string",
- "score": 0,
- "standardActiveSecRatio": 0
}{- "data": { }
}Retrieve productivity categories specific to a user or group.
This endpoint returns categories that have been customized for a specific user or group (tag), overriding the company-wide defaults.
Parameter Flexibility:
Group Productivity Override: When a user belongs to only one group, the group's productivity override is applied (unless there is individual override for the user). This allows setting productivity classifications at the group level for consistent team settings.
Returns:
Related Endpoints:
apiKey) | userId required | string Unique identifier of the user |
| company required | string ID of Company, user refers to. |
| page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| filter[time] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[name] | string "string" -- exact match |
| filter[entity] | string predefined value |
| filter[score] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', page: 'string', limit: 'string', sort: 'time', 'filter[time]': 'string', 'filter[name]': 'string', 'filter[entity]': 'string', 'filter[score]': 'string' }).toString(); const userId = 'YOUR_userId_PARAMETER'; const resp = await fetch( `https://api2.timedoctor.com/api/1.0/categories/user/${userId}?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": {
- "scope": "global",
- "id": "string",
- "entity": "string",
- "name": "string",
- "score": 0
}
}Configure user-specific or group-specific productivity classification override.
This endpoint sets a custom productivity category for a specific user or group (tag), overriding the company-wide default for that application or website.
Parameter Flexibility:
Group Productivity Override: When a user belongs to only one group, the group's productivity override is applied (unless there is individual override for the user). This enables setting productivity classifications at the group/team level for consistent settings across team members.
Use Cases:
Priority: User-level settings override group-level settings, which override company-level settings.
Related Endpoints:
apiKey) | userId required | string Unique identifier of the user |
| company required | string ID of Company, user refers to. |
| id required | string Unique identifier of the category (application or website) |
| entity required | string Entity class name (e.g., application name, website domain) |
| name required | string Display name of the entity |
| score | number Productivity score rating from 2 (unproductive) to 4 (productive), or null if unrated |
{- "id": "string",
- "entity": "string",
- "name": "string",
- "score": 0
}{- "data": { }
}Get count of uncategorized applications and websites.
This endpoint returns the number of applications and websites that have been detected but not yet assigned a productivity classification.
Use Cases:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
const fetch = require('node-fetch'); const query = new URLSearchParams({company: 'string'}).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.0/categories/unrated-count?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": {
- "unratedCatsCount": "string"
}, - "paging": {
- "cur": "string",
- "next": "string",
- "limit": 0,
- "totalCount": 0
}
}Retrieve list of all groups (tags) in the company.
Groups (also called tags) are used to organize users into teams, departments, or other organizational units. They enable group-level permissions, reporting, and settings.
Group Features:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
const fetch = require('node-fetch'); const query = new URLSearchParams({company: 'string'}).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.0/tags?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- {
- "special": "string",
- "users": 0,
- "usersOnReports": 0,
- "selfUser": 0,
- "managedUsers": 0,
- "managedUsersOnReports": 0,
- "id": "string",
- "name": "string",
- "creatorId": "string",
- "deleted": true,
- "readOnly": true,
- "managers": [
- "string"
], - "createdAt": "2019-08-24T14:15:22Z",
- "modifiedAt": "2019-08-24T14:15:22Z"
}
], - "paging": {
- "cur": "string",
- "next": "string",
- "limit": 0,
- "totalCount": 0
}
}Create a new group (tag) in the company.
This endpoint creates a new organizational group for categorizing users into teams, departments, or other organizational units.
Use Cases:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| name | string Display name of the user group (tag) |
| description | string Detailed description of the group's purpose or membership criteria |
{- "name": "string",
- "description": "string"
}{- "data": {
- "id": "string",
- "name": "string",
- "creatorId": "string",
- "deleted": true,
- "readOnly": true,
- "managers": [
- "string"
], - "createdAt": "2019-08-24T14:15:22Z",
- "modifiedAt": "2019-08-24T14:15:22Z"
}
}Retrieve details of a specific group (tag).
This endpoint returns complete information about a group including its name, members, managers, and configuration.
Related Endpoints:
apiKey) | tagId required | string Unique identifier of the user group (tag) |
| company required | string ID of Company, user refers to. |
const fetch = require('node-fetch'); const query = new URLSearchParams({company: 'string'}).toString(); const tagId = 'YOUR_tagId_PARAMETER'; const resp = await fetch( `https://api2.timedoctor.com/api/1.0/tags/${tagId}?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": {
- "id": "string",
- "name": "string",
- "creatorId": "string",
- "deleted": true,
- "readOnly": true,
- "managers": [
- "string"
], - "createdAt": "2019-08-24T14:15:22Z",
- "modifiedAt": "2019-08-24T14:15:22Z"
}
}Update details of a specific group (tag).
This endpoint modifies group properties such as name, description, or other configuration settings.
Updatable Fields:
Related Endpoints:
apiKey) | tagId required | string Unique identifier of the user group (tag) |
| company required | string ID of Company, user refers to. |
| name | string Display name of the user group (tag) |
| description | string Detailed description of the group's purpose or membership criteria |
| active | boolean Whether the group is active. When false, the group is archived and hidden from normal views |
{- "name": "string",
- "description": "string",
- "active": true
}{- "data": { }
}Delete a group (tag) from the company.
This endpoint removes a group. Users who were members of this group will no longer be associated with it.
Important:
Related Endpoints:
apiKey) | tagId required | string Unique identifier of the user group (tag) |
| company required | string ID of Company, user refers to. |
| deleted | string When true, operates on an archived (deleted) group instead of an active one |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', deleted: 'true' }).toString(); const tagId = 'YOUR_tagId_PARAMETER'; const resp = await fetch( `https://api2.timedoctor.com/api/1.0/tags/${tagId}?${query}`, { method: 'DELETE', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": { }
}Assign a manager to a group (tag).
This endpoint designates a user as a manager for the group, granting them management permissions for group members.
Manager Permissions:
Related Endpoints:
apiKey) | tagId required | string Unique identifier of the user group (tag) |
| company required | string ID of Company, user refers to. |
| userId required | string Unique identifier of the user to assign as group manager |
{- "userId": "string"
}{- "data": { }
}Remove a manager from a group (tag).
This endpoint revokes a user's manager permissions for the group. The user can still be a regular member of the group.
Effect:
Related Endpoints:
apiKey) | tagId required | string Unique identifier of the user group (tag) |
| userId required | string Unique identifier of the group manager |
| company required | string ID of Company, user refers to. |
const fetch = require('node-fetch'); const query = new URLSearchParams({company: 'string'}).toString(); const tagId = 'YOUR_tagId_PARAMETER'; const userId = 'YOUR_userId_PARAMETER'; const resp = await fetch( `https://api2.timedoctor.com/api/1.0/tags/${tagId}/managers/${userId}?${query}`, { method: 'DELETE', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": { }
}Add a user to a group (tag) as a member.
This endpoint assigns a user to a group, making them a member of that organizational unit. Group membership enables group-level reporting, permissions, and settings.
Group Membership Benefits:
Use Cases:
Related Endpoints:
apiKey) | userId required | string Unique identifier of user (use "me" or empty string to reference caller) |
| company required | string ID of Company, user refers to. |
| tagId | string Unique identifier of tag to assign to user |
{- "tagId": "string"
}{- "data": { }
}Remove a user from a group (tag).
This endpoint removes a user's membership from a group. The user will no longer be associated with that organizational unit.
Effect:
Use Cases:
Related Endpoints:
apiKey) | userId required | string Unique identifier of user (use "me" or empty string to reference caller) |
| tagId required | string Unique identifier of tag |
| company required | string ID of Company, user refers to. |
const fetch = require('node-fetch'); const query = new URLSearchParams({company: 'string'}).toString(); const userId = 'YOUR_userId_PARAMETER'; const tagId = 'YOUR_tagId_PARAMETER'; const resp = await fetch( `https://api2.timedoctor.com/api/1.0/users/${userId}/tags/${tagId}?${query}`, { method: 'DELETE', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{ }Retrieve work schedules for users including shifts, time off, and leave periods.
This endpoint returns work schedule data via streaming for efficient handling of large datasets. Schedules define when users are expected to work, including regular shifts, time off, and leave.
Schedule Types:
Performance Note: Schedules are returned via stream. For large date ranges, connect to a stream handler. Requesting long ranges over HTTP will buffer all data before responding.
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| user | string Comma-separated list of user IDs |
| from required | string Start date and time of the schedule period (ISO 8601 format) |
| to required | string End date and time of the schedule period (ISO 8601 format) |
| work-range | number Time range in seconds for the work schedule period |
| leave-type | string Comma-separated list of leave types to filter by (e.g., paidLeave, unpaidLeave) |
| approved | string Filter schedules by approval status: pending, approved, or disapproved |
| resolve-names | boolean Default: false When true, includes reviewer name and user name in the response. Defaults to false |
| include-auto-approved | boolean Default: true When true, includes automatically approved schedules in results. Defaults to true |
| exclude-status | string Comma-separated list of approval statuses to exclude (e.g., pending, approved, disapproved) |
| page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| filter[start] | string "string" -- exact match |
| filter[leaveType] | string "string" -- exact match |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', user: 'string', from: 'string', to: 'string', 'work-range': '0', 'leave-type': 'string', approved: 'pending', 'resolve-names': 'false', 'include-auto-approved': 'true', 'exclude-status': 'string', page: 'string', limit: 'string', sort: 'start', 'filter[start]': 'string', 'filter[leaveType]': 'paidLeave' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.0/work-schedules?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- {
- "id": "string",
- "start": "2019-08-24T14:15:22Z",
- "end": "2019-08-24T14:15:22Z",
- "minimumHours": 0,
- "userId": "string",
- "leaveType": "string",
- "approved": "string",
- "reason": "string",
- "reviewedAt": "2019-08-24T14:15:22Z",
- "reviewerId": "string",
- "createdBy": "string",
- "reviewerName": "string",
- "userName": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "time": 0
}
], - "paging": {
- "cur": "string",
- "next": "string",
- "limit": 0,
- "totalCount": 0
}
}Bulk create or update work schedules for multiple users.
This endpoint allows batch creation/update of work schedules. The API streams responses for efficient handling of large schedule datasets.
Replace Behavior:
The from and to query parameters define the date range bounds. All existing schedules within this range are removed first, then the new schedules from the request body are inserted into this empty time window. This is a replace operation, not a merge.
Bulk Upload Guidelines:
Important:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| from required | string Start date and time of the schedule period (ISO 8601 format) |
| to required | string End date and time of the schedule period (ISO 8601 format) |
| userId required | string Id of the user who has the schedule |
| schedules required | Array of Array of strings Array of schedule tuples, each containing: [startTime (ISO 8601), endTime (ISO 8601), minimumHours (optional), leaveType (optional), reason (optional)] |
[- {
- "userId": "string",
- "schedules": [
- [
- "2000-01-01T10:00:00.000Z",
- "2000-01-01T18:00:00.000Z",
- 4,
- "paidLeave",
- "sick"
]
]
}
]{- "data": [
- {
- "id": "string",
- "start": "2019-08-24T14:15:22Z",
- "end": "2019-08-24T14:15:22Z",
- "minimumHours": 0,
- "userId": "string",
- "leaveType": "string",
- "approved": "string",
- "reason": "string",
- "reviewedAt": "2019-08-24T14:15:22Z",
- "reviewerId": "string",
- "createdBy": "string",
- "reviewerName": "string",
- "userName": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "time": 0
}
], - "ignored": [
- {
- "id": "string",
- "start": "2019-08-24T14:15:22Z",
- "end": "2019-08-24T14:15:22Z",
- "minimumHours": 0,
- "userId": "string",
- "leaveType": "string",
- "approved": "string",
- "reason": "string",
- "reviewedAt": "2019-08-24T14:15:22Z",
- "reviewerId": "string",
- "createdBy": "string",
- "reviewerName": "string",
- "userName": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "time": 0
}
]
}Retrieve details of a specific work schedule entry.
This endpoint returns complete information about a single schedule entry including shift times, user assignment, and schedule type.
Related Endpoints:
apiKey) | id required | string Unique identifier of the work schedule |
| company required | string ID of Company, user refers to. |
const fetch = require('node-fetch'); const query = new URLSearchParams({company: 'string'}).toString(); const id = 'YOUR_id_PARAMETER'; const resp = await fetch( `https://api2.timedoctor.com/api/1.0/work-schedules/${id}?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": {
- "id": "string",
- "start": "2019-08-24T14:15:22Z",
- "end": "2019-08-24T14:15:22Z",
- "minimumHours": 0,
- "userId": "string",
- "leaveType": "string",
- "approved": "string",
- "reason": "string",
- "reviewedAt": "2019-08-24T14:15:22Z",
- "reviewerId": "string",
- "createdBy": "string",
- "reviewerName": "string",
- "userName": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "time": 0
}
}Update a specific work schedule entry.
This endpoint modifies an existing schedule entry, allowing changes to shift times, schedule type, or other schedule properties.
Updatable Fields:
Related Endpoints:
apiKey) | id required | string Unique identifier of the work schedule |
| company required | string ID of Company, user refers to. |
| approved required | string Updated approval status for the leave request (pending, approved, or disapproved) |
{- "approved": "pending"
}{- "data": {
- "id": "string",
- "start": "2019-08-24T14:15:22Z",
- "end": "2019-08-24T14:15:22Z",
- "minimumHours": 0,
- "userId": "string",
- "leaveType": "string",
- "approved": "string",
- "reason": "string",
- "reviewedAt": "2019-08-24T14:15:22Z",
- "reviewerId": "string",
- "createdBy": "string",
- "reviewerName": "string",
- "userName": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "time": 0
}
}Remove a specific work schedule entry.
This endpoint deletes a schedule entry, typically used to remove incorrect schedules or cancel planned shifts.
Use Cases:
Related Endpoints:
apiKey) | id required | string Unique identifier of the work schedule |
| company required | string ID of Company, user refers to. |
const fetch = require('node-fetch'); const query = new URLSearchParams({company: 'string'}).toString(); const id = 'YOUR_id_PARAMETER'; const resp = await fetch( `https://api2.timedoctor.com/api/1.0/work-schedules/${id}?${query}`, { method: 'DELETE', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{ }Retrieve work schedule issues and conflicts for dashboard monitoring.
This endpoint returns scheduling problems such as overlapping shifts, missing schedules, or other conflicts that require attention.
Issue Types:
Use Cases:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| user | string Comma-separated list of user IDs, or special values: |
| tag | string Comma-separated list of tag IDs to filter users by their assigned tags |
| from required | string Start date and time of the schedule period (ISO 8601 format) |
| to required | string End date and time of the schedule period (ISO 8601 format) |
| group-by | string Field to group results by: either by user's current tag ID or by user ID |
| all-users-tag | string When set to 1, includes the special "all users" tag ID in results. Defaults to 0 |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', user: 'string', tag: 'string', from: 'string', to: 'string', 'group-by': 'currentTagId', 'all-users-tag': '0' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.0/work-schedules/issues?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- {
- "userId": "string",
- "userName": "string",
- "currentTagId": "string",
- "currentTagName": "string",
- "issues": 0,
- "shifts": 0,
- "ratio": 0
}
], - "paging": {
- "cur": "string",
- "next": "string",
- "limit": 0,
- "totalCount": 0
}
}Retrieve aggregated leave statistics including total and approved leave counts.
This endpoint returns aggregated statistics about leave requests and approvals, useful for workforce planning and leave management.
Statistics Provided:
Note: Leave counts are calculated in days, with a maximum of 1 day per calendar day. For example, if multiple leave requests overlap on the same day, they count as 1 day total.
Use Cases:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| user | string Comma-separated list of user IDs |
| from required | string Start date and time of the schedule period (ISO 8601 format) |
| to required | string End date and time of the schedule period (ISO 8601 format) |
| work-range | number Time range in seconds for the work schedule period |
| leave-type | string Comma-separated list of leave types to filter by (e.g., paidLeave, unpaidLeave) |
| approved | string Filter schedules by approval status: pending, approved, or disapproved |
| resolve-names | boolean Default: false When true, includes reviewer name and user name in the response. Defaults to false |
| include-auto-approved | boolean Default: true When true, includes automatically approved schedules in results. Defaults to true |
| exclude-status | string Comma-separated list of approval statuses to exclude (e.g., pending, approved, disapproved) |
| page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| filter[start] | string "string" -- exact match |
| filter[leaveType] | string "string" -- exact match |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', user: 'string', from: 'string', to: 'string', 'work-range': '0', 'leave-type': 'string', approved: 'pending', 'resolve-names': 'false', 'include-auto-approved': 'true', 'exclude-status': 'string', page: 'string', limit: 'string', sort: 'start', 'filter[start]': 'string', 'filter[leaveType]': 'paidLeave' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.0/work-schedules/stats?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "totalPendingCount": 0,
- "totalApprovedCount": 0
}Retrieve list of notifications for the authenticated user.
This endpoint returns all notifications sent to the user, including system alerts, reminders, and custom notifications.
Notification Types:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| filter[name] | string "string" -- starts with |
| filter[active] | boolean boolean value |
| filter[notifyType] | string "string" -- exact match |
| filter[recipientId] | string "string" -- exact match |
| filter[user] | string "string" -- exact match |
| filter[pricingPlan] | string "string" -- exact match |
| filter[isDEN] | boolean boolean value |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', page: 'string', limit: 'string', sort: 'name', 'filter[name]': 'string', 'filter[active]': 'true', 'filter[notifyType]': 'daily', 'filter[recipientId]': 'string', 'filter[user]': 'string', 'filter[pricingPlan]': 'string', 'filter[isDEN]': 'true' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.0/notifications?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- {
- "_id": "string",
- "name": "string",
- "notifyType": "daily",
- "condType": "string",
- "condValue": "string",
- "scope": "company",
- "dataIds": [
- "string"
], - "daysApplicable": [
- 0
], - "active": true,
- "recipientIds": [
- "string"
]
}
], - "paging": {
- "cur": "string",
- "next": "string",
- "limit": 0,
- "totalCount": 0
}
}Create a new notification for users.
This endpoint allows administrators to send custom notifications to users, useful for announcements, reminders, or important updates.
Use Cases:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
object |
{- "notification": {
- "name": "string",
- "notifyType": "daily",
- "condType": "string",
- "condValue": "string",
- "scope": "company",
- "dataIds": [
- "string"
], - "daysApplicable": [
- 0
], - "active": true,
- "recipientIds": [
- "string"
]
}
}{- "data": {
- "_id": "string",
- "name": "string",
- "notifyType": "daily",
- "condType": "string",
- "condValue": "string",
- "scope": "company",
- "dataIds": [
- "string"
], - "daysApplicable": [
- 0
], - "active": true,
- "recipientIds": [
- "string"
]
}
}Retrieve detailed information about a specific notification.
This endpoint returns complete notification details including content, status, and delivery information.
Related Endpoints:
apiKey) | notificationId required | string Unique identifier of the notification |
| company required | string ID of Company, user refers to. |
const fetch = require('node-fetch'); const query = new URLSearchParams({company: 'string'}).toString(); const notificationId = 'YOUR_notificationId_PARAMETER'; const resp = await fetch( `https://api2.timedoctor.com/api/1.0/notifications/${notificationId}?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": {
- "_id": "string",
- "name": "string",
- "notifyType": "daily",
- "condType": "string",
- "condValue": "string",
- "scope": "company",
- "dataIds": [
- "string"
], - "daysApplicable": [
- 0
], - "active": true,
- "recipientIds": [
- "string"
]
}
}Update notification settings or mark as read.
This endpoint allows modification of notification properties, such as marking notifications as read or updating notification preferences.
Common Updates:
Related Endpoints:
apiKey) | notificationId required | string Unique identifier of the notification |
| company required | string ID of Company, user refers to. |
object |
{- "notification": {
- "name": "string",
- "notifyType": "daily",
- "condType": "string",
- "condValue": "string",
- "scope": "company",
- "dataIds": [
- "string"
], - "daysApplicable": [
- 0
], - "active": true
}
}{- "data": {
- "_id": "string",
- "name": "string",
- "notifyType": "daily",
- "condType": "string",
- "condValue": "string",
- "scope": "company",
- "dataIds": [
- "string"
], - "daysApplicable": [
- 0
], - "active": true,
- "recipientIds": [
- "string"
]
}
}Subscribe to a specific notification type or channel.
This endpoint enables notifications for a specific type, allowing users to opt-in to receive certain notifications via email, push, or in-app channels.
Subscription Channels:
Related Endpoints:
apiKey) | notificationId required | string Unique identifier of the notification |
| company required | string ID of Company, user refers to. |
| recipientIds required | Array of strings Array of user IDs who will receive the notification |
{- "recipientIds": [
- "string"
]
}{- "data": {
- "_id": "string",
- "name": "string",
- "notifyType": "daily",
- "condType": "string",
- "condValue": "string",
- "scope": "company",
- "dataIds": [
- "string"
], - "daysApplicable": [
- 0
], - "active": true,
- "recipientIds": [
- "string"
]
}
}Unsubscribe from a specific notification type or channel.
This endpoint disables notifications for a specific type, allowing users to opt-out of receiving certain notifications.
Use Cases:
Related Endpoints:
apiKey) | notificationId required | string Unique identifier of the notification |
| company required | string ID of Company, user refers to. |
| recipientIds required | Array of strings Array of user IDs who will receive the notification |
{- "recipientIds": [
- "string"
]
}{- "data": {
- "_id": "string",
- "name": "string",
- "notifyType": "daily",
- "condType": "string",
- "condValue": "string",
- "scope": "company",
- "dataIds": [
- "string"
], - "daysApplicable": [
- 0
], - "active": true,
- "recipientIds": [
- "string"
]
}
}Retrieve list of break time records for users.
This endpoint returns break periods taken by users during work sessions, including lunch breaks, rest periods, and other time away from work.
Break Types:
Use Cases:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| filter[name] | string "string" -- starts with |
| filter[type] | string "string" -- starts with |
| filter[breakLimit] | string "number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[keywords] | string set of keywords to be matched |
| page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| filter[keyphrase] | string A keyphrase for searching by keywords |
| assigned | boolean When true, returns only break types that are assigned to or accessible by the authenticated user |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', page: ['string', 'string'], limit: ['string', 'string'], sort: ['name', 'keyphrase'], 'filter[name]': 'string', 'filter[type]': 'string', 'filter[breakLimit]': 'string', 'filter[keywords]': 'string', 'filter[keyphrase]': 'string', assigned: 'true' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.0/breaks?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- {
- "_id": "string",
- "name": "string",
- "type": "paid",
- "active": true,
- "public": true,
- "access": [
- "string"
], - "scope": "user",
- "breakLimit": 1
}
], - "paging": {
- "cur": "string",
- "next": "string",
- "limit": 0,
- "totalCount": 0
}
}Create a new break time record.
This endpoint records a break period for a user, specifying start time, duration, and break type (paid/unpaid).
Break Recording:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| name required | string Display name of the break type |
| type required | string Break type: paid (counts toward work time) or unpaid (does not count toward work time) |
| active | boolean Whether this break type is currently active and available for use |
| public | boolean When true, the break is accessible to all users without restrictions. When false, access is limited by the access field |
| access | Array of strings Array of user IDs or tag IDs that have permission to use this break type. Only applies when public is false |
| scope | string Access scope level: user (individual users), tag (groups/teams), or company (entire organization) |
| breakLimit | integer [ 1 .. 240 ] Maximum duration allowed for this break type in minutes. Must be between 1 and 240 minutes (4 hours) |
{- "name": "string",
- "type": "paid",
- "active": true,
- "public": true,
- "access": [
- "string"
], - "scope": "user",
- "breakLimit": 1
}{- "data": {
- "_id": "string",
- "name": "string",
- "type": "paid",
- "active": true,
- "public": true,
- "access": [
- "string"
], - "scope": "user",
- "breakLimit": 1
}
}Retrieve detailed information about a specific break.
This endpoint returns complete break details including start time, duration, break type, and associated user information.
Related Endpoints:
apiKey) | breakId required | string Unique identifier of the break type |
| company required | string ID of Company, user refers to. |
const fetch = require('node-fetch'); const query = new URLSearchParams({company: 'string'}).toString(); const breakId = 'YOUR_breakId_PARAMETER'; const resp = await fetch( `https://api2.timedoctor.com/api/1.0/breaks/${breakId}?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": {
- "_id": "string",
- "name": "string",
- "type": "paid",
- "active": true,
- "public": true,
- "access": [
- "string"
], - "scope": "user",
- "breakLimit": 1
}
}Update break time record details.
This endpoint allows modification of break information such as start time, duration, or break type classification.
Updatable Fields:
Related Endpoints:
apiKey) | breakId required | string Unique identifier of the break type |
| company required | string ID of Company, user refers to. |
| name required | string Display name of the break type |
| type required | string Break type: paid (counts toward work time) or unpaid (does not count toward work time) |
| active | boolean Whether this break type is currently active and available for use |
| public | boolean When true, the break is accessible to all users without restrictions. When false, access is limited by the access field |
| access | Array of strings Array of user IDs or tag IDs that have permission to use this break type. Only applies when public is false |
| scope | string Access scope level: user (individual users), tag (groups/teams), or company (entire organization) |
| breakLimit | integer [ 1 .. 240 ] Maximum duration allowed for this break type in minutes. Must be between 1 and 240 minutes (4 hours) |
{- "name": "string",
- "type": "paid",
- "active": true,
- "public": true,
- "access": [
- "string"
], - "scope": "user",
- "breakLimit": 1
}{- "data": {
- "_id": "string",
- "name": "string",
- "type": "paid",
- "active": true,
- "public": true,
- "access": [
- "string"
], - "scope": "user",
- "breakLimit": 1
}
}Remove a break time record.
This endpoint deletes a break entry, typically used to correct errors or remove incorrectly recorded breaks.
Use Cases:
Related Endpoints:
apiKey) | breakId required | string Unique identifier of the break type |
| company required | string ID of Company, user refers to. |
const fetch = require('node-fetch'); const query = new URLSearchParams({company: 'string'}).toString(); const breakId = 'YOUR_breakId_PARAMETER'; const resp = await fetch( `https://api2.timedoctor.com/api/1.0/breaks/${breakId}?${query}`, { method: 'DELETE', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{ }Retrieve list of allowed IP addresses for company access control.
This endpoint returns IP addresses that are whitelisted for accessing the company's TimeDoctor account, useful for implementing IP-based security restrictions.
IP Address Management:
Use Cases:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| filter[locationType] | string "string" -- exact match |
| from | string <date-time> Filter IP addresses modified after this date |
| to | string <date-time> Filter IP addresses modified before this date |
| deleted | boolean Include archived IP addresses in the response |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', page: 'string', limit: 'string', sort: 'locationType', 'filter[locationType]': 'Office', from: '2019-08-24T14:15:22Z', to: '2019-08-24T14:15:22Z', deleted: 'true' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.0/ipaddresses?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- {
- "id": "string",
- "user": "string",
- "company": "string",
- "ipAddress": "string",
- "type": "single",
- "ipRangeStart": "string",
- "ipRangeEnd": "string",
- "ipCidr": "string",
- "locationType": "Office",
- "ipType": "Public",
- "changeType": "Created",
- "createdAt": "2019-08-24T14:15:22Z",
- "modifiedAt": "2019-08-24T14:15:22Z",
- "modifiedBy": "string",
- "isArchived": true
}
], - "paging": {
- "cur": "string",
- "next": "string",
- "limit": 0,
- "totalCount": 0
}
}Add a new IP address to the company whitelist.
This endpoint creates a new IP address record, allowing access from the specified IP address or range.
IP Configuration:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| ipAddress | string Single IP address for access restriction (e.g., 192.168.1.100) (Required when type is "single") |
| type required | string IP address configuration type: single IP, IP range, or CIDR notation for subnet |
| ipRangeStart | string Starting IP address of the allowed range (e.g., 192.168.1.1) (Required when type is "range") |
| ipRangeEnd | string Ending IP address of the allowed range (e.g., 192.168.1.254) (Required when type is "range") |
| ipCidr | string IP address range in CIDR notation for subnet whitelisting (e.g., 192.168.1.0/24) (Required when type is "cidr") |
| locationType required | string Location type classification for this IP address (Office for on-site, Remote for external) |
| ipType required | string IP address type: Public (internet-routable) or Private (RFC 1918 internal) |
{- "ipAddress": "string",
- "type": "single",
- "ipRangeStart": "string",
- "ipRangeEnd": "string",
- "ipCidr": "string",
- "locationType": "Office",
- "ipType": "Public"
}{- "data": {
- "id": "string",
- "user": "string",
- "company": "string",
- "ipAddress": "string",
- "type": "single",
- "ipRangeStart": "string",
- "ipRangeEnd": "string",
- "ipCidr": "string",
- "locationType": "Office",
- "ipType": "Public",
- "changeType": "Created",
- "createdAt": "2019-08-24T14:15:22Z",
- "modifiedAt": "2019-08-24T14:15:22Z",
- "modifiedBy": "string",
- "isArchived": true
}
}Retrieve details of a specific IP address record.
This endpoint returns complete information about a whitelisted IP address including its configuration, status, and metadata.
Related Endpoints:
apiKey) | ipAddressId required | string ID of IP address record |
| company required | string ID of Company, user refers to. |
const fetch = require('node-fetch'); const query = new URLSearchParams({company: 'string'}).toString(); const ipAddressId = 'YOUR_ipAddressId_PARAMETER'; const resp = await fetch( `https://api2.timedoctor.com/api/1.0/ipaddresses/${ipAddressId}?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": {
- "id": "string",
- "user": "string",
- "company": "string",
- "ipAddress": "string",
- "type": "single",
- "ipRangeStart": "string",
- "ipRangeEnd": "string",
- "ipCidr": "string",
- "locationType": "Office",
- "ipType": "Public",
- "changeType": "Created",
- "createdAt": "2019-08-24T14:15:22Z",
- "modifiedAt": "2019-08-24T14:15:22Z",
- "modifiedBy": "string",
- "isArchived": true
}
}Update an existing IP address record.
This endpoint modifies IP address configuration such as the IP range, description, or enable/disable status.
Updatable Fields:
Related Endpoints:
apiKey) | ipAddressId required | string ID of IP address record |
| company required | string ID of Company, user refers to. |
| ipAddress | string Single IP address for access restriction (e.g., 192.168.1.100) (Required when type is "single") |
| type | string IP address configuration type: single IP, IP range, or CIDR notation for subnet |
| ipRangeStart | string Starting IP address of the allowed range (e.g., 192.168.1.1) (Required when type is "range") |
| ipRangeEnd | string Ending IP address of the allowed range (e.g., 192.168.1.254) (Required when type is "range") |
| ipCidr | string IP address range in CIDR notation for subnet whitelisting (e.g., 192.168.1.0/24) (Required when type is "cidr") |
| locationType | string Location type classification for this IP address (Office for on-site, Remote for external) |
| ipType | string IP address type: Public (internet-routable) or Private (RFC 1918 internal) |
{- "ipAddress": "string",
- "type": "single",
- "ipRangeStart": "string",
- "ipRangeEnd": "string",
- "ipCidr": "string",
- "locationType": "Office",
- "ipType": "Public"
}{- "data": {
- "id": "string",
- "user": "string",
- "company": "string",
- "ipAddress": "string",
- "type": "single",
- "ipRangeStart": "string",
- "ipRangeEnd": "string",
- "ipCidr": "string",
- "locationType": "Office",
- "ipType": "Public",
- "changeType": "Created",
- "createdAt": "2019-08-24T14:15:22Z",
- "modifiedAt": "2019-08-24T14:15:22Z",
- "modifiedBy": "string",
- "isArchived": true
}
}Remove an IP address from the company whitelist.
This endpoint archives an IP address record, preventing access from that IP. The record is archived rather than permanently deleted for audit purposes.
Use Cases:
Note: IP records are archived, not permanently deleted, for security audit trails.
Related Endpoints:
apiKey) | ipAddressId required | string ID of IP address record |
| company required | string ID of Company, user refers to. |
const fetch = require('node-fetch'); const query = new URLSearchParams({company: 'string'}).toString(); const ipAddressId = 'YOUR_ipAddressId_PARAMETER'; const resp = await fetch( `https://api2.timedoctor.com/api/1.0/ipaddresses/${ipAddressId}?${query}`, { method: 'DELETE', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": true
}Retrieve list of pending user approvals awaiting administrator action.
This endpoint returns users who have registered but are pending approval before they can access the system. Useful for managing user onboarding workflows.
Pending Approval States:
Use Cases:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| blocked | string Filter approvals by blocked status (true for blocked approvals, false for unblocked) |
| page | string When specified, defines how many resulting first items to skip |
| limit | string When specified, defines maximum number of resulting first items to be returned; or use API-specific hard limit by default |
| sort | string Which field to sort by, prepend it with "_" for descending sorting |
| filter[name] | string "string" -- starts with |
| filter[dateTimeAdded] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
| filter[lastSeen] | string "ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to" |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', blocked: 'string', page: 'string', limit: 'string', sort: 'name', 'filter[name]': 'string', 'filter[dateTimeAdded]': 'string', 'filter[lastSeen]': 'string' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/v1/pending-approvals?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- {
- "userId": "string",
- "approved": true,
- "blocked": true
}
], - "paging": {
- "totalCount": 0
}
}Remove a pending approval request for a specific user.
This endpoint deletes a pending approval, effectively rejecting the user's access request or registration.
Use Cases:
Related Endpoints:
apiKey) | userId required | string ID of the user to delete |
| company required | string ID of Company, user refers to. |
const fetch = require('node-fetch'); const query = new URLSearchParams({company: 'string'}).toString(); const userId = 'YOUR_userId_PARAMETER'; const resp = await fetch( `https://api2.timedoctor.com/api/v1/pending-approvals/${userId}?${query}`, { method: 'DELETE', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": { }
}Approve or update a pending user approval request.
This endpoint processes a pending approval, typically approving the user and granting them access to the system.
Approval Actions:
Related Endpoints:
apiKey) | userId required | string ID of the user to delete |
| company required | string ID of Company, user refers to. |
| userId | string Unique identifier of the user whose time entries require approval |
| approved | boolean When true, the time entry has been approved by an authorized approver. Defaults to false |
| blocked | boolean When true, the approval is blocked and cannot proceed until resolved. Defaults to false |
{- "userId": "string",
- "approved": true,
- "blocked": true
}{- "data": { }
}Bulk approve or update multiple pending user approvals.
This endpoint allows batch processing of pending approvals, useful for approving multiple users at once.
Bulk Operations:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| userId | string Unique identifier of the user whose time entries require approval |
| approved | boolean When true, the time entry has been approved by an authorized approver. Defaults to false |
| blocked | boolean When true, the approval is blocked and cannot proceed until resolved. Defaults to false |
[- {
- "userId": "string",
- "approved": true,
- "blocked": true
}
]{- "data": { }
}Bulk remove multiple pending approval requests.
This endpoint allows batch deletion of pending approvals, useful for rejecting multiple access requests at once.
Bulk Operations:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
[- "string"
]{- "data": { }
}Exchange SSO provider token for TimeDoctor access token.
This endpoint completes the SSO login flow by exchanging the provider's authentication token for a TimeDoctor access token. This is typically called after the user has been authenticated by the SSO provider.
SSO Flow:
Supported Providers:
Related Endpoints:
| provider required | string SSO provider identifier for OAuth2 authentication (e.g., workos, google, microsoft) |
| token | string OAuth2 authorization token received during the SSO authentication flow |
null{- "data": {
- "token": "string",
- "expires": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z"
}
}Discover all companies associated with an email address via SSO.
This endpoint returns information about all companies that have SSO configured for the provided email address. This helps users identify which companies they can access via SSO login.
Use Cases:
Returns:
Related Endpoints:
| email required | string User's email address for authentication or SSO lookup |
{- "email": "string"
}{- "data": {
- "company": "string",
- "provider": "string",
- "clientId": "string",
- "issuer": "string"
}
}Request a one-time verification code sent to email.
This endpoint sends a one-time verification code to the user's email address. The code can be used to verify the user's identity and discover their SSO-enabled companies without requiring a password.
Verification Flow:
Security:
Related Endpoints:
| email required | string User's email address for authentication or SSO lookup |
{- "email": "string"
}{ }Verify one-time code and discover SSO-enabled companies.
This endpoint validates the one-time verification code sent via email and returns information about all companies with SSO configured for that email address.
Verification Process:
Returns:
Security:
Related Endpoints:
| code required | string One-time verification code sent to the user's email for authentication |
null{- "data": {
- "company": "string",
- "provider": "string",
- "clientId": "string",
- "issuer": "string"
}
}Check if SSO OTP (One-Time Password) is enabled for any of the user's companies.
This endpoint helps determine whether additional OTP verification is required during the SSO login flow. If any of the user's companies have forceSsoOTP enabled, the response will indicate that OTP is required.
| email required | string User's email address to check SSO OTP requirement across associated companies |
| issuer | string OAuth2 issuer domain to filter companies by specific SSO provider |
{- "email": "string",
- "issuer": "string"
}{- "SSO_OTP": true
}Initiate SSO authorization flow by redirecting to the provider's authorization URL.
This endpoint constructs the appropriate authorization URL for the specified SSO provider and redirects the user to complete the authentication process. After successful authentication, the provider will redirect back to the specified redirect_uri.
This is typically the first step in the SSO login flow.
| provider required | string OAuth2 SSO provider identifier (e.g., workos) for authorization flow initiation |
| client_id required | string OAuth2 client ID registered with the SSO provider for this application |
| redirect_uri required | string OAuth2 redirect URI where the user will be sent after successful SSO authorization |
const fetch = require('node-fetch'); const query = new URLSearchParams({ client_id: 'string', redirect_uri: 'string' }).toString(); const provider = 'YOUR_provider_PARAMETER'; const resp = await fetch( `https://api2.timedoctor.com/api/1.0/sso/${provider}/authorize?${query}`, {method: 'GET'} ); const data = await resp.text(); console.log(data);
{ }Retrieve payroll information for multiple users.
This endpoint returns payroll details including pay rates, payment methods, and billing configurations for users in the company.
Payroll Information:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| from | string <date> ISO 8601 date for the start of the payroll period (YYYY-MM-DD) |
| to | string <date> ISO 8601 date for the end of the payroll period (YYYY-MM-DD) |
| tag | string Comma-separated tag IDs to filter time entries for payroll calculations |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', from: '2019-08-24', to: '2019-08-24', tag: 'string' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.0/users/payroll?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [ ],
- "paging": {
- "cur": "string",
- "next": "string",
- "limit": 0,
- "totalCount": 0
}
}Update payroll information for a specific user.
This endpoint modifies payroll details such as pay rate, billing rate, and payment method for an individual user.
Updatable Fields:
Related Endpoints:
apiKey) | userId required | string Unique identifier of the user to retrieve payroll data for |
| company required | string ID of Company, user refers to. |
| id required | string Unique identifier of the user for payroll configuration |
| currency | string ISO 4217 currency code for payroll calculations (e.g., USD, EUR, GBP) |
| adjustment | number Absolute adjustment value applied to the payroll total in the specified currency |
| payRate | number Hourly pay rate multiplier for calculating total compensation |
| payMethod | string Payment method identifier (e.g., transferwise, paypal) if enabled in company settings |
| payIdentifier | number Total tracked time in seconds for payroll calculations |
| hourlyLimit | number Maximum billable hours limit per time period |
| hourlyLimitRange | string Time range for hourly limit enforcement (weekday, period, or perday) |
{- "id": "string",
- "currency": "string",
- "adjustment": 0,
- "payRate": 0,
- "payMethod": "string",
- "payIdentifier": 0,
- "hourlyLimit": 0,
- "hourlyLimitRange": "string"
}{- "data": { }
}Remove payroll information for a specific user.
This endpoint clears all payroll details for a user, resetting them to company defaults or removing custom payroll configuration.
Use Cases:
Related Endpoints:
apiKey) | userId required | string Unique identifier of the user to retrieve payroll data for |
| company required | string ID of Company, user refers to. |
const fetch = require('node-fetch'); const query = new URLSearchParams({company: 'string'}).toString(); const userId = 'YOUR_userId_PARAMETER'; const resp = await fetch( `https://api2.timedoctor.com/api/1.0/users/${userId}/payroll?${query}`, { method: 'DELETE', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": { }
}Bulk update payroll information for multiple users.
This endpoint allows batch modification of payroll details for multiple users in a single request, useful for company-wide payroll updates.
Bulk Operations:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| id required | string Unique identifier of the user for payroll configuration |
| currency | string ISO 4217 currency code for payroll calculations (e.g., USD, EUR, GBP) |
| adjustment | number Absolute adjustment value applied to the payroll total in the specified currency |
| payRate | number Hourly pay rate multiplier for calculating total compensation |
| payMethod | string Payment method identifier (e.g., transferwise, paypal) if enabled in company settings |
| payIdentifier | number Total tracked time in seconds for payroll calculations |
| hourlyLimit | number Maximum billable hours limit per time period |
| hourlyLimitRange | string Time range for hourly limit enforcement (weekday, period, or perday) |
{- "id": "string",
- "currency": "string",
- "adjustment": 0,
- "payRate": 0,
- "payMethod": "string",
- "payIdentifier": 0,
- "hourlyLimit": 0,
- "hourlyLimitRange": "string"
}{- "data": { }
}Retrieve company-wide payroll settings and defaults.
This endpoint returns default payroll configuration that applies to all users unless overridden by individual user settings.
Company Settings:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
const fetch = require('node-fetch'); const query = new URLSearchParams({company: 'string'}).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.0/companies/payroll?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [ ],
- "paging": {
- "cur": "string",
- "next": "string",
- "limit": 0,
- "totalCount": 0
}
}Update company-wide payroll settings and defaults.
This endpoint modifies default payroll configuration that will apply to new users and can serve as fallback for users without custom settings.
Configurable Defaults:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| transferWise required | boolean When true, enables TransferWise (Wise) integration for international payroll transfers |
| transferWiseCurrency required | string ISO 4217 source currency code for TransferWise payroll transfers |
| payoneer required | boolean When true, enables Payoneer integration for global payroll processing |
| paypal required | boolean When true, enables PayPal Mass Payouts integration for batch payroll payments |
| bitWage required | boolean When true, enables BitWAGE integration for cryptocurrency payroll payments |
| quickBooks | boolean When true, enables QuickBooks integration for payroll export and accounting sync |
| gusto required | boolean When true, enables Gusto integration for automated payroll processing |
| adp required | boolean When true, enables ADP Workforce Now integration for enterprise payroll processing |
| adpCompanyCode required | string Company code identifier for ADP Workforce Now integration |
| adpMaxHours | number Maximum billable hours per period for ADP payroll export |
| adpIncludeUserNames required | boolean When true, includes employee names in ADP payroll export files |
{- "transferWise": true,
- "transferWiseCurrency": "string",
- "payoneer": true,
- "paypal": true,
- "bitWage": true,
- "quickBooks": true,
- "gusto": true,
- "adp": true,
- "adpCompanyCode": "string",
- "adpMaxHours": 0,
- "adpIncludeUserNames": true
}{- "data": { }
}Generate Google Calendar OAuth2 authorization URL for user consent.
This endpoint returns the URL where users should be redirected to grant TimeDoctor access to their Google Calendar. This is the first step in the OAuth2 flow.
OAuth2 Flow:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
const fetch = require('node-fetch'); const query = new URLSearchParams({company: 'string'}).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.1/calendar/auth-url?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": {
- "url": "string"
}
}Start Google Calendar webhook notifications for real-time event updates.
This endpoint sets up a watch channel that receives notifications when calendar events change, enabling real-time synchronization without constant polling.
Webhook Setup:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| callbackUrl required | string Public HTTPS webhook URL |
{- "callbackUrl": "string"
}{- "data": {
- "started": true
}
}Stop Google Calendar webhook notifications.
This endpoint terminates the active watch channel, stopping real-time event notifications from Google Calendar.
Use Cases:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
const fetch = require('node-fetch'); const query = new URLSearchParams({company: 'string'}).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.1/calendar/watch/stop?${query}`, { method: 'POST', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{ }Public webhook endpoint for receiving Google Calendar notifications.
This unauthenticated endpoint receives push notifications from Google when calendar events change. It responds quickly (2xx) and processes events asynchronously.
Important:
Related Endpoints:
apiKey) const fetch = require('node-fetch'); const resp = await fetch( `https://api2.timedoctor.com/api/1.1/calendar-public/webhook`, { method: 'POST', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{ }Handle OAuth2 callback from Google after user authorization.
This endpoint receives the authorization code from Google after the user grants calendar access, then exchanges it for access and refresh tokens.
OAuth2 Flow:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| code required | string Authorization code |
| state | string |
| scope | string |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', code: 'string', state: 'string', scope: 'string' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.1/calendar/callback?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{ }Fetch calendar events directly from Google Calendar API.
This endpoint retrieves events in real-time from Google Calendar, bypassing local storage for the most up-to-date information.
Live Fetch:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| from | string <date-time> ISO 8601 start date/time for filtering events (inclusive) |
| to | string <date-time> ISO 8601 end date/time for filtering events (exclusive) |
| limit | integer <int32> Maximum number of events to return. Defaults to 250 |
| orderBy | string Field to order results by. Defaults to startTime |
| singleEvents | string When false, recurring events are not expanded into individual instances. Defaults to true |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', from: '2019-08-24T14:15:22Z', to: '2019-08-24T14:15:22Z', limit: '0', orderBy: 'startTime', singleEvents: 'true' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.1/calendar/events?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- {
- "id": "string",
- "status": "string",
- "htmlLink": "string",
- "summary": "string",
- "description": "string",
- "start": {
- "dateTime": "2019-08-24T14:15:22Z",
- "timeZone": "string"
}, - "end": {
- "dateTime": "2019-08-24T14:15:22Z",
- "timeZone": "string"
}, - "attendees": [
- { }
], - "organizer": { }
}
]
}Delete stored calendar events from local database.
This endpoint removes calendar events from local storage, either by specific event ID or all events before a certain date.
Deletion Options:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| eventId | string Unique identifier of a single event to delete from Google Calendar |
| before | string <date-time> ISO 8601 timestamp. When specified, deletes all events that start before this date/time |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', eventId: 'string', before: '2019-08-24T14:15:22Z' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.1/calendar/events?${query}`, { method: 'DELETE', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{ }Retrieve calendar events from local database storage.
This endpoint returns previously synchronized calendar events from the local database, providing faster access without calling Google Calendar API.
Local Storage:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| from | string <date-time> ISO 8601 start date/time for filtering events (inclusive) |
| to | string <date-time> ISO 8601 end date/time for filtering events (exclusive) |
| limit | integer <int32> |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', from: '2019-08-24T14:15:22Z', to: '2019-08-24T14:15:22Z', limit: '0' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.1/calendar/stored-events?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- {
- "id": "string",
- "status": "string",
- "htmlLink": "string",
- "summary": "string",
- "description": "string",
- "start": {
- "dateTime": "2019-08-24T14:15:22Z",
- "timeZone": "string"
}, - "end": {
- "dateTime": "2019-08-24T14:15:22Z",
- "timeZone": "string"
}, - "attendees": [
- { }
], - "organizer": { }
}
]
}Manually trigger calendar event synchronization and return updated events.
This endpoint fetches latest events from Google Calendar and updates local storage, then returns the synchronized events.
Synchronization:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
| from | string <date-time> ISO 8601 start date/time for syncing events (inclusive) |
| to | string <date-time> ISO 8601 end date/time for syncing events (exclusive) |
| limit | integer <int32> Maximum number of events to sync |
| force | boolean When true, forces a full resync even if events were recently synced |
{- "from": "2019-08-24T14:15:22Z",
- "to": "2019-08-24T14:15:22Z",
- "limit": 0,
- "force": true
}{- "data": [
- {
- "id": "string",
- "status": "string",
- "htmlLink": "string",
- "summary": "string",
- "description": "string",
- "start": {
- "dateTime": "2019-08-24T14:15:22Z",
- "timeZone": "string"
}, - "end": {
- "dateTime": "2019-08-24T14:15:22Z",
- "timeZone": "string"
}, - "attendees": [
- { }
], - "organizer": { }
}
]
}Refresh expired OAuth2 access token using refresh token.
This endpoint renews the Google Calendar access token when it expires, using the stored refresh token to obtain a new access token.
Token Refresh:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
const fetch = require('node-fetch'); const query = new URLSearchParams({company: 'string'}).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.1/calendar/refresh-token?${query}`, { method: 'POST', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{ }Check Google Calendar OAuth2 token status and connection health.
This endpoint returns information about the current OAuth2 token, including whether it's valid, expired, or if re-authorization is needed.
Status Information:
Related Endpoints:
apiKey) | company required | string ID of Company, user refers to. |
const fetch = require('node-fetch'); const query = new URLSearchParams({company: 'string'}).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.1/calendar/token-status?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": {
- "connected": true,
- "expiresAt": "2019-08-24T14:15:22Z",
- "hasWebhook": true
}
}Get list of software cost insights
apiKey) | company required | string ID of Company, user refers to. |
| user | string Filter by single user ID or comma-separated list of user IDs |
| tag | string Filter by single tag ID or comma-separated list of tag IDs |
| type | string Filter by software cost insight type classification |
| toolName | string Filter by exact software tool name |
| toolCategory | string Filter by software tool category classification |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', user: 'string', tag: 'string', type: 'string', toolName: 'string', toolCategory: 'string' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.1/software-cost-insights?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- {
- "id": "string",
- "rev": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "modifiedAt": "2019-08-24T14:15:22Z",
- "toolName": "string",
- "toolCategory": "string",
- "toolCategoryId": "string",
- "user": "string",
- "totalWorkHours": 0,
- "totalToolHours": 0,
- "activeStatus": 0,
- "type": "string"
}
], - "paging": {
- "cur": "string",
- "next": "string",
- "limit": 0,
- "totalCount": 0
}
}Create a new software cost insight
apiKey) | company required | string ID of Company, user refers to. |
| toolName required | string Name of the software tool or application |
| toolCategory | string Category classification of the software tool |
| toolCategoryId | string Unique identifier of the tool category |
| user required | string Unique identifier of the user for this insight |
| totalWorkHours | number Total work hours tracked in decimal format |
| totalToolHours | number Total tool usage hours in decimal format |
| activeStatus | integer Active usage status indicator |
| type | string Type classification of the insight record |
{- "toolName": "string",
- "toolCategory": "string",
- "toolCategoryId": "string",
- "user": "string",
- "totalWorkHours": 0,
- "totalToolHours": 0,
- "activeStatus": 0,
- "type": "string"
}{- "data": {
- "id": "string",
- "rev": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "modifiedAt": "2019-08-24T14:15:22Z",
- "toolName": "string",
- "toolCategory": "string",
- "toolCategoryId": "string",
- "user": "string",
- "totalWorkHours": 0,
- "totalToolHours": 0,
- "activeStatus": 0,
- "type": "string"
}
}Get a specific software cost insight by ID
apiKey) | id required | string Unique identifier of the software cost insight record |
| company required | string ID of Company, user refers to. |
const fetch = require('node-fetch'); const query = new URLSearchParams({company: 'string'}).toString(); const id = 'YOUR_id_PARAMETER'; const resp = await fetch( `https://api2.timedoctor.com/api/1.1/software-cost-insights/${id}?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": {
- "id": "string",
- "rev": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "modifiedAt": "2019-08-24T14:15:22Z",
- "toolName": "string",
- "toolCategory": "string",
- "toolCategoryId": "string",
- "user": "string",
- "totalWorkHours": 0,
- "totalToolHours": 0,
- "activeStatus": 0,
- "type": "string"
}
}Update a software cost insight
apiKey) | id required | string Unique identifier of the software cost insight record |
| company required | string ID of Company, user refers to. |
| toolName | string Name of the software tool or application |
| toolCategory | string Category classification of the software tool |
| toolCategoryId | string Unique identifier of the tool category |
| totalWorkHours | number Total work hours tracked in decimal format |
| totalToolHours | number Total tool usage hours in decimal format |
| activeStatus | integer Active usage status indicator |
| type | string Type classification of the insight record |
{- "toolName": "string",
- "toolCategory": "string",
- "toolCategoryId": "string",
- "totalWorkHours": 0,
- "totalToolHours": 0,
- "activeStatus": 0,
- "type": "string"
}{- "data": {
- "id": "string",
- "rev": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "modifiedAt": "2019-08-24T14:15:22Z",
- "toolName": "string",
- "toolCategory": "string",
- "toolCategoryId": "string",
- "user": "string",
- "totalWorkHours": 0,
- "totalToolHours": 0,
- "activeStatus": 0,
- "type": "string"
}
}Delete a software cost insight
apiKey) | id required | string Unique identifier of the software cost insight record |
| company required | string ID of Company, user refers to. |
const fetch = require('node-fetch'); const query = new URLSearchParams({company: 'string'}).toString(); const id = 'YOUR_id_PARAMETER'; const resp = await fetch( `https://api2.timedoctor.com/api/1.1/software-cost-insights/${id}?${query}`, { method: 'DELETE', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{ }Get software cost insights aggregated by category
apiKey) | company required | string ID of Company, user refers to. |
| user | string Filter by single user ID or comma-separated list of user IDs |
| tag | string Filter by single tag ID or comma-separated list of tag IDs |
| start | string <date-time> ISO 8601 timestamp for the start of the reporting period (inclusive) |
| end | string <date-time> ISO 8601 timestamp for the end of the reporting period (inclusive) |
| timezone | string IANA timezone identifier for date calculations (e.g., America/New_York, Europe/London) |
| user-tz | integer User timezone mode: 0=no timezone adjustment, 1=external timezone, 2=internal timezone |
| use-local-time | integer When 1, use local time for calculations; when 0, use UTC time |
| params | string Additional query parameters for advanced filtering and aggregation |
| summary | string Summary aggregation type for grouping statistics (e.g., daily, weekly, monthly) |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', user: 'string', tag: 'string', start: '2019-08-24T14:15:22Z', end: '2019-08-24T14:15:22Z', timezone: 'string', 'user-tz': '0', 'use-local-time': '0', params: 'string', summary: 'string' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.1/software-cost-insights/category?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- {
- "size": 0,
- "comCat": "string",
- "userId": "string",
- "totalSec": 0,
- "toolRatio": 0,
- "toolStatus": "Unused",
- "totalTrackedMins": 0,
- "categoryLastUsed": "string",
- "total": 0,
- "totalTrackedSec": 0,
- "userCategory": "string",
- "email": "string",
- "userName": "string",
- "userArchived": true,
- "entity": "string",
- "name": "string"
}
]
}Get summary statistics for software cost insights
apiKey) | company required | string ID of Company, user refers to. |
| user | string Filter by single user ID or comma-separated list of user IDs |
| tag | string Filter by single tag ID or comma-separated list of tag IDs |
| start | string <date-time> ISO 8601 timestamp for the start of the reporting period (inclusive) |
| end | string <date-time> ISO 8601 timestamp for the end of the reporting period (inclusive) |
| timezone | string IANA timezone identifier for date calculations (e.g., America/New_York, Europe/London) |
| user-tz | integer User timezone mode: 0=no timezone adjustment, 1=external timezone, 2=internal timezone |
| use-local-time | integer When 1, use local time for calculations; when 0, use UTC time |
| params | string Additional query parameters for advanced filtering and aggregation |
| summary | string Summary aggregation type for grouping statistics (e.g., daily, weekly, monthly) |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', user: 'string', tag: 'string', start: '2019-08-24T14:15:22Z', end: '2019-08-24T14:15:22Z', timezone: 'string', 'user-tz': '0', 'use-local-time': '0', params: 'string', summary: 'string' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.1/software-cost-insights/summary?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- {
- "_id": "string",
- "toolRatio": 0,
- "total": 0,
- "used": 0,
- "rarelyUsed": 0,
- "unused": 0
}
]
}Get software cost insights summary with timesheet breakdown
apiKey) | company required | string ID of Company, user refers to. |
| user | string Filter by single user ID or comma-separated list of user IDs |
| tag | string Filter by single tag ID or comma-separated list of tag IDs |
| start | string <date-time> ISO 8601 timestamp for the start of the reporting period (inclusive) |
| end | string <date-time> ISO 8601 timestamp for the end of the reporting period (inclusive) |
| timezone | string IANA timezone identifier for date calculations (e.g., America/New_York, Europe/London) |
| user-tz | integer User timezone mode: 0=no timezone adjustment, 1=external timezone, 2=internal timezone |
| use-local-time | integer When 1, use local time for calculations; when 0, use UTC time |
| params | string Additional query parameters for advanced filtering and aggregation |
| summary | string Summary aggregation type for grouping statistics (e.g., daily, weekly, monthly) |
const fetch = require('node-fetch'); const query = new URLSearchParams({ company: 'string', user: 'string', tag: 'string', start: '2019-08-24T14:15:22Z', end: '2019-08-24T14:15:22Z', timezone: 'string', 'user-tz': '0', 'use-local-time': '0', params: 'string', summary: 'string' }).toString(); const resp = await fetch( `https://api2.timedoctor.com/api/1.1/software-cost-insights/timesheet/summary?${query}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data);
{- "data": [
- [
- {
- "_id": "string",
- "toolRatio": 0,
- "total": 0,
- "used": 0,
- "rarelyUsed": 0,
- "unused": 0
}
]
]
}