Partner Cards API
Partner Cards API endpoints allow partners to create, manage, and configure their loyalty cards with custom point systems and coupon validity settings.Partner Cards API requires partner-level authentication with proper JWT tokens.
Base URL
- Staging:
https://staging-api.loyalty.lt/{locale}/partners/cards
- Production:
https://api.loyalty.lt/{locale}/partners/cards
{locale}
is the language code (e.g., en
, lt
).
Create Partner Card
Request Body
Field Descriptions
Field | Type | Required | Description |
---|---|---|---|
title | object | Yes | Card title in multiple languages |
title.en | string | Yes | English title |
title.lt | string | Yes | Lithuanian title |
description | object | Yes | Card description in multiple languages |
terms_conditions | object | Yes | Terms and conditions in multiple languages |
card_design | object | Yes | Visual design settings for the card |
is_active | boolean | No | Whether the card is active (default: true) |
shop_ids | array | No | Array of shop IDs where card applies |
auto_assign | boolean | No | Auto-assign to new customers (default: true) |
points_enabled | boolean | No | Enable points system (default: true) |
initial_bonus_points | integer | No | Initial bonus points for new cards |
points_expiration_days | integer|null | No | Points expiration in days (null = never expire) |
points_per_currency | number | No | Points earned per currency unit |
currency_amount | number | No | Currency amount for point calculation |
round_points_up | boolean | No | Round points up to nearest integer |
min_points_per_purchase | integer | No | Minimum points per purchase |
max_points_per_purchase | integer|null | No | Maximum points per purchase |
points_per_visit | integer | No | Points awarded per visit |
points_redemption_enabled | boolean | No | Enable point redemption |
points_per_currency_redemption | number | No | Points required per currency unit for redemption |
currency_amount_redemption | number | No | Currency value for redemption calculation |
min_points_for_redemption | integer | No | Minimum points required for redemption |
max_points_per_redemption | integer|null | No | Maximum points per redemption transaction |
default_coupon_validity_days | integer|null | No | Default validity period for game-generated coupons (null = never expire) |
Validation Rules
default_coupon_validity_days
: Must be between 1-3650 days, or null for unlimited validitytitle.en
andtitle.lt
: Required, max 255 characters eachpoints_per_currency
andcurrency_amount
: Must be positive numbersshop_ids
: Must contain valid shop IDs owned by the partner
Response
Update Partner Card
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
id | integer | Yes | Partner card ID |
Request Body
Same as create endpoint. All fields are optional for updates.Response
Get Partner Card
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
id | integer | Yes | Partner card ID |
Response
List Partner Cards
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
is_active | boolean | No | Filter by active status |
shop_id | integer | No | Filter by shop ID |
page | integer | No | Page number (default: 1) |
per_page | integer | No | Items per page (default: 20, max: 100) |
Response
Delete Partner Card
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
id | integer | Yes | Partner card ID |
Response
Coupon Validity Feature
Thedefault_coupon_validity_days
field controls how long coupons generated from games remain valid:
Behavior
null
value: Coupons never expire (unlimited validity)- Integer value (1-3650): Coupons expire after specified number of days
- Used by: Game completion coupons, reward coupons from partner games
- Calculation:
coupon.expires_at = now() + default_coupon_validity_days
Examples
Migration Notice
⚠️ Deprecated: Thedefault_coupon_validity_days
field has been moved to individual game settings for better control.
Games API Reference
Coupon settings are now configured per-game. See the Games API for details.