---
title: "Update Loyalty Settings"
method: PUT
path: "/v1/loyalty/{loyalty_settings_id}"
tags: ["Loyalty Program"]
---

# Update Loyalty Settings

`PUT /v1/loyalty/{loyalty_settings_id}`

## Path parameters

- `loyalty_settings_id` string, required

## Request body

- LoyaltySettingsUpdate
  - `name` string
  - `key` string
  - `description` string
  - `image_url` union
    - string, uri
    - ''
  - `custom_icon_url` string, uri
  - `activated_at` integer
  - `end_at` integer
  - `period` integer
  - `repeatable` boolean
  - `requirements_expression` Expression
    - `tokens` Token[]
      - `type` 'attribute' | 'custom_attribute' | 'event_attribute' | 'custom_event_attribute' | 'operator' | 'number' | 'date' | 'string' | 'boolean' | 'list' | 'variable' | 'virtual_currency', required
      - `value` unknown
    - `variables` MathExpression[]
      - `tokens` Token[]
        - `type` 'attribute' | 'custom_attribute' | 'event_attribute' | 'custom_event_attribute' | 'operator' | 'number' | 'date' | 'string' | 'boolean' | 'list' | 'variable' | 'virtual_currency', required
        - `value` unknown
      - `name` string, required
  - `points_rate` number
  - `price_source` 'local_price' | 'base_price' — An enumeration.
  - `excluded_sales_channels` OrderSourceType[], nullable — The list of Order Sources (sales channels) where paid orders will not issue Loyalty Points
  - `show_store_button` boolean

## Response `200`

Successful Response

- LoyaltySettings
  - `name` string, required — The name of the loyalty program
  - `key` string, nullable — External key of the loyalty program
  - `description` string, nullable — A brief description of the loyalty program
  - `image_url` union — The URL of the image associated with the loyalty program
    - string, uri
    - ''
  - `custom_icon_url` string, uri, nullable — Custom icon URL for loyalty points
  - `activated_at` integer, nullable — Timestamp when the program was activated (UNIX time)
  - `end_at` integer, nullable — Timestamp when the program ends (UNIX time)
  - `period` integer, required — The duration of the loyalty program in days
  - `repeatable` boolean — Whether the program is repeatable
  - `requirements_expression` Expression
    - `tokens` Token[]
      - `type` 'attribute' | 'custom_attribute' | 'event_attribute' | 'custom_event_attribute' | 'operator' | 'number' | 'date' | 'string' | 'boolean' | 'list' | 'variable' | 'virtual_currency', required
      - `value` unknown
    - `variables` MathExpression[]
      - `tokens` Token[]
        - `type` 'attribute' | 'custom_attribute' | 'event_attribute' | 'custom_event_attribute' | 'operator' | 'number' | 'date' | 'string' | 'boolean' | 'list' | 'variable' | 'virtual_currency', required
        - `value` unknown
      - `name` string, required
  - `points_rate` number, required — Exchange rate against the dollar
  - `price_source` 'local_price' | 'base_price' — An enumeration.
  - `excluded_sales_channels` OrderSourceType[], nullable — The list of Order Sources (sales channels) where paid orders will not issue Loyalty Points
  - `show_store_button` boolean — Whether to show the 'Go to Store' button in the loyalty program widget
  - `id` string, required — The unique identifier for the loyalty tier
  - `game_id` string, required — The unique identifier of the game the accosiated with the loyalty program

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/aghanim/apis/aghanim-server-to-server-api.md) · [All operations](https://skmtc.net/aghanim/apis/aghanim-server-to-server-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aghanim/aghanim-server-to-server-api/versions/6402c25762c8/schema)
