update_contact
Update a contact's attributes such as name, phone, birthdate, or any custom attributes. Call list_contact_attributes to discover field names. System-managed values like credit balance and creation date cannot be updated through this tool.
delete_contact
Delete a contact from the loyalty system. Supports standard deletion or GDPR-compliant deletion which ensures full data removal. This is an asynchronous operation.
list_contacts
List loyalty program contacts with filtering and pagination. Use this to browse contacts, find recently created contacts, or retrieve a paginated list of all contacts in the system.
create_contact
Create a new contact in the loyalty system. Supports creating a contact by email, finding or creating by email (idempotent), or creating an anonymous contact. Use **findOrCreate** mode to avoid duplicates.
manage_giftcards
Create, list, get, and find gift cards. Also supports creating transactions (adding/deducting balance) on gift cards. Gift cards are anonymous and not linked to contacts.
list_rewards
List available rewards in the loyalty program. Optionally filter by shop or contact to see which rewards are claimable by a specific contact.
list_loyalty_transactions
List loyalty transactions including credit receptions and reward receptions. Filter by contact, shop, type, and date range to track credit activity.
get_loyalty_program
Retrieve the loyalty program configuration including program name, max credit amount, custom credit name, and unit settings. Also lists available tiers and gift card programs.
list_shops
List all shops connected to the account. Shops represent physical locations or web shops and are required for many operations like awarding credits, redeeming vouchers, and gift card transactions.
manage_vouchers
Create, list, find, update, or redeem vouchers. Vouchers are tied to promotions and can be assigned to contacts. Use this tool to manage the entire voucher lifecycle.
manage_prepaid
Manage a contact's prepaid balance. Create transactions to top up or deduct from prepaid balance, list transaction history, or check current balance. Prepaid balances are linked directly to contacts.
manage_contact_identifiers
Create, find, link, or unlink contact identifiers. Contact identifiers are used to associate physical cards, QR codes, or other identifiers with contacts in the loyalty system.
list_promotions
List all promotions in the account. Promotions define voucher campaigns and are required when creating vouchers. Optionally retrieve a single promotion by UUID.
claim_reward
Claim a reward for a contact, deducting the required credits from their balance. Also supports reversing a previously claimed reward to restore credits.
get_contact
Retrieve a single contact by UUID or email address. Also returns the contact's credit balance, prepaid balance, and tier in a single call.
trigger_automation
Trigger a contact_updated automation run for a specific contact. Automations are workflows configured in the Piggy dashboard that can send emails, award credits, or perform other actions. Optionally list available automations.
award_credits
Award loyalty credits to a contact. Credits can be awarded directly by specifying a credit amount, or calculated from a unit value (e.g. purchase amount). Use this to reward customers for purchases or other activities.
list_giftcard_transactions
Retrieve gift card transaction history with gift card, program, shop, date, sorting, and pagination filters. Older transactions may have no UUID and cannot be reversed by UUID.
reverse_transaction
Reverse a credit reception, prepaid transaction, or gift card transaction by its UUID. Creates a compensating transaction using the original values. Gift card reversal is limited to the latest transaction.
calculate_credits
Preview the loyalty credits for a unit value without awarding them. Time-based loyalty rules can make the final award differ from this preview.
list_contact_attributes
Discover contact attribute names and data types before updating contact attributes.