ShareMint
  • ๐Ÿ‘‹Introduction
  • Overview
    • ๐Ÿ’กWhat we do
    • โœจFeatures
    • ๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘Partner Program
  • Fundamentals
    • ๐Ÿ› ๏ธGetting Started
    • โšกAffiliate Sign Up Page
    • ๐ŸŒ๏ธReferee Sign Up Page
    • ๐Ÿ“Integrating ShareMint into your Website
    • ๐ŸŽAPI
    • ๐ŸŽชAffiliate Token Gating
    • ๐Ÿง‘Inviting other Admins
    • ๐Ÿš…Bulk Upload Users
    • ๐Ÿ“–Export as CSV
    • ๐Ÿ’ตBulk Payouts
    • ๐Ÿ’ธSupport for fiat payments
    • ๐Ÿ—ผTiered Rewards
    • ๐ŸŽฐReferee Requirements
      • Smart Contract Events
      • API Events
      • API Points
    • ๐ŸงชChecking your program before launch
  • Use Cases
    • ๐ŸŽจFor NFT Collections
    • ๐ŸงบFor NFT Marketplaces
    • ๐ŸŽฎFor Gaming
    • ๐Ÿ’ฑFor DeFi Protocols
    • ๐Ÿ’ธFor DEXs
    • ๐Ÿ—ž๏ธFor Newsletters
  • Case Studies
    • ๐ŸŽจNFT Mints
    • ๐Ÿ’ฑDeFi Protocols
Powered by GitBook
On this page
  • API
  • To save custom events.
  1. Fundamentals
  2. Referee Requirements

API Events

Submit custom events to track referee actions and reward affiliates.

PreviousSmart Contract EventsNextAPI Points

Last updated 1 year ago

You can send custom events to ShareMint using our API.

These events are associated with referees and are used to reward affiliates.

For example, if you have a web3 game, and your game has a breeding event, you can reward an affiliate that invites a user to the game that breeds at least 5 times. To determine whether the conditions have been completed, you would send a breed event to our API each time the user breeds. One we recieve 5 breed events, the affiliate reward will be unlocked.

To add an API Event requirement, navigate to your project's settings page. In the Affiliates section, click on Advanced Referee Requirements, and choose API Event as the requirement type.

You will be asked to fill in the following fields:

  • Event Name - the name of the event. This must match the event name sent via API.

  • What is the minimum value required to be considered a referral? - This is a numeric value threshold above which an affiliate is considered to be valid. You can leave this blank or set it to 0 if you'd like to allow any value.

API

Send events using our API:

To save custom events.

POST https://sharemint.xyz/api/external/save-event

One of address, email, or projectUserId must be provided, otherwise, the request will not be processed.

Headers

Name
Type
Description

Content-Type*

String

application/json

Request Body

Name
Type
Description

slug*

String

Project slug

apiSecret*

String

Find this on the admin tab of your project

name*

String

Event name that should match an event name used for requirements on the project Settings page.

value

Number

A custom value for the event.

referredByCode

String

The referral code of the referrer that invited the user. This will usually be blank.

referredByAddress

String

The address of the referrer that invited the user. This will usually be blank.

address

String

The address of the user that performed the event.

email

String

The email of the user that performed the event.

projectUserId

String

The ShareMint id of the user that performed the event.

๐ŸŽฐ
Example using API Event