> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voucherify.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List program earning-rules daily reports

> Returns aggregated daily earning-rule evaluation statistics for the program over the given date range and resolution, optionally filtered by earning rule. Each entry counts eligibility checks for one period and earning rule. Periods without recorded activity are omitted. `failures_breakdown` is always an empty object. A filter that matches no rows returns an empty `data` array.

The date range is limited per resolution:
- 90 days for `day`,
- 12 weeks for `week`,
- 12 months for `month`,
- 4 quarters for `quarter`,
- `start_date` must be before `end_date`,
- `start_date` and `end_date` are inclusive.

Returns `400` when query validation fails. Returns `404` when the program does not exist.



## OpenAPI

````yaml /openapi/loyalties-v2.json get /v2/loyalties/programs/{programId}/reports/earning-rules/daily
openapi: 3.1.0
info:
  title: Voucherify API - Loyalty v2
  version: v2018-08-01
  description: >-
    Voucherify promotion engine REST API. Please see
    https://docs.voucherify.io/docs for more details.
  contact:
    name: Voucherify Team
    url: https://www.voucherify.io/contact-support
    email: support@voucherify.io
  termsOfService: https://www.voucherify.io/legal/subscription-agreement
  license:
    name: MIT
    url: https://github.com/voucherifyio/voucherify-js-sdk/blob/main/LICENSE
servers:
  - url: https://{cluster}.voucherify.io
    description: Base URL
    variables:
      cluster:
        default: api
        enum:
          - api
          - us1.api
          - as1.api
          - download
          - us1.download
          - as1.download
