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

# Wallet

These endpoints will allow you to easily manage wallets and wallet types.

## Get member’s wallets details

> \<label style="background-color: #BFE1F6;padding:5px;">Integration\</label>\<br>\<br>\
> 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":"Wallet","description":"These endpoints will allow you to easily manage wallets and wallet types."}],"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":{"Wallet":{"properties":{"walletType":{"$ref":"#/components/schemas/WalletTypeBasicData"},"createdAt":{"type":"string","format":"date-time"},"account":{"$ref":"#/components/schemas/Account2"},"unitsLimitUsed":{"type":"number","format":"float"},"unitsLimitRemaining":{"type":"number","format":"float"}},"type":"object"},"WalletTypeBasicData":{"properties":{"walletTypeId":{"type":"string","format":"uuid"},"code":{"type":"string"},"name":{"type":"string"},"unitSingularName":{"type":"string"},"unitPluralName":{"type":"string"},"active":{"type":"boolean"},"isDefault":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"limits":{"$ref":"#/components/schemas/Limits"}},"type":"object"},"Limits":{"properties":{},"type":"object"},"Account2":{"properties":{"earnedUnits":{"type":"number","format":"float"},"transferredUnits":{"type":"number","format":"float"},"spentUnits":{"type":"number","format":"float"},"activeUnits":{"type":"number","format":"float"},"lockedUnits":{"type":"number","format":"float"},"blockedUnits":{"type":"number","format":"float"},"expiredUnits":{"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},"ExpiredToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"InvalidToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"Unauthorized":{"required":["message"],"properties":{"message":{"type":"string"}},"type":"object"}},"responses":{"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/member/{member}/wallet":{"get":{"tags":["Wallet"],"summary":"Get member’s wallets details","description":"<label style=\"background-color: #BFE1F6;padding:5px;\">Integration</label><br><br>\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":"memberWalletGetList","parameters":[{"$ref":"#/components/parameters/storeCode"},{"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":"name","in":"query","required":false,"schema":{"type":"string"}},{"name":"createdAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"walletTypeId","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/itemsOnPage"},{"$ref":"#/components/parameters/orderBy"}],"responses":{"200":{"description":"List of wallets","content":{"application/json":{"schema":{"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Wallet"}},"total":{"$ref":"#/components/schemas/SearchableTotalResponse2"}},"type":"object"}}}},"401":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ExpiredToken"},{"$ref":"#/components/schemas/InvalidToken"},{"$ref":"#/components/schemas/Unauthorized"}]}}}},"403":{"$ref":"#/components/responses/AccessDenied"}}}}}}
````

## Check wallet details

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br><br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Wallet","description":"These endpoints will allow you to easily manage wallets and wallet types."}],"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"}},"wallet":{"name":"wallet","in":"path","description":"Wallet ID","required":true,"schema":{"type":"string"}}},"schemas":{"Wallet":{"properties":{"walletType":{"$ref":"#/components/schemas/WalletTypeBasicData"},"createdAt":{"type":"string","format":"date-time"},"account":{"$ref":"#/components/schemas/Account2"},"unitsLimitUsed":{"type":"number","format":"float"},"unitsLimitRemaining":{"type":"number","format":"float"}},"type":"object"},"WalletTypeBasicData":{"properties":{"walletTypeId":{"type":"string","format":"uuid"},"code":{"type":"string"},"name":{"type":"string"},"unitSingularName":{"type":"string"},"unitPluralName":{"type":"string"},"active":{"type":"boolean"},"isDefault":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"limits":{"$ref":"#/components/schemas/Limits"}},"type":"object"},"Limits":{"properties":{},"type":"object"},"Account2":{"properties":{"earnedUnits":{"type":"number","format":"float"},"transferredUnits":{"type":"number","format":"float"},"spentUnits":{"type":"number","format":"float"},"activeUnits":{"type":"number","format":"float"},"lockedUnits":{"type":"number","format":"float"},"blockedUnits":{"type":"number","format":"float"},"expiredUnits":{"type":"number","format":"float"}},"type":"object"},"ExpiredToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"InvalidToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"Unauthorized":{"required":["message"],"properties":{"message":{"type":"string"}},"type":"object"}},"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}/wallet/{wallet}":{"get":{"tags":["Wallet"],"summary":"Check wallet details","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\n","operationId":"walletGet","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/wallet"}],"responses":{"200":{"description":"Wallet details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Wallet"}}}},"401":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ExpiredToken"},{"$ref":"#/components/schemas/InvalidToken"},{"$ref":"#/components/schemas/Unauthorized"}]}}}},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
````

