CustomerClientCards
Customer client cards represent loyalty cards, membership cards, or gift cards associated with customer clients.
Storage Location
{customer_id}-customer_client_card.jsonNote: This file may not exist for all customers. Only present when the customer uses loyalty/gift card features.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Unique card identifier. |
customer_id | integer | Yes | Reference to Customer. |
customer_client_id | guid | No | Reference to CustomerClient (null for anonymous gift cards). |
card_number | string | Yes | Card number. |
card_type | string | Yes | Card type: loyalty, giftcard, membership. |
balance | float | No | Card balance (for prepaid/gift cards). |
points | integer | No | Loyalty points balance. |
valid_from | datetime | No | Card valid from date. |
valid_to | datetime | No | Card expiration date. |
status | string | Yes | Status: active or inactive. |
created_at | datetime | Yes | Creation timestamp. |
Card Types
| Type | Description |
|---|---|
loyalty | Loyalty program card with points accumulation |
giftcard | Prepaid gift card with monetary balance |
membership | Membership/subscription card |
Example - Loyalty Card
json
{
"id": 50001,
"customer_id": 10352,
"customer_client_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"card_number": "LOYAL-2024-00001",
"card_type": "loyalty",
"balance": 0.0,
"points": 1250,
"valid_from": "2024-01-01T00:00:00",
"valid_to": "2025-12-31T23:59:59",
"status": "active",
"created_at": "2024-01-01T10:00:00"
}Example - Gift Card
json
{
"id": 50002,
"customer_id": 10352,
"customer_client_id": null,
"card_number": "GIFT-2024-00123",
"card_type": "giftcard",
"balance": 500.00,
"points": 0,
"valid_from": "2024-06-15T00:00:00",
"valid_to": "2026-06-15T23:59:59",
"status": "active",
"created_at": "2024-06-15T14:30:00"
}Related Entities
- Customers - Parent customer/tenant
- CustomerClients - Card owner (optional)
- Payments - Payments can reference customer card