Referral

Claim a referral code

Changed on
post/v1/referral/claim

Request

Request body

signaturestring hex required

Hex-encoded EIP-712 signature authorizing this request

Example request

{
  "data": {
    "code": "XYZ123456789",
    "sender": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
    "signedAt": 1712019600
  }
}

Response

codestring

The referee's referral code to be shared and claimed by others (undefined if not activated)

codeUsageRemaininginteger required

Number of remaining times the referral code can be claimed

createdAtinteger required

Timestamp of when this referral was activated (ms since Unix Epoch)

idstring uuid required

Id representing the referral

refereestring hex required

Address of the referee (non-checksummed)

refereeTotalPointsstring decimal required

Total points (excl. referral points) earned by the referee since referee claimed the code (precision: 9)

referrerstring hex

Address of the referrer (non-checksummed; undefined if not set)

Example response

{
  "code": "XYZ123456789",
  "codeUsageRemaining": 5,
  "createdAt": 1712019600000,
  "id": "9036443a-441a-4a66-87f2-bd5c44cdca7a",
  "referee": "0x4c9EDD5852cd905f086C759E8383e09bff1E68B3",
  "refereeTotalPoints": "1234567.890000000",
  "referrer": "0x41e038d9c9aF27369EcBCe72A69a96695A1fD0D3"
}

Changes

    • info

      added the non-success response with the status

    • breaking

      added to the / request property allOf list

    • breaking

      removed the enum value 0.00 of the request property /

    • breaking

      removed the enum value 1.00 of the request property /

    • breaking

      removed the enum value 2.00 of the request property /

    • breaking

      removed the enum value 3.00 of the request property /

    • breaking

      the / request property type changed from number to no type

    • info

      the response's property default value Bad Request was removed for the status

    • info

      the response's property default value Forbidden was removed for the status

    • info

      the response's property default value Not Found was removed for the status

    • info

      the response's property default value Too Many Requests was removed for the status

    • info

      the response's property default value Unauthorized was removed for the status

    • info

      the response's property default value Unprocessable Entity was removed for the status

    • info

      the response's property default value 400 was removed for the status

    • info

      the response's property default value 401 was removed for the status

    • info

      the response's property default value 403 was removed for the status

    • info

      the response's property default value 404 was removed for the status

    • info

      the response's property default value 422 was removed for the status

    • info

      the response's property default value 429 was removed for the status

    • info

      response property message list-of-types was narrowed by removing types array from media type application/json of response 400