Skip to content
TruTecDevelopers
Get an API key

Bulk data export

Stream whole datasets (customers, jobs, estimates, invoices, costs, labor, events) as JSON Lines or CSV, full or incremental, whenever you want.

View as Markdown

The bulk export streams whole tables of your workspace's data as newline-delimited JSON (JSON Lines) or CSV. Use it to load a data warehouse, to back up your data, or to take your data with you.

  • On demand. Nothing runs on a schedule and no file is stored. Each request reads your data at that moment and streams it to you. You can pull as often as you like.
  • Full or incremental. Leave out updated_after for every row. Pass it to get only rows that changed.
  • JSON Lines or CSV. JSON Lines is one JSON object per line, UTF-8. CSV is one file per dataset: a header row, then one row per record, with the same data. Add .gz to the URL for gzip. Parquet is not offered. Most warehouse loaders read either directly.
  • Your workspace only. Each request returns rows for the workspace that owns the key. Partner keys add ?firm_id= (see Partner API).
  • A link instead of a key. To hand a dataset to a person, or get one through an AI assistant, ask for a 24-hour link with POST /v1/exports and kind: workspace_data (see File exports).

Datasets#

Dataset One row per Changed-since fields
customers Customer (billing entity) updated_at
properties Property / jobsite, with coordinates updated_at
jobs Job updated_at
estimates Estimate header with totals updated_at
estimate_lines Estimate line item. All lines of an estimate are re-sent when the estimate changes updated_at (of the estimate)
change_orders Change order with value deltas updated_at
invoices Invoice with payment state updated_at
job_costs Job cost entry created_at, reviewed_at, reconciled_at
work_orders Crew work order (schedule and completion) updated_at
time_entries Crew clock-in/out: hours, category, wage rate clock_in, clock_out, approved_at, voided_at
allocations Work order, with its crew, people and equipment updated_at (of the work order)
saved_routes Saved crew route with its stops in run order (Saved routes) updated_at
events Event from the event log occurred_at

With updated_after, a row is included when any of its changed-since fields is later than the value you pass.

Row shapes:

  • customers: the customer object from Customers & sites, plus archived_at.
  • properties: id, name, address, external_ref, client_account_id, latitude, longitude, property_type, pci, archived_at, created_at, updated_at.
  • jobs: the job object from Jobs, including custom_fields.
  • estimates: the estimate summary from Estimates & proposals (totals, revision_count, latest_version, last_sent_at, awarded_at, archived_at, ...), without line items.
  • estimate_lines: the line item object from the estimate detail, plus estimate_id, job_id, area_id, area_name, estimate_updated_at.
  • change_orders: id, job_id, number, title, kind, status, source, stage, amount_delta, tax_delta, cost_delta, days_delta, ep_estimate_id, decision_comment, sent_at, signed_at, created_at, updated_at.
  • invoices, job_costs, time_entries, allocations: the same objects as GET /v1/jobs/{id}/invoices, /costs, /labor and /allocation in Job costing.
  • work_orders: id, job_id, title, status, phase, crew_id, display_qty, display_unit, completed_qty, completed_unit, estimated_days, scheduled_date, dispatched_at, completed_at, created_at, updated_at.
  • saved_routes: id, name, day (weekday, saturday, sunday or null, read from the name), crew_id, is_active (false once the route was deleted in TruTec), stop_count, stops (in run order: number, job_id, title, address, start_time, end_time, notes), source_date, last_loaded_at, created_at, updated_at.
  • events: id, event_id, event_type, occurred_at, entity_type, entity_id, job_id, data. Note that entity_type and entity_id are flat here, unlike the nested entity object in GET /v1/events.

List datasets#

GET /v1/exports

Permission: Read jobs

curl https://trutec.ai/api/v1/exports \
  -H "X-API-Key: $TRUTEC_API_KEY"
{
  "data": [
    {
      "dataset": "customers",
      "description": "Customers (billing entities)",
      "changed_since_fields": ["updated_at"],
      "url": "/api/v1/exports/customers.jsonl.gz",
      "csv_url": "/api/v1/exports/customers.csv.gz"
    },
    {
      "dataset": "job_costs",
      "description": "Job cost entries by category",
      "changed_since_fields": ["created_at", "reviewed_at", "reconciled_at"],
      "url": "/api/v1/exports/job_costs.jsonl.gz",
      "csv_url": "/api/v1/exports/job_costs.csv.gz"
    }
  ]
}

Download a dataset#

GET /v1/exports/{dataset}.jsonl, .jsonl.gz, .csv or .csv.gz, or GET /v1/exports/{dataset}?format=csv

