Sub-resources of rewards

All available methods for the sub-resources of the resource rewards.


Get vouchers tied to a reward

Get information about all vouchers created in relation to a specific reward
[badge-blue GET] /rewards/{reward_id}/vouchers

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
customer_id string The unique id for the customer that has the vouchers on the account. No
store_id string The unique id for the store where the reward can be applied. No

Path parameters

Parameter name Type Description Mandatory (Yes/No)
reward_id string The unique id for the reward Yes

Response

Status code: 200 OK
Output structure : object

Parameter name Type Description
vouchers Vouchers[] List of vouchers tied to a reward
total_items integer Count of all found vouchers

Example Request

GET https://<projectURL>/rest-api/enterprise-interface/v1.0/rewards/86c408291d046d9ddad22288d/vouchers
Content-Type: application/json
Accept-Language: cs, en-gb;q=0.8
Authorization: Basic ZW50ZXJwcmlzZV9pbnRlcmZhY2U6ODRlYTZkYWE22Q1N2VhNmQ2ZDIyMzk5YTQxY2EwNmE3Mzk4NGE2ZmZkMzdiOTdjYjk4M2M0Mg==
HTTP/1.1 200 OK
Date: Fri, 11 Dec 2020 16:32:11 GMT
Content-Type: application/json; charset=utf-8

{
  "data": {
    "vouchers": [
      {
        "voucher_id": "8fb74001f93376c1fa3e6c6a87",
        "customer_id": "82c15576d664b75e93e8061933",
        "store_id": "86e05affc7a7abefcd513ab400",
        "code": "",
        "value": -2.99,
        "applied_date": "2012-12-14 15:05:04",
        "valid_from": null,
        "valid_to": null,
        "reward_group": "86c408291d0466d9ddad22288d",
        "reward": {
          "reward_id": "86c408291d0466d9ddad22288d",
          "code": null,
          "name": "Dezert_free",
          "note": null,
          "subtitle": null,
          "points_cost": 400,
          "valid_time_from": null,
          "valid_time_to": null,
          "reward_group": 0,
          "store_list": [
            {
              "store_id": "86e05affc7a7abefcd513ab400",
              "store_code": "",
              "name": "name changed",
              "store_address": {
                "address1": "Hlavní",
                "address2": "18",
                "address3": null,
                "address4": null,
                "address5": null,
                "address6": null,
                "address7": null,
                "zip": "19875",
                "city": "Borohrádek",
                "country_code": "cz"
              },
              "contact_email": null,
              "manager_name": null,
              "phone_number": null,
              "partner_id": "86e05affc7a7abefcd513ab400",
              "system_id": "2375303497",
              "gps_coordinates": {
                "gps_longitude": 0,
                "gps_latitude": 0
              },
              "url_address": "",
              "opening": [
                {
                  "day_id": "MON",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "TUE",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "WED",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "THU",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "FRI",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "SAT",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "SUN",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                }
              ],
              "image_urls": [],
              "visibility_for_customer": 1,
              "description": "",
              "short_description": "",
              "registration_id": null,
              "last_change": "2020-12-09 14:43:30",
              "state": 1
            },
            {
              "store_id": "8fdd651ff3f615bcebebad87ce",
              "store_code": "",
              "name": "Fine Pub",
              "store_address": {
                "address1": "",
                "address2": "",
                "address3": null,
                "address4": null,
                "address5": null,
                "address6": null,
                "address7": null,
                "zip": "",
                "city": "",
                "country_code": "cz"
              },
              "contact_email": "",
              "manager_name": "",
              "phone_number": "",
              "partner_id": "86e05affc7a7abefcd513ab400",
              "system_id": "2040011764",
              "gps_coordinates": {
                "gps_longitude": 0,
                "gps_latitude": 0
              },
              "url_address": "",
              "opening": [
                {
                  "day_id": "MON",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "TUE",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "WED",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "THU",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "FRI",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "SAT",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "SUN",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                }
              ],
              "image_urls": [],
              "visibility_for_customer": 1,
              "description": "",
              "short_description": "",
              "registration_id": null,
              "last_change": "2016-08-31 08:51:55",
              "state": 0
            }
          ],
          "additional_properties": [],
          "priority": null,
          "image_urls": [],
          "has_product_condition": false,
          "has_group_condition": true,
          "has_brand_condition": false,
          "is_automated": false,
          "last_change": "2013-06-10 11:57:59.010553",
          "state": 1
        },
        "last_change": "2012-12-14 15:06:10",
        "state": 1
      },
      {
        "voucher_id": "86cdaff53b2a166ba3713f2e67",
        "customer_id": "82c15576d664b75e93e8061933",
        "store_id": "86e05affc7a7abefcd513ab400",
        "code": "",
        "value": 2.99,
        "applied_date": "2012-12-14 15:04:19",
        "valid_from": null,
        "valid_to": null,
        "reward_group": "86c408291d0466d9ddad22288d",
        "reward": {
          "reward_id": "86c408291d0466d9ddad22288d",
          "code": null,
          "name": "Dezert_free",
          "note": null,
          "subtitle": null,
          "points_cost": 400,
          "valid_time_from": null,
          "valid_time_to": null,
          "reward_group": 0,
          "store_list": [
            {
              "store_id": "86e05affc7a7abefcd513ab400",
              "store_code": "",
              "name": "name changed",
              "store_address": {
                "address1": "Hlavní",
                "address2": "18",
                "address3": null,
                "address4": null,
                "address5": null,
                "address6": null,
                "address7": null,
                "zip": "19875",
                "city": "Borohrádek",
                "country_code": "cz"
              },
              "contact_email": null,
              "manager_name": null,
              "phone_number": null,
              "partner_id": "86e05affc7a7abefcd513ab400",
              "system_id": "2375303497",
              "gps_coordinates": {
                "gps_longitude": 0,
                "gps_latitude": 0
              },
              "url_address": "",
              "opening": [
                {
                  "day_id": "MON",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "TUE",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "WED",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "THU",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "FRI",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "SAT",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "SUN",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                }
              ],
              "image_urls": [],
              "visibility_for_customer": 1,
              "description": "",
              "short_description": "",
              "registration_id": null,
              "last_change": "2020-12-09 14:43:30",
              "state": 1
            },
            {
              "store_id": "8fdd651ff3f615bcebebad87ce",
              "store_code": "",
              "name": "New Pub",
              "store_address": {
                "address1": "",
                "address2": "",
                "address3": null,
                "address4": null,
                "address5": null,
                "address6": null,
                "address7": null,
                "zip": "",
                "city": "",
                "country_code": "cz"
              },
              "contact_email": "",
              "manager_name": "",
              "phone_number": "",
              "partner_id": "86e05affc7a7abefcd513ab400",
              "system_id": "2040011764",
              "gps_coordinates": {
                "gps_longitude": 0,
                "gps_latitude": 0
              },
              "url_address": "",
              "opening": [
                {
                  "day_id": "MON",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "TUE",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "WED",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "THU",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "FRI",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "SAT",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "SUN",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                }
              ],
              "image_urls": [],
              "visibility_for_customer": 1,
              "description": "",
              "short_description": "",
              "registration_id": null,
              "last_change": "2016-08-31 08:51:55",
              "state": 0
            }
          ],
          "additional_properties": [],
          "priority": null,
          "image_urls": [],
          "has_product_condition": false,
          "has_group_condition": true,
          "has_brand_condition": false,
          "is_automated": false,
          "last_change": "2013-06-10 11:57:59.010553",
          "state": 1
        },
        "last_change": "2012-12-14 15:05:10",
        "state": 1
      }
    ],
    "total_items": 2
  }
}


