Skip to main content

Daily Login Reward

daily login reward

The Daily Login Rewards API allows players to claim their daily login rewards and view the list of rewards they have received. This service is designed to enhance user engagement by rewarding users for their daily participation.

All endpoints in the Daily Login Rewards API are protected and require authentication. Ensure to include a valid Authorization header with your API requests.

info

Base Endpoint : /api/v1/daily-login-reward

Available Endpoints

1. Claim Daily Login Reward

  • Method and PathPOST /claim
  • Description: Allows a gamer to claim their reward for daily login. The reward sequence can be specified to claim a specific reward.
  • Headers:
    • Authorization — Required. A valid authentication token.
  • Query Parameters:
    • sequence — Optional. The sequence number of the reward to claim. If not provided, the next available reward will be claimed.
  • Request Body: None
  • Response Body:
    • id: The unique identifier of the claimed reward.
    • sequence: Sequence of the reward that was claimed.
    • claimable: Boolean representing if the reward is claimable.
    • claimed: Boolean representing if the reward is claimed.
    • items: Array of objects containing,
      • inventoryItemId: ID of the inventory item that is claimed
      • quantity: Amount of Inventory Items transferred to gamer's inventory

cURL Command

curl --request POST \
--url https://api.yarsaplay.com/api/v1/daily-login-reward/claim \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'

Response Body

{
"claimable": false,
"claimed": true,
"id": "<uuid>",
"items": [
{
"inventoryItemId": "<uuid>",
"quantity": 0
},
{
"inventoryItemId": "<uuid>",
"quantity": 0
}
],
"sequence": 1
}

2. Get List of Gamer Rewards

  • Method and PathGET /
  • Description: Retrieves a list of rewards that the gamer has received
  • Headers:
    • Authorization — Required. A valid authentication token
  • Query Parameters: None
  • Request Body: None
  • Response Body: An array of objects, each representing a reward. Each object includes:
    • id: The unique identifier of the claimed reward.
    • sequence: Sequence of the reward that was claimed
    • claimable: Boolean representing if the reward is claimable
    • claimed: Boolean representing if the reward is claimed
    • items: Array of objects containing,
      • inventoryItemId: ID of the inventory item that is claimed
      • quantity: Amount of Inventory Items transferred to gamer's inventory

cURL Command

curl --request GET \
--url https://api.yarsaplay.com/api/v1/daily-login-reward \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'

Response Body

{
"id": "<uuid>",
"inventoryItemId": "<uuid>",
"items": [
{
"inventoryItemId": "<uuid>",
"quantity": 0
}
],
"quantity": 0
}