Quickbooks Time Tool

Connection Setup Guide

The Quickbooks Time (formerly TSheets) tool empowers agents to interact with your time tracking data. It allows for managing timesheets, viewing project details, and accessing user information directly within your workflow.

Key Use Cases:

  • Log Time: Create new timesheets for users against specific projects or job codes.
  • Retrieve Timesheet Data: Fetch timesheet records for specific date ranges and users for reporting or summarization.
  • Project and User Management: List available projects and users to get IDs needed for other operations.
  • Check Current Status: Get details for the currently authenticated user.

quickbookstime_tool.get_current_user

Retrieves the user object for the currently authenticated user.

This tool takes no parameters.

curl -X POST https://toolstream.dev/v1/tools/execute \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "connection_name": "YOUR_CONNECTION_NAME",
  "tool_call": {
    "name": "quickbookstime_tool.get_current_user",
    "arguments": {
    "arg": "value"
  }
  }
}'
import requests
import json

API_KEY = "YOUR_API_KEY"
TOOLSTREAM_URL = "https://toolstream.dev/v1/tools/execute"

payload = {
  "connection_name": "YOUR_CONNECTION_NAME",
  "tool_call": {
    "name": "quickbookstime_tool.get_current_user",
    "arguments": {
    "arg": "value"
  }
  }
}

headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json"
}

response = requests.post(TOOLSTREAM_URL, headers=headers, data=json.dumps(payload))

if response.status_code == 200:
    result = response.json()
    print(json.dumps(result, indent=2))
else:
    print(f"Error: {response.status_code}")
    print(response.text)

quickbookstime_tool.list_users

Retrieves a list of users, with optional filters.

Parameters

NameTypeDescription
active string Filter by active status. 'yes', 'no', or 'both'. Defaults to 'yes'.
ids string Optional comma-separated list of user IDs to filter by.
curl -X POST https://toolstream.dev/v1/tools/execute \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "connection_name": "YOUR_CONNECTION_NAME",
  "tool_call": {
    "name": "quickbookstime_tool.list_users",
    "arguments": {
      "active": {
        "type": "string",
        "description": "Filter by active status. 'yes', 'no', or 'both'. Defaults to 'yes'.",
        "enum": [
          "yes",
          "no",
          "both"
        ]
      },
      "ids": {
        "type": "string",
        "description": "Optional comma-separated list of user IDs to filter by."
      }
    }
  }
}'
import requests
import json

API_KEY = "YOUR_API_KEY"
TOOLSTREAM_URL = "https://toolstream.dev/v1/tools/execute"

payload = {
  "connection_name": "YOUR_CONNECTION_NAME",
  "tool_call": {
    "name": "quickbookstime_tool.list_users",
    "arguments": {
      "active": {
        "type": "string",
        "description": "Filter by active status. 'yes', 'no', or 'both'. Defaults to 'yes'.",
        "enum": [
          "yes",
          "no",
          "both"
        ]
      },
      "ids": {
        "type": "string",
        "description": "Optional comma-separated list of user IDs to filter by."
      }
    }
  }
}

headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json"
}

response = requests.post(TOOLSTREAM_URL, headers=headers, data=json.dumps(payload))

if response.status_code == 200:
    result = response.json()
    print(json.dumps(result, indent=2))
else:
    print(f"Error: {response.status_code}")
    print(response.text)

quickbookstime_tool.list_projects

Retrieves a list of projects, which are a layer on top of job codes in the TSheets API.

Parameters

NameTypeDescription
active string Filter by active status. 'yes', 'no', or 'both'. Defaults to 'yes'.
ids string Optional comma-separated list of project IDs to filter by.
curl -X POST https://toolstream.dev/v1/tools/execute \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "connection_name": "YOUR_CONNECTION_NAME",
  "tool_call": {
    "name": "quickbookstime_tool.list_projects",
    "arguments": {
      "active": {
        "type": "string",
        "description": "Filter by active status. 'yes', 'no', or 'both'. Defaults to 'yes'.",
        "enum": [
          "yes",
          "no",
          "both"
        ]
      },
      "ids": {
        "type": "string",
        "description": "Optional comma-separated list of project IDs to filter by."
      }
    }
  }
}'
import requests
import json

API_KEY = "YOUR_API_KEY"
TOOLSTREAM_URL = "https://toolstream.dev/v1/tools/execute"

payload = {
  "connection_name": "YOUR_CONNECTION_NAME",
  "tool_call": {
    "name": "quickbookstime_tool.list_projects",
    "arguments": {
      "active": {
        "type": "string",
        "description": "Filter by active status. 'yes', 'no', or 'both'. Defaults to 'yes'.",
        "enum": [
          "yes",
          "no",
          "both"
        ]
      },
      "ids": {
        "type": "string",
        "description": "Optional comma-separated list of project IDs to filter by."
      }
    }
  }
}

headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json"
}

response = requests.post(TOOLSTREAM_URL, headers=headers, data=json.dumps(payload))

if response.status_code == 200:
    result = response.json()
    print(json.dumps(result, indent=2))
else:
    print(f"Error: {response.status_code}")
    print(response.text)

quickbookstime_tool.list_timesheets

Retrieves a list of timesheets for a given date range and optional users.

Parameters

NameTypeDescription
start_date string Start date in YYYY-MM-DD format.
end_date string End date in YYYY-MM-DD format.
user_ids string Optional comma-separated list of user IDs to filter by.
curl -X POST https://toolstream.dev/v1/tools/execute \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "connection_name": "YOUR_CONNECTION_NAME",
  "tool_call": {
    "name": "quickbookstime_tool.list_timesheets",
    "arguments": {
      "start_date": {
        "type": "string",
        "description": "Start date in YYYY-MM-DD format.",
        "format": "date"
      },
      "end_date": {
        "type": "string",
        "description": "End date in YYYY-MM-DD format.",
        "format": "date"
      },
      "user_ids": {
        "type": "string",
        "description": "Optional comma-separated list of user IDs to filter by."
      }
    }
  }
}'
import requests
import json

API_KEY = "YOUR_API_KEY"
TOOLSTREAM_URL = "https://toolstream.dev/v1/tools/execute"

payload = {
  "connection_name": "YOUR_CONNECTION_NAME",
  "tool_call": {
    "name": "quickbookstime_tool.list_timesheets",
    "arguments": {
      "start_date": {
        "type": "string",
        "description": "Start date in YYYY-MM-DD format.",
        "format": "date"
      },
      "end_date": {
        "type": "string",
        "description": "End date in YYYY-MM-DD format.",
        "format": "date"
      },
      "user_ids": {
        "type": "string",
        "description": "Optional comma-separated list of user IDs to filter by."
      }
    }
  }
}

headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json"
}

response = requests.post(TOOLSTREAM_URL, headers=headers, data=json.dumps(payload))

if response.status_code == 200:
    result = response.json()
    print(json.dumps(result, indent=2))
else:
    print(f"Error: {response.status_code}")
    print(response.text)

quickbookstime_tool.create_timesheet

Creates a new manual timesheet entry for a user.

Parameters

NameTypeDescription
user_id integer The ID of the user to log time for.
jobcode_id integer The ID of the job code (or project) to associate the time with.
date string The date of the timesheet in YYYY-MM-DD format.
duration_seconds integer The duration of the work in seconds.
notes string Optional notes for the timesheet entry.
curl -X POST https://toolstream.dev/v1/tools/execute \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "connection_name": "YOUR_CONNECTION_NAME",
  "tool_call": {
    "name": "quickbookstime_tool.create_timesheet",
    "arguments": {
      "user_id": {
        "type": "integer",
        "description": "The ID of the user to log time for."
      },
      "jobcode_id": {
        "type": "integer",
        "description": "The ID of the job code (or project) to associate the time with."
      },
      "date": {
        "type": "string",
        "description": "The date of the timesheet in YYYY-MM-DD format.",
        "format": "date"
      },
      "duration_seconds": {
        "type": "integer",
        "description": "The duration of the work in seconds."
      },
      "notes": {
        "type": "string",
        "description": "Optional notes for the timesheet entry."
      }
    }
  }
}'
import requests
import json

API_KEY = "YOUR_API_KEY"
TOOLSTREAM_URL = "https://toolstream.dev/v1/tools/execute"

payload = {
  "connection_name": "YOUR_CONNECTION_NAME",
  "tool_call": {
    "name": "quickbookstime_tool.create_timesheet",
    "arguments": {
      "user_id": {
        "type": "integer",
        "description": "The ID of the user to log time for."
      },
      "jobcode_id": {
        "type": "integer",
        "description": "The ID of the job code (or project) to associate the time with."
      },
      "date": {
        "type": "string",
        "description": "The date of the timesheet in YYYY-MM-DD format.",
        "format": "date"
      },
      "duration_seconds": {
        "type": "integer",
        "description": "The duration of the work in seconds."
      },
      "notes": {
        "type": "string",
        "description": "Optional notes for the timesheet entry."
      }
    }
  }
}

headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json"
}

response = requests.post(TOOLSTREAM_URL, headers=headers, data=json.dumps(payload))

if response.status_code == 200:
    result = response.json()
    print(json.dumps(result, indent=2))
else:
    print(f"Error: {response.status_code}")
    print(response.text)