# Who owes which policy version

`GET https://api.kapiworks.com/v1/policy-records`

Everyone who owed a version of one of the company's policies at `as_at`, with their state then (signed, to_do or overdue), the due date, and the receipt that settled it. Employees, partners and customers. Requires `acknowledgements:read`. Names and account emails also need `people:read`; without it they are left out.

Scope: `acknowledgements:read`.

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `as_at` | string (date-time) or string (date) | No | RFC 3339 instant with an offset, or a date read as the end of the company's day. The records as they stood then. Defaults to now. |
| `cursor` | string | No | Opaque next_cursor from the previous page. Send it unchanged to the same endpoint. It pins the snapshot and filters, and grants no access. |
| `limit` | integer | No | Rows per page, 1 to 200. Larger values are treated as 200. A page can hold fewer rows to stay within 3 MiB, so follow next_cursor until it is null. |

## Responses

| Status | Description |
| --- | --- |
| 200 | One page from a pinned company snapshot. |
| 400 | RFC 9457 problem details. Codes: invalid_request, invalid_cursor, key_in_url. Act on `code` or `type`; never parse `detail`. |
| 401 | RFC 9457 problem details. Codes: invalid_token. Act on `code` or `type`; never parse `detail`. |
| 403 | RFC 9457 problem details. Codes: insufficient_scope, ip_not_allowed. Act on `code` or `type`; never parse `detail`. |
| 404 | RFC 9457 problem details. Codes: not_found. Act on `code` or `type`; never parse `detail`. |
| 405 | RFC 9457 problem details. Codes: method_not_allowed. Act on `code` or `type`; never parse `detail`. |
| 422 | RFC 9457 problem details. Codes: before_history, record_too_large. Act on `code` or `type`; never parse `detail`. |
| 429 | RFC 9457 problem details. Codes: rate_limited, concurrent_limit. Act on `code` or `type`; never parse `detail`. |
| 502 | RFC 9457 problem details. Codes: read_failed. Act on `code` or `type`; never parse `detail`. |
| 503 | RFC 9457 problem details. Codes: unavailable, upstream_unavailable, writer_unavailable. Act on `code` or `type`; never parse `detail`. |
| 504 | RFC 9457 problem details. Codes: read_timeout. Act on `code` or `type`; never parse `detail`. |

## Fields of each row

| Field | Type | Meaning |
| --- | --- | --- |
| `deployment_id` | string (uuid) | Kapi deployment UUID. |
| `organization_id` | string (uuid) | Company UUID. Part of the receipt hash. |
| `learning_space_id` | string (uuid) | Learning-space UUID. |
| `record_id` | string (uuid) | Stable UUID of a person’s record of a policy version: the person, the policy and the version, or the ask-again cycle. |
| `course_id` | string (uuid) | Policy UUID. |
| `course_release_id` | string (uuid) | Published policy version UUID. Part of the receipt hash. |
| `policy_title` | string | Policy title when the version was published. |
| `version` | integer | Policy version number. |
| `learner_profile_id` | string (uuid) | Person profile UUID; kept after erasure. Part of the receipt hash. |
| `person_name` | string or null | Name from the current profile, or the account email when it has none. Erased person once Kapi erased the person at the company’s instruction. |
| `account_email` | string or null | Email of the person’s Kapi account when this was read. Null for an erased person. |
| `door` | string | employee, partner or customer: the audience the person reached the policy through. |
| `company` | string or null | For partners and customers, their company: the one on the receipt, else their group in that audience. |
| `assignment_id` | string (uuid) | Share UUID. Part of the receipt hash. |
| `state` | string | signed, to_do or overdue, as at the moment the rows were read. |
| `due_at` | string or null (date-time) | Deadline instant, or null for none. |
| `signed_at` | string or null | When Kapi wrote the receipt, in the exact form the receipt hash covers: YYYY-MM-DDTHH:MM:SS.ffffffZ, UTC. |
| `receipt_id` | string or null (uuid) | Receipt UUID. Part of the receipt hash. |
| `act` | string or null | What the person did: acknowledged or signed. Part of the receipt hash. |

## Example response

```json
{
  "data": [
    {
      "deployment_id": "00000000-0000-4000-8000-000000000001",
      "organization_id": "4f6b2a52-1c1e-4f7a-9d3e-2b7c8a9e0d11",
      "learning_space_id": "8b2d6c3e-5f41-4a8e-9c27-1d0e3f4a5b62",
      "record_id": "8e6c4a2f-1d3b-5f7e-9a8c-6b4d2f0e1a66",
      "course_id": "3e1d5c7b-9a2f-4e6d-8c1b-5a7f9e3d1c22",
      "course_release_id": "6f4e2d1c-8b7a-4c9e-9d3f-2e1a0b9c8d33",
      "policy_title": "Partner code of conduct",
      "version": 2,
      "learner_profile_id": "1b3d5f7a-9c2e-4b6d-8f1a-3c5e7b9d2f55",
      "person_name": "Tomas Reyes",
      "account_email": "tomas.reyes@example.com",
      "door": "partner",
      "company": "Northwind Logistics",
      "assignment_id": "4c2a0e8f-6d4b-4e9c-8b7a-5f3d1c9e7b77",
      "state": "signed",
      "due_at": "2026-10-15T22:59:59Z",
      "signed_at": "2026-10-12T09:14:03.218734Z",
      "receipt_id": "2a9c7e5f-3b1d-4f8a-9e6c-4d2b0a8f6e44",
      "act": "signed"
    }
  ],
  "total": 1,
  "snapshot": {
    "organization_id": "4f6b2a52-1c1e-4f7a-9d3e-2b7c8a9e0d11",
    "deployment_id": "00000000-0000-4000-8000-000000000001",
    "as_at": "2026-10-09T09:00:00Z",
    "from": null,
    "known_at": "2026-10-09T08:59:41Z",
    "sequence": 1284,
    "capture_sequence": 352,
    "chain_hash": "3f9a1c7e5b2d8f4a6c0e9b1d3f5a7c9e2b4d6f8a0c1e3b5d7f9a2c4e6b8d0f1a",
    "logic": {
      "version": 4,
      "date": "2026-10-06"
    },
    "history_complete_from": "2026-10-06T05:00:00Z",
    "available": true
  },
  "next_cursor": null
}
```

The full contract, with every schema, is at https://api.kapiworks.com/v1/openapi.json.