Skip to content

Update loyalty program

Requires ADMIN.

projectId
required
string

Project (tenant) identifier. Row-level tenant isolation is enforced on every query.

id
required
string
Media typeapplication/json
object
>= 1 properties
name
string
>= 1 characters <= 120 characters
pointCurrency
string
>= 1 characters <= 32 characters
pointsPerCurrency
integer
>= 1
expiryDays
integer | null
>= 1
monthlyIssueBudget
integer | null
>= 1
status
string
Allowed values: active paused archived

Updated program.

Media typeapplication/json
object
program
object
id
string
projectId
string
name
string
pointCurrency
string
pointsPerCurrency
integer
expiryDays
integer | null
monthlyIssueBudget
integer | null
status
string
Allowed values: active paused archived
createdAt
string
updatedAt
string

Missing/invalid path input (e.g. projectId) or invalid JSON body.

Media typeapplication/json
object
error
required

Human-readable error message.

string
message
string
Examplegenerated
json
{
"error": "example",
"message": "example"
}

Not authenticated (401 via requireAuthenticated) or insufficient project role (403).

Media typeapplication/json
object
error
required

Human-readable error message.

string
message
string
Examplegenerated
json
{
"error": "example",
"message": "example"
}

Resource not found (or cross-tenant — same 404).

Media typeapplication/json
object
error
required

Human-readable error message.

string
message
string
Examplegenerated
json
{
"error": "example",
"message": "example"
}

Zod validation failed (error=‘参数校验失败’ with issues[]).

Media typeapplication/json
object
error
required
string
issues
Array<object>
object
path
string
message
string
details
Array<object>
object
key
additional properties
any
key
additional properties
any
Example
json
{
"error": "参数校验失败"
}