> 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/points.md).

# Points

These endpoints allow you to easily manage points and points transfers.

## Transfer units between members

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br>\
> This method allows transferring Points between two specific Members.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Points","description":"These endpoints allow you to easily manage points and points transfers."}],"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":{"TransferPointsFormType":{"required":["receiver","points","sender"],"properties":{"receiver":{"type":"string"},"points":{"type":"number"},"comment":{"type":"string"},"sender":{"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"}}}},"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"}}}}}},"paths":{"/api/{storeCode}/points/transfer":{"post":{"tags":["Points"],"summary":"Transfer units between members","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method allows transferring Points between two specific Members.\n","operationId":"adminPostTransfer","parameters":[{"$ref":"#/components/parameters/storeCode"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"properties":{"transfer":{"$ref":"#/components/schemas/TransferPointsFormType"}},"type":"object"}}}},"responses":{"200":{"description":"Return points transfer ID.","content":{"application/json":{"schema":{"properties":{"transferId":{"type":"string"}},"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/AccessDenied"}}}}}}
````

## Get unit transfer’s details

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

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Points","description":"These endpoints allow you to easily manage points and points transfers."}],"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"}},"transfer":{"name":"transfer","in":"path","description":"Points transfer ID","required":true,"schema":{"type":"string","format":"uuid"}}},"schemas":{"Transfer":{"properties":{"transferId":{"type":"string","format":"uuid"},"type":{"type":"string"},"accountId":{"type":"string"},"lockedUntil":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"storeId":{"type":"string","format":"uuid"},"comment":{"type":"string"},"cancelled":{"type":"boolean"},"pending":{"type":"boolean"},"unlockedAt":{"type":"string","format":"date-time"},"actionCause":{"$ref":"#/components/schemas/ActionCause2"},"value":{"type":"number","format":"float"},"externalTransferId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"type":"object"},"ActionCause2":{"properties":{"campaignId":{"type":"string","format":"uuid"},"customerId":{"type":"string","format":"uuid"},"transactionId":{"type":"string","format":"uuid"},"customEventId":{"type":"string","format":"uuid"},"internalEventName":{"type":"string"},"performedAt":{"type":"string","format":"date-time"},"rewardId":{"type":"string"},"issuedRewardId":{"type":"string"}},"type":"object"},"WalletTypeBasic":{"properties":{"name":{"type":"string"},"code":{"type":"string"},"unitSingularName":{"type":"string"},"unitPluralName":{"type":"string"}},"type":"object"},"Member":{"required":["id"],"properties":{"id":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"phoneNumber":{"type":"string"},"loyaltyCardNumber":{"type":"string"}},"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}/points/{transfer}":{"get":{"tags":["Points"],"summary":"Get unit transfer’s details","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method returns detailed information about specific transfer in the system.\n","operationId":"_transferGet","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/transfer"}],"responses":{"200":{"description":"Returned when successful.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Transfer"},{"properties":{"walletType":{"$ref":"#/components/schemas/WalletTypeBasic"}},"type":"object"},{"properties":{"member":{"$ref":"#/components/schemas/Member"}},"type":"object"},{"properties":{"labels":{"type":"object","nullable":true,"additionalProperties":{"type":"string","nullable":true}}},"type":"object"}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
````

