Piggy (Leat)

MarketingAPI key

Run a Piggy (now Leat) loyalty program: find and update contacts, award and reverse credits, and redeem rewards.

14 actions

ActionEffectData handledScope
piggy_list_contactsLists loyalty contacts with their credit balance, tier and attributes, one page at a time, optionally sorted by creation datereadPersonal data
piggy_find_contactFinds a contact by email address and returns their balance, tier, subscriptions and attributesreadPersonal data
piggy_find_or_create_contactReturns the contact with an email address, creating it first when none existsreadPersonal data
piggy_get_contactReturns one contact by UUID with balances, tier, subscriptions and attributesreadPersonal data
piggy_create_contactCreates a contact from an email address, optionally with a referral codewritePersonal data
piggy_update_contactUpdates a contact's attributes, such as firstname, lastname or custom attributeswritePersonal data
piggy_get_credit_balanceReturns a contact's current loyalty credit balancereadPersonal data
piggy_list_shopsLists the account's shops (business profiles), physical or webreadGeneral
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 creditswritePersonal data
piggy_reverse_credit_receptionReverses a credit reception, for example after a refund, by creating one for the negative number of creditswriteGeneral
piggy_calculate_creditsCalculates how many credits a purchase would earn at a shop without awarding themreadGeneral
piggy_list_rewardsLists the rewards available at a shop, or the rewards one contact can claimreadGeneral
piggy_create_reward_receptionRedeems a reward for a contact at a shop, deducting its creditswritePersonal data
piggy_reverse_reward_receptionReverses a reward redemption, for example for a cancelled order, and gives the credits backwriteGeneral