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

PS: You can also edit 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/update-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”
userLimitAwardstringOptional Pass “-1” if you do not want a maximum number Default: -1
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"
}
{
    "id": "d905d9ca-5138-43fb-b670-aecae0eea0ec",
    "name": "Edited Rule Name",
}'
{
  "status": "success",
  "message": "rule updated successfully.",
  "data": {
    "id": "bddd3fec-edbd-4fd9-8519-07d4a309d395",
    "name": "edited rule name",
    "coinValue": "10",
    "condition": "user writes 5 lines",
    "maxNumberOfParticipant": "20000",
    "status": "active"
  }
}