Actions47
- Template Actions
- Communication Actions
- Card Actions
- Create
- Get
- Get All
- Update
- Delete
- Get Balance
- Add Points
- Deduct Points
- Add Amount
- Deduct Amount
- Add Stamps
- Deduct Stamps
- Transfer Points
- Transfer Amount
- Block Card
- Unblock Card
- Generate QR Code
- Get Operations
- Add Visits
- Deduct Visits
- Add Reward
- Deduct Reward
- Receive Reward
- Redeem Coupon
- Set Expiration Date
- Set Membership Tier
- Customer Actions
- Company Actions
- Analytics Actions
- System Actions
Overview
The node interacts with a Digital Wallet Cards loyalty program API, specifically focusing on managing loyalty cards. The Card - Create operation allows users to create a new loyalty card for a customer based on a specified card template. This is useful in scenarios where businesses want to enroll customers into a loyalty program by issuing them personalized cards that track balances, points, stamps, and other rewards.
Practical examples include:
- Creating a new loyalty card for a customer after signup.
- Issuing a promotional card with an initial balance or points.
- Setting expiration dates or metadata for tracking custom attributes on the card.
Properties
| Name | Meaning |
|---|---|
| Template ID | The numeric ID of the card template to use when creating the card. |
| Customer ID | The unique identifier string of the customer who will own the card. |
| Additional Fields | Optional extra fields to customize the card at creation time: |
| - Initial Balance | Starting monetary balance on the card (number, minimum 0, precision 2 decimals). |
| - Initial Points | Starting loyalty points on the card (number, minimum 0). |
| - Initial Stamps | Starting number of stamps on the card (number, minimum 0). |
| - Expiration Date | Optional expiration date/time for the card. |
| - Metadata | JSON object as a string containing additional custom metadata for the card. |
Output
The output is a JSON object representing the newly created card with all its properties as returned by the API. This typically includes the card's unique ID, associated customer ID, template ID, balances, points, stamps, expiration date, metadata, and timestamps.
No binary data output is involved in this operation.
Dependencies
- Requires an API key credential configured in n8n to authenticate requests to the Digital Wallet Cards API.
- The base URL for API requests is
https://api.digitalwallet.cards. - The node uses internal utility functions for making HTTP requests, validating required fields, cleaning objects, and transforming API responses.
Troubleshooting
- Missing Required Fields: If
templateIdorcustomerIdare not provided, the node will throw an error indicating these fields are required. - Invalid JSON in Metadata: If the
metadatafield contains invalid JSON, parsing will fail. Ensure valid JSON syntax is used. - API Authentication Errors: Ensure the API key credential is correctly set up and has permissions to create cards.
- Network or API Errors: Check network connectivity and API status if requests fail unexpectedly.
- Empty Additional Fields: Providing no additional fields is allowed; defaults will be used.
Links and References
- Digital Wallet Cards API Documentation (hypothetical link for reference)
- n8n Documentation on Creating Custom Nodes
- JSON Validator tools for checking metadata correctness (e.g., https://jsonlint.com/)