security: []
paths:
  /v2/loyalties/programs/{programId}/reports/earning-rules/daily:
    parameters:
      - name: programId
        in: path
        required: true
        description: >-
          Unique loyalty program identifier (format: `lprg_` followed by
          hexadecimal characters).
        schema:
          type: string
          pattern: ^lprg_[a-f0-9]+$
    get:
      tags:
        - Programs
      summary: List program earning-rules daily reports
      description: >-
        Returns aggregated daily earning-rule evaluation statistics for the
        program over the given date range and resolution, optionally filtered by
        earning rule. Each entry counts eligibility checks for one period and
        earning rule. Periods without recorded activity are omitted.
        `failures_breakdown` is always an empty object. A filter that matches no
        rows returns an empty `data` array.


        The date range is limited per resolution:

        - 90 days for `day`,

        - 12 weeks for `week`,

        - 12 months for `month`,

        - 4 quarters for `quarter`,

        - `start_date` must be before `end_date`,

        - `start_date` and `end_date` are inclusive.


        Returns `400` when query validation fails. Returns `404` when the
        program does not exist.
      operationId: listProgramEarningRulesDailyReports
      parameters:
        - name: start_date
          in: query
          required: true
          description: Start of the report date range (inclusive), in `YYYY-MM-DD` format.
          schema:
            type: string
            format: date
            pattern: ^\d{4}-\d{2}-\d{2}$
        - name: end_date
          in: query
          required: true
          description: >-
            End of the report date range (inclusive), in `YYYY-MM-DD` format.
            Must be after `start_date`.
          schema:
            type: string
            format: date
            pattern: ^\d{4}-\d{2}-\d{2}$
        - name: resolution
          in: query
          required: true
          description: >-
            Aggregation resolution of the report. The allowed date range depends
            on the resolution: `day` – max 90 days; `week` – max 12 weeks;
            `month` – max 12 months; `quarter` – max 4 quarters.
          schema:
            type: string
            enum:
              - day
              - week
              - month
              - quarter
        - name: filters
          in: query
          required: false
          style: deepObject
          explode: true
          description: >-
            Field filters. Each field accepts a `conditions` object with
            condition operators.
          schema:
            $ref: '#/components/schemas/EarningRulesReportListFilters'
      responses:
        '200':
          description: Program earning-rules daily report.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/V2LoyaltiesProgramsReportsEarningRulesDailyListResponseBody
              examples:
                'Program earning-rules daily report: Day resolution':
                  value:
                    data:
                      - date: '2026-07-01'
                        earning_rule_id: lern_128f5834b30c4bf7a3
                        success_count: 3
                        failures_count: 0
                        failures_breakdown: {}
                        object: program_earning_rules_daily_report
                      - date: '2026-07-01'
                        earning_rule_id: lern_128f5822398c4bf78f
                        success_count: 3
                        failures_count: 0
                        failures_breakdown: {}
                        object: program_earning_rules_daily_report
                      - date: '2026-07-10'
                        earning_rule_id: lern_128f48ee44cc4bec34
                        success_count: 1
                        failures_count: 0
                        failures_breakdown: {}
                        object: program_earning_rules_daily_report
                      - date: '2026-07-10'
                        earning_rule_id: lern_128f5834b30c4bf7a3
                        success_count: 1
                        failures_count: 0
                        failures_breakdown: {}
                        object: program_earning_rules_daily_report
                      - date: '2026-07-15'
                        earning_rule_id: lern_128f5834b30c4bf7a3
                        success_count: 11
                        failures_count: 0
                        failures_breakdown: {}
                        object: program_earning_rules_daily_report
                      - date: '2026-07-16'
                        earning_rule_id: lern_128f5822398c4bf78f
                        success_count: 7
                        failures_count: 0
                        failures_breakdown: {}
                        object: program_earning_rules_daily_report
                      - date: '2026-07-16'
                        earning_rule_id: lern_128f48ee44cc4bec34
                        success_count: 7
                        failures_count: 0
                        failures_breakdown: {}
                        object: program_earning_rules_daily_report
                      - date: '2026-07-16'
                        earning_rule_id: lern_128f5834b30c4bf7a3
                        success_count: 7
                        failures_count: 0
                        failures_breakdown: {}
                        object: program_earning_rules_daily_report
                      - date: '2026-07-23'
                        earning_rule_id: lern_128f5822398c4bf78f
                        success_count: 1
                        failures_count: 0
                        failures_breakdown: {}
                        object: program_earning_rules_daily_report
                      - date: '2026-07-23'
                        earning_rule_id: lern_128f48ee44cc4bec34
                        success_count: 1
                        failures_count: 0
                        failures_breakdown: {}
                        object: program_earning_rules_daily_report
                      - date: '2026-07-23'
                        earning_rule_id: lern_128f5834b30c4bf7a3
                        success_count: 1
                        failures_count: 0
                        failures_breakdown: {}
                        object: program_earning_rules_daily_report
                      - date: '2026-07-30'
                        earning_rule_id: lern_128f48ee44cc4bec34
                        success_count: 1
                        failures_count: 0
                        failures_breakdown: {}
                        object: program_earning_rules_daily_report
                      - date: '2026-07-30'
                        earning_rule_id: lern_128f5834b30c4bf7a3
                        success_count: 1
                        failures_count: 0
                        failures_breakdown: {}
                        object: program_earning_rules_daily_report
                      - date: '2026-07-30'
                        earning_rule_id: lern_128f5822398c4bf78f
                        success_count: 1
                        failures_count: 0
                        failures_breakdown: {}
                        object: program_earning_rules_daily_report
                      - date: '2026-08-06'
                        earning_rule_id: lern_128f5834b30c4bf7a3
                        success_count: 13
                        failures_count: 0
                        failures_breakdown: {}
                        object: program_earning_rules_daily_report
                      - date: '2026-08-06'
                        earning_rule_id: lern_128f5822398c4bf78f
                        success_count: 13
                        failures_count: 0
                        failures_breakdown: {}
                        object: program_earning_rules_daily_report
                      - date: '2026-08-06'
                        earning_rule_id: lern_128f48ee44cc4bec34
                        success_count: 13
                        failures_count: 0
                        failures_breakdown: {}
                        object: program_earning_rules_daily_report
                    object: report
                'Program earning-rules daily report: Month resolution':
                  value:
                    data:
                      - date: '2026-07-01'
                        earning_rule_id: lern_128f48ee44cc4bec34
                        success_count: 24
                        failures_count: 0
                        failures_breakdown: {}
                        object: program_earning_rules_daily_report
                      - date: '2026-07-01'
                        earning_rule_id: lern_128f5822398c4bf78f
                        success_count: 24
                        failures_count: 0
                        failures_breakdown: {}
                        object: program_earning_rules_daily_report
                      - date: '2026-07-01'
                        earning_rule_id: lern_128f5834b30c4bf7a3
                        success_count: 24
                        failures_count: 0
                        failures_breakdown: {}
                        object: program_earning_rules_daily_report
                      - date: '2026-08-01'
                        earning_rule_id: lern_128f5822398c4bf78f
                        success_count: 13
                        failures_count: 0
                        failures_breakdown: {}
                        object: program_earning_rules_daily_report
                      - date: '2026-08-01'
                        earning_rule_id: lern_128f48ee44cc4bec34
                        success_count: 13
                        failures_count: 0
                        failures_breakdown: {}
                        object: program_earning_rules_daily_report
                      - date: '2026-08-01'
                        earning_rule_id: lern_128f5834b30c4bf7a3
                        success_count: 13
                        failures_count: 0
                        failures_breakdown: {}
                        object: program_earning_rules_daily_report
                      - date: '2026-09-01'
                        earning_rule_id: lern_12cd26a685db3e63d8
                        success_count: 1
                        failures_count: 0
                        failures_breakdown: {}
                        object: program_earning_rules_daily_report
                      - date: '2026-09-01'
                        earning_rule_id: lern_128f57ec40cc4bf762
                        success_count: 3
                        failures_count: 0
                        failures_breakdown: {}
                        object: program_earning_rules_daily_report
                      - date: '2026-10-01'
                        earning_rule_id: lern_128f5822398c4bf78f
                        success_count: 3
                        failures_count: 0
                        failures_breakdown: {}
                        object: program_earning_rules_daily_report
                      - date: '2026-10-01'
                        earning_rule_id: lern_128f48ee44cc4bec34
                        success_count: 3
                        failures_count: 0
                        failures_breakdown: {}
                        object: program_earning_rules_daily_report
                      - date: '2026-10-01'
                        earning_rule_id: lern_128f5834b30c4bf7a3
                        success_count: 3
                        failures_count: 0
                        failures_breakdown: {}
                        object: program_earning_rules_daily_report
                    object: report
                'Program earning-rules daily report: No activity':
                  value:
                    data: []
                    object: report
        '400':
          description: >-
            Query parameters failed validation, or `start_date` is not before
            `end_date`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                'Invalid query parameters: `start_date` is required':
                  value:
                    code: 400
                    key: invalid_query_params
                    message: Invalid query params
                    details: Query must have required property 'start_date'
                    request_id: v-130eb43b3685e26454
                'Invalid query parameters: `end_date` is required':
                  value:
                    code: 400
                    key: invalid_query_params
                    message: Invalid query params
                    details: Query must have required property 'end_date'
                    request_id: v-130eb46d6c45e264b2
                'Invalid query parameters: `resolution` is required':
                  value:
                    code: 400
                    key: invalid_query_params
                    message: Invalid query params
                    details: Query must have required property 'resolution'
                    request_id: v-130eb4847405e264e3
                'Invalid query parameters: `resolution` is invalid':
                  value:
                    code: 400
                    key: invalid_query_params
                    message: Invalid query params
                    details: >-
                      Property .resolution must be equal to one of the allowed
                      values [ day, week, month, quarter ]
                    request_id: v-130eb4847405e264e4
                'Invalid query parameters: `start_date` is invalid':
                  value:
                    code: 400
                    key: invalid_query_params
                    message: Invalid query params
                    details: >-
                      Property .start_date cannot be recognized as a ISO-8601
                      compliant date
                    request_id: v-130eb43b3685e26455
                'Invalid query parameters: date range exceeds limit':
                  value:
                    code: 400
                    key: invalid_query_params
                    message: Invalid query params
                    details: >-
                      Query date range exceeds maximum allowed 90 days for
                      resolution 'day'
                    request_id: v-130eb43b3685e26456
                'Invalid payload: `start_date` is not before `end_date`':
                  value:
                    code: 400
                    key: invalid_payload
                    message: Invalid payload
                    details: Property 'start_date' must be before 'end_date'
                    request_id: v-130eb43b3685e26457
        '404':
          description: The program does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Program not found:
                  value:
                    code: 404
                    key: not_found
                    message: Resource not found
                    details: Cannot find program with id lprg_28f58429f4c4bf7b2
                    request_id: v-131e61d450c264502d
                    resource_id: lprg_28f58429f4c4bf7b2
                    resource_type: program
                Program id does not match the pattern:
                  value:
                    code: 404
                    key: not_found
                    message: Resource not found
                    details: Cannot find program with id missing
                    request_id: v-131e61d450c264502e
                    resource_id: missing
                    resource_type: program
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Internal server error:
                  value:
                    code: 500
                    key: api_error
                    message: >-
                      Something went wrong. Don't worry, your campaigns are
                      still safe and the Voucherify Team has been notified.
                      Check out our Help Center and forums for help, or head
                      back to home.
      security:
        - X-App-Id: []
          X-App-Token: []
        - bearerAuth: []
