Skip to content
TruTecDevelopers
Get an API key

Job warranties

Draft no-charge warranty work on a job, email the customer a link to approve it, and void it.

View as Markdown

A job warranty is a record of no-charge warranty work the customer reviews and approves, like a change order with no money attached: a numbered title, a description and the schedule impact in days. In TruTec it's the Quick warranty approval request on a job's Warranties page. Warranties never change the contract value, costing or invoices.

The customer approves or declines from a review link with a typed-name signature; the API reads their answer but never decides for them. The review link is the customer's signature, so the API never returns it: it only goes to the customer's email.

Writes are made as the person who created the API key and need operations turned on for the workspace (403 Operations not enabled otherwise).

The warranty object#

Field Type Description
id integer Warranty id.
job_id, job integer, object The job.
number integer Numbered per job: 1, 2, 3…
title, description string What the work is.
days_delta integer Schedule impact in whole days (+/-).
status string draft, sent, approved, declined or void. Approved, declined and void are final.
source string office, or field when a crew reported it from the crew app.
customer_name, customer_email string or null Who reviews it.
sent_at, signed_at string or null UTC timestamps.
signature_name, decision_comment string or null The customer's typed signature and comment.
created_by object or null {id, name}.
created_at, updated_at string UTC timestamps.

List warranties#

GET /v1/job-warranties

Permission: Read jobs

Takes job_id, status, updated_after, limit and offset. Most recently changed first.

Get a warranty#

GET /v1/job-warranties/{id}

Permission: Read jobs

Create a warranty#

POST /v1/job-warranties

Permission: Write jobs

Field Type Required Description
job_id integer Yes The job.
title string Yes Up to 200 characters.
description string No
days_delta integer No Schedule impact in whole days. Default 0.
customer_name, customer_email string No Who reviews it.
curl -X POST "https://trutec.ai/api/v1/job-warranties" \
  -H "X-API-Key: $TRUTEC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "job_id": 70412, "title": "Repair settling at north entrance", "description": "Remove and replace the affected pavement.", "days_delta": 1, "customer_name": "Property Manager", "customer_email": "[email protected]" }'

Returns 201 with the warranty as a draft. Nothing is sent. Unless the key's creator is a workspace owner or admin, customer_email must be an email already on the job: the job's contact, a contact linked to the job, someone at the job's customer company, or one of the site's contacts (403 otherwise).

Update a warranty#

PATCH /v1/job-warranties/{id}

Permission: Write jobs

Takes the fields above except job_id. Only the fields sent change. Approved, declined and void warranties are locked (400).

Send it to the customer#

POST /v1/job-warranties/{id}/send

Permission: Write jobs

Warning

This emails your customer (customer_email) a link to review and approve or decline the warranty, from the connected mailbox of the person who created the API key.

Marks the warranty sent and returns it with emailed. The review link itself is never returned. When the email can't be sent it is still marked sent and emailed is false: fix customer_email and send again, or a workspace owner or admin can copy the link from the job's Warranties page in TruTec. Sending again re-sends the same link. Unless the key's creator is a workspace owner or admin, the send needs a customer_email that is still one of the job's emails: 400 with none, 403 for an address that isn't on the job.

Changing customer_email (PATCH) follows the same rule as on create, and after a warranty has been sent it replaces the review link: the old one stops working and the next send emails the new one.

Void a warranty#

POST /v1/job-warranties/{id}/void

Permission: Write jobs

Voids a draft or sent warranty. Its review link no longer takes a decision. Cannot be undone.