PUT
/affiliates/{id}
Update an affiliate
Affiliates
Description
Update an existing affiliate business.
Authentication Required: User must be authenticated and have the 'affiliate' role.
Users can only update their own affiliate businesses.
Parameters
id
integer
path
required
Affiliate ID
Request Body
requiredapplication/json
organization_namestring
Name of the affiliate organization
Example:
Tech Promotions Incwebsite_urlstring (uri)
Affiliate website URL
Example:
https://techpromotions.comactivity_typesarray [string]
List of activity types
Example:
["Content \u003e Cashback"]activity_introductionstring
Introduction text describing the affiliate's activity
Example:
We promote tech products through cashback and discount codes.Responses
200
Affiliate updated successfully
application/jsonstatusstring
Example:
successmessagestring
Example:
Affiliate updated successfullydataobject
401
Authentication required
application/jsonExample:
{
"status": "error",
"message": "Not authenticated or insufficient permissions"
}
404
Affiliate not found
application/jsonExample:
{
"status": "error",
"message": "Affiliate not found"
}
422
Validation error
application/jsonExample:
{
"status": "error",
"message": "Failed to update affiliate",
"errors": [
{
"path": "organization_name",
"message": "Organization name can't be blank"
}
]
}