Add an affiliate to a program
Adds an existing affiliate of your account to the program (affiliate.id or affiliate_id). The affiliate is approved by default: send "approved": null for pending or false for disapproved. The program’s auto-approve setting is not applied. The optional coupon must be unique across all your programs.
Fires your Affiliate added triggers. If the affiliate ends up approved, it also fires Affiliate approved for program triggers and sends the approval email; if you add them as disapproved, it fires Affiliate disapproved for program triggers instead. The email is sent when the program’s approval notification is on, or always with the query parameter send_welcome_email=true. Affiliates whose account was created through the API or an import get it only with that parameter.
Errors: 400 No Affiliate for id '...', 400 Affiliate already member of program, 400 This coupon is already in use., 409 if the program is archived. The second and third texts are in message_raw; message has the field name in front, for example Coupon: This coupon is already in use. Team members’ API keys need the Manage programs permission.