Skip to main content
PATCH
Update a program
Updates a program’s configuration; omitted fields stay unchanged.
  • Status changes: Setting status to SUSPENDED or ARCHIVED preserves data but stops event processing (ingested events fail asynchronously with program_inactive). ARCHIVED programs are hidden from default list responses and accept only name, description, status, folder_id, external_id, and metadata changes (409 program_archived otherwise).
  • Folder and labels: Pass an active folder_id (or null for top level) to move the program without affecting its linked assets, balances, or rules. Programs in an archived folder cannot be set to ACTIVE or SUSPENDED (409 program_folder_archived). metadata replaces all existing labels (send {} to clear), and "external_id": null clears the external ID.
  • Redemption targets: Setting redemption_target_type to LEDGER_ENTITY requires redemption_target_entity_id (the target group or program’s ledger_entity_id). SYSTEM_REDEMPTION and SYSTEM_BREAKAGE clear any stored target entity. Target changes apply only to future redemptions.

Gift-card limits

Set fulfillment_max_face_value_minor, fulfillment_participant_max_count, fulfillment_participant_max_amount_minor, and fulfillment_participant_window_seconds to cap per-card value and rolling per-participant gift-card spend (amounts are in currency minor units, counted per currency; send null to remove a limit). Rolling limits count pending, processing, awaiting-funds, and succeeded fulfillments; failed and cancelled fulfillments do not count. Setting either participant limit requires fulfillment_participant_window_seconds between 1 and 31536000 (365 days), returning 422 fulfillment_cap_window_required or 422 fulfillment_cap_window_too_long otherwise. Scrip enforces these caps before holding points when redeeming a gift card.
For examples, see the Programs guide, Redemption targets, and Gift cards.

Authorizations

Authorization
string
header
default:sk_...
required

Send your API key as Authorization: Bearer <key>.

Path Parameters

program_id
string<uuid>
required

Program ID

Body

application/json

Fields to update

Changes a program. Send at least one field.

description
string

Program description

Maximum string length: 1000
Example:

"Updated description"

external_id
string | null

External identifier, unique per organization (send null to clear).

Example:

"store-101"

folder_id
string<uuid> | null

Active folder UUID to move the program into (send null for top level).

Example:

"2c4e6a80-b1d3-4f57-8a92-c3e5a7b9d134"

fulfillment_max_face_value_minor
integer | null

Maximum face value of a single gift-card redemption in fiat minor units (null clears the limit).

Example:

10000

fulfillment_participant_max_amount_minor
integer | null

Maximum total gift-card face value per participant in the rolling period, in fiat minor units (null clears the limit).

Example:

25000

fulfillment_participant_max_count
integer | null

Maximum gift-card redemptions per participant in the rolling period (null clears the limit).

Example:

3

fulfillment_participant_window_seconds
integer | null

Rolling period, in seconds, used for each participant's gift-card limits. Send null to clear it. Required if either limit remains set after this update.

Example:

86400

metadata
object

Key-value string labels; replaces all existing labels (send {} to clear).

name
string

A new name for the program. It must be unique among the programs in the same folder, or among the top-level programs.

Required string length: 1 - 255
Example:

"Acme Rewards"

on_unknown_participant
enum<string>

How to handle events for unregistered participants

Available options:
CREATE,
REJECT
Example:

"REJECT"

pending_redemption_ttl
string | null

Optional program-specific bound between 60 seconds and one year. Explicit null clears it; without a request or program bound, pending redemptions default to 90 days.

Example:

"24h"

redemption_target_entity_id
string<uuid>

The ledger_entity_id of the active group or program whose wallet receives redeemed value (required when redemption_target_type is LEDGER_ENTITY; omit otherwise).

Example:

"5e7a9c13-2d4f-4b68-9a0c-e1b3d5f7a920"

redemption_target_type
enum<string>

Where redeemed value is posted (SYSTEM_REDEMPTION, SYSTEM_BREAKAGE, or LEDGER_ENTITY).

Available options:
SYSTEM_REDEMPTION,
SYSTEM_BREAKAGE,
LEDGER_ENTITY
Example:

"LEDGER_ENTITY"

status
enum<string>

Lifecycle state. A program in an ARCHIVED folder cannot be set to ACTIVE or SUSPENDED. Restore the folder first.

Available options:
ACTIVE,
SUSPENDED,
ARCHIVED
Example:

"SUSPENDED"

Response

Updated program

A rewards program: the container for assets, rules and participants.

created_at
string<date-time>

When the program was created

Example:

"2027-01-15T10:30:00Z"

deleted_at
string<date-time>

Set when the program is archived

Example:

"2027-01-15T10:30:00Z"

description
string

Optional program description

Example:

"Quarterly sales incentive program"

external_id
string

External identifier, unique per organization (absent when unset).

Example:

"store-101"

folder_id
string<uuid>

Parent folder UUID (absent for top-level programs).

Example:

"2c4e6a80-b1d3-4f57-8a92-c3e5a7b9d134"

fulfillment_max_face_value_minor
integer

Maximum face value of a single gift-card redemption in fiat minor units. Absent when unlimited.

Example:

10000

fulfillment_participant_max_amount_minor
integer

Maximum total gift-card face value per participant in the rolling period, in fiat minor units. Absent when unlimited.

Example:

25000

fulfillment_participant_max_count
integer

Maximum gift-card redemptions per participant in the rolling period. Absent when unlimited.

Example:

3

fulfillment_participant_window_seconds
integer

Rolling period, in seconds, used for each participant's gift-card limits. Present only when at least one limit is set.

Example:

86400

id
string<uuid>

The id of the program. Use it in program_id fields and paths.

Example:

"8f14e45f-ceea-4e70-9df8-2a7d1b3c9f01"

ledger_entity_id
string<uuid>

The id of the program's wallet. Send it as redemption_target_entity_id on a program to post redeemed value to this program's wallet. It is not the program's id.

Example:

"5e7a9c13-2d4f-4b68-9a0c-e1b3d5f7a920"

metadata
object

Key-value string labels attached to this program (empty object when none).

Example:
name
string

The name of the rewards program.

Example:

"Acme Rewards"

on_unknown_participant
string

How events for unregistered participants are handled

Example:

"CREATE"

pending_redemption_ttl
string

Optional program-specific bound between 60 seconds and one year. Without a request or program bound, pending redemptions default to 90 days.

Example:

"24h"

redemption_target_entity_id
string<uuid>

The ledger_entity_id of the group or program whose wallet receives redeemed value. Present only when redemption_target_type is LEDGER_ENTITY.

Example:

"5e7a9c13-2d4f-4b68-9a0c-e1b3d5f7a920"

redemption_target_type
enum<string>

Where redeemed value is posted.

Available options:
SYSTEM_REDEMPTION,
SYSTEM_BREAKAGE,
LEDGER_ENTITY
Example:

"SYSTEM_REDEMPTION"

status
enum<string>

The rewards program's lifecycle state.

Available options:
ACTIVE,
SUSPENDED,
ARCHIVED
Example:

"ACTIVE"

updated_at
string<date-time>

When the program was last modified

Example:

"2027-01-15T10:30:00Z"