api.customers.get
Read the polymorphic profile envelope for a customer. Returns a tagged-union body: an "individual" envelope carries the stored KycProfile, a "business" envelope carries the stored KybProfile. Both also carry the inline HostedKycLink under kyc_link. Submission state lives separately on customers.state(id).
const = await ..("2f10…");
if (. === "individual") {
.(...);
} else {
.(...);
}
// Hosted KYC link: same shape regardless of `type`.
const = ..;| Argument | Type |
|---|---|
id | string |
Returns: Promise<CustomerProfileEnvelope>. Discriminated on type (profile is KycProfile or KybProfile accordingly). kyc_link is the same HostedKycLink shape for both kinds.
Throws: ApiError with status: 403 (customer belongs to a different org) or status: 404 (unknown id).
REST endpoint: GET /customers/:id. GET /customers/:id/kyc/profile is an alias.
