Invite Settings

Get all invite settings

Returns a list of all invite settings for all channels. The list can be filtered by (invite-settings) id or channel id.

Parameters

Query Parameters

Name Description
id
channel-id

Responses

200 - List of all invite-settings for all channels.

Name Description
application/json InviteSettingsAllFields

401 - Unauthorized

No body is sent for this status code.
GET
https://api.etrusted.com/invite-settings
/** * Please be aware that storing your Authorization on the client side is strongly discourge. * This code example should only be used for testing purposes. */ //#region Parameters const baseUrl = 'https://api.etrusted.com'; // Some query parameters are optional and should only be set if needed. const queryParameters = { 'id': null, // Change me! 'channel-id': null, // Change me! }; const body = ""; //#endregion let url = `${baseUrl}/invite-settings`; const queryString = Object .keys(queryParameters) .map(key => `${key}=${encodeURIComponent(queryParameters[key])}`) .join('&'); url = queryString ? `${url}?${url}` : url; const xhr = new XMLHttpRequest(); xhr.open('GET', url, true); xhr.onreadystatechange = function() { if(xhr.readyState == 4 && xhr.status == 200) { console.log(xhr.responseText); } }; xhr.send(body || undefined);
const https = require('https'); //#region Parameters const baseUrl = 'https://api.etrusted.com'; // Some query parameters are optional and should only be set if needed. const queryParameters = { 'id': null, // Change me! 'channel-id': null, // Change me! }; const body = ""; //#endregion let urlAsString = `${baseUrl}/invite-settings`; const queryString = Object .keys(queryParameters) .map(key => `${key}=${encodeURIComponent(queryParameters[key])}`) .join('&'); urlAsString = queryString ? `${urlAsString}?${queryString}` : urlAsString; const url = new URL(urlAsString); const options = { hostname: url.hostname, port: url.port, path: url.path, method: 'GET', headers: { } }; const req = https.request(options, res => { console.log(`statusCode: ${res.statusCode}`) res.on('data', d => { process.stdout.write(d) }); }); req.on('error', error => { console.error(error) }); if (body) { req.write(JSON.stringify(data)); } req.end();
require "uri" require "json" require "net/http" baseUrl = "https://api.etrusted.com"; # Some query parameters are optional and should only be set if needed. queryStringParameters = { "id": nil, # Change me! "channel-id": nil, # Change me! } routeParameters = { } headers = { } queryStringValues = queryStringParameters.to_a queryStringPairs = queryStringValues.map { |entry| entry[0].to_s + "=" + (entry[1] || '') }; queryString = queryStringPairs.join('&') urlAsString = baseUrl + "/invite-settings" + (queryString != "" ? "?" + queryString : "") urlAsString.gsub!(/\{[^\}]*\}/) { |m| routeParameters[m[1...-1].to_sym] } if urlAsString url = URI(urlAsString) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Get.new(url) response = https.request(request) puts response.read_body
//#region Imports import java.net.URL; import java.net.URLEncoder; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.io.IOException; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.lang.StringBuffer; import java.util.Map; import java.util.HashMap; import java.util.AbstractMap; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.ArrayList; //#endregion public class main { public static final Pattern PATTERN = Pattern.compile("\\{([^\\}]*)\\}"); public static void main(String[] args) throws IOException { try { Map<String, String> headers = new HashMap<>(); Map<String, String> queryStringValues = new HashMap<>(); Map<String, String> routeParameters = new HashMap<>(); //#region Parameters String baseUrl = "https://api.etrusted.com"; // Some query parameters are optional and should only be set if needed. queryStringValues.put("id", null); // Change me! queryStringValues.put("channel-id", null); // Change me! //#endregion String urlAsString = baseUrl + "/invite-settings"; Matcher matcher = PATTERN.matcher(urlAsString); StringBuffer out = new StringBuffer(); while (matcher.find()) { String variable = routeParameters.get(matcher.group(1)); matcher.appendReplacement(out, variable); } matcher.appendTail(out); urlAsString = out.toString(); ArrayList<String> queryStringParts = new ArrayList<>(); for (String key : queryStringValues.keySet()){ queryStringParts.add(key + "=" + URLEncoder.encode(queryStringValues.get(key))); } if (queryStringParts.size() > 0) { urlAsString += "?" + String.join("&", queryStringParts); } URL url = new URL(urlAsString); HttpURLConnection httpRequest = (HttpURLConnection) url.openConnection(); for (String key : headers.keySet()){ httpRequest.setRequestProperty(key, headers.get(key)); } httpRequest.setRequestMethod("GET"); BufferedReader in = new BufferedReader(new InputStreamReader(httpRequest.getInputStream())); String inputLine; StringBuffer content = new StringBuffer(); while ((inputLine = in.readLine()) != null) { content.append(inputLine); } in.close(); int status = httpRequest.getResponseCode(); httpRequest.disconnect(); System.out.println("Response Status: " + String.valueOf(status)); System.out.println("Response Body: " + content.toString()); } catch (MalformedURLException ex) { System.out.println("URL provided not valid"); } catch (IOException ex) { System.out.println("Error reading HTTP connection" + ex.toString()); throw ex; } } }
<?php //#region Parameters $baseUrl = 'https://api.etrusted.com'; // Some query parameters are optional and should only be set if needed. $id = null; // Change me! $channel-id = null; // Change me! //#endregion $url = "$baseUrl/invite-settings"; $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => array( ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
import http.client import json from urllib.parse import urlparse # Some query parameters are optional and should only be set if needed. query_string_parameters = { 'id': '', # Change me! 'channel-id': '', # Change me! } route_parameters = { } headers = { } url_as_string = 'https://api.etrusted.com/invite-settings?id={id}&channel-id={channel-id}'.format(**{ **query_string_parameters, **route_parameters }) payload = '' url = urlparse(url_as_string) http_client = http.client.HTTPSConnection(url.netloc) http_client.request("GET", url_as_string, payload, headers) response = http_client.getresponse() data = response.read() print(data.decode("utf-8"))
curl 'https://api.etrusted.com/invite-settings?id={id}&channel-id={channel-id}' \ --request GET \ --location
This feature is coming soon!
The operation tester will give you the possibility to pre-test operations with our sandbox environment.
What would you expect from the operation tester? Tell us your opinion!