Get products tied to a reward

Get information about all products created in relation to a specific reward
[badge-blue GET] /rewards/{reward_id}/products

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

Path parameters

Parameter name Type Description Mandatory (Yes/No)
reward_id string The unique id of the reward Yes

Response

Status code: 200 OK
Output structure : object

Parameter name Type Description
products Product[] List of products tied to a reward
total_items integer Count of all found products

Example Request

GET https://<projectURL>/rest-api/enterprise-interface/v1.0/rewards/87cb1420907156ccf86bc3ec7b/products
Content-Type: application/json
Accept-Language: cs, en-gb;q=0.8
Authorization: Basic ZW50ZXJwcmlzZV9pbnRlcmZhY2U6NDU3NDJhMDAxNmEyZjcNDI3YWUwMTM0NmMyOWQxNmE4NzI1MWZlzZmMzcwNmI2MDJmDfN2Q2Mw==

Example response

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

{
  "data": {
    "products": [],
    "total_items": 0
  }
}


Get product groups tied to a reward

Get information about all product groups created in relation to a specific reward
[badge-blue GET] /rewards/{reward_id}/product-groups

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

Path parameters

Parameter name Type Description Mandatory (Yes/No)
reward_id string The unique id of the reward Yes

Response

Status code: 200 OK
Output structure : object

Parameter name Type Description
product_groups ProductGroup[] List of product groups tied to a reward
total_items integer Count of all found product groups

Example Request

GET https://<projectURL>/rest-api/enterprise-interface/v1.0/rewards/87cb1420907156ccf86bc3ec7b/product-groups
Content-Type: application/json
Accept-Language: cs, en-gb;q=0.8
Authorization: Basic ZW50ZXJwcmlzZV9pbnRlcmZhY2U6NDU3NDJhMNmEyZjc1NDI3YWUwMTM0NmMyOWQxNmE4NzI1MWZlzZmMzcwNmI2MDJmDfN2Q2Mw==

Example response

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

