Account files & project line item date filtering

New: Account file endpoints

Manage files on an account, mirroring the existing project/opportunity file endpoints.

MethodPathDescription
GET/accounts/{account_id}/filesList files on an account
GET/accounts/{account_id}/files/{file_id}Get a file by ID
POST/accounts/{account_id}/filesCreate a file from a URL
POST/accounts/{account_id}/files/uploadCreate a file via multipart upload
DELETE/accounts/{account_id}/files/{file_id}Delete a file

Notes

  • account_id, request_id/opportunity_id, and project_id are now validated on all file endpoints: a missing or non-numeric ID returns 400, and an ID that doesn’t match a real record of the expected type returns 404. Previously an invalid ID silently returned an empty list instead of an error.

Clarified: file size limit on stream uploads

POST /projects/{project_id}/files/upload, POST /opportunities/{opportunity_id}/files/upload, and POST /accounts/{account_id}/files/upload are currently capped at 6 MB per file. For larger files, upload to your own storage using a pre-signed URL and create the file record via the corresponding POST /.../files URL-based endpoint instead of streaming the bytes through this API.

Projects

New: include_line_item_updates on GET /projects and GET /projects/search

Opt-in query param (default false, no behavior change if omitted). Requires updated_after and/or updated_before to also be passed — it has no effect on its own. When both are set, it widens the date window to also match projects whose project-level line items (estimate/scope items) were added or edited in that window.

When active (flag true and a date bound present), each returned project also includes a new lineItemsUpdatedAt field — the most recent updatedAt among its own scope line items (null if none). This field is omitted entirely otherwise.

Caveats

  • Only project-level line items are considered; quote/invoice line items are excluded.
  • Line item deletions are not detected (hard-deleted from the database).
  • Line item reorders/section moves do not update the line item’s updatedAt and are not detected.
  • Scope discount/tax edits and totals recomputation do not update either the project’s or the line item’s updatedAt and are not detected.
  • Result ordering is unchanged — still sorted by the project’s own updatedAt. If you use max(updatedAt) as a sync watermark, a poll that only picks up a project via its line item activity will not advance your watermark, and you may re-fetch that project on subsequent polls until the project’s own updatedAt changes.