> ## 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 rewards spendings summary reports

> Returns all-time points spent on reward purchases for the program. Each row covers one reward, reward cost, reward spending, and card definition with an approved point spend. Filters rows by reward, cost, spending, and card definition. Returns at most 100 rows, ordered by `id` descending. `limit` and `order` are not query parameters. A filter that matches no rows returns an empty `data` array.

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/rewards/spendings/summary
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/rewards/spendings/summary:
    parameters:
      - name: programId
        in: path
        required: true
        description: >-
          Identifies the loyalty program (`lprg_` followed by hexadecimal
          characters).
        schema:
          type: string
    get:
      tags:
        - Programs
      summary: List program rewards spendings summary reports
      description: >-
        Returns all-time points spent on reward purchases for the program. Each
        row covers one reward, reward cost, reward spending, and card definition
        with an approved point spend. Filters rows by reward, cost, spending,
        and card definition. Returns at most 100 rows, ordered by `id`
        descending. `limit` and `order` are not query parameters. A filter that
        matches no rows returns an empty `data` array.


        Returns `400` when query validation fails. Returns `404` when the
        program does not exist.
      operationId: listProgramRewardsSpendingsSummaryReports
      parameters:
        - name: filters
          in: query
          required: false
          style: deepObject
          explode: true
          description: >-
            Filters rows by field conditions, e.g.
            `filters[reward_id][conditions][$is]=lrew_...`.
          schema:
            $ref: '#/components/schemas/RewardsSpendingsReportListFilters'
      responses:
        '200':
          description: Program rewards spendings summary report.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/LoyaltiesProgramsReportsRewardsSpendingsSummaryListResponseBody
              examples:
                Summary rewards spendings report:
                  value:
                    data:
                      - id: lprss_132f26b7ec8e8d4272
                        reward_id: lrew_1294cebb458e4904a0
                        cost_id: lrcst_1294cebb43ce49049f
                        spending_id: lrspn_132f26b3a10b1cc4ca
                        card_definition_id: lcdef_128f4a88414c4bed69
                        success_count: 1
                        points: 500
                        object: program_rewards_spendings_summary_report
                      - id: lprss_132f2695310e8d423f
                        reward_id: lrew_1294cebb458e4904a0
                        cost_id: lrcst_1294cebb43ce49049f
                        spending_id: lrspn_132f2669bf4b1cc455
                        card_definition_id: lcdef_128f4a88414c4bed69
                        success_count: 1
                        points: 500
                        object: program_rewards_spendings_summary_report
                      - id: lprss_132d80d5d3116617af
                        reward_id: lrew_1294cebb458e4904a0
                        cost_id: lrcst_1294cebb43ce49049f
                        spending_id: lrspn_4a004fb92d3376f332
                        card_definition_id: lcdef_128f4a88414c4bed69
                        success_count: 1
                        points: 500
                        object: program_rewards_spendings_summary_report
                    object: report
                Empty rewards spendings summary report:
                  value:
                    data: []
                    object: report
        '400':
          description: Query parameters failed validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                'Invalid query parameters: `reward_id` is invalid':
                  value:
                    code: 400
                    key: invalid_query_params
                    message: Invalid query params
                    details: >-
                      Property .filters.reward_id.conditions.$is must match
                      pattern "^lrew_[a-f0-9]+$"
                    request_id: v-131e4b76ad2e098951
        '404':
          description: Program not found.
          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_128f58429fc4bf7b2
                    request_id: v-131e4b76ad2e098952
                    resource_id: lprg_128f58429fc4bf7b2
                    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-131e4b76ad2e098953
                    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:
    RewardsSpendingsReportListFilters:
      type: object
      description: Filters for program rewards spendings reports.
      properties:
        junction:
          description: >-
            Sets the logical junction between the field filters. Defaults to
            `AND`.
          oneOf:
            - type: string
              enum:
                - AND
                - OR
            - type: 'null'
        reward_id:
          description: Filters by reward ID.
          oneOf:
            - $ref: '#/components/schemas/RewardsReportFilterRewardIdConditions'
            - type: 'null'
        card_definition_id:
          description: Filters by card definition ID.
          oneOf:
            - $ref: >-
                #/components/schemas/SpendingReportFilterCardDefinitionIdConditions
            - type: 'null'
        cost_id:
          description: Filters by reward cost ID.
          oneOf:
            - $ref: >-
                #/components/schemas/RewardsSpendingsReportFilterCostIdConditions
            - type: 'null'
        spending_id:
          description: Filters by reward spending ID.
          oneOf:
            - $ref: >-
                #/components/schemas/RewardsSpendingsReportFilterSpendingIdConditions
            - type: 'null'
      additionalProperties: false
    LoyaltiesProgramsReportsRewardsSpendingsSummaryListResponseBody:
      type: object
      title: Loyalties Programs Reports Rewards Spendings Summary List Response Body
      description: >-
        Response body schema for **GET**
        `/v2/loyalties/programs/{programId}/reports/rewards/spendings/summary`.
      properties:
        data:
          type: array
          description: >-
            List of summary rows, one per reward, cost, spending, and card
            definition with an approved point spend, ordered by `id` descending.
            Contains at most 100 rows. Empty when no approved point spend was
            recorded.
          items:
            $ref: '#/components/schemas/RewardsSpendingsReportSummaryEntry'
        object:
          type: string
          const: report
          description: Object type marker. Always `report`.
      required:
        - data
        - object
    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.
    RewardsReportFilterRewardIdConditions:
      type: object
      description: >-
        ID filter conditions for reward ID. Values must match pattern
        `^lrew_[a-f0-9]+$`. `$is` and `$is_not` accept a single value (string or
        1-element array). `$in` and `$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 reward ID equals the given value.
              oneOf:
                - type: string
                  pattern: ^lrew_[a-f0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^lrew_[a-f0-9]+$
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $is_not:
              description: Matches rows whose reward ID does not equal the given value.
              oneOf:
                - type: string
                  pattern: ^lrew_[a-f0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^lrew_[a-f0-9]+$
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $in:
              description: Matches rows whose reward ID is one of the given values.
              oneOf:
                - type: string
                  pattern: ^lrew_[a-f0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^lrew_[a-f0-9]+$
                  minItems: 1
                  maxItems: 100
                - type: 'null'
            $not_in:
              description: Matches rows whose reward ID is not one of the given values.
              oneOf:
                - type: string
                  pattern: ^lrew_[a-f0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^lrew_[a-f0-9]+$
                  minItems: 1
                  maxItems: 100
                - type: 'null'
      required:
        - conditions
      additionalProperties: false
    SpendingReportFilterCardDefinitionIdConditions:
      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
          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
    RewardsSpendingsReportFilterCostIdConditions:
      type: object
      description: >-
        ID filter conditions for reward cost ID. Values must match pattern
        `^lrcst_[a-f0-9]+$`. `$is` and `$is_not` accept a single value (string
        or 1-element array). `$in` and `$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 reward cost ID equals the given value.
              oneOf:
                - type: string
                  pattern: ^lrcst_[a-f0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^lrcst_[a-f0-9]+$
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $is_not:
              description: >-
                Matches rows whose reward cost ID does not equal the given
                value.
              oneOf:
                - type: string
                  pattern: ^lrcst_[a-f0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^lrcst_[a-f0-9]+$
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $in:
              description: Matches rows whose reward cost ID is one of the given values.
              oneOf:
                - type: string
                  pattern: ^lrcst_[a-f0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^lrcst_[a-f0-9]+$
                  minItems: 1
                  maxItems: 100
                - type: 'null'
            $not_in:
              description: >-
                Matches rows whose reward cost ID is not one of the given
                values.
              oneOf:
                - type: string
                  pattern: ^lrcst_[a-f0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^lrcst_[a-f0-9]+$
                  minItems: 1
                  maxItems: 100
                - type: 'null'
      required:
        - conditions
      additionalProperties: false
    RewardsSpendingsReportFilterSpendingIdConditions:
      type: object
      description: >-
        ID filter conditions for reward spending ID. Values must match pattern
        `^lrspn_[a-f0-9]+$`. `$is` and `$is_not` accept a single value (string
        or 1-element array). `$in` and `$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 reward spending ID equals the given value.
              oneOf:
                - type: string
                  pattern: ^lrspn_[a-f0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^lrspn_[a-f0-9]+$
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $is_not:
              description: >-
                Matches rows whose reward spending ID does not equal the given
                value.
              oneOf:
                - type: string
                  pattern: ^lrspn_[a-f0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^lrspn_[a-f0-9]+$
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $in:
              description: >-
                Matches rows whose reward spending ID is one of the given
                values.
              oneOf:
                - type: string
                  pattern: ^lrspn_[a-f0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^lrspn_[a-f0-9]+$
                  minItems: 1
                  maxItems: 100
                - type: 'null'
            $not_in:
              description: >-
                Matches rows whose reward spending ID is not one of the given
                values.
              oneOf:
                - type: string
                  pattern: ^lrspn_[a-f0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^lrspn_[a-f0-9]+$
                  minItems: 1
                  maxItems: 100
                - type: 'null'
      required:
        - conditions
      additionalProperties: false
    RewardsSpendingsReportSummaryEntry:
      type: object
      description: >-
        All-time points spent on one reward cost and spending for one card
        definition. Counts and points that did not occur are 0.
      properties:
        id:
          type: string
          pattern: ^lprss_[a-f0-9]+$
          description: >-
            Identifies the summary row (format: `lprss_` followed by hexadecimal
            characters).
        reward_id:
          type: string
          pattern: ^lrew_[a-f0-9]+$
          description: Identifies the reward (`lrew_...`).
        cost_id:
          type: string
          pattern: ^lrcst_[a-f0-9]+$
          description: Identifies the reward cost (`lrcst_...`).
        spending_id:
          type: string
          pattern: ^lrspn_[a-f0-9]+$
          description: Identifies the reward spending (`lrspn_...`).
        card_definition_id:
          type: string
          pattern: ^lcdef_[a-f0-9]+$
          description: Identifies the card definition (`lcdef_...`).
        success_count:
          type: number
          description: Counts approved reward point spends.
        points:
          type: number
          description: Totals points spent on those reward spends.
        object:
          type: string
          const: program_rewards_spendings_summary_report
          description: >-
            Object type marker. Always
            `program_rewards_spendings_summary_report`.
      required:
        - id
        - reward_id
        - cost_id
        - spending_id
        - card_definition_id
        - success_count
        - 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.