> For the complete documentation index, see [llms.txt](https://help.openloyalty.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.openloyalty.io/api-reference/reward.md).

# Reward

These endpoints allow you to easily manage rewards.

## Buy a reward

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br>\
> This method allows buying a specific Reward by Member.\<br>\
> With error 'No coupons left' returned when reward cannot be bought because of lack of coupons.\
> With error 'Not enough points' returned when reward cannot be bought because of not enough points on customer account. With empty error returned when reward limits exceeded.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Reward","description":"These endpoints allow you to easily manage rewards."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"reward":{"name":"reward","in":"path","description":"Reward ID","required":true,"schema":{"type":"string","format":"uuid"}}},"schemas":{"StaticCoupon":{"required":["customerId","quantity","withoutPoints"],"properties":{"customerId":{"type":"string","format":"uuid"},"quantity":{"type":"integer"},"couponValue":{"type":"number","format":"float"},"dateValid":{"type":"string","format":"date-time"},"withoutPoints":{"type":"boolean"},"rewardWalletCode":{"type":"string"}},"type":"object"},"DynamicCoupon":{"required":["customerId","quantity","couponValue","withoutPoints"],"properties":{"customerId":{"type":"string","format":"uuid"},"quantity":{"type":"integer"},"couponValue":{"type":"number","format":"float"},"dateValid":{"type":"string","format":"date-time"},"withoutPoints":{"type":"boolean"},"rewardWalletCode":{"type":"string"}},"type":"object"},"ConversionCoupon":{"required":["customerId"],"properties":{"customerId":{"type":"string","format":"uuid"},"dateValid":{"type":"string","format":"date-time"},"units":{"type":"number","format":"float"}},"type":"object"},"MaterialReward":{"required":["customerId","quantity","withoutPoints"],"properties":{"customerId":{"type":"string","format":"uuid"},"quantity":{"type":"integer"},"withoutPoints":{"type":"boolean"},"rewardWalletCode":{"type":"string"}},"type":"object"}},"responses":{"BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"required":["code","message","errors"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"required":["message","parameters","plural","code","path"],"properties":{"message":{"type":"string"},"parameters":{},"plural":{"type":"integer","nullable":true},"code":{"type":"string"},"path":{"type":"string"}},"type":"object"}}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/reward/{reward}/buy":{"post":{"tags":["Reward"],"summary":"Buy a reward","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method allows buying a specific Reward by Member.<br>\nWith error 'No coupons left' returned when reward cannot be bought because of lack of coupons.\nWith error 'Not enough points' returned when reward cannot be bought because of not enough points on customer account. With empty error returned when reward limits exceeded.\n","operationId":"rewardPostBuy","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/reward"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/StaticCoupon"},{"$ref":"#/components/schemas/DynamicCoupon"},{"$ref":"#/components/schemas/ConversionCoupon"},{"$ref":"#/components/schemas/MaterialReward"}]}}}},"responses":{"200":{"description":"Return created reward ID.","content":{"application/json":{"schema":{"type":"array","items":{"properties":{"issuedRewardId":{"description":"Created reward identity","type":"string"}},"type":"object"}}}}},"400":{"$ref":"#/components/responses/BadRequest"}}}}}}
````

## Remove coupon code

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br>\
> This method allows removing a specific coupon from the specific Reward.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Reward","description":"These endpoints allow you to easily manage rewards."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"reward":{"name":"reward","in":"path","description":"Reward ID","required":true,"schema":{"type":"string","format":"uuid"}}},"responses":{"NoContent":{"description":"Success. No content."},"BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"required":["code","message","errors"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"required":["message","parameters","plural","code","path"],"properties":{"message":{"type":"string"},"parameters":{},"plural":{"type":"integer","nullable":true},"code":{"type":"string"},"path":{"type":"string"}},"type":"object"}}},"type":"object"}}}},"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}},"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/reward/{reward}/coupon/{couponCode}":{"delete":{"tags":["Reward"],"summary":"Remove coupon code","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method allows removing a specific coupon from the specific Reward.\n","operationId":"couonDelete","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/reward"},{"name":"couponCode","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"$ref":"#/components/responses/NoContent"},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
````

