Description:
Update reward details in the CompetitionLabs system for a given reward identifier.
Resource URL:
https://<apphost>.competitionlabs.com/api/<your-space-name>/reward/<rewardId>
Key | Value | Required |
---|
X-API-KEY |
| Yes |
Content-Type | application/json | Yes |
Request URL parameters
| | | |
---|
space | String | Yes | This is the space name which is linked to the account |
id | String | Yes | Reward identifier retrieved from publicĀ GET Rewards resource |
EXAMPLE
curl
--header "X-API-KEY: <your-api-key>"
--header "Content-Type: application/json"
--request PUT https://app.competitionlabs.com/api/<your-space-name>/reward/KLOrzmUBOmEkXOJn8GTp
-d '{ "jsonClass": "Reward", "entityId": "J7OrzmUBOmEkXOJn8GTb", "rewardRank": "1", "rewardName": "test", "value": 1, "rewardType": "RmTbPGUBsZyUBGORB-_M", "description": "test", "delay": 0, "memberAcknowledgmentRequired": false, "metadata": [ { "jsonClass": "Metadata", "key": "1", "value": "1" } ], "accountId": "QmTaPGUBsZyUBGOR_u9A", "pointInTime": "2018-09-12T16:44:59.497+00:00", "created": "2018-09-12T16:44:59.497+00:00", "id": "KLOrzmUBOmEkXOJn8GTp", "translations": {}, "translatableFields": [ "rewardName", "description" ] }'
{
"data": {
"jsonClass": "Reward",
"entityId": "J7OrzmUBOmEkXOJn8GTb",
"rewardRank": "1",
"rewardName": "test",
"value": 1,
"rewardType": "RmTbPGUBsZyUBGORB-_M",
"description": "test",
"delay": 0,
"memberAcknowledgmentRequired": false,
"metadata": [
{
"jsonClass": "Metadata",
"key": "1",
"value": "1"
}
],
"accountId": "QmTaPGUBsZyUBGOR_u9A",
"pointInTime": "2018-09-12T16:44:59.497+00:00",
"created": "2018-09-12T16:44:59.497+00:00",
"id": "KLOrzmUBOmEkXOJn8GTp",
"translations": {},
"translatableFields": [
"rewardName",
"description"
]
}
}
ERROR CODES
Code | HTTP Status | Description | Example |
---|
| 404 |
| |
1007 | 404 | Reward with CL-RewardId not found for the accountId |
{
"errors": [
{
"message": "Reward with CL-RewardId: KLOrzmUBOmEkXOJn8GTpa not found for the account: QmTaPGUBsZyUBGOR_u9A.",
"code": 1007,
"status": 404
}
]
}
|