Updates all settings

Updates parts of all invite-settings with the same event type id for all channels

Parameters

Query Parameters

Name Description
event-type-id

Body

Content-Type Type
application/json InviteSettingsAllUpdateRequestBody
{ "enabled": true, "productInviteConfiguration": { "sendingDelayInDays": null, "sendingTimeOfDay": "07:15:00Z", "inviteTemplateId": "tpl-6ccace5e-cd7c-4add-9217-87e411e9a79f", "questionnaireTemplateId": "qst-f58de863-a0fa-43f6-bdc2-847f9247c9ec", "enabled": true }, "serviceInviteConfiguration": { "sendingDelayInDays": null, "sendingTimeOfDay": "07:15:00Z", "inviteTemplateId": "tpl-c31c696d-a70e-450a-a842-58370b401cd8", "questionnaireTemplateId": "qst-93fc31d6-e3f4-4554-b279-8059550995d8", "enabled": true } }

Responses

200 - List of updated invite-settings for all channels

Name Description
application/json InviteSettingsAllFields

401 - Unauthorized

No body is sent for this status code.
PATCH
https://api.etrusted.com/invite-settings
/** * Please be aware that storing your Authorization on the client side is strongly discourge. * This code example should only be used for testing purposes. */ //#region Parameters const baseUrl = 'https://api.etrusted.com'; // Some query parameters are optional and should only be set if needed. const queryParameters = { 'event-type-id': null, // Change me! }; const body = { "enabled": true, "productInviteConfiguration": { "sendingDelayInDays": null, "sendingTimeOfDay": "07:15:00Z", "inviteTemplateId": "tpl-6ccace5e-cd7c-4add-9217-87e411e9a79f", "questionnaireTemplateId": "qst-f58de863-a0fa-43f6-bdc2-847f9247c9ec", "enabled": true }, "serviceInviteConfiguration": { "sendingDelayInDays": null, "sendingTimeOfDay": "07:15:00Z", "inviteTemplateId": "tpl-c31c696d-a70e-450a-a842-58370b401cd8", "questionnaireTemplateId": "qst-93fc31d6-e3f4-4554-b279-8059550995d8", "enabled": true } }; //#endregion let url = `${baseUrl}/invite-settings`; const queryString = Object .keys(queryParameters) .map(key => `${key}=${encodeURIComponent(queryParameters[key])}`) .join('&'); url = queryString ? `${url}?${url}` : url; const xhr = new XMLHttpRequest(); xhr.open('PATCH', url, true); xhr.onreadystatechange = function() { if(xhr.readyState == 4 && xhr.status == 200) { console.log(xhr.responseText); } }; xhr.send(body || undefined);
const https = require('https'); //#region Parameters const baseUrl = 'https://api.etrusted.com'; // Some query parameters are optional and should only be set if needed. const queryParameters = { 'event-type-id': null, // Change me! }; const body = { "enabled": true, "productInviteConfiguration": { "sendingDelayInDays": null, "sendingTimeOfDay": "07:15:00Z", "inviteTemplateId": "tpl-6ccace5e-cd7c-4add-9217-87e411e9a79f", "questionnaireTemplateId": "qst-f58de863-a0fa-43f6-bdc2-847f9247c9ec", "enabled": true }, "serviceInviteConfiguration": { "sendingDelayInDays": null, "sendingTimeOfDay": "07:15:00Z", "inviteTemplateId": "tpl-c31c696d-a70e-450a-a842-58370b401cd8", "questionnaireTemplateId": "qst-93fc31d6-e3f4-4554-b279-8059550995d8", "enabled": true } }; //#endregion let urlAsString = `${baseUrl}/invite-settings`; const queryString = Object .keys(queryParameters) .map(key => `${key}=${encodeURIComponent(queryParameters[key])}`) .join('&'); urlAsString = queryString ? `${urlAsString}?${queryString}` : urlAsString; const url = new URL(urlAsString); const options = { hostname: url.hostname, port: url.port, path: url.path, method: 'PATCH', headers: { } }; const req = https.request(options, res => { console.log(`statusCode: ${res.statusCode}`) res.on('data', d => { process.stdout.write(d) }); }); req.on('error', error => { console.error(error) }); if (body) { req.write(JSON.stringify(data)); } req.end();
require "uri" require "json" require "net/http" baseUrl = "https://api.etrusted.com"; # Some query parameters are optional and should only be set if needed. queryStringParameters = { "event-type-id": nil, # Change me! } routeParameters = { } headers = { } queryStringValues = queryStringParameters.to_a queryStringPairs = queryStringValues.map { |entry| entry[0].to_s + "=" + (entry[1] || '') }; queryString = queryStringPairs.join('&') urlAsString = baseUrl + "/invite-settings" + (queryString != "" ? "?" + queryString : "") urlAsString.gsub!(/\{[^\}]*\}/) { |m| routeParameters[m[1...-1].to_sym] } if urlAsString url = URI(urlAsString) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Patch.new(url) request["Content-Type"] = "application/json" request.body = JSON.dump({ "enabled": true, "productInviteConfiguration": { "sendingDelayInDays": null, "sendingTimeOfDay": "07:15:00Z", "inviteTemplateId": "tpl-6ccace5e-cd7c-4add-9217-87e411e9a79f", "questionnaireTemplateId": "qst-f58de863-a0fa-43f6-bdc2-847f9247c9ec", "enabled": true }, "serviceInviteConfiguration": { "sendingDelayInDays": null, "sendingTimeOfDay": "07:15:00Z", "inviteTemplateId": "tpl-c31c696d-a70e-450a-a842-58370b401cd8", "questionnaireTemplateId": "qst-93fc31d6-e3f4-4554-b279-8059550995d8", "enabled": true } }) response = https.request(request) puts response.read_body
//#region Imports import java.net.URL; import java.net.URLEncoder; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.io.IOException; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.lang.StringBuffer; import java.util.Map; import java.util.HashMap; import java.util.AbstractMap; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.ArrayList; //#endregion public class main { public static final Pattern PATTERN = Pattern.compile("\\{([^\\}]*)\\}"); public static void main(String[] args) throws IOException { try { Map<String, String> headers = new HashMap<>(); Map<String, String> queryStringValues = new HashMap<>(); Map<String, String> routeParameters = new HashMap<>(); //#region Parameters String body = new StringBuilder() .append("{") .append(" \"enabled\": true,") .append(" \"productInviteConfiguration\": {") .append(" \"sendingDelayInDays\": null,") .append(" \"sendingTimeOfDay\": \"07:15:00Z\",") .append(" \"inviteTemplateId\": \"tpl-6ccace5e-cd7c-4add-9217-87e411e9a79f\",") .append(" \"questionnaireTemplateId\": \"qst-f58de863-a0fa-43f6-bdc2-847f9247c9ec\",") .append(" \"enabled\": true") .append(" },") .append(" \"serviceInviteConfiguration\": {") .append(" \"sendingDelayInDays\": null,") .append(" \"sendingTimeOfDay\": \"07:15:00Z\",") .append(" \"inviteTemplateId\": \"tpl-c31c696d-a70e-450a-a842-58370b401cd8\",") .append(" \"questionnaireTemplateId\": \"qst-93fc31d6-e3f4-4554-b279-8059550995d8\",") .append(" \"enabled\": true") .append(" }") .append("}") .toString(); String baseUrl = "https://api.etrusted.com"; // Some query parameters are optional and should only be set if needed. queryStringValues.put("event-type-id", null); // Change me! //#endregion String urlAsString = baseUrl + "/invite-settings"; Matcher matcher = PATTERN.matcher(urlAsString); StringBuffer out = new StringBuffer(); while (matcher.find()) { String variable = routeParameters.get(matcher.group(1)); matcher.appendReplacement(out, variable); } matcher.appendTail(out); urlAsString = out.toString(); ArrayList<String> queryStringParts = new ArrayList<>(); for (String key : queryStringValues.keySet()){ queryStringParts.add(key + "=" + URLEncoder.encode(queryStringValues.get(key))); } if (queryStringParts.size() > 0) { urlAsString += "?" + String.join("&", queryStringParts); } URL url = new URL(urlAsString); HttpURLConnection httpRequest = (HttpURLConnection) url.openConnection(); for (String key : headers.keySet()){ httpRequest.setRequestProperty(key, headers.get(key)); } httpRequest.setRequestMethod("PATCH"); httpRequest.setRequestProperty("Content-Type", "application/json"); httpRequest.setDoOutput(true); OutputStream outputStream = httpRequest.getOutputStream(); OutputStreamWriter outputStreamWriter = new OutputStreamWriter(outputStream, "UTF-8"); outputStreamWriter.write(body); outputStreamWriter.flush(); outputStreamWriter.close(); outputStream.close(); httpRequest.connect(); BufferedReader in = new BufferedReader(new InputStreamReader(httpRequest.getInputStream())); String inputLine; StringBuffer content = new StringBuffer(); while ((inputLine = in.readLine()) != null) { content.append(inputLine); } in.close(); int status = httpRequest.getResponseCode(); httpRequest.disconnect(); System.out.println("Response Status: " + String.valueOf(status)); System.out.println("Response Body: " + content.toString()); } catch (MalformedURLException ex) { System.out.println("URL provided not valid"); } catch (IOException ex) { System.out.println("Error reading HTTP connection" + ex.toString()); throw ex; } } }
<?php //#region Parameters $baseUrl = 'https://api.etrusted.com'; // Some query parameters are optional and should only be set if needed. $event-type-id = null; // Change me! // Change me! $body = json_decode('{ "enabled": true, "productInviteConfiguration": { "sendingDelayInDays": null, "sendingTimeOfDay": "07:15:00Z", "inviteTemplateId": "tpl-6ccace5e-cd7c-4add-9217-87e411e9a79f", "questionnaireTemplateId": "qst-f58de863-a0fa-43f6-bdc2-847f9247c9ec", "enabled": true }, "serviceInviteConfiguration": { "sendingDelayInDays": null, "sendingTimeOfDay": "07:15:00Z", "inviteTemplateId": "tpl-c31c696d-a70e-450a-a842-58370b401cd8", "questionnaireTemplateId": "qst-93fc31d6-e3f4-4554-b279-8059550995d8", "enabled": true } }'); //#endregion $url = "$baseUrl/invite-settings"; $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "PATCH", CURLOPT_POSTFIELDS => json_encode($body), CURLOPT_HTTPHEADER => array( "Content-Type: application/json", ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
import http.client import json from urllib.parse import urlparse # Some query parameters are optional and should only be set if needed. query_string_parameters = { 'event-type-id': '', # Change me! } route_parameters = { } headers = { 'Content-Type': 'application/json' } url_as_string = 'https://api.etrusted.com/invite-settings?event-type-id={event-type-id}'.format(**{ **query_string_parameters, **route_parameters }) payload = '' payload = json.dumps({ "enabled": true, "productInviteConfiguration": { "sendingDelayInDays": null, "sendingTimeOfDay": "07:15:00Z", "inviteTemplateId": "tpl-6ccace5e-cd7c-4add-9217-87e411e9a79f", "questionnaireTemplateId": "qst-f58de863-a0fa-43f6-bdc2-847f9247c9ec", "enabled": true }, "serviceInviteConfiguration": { "sendingDelayInDays": null, "sendingTimeOfDay": "07:15:00Z", "inviteTemplateId": "tpl-c31c696d-a70e-450a-a842-58370b401cd8", "questionnaireTemplateId": "qst-93fc31d6-e3f4-4554-b279-8059550995d8", "enabled": true } }) url = urlparse(url_as_string) http_client = http.client.HTTPSConnection(url.netloc) http_client.request("PATCH", url_as_string, payload, headers) response = http_client.getresponse() data = response.read() print(data.decode("utf-8"))
curl 'https://api.etrusted.com/invite-settings?event-type-id={event-type-id}' \ --request PATCH \ --data-raw '{ "enabled": true, "productInviteConfiguration": { "sendingDelayInDays": null, "sendingTimeOfDay": "07:15:00Z", "inviteTemplateId": "tpl-6ccace5e-cd7c-4add-9217-87e411e9a79f", "questionnaireTemplateId": "qst-f58de863-a0fa-43f6-bdc2-847f9247c9ec", "enabled": true }, "serviceInviteConfiguration": { "sendingDelayInDays": null, "sendingTimeOfDay": "07:15:00Z", "inviteTemplateId": "tpl-c31c696d-a70e-450a-a842-58370b401cd8", "questionnaireTemplateId": "qst-93fc31d6-e3f4-4554-b279-8059550995d8", "enabled": true } }' \ --header 'Content-Type: application/json' \ --location
This feature is coming soon!
The operation tester will give you the possibility to pre-test operations with our sandbox environment.
What would you expect from the operation tester? Tell us your opinion!