Permission: Read jobs

Name Type Required Description
dataset path Yes A dataset name from the table above, with the file extension you want (.jsonl, .jsonl.gz, .csv, .csv.gz)
format string No jsonl (default), jsonl.gz, csv or csv.gz. Only read when the path has no extension. An extension in the path wins
updated_after ISO 8601 No Only rows changed after this time. Use the watermark from your last pull
# Full export, gzipped
curl -o jobs.jsonl.gz https://trutec.ai/api/v1/exports/jobs.jsonl.gz \
  -H "X-API-Key: $TRUTEC_API_KEY" -D headers.txt

# Incremental: only rows changed since the last watermark
curl "https://trutec.ai/api/v1/exports/jobs.jsonl?updated_after=2026-10-11T06:00:00Z" \
  -H "X-API-Key: $TRUTEC_API_KEY"

# The same rows as CSV
curl -o jobs.csv "https://trutec.ai/api/v1/exports/jobs.csv?updated_after=2026-10-11T06:00:00Z" \
  -H "X-API-Key: $TRUTEC_API_KEY"

JSON Lines response body (one object per line, shortened here):

{"id":4812,"name":"Northgate Plaza","company":"Northgate Property Group","address":"1200 Commerce Dr, Austin, TX","status":"won","status_label":"Won","estimated_value":48250.0,"client_account_id":915,"location_id":2290,"external_ref":"ERP-JOB-20931","custom_fields":{},"created_at":"2026-10-01T14:02:09.331201","updated_at":"2026-10-12T13:48:41.102938"}
{"id":4813,"name":"Riverside Medical Sealcoat","company":"Riverside Health","address":"88 Lake Rd, Austin, TX","status":"lead","status_label":"Lead","estimated_value":null,"client_account_id":917,"location_id":2295,"external_ref":null,"custom_fields":{},"created_at":"2026-10-12T09:15:00.000000","updated_at":"2026-10-12T09:15:00.000000"}

Response headers:

Header Meaning
Content-Type application/x-ndjson, text/csv; charset=utf-8, or application/gzip for .gz
X-TruTec-Export-Dataset The dataset name
X-TruTec-Export-Watermark Save this. Send it as updated_after on your next pull
Content-Disposition attachment; filename="<dataset>.jsonl[.gz]" or "<dataset>.csv[.gz]"

Rows are streamed in id order. The response has no total count and no pagination. Read until the stream ends. An empty dataset returns 200 with an empty body (as CSV: just the header row when nothing changed since updated_after; see CSV).

Errors:

  • 404 Unknown dataset, with a datasets list of valid names
  • 404 Use /api/v1/exports/<dataset>.jsonl, .jsonl.gz, .csv or .csv.gz (any other extension, such as .xml)
  • 400 format must be one of: jsonl, jsonl.gz, csv, csv.gz
  • 400 updated_after must be an ISO 8601 timestamp
  • 403 API key lacks job read permission

CSV#

Every dataset also comes as CSV: GET /v1/exports/{dataset}.csv (or .csv.gz, or ?format=csv). Each CSV row is the same record as the JSON Lines object, with the same values, so you can switch formats without losing anything. The watermark, updated_after, ordering, permissions and partner firm_id work exactly as for JSON Lines. A workspace_data link takes format csv or csv.gz too.

The file:

  • UTF-8, no byte-order mark. Comma separated, CRLF line ends, quoted with " only where a value holds a comma, quote or line break, and a " inside a value is doubled (RFC 4180).
  • The first row is the header: the column names. Every row after it is one record.

Columns:

  • Order. Columns follow the JSON object's keys, in the order the JSON shows them. The header is the same on every pull of a dataset, whatever the data. Read columns by name, not position: new columns can be added as the API grows, like new JSON fields (Versioning).
  • Objects with fixed keys are flattened into parent.child columns, one per key, in a fixed order. When the object is null for a record, its columns are empty.
Dataset Object Columns
jobs assigned_to assigned_to.id, .name, .username, .email, .role, .job_title, .phone_number, .headshot_url, .is_firm_owner, .created_at
estimates totals totals.price, .subtotal, .tax, .cost, .margin, .margin_pct, .optional_total
estimate_lines cost_by_type cost_by_type.labor, .equipment, .materials, .trucking, .subcontractors, .overhead, .misc
invoices quickbooks quickbooks.has_invoice, .doc_number, .has_payment, .invoice_synced_at, .sync_error
allocations crew crew.id, crew.name
  • Arrays, and objects whose keys vary by record, are JSON text in one cell: custom_fields and job_types on jobs, bundle_child_service_ids on estimate lines, people and equipment on allocations, stops on saved routes, data on events. An empty array is [].
  • estimate_lines is already one row per line item, so it needs no flattening beyond cost_by_type. Upsert it the same way as JSON Lines (replace every line of an estimate_id).

