Update Affiliate
PATCH
/a/affiliates/{affiliateId}This endpoint is deprecated and may be removed in a future version.
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
affiliateId | path | integer | Yes |
Request Body *
Content-Type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
firstName | string | No | |
lastName | string | No | |
email | string | No | |
password | string | No | |
company | string | No | |
status | string (active | pending | rejected) | No | |
phone | string | No | |
website | string | No | |
affiliateAccountManagerId | integer | No | |
address1 | string | No | |
address2 | string | No | |
city | string | No | |
state | string | No | |
country | string | No | |
postcode | string | No |
Responses
| Status | Description |
|---|---|
| 200 | Affiliate updated; data is the affiliate after the change |
| 404 | Affiliate not found |
| 422 | Validation error |
Response fields (inside data)
| Field | Type | Description |
|---|---|---|
affiliateId | integer | |
firstName | string | |
lastName | string | |
email | string | Also the portal login (stored lower-case). |
company | string | |
status | string (ACTIVE | PENDING | REJECTED) | Account status. |
phone | string | |
website | string | |
affiliateAccountManagerId | integer | Employee who manages this affiliate. |
signupCountry | string | Country detected at sign-up. |
address | object | |
address.address1 | string | |
address.address2 | string | |
address.city | string | |
address.state | string | |
address.country | string | |
address.postcode | string | |
parentAffiliateId | integer | Affiliate who referred this one (sub-affiliate program). |
referralCode | string | Code this affiliate shares to refer others. |
trafficPlatform | string | Main traffic source the affiliate declared. |
apiEnabled | boolean | Whether the affiliate may use the Affiliate API. |
createdAt | string | Y-m-d H:i:s |
updatedAt | string | Y-m-d H:i:s |