Docs/API/Policies

Policy Management

List your bound policies, retrieve details, and download policy PDFs. All results are scoped to policies originated through your API key.

List policies

GET /api/v2/policies/

Returns a paginated list of all policies created through your partner API key. Default page size is 20.

Query parameters

ParameterTypeDescription
pageoptional integer Page number. Defaults to 1.
orderingoptional string Sort field. Options: created_at, -created_at, effective_date, -effective_date.
searchoptional string Search by policy number, business name, or guarantor name.

Response

200 OK
{
  "count": 47,
  "next": "https://api.pgicover.com/api/v2/policies/?page=2",
  "previous": null,
  "results": [
    {
      "policy_number": "PGI-2026-CA-00142",
      "status": "bound",
      "named_insured": "Maple Leaf Technologies Inc.",
      "guarantor_name": "Sarah Chen",
      "coverage_amount": 250000,
      "premium": 5000.00,
      "effective_date": "2026-04-15",
      "expiry_date": "2027-04-15",
      "bound_at": "2026-04-05T09:14:22Z",
      "created_at": "2026-04-03T16:12:08Z"
    }
  ]
}

Example

curl https://api.pgicover.com/api/v2/policies/?ordering=-created_at \
  -H "Authorization: Bearer pk_test_abc123def456ghi789jkl012mno345"
resp = requests.get(
    "https://api.pgicover.com/api/v2/policies/",
    headers={"Authorization": "Bearer pk_test_abc123def456ghi789jkl012mno345"},
    params={"ordering": "-created_at"},
)
data = resp.json()
print(f"Total policies: {data['count']}")
for policy in data["results"]:
    print(f"  {policy['policy_number']} - {policy['named_insured']}")
const resp = await fetch(
  "https://api.pgicover.com/api/v2/policies/?ordering=-created_at",
  { headers: { "Authorization": "Bearer pk_test_abc123def456ghi789jkl012mno345" } }
);
const data = await resp.json();
console.log(`Total policies: ${data.count}`);
data.results.forEach(p => console.log(`  ${p.policy_number} - ${p.named_insured}`));

Get policy details

GET /api/v2/policies/{policy_number}/

Returns full details for a single policy.

200 OK
{
  "policy_number": "PGI-2026-CA-00142",
  "status": "bound",
  "named_insured": "Maple Leaf Technologies Inc.",
  "guarantor_name": "Sarah Chen",
  "coverage_amount": 250000,
  "premium": 5000.00,
  "effective_date": "2026-04-15",
  "expiry_date": "2027-04-15",
  "bound_at": "2026-04-05T09:14:22Z",
  "application_id": "D4E5F6A1B2C3789012345678EF",
  "quote_id": "E5F6A1B2C3D4789012345678AA",
  "created_at": "2026-04-03T16:12:08Z"
}

Download policy PDF

GET /api/v2/policies/{policy_number}/pdf/

Returns the bound policy document as a PDF file. The response content type is application/pdf.

Info Policy PDFs are generated by overlaying dynamic fields (named insured, coverage amount, effective dates, etc.) onto a master policy wording document. The PDF is created at download time, so it always reflects the current policy state.

Example

curl https://api.pgicover.com/api/v2/policies/PGI-2026-CA-00142/pdf/ \
  -H "Authorization: Bearer pk_test_abc123def456ghi789jkl012mno345" \
  -o policy-PGI-2026-CA-00142.pdf
resp = requests.get(
    "https://api.pgicover.com/api/v2/policies/PGI-2026-CA-00142/pdf/",
    headers={"Authorization": "Bearer pk_test_abc123def456ghi789jkl012mno345"},
)
with open("policy-PGI-2026-CA-00142.pdf", "wb") as f:
    f.write(resp.content)
print("Policy PDF downloaded.")
const resp = await fetch(
  "https://api.pgicover.com/api/v2/policies/PGI-2026-CA-00142/pdf/",
  { headers: { "Authorization": "Bearer pk_test_abc123def456ghi789jkl012mno345" } }
);
const buffer = await resp.arrayBuffer();
fs.writeFileSync("policy-PGI-2026-CA-00142.pdf", Buffer.from(buffer));
console.log("Policy PDF downloaded.");

Pagination

All list endpoints return paginated results using DRF's standard pagination format:

Default page size is 20. Follow the next URL to paginate through all results.