GET
/
customers
from dub import Dub


with Dub(
    token="DUB_API_KEY",
) as d_client:

    res = d_client.customers.list(request={})

    assert res is not None

    # Handle response
    print(res)
[
  {
    "id": "<string>",
    "externalId": "<string>",
    "name": "<string>",
    "email": "<string>",
    "avatar": "<string>",
    "country": "<string>",
    "createdAt": "<string>",
    "link": {
      "id": "<string>",
      "domain": "<string>",
      "key": "<string>",
      "shortLink": "<string>",
      "programId": "<string>"
    },
    "partner": {
      "id": "<string>",
      "name": "<string>",
      "email": "<string>",
      "image": "<string>"
    },
    "discount": {
      "id": "<string>",
      "amount": 123,
      "type": "percentage",
      "maxDuration": 123,
      "description": "<string>",
      "couponId": "<string>",
      "couponTestId": "<string>",
      "partnersCount": 123
    }
  }
]

Authorizations

Authorization
string
header
required

Default authentication mechanism

Query Parameters

email
string

A case-sensitive filter on the list based on the customer's email field. The value must be a string.

externalId
string

A case-sensitive filter on the list based on the customer's externalId field. The value must be a string.

includeExpandedFields
boolean

Whether to include expanded fields on the customer (link, partner, discount).

Response

200
application/json

The list of customers.

The response is of type object[].