Skip to main content
GET
/
v1beta
/
documents
/
{document_id}
/
policies
TypeScript
import { Factify } from "@factify/sdk";

const factify = new Factify({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await factify.policies.list({
    documentId: "<id>",
    limit: 50,
  });

  for await (const page of result) {
    console.log(page);
  }
}

run();
{
  "items": [
    {
      "attached_at": "2023-11-07T05:31:56Z",
      "attached_by": {
        "id": "user_01h2xcejqtf2nbrexx3vqjhp41",
        "name": "John Doe",
        "type": "user_account"
      },
      "document_id": "doc_01h2xcejqtf2nbrexx3vqjhp41",
      "policy": {
        "created_at": "2023-11-07T05:31:56Z",
        "id": "pol_01h2xcejqtf2nbrexx3vqjhp41",
        "name": "GDPR Compliance Policy"
      }
    }
  ],
  "pagination": {
    "has_more": true,
    "next_cursor": "eyJsYXN0X2lkIjoiZG9jXzAxaDJ4Y2VqcXRmMm5icmV4eDN2cWpocDQxIn0"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer , where is your auth token.

Path Parameters

document_id
string
required

Document ID. Pattern: doc_[0-9a-hjkmnp-tv-z]{26}

Query Parameters

limit
integer<int32>

Number of results to return (1-100). Default: 50.

Required range: 1 <= x <= 100
Example:

50

cursor
string

Opaque pagination cursor from previous response.

Response

Success

ListDocumentPoliciesResponse contains a page of policy attachments.

items
DocumentPolicy · object[]

List of policy attachments.

pagination
pagination · object

Pagination metadata.