List all policies

Returns a paginated list of policies for the organization. Policies can be paginated in one of two ways. Page-based pagination uses page and page_size and returns the total number of matching policies in the X-Total-Count header. Cursor-based pagination uses limit and cursor and returns the cursor for the next page in the X-Next-Cursor header. Cursor-based pagination stays fast however deep you page, so use it to walk through a large number of policies.

To paginate by cursor, send limit on the first request. If more policies remain, the response includes an X-Next-Cursor header. Send its value as cursor, with limit and the same filters and sort, to fetch the next page. The last page has no X-Next-Cursor header. Cursor-based pagination does not return a total; use HEAD /policies with the same filters to get one in X-Total-Count.

Query Params
integer
1 to 100
Defaults to 30

The maximum number of items that will be contained in a single page, between 1 and 100 (inclusive).

integer
≥ 1
Defaults to 1

The page number of the entities to fetch. Must be a minimum of 1.

integer
1 to 100

The maximum number of policies in a single page when paginating by cursor, between 1 and 100 (inclusive). Required when cursor is sent. Cannot be combined with page or page_size.

string
length ≤ 1024

The value of the X-Next-Cursor header from the previous page. Send it with limit and the same filters and sort as the request that returned it.

string
enum

The field to sort policies by. Policies with the same value are ordered by policy_id. Policies without a start_date come first when sorting by start_date in descending order, and last in ascending order. When omitted, policies are sorted by created_at, newest first, except with search, where the order is not guaranteed. With page-based pagination and no sort, policies created at the same time have no fixed order, so they can repeat or be skipped across pages.

Allowed:
string
enum
Defaults to desc

The sort direction. Only applies when sort is sent.

Allowed:

A general-purpose parameter used to search for policies across policy.policy_number, policy.package_name, policyholder.first_name, policyholder.last_name, policyholder.company_name, policyholder.identification_number, policyholder.registration_number, policyholder.cellphone, policyholder.phone_other, and policyholder.email. A cursor is only valid with the same search term it was issued for.

string

A comma separated list of policy statuses to filter by.

string

Must be a UUID. Filter for policies linked to this policyholder.

string

Must be a UUID. The unique identifier of the agent that created the policy.

string

Must be a UUID. Filter for policies assigned to this user group. When the request is authenticated with a user-group-segmented API key, results are always restricted to that key's own group and this parameter is ignored.

include
array of strings, unique

Whether to include the full policyholder object linked to the policy in the response.

string

Must be a UUID. Filter for policies issued under this product module.

policy_number
array of strings, unique

List of case sensitive policy numbers to filter by.

policy_number
Responses

400

The query is invalid. With cursor-based pagination this includes sending page or page_size with limit or cursor, sending cursor without limit, a malformed cursor, and a cursor reused with a different sort or different filters.

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json