v18

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-01934981.1 MB
Earning Rules

Deactivate earning rule

<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 or your Technical Account Manager.

</Warning>

Moves the earning rule to INACTIVE status. No request body. Allowed transition: ACTIVE -> INACTIVE. Invalid transitions are rejected with a conflict error.

post/v2/loyalties/earning-rules/{earningRuleId}/deactivate

Path parameters

idstring required

Earning rule ID.

Response

Deactivated earning rule

idstring

Earning rule ID (lern_...).

namestring

Earning rule name.

status'DRAFT' | 'ACTIVE' | 'INACTIVE'

Current status. DELETED also exists internally but deleted rules are excluded from API reads.

start_datestring date-time nullable

Date-time from which the rule is active. Nullable.

end_datestring date-time nullable

Date-time until which the rule is active. Nullable.

metadataEarningRuleMetadata

Arbitrary key-value metadata; any JSON object is accepted.

created_atstring date-time

Creation timestamp (ISO 8601).

updated_atstring date-time nullable

Last update timestamp (ISO 8601). Null when never updated.

object'earning_rule'

Object type marker. Always earning_rule.