Link Search Menu Expand Document

Time

The APIs related to the Time entity allow you to track time for employees and contractors inclusive of PayItems (Paytypes). The Time API provides support for create, read and update operations. You can also link the Time entries to a project within QuickBooks by configuring the ID for the project while creating the time entries.

This page outlines -

  • The Create operation for tracking time for an employee with PayType
  • The Create operation for tracking time for an employee with PayType and linking it to a Project
  • The Create operation for tracking time for a contractor

Integration Diagram

Operations for Time Activity

API schema for Time Activity

Scopes

  • payroll.compensation.read : Allows access to read Pay types (i.e. compensation) [Compensation data can only be queried for customers using QuickBooks Payroll]
  • project-management.project : Allows access to read and write projects data
  • com.intuit.quickbooks.accounting: For V3 Accounting REST API access [For Read only use cases]

Endpoints

  • GraphQL API: https://qb.api.intuit.com/graphql
  • V3 Accounting REST API: https://quickbooks.api.intuit.com/v3/company/{realmid}/{entityname}?minorversion=70

Required headers

  • Content-type: application/json
  • Authorization: Bearer access_token

Note: Use tokens generated using scopes mentioned above in the authorization header for all other calls shown here.

Use Cases

Pre-check:

  • Query the QuickBooks Accounting V3 Preferences API and check for Preferences->OtherPrefs->NameValue to identify if projects are supported for the company. Check if NameValue ProjectsEnabled is true.

Sample name value pair response for reference:

      {
       "Name": "TimeTrackingFeatureEnabled",
       "Value": "true"
      }
      {
       "Name": "ProjectsEnabled",
       "Value": "true"
      }

This use case is applicable for the customers who are enrolled to QuickBooks Payroll and have the Projects enabled in QuickBooks Online.

Use V3 Create TimeActivity API to create time activity by
Sample request payload:
  {
    "TxnDate": "2024-08-01T12:00:00Z",
    "NameOf": "Employee",
    "EmployeeRef": { "value": "1" },
    "PayrollItemRef": {
      "value": "626270109"
    },
    "CustomerRef": {
        "value": "2"
    },
    "ProjectRef": {
        "value":"416296152"
    },
    "ItemRef": { "value": "1" },
    "Hours": 8,
    "Minutes": 0,
    "Description": "Construction:DailyWork"
  }

Use Case 2: Create Time Activity with pay type

This use case is applicable for the customers who are enrolled to QuickBooks Payroll and do not have the Projects enabled in QuickBooks Online.

Use V3 Create TimeActivity API to create time activity by
Sample request payload:
  {
    "TxnDate": "2024-08-01T12:00:00Z",
    "NameOf": "Employee",
    "EmployeeRef": { "value": "1" },
    "PayrollItemRef": {
      "value": "626270109"
    },
    "Hours": 8,
    "Minutes": 0,
    "Description": "Construction:TimeOff"
  }

This use case is applicable for the customers who are not enrolled to QuickBooks Payroll and have the Projects enabled in QuickBooks Online.

Use V3 Create TimeActivity API to create time activity by
Sample request payload:
  {
    "TxnDate": "2024-08-01T12:00:00Z",
    "NameOf": "Employee",
    "EmployeeRef": { "value": "1" },
    "ItemRef": { "value": "1" },
    "CustomerRef": {
        "value": "2"
    },
    "ProjectRef": {
        "value":"416296152"
    },
    "Hours": 8,
    "Minutes": 0,
    "Description": "Construction:DailyWork"
  }

Use Case 4: Create Time Entry for employee

This use case is applicable for the customers who are not enrolled to QuickBooks Payroll and do not have the Projects enabled in QuickBooks Online.

Use V3 Create TimeActivity API to create time activity by

Sample request payload:
  {
    "TxnDate": "2024-08-01T12:00:00Z",
    "NameOf": "Employee",
    "EmployeeRef": { "value": "1" },
    "ItemRef": { "value": "1" },
    "Hours": 8,
    "Minutes": 0,
    "Description": "Construction:DailyWork"
  }

Use Case 5: Create Time Activity for contractor

This use case is applicable to track time for contractors and for the customers who do not have the Projects enabled in QuickBooks Online.

Use V3 Create TimeActivity API to create time activity by

Sample request payload:
  {
    "TxnDate": "2024-08-01T12:00:00Z",
    "NameOf": "Vendor",
    "VendorRef": { "value": "5" },
    "ItemRef": { "value": "1" },
    "Hours": 8,
    "Minutes": 0,
    "Description": "Construction:DailyWork"
  }

This use case is applicable to track time for contractors and for customers who have the Projects enabled in QuickBooks Online.

Use V3 Create TimeActivity API to create time activity by

Sample request payload:
  {
    "TxnDate": "2024-08-01T12:00:00Z",
    "NameOf": "Vendor",
    "VendorRef": { "value": "5" },
    "CustomerRef": {
        "value": "2"
    },
    "ProjectRef": {
        "value":"416296152"
    },
    "ItemRef": { "value": "1" },
    "Hours": 8,
    "Minutes": 0,
    "Description": "Construction:DailyWork"
  }

Appendix

Reference of (Contractor) - Vendor with Vendor1099 true:


© 2024 Intuit Inc. All rights reserved. Intuit and QuickBooks are registered trademarks of Intuit Inc. Terms and conditions, features, support, pricing, and service options subject to change without notice.