Get user's welcome bonus, if eligible

GET /v1/client/promotions/welcome-bonus

Get user's welcome bonus, if eligible.

Responses

  • 200 application/json

    OK

    Hide response attribute Show response attribute object
    • data object
      Hide data attributes Show data attributes object
      • user_reward_currency number(float)

        The once off user reward currency a user will receive upon claiming the welcome bonus

      • bonus_type string

        Values are FLAT_AMOUNT or PERCENTAGE.

      • value number(float)

        The percentage value which will be used to calculate the user reward upon the completed survey, offer, etc. reward

      • duration_seconds integer(int32)

        The amount of seconds that the welcome bonus is active since the time it was claimed by the user.

      • allowed_demands array[string]

        Values are SURVEYS, OFFERS, or MAGIC_RECEIPTS.

      • expires_at string(date-time)

        Welcome bonus expiration timestamp, calculated as duration_seconds after the time the welcome bonus was claimed.

GET /v1/client/promotions/welcome-bonus
curl \
 --request GET 'https://api.bitlabs.ai/v1/client/promotions/welcome-bonus' \
 --header "X-Api-Token: $API_KEY" \
 --header "X-User-Id: $API_KEY"
{
  "data": {},
  "status": "success",
  "trace_id": "2050914de1c94427"
}
{
  "data": {
    "bonus_type": "FLAT_AMOUNT",
    "user_reward_currency": 0.43
  },
  "status": "success",
  "trace_id": "2050914de1c94427"
}
{
  "data": {
    "value": 4,
    "bonus_type": "PERCENTAGE",
    "expires_at": "2021-12-31T23:59:59Z",
    "allowed_demands": [
      "SURVEYS",
      "OFFERS"
    ],
    "duration_seconds": 36000
  },
  "status": "success",
  "trace_id": "2050914de1c94427"
}