> 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/member/get-members-list.md).

# Get members list

Integration\
\
This method returns list of all Members' accounts exist 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.

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Member","description":"These endpoints allow you to easily manage members."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"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":{"Customer":{"properties":{"customerId":{"type":"string","format":"uuid"},"registeredAt":{"type":"string","format":"date-time"},"active":{"type":"boolean"},"channelId":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"gender":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"birthDate":{"type":"string","format":"date-time"},"lastLevelRecalculation":{"type":"string","format":"date-time"},"address":{"$ref":"#/components/schemas/Address"},"loyaltyCardNumber":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"agreement1":{"type":"boolean"},"agreement2":{"type":"boolean"},"agreement3":{"type":"boolean"},"company":{"$ref":"#/components/schemas/Company"},"transactionsCount":{"type":"integer"},"returnTransactionsCount":{"type":"integer"},"transactionsAmount":{"type":"number","format":"float"},"returnTransactionsAmount":{"type":"number","format":"float"},"transactionsAmountWithoutDeliveryCosts":{"type":"number","format":"float"},"amountExcludedForLevel":{"type":"number","format":"float"},"averageTransactionAmount":{"type":"number","format":"float"},"averageReturnTransactionAmount":{"type":"number","format":"float"},"lastTransactionDate":{"type":"string","format":"date-time"},"firstTransactionDate":{"type":"string","format":"date-time"},"levelAchievementDate":{"type":"string","format":"date-time"},"anonymized":{"type":"boolean"},"referralToken":{"type":"string"},"defaultAccount":{"$ref":"#/components/schemas/Account"},"customFieldsData":{"description":"Custom fields data for member","type":"array","items":{"properties":{"customFieldSchemaId":{"description":"ID of the custom field schema","type":"string","format":"uuid"},"customFieldName":{"description":"Name of the custom field","type":"string"},"customFieldType":{"description":"Type of the custom field","type":"string"},"value":{"description":"Value of the custom field","type":"string","nullable":true}},"type":"object"},"nullable":true},"customFields":{"description":"Custom field values (CustomField module), keyed by group then field. A field's value type depends on its configured `fieldType`: `text` (string), `integer`, `float`, `boolean`, `date` (`YYYY-MM-DD`), `datetime` (`YYYY-MM-DD HH:mm:ss.SSSSSS`), `single_select` (string, one value from a predefined list), `multi_select` (array of strings, one or more values from a predefined list), or `object_array` (array of objects, each containing the scalar sub-fields defined for that field). Use the `customFields` query parameter to limit which groups are returned; if omitted, all groups are returned. Requires the `CUSTOM_FIELD_MEMBER` feature flag; omitted from the response when disabled.","type":"object","nullable":true,"additionalProperties":{"type":"object","additionalProperties":{}}}},"type":"object"},"Address":{"properties":{"street":{"type":"string"},"address1":{"type":"string"},"address2":{"type":"string"},"province":{"type":"string"},"city":{"type":"string"},"postal":{"type":"string"},"country":{"type":"string"}},"type":"object"},"Company":{"properties":{"name":{"type":"string"},"nip":{"type":"string"}},"type":"object"},"Account":{"properties":{"accountId":{"type":"string"},"activePoints":{"type":"number","format":"float"},"transferredPoints":{"type":"number","format":"float"},"lockedPoints":{"type":"number","format":"float"},"expiredPoints":{"type":"number","format":"float"},"spentPoints":{"type":"number","format":"float"},"earnedPoints":{"type":"number","format":"float"},"blockedPoints":{"type":"number","format":"float"}},"type":"object"},"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},"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":["code","message"],"properties":{"code":{"type":"integer"},"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"}}}},"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/member":{"get":{"tags":["Member"],"summary":"Get members list","description":"<label style=\"background-color: #BFE1F6;padding:5px;\">Integration</label><br><br>\nThis method returns list of all Members' accounts exist 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":"memberGetList","parameters":[{"$ref":"#/components/parameters/storeCode"},{"name":"customerId","in":"query","required":false,"schema":{"type":"string"}},{"name":"firstName","in":"query","required":false,"schema":{"type":"string"}},{"name":"lastName","in":"query","required":false,"schema":{"type":"string"}},{"name":"emailOrPhone","in":"query","description":"This filter is deprecated.","required":false,"deprecated":true,"schema":{"type":"string"}},{"name":"identifier","in":"query","description":"This filter is deprecated. To get member by email, phone, loyaltyCardNumnber, use /api/{store}/member/email=user@example.com).","required":false,"deprecated":true,"schema":{"type":"string"}},{"name":"active","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"gender","in":"query","required":false,"schema":{"type":"string"}},{"name":"phone","in":"query","required":false,"schema":{"type":"string"}},{"name":"email","in":"query","required":false,"schema":{"type":"string"}},{"name":"loyaltyCardNumber","in":"query","required":false,"schema":{"type":"string"}},{"name":"createdAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"birthDate","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"agreement1","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"agreement2","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"agreement3","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"updatedAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"registeredAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"transactionsCount","in":"query","required":false,"schema":{"type":"integer"}},{"name":"transactionsAmount","in":"query","required":false,"schema":{"type":"number"}},{"name":"transactionsAmountWithoutDeliveryCosts","in":"query","required":false,"schema":{"type":"number"}},{"name":"amountExcludedForLevel","in":"query","required":false,"schema":{"type":"number"}},{"name":"averageTransactionAmount","in":"query","required":false,"schema":{"type":"number"}},{"name":"levelAchievementDate","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"labels","in":"query","description":"Labels using pattern e.g. (key1;value1),(key2;value2),...","required":false,"schema":{"type":"string"}},{"name":"lastTransactionDate","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"firstTransactionDate","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"levelId","in":"query","required":false,"schema":{"type":"string"}},{"name":"manuallyAssignedLevelId","in":"query","required":false,"schema":{"type":"string"}},{"name":"referralToken","in":"query","required":false,"schema":{"type":"string"}},{"name":"address:street","in":"query","required":false,"schema":{"type":"string"}},{"name":"address:address1","in":"query","required":false,"schema":{"type":"string"}},{"name":"address:address2","in":"query","required":false,"schema":{"type":"string"}},{"name":"address:province","in":"query","required":false,"schema":{"type":"string"}},{"name":"address:city","in":"query","required":false,"schema":{"type":"string"}},{"name":"address:postal","in":"query","required":false,"schema":{"type":"string"}},{"name":"address:country","in":"query","required":false,"schema":{"type":"string"}},{"name":"defaultAccount:activePoints","in":"query","required":false,"schema":{"type":"number"}},{"name":"defaultAccount:transferredPoints","in":"query","required":false,"schema":{"type":"number"}},{"name":"defaultAccount:lockedPoints","in":"query","required":false,"schema":{"type":"number"}},{"name":"defaultAccount:expiredPoints","in":"query","required":false,"schema":{"type":"number"}},{"name":"defaultAccount:spentPoints","in":"query","required":false,"schema":{"type":"number"}},{"name":"defaultAccount:earnedPoints","in":"query","required":false,"schema":{"type":"number"}},{"name":"defaultAccount:blockedPoints","in":"query","required":false,"schema":{"type":"number"}},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/itemsOnPage"},{"$ref":"#/components/parameters/orderBy"},{"$ref":"#/components/parameters/scroll"}],"responses":{"200":{"description":"List of members","content":{"application/json":{"schema":{"oneOf":[{"title":"MembersListResponse","required":["items","total"],"properties":{"items":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/Customer"},{"properties":{"labels":{"type":"array","items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"currency":{"type":"string"},"storeCode":{"type":"string"},"channelIdentifier":{"type":"string"}},"type":"object"}]}},"total":{"$ref":"#/components/schemas/SearchableTotalResponse"}},"type":"object","additionalProperties":false},{"title":"MembersListResponseWithScroll","required":["items","scroll"],"properties":{"items":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/Customer"},{"properties":{"labels":{"type":"array","items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"currency":{"type":"string"},"storeCode":{"type":"string"},"channelIdentifier":{"type":"string"}},"type":"object"}]}},"scroll":{"$ref":"#/components/schemas/ScrollResponse"}},"type":"object","additionalProperties":false}]}}}},"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, and the optional `goal` query parameter:

```
GET https://help.openloyalty.io/api-reference/member/get-members-list.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
