---
title: "Update a reward"
method: PUT
path: "/v2/loyalties/rewards/{rewardId}"
tags: ["Rewards"]
---

# Update a reward

`PUT /v2/loyalties/rewards/{rewardId}`

<Warning>

<Badge color="yellow">BETA endpoint</Badge>

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](https://www.voucherify.io/contact-support) or your Technical Account Manager.

</Warning>

Updates an existing reward. When `type` is provided as `MATERIAL` the `material`
object is required and `digital` must be null; when `type` is provided as `DIGITAL`
the `digital` object is required and `material` must be null.

In `DRAFT` status all properties can be updated. In `ACTIVE`/`INACTIVE` status only
the following properties can be updated: `name`, `metadata`, `refunds`,
`validity_hours`, `start_date`, `end_date`, `costs`.

## Path parameters

- `id` string, required

## Request body

- RewardUpdateRequest — Request body for updating a reward. All properties are optional. When `type` is provided as `MATERIAL`, `material` is required and `digital` must be null; when `type` is provided as `DIGITAL`, `digital` is required and `material` must be null. In ACTIVE/INACTIVE status only `name`, `metadata`, `refunds`, `validity_hours`, `start_date`, `end_date` and `costs` can be updated.
  - `name` string — Display name of the reward.
  - `type` 'MATERIAL' | 'DIGITAL' — Reward type. Can only be changed while the reward is in DRAFT status.
  - `validity_hours` RewardValidityHoursRequest — Validity hours definition. `type` is required. When `type` is `ANY_TIME`, `daily` must be null; when `type` is `DAILY`, `daily` is required and must contain at least one entry.
    - `type` 'DAILY' | 'ANY_TIME', required — Whether the reward is purchasable at any time or only during specific daily windows.
    - `daily` RewardValidityDailyHoursRequest[] — Daily time windows. Required when `type` is DAILY; must be null when `type` is ANY_TIME.
      - `days_of_week` integer[], required — Days of the week the window applies to, as integers 0-6 (0 = Sunday). Values must be unique.
      - `start_time` string, required — Window start time in `HH:mm` format.
      - `end_time` string, required — Window end time in `HH:mm` format.
  - `start_date` string, date-time — Date from which the reward is available. Must be an ISO-8601 compliant date.
  - `end_date` string, date-time — Date until which the reward is available. Must be an ISO-8601 compliant date.
  - `material` RewardMaterialRequest — Material reward definition. `type` is required. When `type` is `PRODUCT`, `product` is required and `sku` must be null; when `type` is `SKU`, `sku` is required and `product` must be null.
    - `type` 'PRODUCT' | 'SKU', required — Kind of material reward.
    - `product` RewardMaterialProductRequest — Product reference for a material reward.
      - `id` string, required — Product identifier, prefixed with `prod_`.
    - `sku` RewardMaterialSKURequest — SKU reference for a material reward.
      - `product_id` string, required — Identifier of the product the SKU belongs to, prefixed with `prod_`.
      - `id` string, required — SKU identifier, prefixed with `sku_`.
  - `digital` RewardDigitalRequest — Digital reward definition. `type` is required. Exactly the object matching `type` is required and the other two must be null: `DISCOUNT_COUPONS` requires `discount_coupons`, `GIFT_VOUCHERS` requires `gift_vouchers`, `LOYALTY_CARD_POINTS` requires `loyalty_card_points`.
    - `type` 'DISCOUNT_COUPONS' | 'GIFT_VOUCHERS' | 'LOYALTY_CARD_POINTS', required — Kind of digital reward.
    - `discount_coupons` RewardDigitalDiscountCouponsRequest — Discount coupons digital reward configuration.
      - `campaign_id` string, required — Identifier of the discount coupons campaign to publish a coupon from, prefixed with `camp_`.
    - `gift_vouchers` RewardDigitalGiftVouchersRequest — Gift vouchers digital reward configuration.
      - `campaign_id` string, required — Identifier of the gift vouchers campaign to publish a voucher from, prefixed with `camp_`.
      - `balance` number, required — Gift card balance credited when the reward is delivered.
    - `loyalty_card_points` RewardDigitalLoyaltyCardPointsRequest — Loyalty card points digital reward configuration.
      - `points` integer, required — Number of points credited to the member's card when the reward is delivered.
      - `card_definition_id` string, required — Identifier of the card definition to credit points to, prefixed with `lcdef_`.
  - `refunds` RewardRefundsRequest — Refund policy for the reward.
    - `type` 'NONE' | 'REFUNDABLE', required — Whether reward purchases can be refunded.
  - `costs` RewardCostUpdateRequest[] — Point costs of the reward. Include the `id` of an existing cost to update it; omit `id` to create a new cost.
    - `id` string — Identifier of an existing cost to update, prefixed with `lrcst_`. Omit to create a new cost.
    - `rules` RewardCostRulesRequest — Rules group for a reward cost. Contains a required `logic` property plus numbered rule definitions. Every property other than `logic` must be a positive-integer key (`^[1-9]\d*$`) mapping to a rule definition. At least one rule definition is required. No other properties are allowed.
      - `logic` string, required — A logical formula referencing the numbered rule definitions, e.g. `"1 AND 2"`.
    - `spending` RewardCostSpendingRequest[], required — Points to spend on a specific card definition. Exactly one entry is allowed.
      - `points` integer, required — Number of points the member must spend.
      - `card_definition_id` string, required — Identifier of the card definition the points are spent from, prefixed with `lcdef_`.
  - `metadata` unknown

## Response `200`

The updated reward.

- RewardResponse — A reward, as returned by the API.
  - `id` string, required — Unique reward identifier, prefixed with `lrew_`.
  - `name` string, required — Display name of the reward.
  - `type` 'MATERIAL' | 'DIGITAL', required — Reward type.
  - `status` 'ACTIVE' | 'DRAFT' | 'INACTIVE' | 'DELETED', required — Current lifecycle status of the reward.
  - `start_date` string, date-time — Date from which the reward is available, or null when not set.
  - `end_date` string, date-time — Date until which the reward is available, or null when not set.
  - `validity_hours` RewardValidityHoursResponse, required — Validity hours. `daily` is present only when `type` is DAILY; omitted otherwise.
    - `type` 'DAILY' | 'ANY_TIME', required — Whether the reward is purchasable at any time or only during specific daily windows.
    - `daily` RewardValidityDailyHoursResponse[] — Daily time windows. Present only when `type` is DAILY.
      - `days_of_week` integer[], required — Days of the week the window applies to, as integers 0-6 (0 = Sunday).
      - `start_time` string, required — Window start time in `HH:mm` format.
      - `end_time` string, required — Window end time in `HH:mm` format.
  - `material` RewardMaterialResponse — Material reward definition.
    - `type` 'PRODUCT' | 'SKU', required — Kind of material reward.
    - `product` RewardMaterialProductResponse — Product reference.
      - `id` string, required — Product identifier, prefixed with `prod_`.
    - `sku` RewardMaterialSKUResponse — SKU reference.
      - `product_id` string, required — Identifier of the product the SKU belongs to, prefixed with `prod_`.
      - `id` string, required — SKU identifier, prefixed with `sku_`.
  - `digital` RewardDigitalResponse — Digital reward definition. Only the object matching `type` is present; the others are omitted.
    - `type` 'DISCOUNT_COUPONS' | 'GIFT_VOUCHERS' | 'LOYALTY_CARD_POINTS', required — Kind of digital reward.
    - `discount_coupons` RewardDigitalDiscountCouponsResponse — Discount coupons configuration.
      - `campaign_id` string, required — Identifier of the discount coupons campaign, prefixed with `camp_`.
    - `gift_vouchers` RewardDigitalGiftVouchersResponse — Gift vouchers configuration.
      - `campaign_id` string, required — Identifier of the gift vouchers campaign, prefixed with `camp_`.
      - `balance` number, required — Gift card balance credited when the reward is delivered.
    - `loyalty_card_points` RewardDigitalLoyaltyCardPointsResponse — Loyalty card points configuration.
      - `points` integer, required — Number of points credited when the reward is delivered.
      - `card_definition_id` string, required — Identifier of the card definition points are credited to, prefixed with `lcdef_`.
  - `refunds` RewardRefundsResponse, required — Refund policy.
    - `type` 'NONE' | 'REFUNDABLE', required — Whether reward purchases can be refunded. Defaults to NONE.
  - `costs` RewardCostResponse[], required — Point costs of the reward. Empty array when no costs are defined.
    - `id` string, required — Unique cost identifier, prefixed with `lrcst_`.
    - `rules` RewardCostRuleGroupResponse — Rules group. Contains a `logic` formula string plus numbered rule definition properties (positive-integer keys).
      - `logic` string — Logical formula combining the numbered rule definitions, e.g. `"1 AND 2"`.
    - `spending` RewardCostSpendingResponse[] — Points spending definitions, or null when none are defined.
      - `points` integer, required — Number of points the member must spend.
      - `card_definition_id` string, required — Identifier of the card definition the points are spent from, prefixed with `lcdef_`.
  - `metadata` object, required — Arbitrary key-value metadata attached to the reward. Empty object when not set.
  - `created_at` string, date-time, required — Timestamp when the reward was created (ISO-8601).
  - `updated_at` string, date-time — Timestamp when the reward was last updated (ISO-8601), or null when never updated.
  - `object` string, required — Object type marker; always `reward`.

## Other responses

- `400` — Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.
- `404` — Resource not found.
- `409` — Conflict - e.g. duplicate resource or invalid state transition.
- `500` — Internal server error.

---

[API](https://skmtc.net/voucherifyio/apis/voucherify-api-async-actions.md) · [All operations](https://skmtc.net/voucherifyio/apis/voucherify-api-async-actions/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/voucherifyio/voucherify-api-async-actions/versions/4982266e0494/schema)