Get specific invite settings

Returns invite-settings for provided (invite-settings) id

Parameters

Route Parameters

Name Description
id

Responses

200 - Invite-settings

Name Description
application/json InviteSettingsAllFieldsInitial

401 - Unauthorized

No body is sent for this status code.

404 - Not found

No body is sent for this status code.
GET
https://api.etrusted.com/invite-settings/{id}
/** * Please be aware that storing your Authorization on the client side is strongly discourge. * This code example should only be used for testing purposes. */ //#region Parameters const baseUrl = 'https://api.etrusted.com'; const id = null; // Change me! const body = ""; //#endregion let url = `${baseUrl}/invite-settings/${id}`; const xhr = new XMLHttpRequest(); xhr.open('GET', url, true); xhr.onreadystatechange = function() { if(xhr.readyState == 4 && xhr.status == 200) { console.log(xhr.responseText); } }; xhr.send(body || undefined);
const https = require('https'); //#region Parameters const baseUrl = 'https://api.etrusted.com'; const id = null; // Change me! const body = ""; //#endregion let urlAsString = `${baseUrl}/invite-settings/${id}`; const queryString = Object .keys(queryParameters) .map(key => `${key}=${encodeURIComponent(queryParameters[key])}`) .join('&'); urlAsString = queryString ? `${urlAsString}?${queryString}` : urlAsString; const url = new URL(urlAsString); const options = { hostname: url.hostname, port: url.port, path: url.path, method: 'GET', headers: { } }; const req = https.request(options, res => { console.log(`statusCode: ${res.statusCode}`) res.on('data', d => { process.stdout.write(d) }); }); req.on('error', error => { console.error(error) }); if (body) { req.write(JSON.stringify(data)); } req.end();
require "uri" require "json" require "net/http" baseUrl = "https://api.etrusted.com"; # Some query parameters are optional and should only be set if needed. queryStringParameters = { } routeParameters = { "id": nil, # Change me! } headers = { } queryStringValues = queryStringParameters.to_a queryStringPairs = queryStringValues.map { |entry| entry[0].to_s + "=" + (entry[1] || '') }; queryString = queryStringPairs.join('&') urlAsString = baseUrl + "/invite-settings/{id}" + (queryString != "" ? "?" + queryString : "") urlAsString.gsub!(/\{[^\}]*\}/) { |m| routeParameters[m[1...-1].to_sym] } if urlAsString url = URI(urlAsString) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Get.new(url) response = https.request(request) puts response.read_body
//#region Imports import java.net.URL; import java.net.URLEncoder; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.io.IOException; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.lang.StringBuffer; import java.util.Map; import java.util.HashMap; import java.util.AbstractMap; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.ArrayList; //#endregion public class main { public static final Pattern PATTERN = Pattern.compile("\\{([^\\}]*)\\}"); public static void main(String[] args) throws IOException { try { Map<String, String> headers = new HashMap<>(); Map<String, String> queryStringValues = new HashMap<>(); Map<String, String> routeParameters = new HashMap<>(); //#region Parameters String baseUrl = "https://api.etrusted.com"; routeParameters.put("id", null); // Change me! //#endregion String urlAsString = baseUrl + "/invite-settings/{id}"; Matcher matcher = PATTERN.matcher(urlAsString); StringBuffer out = new StringBuffer(); while (matcher.find()) { String variable = routeParameters.get(matcher.group(1)); matcher.appendReplacement(out, variable); } matcher.appendTail(out); urlAsString = out.toString(); ArrayList<String> queryStringParts = new ArrayList<>(); for (String key : queryStringValues.keySet()){ queryStringParts.add(key + "=" + URLEncoder.encode(queryStringValues.get(key))); } if (queryStringParts.size() > 0) { urlAsString += "?" + String.join("&", queryStringParts); } URL url = new URL(urlAsString); HttpURLConnection httpRequest = (HttpURLConnection) url.openConnection(); for (String key : headers.keySet()){ httpRequest.setRequestProperty(key, headers.get(key)); } httpRequest.setRequestMethod("GET"); BufferedReader in = new BufferedReader(new InputStreamReader(httpRequest.getInputStream())); String inputLine; StringBuffer content = new StringBuffer(); while ((inputLine = in.readLine()) != null) { content.append(inputLine); } in.close(); int status = httpRequest.getResponseCode(); httpRequest.disconnect(); System.out.println("Response Status: " + String.valueOf(status)); System.out.println("Response Body: " + content.toString()); } catch (MalformedURLException ex) { System.out.println("URL provided not valid"); } catch (IOException ex) { System.out.println("Error reading HTTP connection" + ex.toString()); throw ex; } } }
<?php //#region Parameters $baseUrl = 'https://api.etrusted.com'; // Some query parameters are optional and should only be set if needed. $id = null; // Change me! //#endregion $url = "$baseUrl/invite-settings/$id"; $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => array( ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
import http.client import json from urllib.parse import urlparse # Some query parameters are optional and should only be set if needed. query_string_parameters = { } route_parameters = { 'id': '', # Change me! } headers = { } url_as_string = 'https://api.etrusted.com/invite-settings/{id}'.format(**{ **query_string_parameters, **route_parameters }) payload = '' url = urlparse(url_as_string) http_client = http.client.HTTPSConnection(url.netloc) http_client.request("GET", url_as_string, payload, headers) response = http_client.getresponse() data = response.read() print(data.decode("utf-8"))
curl 'https://api.etrusted.com/invite-settings/{id}' \ --request GET \ --location
This feature is coming soon!
The operation tester will give you the possibility to pre-test operations with our sandbox environment.
What would you expect from the operation tester? Tell us your opinion!

