Piggy (Leat)
MarketingAPI key
Run a Piggy (now Leat) loyalty program: find and update contacts, award and reverse credits, and redeem rewards.
14 actions
| Action | Effect | Data handled | Scope |
|---|---|---|---|
| piggy_list_contactsLists loyalty contacts with their credit balance, tier and attributes, one page at a time, optionally sorted by creation date | read | Personal data | |
| piggy_find_contactFinds a contact by email address and returns their balance, tier, subscriptions and attributes | read | Personal data | |
| piggy_find_or_create_contactReturns the contact with an email address, creating it first when none exists | read | Personal data | |
| piggy_get_contactReturns one contact by UUID with balances, tier, subscriptions and attributes | read | Personal data | |
| piggy_create_contactCreates a contact from an email address, optionally with a referral code | write | Personal data | |
| piggy_update_contactUpdates a contact's attributes, such as firstname, lastname or custom attributes | write | Personal data | |
| piggy_get_credit_balanceReturns a contact's current loyalty credit balance | read | Personal data | |
| piggy_list_shopsLists the account's shops (business profiles), physical or web | read | General | |
| piggy_create_credit_receptionCreates a credit reception that awards credits to a contact at a shop, either as a purchase amount run through the loyalty rules or as an explicit number of credits | write | Personal data | |
| piggy_reverse_credit_receptionReverses a credit reception, for example after a refund, by creating one for the negative number of credits | write | General | |
| piggy_calculate_creditsCalculates how many credits a purchase would earn at a shop without awarding them | read | General | |
| piggy_list_rewardsLists the rewards available at a shop, or the rewards one contact can claim | read | General | |
| piggy_create_reward_receptionRedeems a reward for a contact at a shop, deducting its credits | write | Personal data | |
| piggy_reverse_reward_receptionReverses a reward redemption, for example for a cancelled order, and gives the credits back | write | General |