Developer
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

required

application/json

Responses

200 Affiliate updated successfully
application/json
statusstring
Example: success
messagestring
Example: Affiliate updated successfully
dataobject
401 Authentication required
application/json
Example:
{
  "status": "error",
  "message": "Not authenticated or insufficient permissions"
}
404 Affiliate not found
application/json
Example:
{
  "status": "error",
  "message": "Affiliate not found"
}
422 Validation error
application/json
Example:
{
  "status": "error",
  "message": "Failed to update affiliate",
  "errors": [
    {
      "path": "name",
      "message": "Name can't be blank"
    }
  ]
}