Skip to main content
PUT
/
v1
/
affiliates
/
{id}
curl -X PUT "https://api.affonso.io/v1/affiliates/cmj8pptm10002p3010z8mk9ak" \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "company_name": "John LLC",
    "country_code": "US",
    "payout_method": "paypal",
    "payout_details": {
      "email": "[email protected]"
    },
    "status": "approved"
  }'
{
  "success": true,
  "data": {
    "id": "cmj8pptm10002p3010z8mk9ak",
    "name": "John Doe",
    "email": "[email protected]",
    "tracking_id": "john-doe",
    "source": "api",
    "partnership_status": "APPROVED",
    "onboarding_completed": false,
    "program_id": "cm7xutqbb0001yfkcrnpextmp",
    "group_id": null,
    "created_at": "2024-01-15T10:30:00Z"
  }
}

Path Parameters

id
string
required
The unique identifier of the affiliate to update

Body Parameters

All body parameters are optional. Only include the fields you want to update.
name
string
Update the affiliate’s display name. Must be between 1 and 100 characters.
email
string
Update the affiliate’s email address. Must be a valid email format. If the email is already in use by another user, the request will fail with a conflict error.
group_id
string | null
Affiliate group ID (null to remove).
company_name
string | null
Company name for invoice. Maximum 100 characters. Set to null to clear.
country_code
string | null
2-letter ISO country code. Set to null to clear.
payout_method
string
Payout method (none to remove). Valid values: paypal, wise, payoneer, paxum, webmoney, skrill, wire_transfer, bitcoin, ethereum, alipay, wechat, manual, none.
payout_details
object
Payout details (snake_case fields). The required fields depend on the payout_method:
  • Email-based methods (paypal, wise, payoneer, paxum, skrill): email (string, valid email)
  • ID-based methods (webmoney, alipay, wechat): account_id (string)
  • Crypto methods (bitcoin, ethereum): address (string, wallet address)
  • Wire transfer (wire_transfer): bank_name, account_number, swift_code, iban, routing_number, account_name (all strings)
  • Manual (manual): No details required
status
string
Partnership approval status. Valid values: pending, approved, rejected.

Response

The response includes the updated affiliate object with the same structure as the create endpoint.
success
boolean
Always true for successful responses
data
object
The updated affiliate object.
curl -X PUT "https://api.affonso.io/v1/affiliates/cmj8pptm10002p3010z8mk9ak" \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "company_name": "John LLC",
    "country_code": "US",
    "payout_method": "paypal",
    "payout_details": {
      "email": "[email protected]"
    },
    "status": "approved"
  }'
{
  "success": true,
  "data": {
    "id": "cmj8pptm10002p3010z8mk9ak",
    "name": "John Doe",
    "email": "[email protected]",
    "tracking_id": "john-doe",
    "source": "api",
    "partnership_status": "APPROVED",
    "onboarding_completed": false,
    "program_id": "cm7xutqbb0001yfkcrnpextmp",
    "group_id": null,
    "created_at": "2024-01-15T10:30:00Z"
  }
}
Note: To retrieve updated related data like promo codes, commission overrides, invoice details, and payout methods, use GET /v1/affiliates/{id}?expand=promoCodes,commissionOverrides,invoiceDetails,payoutMethod.