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

# List Document Set Exceptions

GET https://api.staple.io/reconciliation/v1/linking-sets/{uuid}/document-sets/{id}/exceptions

Lists the exceptions and warnings raised on one document set — the same worklist as the Exceptions panel on the reconcile details screen. It covers every comparison card unless `card_id` narrows it.

Each item is one finding, identified by `exception_id`, which stays the same across reconciliation runs. `kind` is `CRITICAL_EXCEPTION`, `EXCEPTION` or `WARNING`. `state` is `OPEN`, or `RESOLVED` once a later run passes or the pair is force accepted (`force_accept` is then set). `source_*` is where the finding was raised and `target_*` the document it was compared with. On a `NOT_FOUND` finding, `missing_side` and `missing_cause` say which value is missing and why. On an `ERROR` finding, `error_cause` and `unreadable_fields` say what could not be read.

With no filters the list holds open and resolved findings of every kind. Filters that take several values accept a repeated parameter or a comma-separated list.

Requires reconciliation v2 on the organisation; other tenants receive `404`.

Reference: https://docs.staple.ai/api-reference/v2/reconciliation/list-document-set-exceptions

## Authentication

- `x-api-key` header (required) — API key issued by Staple.
- `Authorization` header (bearer token, required) — JWT obtained from the login endpoint.

## Request

### Path parameters

- `uuid` (string, required) — Linking set UUID, as returned by List Linking Sets.
- `id` (string, required) — Document set ID (`document_set_id` from List Document Sets), URL-encoded.

### Query parameters

- `state` (list of enum, optional) — Filter by finding state. Omit to return both.
  - Allowed values: `OPEN`, `RESOLVED`
- `kind` (list of enum, optional) — Filter by severity, for example `kind=CRITICAL_EXCEPTION,EXCEPTION`.
  - Allowed values: `CRITICAL_EXCEPTION`, `EXCEPTION`, `WARNING`
- `status` (list of enum, optional) — Filter by the reconciliation status the finding records.
  - Allowed values: `RECONCILED`, `NOT_RECONCILED`, `NOT_FOUND`, `ERROR`
- `card_id` (string, optional) — Only findings from this comparison card. An unknown card returns `404`.
- `comparison_rule_id` (list of string, optional) — Only findings from these comparison rules.
- `label_id` (list of string, optional) — Only findings carrying these labels.
- `search` (string, optional) — Case-insensitive substring match on `exception_id`, `scenario_id`, `label_id` and `note`.
- `limit` (integer, optional, default: 50) — Page size. Defaults to 50 and is capped at 200.
- `offset` (integer, optional, default: 0) — Number of records to skip for pagination.

## Response

### 200

OK

## Examples

**Response**

