unPLUGDevelopers

unPLUG Loyalty API

Run unPLUG Loyalty inside your own app and website. Your guests sign in with your login, earn and spend points on your checkout, and get push and in-app messages from unPLUG campaigns, while the program itself lives in unPLUG.

This API is for restaurant brands that use unPLUG Loyalty but build their own mobile app or ordering website. If your guests use the unPLUG app or an unPLUG-built website, you don't need it: that already works.

Two APIs#

What you can build#

  • Sign-up and sign-in. Enroll guests from your own account system and keep one member per guest, including people who already earn at the register.
  • The rewards screen. Points balance, tier progress, rewards they can afford, rewards waiting in their wallet, and a full points history.
  • Rewards at checkout. Preview what applies to the cart, hold a reward while the guest pays, and credit points when the order is paid. Refunds undo it all correctly.
  • Offers and promo codes. Accept shared and unique codes at checkout and show targeted offers from the wallet. Offers are created in the unPLUG Dashboard.
  • Challenges. "Visit 3 times this week" style goals with progress bars and a join button in your app (coming soon). Challenges are created in the unPLUG Dashboard.
  • Push and full-screen in-app messages sent by unPLUG campaigns, from your own Firebase and Apple keys, so they show your app's name.
  • Webhooks for every points change, reward, tier move and order, signed and retried for 3 days.
  • Data sharing through reports, daily file exports and a Snowflake share (coming soon).

How the pieces fit#

There are three parties. Your server holds the secret key and is the only thing that can create orders or move points directly. Your app holds a member token that your server gives it, so it can show a guest their own balance and register their phone for push. unPLUG runs the loyalty program and the marketing campaigns, which reach your app through the same API.

How your server, your app and unPLUG connect Your app talks to your server for sign-in and to the unPLUG API with a member token. Your server talks to the unPLUG API with a secret key and receives webhooks. unPLUG campaigns send push and in-app messages to your app and read loyalty data from the API. Your app or website holds a member token Your server holds the secret key unPLUG Loyalty API api.unplugdining.com unPLUG campaigns sign-in, member token balance, rewards, devices members, orders, points webhooks push, in-app messages
Secrets stay on your server. The app only ever holds a member token that expires in 15 minutes.

What's available#

Every guide and endpoint carries one of two labels.

  • Available at launch ships in the first release of the API.
  • Coming soon is designed and on our build list. The shape documented here is what we plan to ship, but it can still change before release. The changelog says when each one goes live.

Some setup still needs a person at unPLUG: issuing API keys, uploading your push certificates, turning on data exports. Email support@unplugdining.com for those. A developer dashboard for managing keys and credentials yourself is coming soon.

Scope#

This API covers mobile apps and websites. Registers, kiosks and other in-store hardware aren't part of it. Points a guest earns at a Square register still land on the same member, and you'll see them in the member's activity and in webhooks.

Where to start#

  1. Ask for a sandbox. Email support and we'll send test keys for a sandbox brand connected to our Square sandbox. See Sandbox.
  2. Run the quickstart. A few curl commands take you from a new member to points on a paid order. See Quickstart.
  3. Build your flows. Authentication, then members, rewards and checkout.
  4. Go live. Send us your go-live checklist and we'll issue live keys.