> ## 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 points-earnings daily reports

> Returns aggregated daily points-earnings statistics for the program over the given date range and resolution, optionally filtered by earning rule and card definition. Each entry sums earning operations recorded for one period, earning rule, earning item, and card definition. Periods without recorded activity are omitted. 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.

A successful call records no activity.



## OpenAPI

````yaml /openapi/loyalties-v2.json get /v2/loyalties/programs/{programId}/reports/points-earnings/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/points-earnings/daily:
    parameters:
      - name: programId
        in: path
        required: true
        description: Identifies the loyalty program. Format `lprg_[a-f0-9]+`.
        schema:
          type: string
          pattern: ^lprg_[a-f0-9]+$
    get:
      tags:
        - Programs
      summary: List program points-earnings daily reports
      description: >-
        Returns aggregated daily points-earnings statistics for the program over
        the given date range and resolution, optionally filtered by earning rule
        and card definition. Each entry sums earning operations recorded for one
        period, earning rule, earning item, and card definition. Periods without
        recorded activity are omitted. 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.


        A successful call records no activity.
      operationId: getProgramPointsEarningsDailyReport
      parameters:
        - name: start_date
          in: query
          required: true
          description: >-
            Sets the inclusive start of the report date range. Format
            `YYYY-MM-DD`.
          schema:
            type: string
            format: date
            pattern: ^\d{4}-\d{2}-\d{2}$
        - name: end_date
          in: query
          required: true
          description: >-
            Sets the inclusive end of the report date range. Format
            `YYYY-MM-DD`. Must be after `start_date`.
          schema:
            type: string
            format: date
            pattern: ^\d{4}-\d{2}-\d{2}$
        - name: resolution
          in: query
          required: true
          description: >-
            Sets the aggregation resolution. `day` allows at most 90 days,
            `week` at most 12 weeks, `month` at most 12 months, and `quarter` at
            most 4 quarters.
          schema:
            type: string
            enum:
              - day
              - week
              - month
              - quarter
        - name: filters
          in: query
          required: false
          style: deepObject
          explode: true
          description: >-
            Filters the results. Pass a deep object, for example
            `filters[earning_rule_id][conditions][$is]=lern_...`. Fields combine
            through `junction`, which defaults to `AND`. Omit `filters` to apply
            no field filter.
          schema:
            oneOf:
              - $ref: '#/components/schemas/PointsEarningsReportListFilters'
              - type: 'null'
      responses:
        '200':
          description: Program points-earnings daily report.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/V2LoyaltiesProgramsReportsPointsEarningsDailyListResponseBody
              examples:
                'Program points-earnings daily report: Day resolution':
                  value:
                    data:
                      - date: '2026-07-01'
                        earning_rule_id: lern_128f9ee63cc4ba558
                        earning_item_id: lernei_128f582238cc4bf78e
                        card_definition_id: lcdef_128f58429f4c4bf7b2
                        success_count: 1
                        points: 100
                        pending_points: 0
                        object: program_points_earnings_daily_report
                    object: report
                'Program points-earnings daily report: Week resolution':
                  value:
                    data:
                      - date: '2026-06-29'
                        earning_rule_id: lern_128f5822398c4bf78f
                        earning_item_id: lernei_128f582238cc4bf78e
                        card_definition_id: lcdef_128f49963c0c4becb7
                        success_count: 3
                        points: 0
                        pending_points: 30
                        object: program_points_earnings_daily_report
                      - date: '2026-06-29'
                        earning_rule_id: lern_128f48ee44cc4bec34
                        earning_item_id: lernei_128f48ee3fcc4bec33
                        card_definition_id: lcdef_128f4a88414c4bed69
                        success_count: 3
                        points: 0
                        pending_points: 7497
                        object: program_points_earnings_daily_report
                      - date: '2026-06-29'
                        earning_rule_id: lern_128f5834b30c4bf7a3
                        earning_item_id: lernei_128f5834b20c4bf7a2
                        card_definition_id: lcdef_128f495f720c4bec8c
                        success_count: 3
                        points: 0
                        pending_points: 30
                        object: program_points_earnings_daily_report
                      - date: '2026-07-06'
                        earning_rule_id: lern_128f5822398c4bf78f
                        earning_item_id: lernei_128f582238cc4bf78e
                        card_definition_id: lcdef_128f49963c0c4becb7
                        success_count: 1
                        points: 0
                        pending_points: 10
                        object: program_points_earnings_daily_report
                      - date: '2026-07-06'
                        earning_rule_id: lern_128f48ee44cc4bec34
                        earning_item_id: lernei_128f48ee3fcc4bec33
                        card_definition_id: lcdef_128f4a88414c4bed69
                        success_count: 1
                        points: 0
                        pending_points: 2999
                        object: program_points_earnings_daily_report
                      - date: '2026-07-06'
                        earning_rule_id: lern_128f5834b30c4bf7a3
                        earning_item_id: lernei_128f5834b20c4bf7a2
                        card_definition_id: lcdef_128f495f720c4bec8c
                        success_count: 1
                        points: 0
                        pending_points: 10
                        object: program_points_earnings_daily_report
                      - date: '2026-07-13'
                        earning_rule_id: lern_128f5822398c4bf78f
                        earning_item_id: lernei_128f582238cc4bf78e
                        card_definition_id: lcdef_128f49963c0c4becb7
                        success_count: 18
                        points: 0
                        pending_points: 180
                        object: program_points_earnings_daily_report
                      - date: '2026-07-13'
                        earning_rule_id: lern_128f48ee44cc4bec34
                        earning_item_id: lernei_128f48ee3fcc4bec33
                        card_definition_id: lcdef_128f4a88414c4bed69
                        success_count: 18
                        points: 0
                        pending_points: 4400
                        object: program_points_earnings_daily_report
                      - date: '2026-07-13'
                        earning_rule_id: lern_128f5834b30c4bf7a3
                        earning_item_id: lernei_128f5834b20c4bf7a2
                        card_definition_id: lcdef_128f495f720c4bec8c
                        success_count: 18
                        points: 0
                        pending_points: 180
                        object: program_points_earnings_daily_report
                      - date: '2026-07-20'
                        earning_rule_id: lern_128f5822398c4bf78f
                        earning_item_id: lernei_128f582238cc4bf78e
                        card_definition_id: lcdef_128f49963c0c4becb7
                        success_count: 1
                        points: 0
                        pending_points: 10
                        object: program_points_earnings_daily_report
                      - date: '2026-07-20'
                        earning_rule_id: lern_128f48ee44cc4bec34
                        earning_item_id: lernei_128f48ee3fcc4bec33
                        card_definition_id: lcdef_128f4a88414c4bed69
                        success_count: 1
                        points: 0
                        pending_points: 200
                        object: program_points_earnings_daily_report
                      - date: '2026-07-20'
                        earning_rule_id: lern_128f5834b30c4bf7a3
                        earning_item_id: lernei_128f5834b20c4bf7a2
                        card_definition_id: lcdef_128f495f720c4bec8c
                        success_count: 1
                        points: 0
                        pending_points: 10
                        object: program_points_earnings_daily_report
                      - date: '2026-07-27'
                        earning_rule_id: lern_128f5822398c4bf78f
                        earning_item_id: lernei_128f582238cc4bf78e
                        card_definition_id: lcdef_128f49963c0c4becb7
                        success_count: 1
                        points: 0
                        pending_points: 10
                        object: program_points_earnings_daily_report
                      - date: '2026-07-27'
                        earning_rule_id: lern_128f48ee44cc4bec34
                        earning_item_id: lernei_128f48ee3fcc4bec33
                        card_definition_id: lcdef_128f4a88414c4bed69
                        success_count: 1
                        points: 0
                        pending_points: 2999
                        object: program_points_earnings_daily_report
                      - date: '2026-07-27'
                        earning_rule_id: lern_128f5834b30c4bf7a3
                        earning_item_id: lernei_128f5834b20c4bf7a2
                        card_definition_id: lcdef_128f495f720c4bec8c
                        success_count: 1
                        points: 0
                        pending_points: 10
                        object: program_points_earnings_daily_report
                      - date: '2026-08-03'
                        earning_rule_id: lern_128f48ee44cc4bec34
                        earning_item_id: lernei_128f48ee3fcc4bec33
                        card_definition_id: lcdef_128f4a88414c4bed69
                        success_count: 13
                        points: 0
                        pending_points: 2223000
                        object: program_points_earnings_daily_report
                      - date: '2026-08-03'
                        earning_rule_id: lern_128f5834b30c4bf7a3
                        earning_item_id: lernei_128f5834b20c4bf7a2
                        card_definition_id: lcdef_128f495f720c4bec8c
                        success_count: 13
                        points: 0
                        pending_points: 130
                        object: program_points_earnings_daily_report
                      - date: '2026-08-03'
                        earning_rule_id: lern_128f5822398c4bf78f
                        earning_item_id: lernei_128f582238cc4bf78e
                        card_definition_id: lcdef_128f49963c0c4becb7
                        success_count: 13
                        points: 0
                        pending_points: 130
                        object: program_points_earnings_daily_report
                    object: report
                'Program points-earnings 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: `end_date` is invalid':
                  value:
                    code: 400
                    key: invalid_query_params
                    message: Invalid query params
                    details: >-
                      Property .end_date cannot be recognized as a ISO-8601
                      compliant date
                    request_id: v-130eb43b3685e26458
                'Invalid query parameters: date range exceeds limit for `day`':
                  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 query parameters: date range exceeds limit for `week`':
                  value:
                    code: 400
                    key: invalid_query_params
                    message: Invalid query params
                    details: >-
                      Query date range exceeds maximum allowed 12 weeks for
                      resolution 'week'
                    request_id: v-130eb43b3685e26459
                'Invalid query parameters: date range exceeds limit for `month`':
                  value:
                    code: 400
                    key: invalid_query_params
                    message: Invalid query params
                    details: >-
                      Query date range exceeds maximum allowed 12 months for
                      resolution 'month'
                    request_id: v-130eb43b3685e2645a
                'Invalid query parameters: date range exceeds limit for `quarter`':
                  value:
                    code: 400
                    key: invalid_query_params
                    message: Invalid query params
                    details: >-
                      Query date range exceeds maximum allowed 4 quarters for
                      resolution 'quarter'
                    request_id: v-130eb43b3685e2645b
                '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:
    PointsEarningsReportListFilters:
      type: object
      description: Filters for program points-earnings reports.
      properties:
        junction:
          description: >-
            Joins the field filters. Allowed values are `AND` and `OR`. Defaults
            to `AND`.
          oneOf:
            - type: string
              enum:
                - AND
                - OR
            - type: 'null'
        earning_rule_id:
          description: Filters by earning rule ID. Format `lern_[a-f0-9]+`.
          oneOf:
            - $ref: '#/components/schemas/EarningRuleIdFilterConditions'
            - type: 'null'
        card_definition_id:
          description: Filters by card definition ID. Format `lcdef_[a-f0-9]+`.
          oneOf:
            - $ref: '#/components/schemas/ReportCardDefinitionIdFilterConditions'
            - type: 'null'
      additionalProperties: false
    V2LoyaltiesProgramsReportsPointsEarningsDailyListResponseBody:
      title: V2 Loyalties Programs Reports Points Earnings Daily List Response Body
      type: object
      description: >-
        Response body schema for **GET**
        `/v2/loyalties/programs/{programId}/reports/points-earnings/daily`.
      allOf:
        - $ref: '#/components/schemas/PointsEarningsReportDailyResponse'
    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.
    EarningRuleIdFilterConditions:
      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 one value. A string or a one-element array. Format
                `lern_[a-f0-9]+`.
              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: >-
                Excludes one value. A string or a one-element array. Format
                `lern_[a-f0-9]+`.
              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 any of the values. A string or an array of 1 to 100
                values. Format `lern_[a-f0-9]+`.
              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: >-
                Excludes any of the values. A string or an array of 1 to 100
                values. Format `lern_[a-f0-9]+`.
              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
    ReportCardDefinitionIdFilterConditions:
      type: object
      description: >-
        ID filter conditions for card definition IDs. Values must match pattern
        `^lcdef_[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
          properties:
            $is:
              description: >-
                Matches one value. A string or a one-element array. Format
                `lcdef_[a-f0-9]+`.
              oneOf:
                - type: string
                  pattern: ^lcdef_[a-f0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^lcdef_[a-f0-9]+$
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $is_not:
              description: >-
                Excludes one value. A string or a one-element array. Format
                `lcdef_[a-f0-9]+`.
              oneOf:
                - type: string
                  pattern: ^lcdef_[a-f0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^lcdef_[a-f0-9]+$
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $in:
              description: >-
                Matches any of the values. A string or an array of 1 to 100
                values. Format `lcdef_[a-f0-9]+`.
              oneOf:
                - type: string
                  pattern: ^lcdef_[a-f0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^lcdef_[a-f0-9]+$
                  minItems: 1
                  maxItems: 100
                - type: 'null'
            $not_in:
              description: >-
                Excludes any of the values. A string or an array of 1 to 100
                values. Format `lcdef_[a-f0-9]+`.
              oneOf:
                - type: string
                  pattern: ^lcdef_[a-f0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^lcdef_[a-f0-9]+$
                  minItems: 1
                  maxItems: 100
                - type: 'null'
          additionalProperties: false
      required:
        - conditions
      additionalProperties: false
    PointsEarningsReportDailyResponse:
      type: object
      description: Program points-earnings daily report result.
      properties:
        data:
          type: array
          description: >-
            List of report entries, one per aggregation period, earning rule,
            earning item, and card definition with recorded activity, ordered by
            `date` ascending. Empty when no activity was recorded in the range.
          items:
            $ref: '#/components/schemas/PointsEarningsReportDailyEntry'
        object:
          type: string
          const: report
          description: Object type marker. Always `report`.
      required:
        - data
        - object
    PointsEarningsReportDailyEntry:
      description: >-
        Aggregated daily program points-earnings statistics for one period,
        earning rule, earning item, and card definition. All numeric fields
        default to 0.
      allOf:
        - $ref: '#/components/schemas/PointsEarningsReportEntryBase'
        - type: object
          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.
            success_count:
              type: number
              description: >-
                Counts earning operations that credited points or added pending
                points in the period.
            points:
              type: number
              description: >-
                Sums points credited immediately by earning rules in the period.
                Pending points activated in the period are not included.
            pending_points:
              type: number
              description: >-
                Sums pending points added in the period. Activated and canceled
                pending points are not deducted.
            object:
              type: string
              const: program_points_earnings_daily_report
              description: >-
                Object type marker. Always
                `program_points_earnings_daily_report`.
          required:
            - date
            - success_count
            - points
            - pending_points
            - object
    PointsEarningsReportEntryBase:
      type: object
      properties:
        earning_rule_id:
          type: string
          pattern: ^lern_[a-f0-9]+$
          description: Identifies the earning rule (format `lern_...`).
        earning_item_id:
          type: string
          pattern: ^lernei_[a-f0-9]+$
          description: >-
            Identifies the earning item that produced the points (format:
            `lernei_` followed by hexadecimal characters).
        card_definition_id:
          type: string
          pattern: ^lcdef_[a-f0-9]+$
          description: Identifies the card definition (format `lcdef_...`).
      required:
        - earning_rule_id
        - earning_item_id
        - card_definition_id
  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.