```json
{
  "items": [
    {
      "card_id": "b3c1d2e4-0000-4000-8000-0000000000a1",
      "card_name": "Quantity check",
      "comparison_rule_id": "b3c1d2e4-0000-4000-8000-0000000000b1",
      "error_cause": null,
      "exception_id": "1c7e6f0a9b",
      "first_seen_at": "2026-01-10T09:00:04Z",
      "force_accept": null,
      "kind": "CRITICAL_EXCEPTION",
      "label_id": "b3c1d2e4-0000-4000-8000-0000000000c1",
      "last_seen_at": "2026-01-12T14:20:00Z",
      "missing_cause": null,
      "missing_side": null,
      "note": "Invoiced 50, ordered 49",
      "reconciliation_status": "NOT_RECONCILED",
      "reopen_count": 0,
      "resolved_at": null,
      "scenario_id": "qty-over",
      "source_document": {
        "doc_id": 500,
        "file_name": "invoice-500.pdf",
        "group_name": "Invoice",
        "group_uuid": "a1111111-0000-4000-8000-000000000001",
        "identifier": "INV-500",
        "qid": 7
      },
      "source_location": {
        "field_key": "qty",
        "locus": "TABLE",
        "row_id": "r-1",
        "table_key": "line_items",
        "upstream_field_identifier": "Qty",
        "upstream_row_identifier": "1",
        "upstream_table_identifier": "Line items"
      },
      "state": "OPEN",
      "target_document": {
        "doc_id": 501,
        "file_name": "po-500.pdf",
        "group_name": "Purchase order",
        "group_uuid": "a1111111-0000-4000-8000-000000000002",
        "identifier": "PO-500",
        "qid": 12
      },
      "target_location": {
        "field_key": "qty",
        "locus": "TABLE",
        "row_id": "r-1",
        "table_key": "line_items",
        "upstream_field_identifier": "Qty",
        "upstream_row_identifier": "1",
        "upstream_table_identifier": "Line items"
      },
      "unreadable_fields": []
    },
    {
      "card_id": "b3c1d2e4-0000-4000-8000-0000000000a2",
      "card_name": "Delivery check",
      "comparison_rule_id": "b3c1d2e4-0000-4000-8000-0000000000b2",
      "error_cause": null,
      "exception_id": "4a02c9d1e3",
      "first_seen_at": "2026-01-10T09:00:04Z",
      "force_accept": {
        "comment": "Delivery note follows by post",
        "created_at": "2026-01-11T08:15:00Z",
        "created_by": "4821",
        "id": "f0a1b2c3-0000-4000-8000-0000000000d1",
        "reason_code": "approved_exception",
        "reason_text": "Approved by AP lead",
        "system_status": "NOT_FOUND"
      },
      "kind": "EXCEPTION",
      "label_id": null,
      "last_seen_at": "2026-01-11T08:15:02Z",
      "missing_cause": "DOCUMENT_NOT_LINKED",
      "missing_side": "TARGET",
      "note": null,
      "reconciliation_status": "NOT_FOUND",
      "reopen_count": 0,
      "resolved_at": "2026-01-11T08:15:02Z",
      "scenario_id": "not-found",
      "source_document": {
        "doc_id": 500,
        "file_name": "invoice-500.pdf",
        "group_name": "Invoice",
        "group_uuid": "a1111111-0000-4000-8000-000000000001",
        "identifier": "INV-500",
        "qid": 7
      },
      "source_location": {
        "field_key": "delivery_note_no",
        "locus": "HEADER",
        "upstream_field_identifier": "Delivery note number"
      },
      "state": "RESOLVED",
      "target_document": null,
      "target_location": null,
      "unreadable_fields": []
    }
  ],
  "limit": 50,
  "offset": 0,
  "total_count": 2
}
```

**SDK Code**

```python List Document Set Exceptions
import requests

url = "https://api.staple.io/reconciliation/v1/linking-sets/7c2a1b90-4d3e-4f81-9a0c-11b2c3d4e5f6/document-sets/ds%3A7c2a1b90-4d3e-4f81-9a0c-11b2c3d4e5f6%3A500/exceptions"

querystring = {"card_id":"b3c1d2e4-0000-4000-8000-0000000000a1","kind":"[\"CRITICAL_EXCEPTION\"]","limit":"50","offset":"0","search":"qty-over","state":"[\"OPEN\"]","status":"[\"NOT_RECONCILED\"]"}

headers = {"x-api-key": "<apiKey>"}

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

print(response.json())
```

```javascript List Document Set Exceptions
const url = 'https://api.staple.io/reconciliation/v1/linking-sets/7c2a1b90-4d3e-4f81-9a0c-11b2c3d4e5f6/document-sets/ds%3A7c2a1b90-4d3e-4f81-9a0c-11b2c3d4e5f6%3A500/exceptions?card_id=b3c1d2e4-0000-4000-8000-0000000000a1&kind=%5B%22CRITICAL_EXCEPTION%22%5D&limit=50&offset=0&search=qty-over&state=%5B%22OPEN%22%5D&status=%5B%22NOT_RECONCILED%22%5D';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

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

```go List Document Set Exceptions
package main

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

