Update Affiliate

PATCH /a/affiliates/{affiliateId}

Partially update a affiliate: send only the fields to change. A status change here sends no e-mail to the affiliate and does not reset their password. password sets a new portal password. Returns the updated affiliate.

Authentication

Domain ID — your network's tenant ID (header: X-Domain-Id)

API Key (header: X-Api-Key)

Secret Key (header: X-Api-Secret)

No API key yet? Start a 14-day free trial and generate a key from your dashboard's security settings. No credit card required.

Parameters

NameInTypeRequiredDescription
affiliateIdpathintegerYes

Request Body *

Content-Type: application/json

FieldTypeRequiredDescription
firstNamestringNo
lastNamestringNo
emailstringNo
passwordstringNo
companystringNo
statusstring (active | pending | rejected)No
phonestringNo
websitestringNo
affiliateAccountManagerIdintegerNo
address1stringNo
address2stringNo
citystringNo
statestringNo
countrystringNo
postcodestringNo

Responses

StatusDescription
200Affiliate updated; data is the affiliate after the change
404Affiliate not found
422Validation error

Response fields (inside data)

FieldTypeDescription
affiliateIdinteger
firstNamestring
lastNamestring
emailstringAlso the portal login (stored lower-case).
companystring
statusstring (ACTIVE | PENDING | REJECTED)Account status.
phonestring
websitestring
affiliateAccountManagerIdintegerEmployee who manages this affiliate.
signupCountrystringCountry detected at sign-up.
addressobject
address.address1string
address.address2string
address.citystring
address.statestring
address.countrystring
address.postcodestring
parentAffiliateIdintegerAffiliate who referred this one (sub-affiliate program).
referralCodestringCode this affiliate shares to refer others.
trafficPlatformstringMain traffic source the affiliate declared.
apiEnabledbooleanWhether the affiliate may use the Affiliate API.
createdAtstringY-m-d H:i:s
updatedAtstringY-m-d H:i:s