---
title: "Get program earning-rules daily report"
method: GET
path: "/v2/loyalties/programs/{programId}/reports/earning-rules/daily"
tags: ["Programs"]
---

# Get program earning-rules daily report

`GET /v2/loyalties/programs/{programId}/reports/earning-rules/daily`

<Info>

<Badge color="gray">Documentation in progress</Badge>

This documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.

</Info>

Returns aggregated daily earning-rule evaluation statistics for the program over the given date range and resolution, optionally filtered by earning rule. Includes success and failure counts with a failures breakdown.

The date range is limited per resolution:
maximum 90 days for `day`, 12 weeks for `week`, 12 months for `month`, 4 quarters for `quarter`.

## Path parameters

- `programId` string, required

## Query parameters

- `start_date` string, date, required
- `end_date` string, date, required
- `resolution` 'day' | 'week' | 'month' | 'quarter', required
- `filters` EarningRulesReportListFilters — Filters for program earning-rules reports.
  - `junction` 'AND' | 'OR', nullable — Logical junction between the field filters. Defaults to AND behavior.
  - `earning_rule_id` EarningRulesReportFilterEarningRuleIdConditions — ID filter conditions for earning rule id. Values must match pattern `^lern_[a-f0-9]+$`. `$is`/`$is_not` accept a single value (string or 1-element array); `$in`/`$not_in` accept a string or an array of 1-100 values.
    - `conditions` object, required
      - `$is` union — Matches rows whose earning rule id equals the given value.
        - string
        - string[]
      - `$is_not` union — Matches rows whose earning rule id does not equal the given value.
        - string
        - string[]
      - `$in` union — Matches rows whose earning rule id is one of the given values.
        - string
        - string[]
      - `$not_in` union — Matches rows whose earning rule id is not one of the given values.
        - string
        - string[]

## Response `200`

Program earning-rules daily report.

- EarningRulesReportDailyResponse — Program earning-rules daily report result.
  - `data` EarningRulesReportDailyEntry[] — Report entries, one per aggregation period and earning rule.
    - `date` string, date — Date of the aggregation period (`YYYY-MM-DD`).
    - `earning_rule_id` string — Unique identifier of the earning rule (format `lern_...`).
    - `success_count` number — Number of successful earning-rule evaluations in the period.
    - `failures_count` number — Number of failed earning-rule evaluations in the period.
    - `failures_breakdown` EarningRulesReportFailuresBreakdown — Breakdown of earning-rule failures by reason. Keys such as `cooldown` and `frequency` report counts for each failure reason. Defaults to `{}`.
      - `cooldown` number — Number of failures caused by cooldown restrictions.
      - `frequency` number — Number of failures caused by frequency restrictions.
    - `object` 'program_earning_rules_daily_report' — Object type marker. Always `program_earning_rules_daily_report`.
  - `object` 'report' — Object type marker. Always `report`.

## Other responses

- `400` — Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.
- `404` — Resource not found.
- `500` — Unexpected server error.

---

[API](https://skmtc.net/voucherifyio/apis/voucherify-loyalty-v2-api.md) · [All operations](https://skmtc.net/voucherifyio/apis/voucherify-loyalty-v2-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/voucherifyio/voucherify-loyalty-v2-api/revisions/69be73b5cff0/schema)
