🔩API Functionality

Wallet Accounts

Authentication

  1. Retrieve a unique message for a wallet account to sign – the API provides functionality to get a unique message for a wallet account to sign. This message is generated by Relayer to verify that the user has ownership of the wallet account. The message includes a nonce, along with a message for account owners to understand what they are signing. Each application has the flexibility to customize this message.

  2. Verify the signature of a wallet account – the API provides a function to verify that a wallet account signed the expected message.

The process for signing the message is handled outside of the API by the publisher application.

Enrollment

  1. Enroll a wallet account for personalized offers – the API provides functionality to enroll new wallet accounts using the address associated with the account.

  2. Unenroll a wallet account from Relayer’s personalized offers – the API provides functionality to unenroll a wallet account. Unenrolled wallet accounts will no longer be able to access relevant offers. If a wallet account unenrolls they will have the ability to re-enroll again.

  3. Get the current enrollment status for a wallet account.


Offers

  1. Get personalized offers for a wallet account – the API provides functionality to retrieve a fixed set of offers that are currently available for use.

  2. Activate an offer for a wallet account – the API provides a function to activate an offer and register it in Relayer’s system. Once an activation occurs, the owner of the account will have 24 hours to complete the associated action.

Offer Model

Offers retrieved from the API will have the following properties publicly accessible:

  • Placement – placement of the offer within the current listing

  • Single Use – whether the offer is single use or not

  • Short Description – abbreviated summary of the offer

  • Full Description – full summary of the offer

  • Minimum Reward Amount – minimum reward amount for the offer

  • Maximum Reward Amount – maximum reward amount for the offer

  • Reward Denomination – currency/token that the reward is paid out in

  • Offer Denomination – currency/token that the reward amount is denominated in

  • Advertiser – object with properties describing the advertiser (See Advertiser Modelbelow)

  • Support Networks – list of networks the offer supports and can be completed on (See Network Model below)

  • Activated – whether the offer is currently activated

  • Completed – whether the offer was completed

Advertiser Model

The following are properties included with each offer under their advertiser that are publicly available:

  • Name – name of the advertiser

  • Image URL – Image URL of the advertiser’s logo

  • Category – category the advertiser is associated with

Network Model

The following are properties included with each network that the offer supports:

  • Name – name of the network

  • Image URL – Image URL of the network's logo

Displaying Offers

Information displayed about an offer is required to be in two locations: a centralized tab/page (also referred to as the “Offers Tab”), where offers are listed in the order in which they are retrieved, and an individual details tab/page (also referred to as the “Offer Details Page”) that outlines specific terms and conditions.

The relationship between the two offer locations is that offers listed on the “Offers Tab” should transition to their respective “Offer Details Page” when clicked. The notes below outline what is expected of each location.

Offers Tab

For each offer to correctly appear in the “Offers Tab”, offers at a minimum are required to display the following:

  1. Name of the advertiser

  2. Image URL to the advertiser’s logo

  3. Abbreviated summary of the offer’s terms (what the offer is)

  4. Activation and completion statuses of the offer

Offer Details Page

Each “Offer Details Page” provides additional details about an offer that wallet account owners may find informative in determining whether to activate and complete an offer. The following lists information required to be displayed on this page and separate from the contents of the “Offers Tab”

  1. Whether the offer is single-use or multi-use

  2. The full summary description of the offer

  3. Website URL of the advertiser

  4. Terms and conditions

  5. The blockchain networks that the offer is supported on

The way that offers are displayed is flexible depending upon your application and integration.


Offer Feedback

  1. Capture a wallet account fully viewing an offer – the API provides functionality to capture when an offer on the “Offers Tab” fully comes into view.

  2. Capture a wallet account clicking an offer – the API provides functionality to capture when a wallet account owner clicks an offer to view its details located on the “Offer Details Page.” This feedback is different from a user activating an offer.

  3. Subscribe to offer completion events – the API provides functionality to subscribe to and update offers when they are completed by the wallet account owner

  4. Unsubscribe from offer completion events – the API provides functionality to unsubscribe from completed offer events

Last updated