## Get reward’s coupons list

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br>\
> This method returns coupons related to a specific Reward.  \
> If sorting is not chosen, the rows will be returned in an unspecified order.  \
> To sort a result, use an \`\_orderBy\` parameter in query.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Reward","description":"These endpoints allow you to easily manage rewards."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"reward":{"name":"reward","in":"path","description":"Reward ID","required":true,"schema":{"type":"string","format":"uuid"}},"page":{"name":"_page","in":"query","description":"Number of page with results, starts from 1","required":false,"schema":{"type":"integer","default":1,"minimum":1}},"itemsOnPage":{"name":"_itemsOnPage","in":"query","description":"Items on one page","required":false,"schema":{"type":"integer","default":10,"maximum":50,"minimum":1}},"orderBy":{"name":"_orderBy","in":"query","description":"Sorting order. If sorting is not chosen, the rows will be returned in an unspecified order. Sort order: * `asc` - Ascending, from A to Z * `desc` - Descending, from Z to A","required":false,"style":"deepObject","explode":true,"schema":{"type":"object","additionalProperties":{"type":"string","enum":["asc","desc"]}}}},"schemas":{"Coupon":{"properties":{"code":{"type":"string"},"issued":{"type":"boolean"}},"type":"object"},"SearchableTotalResponse2":{"properties":{"all":{"type":"integer","deprecated":true},"filtered":{"type":"integer","deprecated":true},"estimated":{"description":"Field estimated is used to show that the results are estimated. It might happen when there are more than 5000 results due to performance optimization.","type":"boolean","deprecated":true}},"type":"object","deprecated":true}},"responses":{"BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"required":["code","message","errors"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"required":["message","parameters","plural","code","path"],"properties":{"message":{"type":"string"},"parameters":{},"plural":{"type":"integer","nullable":true},"code":{"type":"string"},"path":{"type":"string"}},"type":"object"}}},"type":"object"}}}},"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}},"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/reward/{reward}/coupon":{"get":{"tags":["Reward"],"summary":"Get reward’s coupons list","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method returns coupons related to a specific Reward.  \nIf sorting is not chosen, the rows will be returned in an unspecified order.  \nTo sort a result, use an `_orderBy` parameter in query.\n","operationId":"couponGetList","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/reward"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/itemsOnPage"},{"$ref":"#/components/parameters/orderBy"},{"name":"code","in":"query","required":false,"schema":{"type":"string"}},{"name":"issued","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Returned when successful","content":{"application/json":{"schema":{"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Coupon"}},"total":{"$ref":"#/components/schemas/SearchableTotalResponse2"}},"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
````

## Add coupon list to the reward

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br>\
> This method allows adding coupons to the specific Reward.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Reward","description":"These endpoints allow you to easily manage rewards."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"reward":{"name":"reward","in":"path","description":"Reward ID","required":true,"schema":{"type":"string","format":"uuid"}}},"responses":{"NoContent":{"description":"Success. No content."},"BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"required":["code","message","errors"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"required":["message","parameters","plural","code","path"],"properties":{"message":{"type":"string"},"parameters":{},"plural":{"type":"integer","nullable":true},"code":{"type":"string"},"path":{"type":"string"}},"type":"object"}}},"type":"object"}}}},"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}},"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/reward/{reward}/coupon":{"post":{"tags":["Reward"],"summary":"Add coupon list to the reward","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method allows adding coupons to the specific Reward.\n","operationId":"couponPost","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/reward"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"properties":{"coupons":{"type":"array","items":{"type":"string"}}},"type":"object"}}}},"responses":{"204":{"$ref":"#/components/responses/NoContent"},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}},"deprecated":true}}}}
````

## Get redeemed reward’s details

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br>\
> This method returns detailed information about a specific Reward.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Reward","description":"These endpoints allow you to easily manage rewards."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"reward":{"name":"reward","in":"path","description":"Reward ID","required":true,"schema":{"type":"string","format":"uuid"}}},"schemas":{"SingleRewardResponse":{"allOf":[{"$ref":"#/components/schemas/RewardResponse"},{"properties":{"fortuneWheel":{"$ref":"#/components/schemas/FortuneWheelResponse"}},"type":"object"}]},"RewardResponse":{"properties":{"reward":{"type":"string"},"name":{"type":"string"},"levels":{"type":"array","items":{"type":"string","format":"uuid"}},"segments":{"type":"array","items":{"type":"string","format":"uuid"}},"categories":{"type":"array","items":{"type":"string","format":"uuid"}},"brandIcon":{"type":"boolean"},"rewardId":{"type":"string","format":"uuid"},"target":{"type":"string","enum":["level","segment"]},"active":{"type":"boolean"},"costInPoints":{"type":"number"},"activity":{"properties":{"allTime":{"type":"boolean"}},"type":"object"},"visibility":{"properties":{"allTime":{"type":"boolean"}},"type":"object"},"tax":{"type":"number"},"taxPriceValue":{"type":"number"},"price":{"type":"number"},"labels":{"type":"array","items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"featured":{"type":"boolean"},"public":{"type":"boolean"},"photos":{"type":"array","items":{"type":"object"}},"createdAt":{"type":"string","format":"date-time"},"usageLimit":{"properties":{"general":{"type":"number"},"perUser":{"type":"number"}},"type":"object"},"notIssuedCoupons":{"type":"number"},"limitUsages":{"properties":{"general":{"properties":{"interval":{"properties":{"type":{"type":"string","enum":["calendarHours","calendarDays","calendarWeeks","calendarMonths","calendarYears"]}},"type":"object"},"currentValue":{"type":"number","format":"float"},"limitValue":{"type":"number","format":"float"}},"type":"object"},"perMember":{"properties":{"interval":{"properties":{"type":{"type":"string","enum":["calendarHours","calendarDays","calendarWeeks","calendarMonths","calendarYears"]}},"type":"object"},"currentValue":{"type":"number","format":"float"},"limitValue":{"type":"number","format":"float"}},"type":"object"}},"type":"object"},"fulfillmentTracking":{"type":"boolean","deprecated":true},"translations":{"type":"array","items":{"properties":{"name":{"type":"string"},"id":{"type":"integer"},"locale":{"type":"string"}},"type":"object"}},"couponGenerator":{"properties":{"length":{"type":"number"},"characterSet":{"type":"string"}},"type":"object"},"couponValue":{"type":"number"},"segmentNames":{"type":"object","additionalProperties":{"type":"string"}},"levelNames":{"type":"object","additionalProperties":{"type":"string"}},"categoryNames":{"type":"object","additionalProperties":{"type":"string"}},"usageLeft":{"type":"number","deprecated":true},"usageLeftForCustomer":{"type":"number","deprecated":true},"unitsConversion":{"properties":{"ratio":{"type":"number","format":"float"},"rounding":{"type":"string","enum":["up","down","default"]}},"type":"object"}},"type":"object"},"FortuneWheelResponse":{"required":["rules"],"properties":{"rules":{"type":"array","items":{"required":["name","effects","chance"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"effects":{"type":"array","items":{"oneOf":[{"title":"give_reward","required":["effect","rewardId"],"properties":{"effect":{"type":"string","enum":["give_reward"]},"rewardId":{"type":"string","format":"uuid"},"couponValueRule":{"description":"Optional - Only required if the reward is dynamic_coupon","type":"string"}},"type":"object","additionalProperties":false},{"title":"give_points","required":["effect","pointsRule"],"properties":{"effect":{"type":"string","enum":["give_points"]},"pointsRule":{"type":"string","pattern":"^\\d+$"},"walletCode":{"type":"string"}},"type":"object","additionalProperties":false}]}},"chance":{"type":"number","format":"float","maximum":1,"minimum":0}},"type":"object","additionalProperties":false}},"limits":{"$ref":"#/components/schemas/Limit"}},"type":"object","additionalProperties":false},"Limit":{"properties":{"points":{"required":["value"],"properties":{"interval":{"properties":{"type":{"type":"string"},"value":{"type":"integer","deprecated":true}},"type":"object"},"value":{"type":"number","format":"float"}},"type":"object"},"pointsPerMember":{"required":["value"],"properties":{"interval":{"properties":{"type":{"type":"string"},"value":{"type":"integer","deprecated":true}},"type":"object"},"value":{"type":"number","format":"float"}},"type":"object"},"executionsPerMember":{"required":["value"],"properties":{"interval":{"properties":{"type":{"type":"string"},"value":{"type":"integer","deprecated":true}},"type":"object"},"value":{"type":"number","format":"float"}},"type":"object"}},"type":"object"}},"responses":{"Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"required":["message"],"properties":{"message":{"type":"string"}},"type":"object"}}}},"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}},"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/reward/{reward}":{"get":{"tags":["Reward"],"summary":"Get redeemed reward’s details","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method returns detailed information about a specific Reward.\n","operationId":"rewardGet","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/reward"}],"responses":{"200":{"description":"Returned when successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SingleRewardResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
````

## Update reward configuration

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br>\
> This method allows updating data on a specific Reward.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Reward","description":"These endpoints allow you to easily manage rewards."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"reward":{"name":"reward","in":"path","description":"Reward ID","required":true,"schema":{"type":"string","format":"uuid"}}},"schemas":{"UpdateMaterialRewardRequestBody":{"title":"Material","required":["translations","activity","visibility"],"properties":{"translations":{"properties":{"en":{"required":["name"],"properties":{"name":{"description":"Reward name","type":"string"},"shortDescription":{"description":"Reward short description","type":"string"},"usageInstruction":{"description":"Reward usage instruction","type":"string"},"conditionsDescription":{"description":"Reward conditions description","type":"string"},"brandDescription":{"description":"Brand description","type":"string"},"brandName":{"description":"Brand description","type":"string"}},"type":"object"}},"type":"object"},"categories":{"description":"Categories","type":"array","items":{"type":"string","format":"uuid"}},"tax":{"description":"Price tax","type":"number","format":"float","maximum":100,"minimum":0},"price":{"description":"Price","type":"number","format":"float","minimum":0},"taxPriceValue":{"description":"Tax price value","type":"number","format":"float","minimum":0},"active":{"type":"boolean"},"target":{"description":"Link to tiers or segments:\n\n\n * `level` - Property `levels` is required\n * `segment` - Property `segments` is required\n","type":"string","enum":["level","segment"]},"levels":{"description":"Selects specific tiers of the member","type":"array","items":{"type":"string","format":"uuid"}},"segments":{"description":"Selects specific segments of the member","type":"array","items":{"type":"string","format":"uuid"}},"activity":{"description":"Activity period","required":["allTime"],"properties":{"allTime":{"description":"Marked as unlimited period","type":"boolean"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"type":"object","additionalProperties":false},"visibility":{"description":"Visibility period","required":["allTime"],"properties":{"allTime":{"description":"Marked as unlimited period","type":"boolean"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"type":"object","additionalProperties":false},"labels":{"description":"Labels","type":"array","items":{"required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object","additionalProperties":false}},"featured":{"type":"boolean"},"public":{"type":"boolean"},"costInPoints":{"description":"Cost of reward in units","type":"number","format":"float","minimum":0,"nullable":true},"sourceWalletTypeCode":{"description":"Wallet code as a source of units","type":"string","nullable":true},"limits":{"$ref":"#/components/schemas/RewardLimit"},"usageLimit":{"description":"Legacy usage limits structure. Cannot be used together with limits.","required":["perUser"],"properties":{"perUser":{"description":"Usages limit per member (-1 means unlimited)","type":"number","format":"int32","minimum":-1},"general":{"description":"Global usages limit (-1 means unlimited). Required only when couponGenerator is defined.","type":"number","format":"int32","minimum":-1}},"type":"object","additionalProperties":false},"fulfillmentTracking":{"type":"boolean"}},"type":"object","additionalProperties":false},"RewardLimit":{"description":"New limits structure with intervals. Cannot be used together with usageLimit.","properties":{"general":{"required":["value"],"properties":{"interval":{"properties":{"type":{"type":"string","enum":["calendarHours","calendarDays","calendarWeeks","calendarMonths","calendarYears"]}},"type":"object"},"value":{"type":"number","format":"float"}},"type":"object"},"perMember":{"required":["value"],"properties":{"interval":{"properties":{"type":{"type":"string","enum":["calendarHours","calendarDays","calendarWeeks","calendarMonths","calendarYears"]}},"type":"object"},"value":{"type":"number","format":"float"}},"type":"object"}},"type":"object"},"UpdateStaticCouponRewardRequestBody":{"title":"Static coupon","required":["translations","activity","visibility","couponValue"],"properties":{"translations":{"properties":{"en":{"required":["name"],"properties":{"name":{"description":"Reward name","type":"string"},"shortDescription":{"description":"Reward short description","type":"string"},"usageInstruction":{"description":"Reward usage instruction","type":"string"},"conditionsDescription":{"description":"Reward conditions description","type":"string"},"brandDescription":{"description":"Brand description","type":"string"},"brandName":{"description":"Brand description","type":"string"}},"type":"object"}},"type":"object"},"categories":{"description":"Categories","type":"array","items":{"type":"string","format":"uuid"}},"tax":{"description":"Price tax","type":"number","format":"float","maximum":100,"minimum":0},"price":{"description":"Price","type":"number","format":"float","minimum":0},"taxPriceValue":{"description":"Tax price value","type":"number","format":"float","minimum":0},"active":{"type":"boolean"},"target":{"description":"Link to tiers or segments:\n\n\n * `level` - Property `levels` is required\n * `segment` - Property `segments` is required\n","type":"string","enum":["level","segment"]},"levels":{"description":"Selects specific tiers of the member","type":"array","items":{"type":"string","format":"uuid"}},"segments":{"description":"Selects specific segments of the member","type":"array","items":{"type":"string","format":"uuid"}},"activity":{"description":"Activity period","required":["allTime"],"properties":{"allTime":{"description":"Marked as unlimited period","type":"boolean"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"type":"object","additionalProperties":false},"visibility":{"description":"Visibility period","required":["allTime"],"properties":{"allTime":{"description":"Marked as unlimited period","type":"boolean"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"type":"object","additionalProperties":false},"labels":{"description":"Labels","type":"array","items":{"required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object","additionalProperties":false}},"featured":{"type":"boolean"},"public":{"type":"boolean"},"costInPoints":{"description":"Cost of reward in units","type":"number","format":"float","minimum":0,"nullable":true},"sourceWalletTypeCode":{"description":"Wallet code as a source of units","type":"string","nullable":true},"limits":{"$ref":"#/components/schemas/RewardLimit"},"usageLimit":{"description":"Legacy usage limits structure. Cannot be used together with limits.","required":["perUser"],"properties":{"perUser":{"description":"Usages limit per member (-1 means unlimited)","type":"number","format":"int32","minimum":-1},"general":{"description":"Global usages limit (-1 means unlimited). Required only when couponGenerator is defined.","type":"number","format":"int32","minimum":-1}},"type":"object","additionalProperties":false},"daysInactive":{"description":"Inactive coupon period after redeem in days","type":"number","format":"int32","maximum":1000,"minimum":1},"daysValid":{"description":"Active coupon period after redeem in days. Not valid if dateValid is defined.","type":"number","format":"int32","maximum":1000,"minimum":1},"dateValid":{"description":"Explicit expiry date for the coupon. Must be within 1000 days from the current date.","type":"string","format":"date-time"},"couponGenerator":{"description":"If defined then coupon will be generated automatically based on defined strategy. Otherwise must be import manually.","required":["length","characterSet"],"properties":{"length":{"description":"Length of coupon","type":"number"},"characterSet":{"type":"string","enum":["alphanum","alpha","num"]},"prefix":{"type":"string"}},"type":"object","additionalProperties":false},"couponValueType":{"description":"Coupon value type (if empty, money will be default).","type":"string","enum":["money","percentage"]},"couponValue":{"description":"Coupon value * `money` - Money value greater than 0 * `percentage` - Percentage value 0 - 100\n","type":"number","format":"float","minimum":0,"exclusiveMinimum":true}},"type":"object","additionalProperties":false},"UpdateDynamicCouponRewardRequestBody":{"title":"Dynamic coupon","required":["translations","activity","visibility"],"properties":{"translations":{"properties":{"en":{"required":["name"],"properties":{"name":{"description":"Reward name","type":"string"},"shortDescription":{"description":"Reward short description","type":"string"},"usageInstruction":{"description":"Reward usage instruction","type":"string"},"conditionsDescription":{"description":"Reward conditions description","type":"string"},"brandDescription":{"description":"Brand description","type":"string"},"brandName":{"description":"Brand description","type":"string"}},"type":"object"}},"type":"object"},"categories":{"description":"Categories","type":"array","items":{"type":"string","format":"uuid"}},"tax":{"description":"Price tax","type":"number","format":"float","maximum":100,"minimum":0},"price":{"description":"Price","type":"number","format":"float","minimum":0},"taxPriceValue":{"description":"Tax price value","type":"number","format":"float","minimum":0},"active":{"type":"boolean"},"target":{"description":"Link to tiers or segments:\n\n\n * `level` - Property `levels` is required\n * `segment` - Property `segments` is required\n","type":"string","enum":["level","segment"]},"levels":{"description":"Selects specific tiers of the member","type":"array","items":{"type":"string","format":"uuid"}},"segments":{"description":"Selects specific segments of the member","type":"array","items":{"type":"string","format":"uuid"}},"activity":{"description":"Activity period","required":["allTime"],"properties":{"allTime":{"description":"Marked as unlimited period","type":"boolean"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"type":"object","additionalProperties":false},"visibility":{"description":"Visibility period","required":["allTime"],"properties":{"allTime":{"description":"Marked as unlimited period","type":"boolean"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"type":"object","additionalProperties":false},"labels":{"description":"Labels","type":"array","items":{"required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object","additionalProperties":false}},"featured":{"type":"boolean"},"public":{"type":"boolean"},"costInPoints":{"description":"Cost of reward in units","type":"number","format":"float","minimum":0,"nullable":true},"sourceWalletTypeCode":{"description":"Wallet code as a source of units","type":"string","nullable":true},"limits":{"$ref":"#/components/schemas/RewardLimit"},"usageLimit":{"description":"Legacy usage limits structure. Cannot be used together with limits.","required":["perUser"],"properties":{"perUser":{"description":"Usages limit per member (-1 means unlimited)","type":"number","format":"int32","minimum":-1},"general":{"description":"Global usages limit (-1 means unlimited). Required only when couponGenerator is defined.","type":"number","format":"int32","minimum":-1}},"type":"object","additionalProperties":false},"daysInactive":{"description":"Inactive coupon period after redeem in days","type":"number","format":"int32","maximum":1000,"minimum":1},"daysValid":{"description":"Active coupon period after redeem in days. Not valid if dateValid is defined.","type":"number","format":"int32","maximum":1000,"minimum":1},"dateValid":{"description":"Explicit expiry date for the coupon. Must be within 1000 days from the current date.","type":"string","format":"date-time"},"couponGenerator":{"description":"If defined then coupon will be generated automatically based on defined strategy. Otherwise must be import manually.","required":["length","characterSet"],"properties":{"length":{"description":"Length of coupon","type":"number"},"characterSet":{"type":"string","enum":["alphanum","alpha","num"]},"prefix":{"type":"string"}},"type":"object","additionalProperties":false}},"type":"object","additionalProperties":false},"UpdateConversionCouponRewardRequestBody":{"title":"Conversion coupon","required":["translations","activity","visibility","unitsConversion"],"properties":{"translations":{"properties":{"en":{"required":["name"],"properties":{"name":{"description":"Reward name","type":"string"},"shortDescription":{"description":"Reward short description","type":"string"},"usageInstruction":{"description":"Reward usage instruction","type":"string"},"conditionsDescription":{"description":"Reward conditions description","type":"string"},"brandDescription":{"description":"Brand description","type":"string"},"brandName":{"description":"Brand description","type":"string"}},"type":"object"}},"type":"object"},"categories":{"description":"Categories","type":"array","items":{"type":"string","format":"uuid"}},"tax":{"description":"Price tax","type":"number","format":"float","maximum":100,"minimum":0},"price":{"description":"Price","type":"number","format":"float","minimum":0},"taxPriceValue":{"description":"Tax price value","type":"number","format":"float","minimum":0},"active":{"type":"boolean"},"target":{"description":"Link to tiers or segments:\n\n\n * `level` - Property `levels` is required\n * `segment` - Property `segments` is required\n","type":"string","enum":["level","segment"]},"levels":{"description":"Selects specific tiers of the member","type":"array","items":{"type":"string","format":"uuid"}},"segments":{"description":"Selects specific segments of the member","type":"array","items":{"type":"string","format":"uuid"}},"activity":{"description":"Activity period","required":["allTime"],"properties":{"allTime":{"description":"Marked as unlimited period","type":"boolean"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"type":"object","additionalProperties":false},"visibility":{"description":"Visibility period","required":["allTime"],"properties":{"allTime":{"description":"Marked as unlimited period","type":"boolean"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"type":"object","additionalProperties":false},"labels":{"description":"Labels","type":"array","items":{"required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object","additionalProperties":false}},"featured":{"type":"boolean"},"public":{"type":"boolean"},"costInPoints":{"description":"Cost of reward in units","type":"number","format":"float","minimum":0,"nullable":true},"sourceWalletTypeCode":{"description":"Wallet code as a source of units","type":"string","nullable":true},"limits":{"$ref":"#/components/schemas/RewardLimit"},"usageLimit":{"description":"Legacy usage limits structure. Cannot be used together with limits.","required":["perUser"],"properties":{"perUser":{"description":"Usages limit per member (-1 means unlimited)","type":"number","format":"int32","minimum":-1},"general":{"description":"Global usages limit (-1 means unlimited). Required only when couponGenerator is defined.","type":"number","format":"int32","minimum":-1}},"type":"object","additionalProperties":false},"daysInactive":{"description":"Inactive coupon period after redeem in days","type":"number","format":"int32","maximum":1000,"minimum":1},"daysValid":{"description":"Active coupon period after redeem in days. Not valid if dateValid is defined.","type":"number","format":"int32","maximum":1000,"minimum":1},"dateValid":{"description":"Explicit expiry date for the coupon. Must be within 1000 days from the current date.","type":"string","format":"date-time"},"couponGenerator":{"description":"If defined then coupon will be generated automatically based on defined strategy. Otherwise must be import manually.","required":["length","characterSet"],"properties":{"length":{"description":"Length of coupon","type":"number"},"characterSet":{"type":"string","enum":["alphanum","alpha","num"]},"prefix":{"type":"string"}},"type":"object","additionalProperties":false},"unitsConversion":{"required":["rounding","ratio"],"properties":{"rounding":{"type":"string","enum":["default","up","down"]},"ratio":{"type":"number","format":"float","minimum":0}},"type":"object","additionalProperties":false}},"type":"object","additionalProperties":false},"UpdateFortuneWheelRewardRequestBody":{"title":"fortune_wheel","required":["translations","activity","visibility","fortuneWheel"],"properties":{"translations":{"properties":{"en":{"required":["name"],"properties":{"name":{"description":"Reward name","type":"string"},"shortDescription":{"description":"Reward short description","type":"string"},"usageInstruction":{"description":"Reward usage instruction","type":"string"},"conditionsDescription":{"description":"Reward conditions description","type":"string"},"brandDescription":{"description":"Brand description","type":"string"},"brandName":{"description":"Brand description","type":"string"}},"type":"object"}},"type":"object"},"categories":{"description":"Categories","type":"array","items":{"type":"string","format":"uuid"}},"tax":{"description":"Price tax","type":"number","format":"float","maximum":100,"minimum":0},"price":{"description":"Price","type":"number","format":"float","minimum":0},"taxPriceValue":{"description":"Tax price value","type":"number","format":"float","minimum":0},"active":{"type":"boolean"},"target":{"description":"Link to tiers or segments:\n\n\n * `level` - Property `levels` is required\n * `segment` - Property `segments` is required\n","type":"string","enum":["level","segment"]},"levels":{"description":"Selects specific tiers of the member","type":"array","items":{"type":"string","format":"uuid"}},"segments":{"description":"Selects specific segments of the member","type":"array","items":{"type":"string","format":"uuid"}},"activity":{"description":"Activity period","required":["allTime"],"properties":{"allTime":{"description":"Marked as unlimited period","type":"boolean"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"type":"object","additionalProperties":false},"visibility":{"description":"Visibility period","required":["allTime"],"properties":{"allTime":{"description":"Marked as unlimited period","type":"boolean"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"type":"object","additionalProperties":false},"labels":{"description":"Labels","type":"array","items":{"required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object","additionalProperties":false}},"featured":{"type":"boolean"},"public":{"type":"boolean"},"costInPoints":{"description":"Cost of reward in units","type":"number","format":"float","minimum":0,"nullable":true},"sourceWalletTypeCode":{"description":"Wallet code as a source of units","type":"string","nullable":true},"limits":{"$ref":"#/components/schemas/RewardLimit"},"usageLimit":{"description":"Legacy usage limits structure. Cannot be used together with limits.","required":["perUser"],"properties":{"perUser":{"description":"Usages limit per member (-1 means unlimited)","type":"number","format":"int32","minimum":-1},"general":{"description":"Global usages limit (-1 means unlimited). Required only when couponGenerator is defined.","type":"number","format":"int32","minimum":-1}},"type":"object","additionalProperties":false},"fortuneWheel":{"$ref":"#/components/schemas/FortuneWheelResponse"}},"type":"object","additionalProperties":false},"FortuneWheelResponse":{"required":["rules"],"properties":{"rules":{"type":"array","items":{"required":["name","effects","chance"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"effects":{"type":"array","items":{"oneOf":[{"title":"give_reward","required":["effect","rewardId"],"properties":{"effect":{"type":"string","enum":["give_reward"]},"rewardId":{"type":"string","format":"uuid"},"couponValueRule":{"description":"Optional - Only required if the reward is dynamic_coupon","type":"string"}},"type":"object","additionalProperties":false},{"title":"give_points","required":["effect","pointsRule"],"properties":{"effect":{"type":"string","enum":["give_points"]},"pointsRule":{"type":"string","pattern":"^\\d+$"},"walletCode":{"type":"string"}},"type":"object","additionalProperties":false}]}},"chance":{"type":"number","format":"float","maximum":1,"minimum":0}},"type":"object","additionalProperties":false}},"limits":{"$ref":"#/components/schemas/Limit"}},"type":"object","additionalProperties":false},"Limit":{"properties":{"points":{"required":["value"],"properties":{"interval":{"properties":{"type":{"type":"string"},"value":{"type":"integer","deprecated":true}},"type":"object"},"value":{"type":"number","format":"float"}},"type":"object"},"pointsPerMember":{"required":["value"],"properties":{"interval":{"properties":{"type":{"type":"string"},"value":{"type":"integer","deprecated":true}},"type":"object"},"value":{"type":"number","format":"float"}},"type":"object"},"executionsPerMember":{"required":["value"],"properties":{"interval":{"properties":{"type":{"type":"string"},"value":{"type":"integer","deprecated":true}},"type":"object"},"value":{"type":"number","format":"float"}},"type":"object"}},"type":"object"}},"responses":{"NoContent":{"description":"Success. No content."},"BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"required":["code","message","errors"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"required":["message","parameters","plural","code","path"],"properties":{"message":{"type":"string"},"parameters":{},"plural":{"type":"integer","nullable":true},"code":{"type":"string"},"path":{"type":"string"}},"type":"object"}}},"type":"object"}}}},"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}},"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/reward/{reward}":{"put":{"tags":["Reward"],"summary":"Update reward configuration","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method allows updating data on a specific Reward.\n","operationId":"_rewardPut","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/reward"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"required":["reward"],"properties":{"reward":{"anyOf":[{"$ref":"#/components/schemas/UpdateMaterialRewardRequestBody"},{"$ref":"#/components/schemas/UpdateStaticCouponRewardRequestBody"},{"$ref":"#/components/schemas/UpdateDynamicCouponRewardRequestBody"},{"$ref":"#/components/schemas/UpdateConversionCouponRewardRequestBody"},{"$ref":"#/components/schemas/UpdateFortuneWheelRewardRequestBody"}]}},"type":"object","additionalProperties":false}}}},"responses":{"204":{"$ref":"#/components/responses/NoContent"},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
````

## Get rewards list

> \<label style="background-color: #BFE1F6;padding:5px;">Integration\</label>\<br>\<br>\
> This method returns a list of all Rewards existing in the system.  \
> If sorting is not chosen, the rows will be returned in an unspecified order.\
> To sort a result, use an \`\_orderBy\` parameter in query.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Reward","description":"These endpoints allow you to easily manage rewards."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"page":{"name":"_page","in":"query","description":"Number of page with results, starts from 1","required":false,"schema":{"type":"integer","default":1,"minimum":1}},"itemsOnPage":{"name":"_itemsOnPage","in":"query","description":"Items on one page","required":false,"schema":{"type":"integer","default":10,"maximum":50,"minimum":1}},"orderBy":{"name":"_orderBy","in":"query","description":"Sorting order. If sorting is not chosen, the rows will be returned in an unspecified order. Sort order: * `asc` - Ascending, from A to Z * `desc` - Descending, from Z to A","required":false,"style":"deepObject","explode":true,"schema":{"type":"object","additionalProperties":{"type":"string","enum":["asc","desc"]}}}},"schemas":{"RewardResponse":{"properties":{"reward":{"type":"string"},"name":{"type":"string"},"levels":{"type":"array","items":{"type":"string","format":"uuid"}},"segments":{"type":"array","items":{"type":"string","format":"uuid"}},"categories":{"type":"array","items":{"type":"string","format":"uuid"}},"brandIcon":{"type":"boolean"},"rewardId":{"type":"string","format":"uuid"},"target":{"type":"string","enum":["level","segment"]},"active":{"type":"boolean"},"costInPoints":{"type":"number"},"activity":{"properties":{"allTime":{"type":"boolean"}},"type":"object"},"visibility":{"properties":{"allTime":{"type":"boolean"}},"type":"object"},"tax":{"type":"number"},"taxPriceValue":{"type":"number"},"price":{"type":"number"},"labels":{"type":"array","items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"featured":{"type":"boolean"},"public":{"type":"boolean"},"photos":{"type":"array","items":{"type":"object"}},"createdAt":{"type":"string","format":"date-time"},"usageLimit":{"properties":{"general":{"type":"number"},"perUser":{"type":"number"}},"type":"object"},"notIssuedCoupons":{"type":"number"},"limitUsages":{"properties":{"general":{"properties":{"interval":{"properties":{"type":{"type":"string","enum":["calendarHours","calendarDays","calendarWeeks","calendarMonths","calendarYears"]}},"type":"object"},"currentValue":{"type":"number","format":"float"},"limitValue":{"type":"number","format":"float"}},"type":"object"},"perMember":{"properties":{"interval":{"properties":{"type":{"type":"string","enum":["calendarHours","calendarDays","calendarWeeks","calendarMonths","calendarYears"]}},"type":"object"},"currentValue":{"type":"number","format":"float"},"limitValue":{"type":"number","format":"float"}},"type":"object"}},"type":"object"},"fulfillmentTracking":{"type":"boolean","deprecated":true},"translations":{"type":"array","items":{"properties":{"name":{"type":"string"},"id":{"type":"integer"},"locale":{"type":"string"}},"type":"object"}},"couponGenerator":{"properties":{"length":{"type":"number"},"characterSet":{"type":"string"}},"type":"object"},"couponValue":{"type":"number"},"segmentNames":{"type":"object","additionalProperties":{"type":"string"}},"levelNames":{"type":"object","additionalProperties":{"type":"string"}},"categoryNames":{"type":"object","additionalProperties":{"type":"string"}},"usageLeft":{"type":"number","deprecated":true},"usageLeftForCustomer":{"type":"number","deprecated":true},"unitsConversion":{"properties":{"ratio":{"type":"number","format":"float"},"rounding":{"type":"string","enum":["up","down","default"]}},"type":"object"}},"type":"object"},"SearchableTotalResponse":{"required":["all","filtered","estimated"],"properties":{"all":{"type":"integer","deprecated":true},"filtered":{"type":"integer","deprecated":true},"estimated":{"description":"Field estimated is used to show that the results are estimated. It might happen when there are more than 5000 results due to performance optimization.","type":"boolean","deprecated":true}},"type":"object","deprecated":true}},"responses":{"BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"required":["code","message","errors"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"required":["message","parameters","plural","code","path"],"properties":{"message":{"type":"string"},"parameters":{},"plural":{"type":"integer","nullable":true},"code":{"type":"string"},"path":{"type":"string"}},"type":"object"}}},"type":"object"}}}},"Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"required":["message"],"properties":{"message":{"type":"string"}},"type":"object"}}}},"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}},"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/reward":{"get":{"tags":["Reward"],"summary":"Get rewards list","description":"<label style=\"background-color: #BFE1F6;padding:5px;\">Integration</label><br><br>\nThis method returns a list of all Rewards existing in the system.  \nIf sorting is not chosen, the rows will be returned in an unspecified order.\nTo sort a result, use an `_orderBy` parameter in query.\n","operationId":"rewardGetList","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/itemsOnPage"},{"$ref":"#/components/parameters/orderBy"},{"name":"rewardId","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"string","format":"uuid"}},{"name":"reward","in":"query","required":false,"deprecated":true,"style":"deepObject","explode":true,"schema":{"type":"string","enum":["static_coupon","material","dynamic_coupon","conversion_coupon"]}},{"name":"active","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"boolean"}},{"name":"createdAt","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"string","format":"date-time"}},{"name":"public","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"boolean"}},{"name":"fulfillmentTracking","in":"query","required":false,"deprecated":true,"style":"deepObject","explode":true,"schema":{"type":"boolean"}},{"name":"featured","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"boolean"}},{"name":"name","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"string"}},{"name":"shortDescription","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"string"}},{"name":"brandName","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"string"}},{"name":"brandDescription","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"string"}},{"name":"levels","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"string"}},{"name":"segments","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"string"}},{"name":"categories","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"string"}},{"name":"labels","in":"query","description":"Labels using pattern e.g. (key1;value1),(key2;value2),...","required":false,"style":"deepObject","explode":true,"schema":{"type":"string"}},{"name":"costInPoints","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"integer"}},{"name":"available","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"boolean"}},{"name":"visible","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"boolean"}},{"name":"visibleFrom","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"string","format":"date-time"}},{"name":"visibleTo","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"string","format":"date-time"}},{"name":"activeFrom","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"string","format":"date-time"}},{"name":"activeTo","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"string","format":"date-time"}},{"name":"format","in":"query","description":"If set to html, the descriptions will be in HTML format. Omit for raw output.","required":false,"style":"deepObject","schema":{"type":"string","format":"html|raw"}},{"name":"type","in":"query","description":"Examples:  - `type[notIn]=material` - `type[in]=dynamic_coupon`\n","required":false,"style":"deepObject","explode":true,"schema":{"type":"string","enum":["static_coupon","material","dynamic_coupon","conversion_coupon","fortune_wheel"]}}],"responses":{"200":{"description":"Get all rewards.","content":{"application/json":{"schema":{"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/RewardResponse"}},"total":{"$ref":"#/components/schemas/SearchableTotalResponse"}},"type":"object","additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
````

## Add a reward

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br>\
> This method allows creating a new Reward in the system.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Reward","description":"These endpoints allow you to easily manage rewards."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}}},"schemas":{"CreateMaterialRewardRequestBody":{"title":"Material","required":["translations","activity","visibility","reward"],"properties":{"reward":{"type":"string","enum":["static_coupon","material","dynamic_coupon","conversion_coupon","fortune_wheel"]},"translations":{"properties":{"en":{"required":["name"],"properties":{"name":{"description":"Reward name","type":"string"},"shortDescription":{"description":"Reward short description","type":"string"},"usageInstruction":{"description":"Reward usage instruction","type":"string"},"conditionsDescription":{"description":"Reward conditions description","type":"string"},"brandDescription":{"description":"Brand description","type":"string"},"brandName":{"description":"Brand description","type":"string"}},"type":"object"}},"type":"object"},"categories":{"description":"Categories","type":"array","items":{"type":"string","format":"uuid"}},"tax":{"description":"Price tax","type":"number","format":"float","maximum":100,"minimum":0},"price":{"description":"Price","type":"number","format":"float","minimum":0},"taxPriceValue":{"description":"Tax price value","type":"number","format":"float","minimum":0},"active":{"type":"boolean"},"target":{"description":"Link to tiers or segments:\n\n\n * `level` - Property `levels` is required\n * `segment` - Property `segments` is required\n","type":"string","enum":["level","segment"]},"levels":{"description":"Selects specific tiers of the member","type":"array","items":{"type":"string","format":"uuid"}},"segments":{"description":"Selects specific segments of the member","type":"array","items":{"type":"string","format":"uuid"}},"activity":{"description":"Activity period","required":["allTime"],"properties":{"allTime":{"description":"Marked as unlimited period","type":"boolean"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"type":"object","additionalProperties":false},"visibility":{"description":"Visibility period","required":["allTime"],"properties":{"allTime":{"description":"Marked as unlimited period","type":"boolean"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"type":"object","additionalProperties":false},"labels":{"description":"Labels","type":"array","items":{"required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object","additionalProperties":false}},"featured":{"type":"boolean"},"public":{"type":"boolean"},"costInPoints":{"description":"Cost of reward in units","type":"number","format":"float","minimum":0,"nullable":true},"sourceWalletTypeCode":{"description":"Wallet code as a source of units","type":"string","nullable":true},"limits":{"$ref":"#/components/schemas/RewardLimit"},"usageLimit":{"description":"Legacy usage limits structure. Cannot be used together with limits.","required":["perUser"],"properties":{"perUser":{"description":"Usages limit per member (-1 means unlimited)","type":"number","format":"int32","minimum":-1},"general":{"description":"Global usages limit (-1 means unlimited). Required only when couponGenerator is defined.","type":"number","format":"int32","minimum":-1}},"type":"object","additionalProperties":false},"fulfillmentTracking":{"type":"boolean"}},"type":"object","additionalProperties":false},"RewardLimit":{"description":"New limits structure with intervals. Cannot be used together with usageLimit.","properties":{"general":{"required":["value"],"properties":{"interval":{"properties":{"type":{"type":"string","enum":["calendarHours","calendarDays","calendarWeeks","calendarMonths","calendarYears"]}},"type":"object"},"value":{"type":"number","format":"float"}},"type":"object"},"perMember":{"required":["value"],"properties":{"interval":{"properties":{"type":{"type":"string","enum":["calendarHours","calendarDays","calendarWeeks","calendarMonths","calendarYears"]}},"type":"object"},"value":{"type":"number","format":"float"}},"type":"object"}},"type":"object"},"CreateStaticCouponRewardRequestBody":{"title":"Static coupon","required":["translations","activity","visibility","couponValue","reward"],"properties":{"reward":{"type":"string","enum":["static_coupon","material","dynamic_coupon","conversion_coupon","fortune_wheel"]},"translations":{"properties":{"en":{"required":["name"],"properties":{"name":{"description":"Reward name","type":"string"},"shortDescription":{"description":"Reward short description","type":"string"},"usageInstruction":{"description":"Reward usage instruction","type":"string"},"conditionsDescription":{"description":"Reward conditions description","type":"string"},"brandDescription":{"description":"Brand description","type":"string"},"brandName":{"description":"Brand description","type":"string"}},"type":"object"}},"type":"object"},"categories":{"description":"Categories","type":"array","items":{"type":"string","format":"uuid"}},"tax":{"description":"Price tax","type":"number","format":"float","maximum":100,"minimum":0},"price":{"description":"Price","type":"number","format":"float","minimum":0},"taxPriceValue":{"description":"Tax price value","type":"number","format":"float","minimum":0},"active":{"type":"boolean"},"target":{"description":"Link to tiers or segments:\n\n\n * `level` - Property `levels` is required\n * `segment` - Property `segments` is required\n","type":"string","enum":["level","segment"]},"levels":{"description":"Selects specific tiers of the member","type":"array","items":{"type":"string","format":"uuid"}},"segments":{"description":"Selects specific segments of the member","type":"array","items":{"type":"string","format":"uuid"}},"activity":{"description":"Activity period","required":["allTime"],"properties":{"allTime":{"description":"Marked as unlimited period","type":"boolean"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"type":"object","additionalProperties":false},"visibility":{"description":"Visibility period","required":["allTime"],"properties":{"allTime":{"description":"Marked as unlimited period","type":"boolean"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"type":"object","additionalProperties":false},"labels":{"description":"Labels","type":"array","items":{"required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object","additionalProperties":false}},"featured":{"type":"boolean"},"public":{"type":"boolean"},"costInPoints":{"description":"Cost of reward in units","type":"number","format":"float","minimum":0,"nullable":true},"sourceWalletTypeCode":{"description":"Wallet code as a source of units","type":"string","nullable":true},"limits":{"$ref":"#/components/schemas/RewardLimit"},"usageLimit":{"description":"Legacy usage limits structure. Cannot be used together with limits.","required":["perUser"],"properties":{"perUser":{"description":"Usages limit per member (-1 means unlimited)","type":"number","format":"int32","minimum":-1},"general":{"description":"Global usages limit (-1 means unlimited). Required only when couponGenerator is defined.","type":"number","format":"int32","minimum":-1}},"type":"object","additionalProperties":false},"daysInactive":{"description":"Inactive coupon period after redeem in days","type":"number","format":"int32","maximum":1000,"minimum":1},"daysValid":{"description":"Active coupon period after redeem in days. Not valid if dateValid is defined.","type":"number","format":"int32","maximum":1000,"minimum":1},"dateValid":{"description":"Explicit expiry date for the coupon. Must be within 1000 days from the current date.","type":"string","format":"date-time"},"couponGenerator":{"description":"If defined then coupon will be generated automatically based on defined strategy. Otherwise must be import manually.","required":["length","characterSet"],"properties":{"length":{"description":"Length of coupon","type":"number"},"characterSet":{"type":"string","enum":["alphanum","alpha","num"]},"prefix":{"type":"string"}},"type":"object","additionalProperties":false},"couponValueType":{"description":"Coupon value type (if empty, money will be default).","type":"string","enum":["money","percentage"]},"couponValue":{"description":"Coupon value * `money` - Money value greater than 0 * `percentage` - Percentage value 0 - 100\n","type":"number","format":"float","minimum":0,"exclusiveMinimum":true}},"type":"object","additionalProperties":false},"CreateDynamicCouponRewardRequestBody":{"title":"Dynamic coupon","required":["translations","activity","visibility","reward"],"properties":{"reward":{"type":"string","enum":["static_coupon","material","dynamic_coupon","conversion_coupon","fortune_wheel"]},"translations":{"properties":{"en":{"required":["name"],"properties":{"name":{"description":"Reward name","type":"string"},"shortDescription":{"description":"Reward short description","type":"string"},"usageInstruction":{"description":"Reward usage instruction","type":"string"},"conditionsDescription":{"description":"Reward conditions description","type":"string"},"brandDescription":{"description":"Brand description","type":"string"},"brandName":{"description":"Brand description","type":"string"}},"type":"object"}},"type":"object"},"categories":{"description":"Categories","type":"array","items":{"type":"string","format":"uuid"}},"tax":{"description":"Price tax","type":"number","format":"float","maximum":100,"minimum":0},"price":{"description":"Price","type":"number","format":"float","minimum":0},"taxPriceValue":{"description":"Tax price value","type":"number","format":"float","minimum":0},"active":{"type":"boolean"},"target":{"description":"Link to tiers or segments:\n\n\n * `level` - Property `levels` is required\n * `segment` - Property `segments` is required\n","type":"string","enum":["level","segment"]},"levels":{"description":"Selects specific tiers of the member","type":"array","items":{"type":"string","format":"uuid"}},"segments":{"description":"Selects specific segments of the member","type":"array","items":{"type":"string","format":"uuid"}},"activity":{"description":"Activity period","required":["allTime"],"properties":{"allTime":{"description":"Marked as unlimited period","type":"boolean"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"type":"object","additionalProperties":false},"visibility":{"description":"Visibility period","required":["allTime"],"properties":{"allTime":{"description":"Marked as unlimited period","type":"boolean"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"type":"object","additionalProperties":false},"labels":{"description":"Labels","type":"array","items":{"required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object","additionalProperties":false}},"featured":{"type":"boolean"},"public":{"type":"boolean"},"costInPoints":{"description":"Cost of reward in units","type":"number","format":"float","minimum":0,"nullable":true},"sourceWalletTypeCode":{"description":"Wallet code as a source of units","type":"string","nullable":true},"limits":{"$ref":"#/components/schemas/RewardLimit"},"usageLimit":{"description":"Legacy usage limits structure. Cannot be used together with limits.","required":["perUser"],"properties":{"perUser":{"description":"Usages limit per member (-1 means unlimited)","type":"number","format":"int32","minimum":-1},"general":{"description":"Global usages limit (-1 means unlimited). Required only when couponGenerator is defined.","type":"number","format":"int32","minimum":-1}},"type":"object","additionalProperties":false},"daysInactive":{"description":"Inactive coupon period after redeem in days","type":"number","format":"int32","maximum":1000,"minimum":1},"daysValid":{"description":"Active coupon period after redeem in days. Not valid if dateValid is defined.","type":"number","format":"int32","maximum":1000,"minimum":1},"dateValid":{"description":"Explicit expiry date for the coupon. Must be within 1000 days from the current date.","type":"string","format":"date-time"},"couponGenerator":{"description":"If defined then coupon will be generated automatically based on defined strategy. Otherwise must be import manually.","required":["length","characterSet"],"properties":{"length":{"description":"Length of coupon","type":"number"},"characterSet":{"type":"string","enum":["alphanum","alpha","num"]},"prefix":{"type":"string"}},"type":"object","additionalProperties":false}},"type":"object","additionalProperties":false},"CreateConversionCouponRewardRequestBody":{"title":"Conversion coupon","required":["translations","activity","visibility","unitsConversion","reward"],"properties":{"reward":{"type":"string","enum":["static_coupon","material","dynamic_coupon","conversion_coupon","fortune_wheel"]},"translations":{"properties":{"en":{"required":["name"],"properties":{"name":{"description":"Reward name","type":"string"},"shortDescription":{"description":"Reward short description","type":"string"},"usageInstruction":{"description":"Reward usage instruction","type":"string"},"conditionsDescription":{"description":"Reward conditions description","type":"string"},"brandDescription":{"description":"Brand description","type":"string"},"brandName":{"description":"Brand description","type":"string"}},"type":"object"}},"type":"object"},"categories":{"description":"Categories","type":"array","items":{"type":"string","format":"uuid"}},"tax":{"description":"Price tax","type":"number","format":"float","maximum":100,"minimum":0},"price":{"description":"Price","type":"number","format":"float","minimum":0},"taxPriceValue":{"description":"Tax price value","type":"number","format":"float","minimum":0},"active":{"type":"boolean"},"target":{"description":"Link to tiers or segments:\n\n\n * `level` - Property `levels` is required\n * `segment` - Property `segments` is required\n","type":"string","enum":["level","segment"]},"levels":{"description":"Selects specific tiers of the member","type":"array","items":{"type":"string","format":"uuid"}},"segments":{"description":"Selects specific segments of the member","type":"array","items":{"type":"string","format":"uuid"}},"activity":{"description":"Activity period","required":["allTime"],"properties":{"allTime":{"description":"Marked as unlimited period","type":"boolean"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"type":"object","additionalProperties":false},"visibility":{"description":"Visibility period","required":["allTime"],"properties":{"allTime":{"description":"Marked as unlimited period","type":"boolean"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"type":"object","additionalProperties":false},"labels":{"description":"Labels","type":"array","items":{"required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object","additionalProperties":false}},"featured":{"type":"boolean"},"public":{"type":"boolean"},"costInPoints":{"description":"Cost of reward in units","type":"number","format":"float","minimum":0,"nullable":true},"sourceWalletTypeCode":{"description":"Wallet code as a source of units","type":"string","nullable":true},"limits":{"$ref":"#/components/schemas/RewardLimit"},"usageLimit":{"description":"Legacy usage limits structure. Cannot be used together with limits.","required":["perUser"],"properties":{"perUser":{"description":"Usages limit per member (-1 means unlimited)","type":"number","format":"int32","minimum":-1},"general":{"description":"Global usages limit (-1 means unlimited). Required only when couponGenerator is defined.","type":"number","format":"int32","minimum":-1}},"type":"object","additionalProperties":false},"daysInactive":{"description":"Inactive coupon period after redeem in days","type":"number","format":"int32","maximum":1000,"minimum":1},"daysValid":{"description":"Active coupon period after redeem in days. Not valid if dateValid is defined.","type":"number","format":"int32","maximum":1000,"minimum":1},"dateValid":{"description":"Explicit expiry date for the coupon. Must be within 1000 days from the current date.","type":"string","format":"date-time"},"couponGenerator":{"description":"If defined then coupon will be generated automatically based on defined strategy. Otherwise must be import manually.","required":["length","characterSet"],"properties":{"length":{"description":"Length of coupon","type":"number"},"characterSet":{"type":"string","enum":["alphanum","alpha","num"]},"prefix":{"type":"string"}},"type":"object","additionalProperties":false},"unitsConversion":{"required":["rounding","ratio"],"properties":{"rounding":{"type":"string","enum":["default","up","down"]},"ratio":{"type":"number","format":"float","minimum":0}},"type":"object","additionalProperties":false}},"type":"object","additionalProperties":false},"CreateFortuneWheelRewardRequestBody":{"title":"Fortune Wheel","required":["translations","activity","visibility","reward","fortuneWheel"],"properties":{"reward":{"type":"string","enum":["fortune_wheel"]},"translations":{"properties":{"en":{"required":["name"],"properties":{"name":{"description":"Reward name","type":"string"},"shortDescription":{"description":"Reward short description","type":"string"},"usageInstruction":{"description":"Reward usage instruction","type":"string"},"conditionsDescription":{"description":"Reward conditions description","type":"string"},"brandDescription":{"description":"Brand description","type":"string"},"brandName":{"description":"Brand description","type":"string"}},"type":"object"}},"type":"object"},"categories":{"description":"Categories","type":"array","items":{"type":"string","format":"uuid"}},"tax":{"description":"Price tax","type":"number","format":"float","maximum":100,"minimum":0},"price":{"description":"Price","type":"number","format":"float","minimum":0},"taxPriceValue":{"description":"Tax price value","type":"number","format":"float","minimum":0},"active":{"type":"boolean"},"target":{"description":"Link to tiers or segments:\n\n\n * `level` - Property `levels` is required\n * `segment` - Property `segments` is required\n","type":"string","enum":["level","segment"]},"levels":{"description":"Selects specific tiers of the member","type":"array","items":{"type":"string","format":"uuid"}},"segments":{"description":"Selects specific segments of the member","type":"array","items":{"type":"string","format":"uuid"}},"activity":{"description":"Activity period","required":["allTime"],"properties":{"allTime":{"description":"Marked as unlimited period","type":"boolean"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"type":"object","additionalProperties":false},"visibility":{"description":"Visibility period","required":["allTime"],"properties":{"allTime":{"description":"Marked as unlimited period","type":"boolean"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"type":"object","additionalProperties":false},"labels":{"description":"Labels","type":"array","items":{"required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object","additionalProperties":false}},"featured":{"type":"boolean"},"public":{"type":"boolean"},"costInPoints":{"description":"Cost of reward in units","type":"number","format":"float","minimum":0,"nullable":true},"sourceWalletTypeCode":{"description":"Wallet code as a source of units","type":"string","nullable":true},"limits":{"$ref":"#/components/schemas/RewardLimit"},"usageLimit":{"description":"Legacy usage limits structure. Cannot be used together with limits.","required":["perUser"],"properties":{"perUser":{"description":"Usages limit per member (-1 means unlimited)","type":"number","format":"int32","minimum":-1},"general":{"description":"Global usages limit (-1 means unlimited). Required only when couponGenerator is defined.","type":"number","format":"int32","minimum":-1}},"type":"object","additionalProperties":false},"fortuneWheel":{"$ref":"#/components/schemas/FortuneWheelResponse"}},"type":"object","additionalProperties":false},"FortuneWheelResponse":{"required":["rules"],"properties":{"rules":{"type":"array","items":{"required":["name","effects","chance"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"effects":{"type":"array","items":{"oneOf":[{"title":"give_reward","required":["effect","rewardId"],"properties":{"effect":{"type":"string","enum":["give_reward"]},"rewardId":{"type":"string","format":"uuid"},"couponValueRule":{"description":"Optional - Only required if the reward is dynamic_coupon","type":"string"}},"type":"object","additionalProperties":false},{"title":"give_points","required":["effect","pointsRule"],"properties":{"effect":{"type":"string","enum":["give_points"]},"pointsRule":{"type":"string","pattern":"^\\d+$"},"walletCode":{"type":"string"}},"type":"object","additionalProperties":false}]}},"chance":{"type":"number","format":"float","maximum":1,"minimum":0}},"type":"object","additionalProperties":false}},"limits":{"$ref":"#/components/schemas/Limit"}},"type":"object","additionalProperties":false},"Limit":{"properties":{"points":{"required":["value"],"properties":{"interval":{"properties":{"type":{"type":"string"},"value":{"type":"integer","deprecated":true}},"type":"object"},"value":{"type":"number","format":"float"}},"type":"object"},"pointsPerMember":{"required":["value"],"properties":{"interval":{"properties":{"type":{"type":"string"},"value":{"type":"integer","deprecated":true}},"type":"object"},"value":{"type":"number","format":"float"}},"type":"object"},"executionsPerMember":{"required":["value"],"properties":{"interval":{"properties":{"type":{"type":"string"},"value":{"type":"integer","deprecated":true}},"type":"object"},"value":{"type":"number","format":"float"}},"type":"object"}},"type":"object"}},"responses":{"BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"required":["code","message","errors"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"required":["message","parameters","plural","code","path"],"properties":{"message":{"type":"string"},"parameters":{},"plural":{"type":"integer","nullable":true},"code":{"type":"string"},"path":{"type":"string"}},"type":"object"}}},"type":"object"}}}},"Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"required":["message"],"properties":{"message":{"type":"string"}},"type":"object"}}}},"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}},"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/reward":{"post":{"tags":["Reward"],"summary":"Add a reward","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method allows creating a new Reward in the system.\n","operationId":"_rewardPost","parameters":[{"$ref":"#/components/parameters/storeCode"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"required":["reward"],"properties":{"reward":{"discriminator":{"propertyName":"reward","mapping":{"material":"#/components/schemas/CreateMaterialRewardRequestBody","static_coupon":"#/components/schemas/CreateStaticCouponRewardRequestBody","dynamic_coupon":"#/components/schemas/CreateDynamicCouponRewardRequestBody","conversion_coupon":"#/components/schemas/CreateConversionCouponRewardRequestBody","fortune_wheel":"#/components/schemas/CreateFortuneWheelRewardRequestBody"}},"anyOf":[{"$ref":"#/components/schemas/CreateMaterialRewardRequestBody"},{"$ref":"#/components/schemas/CreateStaticCouponRewardRequestBody"},{"$ref":"#/components/schemas/CreateDynamicCouponRewardRequestBody"},{"$ref":"#/components/schemas/CreateConversionCouponRewardRequestBody"},{"$ref":"#/components/schemas/CreateFortuneWheelRewardRequestBody"}]}},"type":"object","additionalProperties":false}}}},"responses":{"200":{"description":"Return created reward ID.","content":{"application/json":{"schema":{"required":["rewardId"],"properties":{"rewardId":{"type":"string","format":"uuid"}},"type":"object","additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
````

## Get eligible members list

> \<label style="background-color: #BFE1F6;padding:5px;">Integration\</label>\<br>\<br>\
> This method returns for which Member this Reward is visible.  \
> If sorting is not chosen, the rows will be returned in an unspecified order.  \
> To sort a result, use an \`\_orderBy\` parameter in query.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Reward","description":"These endpoints allow you to easily manage rewards."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"reward":{"name":"reward","in":"path","description":"Reward ID","required":true,"schema":{"type":"string","format":"uuid"}}},"schemas":{"Customer":{"properties":{"customerId":{"type":"string","format":"uuid"},"registeredAt":{"type":"string","format":"date-time"},"active":{"type":"boolean"},"channelId":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"gender":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"birthDate":{"type":"string","format":"date-time"},"lastLevelRecalculation":{"type":"string","format":"date-time"},"address":{"$ref":"#/components/schemas/Address"},"loyaltyCardNumber":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"agreement1":{"type":"boolean"},"agreement2":{"type":"boolean"},"agreement3":{"type":"boolean"},"company":{"$ref":"#/components/schemas/Company"},"transactionsCount":{"type":"integer"},"returnTransactionsCount":{"type":"integer"},"transactionsAmount":{"type":"number","format":"float"},"returnTransactionsAmount":{"type":"number","format":"float"},"transactionsAmountWithoutDeliveryCosts":{"type":"number","format":"float"},"amountExcludedForLevel":{"type":"number","format":"float"},"averageTransactionAmount":{"type":"number","format":"float"},"averageReturnTransactionAmount":{"type":"number","format":"float"},"lastTransactionDate":{"type":"string","format":"date-time"},"firstTransactionDate":{"type":"string","format":"date-time"},"levelAchievementDate":{"type":"string","format":"date-time"},"anonymized":{"type":"boolean"},"referralToken":{"type":"string"},"defaultAccount":{"$ref":"#/components/schemas/Account"}},"type":"object"},"Address":{"properties":{"street":{"type":"string"},"address1":{"type":"string"},"address2":{"type":"string"},"province":{"type":"string"},"city":{"type":"string"},"postal":{"type":"string"},"country":{"type":"string"}},"type":"object"},"Company":{"properties":{"name":{"type":"string"},"nip":{"type":"string"}},"type":"object"},"Account":{"properties":{"accountId":{"type":"string"},"activePoints":{"type":"number","format":"float"},"transferredPoints":{"type":"number","format":"float"},"lockedPoints":{"type":"number","format":"float"},"expiredPoints":{"type":"number","format":"float"},"spentPoints":{"type":"number","format":"float"},"earnedPoints":{"type":"number","format":"float"},"blockedPoints":{"type":"number","format":"float"}},"type":"object"},"SearchableTotalResponse2":{"properties":{"all":{"type":"integer","deprecated":true},"filtered":{"type":"integer","deprecated":true},"estimated":{"description":"Field estimated is used to show that the results are estimated. It might happen when there are more than 5000 results due to performance optimization.","type":"boolean","deprecated":true}},"type":"object","deprecated":true}},"responses":{"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/reward/{reward}/members":{"get":{"tags":["Reward"],"summary":"Get eligible members list","description":"<label style=\"background-color: #BFE1F6;padding:5px;\">Integration</label><br><br>\nThis method returns for which Member this Reward is visible.  \nIf sorting is not chosen, the rows will be returned in an unspecified order.  \nTo sort a result, use an `_orderBy` parameter in query.\n","operationId":"rewardGetVisibleForMembers","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/reward"},{"name":"page","in":"query","description":"Page number","required":false,"schema":{"type":"integer"}},{"name":"perPage","in":"query","description":"Number of elements per page","required":false,"schema":{"type":"integer"}},{"name":"sort","in":"query","description":"Field to sort by","required":false,"schema":{"type":"string"}},{"name":"direction","in":"query","description":"Sorting direction","required":false,"schema":{"type":"string","format":"asc|desc"}},{"name":"visible","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Get all rewards.","content":{"application/json":{"schema":{"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}},"total":{"$ref":"#/components/schemas/SearchableTotalResponse2"}},"type":"object"}}}},"403":{"$ref":"#/components/responses/AccessDenied"}},"deprecated":true}}}}
````

## Activate a reward

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br>\
> This method allows activating a specific Reward.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Reward","description":"These endpoints allow you to easily manage rewards."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"reward":{"name":"reward","in":"path","description":"Reward ID","required":true,"schema":{"type":"string","format":"uuid"}}},"responses":{"NoContent":{"description":"Success. No content."},"BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"required":["code","message","errors"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"required":["message","parameters","plural","code","path"],"properties":{"message":{"type":"string"},"parameters":{},"plural":{"type":"integer","nullable":true},"code":{"type":"string"},"path":{"type":"string"}},"type":"object"}}},"type":"object"}}}},"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}},"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/reward/{reward}/activate":{"post":{"tags":["Reward"],"summary":"Activate a reward","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method allows activating a specific Reward.\n","operationId":"rewardPostActivate","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/reward"}],"responses":{"204":{"$ref":"#/components/responses/NoContent"},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
````

## Deactivate a reward

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br>\
> This method allows deactivating a specific Reward.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Reward","description":"These endpoints allow you to easily manage rewards."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"reward":{"name":"reward","in":"path","description":"Reward ID","required":true,"schema":{"type":"string","format":"uuid"}}},"responses":{"NoContent":{"description":"Success. No content."},"BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"required":["code","message","errors"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"required":["message","parameters","plural","code","path"],"properties":{"message":{"type":"string"},"parameters":{},"plural":{"type":"integer","nullable":true},"code":{"type":"string"},"path":{"type":"string"}},"type":"object"}}},"type":"object"}}}},"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}},"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/reward/{reward}/deactivate":{"post":{"tags":["Reward"],"summary":"Deactivate a reward","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method allows deactivating a specific Reward.\n","operationId":"rewardPostDeactivate","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/reward"}],"responses":{"204":{"$ref":"#/components/responses/NoContent"},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
````

## Get redeemed reward's details

> \<label style="background-color: #BFE1F6;padding:5px;">Integration\</label>\<br>\<br>\
> This method returns detailed information about a specific redeemed reward.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Reward","description":"These endpoints allow you to easily manage rewards."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"issuedReward":{"name":"issuedReward","in":"path","description":"IssuedReward ID","required":true,"schema":{"type":"string","format":"uuid"}}},"schemas":{"StaticIssuedReward":{"properties":{"rewardId":{"type":"string","format":"uuid"},"issuedRewardId":{"type":"string","format":"uuid"},"name":{"type":"string"},"tax":{"type":"number","format":"float"},"taxPriceValue":{"type":"number","format":"float"},"price":{"type":"number","format":"float"},"customerId":{"type":"string","format":"uuid"},"status":{"type":"string"},"redemptionDate":{"type":"string","format":"date-time"},"issuedCoupon":{"properties":{"code":{"type":"string"},"value":{"type":"number","format":"float"},"activeFrom":{"type":"string","format":"date-time"},"activeTo":{"type":"string","format":"date-time"},"usedAt":{"type":"string","format":"date-time"}},"type":"object"},"customerData":{"properties":{"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"phone":{"type":"string"},"loyaltyCardNumber":{"type":"string"},"address":{"type":"object"}},"type":"object"},"costInPoints":{"type":"number","format":"float"},"token":{"type":"string"},"rewardType":{"type":"string"},"actionCause":{"$ref":"#/components/schemas/ActionCause"},"cancelledAt":{"type":"string","format":"date-time"}},"type":"object"},"ActionCause":{"properties":{"campaignId":{"type":"string","format":"uuid","nullable":true},"customerId":{"type":"string","format":"uuid","nullable":true},"transactionId":{"type":"string","format":"uuid","nullable":true},"customEventId":{"type":"string","format":"uuid","nullable":true},"internalEventName":{"type":"string","nullable":true},"performedAt":{"description":"The date and time when the event was performed (purchase for transactions, registration for custom events). Equivalent to purchasedAt and eventDate. This value is null if actionCause does not come from a campaign.","type":"string","format":"date-time","nullable":true},"rewardId":{"description":"The reward definition ID when the transfer is related to a reward purchase.","type":"string","format":"uuid","nullable":true},"issuedRewardId":{"description":"The issued reward instance ID when the transfer is related to a reward redemption.","type":"string","format":"uuid","nullable":true}},"type":"object"},"MaterialIssuedReward":{"properties":{"rewardId":{"type":"string","format":"uuid"},"issuedRewardId":{"type":"string","format":"uuid"},"name":{"type":"string"},"customerId":{"type":"string","format":"uuid"},"status":{"type":"string"},"redemptionDate":{"type":"string","format":"date-time"},"customerData":{"properties":{"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"phone":{"type":"string"},"loyaltyCardNumber":{"type":"string"},"address":{"type":"object"}},"type":"object"},"costInPoints":{"type":"number"},"token":{"type":"string"},"rewardType":{"type":"string"},"actionCause":{"$ref":"#/components/schemas/ActionCause"},"cancelledAt":{"type":"string","format":"date-time"}},"type":"object"},"ConversionCouponIssuedReward":{"properties":{"rewardId":{"type":"string","format":"uuid"},"issuedRewardId":{"type":"string","format":"uuid"},"name":{"type":"string"},"tax":{"type":"number","format":"float"},"taxPriceValue":{"type":"number","format":"float"},"price":{"type":"number","format":"float"},"customerId":{"type":"string","format":"uuid"},"status":{"type":"string"},"redemptionDate":{"type":"string","format":"date-time"},"issuedCoupon":{"properties":{"code":{"type":"string"},"value":{"type":"number","format":"float"},"activeFrom":{"type":"string","format":"date-time"},"activeTo":{"type":"string","format":"date-time"},"usedAt":{"type":"string","format":"date-time"}},"type":"object"},"customerData":{"properties":{"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"phone":{"type":"string"},"loyaltyCardNumber":{"type":"string"},"address":{"type":"object"}},"type":"object"},"costInPoints":{"type":"number","format":"float"},"token":{"type":"string"},"rewardType":{"type":"string"},"unitsConversion":{"properties":{"ratio":{"type":"number","format":"float"},"rounding":{"type":"string","enum":["up","down","default"]}},"type":"object"},"actionCause":{"$ref":"#/components/schemas/ActionCause"},"cancelledAt":{"type":"string","format":"date-time"}},"type":"object"},"DynamicIssuedReward":{"properties":{"rewardId":{"type":"string","format":"uuid"},"issuedRewardId":{"type":"string","format":"uuid"},"name":{"type":"string"},"tax":{"type":"number","format":"float"},"taxPriceValue":{"type":"number","format":"float"},"price":{"type":"number","format":"float"},"customerId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["issued","pending","approved","rejected","canceled","packing","awaiting_shipping","shipped","completed","returned"]},"redemptionDate":{"type":"string","format":"date-time"},"issuedCoupon":{"properties":{"code":{"type":"string"},"value":{"type":"number","format":"float"},"activeFrom":{"type":"string","format":"date-time"},"activeTo":{"type":"string","format":"date-time"},"usedAt":{"type":"string","format":"date-time"}},"type":"object"},"customerData":{"properties":{"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"phone":{"type":"string"},"loyaltyCardNumber":{"type":"string"},"address":{"type":"object"}},"type":"object"},"costInPoints":{"type":"number","format":"float"},"token":{"type":"string"},"rewardType":{"type":"string"},"actionCause":{"$ref":"#/components/schemas/ActionCause"},"cancelledAt":{"type":"string","format":"date-time"}},"type":"object"},"FortuneWheelIssuedReward":{"properties":{"rewardId":{"type":"string","format":"uuid"},"issuedRewardId":{"type":"string","format":"uuid"},"name":{"type":"string"},"customerId":{"type":"string","format":"uuid"},"status":{"type":"string"},"redemptionDate":{"type":"string","format":"date-time"},"customerData":{"properties":{"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"phone":{"type":"string"},"loyaltyCardNumber":{"type":"string"},"address":{"type":"object"}},"type":"object"},"costInPoints":{"type":"number"},"token":{"type":"string"},"rewardType":{"type":"string"},"actionCause":{"$ref":"#/components/schemas/ActionCause"},"cancelledAt":{"type":"string","format":"date-time"},"fortuneWheelStatus":{"required":["drawnAt","ruleName","effects"],"properties":{"drawnAt":{"type":"string","format":"date-time"},"ruleName":{"type":"string"},"effects":{"type":"array","items":{"$ref":"#/components/schemas/EffectResponse"}}},"type":"object","additionalProperties":false}},"type":"object"},"EffectResponse":{"oneOf":[{"title":"Unit Effect","required":["type","status"],"properties":{"type":{"type":"string","enum":["unit"]},"status":{"$ref":"#/components/schemas/EffectStatus"},"transfer":{"required":["transferId","walletCode","units"],"properties":{"transferId":{"type":"string","format":"uuid"},"walletCode":{"type":"string"},"units":{"type":"number","format":"float"}},"type":"object","additionalProperties":false}},"type":"object","additionalProperties":false},{"title":"Redemption Effect","required":["type","status"],"properties":{"type":{"type":"string","enum":["redemption"]},"status":{"$ref":"#/components/schemas/EffectStatus"},"redemption":{"required":["issuedRewardId","rewardId"],"properties":{"issuedRewardId":{"type":"string","format":"uuid"},"rewardId":{"type":"string","format":"uuid"},"name":{"type":"string"}},"type":"object","additionalProperties":false}},"type":"object","additionalProperties":false}]},"EffectStatus":{"required":["code"],"properties":{"code":{"type":"string","enum":["success","partial_success","failure"]},"message":{"type":"string"}},"type":"object","additionalProperties":false}},"responses":{"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}},"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/redemption/{issuedReward}":{"get":{"tags":["Reward"],"summary":"Get redeemed reward's details","description":"<label style=\"background-color: #BFE1F6;padding:5px;\">Integration</label><br><br>\nThis method returns detailed information about a specific redeemed reward.\n","operationId":"redemptionGet","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/issuedReward"},{"name":"format","in":"query","description":"If set to html, the descriptions will be in HTML format. Omit for raw output.","required":false,"schema":{"type":"string","format":"html|raw"}}],"responses":{"200":{"description":"Returned when successful","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/StaticIssuedReward"},{"$ref":"#/components/schemas/MaterialIssuedReward"},{"$ref":"#/components/schemas/ConversionCouponIssuedReward"},{"$ref":"#/components/schemas/DynamicIssuedReward"},{"$ref":"#/components/schemas/FortuneWheelIssuedReward"}]}}}},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
````

## Get redeemed rewards list

> \<label style="background-color: #BFE1F6;padding:5px;">Integration\</label>\<br>\<br>\
> This method returns a list of all redeemed rewards in the system.\
> If sorting is not chosen, the rows will be returned in an unspecified order.\
> To sort a result, use an \`\_orderBy\` parameter in query.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Reward","description":"These endpoints allow you to easily manage rewards."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"page":{"name":"_page","in":"query","description":"Number of page with results, starts from 1","required":false,"schema":{"type":"integer","default":1,"minimum":1}},"itemsOnPage":{"name":"_itemsOnPage","in":"query","description":"Items on one page","required":false,"schema":{"type":"integer","default":10,"maximum":50,"minimum":1}},"orderBy":{"name":"_orderBy","in":"query","description":"Sorting order. If sorting is not chosen, the rows will be returned in an unspecified order. Sort order: * `asc` - Ascending, from A to Z * `desc` - Descending, from Z to A","required":false,"style":"deepObject","explode":true,"schema":{"type":"object","additionalProperties":{"type":"string","enum":["asc","desc"]}}},"scroll":{"name":"_scroll","in":"query","description":"To use scroll pagination, add the `_scroll` parameter to your query:\n  ?_scroll\n\nTo retrieve the next page, take the `scroll` value from the previous response and use it in the next request:\n  ?_scroll=eyJjcmVhdGVkQXQiOiIyMDI1LTA3LTAxIDEzOjU2OjI5LjAyMTcwMyIsImlkIjoiNTM5N2RiYzYtZGVkMi00MTQ0LTlhMjQtOTRjYmI5YWVjNDBjIn0=\n\nNotes:\n  - Scroll pagination does not support sorting with `_orderBy`.\n  - Items are returned in ascending order by the `createdAt` field by default.\n","required":false,"schema":{"type":"string"}}},"schemas":{"StaticIssuedReward":{"properties":{"rewardId":{"type":"string","format":"uuid"},"issuedRewardId":{"type":"string","format":"uuid"},"name":{"type":"string"},"tax":{"type":"number","format":"float"},"taxPriceValue":{"type":"number","format":"float"},"price":{"type":"number","format":"float"},"customerId":{"type":"string","format":"uuid"},"status":{"type":"string"},"redemptionDate":{"type":"string","format":"date-time"},"issuedCoupon":{"properties":{"code":{"type":"string"},"value":{"type":"number","format":"float"},"activeFrom":{"type":"string","format":"date-time"},"activeTo":{"type":"string","format":"date-time"},"usedAt":{"type":"string","format":"date-time"}},"type":"object"},"customerData":{"properties":{"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"phone":{"type":"string"},"loyaltyCardNumber":{"type":"string"},"address":{"type":"object"}},"type":"object"},"costInPoints":{"type":"number","format":"float"},"token":{"type":"string"},"rewardType":{"type":"string"},"actionCause":{"$ref":"#/components/schemas/ActionCause"},"cancelledAt":{"type":"string","format":"date-time"}},"type":"object"},"ActionCause":{"properties":{"campaignId":{"type":"string","format":"uuid","nullable":true},"customerId":{"type":"string","format":"uuid","nullable":true},"transactionId":{"type":"string","format":"uuid","nullable":true},"customEventId":{"type":"string","format":"uuid","nullable":true},"internalEventName":{"type":"string","nullable":true},"performedAt":{"description":"The date and time when the event was performed (purchase for transactions, registration for custom events). Equivalent to purchasedAt and eventDate. This value is null if actionCause does not come from a campaign.","type":"string","format":"date-time","nullable":true},"rewardId":{"description":"The reward definition ID when the transfer is related to a reward purchase.","type":"string","format":"uuid","nullable":true},"issuedRewardId":{"description":"The issued reward instance ID when the transfer is related to a reward redemption.","type":"string","format":"uuid","nullable":true}},"type":"object"},"SearchableTotalResponse":{"required":["all","filtered","estimated"],"properties":{"all":{"type":"integer","deprecated":true},"filtered":{"type":"integer","deprecated":true},"estimated":{"description":"Field estimated is used to show that the results are estimated. It might happen when there are more than 5000 results due to performance optimization.","type":"boolean","deprecated":true}},"type":"object","deprecated":true},"MaterialIssuedReward":{"properties":{"rewardId":{"type":"string","format":"uuid"},"issuedRewardId":{"type":"string","format":"uuid"},"name":{"type":"string"},"customerId":{"type":"string","format":"uuid"},"status":{"type":"string"},"redemptionDate":{"type":"string","format":"date-time"},"customerData":{"properties":{"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"phone":{"type":"string"},"loyaltyCardNumber":{"type":"string"},"address":{"type":"object"}},"type":"object"},"costInPoints":{"type":"number"},"token":{"type":"string"},"rewardType":{"type":"string"},"actionCause":{"$ref":"#/components/schemas/ActionCause"},"cancelledAt":{"type":"string","format":"date-time"}},"type":"object"},"ConversionCouponIssuedReward":{"properties":{"rewardId":{"type":"string","format":"uuid"},"issuedRewardId":{"type":"string","format":"uuid"},"name":{"type":"string"},"tax":{"type":"number","format":"float"},"taxPriceValue":{"type":"number","format":"float"},"price":{"type":"number","format":"float"},"customerId":{"type":"string","format":"uuid"},"status":{"type":"string"},"redemptionDate":{"type":"string","format":"date-time"},"issuedCoupon":{"properties":{"code":{"type":"string"},"value":{"type":"number","format":"float"},"activeFrom":{"type":"string","format":"date-time"},"activeTo":{"type":"string","format":"date-time"},"usedAt":{"type":"string","format":"date-time"}},"type":"object"},"customerData":{"properties":{"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"phone":{"type":"string"},"loyaltyCardNumber":{"type":"string"},"address":{"type":"object"}},"type":"object"},"costInPoints":{"type":"number","format":"float"},"token":{"type":"string"},"rewardType":{"type":"string"},"unitsConversion":{"properties":{"ratio":{"type":"number","format":"float"},"rounding":{"type":"string","enum":["up","down","default"]}},"type":"object"},"actionCause":{"$ref":"#/components/schemas/ActionCause"},"cancelledAt":{"type":"string","format":"date-time"}},"type":"object"},"DynamicIssuedReward":{"properties":{"rewardId":{"type":"string","format":"uuid"},"issuedRewardId":{"type":"string","format":"uuid"},"name":{"type":"string"},"tax":{"type":"number","format":"float"},"taxPriceValue":{"type":"number","format":"float"},"price":{"type":"number","format":"float"},"customerId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["issued","pending","approved","rejected","canceled","packing","awaiting_shipping","shipped","completed","returned"]},"redemptionDate":{"type":"string","format":"date-time"},"issuedCoupon":{"properties":{"code":{"type":"string"},"value":{"type":"number","format":"float"},"activeFrom":{"type":"string","format":"date-time"},"activeTo":{"type":"string","format":"date-time"},"usedAt":{"type":"string","format":"date-time"}},"type":"object"},"customerData":{"properties":{"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"phone":{"type":"string"},"loyaltyCardNumber":{"type":"string"},"address":{"type":"object"}},"type":"object"},"costInPoints":{"type":"number","format":"float"},"token":{"type":"string"},"rewardType":{"type":"string"},"actionCause":{"$ref":"#/components/schemas/ActionCause"},"cancelledAt":{"type":"string","format":"date-time"}},"type":"object"},"FortuneWheelIssuedRewardBasic":{"properties":{"rewardId":{"type":"string","format":"uuid"},"issuedRewardId":{"type":"string","format":"uuid"},"name":{"type":"string"},"customerId":{"type":"string","format":"uuid"},"status":{"type":"string"},"redemptionDate":{"type":"string","format":"date-time"},"customerData":{"properties":{"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"phone":{"type":"string"},"loyaltyCardNumber":{"type":"string"},"address":{"type":"object"}},"type":"object"},"costInPoints":{"type":"number"},"token":{"type":"string"},"rewardType":{"type":"string"},"actionCause":{"$ref":"#/components/schemas/ActionCause"},"cancelledAt":{"type":"string","format":"date-time"},"fortuneWheelStatus":{"required":["drawnAt","ruleName","effects"],"properties":{"drawnAt":{"type":"string","format":"date-time"},"ruleName":{"type":"string"},"effects":{"type":"array","items":{"$ref":"#/components/schemas/EffectResponseBasic"}}},"type":"object","additionalProperties":false}},"type":"object"},"EffectResponseBasic":{"oneOf":[{"title":"Unit Effect","required":["type","status"],"properties":{"type":{"type":"string","enum":["unit"]},"status":{"$ref":"#/components/schemas/EffectStatus"},"transfer":{"required":["transferId"],"properties":{"transferId":{"type":"string","format":"uuid"}},"type":"object","additionalProperties":false}},"type":"object","additionalProperties":false},{"title":"Redemption Effect","required":["type","status"],"properties":{"type":{"type":"string","enum":["redemption"]},"status":{"$ref":"#/components/schemas/EffectStatus"},"redemption":{"required":["issuedRewardId"],"properties":{"issuedRewardId":{"type":"string","format":"uuid"}},"type":"object","additionalProperties":false}},"type":"object","additionalProperties":false}]},"EffectStatus":{"required":["code"],"properties":{"code":{"type":"string","enum":["success","partial_success","failure"]},"message":{"type":"string"}},"type":"object","additionalProperties":false}},"responses":{"BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"required":["code","message","errors"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"required":["message","parameters","plural","code","path"],"properties":{"message":{"type":"string"},"parameters":{},"plural":{"type":"integer","nullable":true},"code":{"type":"string"},"path":{"type":"string"}},"type":"object"}}},"type":"object"}}}},"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/redemption":{"get":{"tags":["Reward"],"summary":"Get redeemed rewards list","description":"<label style=\"background-color: #BFE1F6;padding:5px;\">Integration</label><br><br>\nThis method returns a list of all redeemed rewards in the system.\nIf sorting is not chosen, the rows will be returned in an unspecified order.\nTo sort a result, use an `_orderBy` parameter in query.\n","operationId":"redemptionGetList","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/itemsOnPage"},{"$ref":"#/components/parameters/orderBy"},{"$ref":"#/components/parameters/scroll"},{"name":"rewardId","in":"query","required":false,"schema":{"type":"string"}},{"name":"name","in":"query","required":false,"schema":{"type":"string"}},{"name":"token","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"costInPoints","in":"query","required":false,"schema":{"type":"integer"}},{"name":"rewardType","in":"query","required":false,"schema":{"type":"string"}},{"name":"redemptionDate","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"cancelledAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"customerId","in":"query","required":false,"schema":{"type":"string"}},{"name":"customerData:email","in":"query","required":false,"schema":{"type":"string"}},{"name":"customerData:firstName","in":"query","required":false,"schema":{"type":"string"}},{"name":"customerData:lastName","in":"query","required":false,"schema":{"type":"string"}},{"name":"customerData:phone","in":"query","required":false,"schema":{"type":"string"}},{"name":"customerData:loyaltyCardNumber","in":"query","required":false,"schema":{"type":"string"}},{"name":"actionCause:transactionId","in":"query","description":"Transaction id related to","required":false,"schema":{"type":"string"}},{"name":"actionCause:campaignId","in":"query","description":"Campaign id related to","required":false,"schema":{"type":"string"}},{"name":"actionCause:customEventId","in":"query","description":"Custom event id related to","required":false,"schema":{"type":"string"}},{"name":"actionCause:internalEventName","in":"query","description":"Internal event name related to","required":false,"schema":{"type":"string"}},{"name":"reward:labels","in":"query","description":"Labels using pattern e.g. (key1;value1),(key2;value2),...","required":false,"schema":{"type":"string"}},{"name":"reward:categories","in":"query","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"List of Issued Reward","content":{"application/json":{"schema":{"oneOf":[{"title":"StaticIssuedRewardWithTotal","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/StaticIssuedReward"}},"total":{"$ref":"#/components/schemas/SearchableTotalResponse"}},"type":"object"},{"title":"StaticIssuedRewardWithScroll","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/StaticIssuedReward"}},"scroll":{"description":"Scroll identifier for pagination","type":"string"}},"type":"object"},{"title":"MaterialIssuedRewardWithTotal","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/MaterialIssuedReward"}},"total":{"$ref":"#/components/schemas/SearchableTotalResponse"}},"type":"object"},{"title":"MaterialIssuedRewardWithScroll","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/MaterialIssuedReward"}},"scroll":{"description":"Scroll identifier for pagination","type":"string"}},"type":"object"},{"title":"ConversionCouponIssuedRewardWithTotal","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ConversionCouponIssuedReward"}},"total":{"$ref":"#/components/schemas/SearchableTotalResponse"}},"type":"object"},{"title":"ConversionCouponIssuedRewardWithScroll","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ConversionCouponIssuedReward"}},"scroll":{"description":"Scroll identifier for pagination","type":"string"}},"type":"object"},{"title":"DynamicIssuedRewardWithTotal","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/DynamicIssuedReward"}},"total":{"$ref":"#/components/schemas/SearchableTotalResponse"}},"type":"object"},{"title":"DynamicIssuedRewardWithScroll","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/DynamicIssuedReward"}},"scroll":{"description":"Scroll identifier for pagination","type":"string"}},"type":"object"},{"title":"FortuneWheelIssuedRewardWithTotal","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/FortuneWheelIssuedRewardBasic"}},"total":{"$ref":"#/components/schemas/SearchableTotalResponse"}},"type":"object"},{"title":"FortuneWheelIssuedRewardWithScroll","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/FortuneWheelIssuedRewardBasic"}},"scroll":{"description":"Scroll identifier for pagination","type":"string"}},"type":"object"}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"$ref":"#/components/responses/AccessDenied"}}}}}}
````

## Change redeemed reward’s status change history

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br>\
> This method returns a Reward redemption's status change history.  \
> If sorting is not chosen, the rows will be returned in an unspecified order.  \
> To sort a result, use an \`\_orderBy\` parameter in query.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Reward","description":"These endpoints allow you to easily manage rewards."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"issuedReward":{"name":"issuedReward","in":"path","description":"IssuedReward ID","required":true,"schema":{"type":"string","format":"uuid"}}},"schemas":{"IssuedRewardStatusChange":{"properties":{"status":{"type":"string"},"comment":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"}},"type":"object"},"SearchableTotalResponse2":{"properties":{"all":{"type":"integer","deprecated":true},"filtered":{"type":"integer","deprecated":true},"estimated":{"description":"Field estimated is used to show that the results are estimated. It might happen when there are more than 5000 results due to performance optimization.","type":"boolean","deprecated":true}},"type":"object","deprecated":true}},"responses":{"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}},"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/redemption/{issuedReward}/status/history":{"get":{"tags":["Reward"],"summary":"Change redeemed reward’s status change history","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method returns a Reward redemption's status change history.  \nIf sorting is not chosen, the rows will be returned in an unspecified order.  \nTo sort a result, use an `_orderBy` parameter in query.\n","operationId":"redemptionGetStatusHistory","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/issuedReward"}],"responses":{"200":{"description":"Returned when successful","content":{"application/json":{"schema":{"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/IssuedRewardStatusChange"}},"total":{"$ref":"#/components/schemas/SearchableTotalResponse2"}},"type":"object"}}}},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
````

## Get reward's image

> \<label style="background-color: #BFE1F6;padding:5px;">Integration\</label>\<br>\<br>\
> This method returns a photo added to a specific Reward.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Reward","description":"These endpoints allow you to easily manage rewards."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"reward":{"name":"reward","in":"path","description":"Reward ID","required":true,"schema":{"type":"string","format":"uuid"}}},"responses":{"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/reward/{reward}/photo/{photoId}":{"get":{"tags":["Reward"],"summary":"Get reward's image","description":"<label style=\"background-color: #BFE1F6;padding:5px;\">Integration</label><br><br>\nThis method returns a photo added to a specific Reward.\n","operationId":"photoGet","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/reward"},{"name":"photoId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returned when successful","content":{"image/*":{"schema":{"type":"string","format":"binary"}}}},"302":{"description":"Redirect to presigned URL when presigned URLs are enabled."},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
````

## Delete reward’s image

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br>\
> This method allows removing a photo added to a specific Reward.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Reward","description":"These endpoints allow you to easily manage rewards."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"reward":{"name":"reward","in":"path","description":"Reward ID","required":true,"schema":{"type":"string","format":"uuid"}}},"responses":{"NoContent":{"description":"Success. No content."},"BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"required":["code","message","errors"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"required":["message","parameters","plural","code","path"],"properties":{"message":{"type":"string"},"parameters":{},"plural":{"type":"integer","nullable":true},"code":{"type":"string"},"path":{"type":"string"}},"type":"object"}}},"type":"object"}}}},"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}},"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/reward/{reward}/photo/{photoId}":{"delete":{"tags":["Reward"],"summary":"Delete reward’s image","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method allows removing a photo added to a specific Reward.\n","operationId":"photoDelete","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/reward"},{"name":"photoId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"$ref":"#/components/responses/NoContent"},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
````

## Add an image to the reward

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br>\
> This method allows adding a photo to a specific Reward.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Reward","description":"These endpoints allow you to easily manage rewards."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"reward":{"name":"reward","in":"path","description":"Reward ID","required":true,"schema":{"type":"string","format":"uuid"}}},"schemas":{"RewardPhotoFormType":{"required":["file"],"properties":{"file":{"type":"object"}},"type":"object"}},"responses":{"NoContent":{"description":"Success. No content."},"BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"required":["code","message","errors"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"required":["message","parameters","plural","code","path"],"properties":{"message":{"type":"string"},"parameters":{},"plural":{"type":"integer","nullable":true},"code":{"type":"string"},"path":{"type":"string"}},"type":"object"}}},"type":"object"}}}},"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}},"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/reward/{reward}/photo":{"post":{"tags":["Reward"],"summary":"Add an image to the reward","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method allows adding a photo to a specific Reward.\n","operationId":"photoPost","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/reward"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"properties":{"photo":{"$ref":"#/components/schemas/RewardPhotoFormType"}},"type":"object"}}}},"responses":{"204":{"$ref":"#/components/responses/NoContent"},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
````

## Change redeemed reward’s status

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br>\
> This method allows changing a Reward redemption status.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Reward","description":"These endpoints allow you to easily manage rewards."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"issuedReward":{"name":"issuedReward","in":"path","description":"IssuedReward ID","required":true,"schema":{"type":"string","format":"uuid"}}},"schemas":{"RedemptionStatusRequestBody":{"properties":{"status":{"description":"Current status of the redemeed reward. By default, all rewards are redeemed with issued status.","type":"string","enum":["issued","pending","approved","packing","awaiting_shipping","shipped","returned","completed","canceled","rejected"]},"comment":{"description":"Comment related to the status change (optional).","type":"string"}},"type":"object"}},"responses":{"NoContent":{"description":"Success. No content."},"Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"required":["message"],"properties":{"message":{"type":"string"}},"type":"object"}}}},"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}},"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/redemption/{issuedReward}/status":{"post":{"tags":["Reward"],"summary":"Change redeemed reward’s status","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method allows changing a Reward redemption status.\n","operationId":"redemptionPostStatus","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/issuedReward"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedemptionStatusRequestBody"}}}},"responses":{"204":{"$ref":"#/components/responses/NoContent"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
````

## Cancel redeemed reward

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br>\
> This method allows cancelling a Reward redemption.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Reward","description":"These endpoints allow you to easily manage rewards."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"issuedReward":{"name":"issuedReward","in":"path","description":"IssuedReward ID","required":true,"schema":{"type":"string","format":"uuid"}}},"responses":{"NoContent":{"description":"Success. No content."},"BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"required":["code","message","errors"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"required":["message","parameters","plural","code","path"],"properties":{"message":{"type":"string"},"parameters":{},"plural":{"type":"integer","nullable":true},"code":{"type":"string"},"path":{"type":"string"}},"type":"object"}}},"type":"object"}}}},"Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"required":["message"],"properties":{"message":{"type":"string"}},"type":"object"}}}},"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}},"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/redemption/{issuedReward}/cancel":{"post":{"tags":["Reward"],"summary":"Cancel redeemed reward","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method allows cancelling a Reward redemption.\n","operationId":"redemptionPostCancel","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/issuedReward"}],"responses":{"204":{"$ref":"#/components/responses/NoContent"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
````

## Draw a reward from the fortune wheel

> \<label style="background-color: #BFE1F6;padding:5px;">Integration\</label>\<br>\<br>\
> This method executes the draw of the reward from the fortune wheel and returns the result.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Reward","description":"These endpoints allow you to easily manage rewards."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"issuedReward":{"name":"issuedReward","in":"path","description":"IssuedReward ID","required":true,"schema":{"type":"string","format":"uuid"}}},"schemas":{"FortuneWheelStatus":{"required":["drawnAt","ruleName","effects"],"properties":{"drawnAt":{"type":"string","format":"date-time"},"ruleName":{"type":"string"},"effects":{"type":"array","items":{"$ref":"#/components/schemas/EffectResponse"}}},"type":"object","additionalProperties":false},"EffectResponse":{"oneOf":[{"title":"Unit Effect","required":["type","status"],"properties":{"type":{"type":"string","enum":["unit"]},"status":{"$ref":"#/components/schemas/EffectStatus"},"transfer":{"required":["transferId","walletCode","units"],"properties":{"transferId":{"type":"string","format":"uuid"},"walletCode":{"type":"string"},"units":{"type":"number","format":"float"}},"type":"object","additionalProperties":false}},"type":"object","additionalProperties":false},{"title":"Redemption Effect","required":["type","status"],"properties":{"type":{"type":"string","enum":["redemption"]},"status":{"$ref":"#/components/schemas/EffectStatus"},"redemption":{"required":["issuedRewardId","rewardId"],"properties":{"issuedRewardId":{"type":"string","format":"uuid"},"rewardId":{"type":"string","format":"uuid"},"name":{"type":"string"}},"type":"object","additionalProperties":false}},"type":"object","additionalProperties":false}]},"EffectStatus":{"required":["code"],"properties":{"code":{"type":"string","enum":["success","partial_success","failure"]},"message":{"type":"string"}},"type":"object","additionalProperties":false}},"responses":{"BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"required":["code","message","errors"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"required":["message","parameters","plural","code","path"],"properties":{"message":{"type":"string"},"parameters":{},"plural":{"type":"integer","nullable":true},"code":{"type":"string"},"path":{"type":"string"}},"type":"object"}}},"type":"object"}}}},"Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"required":["message"],"properties":{"message":{"type":"string"}},"type":"object"}}}},"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}},"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/redemption/{issuedReward}/draw":{"post":{"tags":["Reward"],"summary":"Draw a reward from the fortune wheel","description":"<label style=\"background-color: #BFE1F6;padding:5px;\">Integration</label><br><br>\nThis method executes the draw of the reward from the fortune wheel and returns the result.\n","operationId":"_redemptionPostDraw","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/issuedReward"}],"responses":{"200":{"description":"Draw result details","content":{"application/json":{"schema":{"properties":{"fortuneWheelStatus":{"$ref":"#/components/schemas/FortuneWheelStatus"}},"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
````

## Get available rewards to a member list

> \<label style="background-color: #BFE1F6;padding:5px;">Integration\</label>\<br>\<br>\
> This method returns a list of all Rewards existing in the system.  \
> If sorting is not chosen, the rows will be returned in an unspecified order.\
> To sort a result, use an \`\_orderBy\` parameter in query.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Reward","description":"These endpoints allow you to easily manage rewards."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"page":{"name":"_page","in":"query","description":"Number of page with results, starts from 1","required":false,"schema":{"type":"integer","default":1,"minimum":1}},"itemsOnPage":{"name":"_itemsOnPage","in":"query","description":"Items on one page","required":false,"schema":{"type":"integer","default":10,"maximum":50,"minimum":1}},"orderBy":{"name":"_orderBy","in":"query","description":"Sorting order. If sorting is not chosen, the rows will be returned in an unspecified order. Sort order: * `asc` - Ascending, from A to Z * `desc` - Descending, from Z to A","required":false,"style":"deepObject","explode":true,"schema":{"type":"object","additionalProperties":{"type":"string","enum":["asc","desc"]}}}},"schemas":{"MemberRewardResponse":{"required":["reward","brandIcon","rewardId","active","labels","featured","public","photos","createdAt","translations","segmentNames","levelNames","categoryNames"],"properties":{"reward":{"type":"string"},"name":{"type":"string"},"levels":{"type":"array","items":{"type":"string","format":"uuid"}},"segments":{"type":"array","items":{"type":"string","format":"uuid"}},"categories":{"type":"array","items":{"type":"string","format":"uuid"}},"brandIcon":{"type":"boolean"},"canBeBoughtByCustomer":{"type":"boolean","deprecated":true},"rewardId":{"type":"string","format":"uuid"},"target":{"type":"string","enum":["level","segment"]},"active":{"type":"boolean"},"costInPoints":{"type":"number"},"activity":{"properties":{"allTime":{"type":"boolean"}},"type":"object"},"visibility":{"properties":{"allTime":{"type":"boolean"}},"type":"object"},"tax":{"type":"number"},"taxPriceValue":{"type":"number"},"price":{"type":"number"},"labels":{"type":"array","items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"featured":{"type":"boolean"},"public":{"type":"boolean"},"photos":{"type":"array","items":{"type":"object"}},"createdAt":{"type":"string","format":"date-time"},"usageLimit":{"properties":{"general":{"type":"number"},"perUser":{"type":"number"}},"type":"object","deprecated":true},"notIssuedCoupons":{"type":"number"},"limitUsages":{"properties":{"general":{"properties":{"interval":{"properties":{"type":{"type":"string","enum":["calendarHours","calendarDays","calendarWeeks","calendarMonths","calendarYears"]}},"type":"object"},"currentValue":{"type":"number","format":"float"},"limitValue":{"type":"number","format":"float"}},"type":"object"},"perMember":{"properties":{"interval":{"properties":{"type":{"type":"string","enum":["calendarHours","calendarDays","calendarWeeks","calendarMonths","calendarYears"]}},"type":"object"},"currentValue":{"type":"number","format":"float"},"limitValue":{"type":"number","format":"float"}},"type":"object"}},"type":"object"},"fulfillmentTracking":{"type":"boolean","deprecated":true},"translations":{"type":"array","items":{"properties":{"name":{"type":"string"},"id":{"type":"integer"},"locale":{"type":"string"}},"type":"object"}},"couponGenerator":{"properties":{"length":{"type":"number"},"characterSet":{"type":"string"}},"type":"object"},"couponValue":{"type":"number"},"segmentNames":{"type":"object","additionalProperties":{"type":"string"}},"levelNames":{"type":"object","additionalProperties":{"type":"string"}},"categoryNames":{"type":"object","additionalProperties":{"type":"string"}},"usageLeft":{"type":"number","deprecated":true},"usageLeftForCustomer":{"type":"number","deprecated":true},"unitsConversion":{"properties":{"ratio":{"type":"number","format":"float"},"rounding":{"type":"string","enum":["up","down","default"]}},"type":"object"}},"type":"object"},"SearchableTotalResponse":{"required":["all","filtered","estimated"],"properties":{"all":{"type":"integer","deprecated":true},"filtered":{"type":"integer","deprecated":true},"estimated":{"description":"Field estimated is used to show that the results are estimated. It might happen when there are more than 5000 results due to performance optimization.","type":"boolean","deprecated":true}},"type":"object","deprecated":true}},"responses":{"BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"required":["code","message","errors"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"required":["message","parameters","plural","code","path"],"properties":{"message":{"type":"string"},"parameters":{},"plural":{"type":"integer","nullable":true},"code":{"type":"string"},"path":{"type":"string"}},"type":"object"}}},"type":"object"}}}},"Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"required":["message"],"properties":{"message":{"type":"string"}},"type":"object"}}}},"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}},"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/member/{member}/reward":{"get":{"tags":["Reward"],"summary":"Get available rewards to a member list","description":"<label style=\"background-color: #BFE1F6;padding:5px;\">Integration</label><br><br>\nThis method returns a list of all Rewards existing in the system.  \nIf sorting is not chosen, the rows will be returned in an unspecified order.\nTo sort a result, use an `_orderBy` parameter in query.\n","operationId":"_rewardGetMemberReward","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/itemsOnPage"},{"$ref":"#/components/parameters/orderBy"},{"name":"member","in":"path","required":true,"schema":{"type":"string","pattern":"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|email=[a-zA-Z0-9!#$%&'\\.*+\\-@=?^_`{|}~;]+|phone=[0-9+]+|loyaltyCardNumber=[0-9a-zA-Z\\._-]+"}},{"name":"rewardId","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"string","format":"uuid"}},{"name":"reward","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"string","enum":["static_coupon","material","dynamic_coupon","conversion_coupon"]}},{"name":"active","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"boolean"}},{"name":"createdAt","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"string","format":"date-time"}},{"name":"public","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"boolean"}},{"name":"fulfillmentTracking","in":"query","required":false,"deprecated":true,"style":"deepObject","explode":true,"schema":{"type":"boolean"}},{"name":"featured","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"boolean"}},{"name":"name","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"string"}},{"name":"shortDescription","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"string"}},{"name":"brandName","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"string"}},{"name":"brandDescription","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"string"}},{"name":"levels","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"string"}},{"name":"segments","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"string"}},{"name":"categories","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"string"}},{"name":"labels","in":"query","description":"Labels using pattern e.g. (key1;value1),(key2;value2),...","required":false,"style":"deepObject","explode":true,"schema":{"type":"string"}},{"name":"costInPoints","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"integer"}},{"name":"available","in":"query","description":"Filters out active rewards by active field and also by activity dates from and to.","required":false,"style":"deepObject","explode":true,"schema":{"type":"boolean"}},{"name":"visible","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"boolean"}},{"name":"visibleFrom","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"string","format":"date-time"}},{"name":"visibleTo","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"string","format":"date-time"}},{"name":"activeFrom","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"string","format":"date-time"}},{"name":"activeTo","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"string","format":"date-time"}},{"name":"format","in":"query","description":"If set to html, the descriptions will be in HTML format. Omit for raw output.","required":false,"style":"deepObject","schema":{"type":"string","format":"html|raw"}}],"responses":{"200":{"description":"Get all rewards available for logged in member.","content":{"application/json":{"schema":{"required":["items","total"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/MemberRewardResponse"}},"total":{"$ref":"#/components/schemas/SearchableTotalResponse"}},"type":"object","additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
````


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.openloyalty.io/api-reference/reward.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
