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 points.
  1. Fundamentals
  2. Referee Requirements

API Points

The points API allows you to unlock affiliate rewards based on how many points each referee has received.

PreviousAPI EventsNextChecking your program before launch

Last updated 1 year ago

You can send points for each user to ShareMint using our API.

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

You can send multiple points for each user. For example, you can send us a score of 100 for fighting, 120 for breeding, and 200 for forging. You can set a requirement that rewards are unlocked if a referee has a score of at least 100 across all three categories.

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

You will be asked to fill in the following fields:

  • Name - the name of the key to store the points under. This must match the 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.

In this example, a referee must have a breeding score of at least 5, and a forging score of at least 8:

API

Send points using our API:

To save points.

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

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

keyPoints*

String

Key value pairs of points. Example: {"breeds": 12, "quests": 44}. The value is the number of points the user has amassed. This will override previous user scores. Keys not supplied are left unaffected.

address

String

The address of the user to store the points for.

email

String

The email of the user to store the points for.

projectUserId

String

The ShareMint id of the user to store the points for.

๐ŸŽฐ
API Points example