Affiliates API
Affiliates
Retrieve Affiliate
this api endpoint ( get get ) retrieve an affiliate by id if the request succeeds, it will return an affiliate object docid\ kcij54n ngxgdktcb7q8y ; otherwise, it will return an error permissions affiliates view path parameters id the id of the affiliate to retrieve require "uri" require "net/http" url = uri("https //api tamio com/v2/affiliates/retrieve/c1797b4a 2694 4b90 a832 76856c1f3eef") https = net http new(url host, url port) https use ssl = true request = net http get new(url) request\["accept"] = "application/json" request\["authorization"] = "bearer your token here" response = https request(request) puts response read body curl location request get 'https //api tamio com/v2/affiliates/retrieve/c1797b4a 2694 4b90 a832 76856c1f3eef' \\ \ 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 'get', headers myheaders }; fetch("https //api tamio com/v2/affiliates/retrieve/c1797b4a 2694 4b90 a832 76856c1f3eef", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));{ "status" 200, "affiliate" { "object" "affiliate", "email" "tests\@affiliate com", "name" "affiliate doe", "surname" null, "address" null, "city" null, "state" null, "country" "us", "postcode" null, "vat" null, "telephone" null, "id" "c1797b4a 2694 4b90 a832 76856c1f3eef", "affiliate program id" "040afdd0 3081 4712 b827 896b3b7cbfa7", "affiliate program label" "affiliate program 2023", "currency" "eur", "sales" 0, "referrals" 0, "language" "en", "balance" 0, "bonus" 0, "approved" true, "payments" null } }