Skip to main content
Access through sdk.affiliates on a Lomadee instance. Import types from @thelomadee/sdk/domains.
Signup and affiliate payloads include PII and financial data (documents, bank accounts, PIX). Collect, transmit, and store them only on the server with appropriate access controls and compliance measures.

list

Parameters — AffiliateQuery

Optional search string.
number
Optional page index.
number
Optional page size.
string[]
Optional filter by affiliate identifiers.

Returns

Promise<AffiliateListResponse>{ data: AffiliateListItem[]; count: number }.

Example


get

string
required
Affiliate identifier.

Returns

Promise<AffiliateResponse> — not wrapped in SdkResponse.

create

Creates an affiliate via the SDK signup flow (SignUpBody).

Parameters — SignUpBody

UserSignUpBody
required
User profile for signup. See UserSignUpBody.
UserAddressBody
required
Postal address. See UserAddressBody.
UserBankBody
required
Bank details. See UserBankBody.

Returns

Promise<SdkResponse<AffiliateResponse>>{ data: AffiliateResponse }.

update

string
required
Affiliate identifier.

Parameters — UpdateAffiliateBody

UpdateUserBody
Optional partial user fields. See UpdateUserBody.
UserAddressBody
Optional address replacement. See UserAddressBody.
UserBankBody
Optional bank details. See UserBankBody.

Returns

Promise<AffiliateResponse>.

DocumentType

Union type used in signup and user models: 'cpf' | 'cnpj' | 'rg' | 'international' | 'passport'

AffiliateInviteStatus

Union type for affiliate invite state (dashboard-api enum):

UserSignUpBody

string
required
Username.
string
Optional phone number.
string
required
Email address.
string
required
Full legal name.
string
required
Birth date (string format not specified in SDK types).
DocumentType
required
Document type union.
string
required
Document number.
string
Optional PIS identifier.
Optional legal entity name.
string
Optional trade name.

UserAddressBody

string
Optional country. Comment in SDK source: default brazil (default behavior is not enforced by the SDK type).
string
required
Postal code.
string
required
Street name.
string
required
Street number.
string
Optional address complement.
string
required
Neighbourhood.
string
required
City.
string
required
State.

UserBankBody

string
Optional country. Comment in SDK source: default brazil.
BrazilBankBody
Brazilian bank account. See BrazilBankBody.
InternationalBankBody
International bank account. See InternationalBankBody.

BrazilBankBody

Contains sensitive financial and identity-related fields. Never log full bank or PIX details.
string
required
Brazilian bank identifier.
string
required
Agency number.
string
required
Agency check digit.
string
required
Account number.
string
required
Account check digit.
'CHECKING' | 'SAVINGS'
required
Account type union.
string
required
Account holder name.
string
required
PIX key value.
string
required
PIX key type (string; allowed values not enumerated in SDK types).

InternationalBankBody

Contains sensitive financial data. Never log full account, IBAN, or routing details.
string
required
International bank record identifier.
string
required
Bank name.
string
required
Bank country.
string
required
Bank address.
string
required
Beneficiary name.
string
required
Account number.
string
required
IBAN.
string
required
SWIFT/BIC code.
string
required
Sort code.
string
required
ABA routing number.
string
required
Payment details.
string
required
Intermediary bank name.
string
required
Intermediary bank SWIFT.
string
required
Intermediary bank address.

UpdateUserBody

All fields optional:
string
Username.
string
Phone number.
string
Birth date.
DocumentType
Document type union.
string
Document number.
string
PIS identifier.
Legal entity name.
string
Trade name.

AffiliateResponse

Response user may contain PII (email, document, phone, address). Handle and log accordingly.
string
required
Affiliate identifier.
User
required
User record. Address is nested on user, not at the top level. See User.
string
Optional user-organization identifier.
AffiliateInviteStatus | null
Optional invite status, or null. See AffiliateInviteStatus.
string | null
Optional invite hash, or null.
boolean
Optional active flag.

AffiliateListItem

Extends AffiliateResponse with cluster membership for list results.
AffiliateCluster[]
required
Clusters the affiliate belongs to. See AffiliateCluster.

AffiliateListResponse

AffiliateListItem[]
required
Page of affiliate list items.
number
required
Total count for the query.

AffiliateCluster

string
required
Cluster identifier.
string
required
Cluster name.
boolean
required
Default cluster flag.
boolean
required
Active flag.
number
required
Affiliate count field from API.
number
required
Affiliates count field from API.
string
required
Creation timestamp.
string
required
Update timestamp.

User

May contain PII. Optional fields reflect mapper optional chaining in the SDK types.
string
Optional user identifier.
string
Optional email address.
string
Optional username.
string
Optional document number.
DocumentType
Optional document type union.
'Completed' | 'Pending'
Optional onboarding status.
string | null
Optional avatar URL or null.
string
Optional birth date.
string
Optional phone number.
string
Optional creation timestamp.
string
Optional update timestamp.
Address | null
Optional nested address, or null. See Address.
string
Optional PIS identifier.
unknown
Optional categories payload (shape not specified in SDK types).
string
Optional trade name.
Optional legal entity name.
string
Optional position.
string
Optional last login timestamp.
number
Optional access count.

Address

Response address model. All fields optional in SDK types.
string
Address identifier.
string
Country.
string
Postal code (CEP).
string
Street address line.
string
Street number.
string
Address complement.
string
Neighbourhood.
string
State.
string
City.

Example