GET
/affiliates/{id}
Get affiliate by ID
Affiliates
Description
Retrieve detailed information about a specific affiliate business.
Authentication Required: User must be authenticated and have the 'affiliate' role.
Users can only view their own affiliate businesses.
Parameters
id
integer
path
required
affiliate ID
Responses
200
Successful response
application/jsonstatusstring
Example:
successdataobject
Example:
{
"status": "success",
"data": {
"id": 1,
"organization_name": "Tech Promotions Inc",
"website_url": "https://techpromotions.com",
"commission_rate": "10.0",
"status": "active",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:45:00Z",
"user": {
"id": 1,
"email": "[email protected]",
"first_name": "John",
"last_name": "Doe"
}
}
}
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"
}