Implement Fluid Ad Server
SPA V3

SPA V3

code examples curl location globoff 'https //localhost/v3/{publisheruuid}' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data '{ "user" { "id" "" }, "adunits" \[ { "adunitid" "" } ] }'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var raw = json stringify({ "user" { "id" "" }, "adunits" \[ { "adunitid" "" } ] }); var requestoptions = { method 'post', headers myheaders, body raw, redirect 'follow' }; fetch("https //localhost/v3/{publisheruuid}", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("https //localhost/v3/{publisheruuid}") https = net http new(url host, url port) https use ssl = true request = net http post new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request body = json dump({ "user" { "id" "" }, "adunits" \[ { "adunitid" "" } ] }) response = https request(request) puts response read body import requests import json url = "https //localhost/v3/{publisheruuid}" payload = json dumps({ "user" { "id" "" }, "adunits" \[ { "adunitid" "" } ] }) headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("post", url, headers=headers, data=payload) print(response text) responses // ok { "adunits" \[ { "adunitid" "", "positions" \[ { "gtin" "", "ext" {}, "beaconurls" \[ "" ], "clickurls" \[ "" ], "sponsored" "true | false", "kind" "", "brand" "brand x", "advertiser" "advertiser x" } ] } ] }// one or more request parameters don't comply to the api specifications { "errors" \[ "" ] }// one of the request ad unit ids is unknown { "errors" \[ "" ] }