> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.tradeguardins.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.tradeguardins.com/_mcp/server.

# List issues

GET https://api.tradeguardins.com/v1/issues

Defaults to open + acknowledged issues, newest first. Pass `view=all` or an explicit `status` filter to include resolved/closed ones. Requires scopes `subcontractors:read` and `compliance:read`.

Reference: https://docs.tradeguardins.com/api-reference/issues/list-issues

## Authentication

- `Authorization` header (bearer token, required) — Session JWT or API key (`ak_...`)

## Request

### Query parameters

- `status` (string, optional) — Comma-separated statuses.
- `category` (string, optional) — Comma-separated categories.
- `priority` (string, optional)
- `subcontractorId` (string, optional)
- `requirementId` (string, optional)
- `projectId` (string, optional) — Issues scoped to one project (project-level failures carry the project reference).
- `view` (enum, optional, default: open)
  - Allowed values: `open`, `all`
- `from` (datetime, optional) — A full date-time in UTC, e.g. `2026-12-01T00:00:00Z`. A bare date such as `2026-12-01` is rejected with `400`.
- `to` (datetime, optional) — A full date-time in UTC, e.g. `2026-12-31T23:59:59Z`. A bare date is rejected with `400`.
- `page` (integer, optional, default: 1)
- `limit` (integer, optional, default: 50)

## Response

### 200

Issues

- `data` (list of Issue, optional)
- `pagination` (Pagination, optional)

## Errors

### 401 Unauthorized Error

Missing, malformed, expired or revoked credential (`unauthenticated`)

- `error` (string, required) — Human-readable message. Wording may change; do not parse it.
- `code` (enum, required) — Stable, machine-readable error code. Status-level codes: `bad_request` (400), `unauthenticated` (401), `forbidden` (403), `not_found` (404), `method_not_allowed` (405, with an `Allow` header), `conflict` (409), `gone` (410), `payload_too_large` (413), `unprocessable` (422), `rate_limited` (429), `internal_error` (500), `bad_gateway` (502), `service_unavailable` (503). Specific codes: `validation_failed` and `invalid_identifier` (400); `reextraction_limit_reached` and `llm_budget_exhausted` (429, document re-extraction only); `sandbox_unavailable` (503, a sandbox key used where the sandbox is not provisioned); `assignment_exists` (409, a live assignment for this subcontractor and project already exists — its id is in `details`), `project_not_ready` (409, the project's setup is not Ready), `project_document` (409, a baseline-only action on a project certificate) and `subcontractor_match` (409, a new subcontractor's email or phone matches one already on TradeGuard — its id is in `details`); `portal_link_expired` and `portal_link_used` (410, sub portal links only).
  - Allowed values: `bad_request`, `unauthenticated`, `forbidden`, `not_found`, `method_not_allowed`, `conflict`, `gone`, `payload_too_large`, `unprocessable`, `rate_limited`, `internal_error`, `bad_gateway`, `service_unavailable`, `validation_failed`, `invalid_identifier`, `reextraction_limit_reached`, `llm_budget_exhausted`, `sandbox_unavailable`, `assignment_exists`, `project_not_ready`, `project_document`, `subcontractor_match`, `portal_link_expired`, `portal_link_used`
- `requestId` (string, optional) — Same value as the `x-request-id` response header.
- `details` (list of ErrorDetailsItems, optional) — Present when `code` is `validation_failed`.

### 429 Too Many Requests Error

Rate limit exceeded (`rate_limited`); retry after `Retry-After` seconds

- `error` (string, required) — Human-readable message. Wording may change; do not parse it.
- `code` (enum, required) — Stable, machine-readable error code. Status-level codes: `bad_request` (400), `unauthenticated` (401), `forbidden` (403), `not_found` (404), `method_not_allowed` (405, with an `Allow` header), `conflict` (409), `gone` (410), `payload_too_large` (413), `unprocessable` (422), `rate_limited` (429), `internal_error` (500), `bad_gateway` (502), `service_unavailable` (503). Specific codes: `validation_failed` and `invalid_identifier` (400); `reextraction_limit_reached` and `llm_budget_exhausted` (429, document re-extraction only); `sandbox_unavailable` (503, a sandbox key used where the sandbox is not provisioned); `assignment_exists` (409, a live assignment for this subcontractor and project already exists — its id is in `details`), `project_not_ready` (409, the project's setup is not Ready), `project_document` (409, a baseline-only action on a project certificate) and `subcontractor_match` (409, a new subcontractor's email or phone matches one already on TradeGuard — its id is in `details`); `portal_link_expired` and `portal_link_used` (410, sub portal links only).
  - Allowed values: `bad_request`, `unauthenticated`, `forbidden`, `not_found`, `method_not_allowed`, `conflict`, `gone`, `payload_too_large`, `unprocessable`, `rate_limited`, `internal_error`, `bad_gateway`, `service_unavailable`, `validation_failed`, `invalid_identifier`, `reextraction_limit_reached`, `llm_budget_exhausted`, `sandbox_unavailable`, `assignment_exists`, `project_not_ready`, `project_document`, `subcontractor_match`, `portal_link_expired`, `portal_link_used`
- `requestId` (string, optional) — Same value as the `x-request-id` response header.
- `details` (list of ErrorDetailsItems, optional) — Present when `code` is `validation_failed`.

## Types

### Issue

