Wallet Passes
Fragen Sie Wallet-Pass-Vorlagen ab, listen Sie Wallet Passes für Kunden auf und senden Sie Push-Benachrichtigungen an Wallet-Pass-Inhaber.
Vorlagen auflisten
Rufen Sie Wallet-Pass-Vorlagen für einen bestimmten Shop ab.
GET /v1/management/wallet-passes/templates
Erforderliche Berechtigung: wallet_pass_template:read
Beispielanfrage
curl -X GET "https://api.rxscale.com/v1/management/wallet-passes/templates?shop_identifier=my-shop" \
-H "X-API-Key: your-api-key-here"
Antwort
{
"data": [
{
"uid": "wpt-abc123",
"display_name": "Loyalty Card",
"pass_type": "generic",
"shop_identifier": "my-shop"
}
],
"total": 1
}
Wallet Passes auflisten
Rufen Sie Wallet Passes für eine bestimmte Shop-Kunden- und Shop-Kombination ab.
GET /v1/management/wallet-passes
Optionale Vorlagen-UID zum Filtern
Erforderliche Berechtigung: wallet_pass:read
Beispielanfrage
curl -X GET "https://api.rxscale.com/v1/management/wallet-passes?shop_customer_id=cust-123&shop_identifier=my-shop" \
-H "X-API-Key: your-api-key-here"
Antwort
{
"data": [
{
"uid": "wp-abc123",
"wallet_pass_template_uid": "wpt-abc123",
"shop_customer_id": "cust-123",
"status": "active"
}
],
"total": 1
}
Push-Benachrichtigungen senden
Senden Sie Push-Benachrichtigungen an einen oder mehrere Wallet-Pass-Inhaber. Akzeptiert einen Stapel von Benachrichtigungen.
POST /v1/management/wallet-passes/push-notifications
Erforderliche Berechtigung: wallet_pass_push_notification:write
Anfragekörper
Der Anfragekörper ist ein JSON-Array von Benachrichtigungsobjekten.
[
{
"wallet_pass_uid": "wp-abc123",
"message": "Your prescription is ready for pickup!"
},
{
"wallet_pass_uid": "wp-def456",
"message": "Hello {first_name}, your order has been shipped."
}
]
| Feld | Typ | Erforderlich | Beschreibung |
|---|
wallet_pass_uid | string | Ja | UID des Wallet Passes, an den die Benachrichtigung gesendet werden soll |
message | string | Ja | Text der Push-Benachrichtigung (unterstützt {field}-Platzhalter) |
Beispielanfrage
curl -X POST "https://api.rxscale.com/v1/management/wallet-passes/push-notifications" \
-H "X-API-Key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '[
{
"wallet_pass_uid": "wp-abc123",
"message": "Your prescription is ready for pickup!"
}
]'
Antwort (201 Created)
{
"data": [
{
"uid": "wpn-abc123",
"wallet_pass_uid": "wp-abc123",
"message": "Your prescription is ready for pickup!",
"status": "queued"
}
],
"total": 1
}
Fehlerantworten
| Statuscode | Beschreibung |
|---|
400 | Ungültiges Body-Format, leeres Array, Validierungsfehler oder Wallet Pass nicht gefunden |
403 | Fehlende Berechtigung wallet_pass_push_notification:write |