POST
/affiliates
Create an affiliate
Affiliates
Description
Create a new affiliate business.
Authentication Required: User must be authenticated and have the 'affiliate' role.
The affiliate is created with a pending_validation status by default.
Request Body
requiredapplication/json
organization_namestringrequired
Name of the affiliate organization (required)
Example:
Tech Promotions Incwebsite_urlstring (uri)
Affiliate website URL
Example:
https://techpromotions.comactivity_typesarray [string]required
List of activity types (required)
Example:
["Content \u003e Cashback"]activity_introductionstring
Introduction text describing the affiliate's activity
Example:
We promote tech products through cashback and discount codes.Responses
201
Affiliate created successfully
application/jsonstatusstring
Example:
successmessagestring
Example:
Affiliate created successfullydataobject
401
Authentication required
application/jsonExample:
{
"status": "error",
"message": "Not authenticated or insufficient permissions"
}
403
Insufficient permissions
application/jsonExample:
{
"status": "error",
"message": "Feature affiliate required"
}
422
Validation error
application/jsonExample:
{
"status": "error",
"message": "Failed to create affiliate",
"errors": [
{
"path": "organization_name",
"message": "Organization name can't be blank"
}
]
}