---
title: "PolicyStatsRequest"
url: "https://developers.zinnia.com/apis/policy-service-0-1-0/versions/8306e031-b41c-452a-a7ed-d73d65602086/schemas/PolicyStatsRequest"
---

> Full API specification: https://developers.zinnia.com/apis/policy-service-0-1-0/versions/8306e031-b41c-452a-a7ed-d73d65602086.md

# PolicyStatsRequest

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Policy Service
  version: 0.0.21
servers:
  - url: https://qa.api.zinnia.io
components:
  schemas:
    PolicyStatsRequest:
      type: object
      properties:
        createdAt:
          format: date-time
          type: string
          description: creation time of the policy
        carrierIds:
          description: List of carrier IDs to filter by
          type: array
          items:
            type: string
        planCode:
          description: List of plan codes to filter by
          type: array
          items:
            type: string
        policyStatus:
          description: List of policy statuses to filter by
          type: array
          items:
            type: string
        productName:
          description: List of product names to filter by
          type: array
          items:
            type: string
        maxAgeInDays:
          type: number
          description: 'Age in days at which bucketing stops. Returns exactly this many
            buckets: a final open-ended bucket holding everything at least
            maxAgeInDays days old (so 6 gives a "6+" bucket of policies 6 or
            more days old), preceded by one-day buckets. The first bucket is two
            days wide so policies less than a day old are still counted.'
          example: 6
          minimum: 2
          maximum: 31
        groupBy:
          type: array
          description: Dimensions to group the policy count by
          example:
            - carrier
            - policyStatus
          items:
            type: string
            enum:
              - carrier
              - productName
              - lineOfBusiness
              - policyStatus
      required:
        - maxAgeInDays
```