Update specific invite settings

Updates parts of invite-settings for provided (invite-settings) id

Parameters

Route Parameters

Name Description
id

Body

Content-Type Type
application/json InviteSettingsSpecificUpdateRequestBody
{ "enabled": true, "productInviteConfiguration": { "sendingDelayInDays": null, "sendingTimeOfDay": "07:15:00Z", "inviteTemplateId": "tpl-6ccace5e-cd7c-4add-9217-87e411e9a79f", "questionnaireTemplateId": "qst-f58de863-a0fa-43f6-bdc2-847f9247c9ec", "enabled": true }, "serviceInviteConfiguration": { "sendingDelayInDays": null, "sendingTimeOfDay": "07:15:00Z", "inviteTemplateId": "tpl-c31c696d-a70e-450a-a842-58370b401cd8", "questionnaireTemplateId": "qst-93fc31d6-e3f4-4554-b279-8059550995d8", "enabled": true } }

Responses

200 - Updated invite-settings

Name Description
application/json InviteSettingsAllFields

400 - Bad Request

Name Description
application/json
Error
string
 

ErrorDescription
string
 

401 - Unauthorized

No body is sent for this status code.
PATCH
https://api.etrusted.com/invite-settings/{id}
/** * Please be aware that storing your Authorization on the client side is strongly discourge. * This code example should only be used for testing purposes. */ //#region Parameters const baseUrl = 'https://api.etrusted.com'; const id = null; // Change me! const body = { "enabled": true, "productInviteConfiguration": { "sendingDelayInDays": null, "sendingTimeOfDay": "07:15:00Z", "inviteTemplateId": "tpl-6ccace5e-cd7c-4add-9217-87e411e9a79f", "questionnaireTemplateId": "qst-f58de863-a0fa-43f6-bdc2-847f9247c9ec", "enabled": true }, "serviceInviteConfiguration": { "sendingDelayInDays": null, "sendingTimeOfDay": "07:15:00Z", "inviteTemplateId": "tpl-c31c696d-a70e-450a-a842-58370b401cd8", "questionnaireTemplateId": "qst-93fc31d6-e3f4-4554-b279-8059550995d8", "enabled": true } }; //#endregion let url = `${baseUrl}/invite-settings/${id}`; const xhr = new XMLHttpRequest(); xhr.open('PATCH', url, true); xhr.onreadystatechange = function() { if(xhr.readyState == 4 && xhr.status == 200) { console.log(xhr.responseText); } }; xhr.send(body || undefined);
const https = require('https'); //#region Parameters const baseUrl = 'https://api.etrusted.com'; const id = null; // Change me! const body = { "enabled": true, "productInviteConfiguration": { "sendingDelayInDays": null, "sendingTimeOfDay": "07:15:00Z", "inviteTemplateId": "tpl-6ccace5e-cd7c-4add-9217-87e411e9a79f", "questionnaireTemplateId": "qst-f58de863-a0fa-43f6-bdc2-847f9247c9ec", "enabled": true }, "serviceInviteConfiguration": { "sendingDelayInDays": null, "sendingTimeOfDay": "07:15:00Z", "inviteTemplateId": "tpl-c31c696d-a70e-450a-a842-58370b401cd8", "questionnaireTemplateId": "qst-93fc31d6-e3f4-4554-b279-8059550995d8", "enabled": true } }; //#endregion let urlAsString = `${baseUrl}/invite-settings/${id}`; const queryString = Object .keys(queryParameters) .map(key => `${key}=${encodeURIComponent(queryParameters[key])}`) .join('&'); urlAsString = queryString ? `${urlAsString}?${queryString}` : urlAsString; const url = new URL(urlAsString); const options = { hostname: url.hostname, port: url.port, path: url.path, method: 'PATCH', headers: { } }; const req = https.request(options, res => { console.log(`statusCode: ${res.statusCode}`) res.on('data', d => { process.stdout.write(d) }); }); req.on('error', error => { console.error(error) }); if (body) { req.write(JSON.stringify(data)); } req.end();
require "uri" require "json" require "net/http" baseUrl = "https://api.etrusted.com"; # Some query parameters are optional and should only be set if needed. queryStringParameters = { } routeParameters = { "id": nil, # Change me! } headers = { } queryStringValues = queryStringParameters.to_a queryStringPairs = queryStringValues.map { |entry| entry[0].to_s + "=" + (entry[1] || '') }; queryString = queryStringPairs.join('&') urlAsString = baseUrl + "/invite-settings/{id}" + (queryString != "" ? "?" + queryString : "") urlAsString.gsub!(/\{[^\}]*\}/) { |m| routeParameters[m[1...-1].to_sym] } if urlAsString url = URI(urlAsString) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Patch.new(url) request["Content-Type"] = "application/json" request.body = JSON.dump({ "enabled": true, "productInviteConfiguration": { "sendingDelayInDays": null, "sendingTimeOfDay": "07:15:00Z", "inviteTemplateId": "tpl-6ccace5e-cd7c-4add-9217-87e411e9a79f", "questionnaireTemplateId": "qst-f58de863-a0fa-43f6-bdc2-847f9247c9ec", "enabled": true }, "serviceInviteConfiguration": { "sendingDelayInDays": null, "sendingTimeOfDay": "07:15:00Z", "inviteTemplateId": "tpl-c31c696d-a70e-450a-a842-58370b401cd8", "questionnaireTemplateId": "qst-93fc31d6-e3f4-4554-b279-8059550995d8", "enabled": true } }) response = https.request(request) puts response.read_body
//#region Imports import java.net.URL; import java.net.URLEncoder; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.io.IOException; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.lang.StringBuffer; import java.util.Map; import java.util.HashMap; import java.util.AbstractMap; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.ArrayList; //#endregion public class main { public static final Pattern PATTERN = Pattern.compile("\\{([^\\}]*)\\}"); public static void main(String[] args) throws IOException { try { Map<String, String> headers = new HashMap<>(); Map<String, String> queryStringValues = new HashMap<>(); Map<String, String> routeParameters = new HashMap<>(); //#region Parameters String body = new StringBuilder() .append("{") .append(" \"enabled\": true,") .append(" \"productInviteConfiguration\": {") .append(" \"sendingDelayInDays\": null,") .append(" \"sendingTimeOfDay\": \"07:15:00Z\",") .append(" \"inviteTemplateId\": \"tpl-6ccace5e-cd7c-4add-9217-87e411e9a79f\",") .append(" \"questionnaireTemplateId\": \"qst-f58de863-a0fa-43f6-bdc2-847f9247c9ec\",") .append(" \"enabled\": true") .append(" },") .append(" \"serviceInviteConfiguration\": {") .append(" \"sendingDelayInDays\": null,") .append(" \"sendingTimeOfDay\": \"07:15:00Z\",") .append(" \"inviteTemplateId\": \"tpl-c31c696d-a70e-450a-a842-58370b401cd8\",") .append(" \"questionnaireTemplateId\": \"qst-93fc31d6-e3f4-4554-b279-8059550995d8\",") .append(" \"enabled\": true") .append(" }") .append("}") .toString(); String baseUrl = "https://api.etrusted.com"; routeParameters.put("id", null); // Change me! //#endregion String urlAsString = baseUrl + "/invite-settings/{id}"; Matcher matcher = PATTERN.matcher(urlAsString); StringBuffer out = new StringBuffer(); while (matcher.find()) { String variable = routeParameters.get(matcher.group(1)); matcher.appendReplacement(out, variable); } matcher.appendTail(out); urlAsString = out.toString(); ArrayList<String> queryStringParts = new ArrayList<>(); for (String key : queryStringValues.keySet()){ queryStringParts.add(key + "=" + URLEncoder.encode(queryStringValues.get(key))); } if (queryStringParts.size() > 0) { urlAsString += "?" + String.join("&", queryStringParts); } URL url = new URL(urlAsString); HttpURLConnection httpRequest = (HttpURLConnection) url.openConnection(); for (String key : headers.keySet()){ httpRequest.setRequestProperty(key, headers.get(key)); } httpRequest.setRequestMethod("PATCH"); httpRequest.setRequestProperty("Content-Type", "application/json"); httpRequest.setDoOutput(true); OutputStream outputStream = httpRequest.getOutputStream(); OutputStreamWriter outputStreamWriter = new OutputStreamWriter(outputStream, "UTF-8"); outputStreamWriter.write(body); outputStreamWriter.flush(); outputStreamWriter.close(); outputStream.close(); httpRequest.connect(); BufferedReader in = new BufferedReader(new InputStreamReader(httpRequest.getInputStream())); String inputLine; StringBuffer content = new StringBuffer(); while ((inputLine = in.readLine()) != null) { content.append(inputLine); } in.close(); int status = httpRequest.getResponseCode(); httpRequest.disconnect(); System.out.println("Response Status: " + String.valueOf(status)); System.out.println("Response Body: " + content.toString()); } catch (MalformedURLException ex) { System.out.println("URL provided not valid"); } catch (IOException ex) { System.out.println("Error reading HTTP connection" + ex.toString()); throw ex; } } }
<?php //#region Parameters $baseUrl = 'https://api.etrusted.com'; // Some query parameters are optional and should only be set if needed. $id = null; // Change me! // Change me! $body = json_decode('{ "enabled": true, "productInviteConfiguration": { "sendingDelayInDays": null, "sendingTimeOfDay": "07:15:00Z", "inviteTemplateId": "tpl-6ccace5e-cd7c-4add-9217-87e411e9a79f", "questionnaireTemplateId": "qst-f58de863-a0fa-43f6-bdc2-847f9247c9ec", "enabled": true }, "serviceInviteConfiguration": { "sendingDelayInDays": null, "sendingTimeOfDay": "07:15:00Z", "inviteTemplateId": "tpl-c31c696d-a70e-450a-a842-58370b401cd8", "questionnaireTemplateId": "qst-93fc31d6-e3f4-4554-b279-8059550995d8", "enabled": true } }'); //#endregion $url = "$baseUrl/invite-settings/$id"; $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "PATCH", CURLOPT_POSTFIELDS => json_encode($body), CURLOPT_HTTPHEADER => array( "Content-Type: application/json", ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
import http.client import json from urllib.parse import urlparse # Some query parameters are optional and should only be set if needed. query_string_parameters = { } route_parameters = { 'id': '', # Change me! } headers = { 'Content-Type': 'application/json' } url_as_string = 'https://api.etrusted.com/invite-settings/{id}'.format(**{ **query_string_parameters, **route_parameters }) payload = '' payload = json.dumps({ "enabled": true, "productInviteConfiguration": { "sendingDelayInDays": null, "sendingTimeOfDay": "07:15:00Z", "inviteTemplateId": "tpl-6ccace5e-cd7c-4add-9217-87e411e9a79f", "questionnaireTemplateId": "qst-f58de863-a0fa-43f6-bdc2-847f9247c9ec", "enabled": true }, "serviceInviteConfiguration": { "sendingDelayInDays": null, "sendingTimeOfDay": "07:15:00Z", "inviteTemplateId": "tpl-c31c696d-a70e-450a-a842-58370b401cd8", "questionnaireTemplateId": "qst-93fc31d6-e3f4-4554-b279-8059550995d8", "enabled": true } }) url = urlparse(url_as_string) http_client = http.client.HTTPSConnection(url.netloc) http_client.request("PATCH", url_as_string, payload, headers) response = http_client.getresponse() data = response.read() print(data.decode("utf-8"))
curl 'https://api.etrusted.com/invite-settings/{id}' \ --request PATCH \ --data-raw '{ "enabled": true, "productInviteConfiguration": { "sendingDelayInDays": null, "sendingTimeOfDay": "07:15:00Z", "inviteTemplateId": "tpl-6ccace5e-cd7c-4add-9217-87e411e9a79f", "questionnaireTemplateId": "qst-f58de863-a0fa-43f6-bdc2-847f9247c9ec", "enabled": true }, "serviceInviteConfiguration": { "sendingDelayInDays": null, "sendingTimeOfDay": "07:15:00Z", "inviteTemplateId": "tpl-c31c696d-a70e-450a-a842-58370b401cd8", "questionnaireTemplateId": "qst-93fc31d6-e3f4-4554-b279-8059550995d8", "enabled": true } }' \ --header 'Content-Type: application/json' \ --location
This feature is coming soon!
The operation tester will give you the possibility to pre-test operations with our sandbox environment.
What would you expect from the operation tester? Tell us your opinion!