Values:

  • An empty cell is null (or empty text: CSV can't tell them apart). true and false are written as true and false.
  • Numbers are written as in the JSON: no thousands separators, no currency signs, no rounding. Money is in dollars, except columns ending in _cents.
  • Dates and times are the same ISO 8601 text as in the JSON (UTC).
  • Text is written as is. Values are not changed for spreadsheets, so a value that starts with = stays as it is. To open your data in a spreadsheet, the owner's Settings › Company › Download all your data gives spreadsheet-ready files.

An incremental pull with nothing changed returns just the header row. A dataset with no records at all returns an empty body.

curl -o jobs.csv.gz https://trutec.ai/api/v1/exports/jobs.csv.gz \
  -H "X-API-Key: $TRUTEC_API_KEY"

CSV response body (shortened here):

id,name,company,status,estimated_value,client_account_id,external_ref,custom_fields,assigned_to_user_id,assigned_to.id,assigned_to.name,assigned_to.email,created_at,updated_at
4812,Northgate Plaza,Northgate Property Group,won,48250.0,915,ERP-JOB-20931,"{""po_number"":""PO-77""}",31,31,Dana Ruiz,[email protected],2026-10-01T14:02:09.331201,2026-10-12T13:48:41.102938
4813,Riverside Medical Sealcoat,"Riverside Health, LLC",lead,,917,,{},,,,,2026-10-12T09:15:00,2026-10-12T09:15:00

Keeping a copy in sync#

  1. Run a full export of every dataset once.
  2. Store each dataset's X-TruTec-Export-Watermark.
  3. On a schedule (for example nightly), pull each dataset with updated_after=<stored watermark> and upsert rows by id (work_order_id for allocations; estimate_id plus line id for estimate_lines). Then store the new watermark.
  4. Run a full export now and then (for example weekly) to catch deletes.

The watermark is set one minute before the export started. A row saved while an export is running is sent again on the next pull, so upserts are safe and nothing is missed.

Warning

Incremental pulls cannot show hard deletes. A deleted row simply stops appearing. Archived customers, properties and estimates carry archived_at. Compare a periodic full export with your copy to find rows that were removed.

Other limits of incremental pulls:

  • job_costs has no updated_at. An edit to a cost entry after it was created shows up incrementally only when it is reviewed or reconciled. Full exports always have the current values.
  • estimate_lines re-sends every line of an estimate when the estimate's updated_at moves. Replace all lines for that estimate_id rather than upserting single lines.

What the export does not include#

The export covers the business records above. These are not in it:

  • Measurements and takeoffs (geometry, areas, counts, quantities). Use GET /v1/measurements and GET /v1/measurements/{id} (Measurements).
  • Photos, videos, documents and other files. Use GET /v1/jobs/{id}/photos for job photos. Other files are not available by API.
  • Proposal documents, e-signatures and proposal messages. The proposal_* webhooks carry status only.
  • Issued estimate versions and the estimate edit log. The export has the live estimate. Use GET /v1/estimates/{id}/versions, GET /v1/estimates/{id}?version=N and GET /v1/estimates/{id}/revisions.
  • Estimate lines that are hidden from bid totals. Suppressed and inactive services and inactive areas are left out, the same as on the customer proposal.
  • Invoice line items and invoice bill-to and remit-to text. The invoices dataset has amounts, tax, discount, dates, status and QuickBooks sync state.
  • Notes, activity timeline, tasks, emails and text messages.
  • Contacts (people) as their own records. Customer billing contact fields and job contact fields are included.
  • Your settings and catalog: services and pricing, rate books, pipeline stages, custom field definitions, crews and equipment lists (crews, people and equipment appear only as assigned on work orders in allocations), users and permissions.
  • Assessments and condition ratings, and webhook delivery history.

Access and your data#

  • Your data belongs to you. You can export it at any time while your workspace has API access.
  • API access needs an active plan that includes it (Gold or higher). If the subscription is canceled, past due or the trial has ended, API calls, including exports, are refused. Run a full export before you cancel.
  • Exports do not count toward your key's usage. See Limits & billing.
  • Exports are generated live and never written to storage, so there is no export file to expire or leak.