{
  "status": "success",
  "message": "rule created successfully.",
  "data": {
    "id": "bddd3fec-edbd-4fd9-8519-07d4a309d395",
    "name": "documenting",
    "coinValue": "10",
    "condition": "user writes 5 lines",
    "maxNumberOfParticipant": "20000",
    "status": "active"
  }
}

PS: You can also create rules on your dashbaord. Rule Name must be in lower case and must be unique.

URL

https://test-api.bvndle.com/api/v1/laas/rules/create-rule

HTTP Method
POST
Authorization Header
Bearer ACCESS_TOKEN

nametypeDescription
namestringRequired Rule Name
coinValuestringRequired Amount of coin to be given
maxNumberOfParticipantstringRequired Maximum Number of Participants (Number of users who can be rewarded.)
conditionstringRequired (if type is not combined) More instruction or condition to be fulfilled
statusstringOptional Default: active Values: “active” or “inactive”
typestringOptional Default: single Values: single, batched, combined
completionNumberstringOptional (if type is not batched) Default: 1
userLimitAwardstringOptional Pass “-1” if you do not want a maximum number Default: -1
rulesstringOptional (if type is not combined) Array of object containing the rules data {name: string, condition: string, status: string}
cURL
curl --request GET 'https://test-api.bvndle.com/api/v1/laas/rules/create-rule' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ACCESS_TOKEN' \
--data-raw '{
  "name": "Transaction Drive",
  "coinValue": "10",
  "maxNumberOfParticipant": "20000",
  "condition": "User makes 5 transactions"
}
{
  "userId": "f0c8c81d-13d3-4515-b40f-711ef91de094",
  "ruleName": "transaction drive"
}'
{
  "status": "success",
  "message": "rule created successfully.",
  "data": {
    "id": "bddd3fec-edbd-4fd9-8519-07d4a309d395",
    "name": "documenting",
    "coinValue": "10",
    "condition": "user writes 5 lines",
    "maxNumberOfParticipant": "20000",
    "status": "active"
  }
}