Affiliates API
Affiliates
List All Affiliates
this endpoint ( get get ) retrieves all your affiliates the response is paginated; therefore, you should use the 'page' parameter for navigating through the results in subsequent requests on successful completion, it returns an array of affiliate object docid\ kcij54n ngxgdktcb7q8y the number of available results and the flags used for filtering permissions affiliates view query parameters page fetch the results from a specific page it defaults to 1 per page the number of results to fetch per page the maximum is 50 and if it defaults to 10 from appendix docid\ kfbmx4q3dxjtduqf75yx1 start date used for filtering to appendix docid\ kfbmx4q3dxjtduqf75yx1 end date used for filtering filter optional text used for filtering results by name , email and country countries ( appendix docid\ kfbmx4q3dxjtduqf75yx1 ) ( example ?countries=de,ro ) a list of country codes to use for filtering affiliate program id filters results by an affiliate program status string filter the results by status the possible values are approved and pending require "uri" require "net/http" url = uri("https //api tamio com/v2/affiliates/list?page=1\&per page=10") 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 var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("authorization", "bearer your token here"); var requestoptions = { method 'get', headers myheaders, redirect 'follow' }; fetch("https //api tamio com/v2/affiliates/list?page=1\&per page=10", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));curl location request get 'https //api tamio com/v2/affiliates/list?page=1\&per page=10' \\ \ header 'accept application/json' \\ \ header 'authorization bearer your token here'{ "total results" 3, "status" 200, "page" 1, "per page" 10, "filter" null, "from" null, "to" null, "sort by" null, "order" "desc", "affiliates" \[ { "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" 239808, "bonus" 122808, "approved" true, "payments" null, "language" "en" } ] }