- `id` (string, optional)
- `organizationId` (string, optional)
- `subcontractorId` (string, optional)
- `requirementId` (string, optional, nullable)
- `complianceRecordId` (string, optional, nullable)
- `enrollmentId` (string, optional, nullable)
- `projectId` (string, optional, nullable) — Set for project work. A subcontractor not cleared for a project has ONE issue for that assignment (`sourceType` project_assignment, `sourceId` = the assignment id) listing every blocking gap; project requirements do not open separate issues.
- `sourceType` (enum, optional)
  - Allowed values: `compliance_record`, `verification_call`, `document_review`, `coverage`, `monitoring_run`, `report_criterion`, `enrollment`, `project_assignment`
- `sourceId` (string, optional, nullable)
- `category` (enum, optional)
  - Allowed values: `non_compliant`, `expired`, `carrier_outreach`, `review_rejected`, `coverage_flag`, `failed_verification`, `report_criterion`, `onboarding`
- `status` (enum, optional)
  - Allowed values: `open`, `acknowledged`, `resolved`, `closed`
- `priority` (enum, optional)
  - Allowed values: `low`, `medium`, `high`, `urgent`
- `title` (string, optional)
- `summary` (string, optional, nullable) — Template-generated plain language, never model-written.
- `whatsWrong` (string, optional) — Plain English: what failed, one sentence per failing check. Written by templates from the gap, never by AI, so the same gap always gives the same text. Use it in messages to the subcontractor. See the guide "Handling issue resolution yourself".
- `whatToAskFor` (string, optional) — Plain English: what to ask the subcontractor or their insurance agent for so the issue closes on its own once the new document passes. When TradeGuard is already reviewing the issue, it says there is nothing to ask for yet.
- `gap` (IssueGap, optional) — Structured gap. For requirement failures it is the checker comparison; for operational issues it carries the trigger's reason and detail.
- `refireCount` (integer, optional) — How many times the same trigger fired while the issue was open.
- `lastFiredAt` (datetime, optional)
- `acknowledgedAt` (datetime, optional, nullable)
- `acknowledgedBy` (string, optional, nullable)
- `resolvedAt` (datetime, optional, nullable)
- `resolvedBy` (string, optional, nullable)
- `resolutionNote` (string, optional, nullable)
- `closedAt` (datetime, optional, nullable)
- `createdAt` (datetime, optional)
- `updatedAt` (datetime, optional)

### Pagination

- `page` (integer, optional)
- `limit` (integer, optional)
- `total` (integer, optional) — Total items matching the query.
- `totalPages` (integer, optional)

### ErrorDetailsItems

- `path` (string, optional)
- `message` (string, optional)

### IssueGap

Structured gap. For requirement failures it is the checker comparison; for operational issues it carries the trigger's reason and detail.

- `documentCategory` (string, optional, nullable)
- `policyType` (string, optional, nullable)
- `statusReason` (string, optional, nullable)
- `criteria` (list of IssueGapCriterion, optional)
- `failedKeys` (list of string, optional)
- `checkedAt` (datetime, optional, nullable)

### IssueGapCriterion

One evaluated criterion — required (expected) vs. extracted (actual).

- `key` (string, optional)
- `passed` (boolean, optional)
- `expected` (any, optional) — Required value from the profile
- `actual` (any, optional) — Value extracted from the document / verification
- `message` (string, optional)
- `label` (string, optional) — Plain-English name of the check, when recorded (e.g. "Covered autos").
- `policyType` (string, optional, nullable) — The policy type the check is about

## Examples

**Response**

```json
{
  "data": [
    {
      "id": "string",
      "organizationId": "string",
      "subcontractorId": "string",
      "requirementId": "string",
      "complianceRecordId": "string",
      "enrollmentId": "string",
      "projectId": "string",
      "sourceType": "compliance_record",
      "sourceId": "string",
      "category": "non_compliant",
      "status": "open",
      "priority": "low",
      "title": "General Liability $1M — Non-compliant",
      "summary": "General Liability each-occurrence is $500,000; this profile requires $1,000,000",
      "whatsWrong": "General Liability each-occurrence is $1,000,000; required at least $2,000,000",
      "whatToAskFor": "Ask for an updated certificate of insurance (COI) showing General Liability each-occurrence of at least $2,000,000.",
      "gap": {
        "documentCategory": "string",
        "policyType": "string",
        "statusReason": "string",
        "criteria": [
          {
            "key": "limit:each_occurrence",
            "passed": true,
            "expected": null,
            "actual": null,
            "message": "string",
            "label": "string",
            "policyType": "string"
          }
        ],
        "failedKeys": [
          "string"
        ],
        "checkedAt": "2024-01-15T09:30:00Z"
      },
      "refireCount": 1,
      "lastFiredAt": "2024-01-15T09:30:00Z",
      "acknowledgedAt": "2024-01-15T09:30:00Z",
      "acknowledgedBy": "string",
      "resolvedAt": "2024-01-15T09:30:00Z",
      "resolvedBy": "string",
      "resolutionNote": "string",
      "closedAt": "2024-01-15T09:30:00Z",
      "createdAt": "2024-01-15T09:30:00Z",
      "updatedAt": "2024-01-15T09:30:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 1,
    "total": 1,
    "totalPages": 1
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.tradeguardins.com/v1/issues"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.tradeguardins.com/v1/issues';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.tradeguardins.com/v1/issues"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.tradeguardins.com/v1/issues")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.tradeguardins.com/v1/issues")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.tradeguardins.com/v1/issues', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.tradeguardins.com/v1/issues");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.tradeguardins.com/v1/issues")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```