Reading Compliance Results
Reading compliance results
Every requirement on a subcontractor has a compliance record with an overall status. Behind that status is a list of individual checks: one per limit, endorsement and expiration date the requirement asks for. The web app shows the same checks on each subcontractor’s Requirements tab.
You get the checks in checkResult.criteriaResults from:
GET /v1/subcontractors/{subcontractorId}/compliance(every requirement for the subcontractor)GET /v1/compliance/{complianceRecordId}(one record, with its check history)
One check
Outcomes
Treat an outcome you don’t recognize as not passing. Records written before October 2026 may not have outcome, label or field; use passed and message for those.
When a check needs review
If the only checks not passing are needs_review, the record’s status is under_review rather than non_compliant, and statusReason names the check. Nothing is asked of you or the subcontractor.
A TradeGuard operator compares the value against the certificate and records pass or fail. You then get a compliance.status_changed webhook with the new status, and the record’s statusReason starts with “TradeGuard ops review:”. That decision holds until a new certificate arrives, which is checked afresh.
Requirement status
The record’s status sums up its checks. The web app shows it as:
Showing checks by policy
One requirement can have checks on several policies, for example an additional insured endorsement required on both general liability and auto. The web app groups a requirement’s checks under each policy, and puts checks on the certificate as a whole in their own group. To do the same, group criteriaResults by policyType; rows written before October 2026 may not have it, so fall back to the requirement’s policyType.
Opening the certificate a value came from
When a check has evidence.documentId, get a short-lived download link for that document with GET /v1/subcontractors/{subcontractorId}/documents/{documentId} (Documents). $TG and $TG_KEY are set up in the Quickstart:
Open data.downloadUrl. When the check also has evidence.page, add #page=<page> to the link so PDF viewers open on that page. The web app’s “View on certificate” link does exactly this.
Re-checking after you change a profile
Editing or removing a requirement re-checks every subcontractor on its profile automatically; the edit’s response says how many in meta.runsTriggered.
After a change to the profile’s settings, or whenever you want fresh results, start a re-check yourself:
It starts one compliance run per enrolled subcontractor (trigger manual) and returns 202 straight away. Send {"subcontractorIds": ["…"]} to re-check only some of them. Each run reports through the compliance.run_completed and compliance.status_changed webhooks. To re-check one subcontractor against one profile, use POST /v1/subcontractors/{subcontractorId}/compliance/check (Compliance). The web app’s “Re-check subs” button on a profile page, and the prompt after you save the profile’s settings, call the same endpoint. Requires scope compliance:write.