Models

InviteSettingsAllFields

Properties

InviteSettingsAllUpdateRequestBody

Properties

enabled
boolean

productInviteConfiguration
object

Properties
sendingDelayInDays
number

sendingTimeOfDay
string

The time when the invitation will be sent out in 24h UTC format without time zone

inviteTemplateId
string

questionnaireTemplateId
string

enabled
boolean

serviceInviteConfiguration
object

Properties
sendingDelayInDays
number

sendingTimeOfDay
string

The time when the invitation will be sent out in 24h UTC format without time zone

inviteTemplateId
string

questionnaireTemplateId
string

enabled
boolean

InviteSettingsSpecificUpdateRequestBody

Properties

enabled
boolean

productInviteConfiguration
object

Properties
sendingDelayInDays
number

sendingTimeOfDay
string

The time when the invitation will be sent out in 24h UTC format without time zone

inviteTemplateId
string

questionnaireTemplateId
string

enabled
boolean

serviceInviteConfiguration
object

Properties
sendingDelayInDays
number

sendingTimeOfDay
string

The time when the invitation will be sent out in 24h UTC format without time zone

inviteTemplateId
string

questionnaireTemplateId
string

enabled
boolean

Need further support?

Visit the Help Centre for further information, or contact us. Are some words or terms unfamiliar? Then visit the glossary for clarification.