> ## Documentation Index
> Fetch the complete documentation index at: https://docs.partnero.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List customers

> Retrieve a paginated list of all customers in your affiliate program

## Endpoint

```
GET https://api.partnero.com/v1/customers
```

## Query parameters

| Parameter       | Type    | Default | Description                        |
| --------------- | ------- | ------- | ---------------------------------- |
| `limit`         | integer | 15      | Number of results per page (1–250) |
| `page`          | integer | 1       | Page number for pagination         |
| `partner.key`   | string  | —       | Filter by partner's referral key   |
| `partner.email` | string  | —       | Filter by partner's email          |

## Request

```bash cURL theme={null}
curl --location 'https://api.partnero.com/v1/customers' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY'
```

```bash Filter by partner theme={null}
curl --location 'https://api.partnero.com/v1/customers?partner.key=ref_123' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY'
```

## Response

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "data": [
      {
        "key": "customer_123",
        "partner": "partner_123",
        "deleted": false,
        "name": "Alice",
        "surname": "Brown",
        "email": "alice.brown@partnero.com",
        "created_at": "2025-05-02T16:12:39.000000Z",
        "updated_at": "2025-05-02T16:12:39.000000Z",
        "deleted_at": null
      }
    ],
    "links": {
      "first": "https://api.partnero.com/v1/customers?page=1",
      "last": null,
      "prev": null,
      "next": null
    },
    "meta": {
      "current_page": 1,
      "from": 1,
      "path": "https://api.partnero.com/v1/customers",
      "per_page": 15,
      "to": 1
    },
    "status": 1
  }
  ```
</ResponseExample>

### Response fields

<Accordion title="Customers — data[]">
  | Field        | Type         | Description                                   |
  | ------------ | ------------ | --------------------------------------------- |
  | `key`        | string       | Unique customer identifier                    |
  | `email`      | string       | Customer's email address                      |
  | `name`       | string       | Customer's first name                         |
  | `surname`    | string       | Customer's last name                          |
  | `partner`    | string       | Key of the partner who referred this customer |
  | `deleted`    | boolean      | Whether customer is soft-deleted              |
  | `created_at` | string       | ISO 8601 timestamp                            |
  | `updated_at` | string       | ISO 8601 timestamp                            |
  | `deleted_at` | string\|null | Deletion timestamp if deleted                 |
</Accordion>

<Accordion title="Pagination — links, meta">
  | Field               | Type         | Description                    |
  | ------------------- | ------------ | ------------------------------ |
  | `links.first`       | string       | URL to the first page          |
  | `links.last`        | string\|null | URL to the last page           |
  | `links.prev`        | string\|null | URL to the previous page       |
  | `links.next`        | string\|null | URL to the next page           |
  | `meta.current_page` | integer      | Current page number            |
  | `meta.from`         | integer      | First item number on this page |
  | `meta.per_page`     | integer      | Items per page                 |
  | `meta.to`           | integer      | Last item number on this page  |
  | `meta.path`         | string       | Base URL for the endpoint      |
</Accordion>

## Search customers

Use the search endpoint to find customers by key, email, or ID:

```
GET https://api.partnero.com/v1/customers:search
```

| Parameter | Type   | Description              |
| --------- | ------ | ------------------------ |
| `id`      | string | Customer ID              |
| `email`   | string | Customer's email address |

```bash cURL theme={null}
curl --location 'https://api.partnero.com/v1/customers:search?email=alice.brown@partnero.com' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY'
```
