How can I create affiliate links programatically ?

Hello. I am using Envato Marketplace API to get link to products listed on Envato Marketplace. What variables should I add to that URL so it will get credited to my account ?

variable add will not work for the current Envato Affiliates - Programs. You must have to join the Envato Affiliates - Programs and have to create affiliate links manually for all items/links individually.

Thank you for response. Then, what is the use of Envato Marketplace API - product search, if you cant turn those links into affiliate links so you can earn commissions ?