Adding affiliates through the API is (usually) a 2-step process:
- Create the affiliate: At this point the affiliate id will be created. As longs as an affiliate is created, but not yet part of any program, they will be archived.
- Add the affiliate to a program: At this point, the affiliate's unique referral link will be generated (these are unique per affiliate, per program). It can be picked up from the response