Reward properties

Reward properties are list of available properties for rewards resource.

Available methods

All available methods for resource reward properties.

HTTP method Endpoint Description
[badge-blue GET] /reward-properties Get information about all reward properties
[badge-blue GET] /reward-properties/{reward_property_id} Get information about a reward property


Get all reward properties

Get information about reward properties
[badge-blue GET] /reward-properties

Query string

Parameter name Type Description Mandatory (Yes/No)
count integer The number of records to return.
Default value is 100.
No
offset integer The number of records from a collection to skip.
Default value is 0.
No
sort_field string One of the query string parameters for sorting.
Response is sorted by the specified field.
No
sort_direction string Direction of sorting the response list.
Possible values are: ASC / DESC
No
name string Name for the property No

Response

Status code: 200 OK
Output structure : object

Parameter name Type Description
reward_properties Property[] List of all reward properties
total_items integer Count of all found reward properties

Example Request

GET https://<projectURL>/rest-api/enterprise-interface/v1.0/reward-properties?name=Subtitle
Content-Type: application/json
Accept-Language: cs, en-gb;q=0.8
Authorization: Basic ZW50ZXJwcmlzZV9pbnRlcmZhY2U6NDU3NJhMDAxNmEyZjc1NDI3YWUwMTM0NmMyOWQxNmE4NzI1MWZlzZmMzcwNmI2MDJmDfN2Q2Mw==

Example response

HTTP/1.1 200 OK
Date: Tue, 20 Oct 2020 14:22:12 GMT
Content-Type: application/json; charset=utf-8

{
  "data": {
    "rewards_properties": [
      {
        "property_id": "subtitle",
        "name": "Subtitle",
        "description": null,
        "data_type": "string",
        "items": null,
        "is_required": false,
        "is_unique": false,
        "last_change": null,
        "state": 1
      }
    ],
    "total_items": 1
  }
}


Get a reward property

Get information about a specific reward property
[badge-blue GET] /reward-properties/{reward_property_id}

Path parameters

Parameter name Type Description
reward_property_id string The unique id for the reward property

Response

Status code: 200 OK
Output structure : Property

Example Request

GET https://<projectURL>/rest-api/enterprise-interface/v1.0/reward-properties/subtitle
Content-Type: application/json
Accept-Language: cs, en-gb;q=0.8
Authorization: Basic ZW50ZXJwcmlzZV9pbnRlcmZhY2U6NDU3NDJhMDAxNmEyZjc1NDI3YWUwMTM0NmMyOWQxNmE4NzI1MWZlzZmMzcwNmI2MDJmDfN2Q2Mw==

Example response

HTTP/1.1 200 OK
Date: Tue, 20 Oct 2020 14:22:46 GMT
Content-Type: application/json; charset=utf-8

{
  "data": {
    "property_id": "subtitle",
    "name": "Subtitle",
    "description": null,
    "data_type": "string",
    "items": null,
    "is_required": false,
    "is_unique": false,
    "last_change": null,
    "state": 1
  }
}