The world’s smartest loyalty engine 🚀 Changing the way businesses and people connect.
Run any Bash in a Pipedream step within your workflow. Refer to the Pipedream Bash docs to learn more.
The Piggy API provides a suite of loyalty and reward services allowing businesses to manage customer loyalty programs, offer discounts, and track customer engagement. With Pipedream, you can harness this powerful API to automate various aspects of your loyalty program. You might sync loyalty data with other business systems, trigger emails or notifications based on customer actions, or generate reports on the effectiveness of your loyalty campaigns.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
piggy: {
type: "app",
app: "piggy",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.piggy.eu/api/v3/oauth/clients/contacts`,
headers: {
Authorization: `Bearer ${this.piggy.$auth.api_key}`,
},
})
},
})
# $PIPEDREAM_STEPS file contains data from previous steps
cat $PIPEDREAM_STEPS | jq .trigger.context.id
# Write data to $PIPEDREAM_EXPORTS to return it from the step
# Exports must be written as key=value
echo foo=bar >> $PIPEDREAM_EXPORTS