Loyi API Reference
  1. Collectible
Loyi API Reference
  • Getting Started
  • Architecture
  • User
    • Users Overview
    • Create user
      POST
    • Get users
      GET
    • Get user
      GET
    • Update user
      PUT
    • Delete user
      DELETE
  • Reward
    • Rewards Overview
    • Create reward
      POST
    • Get rewards
      GET
    • Delete reward
      DELETE
    • Create entry pass code
      POST
    • Get entry pass code
      GET
    • Airdrop reward
      PUT
    • Award reward
      POST
    • Redeem rewards
      GET
  • Collection
    • Collection Overview
    • Create collection
      POST
    • Get collections
      GET
    • Get collection
      GET
    • Update collection
      PUT
    • Delete collection
      DELETE
    • Get rewards
      GET
  • Collectible
    • Claim collectible
      POST
    • Get collectibles
      GET
  • Quest
    • Quest Overview
    • Create quest
    • Get quests
    • Get quest
    • Update quest
    • Delete quest
    • Get participants
    • Accept quest
    • Submit answers
    • Get answers
  • Leaderboard
    • Leaderboard Overview
    • Get leaderboard
  • Leveling
    • Get leveling configuration
    • Configure leveling
    • Get milestone levels
    • Create milestone level
    • Get milestone level
    • Update milestone level
    • Delete milestone level
  1. Collectible

Claim collectible

Staging
https://testserver.loyi.io/public/api
Staging
https://testserver.loyi.io/public/api
POST
/collectible/claim
Collectible
Claims a collectible.

Request

Authorization
Add parameter in header
x-api-key
Example:
x-api-key: ********************
Header Params
Origin
string 
required
The value must be one of the whitelisted domains. You can whitelist domain URLs on your Loyi dashboard.
Default:
<WHITELISTED_URL>
Example:
https://example.com
Body Params application/json
ClaimCollectibleBody
optional
One of
Example:
{"collectionId":"123e4567-e89b-12d3-a456-426655440000","userId":"123e4567-e89b-12d3-a456-426655440000"}
collectionId
string <uuid>
required
ID of the collectible to claim
userId
string <uuid>
required
ID of the user claiming the collectible
walletAddress
string 
optional
Wallet address of the user claiming the collectible
Example
{
    "collectionId": "123e4567-e89b-12d3-a456-426655440000",
    "userId": "123e4567-e89b-12d3-a456-426655440000"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://testserver.loyi.io/public/api/collectible/claim' \
--header 'Origin;' \
--header 'Content-Type: application/json' \
--header 'x-api-key;' \
--data-raw '{
    "collectionId": "123e4567-e89b-12d3-a456-426655440000",
    "userId": "123e4567-e89b-12d3-a456-426655440000"
}'

Responses

🟢201Created
application/json
Created
Body
object {0}
Example
{}
🟠400Bad Request
🟠401Unauthorized
🟠404Record Not Found
Modified at 2025-06-19 21:23:41
Previous
Get rewards
Next
Get collectibles
Built with