Skip to main content

Retrieve a customer

Retrieve a customer by ID for the authenticated workspace. To retrieve a customer by external ID, prefix the ID with ext_.
1 min read
get/customers/{id}
Request example
Response
get/customers/{id}

Authorization

Authorizationstringheaderrequired#
Default authentication mechanism

Path parameters

idstringrequired#
The unique ID of the customer. You may use either the customer's id on Dub (obtained via /customers endpoint) or their externalId (unique ID within your system, prefixed with ext_, e.g. ext_123).

Query parameters

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

Responses

application/json
The customer object.
idstringrequired#
The unique ID of the customer. You may use either the customer's id on Dub (obtained via /customers endpoint) or their externalId (unique ID within your system, prefixed with ext_, e.g. ext_123).
namestring#
Name of the customer.
emailstring#
Email of the customer.
avatarstring#
Avatar URL of the customer.
externalIdstringrequired#
Unique identifier for the customer in the client's app.
stripeCustomerIdstring#
The customer's Stripe customer ID. This is useful for attributing recurring sale events to the partner who referred the customer.
countrystring#
Country of the customer.
salesnumber#
Total number of sales for the customer.
saleAmountnumber#
Total amount of sales for the customer.
createdAtstringrequired#
The date the customer was created (usually the signup date or trial start date).
firstSaleAtstring#
The date the customer made their first sale. Useful for calculating the time to first sale and LTV.
subscriptionCanceledAtstring#
The date the customer canceled their subscription. Useful for calculating LTV and churn rate.
programIdstring#
partnerobject#
Show child attributes
idstringrequired#
The partner's unique ID on Dub.
namestringrequired#
The partner's full legal name.

Length: max 190

emailstringrequired#
The partner's email address. Should be a unique value across Dub.

Length: max 190

imagestringrequired#
The partner's avatar image.
discountobject#
Show child attributes
idstringrequired#
amountnumberrequired#
typeenum<string>required#
Options:percentageflat
maxDurationnumberrequired#
couponIdstringrequired#
couponTestIdstringrequired#
descriptionstring#
partnersCountnumber#