func main() {

	url := "https://api.staple.io/reconciliation/v1/linking-sets/7c2a1b90-4d3e-4f81-9a0c-11b2c3d4e5f6/document-sets/ds%3A7c2a1b90-4d3e-4f81-9a0c-11b2c3d4e5f6%3A500/exceptions?card_id=b3c1d2e4-0000-4000-8000-0000000000a1&kind=%5B%22CRITICAL_EXCEPTION%22%5D&limit=50&offset=0&search=qty-over&state=%5B%22OPEN%22%5D&status=%5B%22NOT_RECONCILED%22%5D"

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

	req.Header.Add("x-api-key", "<apiKey>")

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

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

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

}
```

```ruby List Document Set Exceptions
require 'uri'
require 'net/http'

url = URI("https://api.staple.io/reconciliation/v1/linking-sets/7c2a1b90-4d3e-4f81-9a0c-11b2c3d4e5f6/document-sets/ds%3A7c2a1b90-4d3e-4f81-9a0c-11b2c3d4e5f6%3A500/exceptions?card_id=b3c1d2e4-0000-4000-8000-0000000000a1&kind=%5B%22CRITICAL_EXCEPTION%22%5D&limit=50&offset=0&search=qty-over&state=%5B%22OPEN%22%5D&status=%5B%22NOT_RECONCILED%22%5D")

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

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

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

```java List Document Set Exceptions
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.staple.io/reconciliation/v1/linking-sets/7c2a1b90-4d3e-4f81-9a0c-11b2c3d4e5f6/document-sets/ds%3A7c2a1b90-4d3e-4f81-9a0c-11b2c3d4e5f6%3A500/exceptions?card_id=b3c1d2e4-0000-4000-8000-0000000000a1&kind=%5B%22CRITICAL_EXCEPTION%22%5D&limit=50&offset=0&search=qty-over&state=%5B%22OPEN%22%5D&status=%5B%22NOT_RECONCILED%22%5D")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php List Document Set Exceptions
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.staple.io/reconciliation/v1/linking-sets/7c2a1b90-4d3e-4f81-9a0c-11b2c3d4e5f6/document-sets/ds%3A7c2a1b90-4d3e-4f81-9a0c-11b2c3d4e5f6%3A500/exceptions?card_id=b3c1d2e4-0000-4000-8000-0000000000a1&kind=%5B%22CRITICAL_EXCEPTION%22%5D&limit=50&offset=0&search=qty-over&state=%5B%22OPEN%22%5D&status=%5B%22NOT_RECONCILED%22%5D', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp List Document Set Exceptions
using RestSharp;

var client = new RestClient("https://api.staple.io/reconciliation/v1/linking-sets/7c2a1b90-4d3e-4f81-9a0c-11b2c3d4e5f6/document-sets/ds%3A7c2a1b90-4d3e-4f81-9a0c-11b2c3d4e5f6%3A500/exceptions?card_id=b3c1d2e4-0000-4000-8000-0000000000a1&kind=%5B%22CRITICAL_EXCEPTION%22%5D&limit=50&offset=0&search=qty-over&state=%5B%22OPEN%22%5D&status=%5B%22NOT_RECONCILED%22%5D");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift List Document Set Exceptions
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.staple.io/reconciliation/v1/linking-sets/7c2a1b90-4d3e-4f81-9a0c-11b2c3d4e5f6/document-sets/ds%3A7c2a1b90-4d3e-4f81-9a0c-11b2c3d4e5f6%3A500/exceptions?card_id=b3c1d2e4-0000-4000-8000-0000000000a1&kind=%5B%22CRITICAL_EXCEPTION%22%5D&limit=50&offset=0&search=qty-over&state=%5B%22OPEN%22%5D&status=%5B%22NOT_RECONCILED%22%5D")! 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()
```