Affiliates API
Affiliates
Send Email
this api endpoint (post) (post) send an email to an affiliate partner if the request succeeds, it will return the id of the affiliate partner; otherwise, it will return an error permissions affiliates edit path parameters id the id of the affiliate body parameters email template id string the id of the email template to send require "uri" require "json" require "net/http" url = uri("https //api tamio com/v2/affiliates/send email/c1797b4a 2694 4b90 a832 76856c1f3eef") https = net http new(url host, url port) https use ssl = true request = net http post new(url) request\["accept"] = "application/json" request\["authorization"] = "bearer your token here" data = { email template id "896b3b7cbfa7 2123 21b 76856c1f3eef", } request body = data to json response = https request(request) puts response read bodycurl location request post 'https //api tamio com/v2/affiliates/send email/c1797b4a 2694 4b90 a832 76856c1f3eef' \\ \ header 'accept application/json' \\ \ header 'authorization bearer your token here' \\ \ data raw '{"email template id" "896b3b7cbfa7 2123 21b 76856c1f3eef"}'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("authorization", "bearer your token here"); var data = { email template id "896b3b7cbfa7 2123 21b 76856c1f3eef" }; var body = json stringify(data); var requestoptions = { method 'post', headers myheaders, body body }; fetch("https //api tamio com/v2/affiliates/send email/c1797b4a 2694 4b90 a832 76856c1f3eef", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));{ "status" 200, "id" "c1797b4a 2694 4b90 a832 76856c1f3eef" }