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

# Examine rewards

> ⚠️ **BETA endpoint**

This is a work-in-progress documentation of a BETA endpoint. The parameters, fields, request and response bodies, and other data may subject to change. If you want to share feedback or improvements, contact Voucherify support or your Technical Account Manager.

Estimates which rewards a customer can obtain across their loyalty program memberships,
including availability status, points cost and unavailability reasons.




## OpenAPI

````yaml /openapi/loyalties-v2.json post /v2/loyalties/examine/rewards
openapi: 3.1.0
info:
  title: Voucherify Loyalty v2 API
  version: 2.0.0
  description: >-
    Complete OpenAPI specification for the Voucherify Loyalty v2 API.

    All endpoints require the LOYALTY_V2 feature flag.


    Combined from per-domain specs: programs.yaml, members.yaml,
    program-operations.yaml, card-definitions.yaml, earning-rules.yaml,
    tier-structures.yaml, benefits.yaml, rewards.yaml, examine.yaml
servers:
  - url: '{protocol}://{host}'
    variables:
      protocol:
        default: https
        enum:
          - https
          - http
      host:
        default: api.voucherify.io
security:
  - bearerAuth: []
    X-App-Id: []
    X-App-Token: []
tags:
  - name: Programs
    description: >-
      Loyalty program CRUD, lifecycle management, program-scoped resource
      assignments (card definitions, earning rules, rewards, tier structures),
      member management (create, list, get, activate, deactivate, delete), card
      operations (points adjustment, pending points, expiring points,
      transactions), reward purchases, and activity history.
  - name: Card Definitions
    description: >-
      CRUD operations, lifecycle management, and activity history for card
      definitions. Card definitions describe the configuration for loyalty
      cards, including code generation, points expiration, earning/spending
      limits, pending points, refunds, and balance settings.
  - name: Earning Rules
    description: >-
      Manage earning rules that define how customers earn points or receive
      incentives based on triggers (events, segments, custom events). Includes
      CRUD, lifecycle, and activity history.
  - name: Tier Structures
    description: >-
      CRUD operations, lifecycle management, and activity history for tier
      structures. Includes nested tier definitions (create, list, update,
      delete) within tier structures. Tier structures define the tiering model
      for loyalty programs — how members qualify for and move between tiers.
  - name: Benefits
    description: >-
      Manage benefit definitions (fixed points, proportional points, material,
      digital). Includes CRUD, lifecycle transitions, and activity history.
  - name: Rewards
    description: >-
      CRUD, lifecycle operations, and activity history for reward definitions.
      Rewards can be material (product/SKU) or digital (discount coupons, gift
      vouchers).
  - name: Examine
    description: >-
      Evaluation endpoints that estimate earning opportunities and reward
      availability for a customer across their loyalty program memberships,
      without side effects.
