Affiliates API
Affiliates
Decline Affiliate
this api endpoint (post) (post) declines an affiliate partner's application to join an affiliate program that you own if the request succeeds, it will return an affiliate object docid\ kcij54n ngxgdktcb7q8y ; otherwise, it will return an error permissions affiliates edit webhook affiliate events docid\ f4blyksxcyj9dpe0if5jp path parameters id the id of the affiliate require "uri" require "json" require "net/http" url = uri("https //api tamio com/v2/affiliates/decline/25213be6 a152 4120 88a8 83e17a3a3ebc") 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" response = https request(request) puts response read bodycurl location request post 'https //api tamio com/v2/affiliates/decline/25213be6 a152 4120 88a8 83e17a3a3ebc' \\ \ header 'accept application/json' \\ \ header 'authorization bearer your token here'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("authorization", "bearer your token here"); var requestoptions = { method 'post', headers myheaders }; fetch("https //api tamio com/v2/affiliates/decline/25213be6 a152 4120 88a8 83e17a3a3ebc", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));{ "status" 200, "affiliate" \[ { "object" "affiliate", "email" "michael jordan\@example com", "name" "michael", "surname" "jordan", "address" null, "city" null, "state" null, "country" "cy", "postcode" null, "vat" null, "id" "a364d978 17c6 47e2 8812 5222bae71219", "affiliate program id" "040afdd0 3081 4712 b827 896b3b7cbfa7", "affiliate program label" "affiliate program 50%", "currency" "eur", "sales" 171, "referrals" 20, "balance" 0, "bonus" 0, "approved" false, "payments" null, "language" "en" } ] }