Description:
Returns a list of unit of measure types.
Resource URL:
https://<apphost>.competitionlabs.com/api/<your-space-name>/account/reward-types/:Id
Key | Value | Required |
---|
X-API-KEY | Your unique 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 type identifier retrieved from GET Reward Types resource |
EXAMPLE
curl
--header "X-API-KEY: <your-api-key>"
--request GET https://app.competitionlabs.com/api/test_space/account/reward-types/1cn4DmUBkPH_lz9GixDL
{
"data": {
"jsonClass": "RewardType",
"name": "Badge",
"key": "badge",
"description": "",
"accountId": "0sn4DmUBkPH_lz9GgxBM",
"system": true,
"metadata": [],
"created": "2018-08-06T11:21:34.411+0000",
"id": "1cn4DmUBkPH_lz9GixDL"
}
}
ERROR CODES
Code | HTTP Status | Description | Example |
---|
1007 | 404 | - The X-API-KEY is incorrect
- Incorrect space name
- Reward type id is incorrect
|
{
"errors": [
{
"message": "No key found for value - [a0b1234567890350155588cb7ca]",
"code": 1007,
"status": 404
}
]
}
{
"errors": [
{
"message": "No account found for space name - [test]",
"code": 1007,
"status": 404
}
]
}
{
"errors": [
{
"message": "A record with requested id [1cn4DmUBkPH_lz9GixDLa] for reward-types was not found.",
"code": 1007,
"status": 404
}
]
}
|
| 404 | The Request URL is incorrect | |
| 401 | The X-API-KEY is missing | |