Externe Loyalty-Systeme anbindenConnect External Loyalty Systems
Wenn dein Unternehmen bereits ein Loyalty-System betreibt (eigene Datenbank, Payback, etc.), kannst du es über die External Sync API mit BEEP! verbinden. Punkte, Stempel und Tiers werden in beiden Systemen synchron gehalten.
If your company already runs a loyalty system (custom database, Payback, etc.), you can connect it to BEEP! via the External Sync API. Points, stamps, and tiers are kept in sync across both systems.
Externe Loyalty-Integration erfordert das PRIME-Paket
und einen API-Key.
External loyalty integration requires the PRIME package
and an API key.
ArchitekturArchitecture
[Dein System] ── POST /syncExternalLoyalty ▶ [BEEP!
Cloud] ▶
[Datenbank]
▶ [BEEP! App]
[BEEP! Cloud] ── Webhook ▶ [Dein System] [Your System] ── POST /syncExternalLoyalty ▶ [BEEP! Cloud] ▶ [Database] ▶ [BEEP! App]
[BEEP! Cloud] ── Webhook ▶ [Your System]
[BEEP! Cloud] ── Webhook ▶ [Dein System] [Your System] ── POST /syncExternalLoyalty ▶ [BEEP! Cloud] ▶ [Database] ▶ [BEEP! App]
[BEEP! Cloud] ── Webhook ▶ [Your System]
Sync-API EndpointSync API Endpoint
cURL
curl -X POST \
".../apiGateway/api/v1/syncExternalLoyalty" \
-H "Authorization: Bearer $SK" \
-H "Content-Type: application/json" \
-d '{
"programId": "lp_abc123",
"userId": "user_xyz",
"action": "add",
"points": 50,
"source": "payback_system",
"externalTransactionId": "PB-TXN-9876"
}'
| Parameter | Typ | BeschreibungDescription |
|---|---|---|
programId |
string | ID des Loyalty-Programms in BEEP!ID of the loyalty program in BEEP! |
userId |
string | BEEP! User-ID des KundenBEEP! user ID of the customer |
action |
string | "add" | "redeem" | "set"
|
points |
number | Anzahl der Punkte (bei set:
Neuer Stand)Number
of points (for set: New balance) |
source |
string (opt.) | Bezeichnung des Quellsystems, z.B. "payback"Source
system name, e.g. "payback" |
externalTransactionId |
string (opt.) | Transaktions-ID im externen System (für Idempotenz)Transaction ID in external system (for idempotency) |
Response
JSON
{
"message": "External sync: add
successful",
"userId": "user_xyz",
"programId": "lp_abc123",
"previousBalance": 100,
"newBalance": 150
}
Typische AnwendungsfälleTypical Use Cases
| SzenarioScenario | Action | BeschreibungDescription |
|---|---|---|
| Punkte aus eigenem Shop-SystemPoints from own shop system | add |
Punkte nach Kauf in deinem System vergebenAward points after purchase in your system |
| Payback/DeutschlandCard SyncPayback/DeutschlandCard sync | set |
Täglicher Balance-Abgleich mit externem SystemDaily balance sync with external system |
| Einlösung im LadenIn-store redemption | redeem |
Wenn Kunde am POS einlöst, BEEP!-Balance aktualisieren When customer redeems at POS, update BEEP! balance |
SDK-BeispieleSDK Examples
Python
from beep_sdk import BeepClient
client = BeepClient('sk_live_...')
# Sync points from external system
result = client.loyalty.add_points(
program_id='lp_abc123',
user_id='user_xyz',
points=50,
transaction_id='PB-TXN-9876',
)
Dart
final client = BeepClient('sk_live_...');
// Sync from external system
await client.loyalty.addPoints({
'programId': 'lp_abc123',
'userId': 'user_xyz',
'points': 50,
'source': 'external_pos',
});
Kombiniere die External Sync API mit Webhooks, um eine
bidirektionale Synchronisation aufzubauen. BEEP! sendet Webhooks wenn Punkte in der App
vergeben/eingelöst werden, und dein System sendet Sync-Calls wenn Punkte extern
vergeben werden.
Combine the External Sync API with Webhooks to build
bidirectional synchronization. BEEP! sends webhooks when points are earned/redeemed in the
app, and your system sends sync calls when points are earned externally.