Path Parameters
The unique identifier of the affiliate to update
Body Parameters
All body parameters are optional. Only include the fields you want to update.
Update the affiliate’s display name. Must be between 1 and 100 characters.
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.
Affiliate group ID (null to remove).
Company name for invoice. Maximum 100 characters. Set to null to clear.
2-letter ISO country code. Set to null to clear.
Payout method (none to remove). Valid values: paypal, wise, payoneer, paxum, webmoney, skrill, wire_transfer, bitcoin, ethereum, alipay, wechat, manual, none.
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
Partnership approval status. Valid values: pending, approved, rejected.
Response
The response includes the updated affiliate object with the same structure as the create endpoint.
Always true for successful responses
The updated affiliate object. Show Data Object Properties
Unique identifier for the affiliate
The affiliate’s display name
The affiliate’s email address
Unique tracking ID for the affiliate
Source of the affiliate creation
Partnership status with the program: "PENDING", "APPROVED", "REJECTED", or null
Whether the affiliate has completed their onboarding process
The affiliate program ID the affiliate is assigned to
The affiliate group ID if assigned, otherwise null
ISO 8601 timestamp of when the affiliate was created
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.