QuickBooks TimeActivity API Error: Fix “Invalid ProjectRef” (With Examples)

QuickBooks TimeActivity API Error: Fix “Invalid ProjectRef”

When creating a TimeActivity via the QuickBooks Online API, developers commonly encounter the error “Invalid ProjectRef” even when the project ID exists.

This article explains the difference between CustomerRef and ProjectRef, why the error occurs, and how to fix it.
CustomerRef vs ProjectRef in QuickBooks API showing invoice success with CustomerRef and error with invalid ProjectRef

Creating TimeActivity in QuickBooks API (Using CustomerRef)

To create a TimeActivity linked to a customer (not a project), use the following API payload:

 {
    "NameOf": "Employee",
    "StartTime": "08:00:00",
    "EndTime": "16:00:00",
    "TxnDate": "2025-04-15",
    "BreakHours": 0,
    "BreakMinutes": 0,
    "EmployeeRef": {
        "value": "80"
    },
    "CustomerRef": {
        "value": "83"
    }
}
This works correctly when the customer ID is active and valid. The issue arises when developers try to use ProjectRef instead.

CustomerRef vs ProjectRef in QuickBooks API

FieldWhat It MeansWhen to Use It
CustomerRefRefers to a Customer or Sub-Customer (normal customers, no “Project” behavior required)Use when linking TimeActivity to a Customer (general work, no project)
ProjectRefRefers to a special kind of Customer that is marked as a Project (Job = true, IsProject = true)Use when linking TimeActivity to a Project (specific job work)
Key insight: Both CustomerRef and ProjectRef point to the Customer table behind the scenes.However, CustomerRef works with any active customer, while ProjectRef only works with a customer that is set up as a Project. ProjectRef is a more strict, specialized form of CustomerRef.

API Examples: CustomerRef vs ProjectRef Payloads

CustomerRef Example (General Customer, No Project)

"CustomerRef": {
  "value": "1",
  "name": "Amy's Bird Sanctuary"
}

ProjectRef Example (Real Project)

"ProjectRef": {
  "value": "530614583",
  "name": "Amy's Bird Sanctuary:Redway Bridge"
}

How to Validate ProjectRef Before Creating TimeActivity

Before using ProjectRef in the QuickBooks TimeActivity API, you should first confirm whether the selected ID belongs to a valid QuickBooks Project.

This is important because QuickBooks projects are connected to the Customer entity, but not every customer or sub-customer can be passed as a valid ProjectRef.

In many cases, developers use a customer ID that looks correct, but QuickBooks rejects it because the record is not internally configured as a project. This usually results in the Invalid ProjectRef error.

You can validate the project by querying the Customer entity before creating the TimeActivity.

SELECT * FROM Customer WHERE Id = 'PROJECT_ID'

After getting the response, check whether the record is active and whether it has project-related values such as Job = true and IsProject = true.

{
  "Id": "530614583",
  "DisplayName": "Amy's Bird Sanctuary:Redway Bridge",
  "Active": true,
  "Job": true,
  "IsProject": true
}

If the record does not have Job = true and IsProject = true, avoid using it inside ProjectRef. In that case, you should either use CustomerRef or recreate the project properly from the QuickBooks UI.
A simple validation process would be:

  • Query the Customer entity using the project ID.
  • Confirm that the record exists.
  • Check whether the record is active.
  • Verify that Job is set to true.
  • Verify that IsProject is set to true.
  • Use ProjectRef only if the record is a valid project.
  • Use CustomerRef if you only need to track time against a customer.
This step helps avoid repeated TimeActivity sync failures, especially when the project data was imported, migrated, or created through a custom integration.

When to Use CustomerRef vs ProjectRef

SituationWhat Happens
Use CustomerRef with a Customer IDWorks if customer is active
Use ProjectRef with a Project IDWorks if project is properly set up
Use ProjectRef with a normal Customer (not a project)Error: “Invalid ProjectRef”
Use wrong ID in either fieldError: “Invalid CustomerRef” or “Invalid ProjectRef”
These decisions become even more important when building accounting automation workflows where incorrect references can break data synchronization. This is especially critical in automation for accounting firms, where accurate time tracking directly impacts billing and reporting.

