> 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.

# Record a notice-of-cancellation waiver

POST https://api.tradeguardins.com/v1/subcontractors/{subcontractorId}/noc-waivers
Content-Type: application/json

Records that the subcontractor's carrier can't add notice of cancellation
to one policy, with the reason and who said so. The sub's
notice-of-cancellation requirements are re-checked in the background;
on the next result, that policy's row reads **Waived** (outcome
`waived`, counts as met).

`policyNumber` may be left out when the sub has exactly one policy of
that type on file; otherwise send it (`400` lists the numbers on file).
`source` says how the waiver reached you: `ops` (recorded by hand, the
default), `email` (from an email reply; link it with `communicationId`)
or `portal` (the sub confirmed it in a portal).

Side effects: a `noc_waiver.recorded` audit event and one queued
compliance check per notice-of-cancellation requirement. Every waiver is
also visible to TradeGuard's operations team.

Errors: `404` when the subcontractor isn't on your roster, `409` when a
live waiver already covers that policy, `503` until the database change
that stores waivers is applied.


Reference: https://docs.tradeguardins.com/api-reference/compliance/record-noc-waiver

## Authentication

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

## Request

### Path parameters

- `subcontractorId` (string, required)

### Body (application/json)

This endpoint expects an object.

- `policyType` (enum, required) — A policy type a notice-of-cancellation requirement or waiver can name.
  - Allowed values: `general_liability`, `automobile_liability`, `workers_comp`, `umbrella`
- `reason` (string, required)
- `givenBy` (string, required) — Who said it (the sub or broker), e.g. a name and email.
- `policyNumber` (string, optional) — Optional when exactly one policy of this type is on file.
- `source` (enum, optional, default: ops)
  - Allowed values: `ops`, `email`, `portal`
- `communicationId` (string, optional) — The email this came from, when `source` is `email`. Must be one of your communications with this subcontractor.

## Response

### 201

Waiver recorded; a re-check is queued

- `data` (NocWaiver, optional) — A notice-of-cancellation waiver: the sub's carrier can't add notice of cancellation to this policy. While live (`revokedAt` is null) it waives only the notice-of-cancellation check for this policy number.

## Errors

### 400 Bad Request Error

Request failed schema validation (`validation_failed`)

- `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`.

### 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`.

### 403 Forbidden Error

The credential lacks the scope or role for this action (`forbidden`)

- `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`.

### 404 Not Found Error

Resource not found, or not visible to the caller's organization (`not_found`)

- `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`.

### 409 Conflict Error

A live waiver already covers this policy.

- `any`

### 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`.

### 503 Service Unavailable Error

Waivers are not available yet (the database change that stores them has not been applied).

- `any`

## Types

### NocWaiver

A notice-of-cancellation waiver: the sub's carrier can't add notice of cancellation to this policy. While live (`revokedAt` is null) it waives only the notice-of-cancellation check for this policy number.

- `id` (string, optional)
- `organizationId` (string, optional)
- `subcontractorId` (string, optional)
- `policyType` (enum, optional) — A policy type a notice-of-cancellation requirement or waiver can name.
  - Allowed values: `general_liability`, `automobile_liability`, `workers_comp`, `umbrella`
- `policyNumber` (string, optional)
- `reason` (string, optional)
- `source` (enum, optional) — `ops` recorded by hand, `email` from an email reply, `portal` confirmed by the sub in a portal.
  - Allowed values: `ops`, `email`, `portal`
- `givenBy` (string, optional) — Who said it (the sub or broker).
- `communicationId` (string, optional, nullable)
- `recordedBy` (string, optional) — The user that recorded it (for an API key, the user who created the key).
- `recordedByType` (enum, optional) — `user` from the web app, `api_key` from the API, `system` when TradeGuard recorded it automatically (for example from an email reply).
  - Allowed values: `user`, `api_key`, `system`
- `recordedAt` (datetime, optional)
- `revokedAt` (datetime, optional, nullable)
- `revokedBy` (string, optional, nullable)
- `revokedReason` (string, optional, nullable)
- `createdAt` (datetime, optional)
- `updatedAt` (datetime, optional)

### ErrorDetailsItems

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

## Examples

**Request**

```json
{
  "policyType": "general_liability",
  "reason": "Carrier does not offer a notice-of-cancellation endorsement on this policy.",
  "givenBy": "Pat Lee, ABC Insurance (pat@abcins.com)"
}
```

**Response**

```json
{
  "data": {
    "id": "string",
    "organizationId": "string",
    "subcontractorId": "string",
    "policyType": "general_liability",
    "policyNumber": "string",
    "reason": "string",
    "source": "ops",
    "givenBy": "string",
    "communicationId": "string",
    "recordedBy": "string",
    "recordedByType": "user",
    "recordedAt": "2024-01-15T09:30:00Z",
    "revokedAt": "2024-01-15T09:30:00Z",
    "revokedBy": "string",
    "revokedReason": "string",
    "createdAt": "2024-01-15T09:30:00Z",
    "updatedAt": "2024-01-15T09:30:00Z"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.tradeguardins.com/v1/subcontractors/subcontractorId/noc-waivers"

payload = {
    "policyType": "general_liability",
    "reason": "Carrier does not offer a notice-of-cancellation endorsement on this policy.",
    "givenBy": "Pat Lee, ABC Insurance (pat@abcins.com)"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.tradeguardins.com/v1/subcontractors/subcontractorId/noc-waivers';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"policyType":"general_liability","reason":"Carrier does not offer a notice-of-cancellation endorsement on this policy.","givenBy":"Pat Lee, ABC Insurance (pat@abcins.com)"}'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.tradeguardins.com/v1/subcontractors/subcontractorId/noc-waivers"

	payload := strings.NewReader("{\n  \"policyType\": \"general_liability\",\n  \"reason\": \"Carrier does not offer a notice-of-cancellation endorsement on this policy.\",\n  \"givenBy\": \"Pat Lee, ABC Insurance (pat@abcins.com)\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	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/subcontractors/subcontractorId/noc-waivers")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"policyType\": \"general_liability\",\n  \"reason\": \"Carrier does not offer a notice-of-cancellation endorsement on this policy.\",\n  \"givenBy\": \"Pat Lee, ABC Insurance (pat@abcins.com)\"\n}"

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.post("https://api.tradeguardins.com/v1/subcontractors/subcontractorId/noc-waivers")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"policyType\": \"general_liability\",\n  \"reason\": \"Carrier does not offer a notice-of-cancellation endorsement on this policy.\",\n  \"givenBy\": \"Pat Lee, ABC Insurance (pat@abcins.com)\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.tradeguardins.com/v1/subcontractors/subcontractorId/noc-waivers', [
  'body' => '{
  "policyType": "general_liability",
  "reason": "Carrier does not offer a notice-of-cancellation endorsement on this policy.",
  "givenBy": "Pat Lee, ABC Insurance (pat@abcins.com)"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.tradeguardins.com/v1/subcontractors/subcontractorId/noc-waivers");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"policyType\": \"general_liability\",\n  \"reason\": \"Carrier does not offer a notice-of-cancellation endorsement on this policy.\",\n  \"givenBy\": \"Pat Lee, ABC Insurance (pat@abcins.com)\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "policyType": "general_liability",
  "reason": "Carrier does not offer a notice-of-cancellation endorsement on this policy.",
  "givenBy": "Pat Lee, ABC Insurance (pat@abcins.com)"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.tradeguardins.com/v1/subcontractors/subcontractorId/noc-waivers")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```