paths:
  /v2/loyalties/examine/rewards:
    post:
      tags:
        - Examine
      summary: Examine rewards
      description: >
        ⚠️ **BETA endpoint**


        This is a work-in-progress documentation of a BETA endpoint. The
        parameters, fields, request and response bodies, and other data may
        subject to change. If you want to share feedback or improvements,
        contact Voucherify support or your Technical Account Manager.


        Estimates which rewards a customer can obtain across their loyalty
        program memberships,

        including availability status, points cost and unavailability reasons.
      operationId: examineRewards
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExamineRewardsRequest'
      responses:
        '200':
          description: Rewards examination result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExamineRewardsResponse'
        '400':
          description: >-
            Validation error - request body or query parameters failed
            validation, or the operation is not allowed in the current resource
            state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict - e.g. duplicate resource or invalid state transition.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ExamineRewardsRequest:
      type: object
      description: Request body for examining rewards.
      properties:
        customer_identification:
          $ref: '#/components/schemas/ExamineCustomerIdentification'
        customer:
          type: object
          description: Customer metadata overrides used during examination.
          properties:
            metadata:
              description: Customer metadata overrides. Nullable.
              oneOf:
                - $ref: '#/components/schemas/EarningRuleMetadata'
                - type: 'null'
          additionalProperties: false
        member:
          type: object
          description: Member metadata overrides used during examination.
          properties:
            metadata:
              description: Member metadata overrides. Nullable.
              oneOf:
                - $ref: '#/components/schemas/EarningRuleMetadata'
                - type: 'null'
          additionalProperties: false
      required:
        - customer_identification
      additionalProperties: false
    ExamineRewardsResponse:
      type: object
      description: Rewards examination result.
      properties:
        customer:
          $ref: '#/components/schemas/ExamineCustomerReference'
        rewards:
          type: array
          description: All rewards considered during examination (deduplicated).
          items:
            $ref: '#/components/schemas/ExamineRewardsRewardDetail'
        memberships:
          type: array
          description: Reward opportunities per program membership.
          items:
            $ref: '#/components/schemas/ExamineRewardsMembership'
        object:
          type: string
          const: rewards_examine_result
          description: Object type marker. Always `rewards_examine_result`.
    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: Identifier of the request that produced the error.
    ExamineCustomerIdentification:
      type: object
      description: >
        How the examined customer is identified. Depending on `type`, exactly
        one of `customer_id`, `customer_source_id` or `member_id` is required;
        the other two must not be present.
      properties:
        type:
          type: string
          enum:
            - customer_id
            - customer_source_id
            - member_id
          description: Identification method.
        customer_id:
          type:
            - string
            - 'null'
          pattern: ^cust_[a-zA-Z0-9]+
          description: Customer ID (`cust_...`). Required when `type` is `customer_id`.
        customer_source_id:
          type:
            - string
            - number
            - 'null'
          description: >
            Customer source ID. May be provided as a string or a number.
            Required when `type` is `customer_source_id`.
        member_id:
          type:
            - string
            - 'null'
          pattern: ^lmbr_[a-f0-9]+$
          description: Loyalty member ID (`lmbr_...`). Required when `type` is `member_id`.
      required:
        - type
      additionalProperties: false
      allOf:
        - if:
            required:
              - type
            properties:
              type:
                const: customer_id
          then:
            required:
              - customer_id
            not:
              anyOf:
                - required:
                    - customer_source_id
                - required:
                    - member_id
        - if:
            required:
              - type
            properties:
              type:
                const: customer_source_id
          then:
            required:
              - customer_source_id
            not:
              anyOf:
                - required:
                    - customer_id
                - required:
                    - member_id
        - if:
            required:
              - type
            properties:
              type:
                const: member_id
          then:
            required:
              - member_id
            not:
              anyOf:
                - required:
                    - customer_id
                - required:
                    - customer_source_id
    EarningRuleMetadata:
      type: object
      description: Arbitrary key-value metadata; any JSON object is accepted.
      additionalProperties: true
    ExamineCustomerReference:
      type: object
      description: Customer reference in examine results.
      properties:
        id:
          type: string
          description: Customer ID (`cust_...`).
        source_id:
          type: string
          description: Customer source ID.
        metadata:
          type: object
          description: Customer metadata (empty object when unset).
          additionalProperties: true
        object:
          type: string
          const: customer
          description: Object type marker. Always `customer`.
    ExamineRewardsRewardDetail:
      type: object
      description: Reward detail.
      properties:
        id:
          type: string
          description: Reward ID (`lrew_...`).
        name:
          type: string
          description: Reward name.
        type:
          type: string
          enum:
            - MATERIAL
            - DIGITAL
          description: Reward type.
        metadata:
          type: object
          description: Reward metadata (empty object when unset).
          additionalProperties: true
        object:
          type: string
          const: reward
          description: Object type marker. Always `reward`.
    ExamineRewardsMembership:
      type: object
      description: Reward opportunities for one program membership.
      properties:
        member:
          $ref: '#/components/schemas/ExamineMemberReference'
        program:
          $ref: '#/components/schemas/ExamineProgramReference'
        cards:
          type: array
          description: Reward estimations per card.
          items:
            $ref: '#/components/schemas/ExamineRewardsCardEstimation'
        object:
          type: string
          const: member_rewards_opportunity
          description: Object type marker. Always `member_rewards_opportunity`.
    ExamineMemberReference:
      type: object
      description: Member reference in examine results.
      properties:
        id:
          type: string
          description: Member ID (`lmbr_...`).
        customer_id:
          type: string
          description: Customer ID the member belongs to.
        program_id:
          type: string
          description: Program ID the member belongs to.
        metadata:
          type: object
          description: Member metadata (empty object when unset).
          additionalProperties: true
        object:
          type: string
          const: member
          description: Object type marker. Always `member`.
    ExamineProgramReference:
      type: object
      description: Program reference in examine results.
      properties:
        id:
          type: string
          description: Program ID (`lprg_...`).
        name:
          type: string
          description: Program name.
        metadata:
          type: object
          description: Program metadata (empty object when unset).
          additionalProperties: true
        object:
          type: string
          const: program
          description: Object type marker. Always `program`.
    ExamineRewardsCardEstimation:
      type: object
      description: Reward estimations for a single card.
      properties:
        card:
          $ref: '#/components/schemas/ExamineCardReference'
        rewards:
          type: array
          description: Reward availability estimations for this card.
          items:
            $ref: '#/components/schemas/ExamineRewardsCardRewardEstimation'
        object:
          type: string
          const: card_estimation
          description: Object type marker. Always `card_estimation`.
    ExamineCardReference:
      type: object
      description: Card reference in examine results.
      properties:
        id:
          type: string
          description: Card ID (`lcrd_...`).
        card_definition_id:
          type: string
          description: Card definition ID (`lcdef_...`).
        card_type:
          type: string
          enum:
            - INDIVIDUAL
          description: Card type. Currently only `INDIVIDUAL` exists.
        code:
          type:
            - string
            - 'null'
          description: >
            Card code. May be null right after member creation because card
            codes are generated asynchronously.
        object:
          type: string
          const: card
          description: Object type marker. Always `card`.
    ExamineRewardsCardRewardEstimation:
      type: object
      description: Reward availability estimation for a card.
      properties:
        reward:
          $ref: '#/components/schemas/ExamineRewardsRewardReference'
        status:
          type: string
          enum:
            - AVAILABLE
            - UNAVAILABLE
          description: Whether the reward can currently be obtained with this card.
        cost:
          $ref: '#/components/schemas/ExamineRewardsRewardCost'
          description: Points cost. Absent when no cost applies.
        unavailability_reasons:
          type: array
          description: >-
            Reasons the reward is unavailable. Absent when the reward is
            available.
          items:
            $ref: '#/components/schemas/ExamineRewardsRewardUnavailabilityReason'
        object:
          type: string
          const: reward_estimation
          description: Object type marker. Always `reward_estimation`.
    ExamineRewardsRewardReference:
      type: object
      description: Reward reference.
      properties:
        id:
          type: string
          description: Reward ID (`lrew_...`).
        object:
          type: string
          const: reward
          description: Object type marker. Always `reward`.
    ExamineRewardsRewardCost:
      type: object
      description: Reward cost.
      properties:
        points:
          type: number
          description: Points cost of the reward for this card.
        object:
          type: string
          const: reward_cost
          description: Object type marker. Always `reward_cost`.
    ExamineRewardsRewardUnavailabilityReason:
      type: object
      description: Reason a reward is unavailable.
      properties:
        reason:
          type: string
          enum:
            - insufficient_balance
            - out_of_stock
            - no_matching_cost
            - no_card_for_cost
            - no_target_card
            - reward_inactive
          description: Unavailability reason code.
        details:
          type: string
          description: Additional details. Absent when not provided.
        object:
          type: string
          const: reward_unavailability_reason
          description: Object type marker. Always `reward_unavailability_reason`.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    X-App-Id:
      type: apiKey
      name: X-App-Id
      in: header
    X-App-Token:
      type: apiKey
      name: X-App-Token
      in: header

````