> 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/draw-a-reward-from-the-fortune-wheel.md).

# Draw a reward from the fortune wheel

Integration\
\
This method executes the draw of the reward from the fortune wheel and returns the result.

````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":"http","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","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":["code","message"],"properties":{"code":{"type":"integer"},"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"}}}},"Conflict":{"description":"Conflict — the resource is already being processed by another concurrent request.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}},"ConcurrencyLockTimeout":{"description":"Service Unavailable — a concurrency lock protecting this operation could not be acquired in time. The request lost a race with a concurrent request for the same resource (for example the same member) and was rolled back without any side effects. Nothing about the submitted payload is wrong: the request may be retried, ideally after a short backoff. The response body deliberately carries only the generic status text — the internal lock key is never exposed.","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"},"409":{"$ref":"#/components/responses/Conflict"},"503":{"$ref":"#/components/responses/ConcurrencyLockTimeout"}}}}}}
````


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.openloyalty.io/api-reference/reward/draw-a-reward-from-the-fortune-wheel.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
