Use of the resource properties

  1. Every resource in API has a list of parameters, that are static. As we know, every client has different requirements, and that's why we have additional properties structure in some of our resources. The additional properties contain list of a properties, that can be used by clients to set up a properties that are not used in the main parameters of a resource. The additional properties make API flexible to use.

  2. Resource [badge-blue GET] /rewards contains an additional properties parameter. Additional properties have the same strutcure throughout the API.

  3. API call of the resource [badge-blue GET] /rewards can show us all properties and the values of that resource:

    POST <projectURL>/rest-api/customer-interface/v1.0/rewards
    Content-Type: application/json
    Accept-Language: cs, en-gb;q=0.8
    #<user name>:<token>
    Authorization: Basic Y3VzdG9tZXJfaW50ZXJmYWNlOmNlMzZjMDg2YmZjN2U3YjBkMjNjNjY3YjdhOTUxZTk=
  4. You will get a response containing the list of rewards with all of their additional properties.
"data": {
    "rewards": [
        "reward_id": "8bdf68d3838b4e009991819e85",
        "code": "",
        "name": "Letní balíček 2017",
        "note": null,
        "additional_properties": [
            "property_record_id": "global:8bdf68d3838b4e009991819e85",
            "property_id": "global",
            "property_name": "Global setup of reward",
            "property_value": true,
            "last_change": "2017-06-14 10:43:49.882375"
        "priority": null,
        "image_urls": [],
        "last_change": "2017-06-14 10:43:49.882375",
        "state": 1