Common Causes of “Invalid ProjectRef” Error

Why invalid ProjectRef happens in QuickBooks API including mapping issues, broken links, corrupted data and missing flags
If you are receiving “Invalid ProjectRef” errors, consider the following:
  • When you create a Project manually in QuickBooks UI, it creates a special internal “Project” mapping.
  • Not all sub-customers that look like Projects are properly linked internally
  • Some Projects are broken if they were imported, not created properly, or corrupted.
  • Broken Projects must be manually fixed or recreated.
  • New Projects should be created inside the QuickBooks UI.

Quick Rule: CustomerRef = any Customer (works fine even if not a project). ProjectRef = only for valid Projects, must be internally linked with Job = true and IsProject = true. (TimeActivity API Reference, 2024)

Issues like this are common in complex financial systems integrations, where multiple data sources need to stay aligned.

Summary

FieldPoints ToSpecial Notes
CustomerRefRegular Customer (or Sub-Customer)Any customer, no “Project” behavior required
ProjectRefCustomer that is a Project (Job = true, IsProject = true)Must be a valid, properly linked Project

Quick Checklist to Fix Invalid ProjectRef in QuickBooks API

Use this checklist when the QuickBooks TimeActivity API returns an Invalid ProjectRef error:

  • Confirm that the ID exists in QuickBooks.
  • Check whether the record is active.
  • Make sure the ID belongs to a project, not just a regular customer.
  • Verify that the project has Job = true.
  • Verify that the project has IsProject = true.
  • Do not use ProjectRef for normal customers.
  • Use CustomerRef when project-level tracking is not required.
  • Recreate the project from the QuickBooks UI if the project was imported or has broken internal mapping.
  • Test the same TimeActivity payload with CustomerRef to confirm whether the issue is specific to project validation.

In most cases, the fastest fix is to replace ProjectRef with CustomerRef when you only need to link time entries to a customer.

However, if your workflow requires project-level time tracking, you should first confirm that the project is properly created and mapped inside QuickBooks.

This is especially useful in accounting automation workflows where failed TimeActivity records can affect billing, project costing, payroll reporting, and customer-level time tracking

FAQ: QuickBooks TimeActivity & ProjectRef Issues

Why am I getting “Invalid ProjectRef” even though the project ID exists?
The project may not be properly set up internally in QuickBooks. Not all sub-customers are valid projects. The entity must have Job = true and IsProject = true. Try recreating the project through the QuickBooks UI.
Can I use CustomerRef instead of ProjectRef for time tracking?
Yes. If you just need to link a TimeActivity to a customer without project-specific tracking, use CustomerRef. It works with any active customer and does not require the project flag.
How do I check if a customer is set up as a project?
Query the Customer entity via the QuickBooks API and check if Job = true and IsProject = true. If these flags are not set, the customer cannot be used with ProjectRef.
Should I create projects via the API or the QuickBooks UI?
It is recommended to create projects through the QuickBooks UI to ensure proper internal linking. Projects created via import or other methods may not be properly mapped and can cause “Invalid ProjectRef” errors.

Article by

Chintan Prajapati

Chintan Prajapati is the Founder and CEO of Satva Solutions and a seasoned computer engineer with over two decades of experience in the software industry. His expertise spans Accounting & ERP Integrations, Robotic Process Automation, and the development of technology solutions built around leading ERP and accounting platforms with a particular focus on responsible AI and machine learning in fintech.Chintan holds a BE in Computer Engineering and carries an impressive roster of certifications, including Microsoft Certified Professional, Microsoft Certified Technology Specialist, Certified Azure Solution Developer, Certified Intuit Developer, Certified QuickBooks ProAdvisor, and Xero Developer.Over the course of his career, he has made a measurable impact on the accounting industry consulting on and delivering integration and automation solutions that have collectively saved thousands of man-hours. His writing aims to offer readers practical, insight-driven advice on harnessing technology to unlock greater business efficiency.When he steps away from the desk, Chintan can be found trekking through mountain trails or watching birds in the wild. Grounded in the philosophy of delivering the highest value to clients, he continues to champion innovation and excellence in digital transformation from his home base in Ahmedabad, India.