Skip to main content

Overview

If you have an existing loyalty system, or want to interact with an off-chain points system we allow partners to integrate existing loyalty points to be distributed as a part of the Snag Loyalty Program to be used as your all-in-one destination for points & points management moving forward.

Configuration

In our self-serve dashboard we will ask for the following:
  • Get balance URL
  • Update balance URL
  • API key

Authentication

Please include API key authentication on your server. Allow us to pass in the API key as a header

Get loyalty point balance

  • This endpoint will be called many times from our frontend, please ensure it is performant
  • If we query for a wallet address which is not present in your system then please either don’t include that wallet in the response array or ensure the balance value is set to 0.
  • For multi-currency setups, please include separate account balance objects in the array for each currency, and map your currency to the loyaltyCurrencyId provided in the snag admin.

Update loyalty point balance

  • This endpoint should process all updates transactionally (all succeed, or all fail), or return a 400 error.
  • It is the APIs responsibility to balance check prior to executing the balance updates.
  • For multi-currency setups please specify a separate path for each currency.
  • Example: if one wallet has insufficient balance, then return a 400 and a proper error message. We will surface the error message to the frontend.

Get loyalty account history

  • Returns the list of balance changes for a wallet address
  • This endpoint will be called many times from our frontend, so make sure it is performant and can handle the load

API Structure & Guidelines for Loyalty Rules

We expect specific standards for an API endpoint that our loyalty rules interact with (e.g. to get off-chain data from your system that somehow impacts rule evaluation and/or rewards).

Configuration

For our system to be able to call your endpoint(s) during rule execution we ask for the following:
  • Endpoint URL
  • API key
  • Standard pagination & sorting parameters