## Get wallets list

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br>\
> 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":"Wallet","description":"These endpoints will allow you to easily manage wallets and wallet types."}],"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":{"ListOfItems":{"properties":{"items":{"type":"array","items":{"type":"object"}},"total":{"description":"Total results","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}},"type":"object"},"WalletType":{"required":["name","walletTypeId","code","unitSingularName","unitPluralName","active","isDefault","createdAt","limits"],"properties":{"name":{"type":"string"},"walletTypeId":{"type":"string","format":"uuid"},"code":{"type":"string"},"unitSingularName":{"type":"string"},"unitPluralName":{"type":"string"},"active":{"type":"boolean"},"isDefault":{"description":"Indicates if wallet type is default. Only one default wallet type can be defined in the tenant","type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"limits":{"$ref":"#/components/schemas/WalletTypeLimit"},"allowNegativeBalance":{"type":"boolean"}},"type":"object","additionalProperties":false},"WalletTypeLimit":{"properties":{"points":{"description":"Global limit of units for wallet type","properties":{"interval":{"properties":{"type":{"description":"Interval of time","type":"string","enum":["calendarHours","calendarDays","calendarWeeks","calendarMonths","calendarYears"]},"value":{"description":"Number of next intervals","type":"integer","default":1,"minimum":1}},"type":"object"},"value":{"description":"Limit value in units","type":"number","format":"float","minimum":1}},"type":"object"},"pointsPerMember":{"description":"Limit of units for wallet type and member","required":["value"],"properties":{"interval":{"properties":{"type":{"description":"Interval of time","type":"string","enum":["calendarHours","calendarDays","calendarWeeks","calendarMonths","calendarYears"]},"value":{"description":"Number of next intervals","type":"integer","default":1,"minimum":1}},"type":"object"},"value":{"description":"Limit value in units","type":"number","format":"float","minimum":1}},"type":"object","additionalProperties":false}},"type":"object","additionalProperties":false},"ExpiredToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"InvalidToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"Unauthorized":{"required":["message"],"properties":{"message":{"type":"string"}},"type":"object"}},"responses":{"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/walletType":{"get":{"tags":["Wallet"],"summary":"Get wallets list","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\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":"_walletTypeGetList","parameters":[{"$ref":"#/components/parameters/storeCode"},{"name":"name","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"object","additionalProperties":{"type":"string"}}},{"name":"active","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"isDefault","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"createdAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/itemsOnPage"},{"$ref":"#/components/parameters/orderBy"}],"responses":{"200":{"description":"List of walletTypes","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListOfItems"},{"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/WalletType"}}},"type":"object"}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ExpiredToken"},{"$ref":"#/components/schemas/InvalidToken"},{"$ref":"#/components/schemas/Unauthorized"}]}}}},"403":{"$ref":"#/components/responses/AccessDenied"}}}}}}
````

## Add a wallet

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

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Wallet","description":"These endpoints will allow you to easily manage wallets and wallet types."}],"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":{"PostWalletTypeRequestBody":{"properties":{"walletType":{"required":["translations","unitSingularName","unitPluralName","unitDaysExpiryAfter","code"],"properties":{"translations":{"properties":{"en":{"required":["name"],"properties":{"name":{"description":"Wallet name","type":"string"},"description":{"description":"Wallet description","type":"string"}},"type":"object"}},"type":"object"},"unitSingularName":{"description":"Singular name of the unit","type":"string"},"unitPluralName":{"description":"Plural name of the unit","type":"string"},"active":{"description":"Indicates if the wallet type is active","type":"boolean"},"unitDaysExpiryAfter":{"description":"Expiry time for the unit:\n\n\n * `all_time_active` - Units never expire\n * `after_x_days` - Units will expire after `unitDaysActiveCount` days\n * `at_the_end_of_the_x_th_year` - Units will expire at the end of the `unitYearsActiveCount`-th year\n * `at_the_end_of_the_month` - Units will expire at the end of the month\n * `at_the_end_of_the_chosen_date` - Units will expire at chosen day of the month\n","type":"string","enum":["all_time_active","after_x_days","at_the_end_of_the_month","at_the_end_of_the_x_th_year","at_the_end_of_the_chosen_date"]},"unitDaysActiveCount":{"description":"Number of days to expire units. Required when `unitDaysExpiryAfter` is `after_x_days`","type":"integer"},"unitYearsActiveCount":{"description":"Number of year when units will expire. `0` means this year. Required when `unitDaysExpiryAfter` is `at_the_end_of_the_x_th_year`","type":"integer"},"unitDaysLocked":{"description":"Number of days when units will be locked. `0` means this year. Required when `allTimeNotLocked` is `false`","type":"integer"},"allTimeNotLocked":{"description":"Indicates if units will be locked after creation. If `false` then units will be locked after creation for `unitDaysLocked` days.","type":"boolean","default":true},"allowNegativeBalance":{"description":"Indicates if negative balance is allowed","type":"boolean","default":false},"unitExpiryDate":{"description":"Expiration date for unit in format `m-d`. Required when `unitDaysExpiryAfter` is `at_the_end_of_the_chosen_date`","type":"string"},"limits":{"$ref":"#/components/schemas/WalletTypeLimit"},"code":{"description":"Unique wallet type code","type":"string"}},"type":"object","additionalProperties":false}},"type":"object","additionalProperties":false},"WalletTypeLimit":{"properties":{"points":{"description":"Global limit of units for wallet type","properties":{"interval":{"properties":{"type":{"description":"Interval of time","type":"string","enum":["calendarHours","calendarDays","calendarWeeks","calendarMonths","calendarYears"]},"value":{"description":"Number of next intervals","type":"integer","default":1,"minimum":1}},"type":"object"},"value":{"description":"Limit value in units","type":"number","format":"float","minimum":1}},"type":"object"},"pointsPerMember":{"description":"Limit of units for wallet type and member","required":["value"],"properties":{"interval":{"properties":{"type":{"description":"Interval of time","type":"string","enum":["calendarHours","calendarDays","calendarWeeks","calendarMonths","calendarYears"]},"value":{"description":"Number of next intervals","type":"integer","default":1,"minimum":1}},"type":"object"},"value":{"description":"Limit value in units","type":"number","format":"float","minimum":1}},"type":"object","additionalProperties":false}},"type":"object","additionalProperties":false},"ExpiredToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"InvalidToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"Unauthorized":{"required":["message"],"properties":{"message":{"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"}}}},"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/walletType":{"post":{"tags":["Wallet"],"summary":"Add a wallet","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method allows adding a new wallet to the system.\n","operationId":"_walletTypePost","parameters":[{"$ref":"#/components/parameters/storeCode"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostWalletTypeRequestBody"}}}},"responses":{"200":{"description":"Return created walletType ID.","content":{"application/json":{"schema":{"properties":{"walletTypeId":{"type":"string","format":"uuid"}},"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ExpiredToken"},{"$ref":"#/components/schemas/InvalidToken"},{"$ref":"#/components/schemas/Unauthorized"}]}}}},"403":{"$ref":"#/components/responses/AccessDenied"}}}}}}
````

## Check wallet type details

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br><br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Wallet","description":"These endpoints will allow you to easily manage wallets and wallet types."}],"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"}},"walletType":{"name":"walletType","in":"path","description":"WalletType ID","required":true,"schema":{"type":"string","format":"uuid"}}},"schemas":{"WalletTypeDetails":{"required":["translations","walletTypeId","code","unitSingularName","unitPluralName","active","isDefault","createdAt","limits"],"properties":{"translations":{"properties":{"en":{"required":["name"],"properties":{"name":{"description":"Wallet name","type":"string"},"description":{"description":"Wallet description","type":"string"}},"type":"object"}},"type":"object"},"walletTypeId":{"type":"string","format":"uuid"},"code":{"type":"string"},"unitSingularName":{"type":"string"},"unitPluralName":{"type":"string"},"active":{"type":"boolean"},"isDefault":{"type":"boolean"},"unitDaysExpiryAfter":{"type":"string"},"unitDaysActiveCount":{"type":"integer"},"unitYearsActiveCount":{"type":"integer"},"unitDaysLocked":{"type":"integer"},"allTimeNotLocked":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"unitExpiryDate":{"description":"Expiration date for unit in format `m-d`.","type":"string"},"limits":{"$ref":"#/components/schemas/WalletTypeLimit"},"allowNegativeBalance":{"type":"boolean"}},"type":"object","additionalProperties":false},"WalletTypeLimit":{"properties":{"points":{"description":"Global limit of units for wallet type","properties":{"interval":{"properties":{"type":{"description":"Interval of time","type":"string","enum":["calendarHours","calendarDays","calendarWeeks","calendarMonths","calendarYears"]},"value":{"description":"Number of next intervals","type":"integer","default":1,"minimum":1}},"type":"object"},"value":{"description":"Limit value in units","type":"number","format":"float","minimum":1}},"type":"object"},"pointsPerMember":{"description":"Limit of units for wallet type and member","required":["value"],"properties":{"interval":{"properties":{"type":{"description":"Interval of time","type":"string","enum":["calendarHours","calendarDays","calendarWeeks","calendarMonths","calendarYears"]},"value":{"description":"Number of next intervals","type":"integer","default":1,"minimum":1}},"type":"object"},"value":{"description":"Limit value in units","type":"number","format":"float","minimum":1}},"type":"object","additionalProperties":false}},"type":"object","additionalProperties":false},"ExpiredToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"InvalidToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"Unauthorized":{"required":["message"],"properties":{"message":{"type":"string"}},"type":"object"}},"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}/walletType/{walletType}":{"get":{"tags":["Wallet"],"summary":"Check wallet type details","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\n","operationId":"_walletTypeGet","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/walletType"}],"responses":{"200":{"description":"WalletType details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletTypeDetails"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ExpiredToken"},{"$ref":"#/components/schemas/InvalidToken"},{"$ref":"#/components/schemas/Unauthorized"}]}}}},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
````

## Update wallet’s configuration

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br><br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Wallet","description":"These endpoints will allow you to easily manage wallets and wallet types."}],"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"}},"walletType":{"name":"walletType","in":"path","description":"WalletType ID","required":true,"schema":{"type":"string","format":"uuid"}}},"schemas":{"PutWalletTypeRequestBody":{"properties":{"walletType":{"required":["translations","unitSingularName","unitPluralName","unitDaysExpiryAfter"],"properties":{"translations":{"properties":{"en":{"required":["name"],"properties":{"name":{"description":"Wallet name","type":"string"},"description":{"description":"Wallet description","type":"string"}},"type":"object"}},"type":"object"},"unitSingularName":{"description":"Singular name of the unit","type":"string"},"unitPluralName":{"description":"Plural name of the unit","type":"string"},"active":{"description":"Indicates if the wallet type is active","type":"boolean"},"unitDaysExpiryAfter":{"description":"Expiry time for the unit:\n\n\n * `all_time_active` - Units never expire\n * `after_x_days` - Units will expire after `unitDaysActiveCount` days\n * `at_the_end_of_the_x_th_year` - Units will expire at the end of the `unitYearsActiveCount`-th year\n * `at_the_end_of_the_month` - Units will expire at the end of the month\n * `at_the_end_of_the_chosen_date` - Units will expire at chosen day of the month\n","type":"string","enum":["all_time_active","after_x_days","at_the_end_of_the_month","at_the_end_of_the_x_th_year","at_the_end_of_the_chosen_date"]},"unitDaysActiveCount":{"description":"Number of days to expire units. Required when `unitDaysExpiryAfter` is `after_x_days`","type":"integer"},"unitYearsActiveCount":{"description":"Number of year when units will expire. `0` means this year. Required when `unitDaysExpiryAfter` is `at_the_end_of_the_x_th_year`","type":"integer"},"unitDaysLocked":{"description":"Number of days when units will be locked. `0` means this year. Required when `allTimeNotLocked` is `false`","type":"integer"},"allTimeNotLocked":{"description":"Indicates if units will be locked after creation. If `false` then units will be locked after creation for `unitDaysLocked` days.","type":"boolean","default":true},"allowNegativeBalance":{"description":"Indicates if negative balance is allowed","type":"boolean","default":false},"unitExpiryDate":{"description":"Expiration date for unit in format `m-d`. Required when `unitDaysExpiryAfter` is `at_the_end_of_the_chosen_date`","type":"string"},"limits":{"$ref":"#/components/schemas/WalletTypeLimit"}},"type":"object","additionalProperties":false}},"type":"object","additionalProperties":false},"WalletTypeLimit":{"properties":{"points":{"description":"Global limit of units for wallet type","properties":{"interval":{"properties":{"type":{"description":"Interval of time","type":"string","enum":["calendarHours","calendarDays","calendarWeeks","calendarMonths","calendarYears"]},"value":{"description":"Number of next intervals","type":"integer","default":1,"minimum":1}},"type":"object"},"value":{"description":"Limit value in units","type":"number","format":"float","minimum":1}},"type":"object"},"pointsPerMember":{"description":"Limit of units for wallet type and member","required":["value"],"properties":{"interval":{"properties":{"type":{"description":"Interval of time","type":"string","enum":["calendarHours","calendarDays","calendarWeeks","calendarMonths","calendarYears"]},"value":{"description":"Number of next intervals","type":"integer","default":1,"minimum":1}},"type":"object"},"value":{"description":"Limit value in units","type":"number","format":"float","minimum":1}},"type":"object","additionalProperties":false}},"type":"object","additionalProperties":false},"ExpiredToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"InvalidToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"Unauthorized":{"required":["message"],"properties":{"message":{"type":"string"}},"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}/walletType/{walletType}":{"put":{"tags":["Wallet"],"summary":"Update wallet’s configuration","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\n","operationId":"_walletTypePut","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/walletType"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutWalletTypeRequestBody"}}}},"responses":{"204":{"$ref":"#/components/responses/NoContent"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ExpiredToken"},{"$ref":"#/components/schemas/InvalidToken"},{"$ref":"#/components/schemas/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/wallet.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.
