Skip to content

QuickBooks: Full update a timeactivity object

QuickBooks timeactivity.update: arguments, response, policy and SDK examples.

← timeactivity operations · Get started · OpenAPI downloads

Contract 2026-10-20 · Operation quickbooks.timeactivity.full_update_a_timeactivity_object

Provider route: POST /v3/company/{realmID}/timeactivity. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/quickbooks with npm, or alter-sdk-quickbooks with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { QuickBooksIntegration } from "@alter-ai/quickbooks";
async function execute(input: Parameters<QuickBooksIntegration["timeactivity"]["update"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new QuickBooksIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.timeactivity.update(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_quickbooks import QuickBooksIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = QuickBooksIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.timeactivity.update(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
queryobjectOptionalAdditional keys: not allowed
query.minorversionintegerOptionalMust equal: 75
query.requestidstringOptionalMinimum length: 1
bodyobjectRequired within parentFields not accepted: sparse
Additional keys: not allowed
body.BillableStatusstringOptionalBillable status of the time recorded. This field is not updatable through an API request. The value automatically changes when an invoice is created. Valid values: Billable , NotBillable , HasBeenBilled . You cannot directly update the status to HasBeenBilled . To set the status to HasBeenBilled , create an Invoice object and attach this TimeActivity object as a linked transaction to that Invoice.
Read only: true
body.ClassRefModelOptionalExpand Create a purchase order — request body — body Ship To
Reference to the Class associated with this object. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerTxn is set to true . Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name , respectively.
body.CostRateJSONOptionalPay rate of the employee or vendor for this time activity.
Decimal string
body.CostRate (anyOf 1)numberAlternative
body.CostRate (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:.[0-9]+)?$
body.CustomerRefModelOptionalExpand Create a purchase order — request body — body Ship To
Reference to a customer or job. Query the Customer name list resource to determine the appropriate Customer object for this reference. Use Customer.Id and Customer.DisplayName from that object for CustomerRef.value and CustomerRef.name , respectively. Required if BillableStatus is set to Billable
Conditionally required
body.DepartmentRefModelOptionalExpand Create a purchase order — request body — body Ship To
A reference to a Department object specifying the location of this object. Available if Preferences.AccountingInfoPrefs.TrackDepartments is set to true . Query the Department name list resource to determine the appropriate department object for this reference. Use Department.Id and Department.Name from that object for DepartmentRef.value and DepartmentRef.name , respectively.
body.DescriptionstringOptionalDescription of work completed during time activity.
body.EmployeeRefModelOptionalExpand Create a purchase order — request body — body Ship To
Specifies the employee whose time is being recorded. Query the Employee name list resource to determine the appropriate Employee object for this reference. Use Employee.Id and Employee.DisplayName from that object for EmployeerRef.value and EmployeeRef.Name , respectively. Required if NameOf is set to Employee
Conditionally required
body.EndTimestringOptionalTime that work starts and ends, respectively. Required if Hours and Minutes not specified. Note: Kindly consider only the Hours without including the timeZone offset as it does not impact time activity hours calculation.
Conditionally required
body.HourlyRateJSONOptionalHourly bill rate of the employee or vendor for this time activity. Required if BillableStatus is set to Billable
Conditionally required
Decimal string
body.HourlyRate (anyOf 1)numberAlternative
body.HourlyRate (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:.[0-9]+)?$
body.HoursJSONOptionalHours and minutes worked. Required if StartTime and EndTime not specified
Conditionally required
body.Hours (anyOf 1)integerAlternative
body.Hours (anyOf 2)stringAlternativePattern: ^-?[0-9]+$
body.IdstringRequired within parent
body.ItemRefModelOptionalExpand Create a purchase order — request body — body Ship To
Reference to the service item associated with this object. Query the Item name list resource, where Item.Type is set to Service , to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name , respectively. For France locales: The account associated with the referenced Item object is looked up in the account category list. If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used. If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used. If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
body.MetaDataModelOptionalExpand Read a bill — response body — Bill Meta Data
Descriptive information about the object. The MetaData values are set by Data Services and are read only for all applications.
body.NameOfstringOptionalEnumeration of time activity types. Required in conjunction with either EmployeeRef or VendorRef attributes for create operations. Valid values: Vendor or Employee .
body.PayrollItemRefModelOptionalExpand Create a purchase order — request body — body Ship To
Specifies how much the employee should be paid for doing the work specified by the Compensation Id. Query the EmployeeCompensation resource to determine the appropriate PayrollCompensation object for an employee. Use EmployeeCompensation.Id and EmployerCompensation.Name from that object for PayrollItemRef.value and PayrollItemRef.name , respectively. This field is available as part of the Payroll Compensation resource in the Workforce API. Read more about the Payroll Compensation resource , available to Silver, Gold, and Platinum partners.
body.ProjectRefModelOptionalExpand Create a purchase order — request body — body Ship To
Reference to the Project ID associated with this transaction.
Conditionally required
body.StartTimestringOptionalTime that work starts and ends, respectively. Required if Hours and Minutes not specified. Note: Kindly consider only the Hours without including the timeZone offset as it does not impact time activity hours calculation.
Conditionally required
body.SyncTokenstringRequired within parent
body.TaxableJSONOptionalTrue if the time recorded is both billable and taxable.
body.Taxable (anyOf 1)booleanAlternative
body.Taxable (anyOf 2)stringAlternativeOne of: true, false
body.TxnDatestringOptionalThe date for the time activity. This is the posting date that affects financial statements. If the date is not supplied, the current date on the server is used. Sort order is ASC by default. If you provide the StartTime and EndTime without including the timeZone offset, then you would need to pass the TxnDate for any historical or future dates. Lets say if you want to create a historical time activity then pass the TxnDate as the date and pass StartTime and EndTime as Hours without including the timeZone offset.
Conditionally required
body.VendorRefModelOptionalExpand Create a purchase order — request body — body Ship To
Specifies the vendor whose time is being recorded. Query the Vendor name list resource to determine the appropriate Vendor object for this reference. Use Vendor.Id and Vendor.Name from that object for VendorRef.value and VendorRef.name , respectively. Required if NameOf is set to Vendor
Conditionally required
body.MinutesJSONOptionalHours and minutes worked. Required if StartTime and EndTime not specified
Conditionally required
body.Minutes (anyOf 1)integerAlternative
body.Minutes (anyOf 2)stringAlternativePattern: ^-?[0-9]+$
body.BreakHoursJSONOptionalHours and minutes of break taken between StartTime and EndTime . use when StartTime and EndTime are specified
Conditionally required
body.BreakHours (anyOf 1)integerAlternative
body.BreakHours (anyOf 2)stringAlternativePattern: ^-?[0-9]+$
body.BreakMinutesJSONOptionalHours and minutes of break taken between StartTime and EndTime . use when StartTime and EndTime are specified
Conditionally required
body.BreakMinutes (anyOf 1)integerAlternative
body.BreakMinutes (anyOf 2)stringAlternativePattern: ^-?[0-9]+$
body.domainstringOptional
body.sparsebooleanOptionalMust equal: false

Referenced models: Read a bill — response body — Bill Meta Data, Create a purchase order — request body — body Ship To

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$objectRootAdditional keys: allowed
timestringOptional
TimeActivityModelOptionalExpand Read a timeactivity object — response body — Time Activity

Referenced models: Read a timeactivity object — response body — Time Activity

SDK function policy ID: quickbooks.timeactivity.full_update_a_timeactivity_object. Catalog operation: timeactivity/create_a_timeactivity_object. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.