App API
Every endpoint your app, your website and the server behind them call to run loyalty for guests, grouped by what it's for. Each one lists who can call it, the request and response models, and examples in cURL, Node.js and Python.
Creating and running offers and challenges, adjusting points and reports happen in the unPLUG Dashboard, so they aren't here. To automate them from your own tools, see the Management API.
https://api.unplugdining.com/v1uk_live_ keyshttps://sandbox.api.unplugdining.com/v1uk_test_ keys, connected to our Square sandboxapplication/jsonUTF-8, amounts in integer cents, times in UTC ISO 8601Who can call what#
Every endpoint is marked with the credential it accepts.
members:write, shown on every endpoint.
Member tokenLives in your app for 15 minutes and acts for one member. Your server mints it.
Calls that create or change money or points need an Idempotency-Key header. Errors follow RFC 9457, lists use cursor pagination, and /v1 only gets additive changes (versioning). The full contract is in openapi.yaml. Almost every member token call also has a server version, for a server-to-server integration.
53 endpoints: 48 available at launch, 5 coming soon.
Basics#
Rules every request follows.
Identity#
Enroll guests, keep profiles in sync and give your app a short-lived token for one member.
/v1/membersCreate a memberGET/v1/members/{id}Get a memberGET/v1/membersFind membersPATCH/v1/members/{id}Update a memberDELETE/v1/members/{id}Delete a memberGET/v1/members/{id}/communication_preferencesGet communication preferencesPATCH/v1/members/{id}/communication_preferencesUpdate communication preferencesLoyalty#
The program, a member's points history and the rewards in their wallet.
/v1/programGet the programGET/v1/locationsList locationsGET/v1/rewardsList rewardsGET/v1/rewards/{id}Get a rewardCheckout#
Apply rewards to a cart, hold one while the guest pays, credit points and handle refunds.
/v1/checkouts/previewPreview a checkoutPOST/v1/redemptionsCreate a redemptionGET/v1/redemptions/{id}Get a redemptionPOST/v1/redemptions/{id}/cancelCancel a redemption/v1/ordersCreate an orderGET/v1/orders/{id}Get an orderGET/v1/ordersList ordersPOST/v1/orders/{id}/refundsCreate a refundChallenges#
Show challenges, load progress and join opt-in challenges. Offers reach your app as codes and wallet items at checkout.
/v1/challengesList challengesSoonGET/v1/members/me/challengesList a member's challengesSoonPOST/v1/members/me/challenges/{id}/joinJoin a challengeSoonGET/v1/members/{id}/challengesList a member's challenges from your serverSoonPOST/v1/members/{id}/challenges/{challenge_id}/joinJoin a challenge for a memberSoonEngagement#
Register devices for push, fetch in-app messages and send app events for campaigns.
/v1/members/me/devices/{device_id}Register a deviceDELETE/v1/members/me/devices/{device_id}Remove a deviceGET/v1/members/me/messages/nextGet the next messageGET/v1/members/me/messages/{id}Get a messagePOST/v1/members/me/messages/{id}/eventsReport a message eventGET/v1/members/{id}/messages/nextGet a member's next message from your serverPOST/v1/members/{id}/messages/{message_id}/eventsReport a message event from your serverPOST/v1/members/me/push_opensReport a push openWebhooks#
Endpoints that receive events, and every event type unPLUG sends.
/v1/webhook_endpointsCreate a webhook endpointGET/v1/webhook_endpointsList webhook endpointsGET/v1/webhook_endpoints/{id}Get a webhook endpointPATCH/v1/webhook_endpoints/{id}Update a webhook endpointDELETE/v1/webhook_endpoints/{id}Delete a webhook endpointPOST/v1/webhook_endpoints/{id}/testSend a test eventPOST/v1/webhook_endpoints/{id}/rotate_secretRotate the signing secretGET/v1/eventsList eventsGET/v1/events/{id}Get an eventGET/v1/events/{id}/deliveriesList deliveriesPOST/v1/events/{id}/redeliverRedeliver an eventmember.createdmember.createdEVTmember.updatedmember.updatedEVTmember.deletedmember.deletedEVTpoints.changedpoints.changedEVTpoints.expiringpoints.expiringSoonEVTtier.changedtier.changedEVTreward.issuedreward.issuedEVTreward.redeemedreward.redeemedEVTreward.expiringreward.expiringEVTorder.creditedorder.creditedEVTorder.refundedorder.refundedEVTcommunication_preferences.updatedcommunication_preferences.updatedEVTchallenge.joinedchallenge.joinedSoonEVTchallenge.progressedchallenge.progressedSoonEVTchallenge.completedchallenge.completedSoonEVTreferral.completedreferral.completedSoonEVTwebhook.testwebhook.testTesting#
Sandbox-only helpers for in-store orders, wallet items and test webhooks.