> For the complete documentation index, see [llms.txt](https://docs.podplay.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.podplay.app/api/use-cases/use-case-retrieve-your-full-customer-list.md).

# Use Case: Retrieve Customer List

### Objective

Retrieve the complete list of customers from your PodPlay site, optionally applying filters such as membership status or search terms.

### Step 1 — Call the Users Endpoint

To retrieve customers, use:

```
GET /apis/v2/users
```

Authentication:

```
x-api-key: <your_api_key>
```

You may include optional filters:

```
GET /apis/v2/users?membershipStatus=active&search=john&page=1&ipp=100
```

You can explore the full schema and all supported filters in the API Reference.\
For convenience, the definition of `GET /apis/v2/users` is included at the bottom of this page for quick access.

### Step 2 — Understand Pagination

Customer lists are returned in pages.

Each response includes:

<pre class="language-json"><code class="lang-json">{
<strong>    "items": [...],
</strong>    "_pagination": {
        "page": 1,
        "ipp": 100,
        "count": 100,
        "total": 10247
    }
}
</code></pre>

This means:

* You are on page 1
* You received 100 customers
* There are 10,247 total customers

### Step 3 — Retrieve All Pages

To retrieve the full dataset:

1. Start with `page=1`
2. Store the returned `items`
3. Increment page
4. Repeat until:\
   `count < ipp`, or\
   `page * ipp ≥ total`

This approach works for any dataset size.

#### Example: Page 1

```
curl -sS
-H "x-api-key: <your_api_key>"
"https://sandbox1.podplay.app/apis/v2/users?page=1&ipp=100"
```

#### Example: Page 2

```
curl -sS
-H "x-api-key: <your_api_key>"
"https://sandbox1.podplay.app/apis/v2/users?page=2&ipp=100"
```

Continue increasing the `page` parameter (`page=3`, `page=4`, …) until all records have been retrieved.

### For Low-Code & Automation Tools

Most platforms support:

* Pagination
* Looping
* Iteration

Configure the request with a dynamic `page` parameter and continue until all pages are retrieved.

Once configured, the same flow works whether you have 100 or 10,000+ customers.

### API Reference: GET /apis/v2/users

## GET /users

>

```json
{"openapi":"3.0.0","info":{"title":"PodPlay Inc API","version":"2.0"},"tags":[{"name":"Users","description":"User management, authentication, profiles, and account operations."}],"servers":[{"url":"/apis/v2","description":"Current Server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"UserCollectionDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/UserDto"}},"_pagination":{"$ref":"#/components/schemas/PaginationDto"},"_links":{"$ref":"#/components/schemas/LinksDto"}},"required":["items","_pagination","_links"]},"UserDto":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"email":{"type":"string","format":"email","readOnly":true},"firstName":{"type":"string"},"lastName":{"type":"string"},"description":{"type":"string"},"notes":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"phoneNumberPreview":{"type":"string","readOnly":true},"phoneNumber":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"roles":{"type":"array","readOnly":false,"items":{"type":"string","enum":["ADMIN","PODPLAY_ADMIN","OWNER","CLUB_OWNER","KIOSK","SECURITY","COACH","MANAGER","STAFF","BETA_TESTER"]}},"rolesAreas":{"$ref":"#/components/schemas/ItemRefCollectionDto"},"membershipType":{"type":"string","enum":["NONE","GLOBAL_MEMBER","ANGEL_MEMBER","BASIC_MEMBER","AREA_MEMBER"],"readOnly":true,"deprecated":true},"membershipArea":{"readOnly":true,"deprecated":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"membershipBookingHorizonDays":{"type":"number","readOnly":true,"deprecated":true},"flags":{"type":"array","items":{"type":"string","enum":["NEW","BLOCKED","VACCINATED","ANONYMOUS","HAS_REPLAYS","HAS_RESERVATIONS","HAS_NOTES","HAS_ADMIN_DASHBOARD_ACCESS","JOINED_CHAT","ACTIVE_DAY_PASS"]}},"paymentMethod":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"paymentElements":{"readOnly":true,"nullable":true,"allOf":[{"$ref":"#/components/schemas/ItemRefCollectionDto"}]},"freeQuickReplays":{"type":"number"},"picture":{"$ref":"#/components/schemas/ItemRefDto"},"gender":{"type":"string"},"birthday":{"format":"date-time","type":"string"},"favoriteReplays":{"type":"object","readOnly":true},"profile":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"coachProfile":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"qrCode":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"membershipEnrollment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"membershipSubscription":{"nullable":true,"deprecated":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"membershipSubscriptionHistory":{"readOnly":true,"deprecated":true,"allOf":[{"$ref":"#/components/schemas/CollectionRefDto"}]},"ratings":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/CollectionRefDto"}]},"securityPicture":{"$ref":"#/components/schemas/ItemRefDto"},"chat":{"readOnly":true,"nullable":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"segmentation":{"readOnly":true,"nullable":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"_links":{"type":"object"}},"required":["id","email","description","rolesAreas","membershipType","flags","favoriteReplays","coachProfile","membershipEnrollment","membershipSubscription","membershipSubscriptionHistory","ratings","chat","segmentation","_links"]},"ItemRefDto":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the resource"}},"required":["id"]},"ItemRefCollectionDto":{"type":"object","properties":{"items":{"description":"The array containing the elements of the collection","type":"array","items":{"type":"string"}},"_total":{"type":"number","description":"The total amount of elements in this collection, counting also the elements from the succesive pages"},"_links":{"description":"A `LinksDto` structure containing URL references to propertes that can be expanded","allOf":[{"$ref":"#/components/schemas/LinksDto"}]}},"required":["items"]},"LinksDto":{"type":"object","properties":{"self":{"description":"A `LinkDto` to the resource itself","allOf":[{"$ref":"#/components/schemas/LinkDto"}]}},"required":["self"]},"LinkDto":{"type":"object","properties":{"href":{"type":"string","description":"A URL"}},"required":["href"]},"CollectionRefDto":{"type":"object","properties":{"_total":{"type":"number","description":"The total amount of elements in this collection"}}},"PaginationDto":{"type":"object","properties":{"page":{"type":"number"},"ipp":{"type":"number"},"count":{"type":"number"},"total":{"type":"number"}},"required":["page","ipp","count","total"]}}},"paths":{"/users":{"get":{"operationId":"UsersController_find","parameters":[{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"includePristine","required":false,"in":"query","description":"Applicable only if `areaId` is specified.","schema":{"type":"boolean"}},{"name":"memberSinceMin","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"memberSinceMax","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"tenureMin","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"tenureMax","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"condition","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}},{"name":"page","required":false,"in":"query","schema":{"type":"number"}},{"name":"ipp","required":false,"in":"query","schema":{"type":"number"}},{"name":"strictLocation","required":false,"in":"query","description":"If true, do not bypass location filters for exact email/full-name searches.","schema":{"type":"boolean"}},{"name":"expand","required":false,"in":"query","explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"membershipStatus","required":false,"in":"query","schema":{"type":"array","items":{"type":"string","enum":["ACTIVE","PENDING_CANCEL","CANCELLED","VALID","GRACE","HOLD"]}}},{"name":"sort","required":false,"in":"query","description":"If not set, `sort` will be defaulted as `fullName` (ASC)","schema":{"type":"string"}},{"name":"role","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}},{"name":"membershipId","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}},{"name":"membershipAreaId","required":false,"in":"query","explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"areaId","required":false,"in":"query","explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"userId","required":false,"in":"query","explode":true,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Returns a `UserCollection`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCollectionDto"}}}}},"tags":["Users"]}}}}
```


---

# 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://docs.podplay.app/api/use-cases/use-case-retrieve-your-full-customer-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.