{
  "data": {
    "product_groups": [
      {
        "product_group_id": "87c4c16c6d82d44ab7f50d537e",
        "name": "Desserts",
        "parent_product_group_id": null,
        "code": null,
        "external_id": "53",
        "store_id": "83d1d11ea3884a5d33253fe214",
        "last_change": "2019-02-08 15:35:09",
        "state": 1
      },
      {
        "product_group_id": "84c4fc59aaecd6f54d3489c2a6",
        "name": "Coffee tea",
        "parent_product_group_id": null,
        "code": null,
        "external_id": "37",
        "store_id": "83d1d11ea3884a5d33253fe214",
        "last_change": "2019-02-08 15:35:09",
        "state": 1
      }
    ],
    "total_items": 2
  }
}


Get product brands tied to a reward

Get information about all product brands created in relation to a specific reward
[badge-blue GET] /rewards/{reward_id}/product-brands

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

Path parameters

Parameter name Type Description Mandatory (Yes/No)
reward_id string The unique id of the reward Yes

Response

Status code: 200 OK
Output structure : object

Parameter name Type Description
product_brands ProductBrand[] List of product brands tied to a reward
total_items integer Count of all found product brands

Example Request

GET https://<projectURL>/rest-api/enterprise-interface/v1.0/rewards/87cb1420907156ccf86bc3ec7b/product-brands
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:18:53 GMT
Content-Type: application/json; charset=utf-8

{
  "data": {
    "product_brands": [],
    "total_items": 0
  }
}


Get all stores

Get information as a list of all stores of specific reward. Customer can apply this reward in every of these stores
[badge-blue GET] /rewards/{reward_id}/stores

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
visible_for_customer integer State of the visibility for the customer
Possible values are: 0 - invisible / 1- visible. If query string is not used, return both.
No

Response

Status code: 200 OK
Output structure : object

Parameter name Type Description
stores Store[] List of the all stores where customer can apply reward
total_items integer Count of all found stores

Example request

GET https://<projectURL>/rest-api/enterprise-interface/v1.0/rewards/88c35b274dac5e9e700f83ceb/stores
Content-Type: application/json
Accept-Language: cs, en-gb;q=0.8
Authorization: Basic ZW50ZXJwcmlzZV9pbnRlcmZhY2U6YjUwOTFzA4MDk3ODFlMU2YTE2YzU4YjMxYThlZGRiOTM5NTAwZTgxYjBkNTFkZTE2OWIwN2NhMg==

Example response

HTTP/1.1 200 OK
Date: Tue, 20 Apr 2021 17:32:46 GMT
Content-Type: application/json; charset=utf-8

{
  "data": {
    "stores": [
      {
        "store_id": "86e05affc7a7abefcd13ab400",
        "store_code": "1",
        "name": "Nr.1",
        "store_address": {
          "address1": "Main street",
          "address2": "18",
          "address3": null,
          "address4": null,
          "address5": null,
          "address6": null,
          "address7": null,
          "zip": "19000",
          "city": "Prague",
          "country_code": "sk"
        },
        "contact_email": "contact@store.com",
        "manager_name": "Mana Ger",
        "phone_number": "124876432",
        "partner_id": "86e05affc7a7abefcd53ab400",
        "system_id": "jlfndsklfjndslj",
        "gps_coordinates": {
          "gps_longitude": 50.1109307,
          "gps_latitude": 14.5156542
        },
        "url_address": "",
        "opening": [
          {
            "day_id": "MON",
            "time_intervals": [
              {
                "from": "9:00:00",
                "to": "12:00:00"
              },
              {
                "from": "13:00:00",
                "to": "18:00:00"
              }
            ]
          },
          {
            "day_id": "TUE",
            "time_intervals": [
              {
                "from": null,
                "to": null
              },
              {
                "from": null,
                "to": null
              }
            ]
          },
          {
            "day_id": "WED",
            "time_intervals": [
              {
                "from": null,
                "to": null
              },
              {
                "from": null,
                "to": null
              }
            ]
          },
          {
            "day_id": "THU",
            "time_intervals": [
              {
                "from": null,
                "to": null
              },
              {
                "from": null,
                "to": null
              }
            ]
          },
          {
            "day_id": "FRI",
            "time_intervals": [
              {
                "from": null,
                "to": null
              },
              {
                "from": null,
                "to": null
              }
            ]
          },
          {
            "day_id": "SAT",
            "time_intervals": [
              {
                "from": null,
                "to": null
              },
              {
                "from": null,
                "to": null
              }
            ]
          },
          {
            "day_id": "SUN",
            "time_intervals": [
              {
                "from": null,
                "to": null
              },
              {
                "from": null,
                "to": null
              }
            ]
          }
        ],
        "image_urls": [],
        "visibility_for_customer": 1,
        "description": "",
        "short_description": "",
        "registration_id": null,
        "last_change": "2021-03-17 11:31:48",
        "state": 1
      }
    ],
    "total_items": 1
  }
}