Links
Update Links
PUT
/
v2
/
surveys
/
streams
/
{StreamNumber}
/
link
Update Links
curl --request PUT \
--url https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/link \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"SurveyCompleteLink": "https://www.supplier.com?pid=8629795&rid=[%rid%]",
"SurveyTermLink": "http://www.supplierredirect.com/term?rid=[%rid%]",
"SecurityFraudTermLink": "http://www.supplierredirect.com/security?rid=[%rid%]",
"SurveyOverquotaLink": "http://www.supplierredirect.com/overquota?rid=[%rid%]"
}
'import requests
url = "https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/link"
payload = {
"SurveyCompleteLink": "https://www.supplier.com?pid=8629795&rid=[%rid%]",
"SurveyTermLink": "http://www.supplierredirect.com/term?rid=[%rid%]",
"SecurityFraudTermLink": "http://www.supplierredirect.com/security?rid=[%rid%]",
"SurveyOverquotaLink": "http://www.supplierredirect.com/overquota?rid=[%rid%]"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
SurveyCompleteLink: 'https://www.supplier.com?pid=8629795&rid=[%rid%]',
SurveyTermLink: 'http://www.supplierredirect.com/term?rid=[%rid%]',
SecurityFraudTermLink: 'http://www.supplierredirect.com/security?rid=[%rid%]',
SurveyOverquotaLink: 'http://www.supplierredirect.com/overquota?rid=[%rid%]'
})
};
fetch('https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/link', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/link",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'SurveyCompleteLink' => 'https://www.supplier.com?pid=8629795&rid=[%rid%]',
'SurveyTermLink' => 'http://www.supplierredirect.com/term?rid=[%rid%]',
'SecurityFraudTermLink' => 'http://www.supplierredirect.com/security?rid=[%rid%]',
'SurveyOverquotaLink' => 'http://www.supplierredirect.com/overquota?rid=[%rid%]'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/link"
payload := strings.NewReader("{\n \"SurveyCompleteLink\": \"https://www.supplier.com?pid=8629795&rid=[%rid%]\",\n \"SurveyTermLink\": \"http://www.supplierredirect.com/term?rid=[%rid%]\",\n \"SecurityFraudTermLink\": \"http://www.supplierredirect.com/security?rid=[%rid%]\",\n \"SurveyOverquotaLink\": \"http://www.supplierredirect.com/overquota?rid=[%rid%]\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/link")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"SurveyCompleteLink\": \"https://www.supplier.com?pid=8629795&rid=[%rid%]\",\n \"SurveyTermLink\": \"http://www.supplierredirect.com/term?rid=[%rid%]\",\n \"SecurityFraudTermLink\": \"http://www.supplierredirect.com/security?rid=[%rid%]\",\n \"SurveyOverquotaLink\": \"http://www.supplierredirect.com/overquota?rid=[%rid%]\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/link")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"SurveyCompleteLink\": \"https://www.supplier.com?pid=8629795&rid=[%rid%]\",\n \"SurveyTermLink\": \"http://www.supplierredirect.com/term?rid=[%rid%]\",\n \"SecurityFraudTermLink\": \"http://www.supplierredirect.com/security?rid=[%rid%]\",\n \"SurveyOverquotaLink\": \"http://www.supplierredirect.com/overquota?rid=[%rid%]\"\n}"
response = http.request(request)
puts response.read_body{
"Status": 0,
"Message": "Success",
"Data": {
"LiveLinkUD": "d026d369-b370-4ffa-8177-c75cf46026f7",
"LiveLinkURL": "https://www-staging.researchdesk.com/landing2?fttsn=d026d369-b370-4ffa-8177-c75cf46026f7&rid=[%RID%]",
"TestLinkUD": "c4648ac7-9cff-4702-acab-bb244aef78ae",
"TestLinkURL": "https://www-staging.researchdesk.com/landing2?fttsn=c4648ac7-9cff-4702-acab-bb244aef78ae&rid=[%RID%]"
}
}Updates the respondent “test” and “live” entry links for a Stream with new redirect URLs. Pass the
lud and tud values returned by Create Links.
Path Parameters
| Parameter | Description | Required | Example |
|---|---|---|---|
StreamNumber | The StreamNumber (integer) or StreamUd (UUID) of the stream. | Yes | 849 |
Query String Parameters
| Parameter | Description | Required | Example |
|---|---|---|---|
lud | UD for the Live link (from Create Links). | Yes | ?lud=d026d369-b370-4ffa-8177-c75cf46026f7 |
tud | UD for the Test link (from Create Links). | Yes | &tud=c4648ac7-9cff-4702-acab-bb244aef78ae |
Request Body
| Field | Description | Required |
|---|---|---|
SurveyCompleteLink | Redirect used after a completion. | Yes |
SurveyTermLink | Redirect used after a termination. | Yes |
SecurityFraudTermLink | Redirect used after a quality/security termination. | Yes |
SurveyOverquotaLink | Redirect used after an over-quota termination. | Yes |
Use[%rid%](case sensitive) in your redirect URLs to pass back the Respondent ID originally passed into the entry link as[%RID%].
Headers
Your obfuscated Supply API key (GUID), provided by Rep Data.
Path Parameters
StreamNumber (integer) or StreamUd (UUID).
Query Parameters
UD for the Live link (from Create Links).
UD for the Test link (from Create Links).
Body
application/json
Redirect after a complete. Use [%rid%] to pass back the respondent ID.
Redirect after a termination.
Redirect after a quality/security termination.
Redirect after an over-quota termination.
Was this page helpful?
Update Links
curl --request PUT \
--url https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/link \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"SurveyCompleteLink": "https://www.supplier.com?pid=8629795&rid=[%rid%]",
"SurveyTermLink": "http://www.supplierredirect.com/term?rid=[%rid%]",
"SecurityFraudTermLink": "http://www.supplierredirect.com/security?rid=[%rid%]",
"SurveyOverquotaLink": "http://www.supplierredirect.com/overquota?rid=[%rid%]"
}
'import requests
url = "https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/link"
payload = {
"SurveyCompleteLink": "https://www.supplier.com?pid=8629795&rid=[%rid%]",
"SurveyTermLink": "http://www.supplierredirect.com/term?rid=[%rid%]",
"SecurityFraudTermLink": "http://www.supplierredirect.com/security?rid=[%rid%]",
"SurveyOverquotaLink": "http://www.supplierredirect.com/overquota?rid=[%rid%]"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
SurveyCompleteLink: 'https://www.supplier.com?pid=8629795&rid=[%rid%]',
SurveyTermLink: 'http://www.supplierredirect.com/term?rid=[%rid%]',
SecurityFraudTermLink: 'http://www.supplierredirect.com/security?rid=[%rid%]',
SurveyOverquotaLink: 'http://www.supplierredirect.com/overquota?rid=[%rid%]'
})
};
fetch('https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/link', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/link",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'SurveyCompleteLink' => 'https://www.supplier.com?pid=8629795&rid=[%rid%]',
'SurveyTermLink' => 'http://www.supplierredirect.com/term?rid=[%rid%]',
'SecurityFraudTermLink' => 'http://www.supplierredirect.com/security?rid=[%rid%]',
'SurveyOverquotaLink' => 'http://www.supplierredirect.com/overquota?rid=[%rid%]'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/link"
payload := strings.NewReader("{\n \"SurveyCompleteLink\": \"https://www.supplier.com?pid=8629795&rid=[%rid%]\",\n \"SurveyTermLink\": \"http://www.supplierredirect.com/term?rid=[%rid%]\",\n \"SecurityFraudTermLink\": \"http://www.supplierredirect.com/security?rid=[%rid%]\",\n \"SurveyOverquotaLink\": \"http://www.supplierredirect.com/overquota?rid=[%rid%]\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/link")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"SurveyCompleteLink\": \"https://www.supplier.com?pid=8629795&rid=[%rid%]\",\n \"SurveyTermLink\": \"http://www.supplierredirect.com/term?rid=[%rid%]\",\n \"SecurityFraudTermLink\": \"http://www.supplierredirect.com/security?rid=[%rid%]\",\n \"SurveyOverquotaLink\": \"http://www.supplierredirect.com/overquota?rid=[%rid%]\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/link")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"SurveyCompleteLink\": \"https://www.supplier.com?pid=8629795&rid=[%rid%]\",\n \"SurveyTermLink\": \"http://www.supplierredirect.com/term?rid=[%rid%]\",\n \"SecurityFraudTermLink\": \"http://www.supplierredirect.com/security?rid=[%rid%]\",\n \"SurveyOverquotaLink\": \"http://www.supplierredirect.com/overquota?rid=[%rid%]\"\n}"
response = http.request(request)
puts response.read_body{
"Status": 0,
"Message": "Success",
"Data": {
"LiveLinkUD": "d026d369-b370-4ffa-8177-c75cf46026f7",
"LiveLinkURL": "https://www-staging.researchdesk.com/landing2?fttsn=d026d369-b370-4ffa-8177-c75cf46026f7&rid=[%RID%]",
"TestLinkUD": "c4648ac7-9cff-4702-acab-bb244aef78ae",
"TestLinkURL": "https://www-staging.researchdesk.com/landing2?fttsn=c4648ac7-9cff-4702-acab-bb244aef78ae&rid=[%RID%]"
}
}