components:
  schemas:
    EarningRulesReportListFilters:
      type: object
      description: Filters for program earning-rules reports.
      properties:
        junction:
          description: >-
            Logical junction between the field filters. Defaults to AND
            behavior.
          oneOf:
            - type: string
              enum:
                - AND
                - OR
            - type: 'null'
        earning_rule_id:
          description: Filter by earning rule ID.
          oneOf:
            - $ref: >-
                #/components/schemas/EarningRulesReportFilterEarningRuleIdConditions
            - type: 'null'
      additionalProperties: false
    V2LoyaltiesProgramsReportsEarningRulesDailyListResponseBody:
      title: V2 Loyalties Programs Reports Earning Rules Daily List Response Body
      type: object
      description: >-
        Response body schema for **GET**
        `/v2/loyalties/programs/{programId}/reports/earning-rules/daily`.
      allOf:
        - $ref: '#/components/schemas/EarningRulesReportDailyResponse'
    ErrorResponse:
      type: object
      description: Standard error response returned by all Loyalty v2 endpoints.
      properties:
        code:
          type: integer
          description: HTTP status code of the error.
        key:
          type: string
          description: Machine-readable error key.
        message:
          type: string
          description: Human-readable error message.
        details:
          type: string
          description: Additional details about the error.
        request_id:
          type: string
          description: Unique identifier of the request that produced the error.
        resource_id:
          type: string
          description: Unique identifier of the resource that produced the error.
        resource_type:
          type: string
          description: Type of the resource that produced the error.
    EarningRulesReportFilterEarningRuleIdConditions:
      type: object
      description: >-
        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.
      properties:
        conditions:
          type: object
          minProperties: 1
          additionalProperties: false
          properties:
            $is:
              description: Matches rows whose earning rule ID equals the given value.
              oneOf:
                - type: string
                  pattern: ^lern_[a-f0-9]+$
                - type: array
                  minItems: 1
                  maxItems: 1
                  items:
                    type: string
                    pattern: ^lern_[a-f0-9]+$
                - type: 'null'
            $is_not:
              description: >-
                Matches rows whose earning rule ID does not equal the given
                value.
              oneOf:
                - type: string
                  pattern: ^lern_[a-f0-9]+$
                - type: array
                  minItems: 1
                  maxItems: 1
                  items:
                    type: string
                    pattern: ^lern_[a-f0-9]+$
                - type: 'null'
            $in:
              description: Matches rows whose earning rule ID is one of the given values.
              oneOf:
                - type: string
                  pattern: ^lern_[a-f0-9]+$
                - type: array
                  minItems: 1
                  maxItems: 100
                  items:
                    type: string
                    pattern: ^lern_[a-f0-9]+$
                - type: 'null'
            $not_in:
              description: >-
                Matches rows whose earning rule ID is not one of the given
                values.
              oneOf:
                - type: string
                  pattern: ^lern_[a-f0-9]+$
                - type: array
                  minItems: 1
                  maxItems: 100
                  items:
                    type: string
                    pattern: ^lern_[a-f0-9]+$
                - type: 'null'
      required:
        - conditions
      additionalProperties: false
    EarningRulesReportDailyResponse:
      type: object
      description: Program earning-rules daily report result.
      properties:
        data:
          type: array
          description: >-
            List of report entries, one per aggregation period and earning rule
            with recorded activity, ordered by `date` ascending. Empty when no
            activity was recorded in the range.
          items:
            $ref: '#/components/schemas/EarningRulesReportDailyEntry'
        object:
          type: string
          const: report
          description: Object type marker. Always `report`.
      required:
        - data
        - object
    EarningRulesReportDailyEntry:
      type: object
      description: >-
        Aggregated daily program earning-rule evaluation statistics for one
        period and earning rule. All numeric fields default to 0.
      properties:
        date:
          type: string
          format: date
          description: >-
            Identifies the start of the truncated aggregation period
            (`YYYY-MM-DD`). For `week` this is Monday. For `month` this is the
            first day. For `quarter` this is the quarter start.
        earning_rule_id:
          type: string
          pattern: ^lern_[a-f0-9]+$
          description: Identifies the earning rule (format `lern_...`).
        success_count:
          type: number
          description: >-
            Counts eligibility checks that passed the trigger limit in the
            period.
        failures_count:
          type: number
          description: >-
            Counts eligibility checks that failed the trigger limit in the
            period.
        failures_breakdown:
          type: object
          description: Always an empty object even if `failures_count` is above zero.
          additionalProperties: false
        object:
          type: string
          const: program_earning_rules_daily_report
          description: Object type marker. Always `program_earning_rules_daily_report`.
      required:
        - date
        - earning_rule_id
        - success_count
        - failures_count
        - failures_breakdown
        - object
  securitySchemes:
    X-App-Id:
      type: apiKey
      name: X-App-Id
      in: header
    X-App-Token:
      type: apiKey
      name: X-App-Token
      in: header
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.