API Points

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

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

NameTypeDescription

Content-Type*

String

application/json

Request Body

NameTypeDescription

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.

Last updated