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

# Update a reward

> ⚠️ **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.

Updates an existing reward. All properties are optional.
In DRAFT status all properties can be updated.
In ACTIVE or INACTIVE status only `name` and `metadata` are allowed.
When changing `type`, the matching sub-configuration must be supplied
and the previous one is reset to null.




## OpenAPI

````yaml /openapi/loyalties-v2.json put /v2/loyalties/rewards/{id}
openapi: 3.1.0
info:
  title: Voucherify Loyalty v2 API
  version: 2.0.0
  description: >-
    Complete API documentation for Voucherify Loyalty v2 system. Requires
    LOYALTY_V2 feature flag.
servers:
  - url: https://api.voucherify.io
    description: Production
security:
  - bearerAuth: []
    X-App-Id: []
    X-App-Token: []
tags:
  - 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: 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: 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: Incentives
    description: >-
      Manage incentive 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: Examines the earning of loyalty points for a loyalty program member.
paths:
  /v2/loyalties/rewards/{id}:
    put:
      tags:
        - Rewards
      summary: Update a reward
      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.


        Updates an existing reward. All properties are optional.

        In DRAFT status all properties can be updated.

        In ACTIVE or INACTIVE status only `name` and `metadata` are allowed.

        When changing `type`, the matching sub-configuration must be supplied

        and the previous one is reset to null.
      operationId: updateReward
      parameters:
        - $ref: '#/components/parameters/RewardId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VLRewardUpdateAPIParams'
      responses:
        '200':
          description: Updated reward.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VLRewardDTO'
        '400':
          description: Invalid payload or restricted property update in non-draft status.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Reward or referenced resource not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    RewardId:
      name: id
      in: path
      required: true
      description: Unique reward identifier.
      schema:
        type: string
  schemas:
    VLRewardUpdateAPIParams:
      type: object
      description: |
        Payload for updating a reward. All fields are optional.
        In ACTIVE/INACTIVE status only `name` and `metadata` may be updated.
        Supplying `type` resets the non-matching sub-configuration to null.
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 200
          description: Reward display name.
        type:
          type: string
          enum:
            - MATERIAL
            - DIGITAL
          description: Reward type.
        material:
          oneOf:
            - $ref: '#/components/schemas/VLRewardMaterialAPIParams'
            - type: 'null'
          description: Required when type is MATERIAL.
        digital:
          oneOf:
            - $ref: '#/components/schemas/VLRewardDigitalAPIParams'
            - type: 'null'
          description: Required when type is DIGITAL.
        metadata:
          oneOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
          description: Key-value metadata. Merged with existing metadata on update.
      additionalProperties: false
    VLRewardDTO:
      type: object
      description: Reward resource representation.
      properties:
        id:
          type: string
          description: Unique reward identifier.
        name:
          type: string
          description: Reward display name.
        type:
          type: string
          enum:
            - MATERIAL
            - DIGITAL
          description: Reward type.
        status:
          type: string
          enum:
            - ACTIVE
            - DRAFT
            - INACTIVE
            - DELETED
          description: Current lifecycle status.
        material:
          $ref: '#/components/schemas/VLRewardMaterialDTO'
          description: Material configuration. Present only when type is MATERIAL.
        digital:
          $ref: '#/components/schemas/VLRewardDigitalDTO'
          description: Digital configuration. Present only when type is DIGITAL.
        metadata:
          type: object
          additionalProperties: true
          description: Key-value metadata.
        created_at:
          type: string
          format: date-time
          description: ISO 8601 creation timestamp.
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
          description: ISO 8601 last-update timestamp. Null if never updated.
        object:
          type: string
          const: reward
      required:
        - id
        - name
        - type
        - status
        - metadata
        - created_at
        - updated_at
        - object
    ErrorResponse:
      type: object
      description: Standard error response.
      properties:
        code:
          type: integer
          description: HTTP status code.
        key:
          type: string
          description: Machine-readable error key.
        message:
          type: string
          description: Human-readable error message.
        details:
          type: string
          description: Additional error details.
        request_id:
          type:
            - string
            - 'null'
          description: Request identifier for tracing.
        resource_id:
          type: string
          description: Related resource identifier (when applicable).
        resource_type:
          type: string
          description: Related resource type (when applicable).
      required:
        - code
        - key
        - message
    VLRewardMaterialAPIParams:
      type: object
      description: Material reward configuration for create/update.
      properties:
        type:
          type: string
          enum:
            - PRODUCT
            - SKU
          description: Material sub-type.
        product:
          oneOf:
            - $ref: '#/components/schemas/VLRewardMaterialProductAPIParams'
            - type: 'null'
          description: Required when material type is PRODUCT. Must be null when SKU.
        sku:
          oneOf:
            - $ref: '#/components/schemas/VLRewardMaterialSKUAPIParams'
            - type: 'null'
          description: Required when material type is SKU. Must be null when PRODUCT.
      required:
        - type
      additionalProperties: false
    VLRewardDigitalAPIParams:
      type: object
      description: Digital reward configuration for create/update.
      properties:
        type:
          type: string
          enum:
            - DISCOUNT_COUPONS
            - GIFT_VOUCHERS
          description: Digital sub-type.
        discount_coupons:
          oneOf:
            - $ref: '#/components/schemas/VLRewardDigitalDiscountCouponsAPIParams'
            - type: 'null'
          description: Required when type is DISCOUNT_COUPONS.
        gift_vouchers:
          oneOf:
            - $ref: '#/components/schemas/VLRewardDigitalGiftVouchersAPIParams'
            - type: 'null'
          description: Required when type is GIFT_VOUCHERS.
      required:
        - type
      additionalProperties: false
    Metadata:
      type: object
      description: Custom key-value metadata.
      additionalProperties: true
    VLRewardMaterialDTO:
      type: object
      description: Material reward configuration.
      properties:
        type:
          type: string
          enum:
            - PRODUCT
            - SKU
          description: Material sub-type.
        product:
          $ref: '#/components/schemas/VLRewardMaterialProductDTO'
          description: Present when material type is PRODUCT.
        sku:
          $ref: '#/components/schemas/VLRewardMaterialSKUDTO'
          description: Present when material type is SKU.
      required:
        - type
    VLRewardDigitalDTO:
      type: object
      description: Digital reward configuration.
      properties:
        type:
          type: string
          enum:
            - DISCOUNT_COUPONS
            - GIFT_VOUCHERS
          description: Digital sub-type.
        discount_coupons:
          $ref: '#/components/schemas/VLRewardDigitalDiscountCouponsDTO'
          description: Present when digital type is DISCOUNT_COUPONS.
        gift_vouchers:
          $ref: '#/components/schemas/VLRewardDigitalGiftVouchersDTO'
          description: Present when digital type is GIFT_VOUCHERS.
      required:
        - type
    VLRewardMaterialProductAPIParams:
      type: object
      properties:
        id:
          type: string
          description: Product identifier.
      required:
        - id
      additionalProperties: false
    VLRewardMaterialSKUAPIParams:
      type: object
      properties:
        product_id:
          type: string
          description: Parent product identifier.
        id:
          type: string
          description: SKU identifier.
      required:
        - product_id
        - id
      additionalProperties: false
    VLRewardDigitalDiscountCouponsAPIParams:
      type: object
      properties:
        campaign_id:
          type: string
          description: >-
            Discount-coupons campaign ID. The campaign must be of type
            DISCOUNT_COUPONS.
      required:
        - campaign_id
      additionalProperties: false
    VLRewardDigitalGiftVouchersAPIParams:
      type: object
      properties:
        campaign_id:
          type: string
          description: >-
            Gift-vouchers campaign ID. The campaign must be of type
            GIFT_VOUCHERS.
        balance:
          type: number
          minimum: 0
          description: Gift voucher balance. Must be a non-negative number.
      required:
        - campaign_id
        - balance
      additionalProperties: false
    VLRewardMaterialProductDTO:
      type: object
      properties:
        id:
          type: string
          description: Product identifier.
      required:
        - id
    VLRewardMaterialSKUDTO:
      type: object
      properties:
        product_id:
          type: string
          description: Parent product identifier.
        id:
          type: string
          description: SKU identifier.
      required:
        - product_id
        - id
    VLRewardDigitalDiscountCouponsDTO:
      type: object
      properties:
        campaign_id:
          type: string
          description: Linked discount-coupons campaign identifier.
      required:
        - campaign_id
    VLRewardDigitalGiftVouchersDTO:
      type: object
      properties:
        campaign_id:
          type: string
          description: Linked gift-vouchers campaign identifier.
        balance:
          type: number
          minimum: 0
          description: Gift voucher balance amount.
      required:
        - campaign_id
        - balance
  responses:
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  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

````