> ## 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.



## 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_` followed by
          hexadecimal characters.
        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.
      operationId: getProgramPointsEarningsDailyReport
      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: >-
            Filters rows by earning rule ID and card definition ID. Each field
            takes a `conditions` object. Omitting `filters` or setting it to
            `null` applies no field filters.
          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: >-
            Combines 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 rows by earning rule ID.
          oneOf:
            - $ref: >-
                #/components/schemas/PointsEarningsReportFilterEarningRuleIdConditions
            - type: 'null'
        card_definition_id:
          description: Filters rows by card definition ID.
          oneOf:
            - $ref: >-
                #/components/schemas/PointsEarningsReportFilterCardDefinitionIdConditions
            - 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.
    PointsEarningsReportFilterEarningRuleIdConditions:
      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
    PointsEarningsReportFilterCardDefinitionIdConditions:
      type: object
      description: >-
        ID filter conditions for card definition ID. 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
          additionalProperties: false
          properties:
            $is:
              description: Matches rows whose card definition id equals the given value.
              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: >-
                Matches rows whose card definition id does not equal the given
                value.
              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 rows whose card definition id is one of the given
                values.
              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: >-
                Matches rows whose card definition id is not one of the given
                values.
              oneOf:
                - type: string
                  pattern: ^lcdef_[a-f0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^lcdef_[a-f0-9]+$
                  minItems: 1
                  maxItems: 100
                - type: 'null'
      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:
      type: object
      description: >-
        Aggregated daily program points-earnings statistics for one period,
        earning rule, earning item, and card definition. 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_...`).
        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_...`).
        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
        - earning_rule_id
        - earning_item_id
        - card_definition_id
        - success_count
        - points
        - pending_points
        - 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.