## Update transfer labels

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br>\
> This method allows to update or add labels to an existing transfer.\
> \
> \*\*Usage rules:\*\*\
> \* \*\*Adding:\*\* To add a new label, provide a new key with its value.\
> \* \*\*Editing:\*\* To update an existing label, provide its key with a new value.\
> \* \*\*Removing:\*\* To remove an label, provide its key and set the value to \`null\`.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Points","description":"These endpoints allow you to easily manage points and points transfers."}],"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"}},"transfer":{"name":"transfer","in":"path","description":"Points transfer ID","required":true,"schema":{"type":"string","format":"uuid"}}},"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}/points/{transfer}":{"patch":{"tags":["Points"],"summary":"Update transfer labels","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method allows to update or add labels to an existing transfer.\n\n**Usage rules:**\n* **Adding:** To add a new label, provide a new key with its value.\n* **Editing:** To update an existing label, provide its key with a new value.\n* **Removing:** To remove an label, provide its key and set the value to `null`.\n","operationId":"_pointsPatchTransfer","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/transfer"}],"requestBody":{"content":{"application/json":{"schema":{"required":["transfer"],"properties":{"transfer":{"required":["labels"],"properties":{"labels":{"type":"object","additionalProperties":{"type":"string","nullable":true}}},"type":"object"}},"type":"object"}}}},"responses":{"204":{"description":"Returned when successful."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
````

## Get histogram of number of units

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br>\
> This method returns histogram of number of Points.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Points","description":"These endpoints allow you to easily manage points and points transfers."}],"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"}}},"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"}}}}}},"paths":{"/api/{storeCode}/points/history":{"get":{"tags":["Points"],"summary":"Get histogram of number of units","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method returns histogram of number of Points.\n","operationId":"pointsGetPointsTransfer","parameters":[{"$ref":"#/components/parameters/storeCode"},{"name":"pointType","in":"query","description":"Filter by point type","required":true,"allowEmptyValue":false,"schema":{"type":"string","format":"spent|earned|expired|pending","default":null,"pattern":"(spent|earned|expired|pending)","nullable":false}},{"name":"lastDays","in":"query","description":"Range from last X days","required":false,"allowEmptyValue":true,"schema":{"type":"integer","default":30}},{"name":"futureDays","in":"query","description":"Range to X days in the future","required":false,"allowEmptyValue":true,"schema":{"type":"integer","default":0}},{"name":"interval","in":"query","description":"Group by interval","required":false,"allowEmptyValue":false,"schema":{"type":"string","format":"day|month|year","default":"day","pattern":"(day|month|year)","nullable":false}}],"responses":{"200":{"description":"Return created message ID.","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"float"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/AccessDenied"}}}}}}
````

## Get units transfers list

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br>\
> This method returns a list of all Point transfers that have been created 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":"Points","description":"These endpoints allow you to easily manage points and points transfers."}],"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":{"Transfer":{"properties":{"transferId":{"type":"string","format":"uuid"},"type":{"type":"string"},"accountId":{"type":"string"},"lockedUntil":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"storeId":{"type":"string","format":"uuid"},"comment":{"type":"string"},"cancelled":{"type":"boolean"},"pending":{"type":"boolean"},"unlockedAt":{"type":"string","format":"date-time"},"actionCause":{"$ref":"#/components/schemas/ActionCause2"},"value":{"type":"number","format":"float"},"externalTransferId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"type":"object"},"ActionCause2":{"properties":{"campaignId":{"type":"string","format":"uuid"},"customerId":{"type":"string","format":"uuid"},"transactionId":{"type":"string","format":"uuid"},"customEventId":{"type":"string","format":"uuid"},"internalEventName":{"type":"string"},"performedAt":{"type":"string","format":"date-time"},"rewardId":{"type":"string"},"issuedRewardId":{"type":"string"}},"type":"object"},"WalletTypeBasic":{"properties":{"name":{"type":"string"},"code":{"type":"string"},"unitSingularName":{"type":"string"},"unitPluralName":{"type":"string"}},"type":"object"},"Member":{"required":["id"],"properties":{"id":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"phoneNumber":{"type":"string"},"loyaltyCardNumber":{"type":"string"}},"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},"ScrollResponse":{"properties":{"next":{"description":"Scroll identifier for pagination","type":"string","nullable":true}},"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"}}}}}},"paths":{"/api/{storeCode}/points":{"get":{"tags":["Points"],"summary":"Get units transfers list","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method returns a list of all Point transfers that have been created 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":"pointsGetTransferList","parameters":[{"$ref":"#/components/parameters/storeCode"},{"name":"transferId","in":"query","description":"Transfer id","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"accountId","in":"query","description":"Owner account id","required":false,"deprecated":true,"schema":{"type":"string","format":"uuid"}},{"name":"walletId","in":"query","description":"Owner wallet id","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"type","in":"query","description":"Type","required":false,"schema":{"type":"string"}},{"name":"value","in":"query","description":"Value","required":false,"schema":{"type":"number"}},{"name":"comment","in":"query","description":"Comment","required":false,"schema":{"type":"string"}},{"name":"createdBy","in":"query","description":"Creator","required":false,"schema":{"type":"string"}},{"name":"cancelled","in":"query","description":"cancelled","required":false,"schema":{"type":"boolean"}},{"name":"pending","in":"query","description":"pending","required":false,"schema":{"type":"boolean"}},{"name":"createdAt","in":"query","description":"createdAt","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"registeredOn","in":"query","description":"registeredOn","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"lockedUntil","in":"query","description":"lockedUntil","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"expiresAt","in":"query","description":"expiresAt","required":false,"schema":{"type":"string","format":"date-time"}},{"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":"walletType:code","in":"query","description":"Wallet type code related to","required":false,"schema":{"type":"string"}},{"name":"member:id","in":"query","description":"Member indentifier related to","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"member:email","in":"query","description":"Member email related to","required":false,"schema":{"type":"string","format":"email"}},{"name":"member:phoneNumber","in":"query","description":"Member phone number related to","required":false,"schema":{"type":"string"}},{"name":"member:loyaltyCardNumber","in":"query","description":"Member loyalty card number related to","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/itemsOnPage"},{"$ref":"#/components/parameters/orderBy"},{"$ref":"#/components/parameters/scroll"}],"responses":{"200":{"description":"List of transfers","content":{"application/json":{"schema":{"oneOf":[{"title":"TransferResponse","required":["items","total"],"properties":{"items":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/Transfer"},{"properties":{"walletType":{"$ref":"#/components/schemas/WalletTypeBasic"}},"type":"object"},{"properties":{"member":{"$ref":"#/components/schemas/Member"}},"type":"object"},{"properties":{"labels":{"type":"object","nullable":true,"additionalProperties":{"type":"string","nullable":true}}},"type":"object"}]}},"total":{"$ref":"#/components/schemas/SearchableTotalResponse"}},"type":"object","additionalProperties":false},{"title":"TransferResponseWithScroll","required":["items","scroll"],"properties":{"items":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/Transfer"},{"properties":{"walletType":{"$ref":"#/components/schemas/WalletTypeBasic"}},"type":"object"},{"properties":{"member":{"$ref":"#/components/schemas/Member"}},"type":"object"},{"properties":{"labels":{"type":"object","nullable":true,"additionalProperties":{"type":"string","nullable":true}}},"type":"object"}]}},"scroll":{"$ref":"#/components/schemas/ScrollResponse"}},"type":"object","additionalProperties":false}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/AccessDenied"}}}}}}
````

## Activate units transfer

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

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Points","description":"These endpoints allow you to easily manage points and points transfers."}],"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"}},"transfer":{"name":"transfer","in":"path","description":"Points transfer 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}/points/{transfer}/activate":{"post":{"tags":["Points"],"summary":"Activate units transfer","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method allows activating specific Points transfer.\n","operationId":"pointsPostTransferActivate","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/transfer"}],"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"}}}}}}
````

## Add an units transfer

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

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Points","description":"These endpoints allow you to easily manage points and points transfers."}],"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":{"AddPointsFormType":{"required":["customer","points"],"properties":{"customer":{"type":"string"},"points":{"type":"number"},"expiresInDays":{"type":"number"},"lockedUntilDays":{"type":"number"},"comment":{"type":"string"},"externalTransferId":{"type":"string"},"walletCode":{"type":"string"},"requestedAt":{"type":"string","format":"date-time"},"labels":{"type":"array","items":{"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"}}}},"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"}}}}}},"paths":{"/api/{storeCode}/points/add":{"post":{"tags":["Points"],"summary":"Add an units transfer","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method allows adding Points transfer to specific Member.\n","operationId":"pointsPostTransferAdd","parameters":[{"$ref":"#/components/parameters/storeCode"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"properties":{"transfer":{"$ref":"#/components/schemas/AddPointsFormType"}},"type":"object"}}}},"responses":{"200":{"description":"Return points transfer ID.","content":{"application/json":{"schema":{"properties":{"transferId":{"type":"string"}},"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/AccessDenied"}}}}}}
````

## Block units

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br>\
> This method allows blocking Points to specific Member.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Points","description":"These endpoints allow you to easily manage points and points transfers."}],"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":{"BlockPointsFormType":{"required":["customer","points"],"properties":{"customer":{"type":"string"},"points":{"type":"number"},"comment":{"type":"string"},"externalTransferId":{"type":"string"},"walletCode":{"type":"string"},"requestedAt":{"type":"string","format":"date-time"},"labels":{"type":"array","items":{"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"}}}},"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"}}}}}},"paths":{"/api/{storeCode}/points/block":{"post":{"tags":["Points"],"summary":"Block units","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method allows blocking Points to specific Member.\n","operationId":"pointsPostTransferBlock","parameters":[{"$ref":"#/components/parameters/storeCode"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"properties":{"transfer":{"$ref":"#/components/schemas/BlockPointsFormType"}},"type":"object"}}}},"responses":{"200":{"description":"Return points transfer ID.","content":{"application/json":{"schema":{"properties":{"transferId":{"type":"string"}},"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/AccessDenied"}}}}}}
````

## Cancel units transfer

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br>\
> This method allows canceling a specific Point transfer related to a Member.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Points","description":"These endpoints allow you to easily manage points and points transfers."}],"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"}},"transfer":{"name":"transfer","in":"path","description":"Points transfer 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}/points/{transfer}/cancel":{"post":{"tags":["Points"],"summary":"Cancel units transfer","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method allows canceling a specific Point transfer related to a Member.\n","operationId":"pointsPostTransferCancel","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/transfer"}],"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"}}}}}}
````

## Spend units

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

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Points","description":"These endpoints allow you to easily manage points and points transfers."}],"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":{"SpendPointsFormType":{"required":["customer","points"],"properties":{"customer":{"type":"string"},"points":{"type":"number"},"comment":{"type":"string"},"externalTransferId":{"type":"string"},"walletCode":{"type":"string"},"requestedAt":{"type":"string","format":"date-time"},"labels":{"type":"array","items":{"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"}}}},"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}/points/spend":{"post":{"tags":["Points"],"summary":"Spend units","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method allows spending Points of a specific Member.\n","operationId":"pointsPostTransferSpend","parameters":[{"$ref":"#/components/parameters/storeCode"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"properties":{"transfer":{"$ref":"#/components/schemas/SpendPointsFormType"}},"type":"object"}}}},"responses":{"200":{"description":"Return points transfer ID.","content":{"application/json":{"schema":{"properties":{"transferId":{"type":"string"}},"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
````

## Expire units transfer

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br>\
> This method allows expiring a specific Point transfer related to a Member.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Points","description":"These endpoints allow you to easily manage points and points transfers."}],"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"}},"transfer":{"name":"transfer","in":"path","description":"Points transfer 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}/points/{transfer}/expire":{"post":{"tags":["Points"],"summary":"Expire units transfer","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method allows expiring a specific Point transfer related to a Member.\n","operationId":"pointsPostTransferExpire","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/transfer"}],"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"}}}}}}
````


---

# 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/points.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.
