---
title: "Update program"
method: PUT
path: "/v2/loyalties/programs/{programId}"
tags: ["Programs"]
---

# Update program

`PUT /v2/loyalties/programs/{programId}`

<Info>

<Badge color="gray">Documentation in progress</Badge>

This documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.

</Info>

Updates a loyalty program. When the program is not in `DRAFT` status, only `name` and
`metadata` may be changed (other properties are restricted after leaving draft).

## Path parameters

- `id` string, required

## Request body

- ProgramUpdateRequest — Payload for updating a loyalty program. All properties are optional. When the program is not in `DRAFT` status, only `name` and `metadata` may be changed.
  - `name` string — Program name.
  - `start_date` string, date-time, nullable — Program validity start date, in ISO 8601 date-time format.
  - `end_date` string, date-time, nullable — Program validity end date, in ISO 8601 date-time format.
  - `validity_hours` ProgramValidityHoursUpsert — Validity hours configuration. When `type` is `ANY_TIME`, `daily` must be omitted or `null`. When `type` is `DAILY`, `daily` is required and must contain at least one window.
    - `type` 'DAILY' | 'ANY_TIME', required — Validity hours mode. `ANY_TIME` means the program is always valid; `DAILY` restricts validity to configured daily windows.
    - `daily` ProgramValidityDailyHoursUpsert[], nullable — Daily validity windows. Required when `type` is `DAILY`; must be null/omitted when `type` is `ANY_TIME`.
      - `days_of_week` integer[], required — Days of week the window applies to. 0 = Sunday through 6 = Saturday. Items must be unique.
      - `start_time` string, required — Window start time in `HH:mm` format. If seconds are provided, they are ignored.
      - `end_time` string, required — Window end time in `HH:mm` format. If seconds are provided, they are ignored.
  - `metadata` object, nullable — Arbitrary key-value metadata. Validated against the `vl_program` metadata schema definition of the project.

## Response `200`

The updated program.

- Program — A loyalty program.
  - `id` string — Unique program identifier.
  - `name` string — Program name.
  - `status` 'DRAFT' | 'ACTIVE' | 'INACTIVE' | 'DELETED' — Program status.
  - `start_date` string, date-time, nullable — Program validity start date (ISO 8601), or `null` when not set.
  - `end_date` string, date-time, nullable — Program validity end date (ISO 8601), or `null` when not set.
  - `validity_hours` ProgramValidityHours — Validity hours configuration of the program.
    - `type` 'DAILY' | 'ANY_TIME' — Validity hours mode.
    - `daily` ProgramValidityDailyHours[] — Daily validity windows. Present only when `type` is `DAILY`.
      - `days_of_week` integer[] — Days of week the window applies to. 0 = Sunday through 6 = Saturday.
      - `start_time` string — Window start time in `HH:mm` format.
      - `end_time` string — Window end time in `HH:mm` format.
  - `metadata` object — Arbitrary key-value metadata. Defaults to `{}`.
  - `created_at` string, date-time — Creation timestamp (ISO 8601).
  - `updated_at` string, date-time, nullable — Last update timestamp (ISO 8601), or `null` when never updated.
  - `object` 'program' — Object type marker.

## 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-loyalty-v2-api.md) · [All operations](https://skmtc.net/voucherifyio/apis/voucherify-loyalty-v2-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/voucherifyio/voucherify-loyalty-v2-api/revisions/69be73b5cff0/schema)
