From ff869aa373dad4dd8b8fd38227d919b8fb70b0d9 Mon Sep 17 00:00:00 2001 From: p-woznikowski Date: Wed, 22 Jul 2026 22:38:04 +0200 Subject: [PATCH 1/3] Lv2 endpoints overview pages --- .../loyalty-v2-benefits-overview.mdx | 37 ++++++++++++++++ .../loyalty-v2-card-definitions-overview.mdx | 41 ++++++++++++++++++ .../loyalty-v2-earning-rules-overview.mdx | 42 ++++++++++++++++++ .../loyalty-v2-examine-overview.mdx | 32 ++++++++++++++ .../loyalty-v2-members-overview.mdx | 43 +++++++++++++++++++ .../loyalty-v2-programs-overview.mdx | 38 ++++++++++++++++ .../loyalty-v2-rewards-overview.mdx | 36 ++++++++++++++++ .../loyalty-v2-tier-structures-overview.mdx | 34 +++++++++++++++ 8 files changed, 303 insertions(+) create mode 100644 documentation/api-reference/loyalty-v2-benefits-overview.mdx create mode 100644 documentation/api-reference/loyalty-v2-card-definitions-overview.mdx create mode 100644 documentation/api-reference/loyalty-v2-earning-rules-overview.mdx create mode 100644 documentation/api-reference/loyalty-v2-examine-overview.mdx create mode 100644 documentation/api-reference/loyalty-v2-members-overview.mdx create mode 100644 documentation/api-reference/loyalty-v2-programs-overview.mdx create mode 100644 documentation/api-reference/loyalty-v2-rewards-overview.mdx create mode 100644 documentation/api-reference/loyalty-v2-tier-structures-overview.mdx diff --git a/documentation/api-reference/loyalty-v2-benefits-overview.mdx b/documentation/api-reference/loyalty-v2-benefits-overview.mdx new file mode 100644 index 000000000..f98958a63 --- /dev/null +++ b/documentation/api-reference/loyalty-v2-benefits-overview.mdx @@ -0,0 +1,37 @@ +--- +title: "Benefits overview" +description: "Understand how benefits let Loyalty v2 earning rules grant points, material items, or digital incentives automatically." +keywords: ['loyalty v2', 'benefits', 'earning rule benefits', 'material rewards', 'digital rewards'] +--- + +A benefit is a value granted automatically to a member when an earning rule's conditions are met — as an alternative to, or alongside, earning points on a loyalty card. Members don't redeem benefits themselves; they simply receive one once they fulfill the conditions of the earning rule that references it. Benefits are optional and are only useful once connected to at least one earning rule. + +## Benefit types + +A benefit must define exactly one type-specific configuration object that matches its `type`: +- `points` — a fixed number of points added to a card. +- `points_proportional` — points calculated proportionally to a triggering value, such as order amount. +- `material` — a physical product or SKU. +- `digital` — a discount coupon or gift card. + +## Stock + +Like rewards, benefits can be limited in quantity through a `stock` configuration. When omitted, a benefit defaults to `UNLIMITED` stock, meaning it can be granted as many times as its earning rule fires. + +## Referenced resources + +Depending on its type, a benefit references other resources — a card definition for points-based benefits, or a product/SKU/campaign for material and digital benefits. These references are validated on create and update: for example, a points-based benefit can only be activated if its connected card definition is itself `ACTIVE`. + +## Lifecycle + +A benefit is created in `DRAFT` status by default, and only moves between `DRAFT` and `ACTIVE` through the activate and draft endpoints — there is no `INACTIVE` state. While in `DRAFT`, every property can be updated; once `ACTIVE`, only `name` and `stock` can still change. + +Two safeguards protect benefits that are already wired into your program: +- A benefit that's referenced by any earning rule can't be deleted until that reference is removed. +- A benefit connected to an active earning rule can't be moved back to `DRAFT`. + +## Related resources + +- [Earning Rules overview](/api-reference/loyalty-v2-earning-rules-overview) for how benefits are triggered +- [Rewards overview](/api-reference/loyalty-v2-rewards-overview) for the point-redeemable counterpart to benefits +- [Benefit builder](/build/create-benefit) for the dashboard perspective on configuring benefits diff --git a/documentation/api-reference/loyalty-v2-card-definitions-overview.mdx b/documentation/api-reference/loyalty-v2-card-definitions-overview.mdx new file mode 100644 index 000000000..d0a62eb67 --- /dev/null +++ b/documentation/api-reference/loyalty-v2-card-definitions-overview.mdx @@ -0,0 +1,41 @@ +--- +title: "Card Definitions overview" +description: "Understand how card definitions configure the loyalty cards (point wallets) that store and govern a member's points in Loyalty v2." +keywords: ['loyalty v2', 'card definitions', 'point wallets', 'points expiration', 'earning limits', 'spending limits'] +--- + +A card definition is the configuration blueprint for a loyalty card. In the **Loyalty hub** dashboard, this same resource is called a **point wallet**. Every loyalty card a member holds is generated from a card definition, which controls how points on that card are earned, held, spent, and eventually expire. + +A loyalty program can reference multiple card definitions. When a customer becomes a member of a program, Voucherify automatically creates one loyalty card for each active card definition assigned to that program, so a member can hold several point balances at once (for example, a standard points wallet and a separate seasonal-promotion wallet). + +## What a card definition controls + +Besides `name` and `type`, a card definition groups several independent configuration sections. Any section left out on creation falls back to a permissive default: +- `code_config` — the pattern used to generate loyalty card codes (defaults to a 10-character alphanumeric pattern). +- `points_expiration` — whether and how points expire (defaults to `NO_EXPIRATION`). +- `pending_points` — whether newly earned points are available immediately or held back for a period, until a fixed date, or until an activation event (defaults to `IMMEDIATE`). +- `earning_limits` and `spending_limits` — global and per-transaction caps on how many points a member can earn or spend (default to `NO_LIMIT`). +- `refunds` — what happens to earned or spent points when a related order is refunded (default to `NONE`). +- `balance_settings` — whether the card balance is allowed to go negative (defaults to disallowed). +- `pay_with_points` — the exchange ratio formula used when members pay for orders with points. + +## Lifecycle + +A card definition is created in `DRAFT` status by default. Use the activate and draft endpoints to move it between `DRAFT` and `ACTIVE`: +- `DRAFT` → `ACTIVE`: makes the card definition eligible to be assigned to a program and used for new loyalty cards. +- `ACTIVE` → `DRAFT`: takes the card definition out of circulation for new assignments. + +Once a card definition is in use — for example assigned to a program that already issued cards from it — most configuration sections become locked to protect existing point balances. Only `name`, `metadata`, and `pay_with_points` can always be updated regardless of usage; other sections may be rejected with a resource-locked error until the card definition is no longer referenced. + +## How card definitions fit into a program + +Card definitions are standalone resources, created and managed independently of any single program, then connected through the [Programs](/api-reference/loyalty-v2-programs-overview) assignment endpoints. A program needs at least one active card definition before it can itself become `ACTIVE`. Deleting a card definition or removing its assignment does not delete the loyalty cards already issued from it, but it does stop new cards from that definition being created for future members. + +Every activity performed on a card definition — creation, updates, status transitions, and program assignments — is recorded and available through its activity history endpoint, which is useful for auditing configuration changes over time. + +## Related resources + +- [Point wallet builder](/build/point-wallet-builder) for the point wallet concept as presented in the dashboard. +- [Programs overview](/api-reference/loyalty-v2-programs-overview) to see how card definitions are assigned to a program. +- [Members overview](/api-reference/loyalty-v2-members-overview) to see how loyalty cards are issued to members from active card definitions. +- [Integrate loyalty v2](/guides/loyalty-v2-integrate) for an end-to-end integration walkthrough. diff --git a/documentation/api-reference/loyalty-v2-earning-rules-overview.mdx b/documentation/api-reference/loyalty-v2-earning-rules-overview.mdx new file mode 100644 index 000000000..bb3f7e908 --- /dev/null +++ b/documentation/api-reference/loyalty-v2-earning-rules-overview.mdx @@ -0,0 +1,42 @@ +--- +title: "Earning Rules overview" +description: "Understand how earning rules define when and how Loyalty v2 members earn points or receive benefits." +keywords: ['loyalty v2', 'earning rules', 'triggers', 'trigger limits', 'points'] +--- + +An earning rule defines when a member earns points, or receives another configured result, for something they did. Each earning rule combines a trigger, optional conditions, and one or more earnings — Voucherify evaluates a member's earning rules and applies the first matching earning configuration for the triggering event. + +## Triggers + +An earning rule reacts to one of three triggers: +- **Order paid** — fires after an order is successfully paid, and can calculate points proportionally to the order or item amounts. +- **Custom event** — fires when a selected custom event is sent to Voucherify. +- **Segment entered** — fires when a member enters a selected customer segment. + +## Conditions and earnings + +Beyond the trigger itself, a rule can require that the member belongs to a specific loyalty tier, or that the triggering event meets additional criteria (for example, a minimum order amount). Each earning inside the rule then defines its effect — typically adding points to a point wallet, but an earning can also grant a benefit instead of points. A single rule can hold multiple earnings, evaluated in order, with the first matching one applied. + +## Trigger limits + +Trigger limits control how often a rule is allowed to fire for the same member: a cooldown period between triggers, and/or a frequency cap over a time window. When omitted, a rule defaults to no cooldown and no frequency limit, meaning it can fire every time its trigger occurs. + +## Lifecycle + +An earning rule is created in `DRAFT` status unless `status` is specified explicitly. From there: +- `DRAFT` or `INACTIVE` → `ACTIVE` via the activate endpoint. +- `ACTIVE` → `INACTIVE` via the deactivate endpoint. +- `ACTIVE` → `DRAFT` via the draft endpoint. + +Once a rule leaves `DRAFT`, only a subset of properties can still be changed — name, earnings, error handling, validity hours, start/end dates, trigger limits, and metadata — while trigger and condition definitions stay fixed. Deleting a rule performs a soft delete and keeps its last state for reference. + +## Assigning earning rules to a program + +Earning rules are created independently of any program and connected through the [Programs](/api-reference/loyalty-v2-programs-overview) batch assignment endpoint. Unlike card definitions, earning rules can be assigned or unassigned while the program is `ACTIVE`, as long as the program keeps at least one active earning rule. + +## Related resources + +- [Programs overview](/api-reference/loyalty-v2-programs-overview) +- [Benefits overview](/api-reference/loyalty-v2-benefits-overview) for the benefit effect an earning can grant +- [Examine overview](/api-reference/loyalty-v2-examine-overview) to simulate what an earning rule would grant before it fires +- [Earning rule builder](/build/loyalty-earning-rule) for the dashboard perspective on earning rules diff --git a/documentation/api-reference/loyalty-v2-examine-overview.mdx b/documentation/api-reference/loyalty-v2-examine-overview.mdx new file mode 100644 index 000000000..6c5301e12 --- /dev/null +++ b/documentation/api-reference/loyalty-v2-examine-overview.mdx @@ -0,0 +1,32 @@ +--- +title: "Examine overview" +description: "Understand how the examine endpoints estimate earning opportunities and reward availability for a Loyalty v2 member without any side effects." +keywords: ['loyalty v2', 'examine earning rules', 'examine rewards', 'dry run', 'points estimation'] +--- + +The Examine endpoints let you evaluate what a member could earn or redeem across their loyalty program memberships, without creating any transactions or otherwise changing stored data. Because they are pure dry runs, you can call them as often as needed to power member-facing UI, such as "ways to earn" screens or reward catalogs. + +## Examine earning rules + +This endpoint estimates the points and benefits a member would receive for a given scenario. You choose a trigger mode: +- `ALL` — evaluates every active earning rule across the member's programs at once, useful for showing all the available ways a member can earn points in a single call. +- `SPECIFIC` — evaluates only the earning rules tied to one event: an order being paid, a customer entering a segment, or a custom event. This mode requires the matching context object for that event (for example, order line items for `customer.order.paid`). + +The response lists the estimated points per card and per earning rule, plus any material or digital benefits that would be granted. Because the estimation is a single dry-run pass, it does not chain further consequences of the earned points — for example, it won't simulate a tier upgrade that itself unlocks additional points. + +## Examine rewards + +This endpoint evaluates every reward assigned to a member's active program memberships and reports whether each one is currently redeemable on each of the member's cards. You can scope the evaluation to a single membership with `member_id`. + +Each reward on each card is classified as: +- `AVAILABLE` — the member has an active card for the reward's card definition, the card balance covers the resolved point cost, and the reward assignment has stock. +- `UNAVAILABLE` — accompanied by one or more structured reasons, such as `insufficient_balance` (with the exact points still missing), `out_of_stock`, `no_matching_cost`, `no_card_for_cost`, or `reward_inactive`. + +The structured unavailability reasons are designed so your frontend doesn't need to guess why a reward is greyed out — you can use the same response to render progress bars or "points needed" messaging. + +## Related resources + +- [Earning Rules overview](/api-reference/loyalty-v2-earning-rules-overview) +- [Rewards overview](/api-reference/loyalty-v2-rewards-overview) +- [Members overview](/api-reference/loyalty-v2-members-overview) +- [Integrate loyalty v2](/guides/loyalty-v2-integrate) for worked examples of both examine endpoints diff --git a/documentation/api-reference/loyalty-v2-members-overview.mdx b/documentation/api-reference/loyalty-v2-members-overview.mdx new file mode 100644 index 000000000..b1a2c8927 --- /dev/null +++ b/documentation/api-reference/loyalty-v2-members-overview.mdx @@ -0,0 +1,43 @@ +--- +title: "Members overview" +description: "Understand how customers are enrolled as members of a Loyalty v2 program, and how their loyalty cards, points, rewards, and payments are managed." +keywords: ['loyalty v2', 'loyalty members', 'loyalty cards', 'pending points', 'reward purchases', 'pay with points'] +--- + +A member is a Voucherify customer enrolled in a specific loyalty program. Membership is program-scoped: the same customer can be a member of several programs at once, but only once per program — a second enrollment attempt for the same customer is rejected. The customer must already exist in Voucherify, and the target program must be `ACTIVE` before it can accept new members. + +## Enrollment + +Members can be created one at a time, or in bulk through a batch endpoint that processes up to 10 MB of entries asynchronously in batches of 100, tracked as an [async action](/api-reference/async-actions/async-action-object). When a member is created, Voucherify automatically issues one loyalty card for every active card definition assigned to the program, so a member can start with several point wallets at once. Card `code` generation happens asynchronously, so a newly created card's `code` may briefly be `null`. + +## Member lifecycle + +A member is typically `ACTIVE` on creation, but can also be created as `INACTIVE`. Use the activate and deactivate endpoints to move a member between these two states — an inactive member can't earn or spend points. Deleting a member soft-deletes the member and its cards. + +## Loyalty cards and points + +Each of a member's loyalty cards tracks its own balance, lifetime point counters, and upcoming activation or expiration events. Beyond the automatic earning and spending flows, several endpoints let you manage points on a specific card directly: +- Manually add or subtract points, which records an admin credit or debit transaction. +- List, and optionally manually activate or cancel, **pending points** buckets before their scheduled activation date. +- List, and optionally manually expire, **expiring points** buckets before their scheduled expiration date. +- List the full transaction history of a card, or pull an aggregated daily points report for a date range. + +## Rewards and payments + +Members spend points in two ways, both scoped to a member's card: +- **Purchasing a reward** — spends points from the card tied to the reward's cost configuration, and can later be refunded, which returns the points to the card. +- **Paying for an order with points** — spends points based on the card definition's pay-with-points exchange ratio, capped by the card balance or an optional payment limit, and can be run as a dry run before committing to a real transaction. + +Members also expose read-only history for benefit fulfillments and tier transitions (joins, upgrades, downgrades, prolongations, and exits), so you can build a complete activity feed for a member without combining several other endpoints. + +## Member vs. membership + +Two related endpoints return a member's data from different angles: get member returns the member together with its cards within one program, while get membership additionally enriches each card with tier progress. Use membership whenever your integration needs to show a member's progress toward the next loyalty tier. + +## Related resources + +- [Programs overview](/api-reference/loyalty-v2-programs-overview) +- [Card Definitions overview](/api-reference/loyalty-v2-card-definitions-overview) +- [Rewards overview](/api-reference/loyalty-v2-rewards-overview) +- [Tier Structures overview](/api-reference/loyalty-v2-tier-structures-overview) +- [Integrate loyalty v2](/guides/loyalty-v2-integrate) for a step-by-step member integration walkthrough diff --git a/documentation/api-reference/loyalty-v2-programs-overview.mdx b/documentation/api-reference/loyalty-v2-programs-overview.mdx new file mode 100644 index 000000000..f2c576177 --- /dev/null +++ b/documentation/api-reference/loyalty-v2-programs-overview.mdx @@ -0,0 +1,38 @@ +--- +title: "Programs overview" +description: "Understand how a Loyalty v2 program connects card definitions, earning rules, tier structures, and rewards into one customer-facing loyalty setup." +keywords: ['loyalty v2', 'loyalty programs', 'program assignments', 'loyalty hub', 'spending reports'] +--- + +A loyalty program is the container that ties the individual Loyalty v2 building blocks — card definitions (point wallets), earning rules, tier structures, and rewards — into a single, customer-facing loyalty setup. Members join a program, not an individual card definition or earning rule, which is what lets a program combine several of these components into one experience. + +## Program status + +A program is created in `DRAFT` status by default, and can be created directly as `ACTIVE` if it already has the required assignments. To become or remain `ACTIVE`, a program must have at least one active card definition and at least one active earning rule assigned; otherwise activation is rejected. Deleting a program soft-deletes it and removes all of its card definition, earning rule, reward, and tier structure assignments. + +## Assigning components to a program + +Card definitions, earning rules, tier structures, and rewards are all created independently (see their respective overview pages) and then connected to a program through dedicated batch assignment endpoints, one per component type. Each batch call can assign and unassign multiple items in a single request; unassign operations are always processed before assign operations, and — in the default strict mode — any missing resource or missing assignment fails the whole batch. + +A few rules are specific to each component: +- **Card definitions**: can only be batch-assigned or unassigned while the program is in `DRAFT` status. +- **Earning rules**: can be assigned or unassigned at any time, but if the program is `ACTIVE`, the batch is validated to leave at least one active earning rule assigned. +- **Tier structures**: a program can have at most one tier structure assigned, and it can only be unassigned while the program is in `DRAFT` status. +- **Rewards**: each reward being assigned must include its stock configuration, which can later be updated through a dedicated endpoint without going through the batch flow. + +## Reporting + +A program exposes aggregated points-spending reports — a daily breakdown over a chosen date range and resolution, and an all-time summary — optionally filtered by card definition. Use these reports to track how quickly members exhaust their point balances across the program's wallets. + +## Activity history + +Every change to a program — creation, updates, deletion, activation, deactivation, and assignment changes — is recorded and available through its activity history endpoint, giving you an audit trail independent of your own event logging. + +## Related resources + +- [Card Definitions overview](/api-reference/loyalty-v2-card-definitions-overview) +- [Earning Rules overview](/api-reference/loyalty-v2-earning-rules-overview) +- [Tier Structures overview](/api-reference/loyalty-v2-tier-structures-overview) +- [Rewards overview](/api-reference/loyalty-v2-rewards-overview) +- [Members overview](/api-reference/loyalty-v2-members-overview) for enrolling customers into a program +- [Loyalty program overview](/build/loyalty-overview) for the dashboard perspective on programs diff --git a/documentation/api-reference/loyalty-v2-rewards-overview.mdx b/documentation/api-reference/loyalty-v2-rewards-overview.mdx new file mode 100644 index 000000000..a7eca4f7d --- /dev/null +++ b/documentation/api-reference/loyalty-v2-rewards-overview.mdx @@ -0,0 +1,36 @@ +--- +title: "Rewards overview" +description: "Understand how rewards let Loyalty v2 members redeem their points for material products or digital incentives." +keywords: ['loyalty v2', 'rewards', 'reward purchases', 'material rewards', 'digital rewards', 'reward costs'] +--- + +A reward is what a member actively redeems by spending points — unlike a [benefit](/api-reference/loyalty-v2-benefits-overview), which is granted automatically by an earning rule. Rewards are optional and only become redeemable once assigned to a program with a stock configuration. + +## Reward types + +A reward requires `name`, `type`, and `costs`, plus exactly one type-specific object matching its `type`: +- `MATERIAL` — a physical product or SKU, defined in the `material` object. +- `DIGITAL` — a discount coupon or gift card, defined in the `digital` object. + +## Costs and program assignment + +A reward's `costs` array can define a different point price per card definition, so the same reward can be connected to multiple point wallets — even across different programs — each with its own price. The reward itself doesn't carry stock; stock is set per program when the reward is assigned through the [Programs](/api-reference/loyalty-v2-programs-overview) batch assignment endpoint, and can be updated afterwards without going through the batch flow again. + +## Validity and refunds + +A reward can define `validity_hours` to restrict when it's redeemable (defaulting to any time), and `refunds` behavior for what happens to spent points when a reward purchase is refunded. + +## Lifecycle + +A reward can be created directly in `DRAFT` or `ACTIVE` status. From there, it follows the same three-state pattern as earning rules and tier structures: `DRAFT`/`INACTIVE` → `ACTIVE` via activate, `ACTIVE` → `INACTIVE` via deactivate, and `ACTIVE` → `DRAFT` via draft. While in `DRAFT`, every property can be updated; once active or inactive, only `name`, `metadata`, `refunds`, `validity_hours`, `start_date`, `end_date`, and `costs` can still change. Deleting a reward moves it to a `DELETED` status. + +## Redeeming and checking availability + +Members redeem rewards through the [Members](/api-reference/loyalty-v2-members-overview) reward-purchase endpoints, which spend points from the card tied to the reward's cost configuration and can later be refunded. Before building a redemption flow, use the [Examine overview](/api-reference/loyalty-v2-examine-overview) endpoint to check which rewards a member can currently afford, and why any others are unavailable. + +## Related resources + +- [Programs overview](/api-reference/loyalty-v2-programs-overview) for assigning rewards and their stock to a program +- [Members overview](/api-reference/loyalty-v2-members-overview) for purchasing and refunding rewards +- [Benefits overview](/api-reference/loyalty-v2-benefits-overview) for the automatically granted counterpart to rewards +- [Reward builder](/build/loyalty-reward-builder) for the dashboard perspective on configuring rewards diff --git a/documentation/api-reference/loyalty-v2-tier-structures-overview.mdx b/documentation/api-reference/loyalty-v2-tier-structures-overview.mdx new file mode 100644 index 000000000..20737aa6e --- /dev/null +++ b/documentation/api-reference/loyalty-v2-tier-structures-overview.mdx @@ -0,0 +1,34 @@ +--- +title: "Tier Structures overview" +description: "Understand how tier structures define the tiering model that determines how Loyalty v2 members qualify for and move between tiers." +keywords: ['loyalty v2', 'tier structures', 'loyalty tiers', 'point balance', 'point earned'] +--- + +A tier structure defines the tiering model for a loyalty program: the levels members can reach, and the rule that decides which level a member currently qualifies for. Tier structures are optional — a program can run entirely on points and rewards without any tiers. + +## Tier structure types + +A tier structure qualifies members based on exactly one of two measures, set through its `type`: +- `POINT_BALANCE` — the member's current point balance on the associated card. +- `POINT_EARNED` — the total points the member has earned over a given period, regardless of how many have since been spent or expired. + +Only the configuration object matching the chosen type (`point_balance` or `point_earned`) can be set; the other must be left empty. If not specified, a tier structure defaults to no tier expiration (`NO_RETENTION`) and no automatic downgrade (`NO_DOWNGRADE`). + +## Tiers + +Each tier structure contains its own nested tiers — for example Bronze, Silver, and Gold — managed through dedicated create, list, update, and delete endpoints scoped to the parent structure. A tier structure can hold at most 10 tiers. Each tier can define its own downgrade behavior, or inherit the parent structure's setting, which is the default when not specified. + +## Lifecycle + +A tier structure is created in `DRAFT` status by default, and moves between `DRAFT`, `ACTIVE`, and `INACTIVE` through the activate, deactivate, and draft endpoints — the same three-state pattern used by earning rules and rewards. Once a tier structure (or one of its tiers) leaves `DRAFT`, only `name` and `metadata` can still be updated; the qualification logic itself stays fixed to protect members already progressing through the tiers. + +## Assigning a tier structure to a program + +A program can have at most one tier structure assigned at a time, connected through the [Programs](/api-reference/loyalty-v2-programs-overview) batch assignment endpoint. Unassigning a tier structure is only allowed while the program is in `DRAFT` status, which prevents members from losing their tier context on a live program. + +## Related resources + +- [Programs overview](/api-reference/loyalty-v2-programs-overview) +- [Members overview](/api-reference/loyalty-v2-members-overview) to see a member's tier progress +- [Create tier structures](/build/create-tier-structures) for the dashboard perspective on configuring tiers +- [Loyalty key concepts](/build/loyalty-key-concepts#tier-structure) for the underlying tier concepts From 20f779d365e804765dafa8235fd53e5fe958d493 Mon Sep 17 00:00:00 2001 From: p-woznikowski Date: Wed, 22 Jul 2026 22:47:33 +0200 Subject: [PATCH 2/3] Update docs.json --- documentation/docs.json | 8 -------- 1 file changed, 8 deletions(-) diff --git a/documentation/docs.json b/documentation/docs.json index 9f6627c83..e621291f7 100644 --- a/documentation/docs.json +++ b/documentation/docs.json @@ -547,7 +547,6 @@ { "group": "Card Definitions", "pages": [ - "api-reference/loyalty-v2-card-definitions-overview", "GET /v2/loyalties/card-definitions", "POST /v2/loyalties/card-definitions", "GET /v2/loyalties/card-definitions/{cardDefinitionId}", @@ -561,7 +560,6 @@ { "group": "Programs", "pages": [ - "api-reference/loyalty-v2-programs-overview", "GET /v2/loyalties/programs", "POST /v2/loyalties/programs", "GET /v2/loyalties/programs/{programId}", @@ -587,7 +585,6 @@ { "group": "Members", "pages": [ - "api-reference/loyalty-v2-members-overview", "GET /v2/loyalties/programs/{programId}/members", "POST /v2/loyalties/programs/{programId}/members", "POST /v2/loyalties/programs/{programId}/members/batch", @@ -617,7 +614,6 @@ { "group": "Examine", "pages": [ - "api-reference/loyalty-v2-examine-overview", "POST /v2/loyalties/examine/earning-rules", "POST /v2/loyalties/examine/rewards" ] @@ -625,7 +621,6 @@ { "group": "Earning Rules", "pages": [ - "api-reference/loyalty-v2-earning-rules-overview", "GET /v2/loyalties/earning-rules", "POST /v2/loyalties/earning-rules", "GET /v2/loyalties/earning-rules/{earningRuleId}", @@ -640,7 +635,6 @@ { "group": "Tier Structures", "pages": [ - "api-reference/loyalty-v2-tier-structures-overview", "GET /v2/loyalties/tier-structures", "POST /v2/loyalties/tier-structures", "GET /v2/loyalties/tier-structures/{tierStructureId}", @@ -659,7 +653,6 @@ { "group": "Benefits", "pages": [ - "api-reference/loyalty-v2-benefits-overview", "GET /v2/loyalties/benefits", "POST /v2/loyalties/benefits", "GET /v2/loyalties/benefits/{benefitId}", @@ -673,7 +666,6 @@ { "group": "Rewards", "pages": [ - "api-reference/loyalty-v2-rewards-overview", "GET /v2/loyalties/rewards", "POST /v2/loyalties/rewards", "GET /v2/loyalties/rewards/{rewardId}", From 023cb7f73b77267b1f062196e679e9cb923b1200 Mon Sep 17 00:00:00 2001 From: p-woznikowski Date: Thu, 23 Jul 2026 09:05:06 +0200 Subject: [PATCH 3/3] List mb cd txns --- documentation/openapi/loyalties-v2.json | 309 +++++++++++++++++------- 1 file changed, 221 insertions(+), 88 deletions(-) diff --git a/documentation/openapi/loyalties-v2.json b/documentation/openapi/loyalties-v2.json index 0863a5e31..e59305b93 100644 --- a/documentation/openapi/loyalties-v2.json +++ b/documentation/openapi/loyalties-v2.json @@ -2372,7 +2372,7 @@ "name": "memberId", "in": "path", "required": true, - "description": "Program member ID (format `lmbr_[a-f0-9]+`).", + "description": "Program member ID (format `lmbr_[a-f0-9]+`), assigned by Voucherify.", "schema": { "type": "string", "pattern": "^lmbr_[a-f0-9]+$" @@ -2598,7 +2598,7 @@ "name": "memberId", "in": "path", "required": true, - "description": "Program member ID (format `lmbr_[a-f0-9]+`).", + "description": "Program member ID (format `lmbr_[a-f0-9]+`), assigned by Voucherify.", "schema": { "type": "string", "pattern": "^lmbr_[a-f0-9]+$" @@ -2930,7 +2930,7 @@ "name": "memberId", "in": "path", "required": true, - "description": "Program member ID (format `lmbr_[a-f0-9]+`).", + "description": "Program member ID (format `lmbr_[a-f0-9]+`), assigned by Voucherify.", "schema": { "type": "string", "pattern": "^lmbr_[a-f0-9]+$" @@ -3014,7 +3014,7 @@ "name": "memberId", "in": "path", "required": true, - "description": "Program member ID (format `lmbr_[a-f0-9]+`).", + "description": "Program member ID (format `lmbr_[a-f0-9]+`), assigned by Voucherify.", "schema": { "type": "string", "pattern": "^lmbr_[a-f0-9]+$" @@ -3098,7 +3098,7 @@ "name": "memberId", "in": "path", "required": true, - "description": "Program member ID (format `lmbr_[a-f0-9]+`).", + "description": "Program member ID (format `lmbr_[a-f0-9]+`), assigned by Voucherify.", "schema": { "type": "string", "pattern": "^lmbr_[a-f0-9]+$" @@ -3254,7 +3254,7 @@ "name": "memberId", "in": "path", "required": true, - "description": "Program member ID (format `lmbr_[a-f0-9]+`).", + "description": "Program member ID (format `lmbr_[a-f0-9]+`), assigned by Voucherify.", "schema": { "type": "string", "pattern": "^lmbr_[a-f0-9]+$" @@ -3264,7 +3264,7 @@ "name": "cardId", "in": "path", "required": true, - "description": "Loyalty card ID (format `lcrd_[a-f0-9]+`).", + "description": "Loyalty card ID (format `lcrd_[a-f0-9]+`), assigned by Voucherify.", "schema": { "type": "string", "pattern": "^lcrd_[a-f0-9]+$" @@ -3312,16 +3312,6 @@ } } }, - "409": { - "description": "Conflict - e.g. duplicate resource or invalid state transition.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, "423": { "description": "Resource locked - a related resource is in a state that prevents this operation.", "content": { @@ -3368,7 +3358,7 @@ "name": "memberId", "in": "path", "required": true, - "description": "Program member ID (format `lmbr_[a-f0-9]+`).", + "description": "Program member ID (format `lmbr_[a-f0-9]+`), assigned by Voucherify.", "schema": { "type": "string", "pattern": "^lmbr_[a-f0-9]+$" @@ -3378,7 +3368,7 @@ "name": "cardId", "in": "path", "required": true, - "description": "Loyalty card ID (format `lcrd_[a-f0-9]+`).", + "description": "Loyalty card ID (format `lcrd_[a-f0-9]+`), assigned by Voucherify.", "schema": { "type": "string", "pattern": "^lcrd_[a-f0-9]+$" @@ -3534,7 +3524,7 @@ "name": "memberId", "in": "path", "required": true, - "description": "Program member ID (format `lmbr_[a-f0-9]+`).", + "description": "Program member ID (format `lmbr_[a-f0-9]+`), assigned by Voucherify.", "schema": { "type": "string", "pattern": "^lmbr_[a-f0-9]+$" @@ -3544,7 +3534,7 @@ "name": "cardId", "in": "path", "required": true, - "description": "Loyalty card ID (format `lcrd_[a-f0-9]+`).", + "description": "Loyalty card ID (format `lcrd_[a-f0-9]+`), assigned by Voucherify.", "schema": { "type": "string", "pattern": "^lcrd_[a-f0-9]+$" @@ -3686,7 +3676,7 @@ "name": "memberId", "in": "path", "required": true, - "description": "Program member ID (format `lmbr_[a-f0-9]+`).", + "description": "Program member ID (format `lmbr_[a-f0-9]+`), assigned by Voucherify.", "schema": { "type": "string", "pattern": "^lmbr_[a-f0-9]+$" @@ -3696,7 +3686,7 @@ "name": "cardId", "in": "path", "required": true, - "description": "Loyalty card ID (format `lcrd_[a-f0-9]+`).", + "description": "Loyalty card ID (format `lcrd_[a-f0-9]+`), assigned by Voucherify.", "schema": { "type": "string", "pattern": "^lcrd_[a-f0-9]+$" @@ -3800,7 +3790,7 @@ "name": "memberId", "in": "path", "required": true, - "description": "Program member ID (format `lmbr_[a-f0-9]+`).", + "description": "Program member ID (format `lmbr_[a-f0-9]+`), assigned by Voucherify.", "schema": { "type": "string", "pattern": "^lmbr_[a-f0-9]+$" @@ -3810,7 +3800,7 @@ "name": "cardId", "in": "path", "required": true, - "description": "Loyalty card ID (format `lcrd_[a-f0-9]+`).", + "description": "Loyalty card ID (format `lcrd_[a-f0-9]+`), assigned by Voucherify.", "schema": { "type": "string", "pattern": "^lcrd_[a-f0-9]+$" @@ -3914,7 +3904,7 @@ "name": "memberId", "in": "path", "required": true, - "description": "Program member ID (format `lmbr_[a-f0-9]+`).", + "description": "Program member ID (format `lmbr_[a-f0-9]+`), assigned by Voucherify.", "schema": { "type": "string", "pattern": "^lmbr_[a-f0-9]+$" @@ -3924,7 +3914,7 @@ "name": "cardId", "in": "path", "required": true, - "description": "Loyalty card ID (format `lcrd_[a-f0-9]+`).", + "description": "Loyalty card ID (format `lcrd_[a-f0-9]+`), assigned by Voucherify.", "schema": { "type": "string", "pattern": "^lcrd_[a-f0-9]+$" @@ -4066,7 +4056,7 @@ "name": "memberId", "in": "path", "required": true, - "description": "Program member ID (format `lmbr_[a-f0-9]+`).", + "description": "Program member ID (format `lmbr_[a-f0-9]+`), assigned by Voucherify.", "schema": { "type": "string", "pattern": "^lmbr_[a-f0-9]+$" @@ -4076,7 +4066,7 @@ "name": "cardId", "in": "path", "required": true, - "description": "Loyalty card ID (format `lcrd_[a-f0-9]+`).", + "description": "Loyalty card ID (format `lcrd_[a-f0-9]+`), assigned by Voucherify.", "schema": { "type": "string", "pattern": "^lcrd_[a-f0-9]+$" @@ -4164,7 +4154,7 @@ "Programs" ], "summary": "List card transactions", - "description": "\n\n\nBETA endpoint\n\nThis is a work-in-progress documentation of a BETA endpoint. The parameters, fields, request and response bodies, and other data may be subject to change. If you want to share feedback or improvements, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nReturns a cursor-paginated list of transactions of the member's card. Results can\nbe filtered by id and created_at, and ordered by `created_at` (default\n`-created_at`, newest first). Returns 404 when the program, member or card does not\nexist.", + "description": "\n\n\nBETA endpoint\n\nThis is a work-in-progress documentation of a BETA endpoint. The parameters, fields, request and response bodies, and other data may be subject to change. If you want to share feedback or improvements, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nReturns a cursor-paginated list of transactions of the member's card. Results can be filtered by `id` and `created_at`, and ordered by `created_at` (default `-created_at`, newest first). Returns `404` when the program, member or card does not exist.", "parameters": [ { "name": "programId", @@ -4180,7 +4170,7 @@ "name": "memberId", "in": "path", "required": true, - "description": "Program member ID (format `lmbr_[a-f0-9]+`).", + "description": "Program member ID (format `lmbr_[a-f0-9]+`), assigned by Voucherify.", "schema": { "type": "string", "pattern": "^lmbr_[a-f0-9]+$" @@ -4190,7 +4180,7 @@ "name": "cardId", "in": "path", "required": true, - "description": "Loyalty card ID (format `lcrd_[a-f0-9]+`).", + "description": "Loyalty card ID (format `lcrd_[a-f0-9]+`), assigned by Voucherify.", "schema": { "type": "string", "pattern": "^lcrd_[a-f0-9]+$" @@ -4245,7 +4235,7 @@ "name": "cursor", "in": "query", "required": false, - "description": "Pagination cursor returned in the `cursor.next` field of a previous response.\nMust match the pattern `^lcrsctx_[a-f0-9]+$`.", + "description": "Pagination cursor returned in the `cursor.next` field of a previous response. Must match the pattern `^lcrsctx_[a-f0-9]+$`.", "schema": { "type": [ "string", @@ -4260,7 +4250,7 @@ "required": false, "style": "deepObject", "explode": true, - "description": "Field-specific filter conditions, passed as a deep object, e.g.\n`filters[id][conditions][$is]=lctx_0f5d0a8878caa3ee5c`. See the\n`CardTransactionListFilters` schema for available fields and conditions.", + "description": "Field-specific filter conditions, passed as a deep object, e.g. `filters[id][conditions][$is]=lctx_0f5d0a8878caa3ee5c`.", "schema": { "oneOf": [ { @@ -4280,12 +4270,160 @@ "application/json": { "schema": { "$ref": "#/components/schemas/CardTransactionListResponse" + }, + "examples": { + "Card transaction list response": { + "value": { + "data": [ + { + "id": "lctx_1294c0f2ed0e497abc", + "card_id": "lcrd_128f962dbd8c4ba5e0", + "program_id": "lprg_128f58429f4c4bf7b2", + "member_id": "lmbr_128f962dbc8c4ba5dc", + "card_definition_id": "lcdef_128f49963c0c4becb7", + "card_type": "INDIVIDUAL", + "type": "ADMIN_CREDIT", + "details": { + "reason": "Sorry points", + "rejection": null, + "metadata": {}, + "points": { + "total": 50, + "expiration_date": "2026-12-23" + } + }, + "status": "APPROVED", + "created_at": "2026-06-15T16:18:57.588Z", + "updated_at": "2026-06-15T16:18:58.239Z", + "object": "card_transaction" + }, + { + "id": "lctx_128f9821b6cfd14efa", + "card_id": "lcrd_128f962dbd8c4ba5e0", + "program_id": "lprg_128f58429f4c4bf7b2", + "member_id": "lmbr_128f962dbc8c4ba5dc", + "card_definition_id": "lcdef_128f49963c0c4becb7", + "card_type": "INDIVIDUAL", + "type": "PENDING_POINTS_ADDED", + "details": { + "reason": "AnnualProgram / AutumnPaid", + "rejection": null, + "metadata": { + "event_id": "evcus_128f981fced47cbe9b", + "member_id": "lmbr_128f962dbc8c4ba5dc", + "program_id": "lprg_128f58429f4c4bf7b2", + "earning_item_id": "lernei_128f582238cc4bf78e", + "earning_rule_id": "lern_128f5822398c4bf78f" + }, + "points": { + "total": 10, + "date": "2026-12-23", + "type": "FIXED_DATES" + } + }, + "status": "APPROVED", + "created_at": "2026-06-11T16:08:13.275Z", + "updated_at": "2026-06-11T16:08:14.223Z", + "object": "card_transaction" + }, + { + "id": "lctx_128f97f6b88fd14ea8", + "card_id": "lcrd_128f962dbd8c4ba5e0", + "program_id": "lprg_128f58429f4c4bf7b2", + "member_id": "lmbr_128f962dbc8c4ba5dc", + "card_definition_id": "lcdef_128f49963c0c4becb7", + "card_type": "INDIVIDUAL", + "type": "PENDING_POINTS_ADDED", + "details": { + "reason": "AnnualProgram / AutumnPaid", + "rejection": null, + "metadata": { + "event_id": "evcus_128f97f4f7d47cbe6a", + "member_id": "lmbr_128f962dbc8c4ba5dc", + "program_id": "lprg_128f58429f4c4bf7b2", + "earning_item_id": "lernei_128f582238cc4bf78e", + "earning_rule_id": "lern_128f5822398c4bf78f" + }, + "points": { + "total": 10, + "date": "2026-12-23", + "type": "FIXED_DATES" + } + }, + "status": "APPROVED", + "created_at": "2026-06-11T16:07:29.250Z", + "updated_at": "2026-06-11T16:07:30.271Z", + "object": "card_transaction" + }, + { + "id": "lctx_128f97848e4fd14e1d", + "card_id": "lcrd_128f962dbd8c4ba5e0", + "program_id": "lprg_128f58429f4c4bf7b2", + "member_id": "lmbr_128f962dbc8c4ba5dc", + "card_definition_id": "lcdef_128f49963c0c4becb7", + "card_type": "INDIVIDUAL", + "type": "PENDING_POINTS_ADDED", + "details": { + "reason": "AnnualProgram / AutumnPaid", + "rejection": null, + "metadata": { + "event_id": "evcus_128f9782100c4ba718", + "member_id": "lmbr_128f962dbc8c4ba5dc", + "program_id": "lprg_128f58429f4c4bf7b2", + "earning_item_id": "lernei_128f582238cc4bf78e", + "earning_rule_id": "lern_128f5822398c4bf78f" + }, + "points": { + "total": 10, + "date": "2026-12-23", + "type": "FIXED_DATES" + } + }, + "status": "APPROVED", + "created_at": "2026-06-11T16:05:32.345Z", + "updated_at": "2026-06-11T16:05:33.153Z", + "object": "card_transaction" + }, + { + "id": "lctx_128f974da3cfd14db7", + "card_id": "lcrd_128f962dbd8c4ba5e0", + "program_id": "lprg_128f58429f4c4bf7b2", + "member_id": "lmbr_128f962dbc8c4ba5dc", + "card_definition_id": "lcdef_128f49963c0c4becb7", + "card_type": "INDIVIDUAL", + "type": "PENDING_POINTS_ADDED", + "details": { + "reason": "AnnualProgram / AutumnPaid", + "rejection": null, + "metadata": { + "event_id": "evcus_128f974badd47cbddd", + "member_id": "lmbr_128f962dbc8c4ba5dc", + "program_id": "lprg_128f58429f4c4bf7b2", + "earning_item_id": "lernei_128f582238cc4bf78e", + "earning_rule_id": "lern_128f5822398c4bf78f" + }, + "points": { + "total": 10, + "date": "2026-12-23", + "type": "FIXED_DATES" + } + }, + "status": "APPROVED", + "created_at": "2026-06-11T16:04:36.111Z", + "updated_at": "2026-06-11T16:04:37.157Z", + "object": "card_transaction" + } + ], + "cursor": null, + "object": "list" + } + } } } } }, "400": { - "description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.", + "description": "Validation error - query parameters failed validation, or the operation is not allowed in the current resource state.", "content": { "application/json": { "schema": { @@ -4304,16 +4442,6 @@ } } }, - "409": { - "description": "Conflict - e.g. duplicate resource or invalid state transition.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, "500": { "description": "Internal server error.", "content": { @@ -4442,7 +4570,7 @@ "name": "memberId", "in": "path", "required": true, - "description": "Program member ID (format `lmbr_[a-f0-9]+`).", + "description": "Program member ID (format `lmbr_[a-f0-9]+`), assigned by Voucherify.", "schema": { "type": "string", "pattern": "^lmbr_[a-f0-9]+$" @@ -4592,7 +4720,7 @@ "name": "memberId", "in": "path", "required": true, - "description": "Program member ID (format `lmbr_[a-f0-9]+`).", + "description": "Program member ID (format `lmbr_[a-f0-9]+`), assigned by Voucherify.", "schema": { "type": "string", "pattern": "^lmbr_[a-f0-9]+$" @@ -4695,7 +4823,7 @@ "name": "memberId", "in": "path", "required": true, - "description": "Program member ID (format `lmbr_[a-f0-9]+`).", + "description": "Program member ID (format `lmbr_[a-f0-9]+`), assigned by Voucherify.", "schema": { "type": "string", "pattern": "^lmbr_[a-f0-9]+$" @@ -4845,7 +4973,7 @@ "name": "memberId", "in": "path", "required": true, - "description": "Program member ID (format `lmbr_[a-f0-9]+`).", + "description": "Program member ID (format `lmbr_[a-f0-9]+`), assigned by Voucherify.", "schema": { "type": "string", "pattern": "^lmbr_[a-f0-9]+$" @@ -4948,7 +5076,7 @@ "name": "memberId", "in": "path", "required": true, - "description": "Program member ID (format `lmbr_[a-f0-9]+`).", + "description": "Program member ID (format `lmbr_[a-f0-9]+`), assigned by Voucherify.", "schema": { "type": "string", "pattern": "^lmbr_[a-f0-9]+$" @@ -5100,7 +5228,7 @@ "name": "memberId", "in": "path", "required": true, - "description": "Program member ID (format `lmbr_[a-f0-9]+`).", + "description": "Program member ID (format `lmbr_[a-f0-9]+`), assigned by Voucherify.", "schema": { "type": "string", "pattern": "^lmbr_[a-f0-9]+$" @@ -5252,7 +5380,7 @@ "name": "memberId", "in": "path", "required": true, - "description": "Program member ID (format `lmbr_[a-f0-9]+`).", + "description": "Program member ID (format `lmbr_[a-f0-9]+`), assigned by Voucherify.", "schema": { "type": "string", "pattern": "^lmbr_[a-f0-9]+$" @@ -13474,7 +13602,7 @@ "description": "Pagination cursor, or `null` when there are no more results.", "oneOf": [ { - "$ref": "#/components/schemas/MemberListCursor" + "$ref": "#/components/schemas/ListCursor" }, { "type": "null" @@ -13493,7 +13621,7 @@ "object" ] }, - "MemberListCursor": { + "ListCursor": { "type": "object", "description": "Pagination cursor.", "properties": { @@ -13567,7 +13695,7 @@ "description": "Filter by creation date (date conditions).", "oneOf": [ { - "$ref": "#/components/schemas/MemberDateFilter" + "$ref": "#/components/schemas/DateFilter" }, { "type": "null" @@ -13904,9 +14032,9 @@ ], "additionalProperties": false }, - "MemberDateFilter": { + "DateFilter": { "type": "object", - "description": "Date filter conditions. `$before`/`$after` take date strings; `$is`,\n`$more_than`, `$less_than` take non-negative integers;\n`$has_value`/`$is_unknown` are presence checks. Each condition accepts a single\nvalue or an array with exactly one value. At least one condition is required.", + "description": "Date filter conditions. `$before`/`$after` take date strings (ISO 8601); `$is`, `$more_than`, `$less_than` take non-negative integers; `$has_value`/`$is_unknown` are presence checks. Each condition accepts a single value or an array with exactly one value. At least one condition is required.", "properties": { "conditions": { "type": "object", @@ -13916,12 +14044,14 @@ "description": "Date is before the given date.", "oneOf": [ { - "type": "string" + "type": "string", + "format": "date-time" }, { "type": "array", "items": { - "type": "string" + "type": "string", + "format": "date-time" }, "minItems": 1, "maxItems": 1 @@ -13935,12 +14065,14 @@ "description": "Date is after the given date.", "oneOf": [ { - "type": "string" + "type": "string", + "format": "date-time" }, { "type": "array", "items": { - "type": "string" + "type": "string", + "format": "date-time" }, "minItems": 1, "maxItems": 1 @@ -13954,12 +14086,14 @@ "description": "Date matches the given non-negative integer value.", "oneOf": [ { - "type": "string" + "type": "string", + "format": "date-time" }, { "type": "array", "items": { - "type": "string" + "type": "string", + "format": "date-time" }, "minItems": 1, "maxItems": 1 @@ -14061,7 +14195,7 @@ "description": "Pagination cursor, or `null` when there are no more results.", "oneOf": [ { - "$ref": "#/components/schemas/MemberListCursor" + "$ref": "#/components/schemas/ListCursor" }, { "type": "null" @@ -14221,7 +14355,7 @@ "description": "Filter by activity creation date (date conditions).", "oneOf": [ { - "$ref": "#/components/schemas/MemberDateFilter" + "$ref": "#/components/schemas/DateFilter" }, { "type": "null" @@ -14504,7 +14638,7 @@ "description": "Pagination cursor, or `null` when there are no more results.", "oneOf": [ { - "$ref": "#/components/schemas/MemberListCursor" + "$ref": "#/components/schemas/ListCursor" }, { "type": "null" @@ -14619,7 +14753,7 @@ "description": "Filter by activity creation date (date conditions).", "oneOf": [ { - "$ref": "#/components/schemas/MemberDateFilter" + "$ref": "#/components/schemas/DateFilter" }, { "type": "null" @@ -15017,7 +15151,6 @@ }, "CardTransactionListResponse": { "type": "object", - "description": "Cursor-paginated list of card transactions.", "properties": { "data": { "type": "array", @@ -15030,7 +15163,7 @@ "description": "Pagination cursor, or `null` when there are no more results.", "oneOf": [ { - "$ref": "#/components/schemas/MemberListCursor" + "$ref": "#/components/schemas/ListCursor" }, { "type": "null" @@ -15056,27 +15189,27 @@ "id": { "type": "string", "pattern": "^lctx_[a-f0-9]+$", - "description": "Unique card transaction ID." + "description": "Unique card transaction ID assigned by Voucherify." }, "card_id": { "type": "string", "pattern": "^lcrd_[a-f0-9]+$", - "description": "ID of the card the transaction belongs to." + "description": "ID of the card the transaction belongs to. Assigned by Voucherify." }, "program_id": { "type": "string", "pattern": "^lprg_[a-f0-9]+$", - "description": "ID of the loyalty program." + "description": "ID of the loyalty program. Assigned by Voucherify." }, "member_id": { "type": "string", "pattern": "^lmbr_[a-f0-9]+$", - "description": "ID of the member owning the card." + "description": "ID of the member owning the card. Assigned by Voucherify." }, "card_definition_id": { "type": "string", "pattern": "^lcdef_[a-f0-9]+$", - "description": "ID of the card definition of the card." + "description": "ID of the card definition of the card. Assigned by Voucherify." }, "card_type": { "type": "string", @@ -15162,7 +15295,7 @@ }, "CardTransactionDetails": { "type": "object", - "description": "Card transaction details. `reason`, `rejection` and `metadata` are present on all\nvariants; the remaining fields depend on the transaction `type`:\n\n- `ADMIN_CREDIT`: `points` (`total`, `expiration_date`)\n- `ADMIN_DEBIT`: `points` (`total`)\n- `ADMIN_POINTS_EXPIRATION`: `bucket` (the expired points bucket)\n- `POINTS_EARNED`: `points` (`total`, `expiration_date`)\n- `POINTS_EXPIRED`: `points` (`total`), `date`, `buckets`\n- `POINTS_SPENT_ON_REWARD`: `points` (`total`), `reward`, `reward_transaction`,\n `target_card`, `purchase_transaction`\n- `POINTS_PURCHASED`: `points` (`total`, `expiration_date`, `expiration_type`),\n `reward`, `reward_transaction`, `card_transaction`\n- `POINTS_PURCHASE_REVERSED`: `points` (`total`, `expiration_date`,\n `expiration_type`), `reward`, `purchase`, `reward_transaction`\n- `POINTS_SPENT_ON_ORDER`: `points` (`total`), `order`, `order_transaction`\n- `POINTS_REFUNDED`: `points` (`total`)\n- `POINTS_RETURNED`: `points` (`total`, `expiration_date`, `expiration_type`),\n `reward`, `purchase`, `reward_transaction`\n- `PENDING_POINTS_ADDED` / `PENDING_POINTS_ACTIVATED` / `PENDING_POINTS_CANCELED`:\n `points` (`total`, `date`, `type`)", + "description": "Card transaction details. `reason`, `rejection` and `metadata` are present on all variants; the remaining fields depend on the transaction `type`:\n\n- `ADMIN_CREDIT`: `points` (`total`, `expiration_date`)\n- `ADMIN_DEBIT`: `points` (`total`)\n- `ADMIN_POINTS_EXPIRATION`: `bucket` (the expired points bucket)\n- `POINTS_EARNED`: `points` (`total`, `expiration_date`)\n- `POINTS_EXPIRED`: `points` (`total`), `date`, `buckets`\n- `POINTS_SPENT_ON_REWARD`: `points` (`total`), `reward`, `reward_transaction`,`target_card`, `purchase_transaction`\n- `POINTS_PURCHASED`: `points` (`total`, `expiration_date`, `expiration_type`), `reward`, `reward_transaction`, `card_transaction`\n- `POINTS_PURCHASE_REVERSED`: `points` (`total`, `expiration_date`,\n `expiration_type`), `reward`, `purchase`, `reward_transaction`\n- `POINTS_SPENT_ON_ORDER`: `points` (`total`), `order`, `order_transaction`\n- `POINTS_REFUNDED`: `points` (`total`)\n- `POINTS_RETURNED`: `points` (`total`, `expiration_date`, `expiration_type`), `reward`, `purchase`, `reward_transaction`\n- `PENDING_POINTS_ADDED` / `PENDING_POINTS_ACTIVATED` / `PENDING_POINTS_CANCELED`: `points` (`total`, `date`, `type`)", "properties": { "reason": { "type": [ @@ -15267,7 +15400,7 @@ "properties": { "id": { "type": "string", - "description": "Reward ID (`lrew_[a-f0-9]+`)." + "description": "Reward ID (`lrew_[a-f0-9]+`) assigned by Voucherify." } } }, @@ -15284,7 +15417,7 @@ "properties": { "id": { "type": "string", - "description": "Reward transaction ID (`lrtx_[a-f0-9]+`)." + "description": "Reward transaction ID (`lrtx_[a-f0-9]+`) assigned by Voucherify." } } }, @@ -15301,7 +15434,7 @@ "properties": { "id": { "type": "string", - "description": "Card transaction ID (`lctx_[a-f0-9]+`)." + "description": "Card transaction ID (`lctx_[a-f0-9]+`) assigned by Voucherify." } } }, @@ -15323,7 +15456,7 @@ "properties": { "id": { "type": "string", - "description": "Card transaction ID (`lctx_[a-f0-9]+`)." + "description": "Card transaction ID (`lctx_[a-f0-9]+`) assigned by Voucherify." } } }, @@ -15339,7 +15472,7 @@ "properties": { "id": { "type": "string", - "description": "Reward transaction ID (`lrtx_[a-f0-9]+`)." + "description": "Reward transaction ID (`lrtx_[a-f0-9]+`) assigned by Voucherify." } } }, @@ -15363,7 +15496,7 @@ "properties": { "id": { "type": "string", - "description": "Order ID." + "description": "Order ID assigned by Voucherify." } } }, @@ -15380,7 +15513,7 @@ "properties": { "id": { "type": "string", - "description": "Order transaction ID (`lotx_[a-f0-9]+`)." + "description": "Order transaction ID (`lotx_[a-f0-9]+`) assigned by Voucherify." } } }, @@ -15397,7 +15530,7 @@ "properties": { "id": { "type": "string", - "description": "Card ID (`lcrd_[a-f0-9]+`)." + "description": "Card ID (`lcrd_[a-f0-9]+`) assigned by Voucherify." } } }, @@ -15414,7 +15547,7 @@ "properties": { "id": { "type": "string", - "description": "Card transaction ID (`lctx_[a-f0-9]+`)." + "description": "Card transaction ID (`lctx_[a-f0-9]+`) assigned by Voucherify." } } }, @@ -15459,7 +15592,7 @@ "description": "Filter by transaction creation date (date conditions).", "oneOf": [ { - "$ref": "#/components/schemas/MemberDateFilter" + "$ref": "#/components/schemas/DateFilter" }, { "type": "null" @@ -15471,7 +15604,7 @@ }, "CardTransactionIdFilter": { "type": "object", - "description": "ID filter conditions for card transaction IDs. At least one condition is\nrequired.", + "description": "ID filter conditions for card transaction IDs. At least one condition is required.", "properties": { "conditions": { "type": "object", @@ -15585,7 +15718,7 @@ "description": "Pagination cursor, or `null` when there are no more results.", "oneOf": [ { - "$ref": "#/components/schemas/MemberListCursor" + "$ref": "#/components/schemas/ListCursor" }, { "type": "null" @@ -15728,7 +15861,7 @@ "description": "Pagination cursor, or `null` when there are no more results.", "oneOf": [ { - "$ref": "#/components/schemas/MemberListCursor" + "$ref": "#/components/schemas/ListCursor" }, { "type": "null"