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.
Call through Alter
Section titled “Call through Alter”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 osfrom alter_sdk import Appfrom 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()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
query | object | Optional | Additional keys: not allowed |
query.minorversion | integer | Optional | Must equal: 75 |
query.requestid | string | Optional | Minimum length: 1 |
body | object | Required within parent | Fields not accepted: sparse Additional keys: not allowed |
body.BillableStatus | string | Optional | Billable 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.ClassRef | Model | Optional | Expand 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.CostRate | JSON | Optional | Pay rate of the employee or vendor for this time activity. Decimal string |
body.CostRate (anyOf 1) | number | Alternative | |
body.CostRate (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:.[0-9]+)?$ |
body.CustomerRef | Model | Optional | Expand 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.DepartmentRef | Model | Optional | Expand 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.Description | string | Optional | Description of work completed during time activity. |
body.EmployeeRef | Model | Optional | Expand 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.EndTime | string | Optional | Time 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.HourlyRate | JSON | Optional | Hourly 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) | number | Alternative | |
body.HourlyRate (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:.[0-9]+)?$ |
body.Hours | JSON | Optional | Hours and minutes worked. Required if StartTime and EndTime not specified Conditionally required |
body.Hours (anyOf 1) | integer | Alternative | |
body.Hours (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+$ |
body.Id | string | Required within parent | |
body.ItemRef | Model | Optional | Expand 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.MetaData | Model | Optional | Expand 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.NameOf | string | Optional | Enumeration of time activity types. Required in conjunction with either EmployeeRef or VendorRef attributes for create operations. Valid values: Vendor or Employee . |
body.PayrollItemRef | Model | Optional | Expand 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.ProjectRef | Model | Optional | Expand Create a purchase order — request body — body Ship To Reference to the Project ID associated with this transaction. Conditionally required |
body.StartTime | string | Optional | Time 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.SyncToken | string | Required within parent | |
body.Taxable | JSON | Optional | True if the time recorded is both billable and taxable. |
body.Taxable (anyOf 1) | boolean | Alternative | |
body.Taxable (anyOf 2) | string | Alternative | One of: true, false |
body.TxnDate | string | Optional | The 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.VendorRef | Model | Optional | Expand 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.Minutes | JSON | Optional | Hours and minutes worked. Required if StartTime and EndTime not specified Conditionally required |
body.Minutes (anyOf 1) | integer | Alternative | |
body.Minutes (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+$ |
body.BreakHours | JSON | Optional | Hours and minutes of break taken between StartTime and EndTime . use when StartTime and EndTime are specified Conditionally required |
body.BreakHours (anyOf 1) | integer | Alternative | |
body.BreakHours (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+$ |
body.BreakMinutes | JSON | Optional | Hours and minutes of break taken between StartTime and EndTime . use when StartTime and EndTime are specified Conditionally required |
body.BreakMinutes (anyOf 1) | integer | Alternative | |
body.BreakMinutes (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+$ |
body.domain | string | Optional | |
body.sparse | boolean | Optional | Must equal: false |
Referenced models: Read a bill — response body — Bill Meta Data, Create a purchase order — request body — body Ship To
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: allowed |
time | string | Optional | |
TimeActivity | Model | Optional | Expand Read a timeactivity object — response body — Time Activity |
Referenced models: Read a timeactivity object — response body — Time Activity
Policy, approvals and errors
Section titled “Policy, approvals and errors”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.