WhiteLabel API
Affiliate Network
Approve Affiliate Program
this api endpoint (post) (post) approves an affiliate program if the request succeeds, it returns a public program object docid\ fhkoh22n kpj9czvrc6pe ; otherwise, it will return an error permissions affiliate network edit query parameters id the id of the affiliate program require "uri" require "json" require "net/http" url = uri("https //api tamio com/v2/whitelabel/affiliate programs/approve/d628c45b 271c 4070 ab43 c2c1cc369eef") 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/whitelabel/affiliate programs/approve/d628c45b 271c 4070 ab43 c2c1cc369eef' \\ \ 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, body body }; fetch("https //api tamio com/v2/whitelabel/affiliate programs/approve/d628c45b 271c 4070 ab43 c2c1cc369eef", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));{ "status" 200, "program" { "object" "affiliate program", "products" \[ "caf80f0e 6f00 4e53 839b 847b7fe07fa0" ], "domain" { "id" "bc06950e 226c 4a6f 82b1 bff6fe170374", "domain" "google com" }, "seller" { "name" "awesome merchant", "email" "awesomemerchant\@example com", "country" "de" }, "affiliates" 10, "label" "test", "created at" 1671586309, "signup url" null, "id" "d628c45b 271c 4070 ab43 c2c1cc369eef", "currency" "eur", "commission amount" 10000, "commission percent" 0, "description" "test", "payout delay" 0, "subscription commission type" "once", "destinations" \[ "worldwide" ], "payments" \[ "utrust", "bitpay" ], "is public" false, "auto approve" true, "is listed" true, "allow bonuses" true, "payment count" null, "affiliate notifications" true, "banners" null, "approved" true } }