Skip to navigation

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

{
"key": "limit:each_occurrence",
"label": "Each Occurrence",
"field": "general_liability.each_occurrence",
"rule": "gte",
"expected": 1000000,
"actual": 500000,
"outcome": "fail",
"passed": false,
"message": "Each Occurrence: $500,000 is below the required $1,000,000 minimum.",
"policyType": "general_liability",
"evidence": { "documentId": "6f1c…" },
"confidence": 0.94
}
FieldMeaning
labelPlain-English name of the check.
expectedWhat the requirement asks for.
actualWhat the certificate shows. null when it isn’t on the certificate.
ruleHow the two are compared: gte (at least), lte (at most), includes, not_expired and others. New rules may be added.
outcomeThe result of the check (see below).
passedtrue exactly when outcome is pass or waived. Kept so older integrations keep working.
messageA sentence built from the values above. TradeGuard never writes it with AI.
policyTypeThe policy the check is about, e.g. general_liability. null for a check on the certificate as a whole (certificate holder, insured name, signature).
evidence.documentIdThe certificate the value was read from, when known.
evidence.pageThe page of that document the value was read on, when known.
evidence.textThe words on the certificate the value was read from, when known.
confidenceHow sure the certificate reader was of the value, from 0 to 1, when known.

Outcomes

outcomeShown in the web app asWhat it means
passMeetsThe certificate meets the requirement.
failDoesn’t meet (for a limit: “Short $500K”)The certificate clearly doesn’t meet the requirement.
not_on_certificateNot on the certificateThe field is blank on the certificate. TradeGuard never reads a blank as $0 or “no”. Counts as not passing.
needs_reviewTradeGuard reviewingTradeGuard couldn’t tell what the certificate says: it was read with under 70% confidence, or it’s ambiguous. A TradeGuard operator looks at the certificate and decides. A policy whose expiration date is on or before its effective date gets a policy_dates check with this outcome: the dates were misread, so the policy is neither passed nor called expired.
waivedWaivedThe check is waived for this policy. Counts as passing.
waiting_on_subWaiting on the subThe check needs an answer from the subcontractor first. Counts as not passing.
waiting_on_informationWaiting on informationA Secretary of State or license check can’t run until information is added to the subcontractor (checkResult.informationNeeded lists it). Counts as not passing. See Secretary of State and License Checks.

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:

statusShown in the web app asWhat it means
compliantMetEvery check passes.
compliant_pending_verificationMet · confirming with brokerThe certificate passes; TradeGuard is confirming the policy with the broker.
non_compliantNot metAt least one check is fail or not_on_certificate.
expiredExpiredThe policy on file has expired. Its limits and endorsements are still checked and listed with the expiry, so you can see everything the renewal certificate must fix.
under_reviewTradeGuard reviewingThe only checks not passing are needs_review.
pendingAwaiting document, Waiting on the sub, or Waiting on informationNo document is on file yet (checkResult.awaitingDocument is true), the only checks not passing are waiting_on_sub, a Secretary of State / license check is waiting on information (checkResult.informationNeeded), or the requirement applies only when the sub uses business vehicles and the sub hasn’t said whether it does (checkResult.enforcement.conditionMet is null; the reason reads “Waiting on the sub: confirm whether you use business vehicles”).
not_applicableDoesn’t applyA conditional requirement whose condition is off for this subcontractor, for example the sub confirmed it uses no business vehicles.

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:

curl -s "$TG/v1/subcontractors/$SUB_ID/documents/$DOCUMENT_ID" -H "Authorization: Bearer $TG_KEY" | jq -r .data.downloadUrl

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:

curl -s -X POST "$TG/v1/compliance-profiles/$PROFILE_ID/recheck" -H "Authorization: Bearer $TG_KEY"
{
"data": {
"complianceProfileId": "9b2e…",
"runsTriggered": 12,
"message": "Re-checking 12 enrollments. Results will be delivered via webhook."
}
}

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.