Invite Rules

Get invite rules

This method returns all invite rules for your account, grouped by event type.

Parameters

HTTP Headers

Name Description
token

An authorisation header containing meta information, see OAuth2.

Responses

200 - The invite rules for your account, grouped by event type.

Name Description
application/json InviteRuleEventGroupByAccountDto

400 - Bad Request

No body is sent for this status code.

401 - Unauthorized

No body is sent for this status code.

403 - Forbidden

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-rules
//#region Parameters const baseUrl = 'https://api.etrusted.com'; const headers = { 'token': null, // Change me! }; const body = ""; //#endregion let url = `${baseUrl}/invite-rules`; const xhr = new XMLHttpRequest(); xhr.open('GET', url, true); xhr.setRequestHeader('token', `${headers["token"]}`); 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 headers = { 'token': null, // Change me! }; const body = ""; //#endregion let urlAsString = `${baseUrl}/invite-rules`; 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: { 'token': `${headers["token"]}`, } }; 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"; queryStringParameters = { } routeParameters = { } headers = { "token": nil, # Change me! } queryStringValues = queryStringParameters.to_a queryStringPairs = queryStringValues.map { |entry| entry[0].to_s + "=" + (entry[1] || '') }; queryString = queryStringPairs.join('&') urlAsString = baseUrl + "/invite-rules" + (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) request["token"] = headers["token"] 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"; headers.put("token", null); // Change me! //#endregion String urlAsString = baseUrl + "/invite-rules"; 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'; $headers = array( "token" => null, // Change me! ); $body = ""; //#endregion $url = "$baseUrl/invite-rules"; $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_POSTFIELDS => json_encode($body), CURLOPT_HTTPHEADER => array( "token: " . $headers["token"], ), )); $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 query_string_parameters = { } route_parameters = { } headers = { 'token': '', # Change me! } url_as_string = 'https://api.etrusted.com/invite-rules'.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-rules' \ --request GET \ --header 'token: value' \ --location

      <?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.etrusted.com/invite-rules",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer {access_token}",
    "Content-Type: application/json",
    "cache-control: no-cache"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}


    

      var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.etrusted.com/invite-rules",
  "method": "GET",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer {access_token}",
    "cache-control": "no-cache"
  },
  "processData": false,
  "data": ""
}

$.ajax(settings).done(function (response) {
  console.log(response);
});


    

      OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.etrusted.com/invite-rules")
  .get()
  .addHeader("Content-Type", "application/json")
  .addHeader("Authorization", "Bearer {access_token}")
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();


    
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!

Create a new invite rule

This method creates a new invite rule object.

Parameters

HTTP Headers

Name Description
token

An authorisation header containing meta information, see OAuth2.

Body

Content-Type Type
application/json InviteRulePostDto
{ "name": "invite_rule_name", "eventTypeRef": "evt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "inviteTemplatePriority": [ { "transport": {}, "templateRef": "/templates/xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx" } ], "templateRef": "ivt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "questionnaireTemplateRef": "qrt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "sendingDelay": "P3D", "timeOfDay": "10:00:00Z", "active": true }

Responses

200 - The newly created invite rule.

Name Description
application/json InviteRuleResponseDto

400 - Bad Request

No body is sent for this status code.

401 - Unauthorized

No body is sent for this status code.

403 - Forbidden

No body is sent for this status code.

404 - Not Found

No body is sent for this status code.
POST
https://api.etrusted.com/invite-rules
//#region Parameters const baseUrl = 'https://api.etrusted.com'; const headers = { 'token': null, // Change me! }; const body = { "name": "invite_rule_name", "eventTypeRef": "evt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "inviteTemplatePriority": [ { "transport": {}, "templateRef": "/templates/xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx" } ], "templateRef": "ivt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "questionnaireTemplateRef": "qrt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "sendingDelay": "P3D", "timeOfDay": "10:00:00Z", "active": true }; //#endregion let url = `${baseUrl}/invite-rules`; const xhr = new XMLHttpRequest(); xhr.open('POST', url, true); xhr.setRequestHeader('Content-Type', 'application/json'); xhr.setRequestHeader('token', `${headers["token"]}`); 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 headers = { 'token': null, // Change me! }; const body = { "name": "invite_rule_name", "eventTypeRef": "evt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "inviteTemplatePriority": [ { "transport": {}, "templateRef": "/templates/xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx" } ], "templateRef": "ivt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "questionnaireTemplateRef": "qrt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "sendingDelay": "P3D", "timeOfDay": "10:00:00Z", "active": true }; //#endregion let urlAsString = `${baseUrl}/invite-rules`; 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: 'POST', headers: { 'token': `${headers["token"]}`, 'Content-Type': 'application/json' } }; 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"; queryStringParameters = { } routeParameters = { } headers = { "token": nil, # Change me! } queryStringValues = queryStringParameters.to_a queryStringPairs = queryStringValues.map { |entry| entry[0].to_s + "=" + (entry[1] || '') }; queryString = queryStringPairs.join('&') urlAsString = baseUrl + "/invite-rules" + (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::Post.new(url) request["token"] = headers["token"] request["Content-Type"] = "application/json" request.body = JSON.dump({ "name": "invite_rule_name", "eventTypeRef": "evt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "inviteTemplatePriority": [ { "transport": {}, "templateRef": "/templates/xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx" } ], "templateRef": "ivt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "questionnaireTemplateRef": "qrt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "sendingDelay": "P3D", "timeOfDay": "10:00:00Z", "active": 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(" \"name\": \"invite_rule_name\",") .append(" \"eventTypeRef\": \"evt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx\",") .append(" \"inviteTemplatePriority\": [") .append(" {") .append(" \"transport\": {},") .append(" \"templateRef\": \"/templates/xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx\"") .append(" }") .append(" ],") .append(" \"templateRef\": \"ivt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx\",") .append(" \"questionnaireTemplateRef\": \"qrt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx\",") .append(" \"sendingDelay\": \"P3D\",") .append(" \"timeOfDay\": \"10:00:00Z\",") .append(" \"active\": true") .append("}") .toString(); String baseUrl = "https://api.etrusted.com"; headers.put("token", null); // Change me! //#endregion String urlAsString = baseUrl + "/invite-rules"; 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("POST"); 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'; $headers = array( "token" => null, // Change me! ); // Change me! $body = json_decode('{ "name": "invite_rule_name", "eventTypeRef": "evt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "inviteTemplatePriority": [ { "transport": {}, "templateRef": "/templates/xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx" } ], "templateRef": "ivt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "questionnaireTemplateRef": "qrt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "sendingDelay": "P3D", "timeOfDay": "10:00:00Z", "active": true }'); //#endregion $url = "$baseUrl/invite-rules"; $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 => "POST", CURLOPT_POSTFIELDS => json_encode($body), CURLOPT_HTTPHEADER => array( "Content-Type: application/json", "token: " . $headers["token"], ), )); $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 query_string_parameters = { } route_parameters = { } headers = { 'Content-Type': 'application/json' 'token': '', # Change me! } url_as_string = 'https://api.etrusted.com/invite-rules'.format(**{ **query_string_parameters, **route_parameters }) payload = '' payload = json.dumps({ "name": "invite_rule_name", "eventTypeRef": "evt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "inviteTemplatePriority": [ { "transport": {}, "templateRef": "/templates/xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx" } ], "templateRef": "ivt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "questionnaireTemplateRef": "qrt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "sendingDelay": "P3D", "timeOfDay": "10:00:00Z", "active": true }) url = urlparse(url_as_string) http_client = http.client.HTTPSConnection(url.netloc) http_client.request("POST", url_as_string, payload, headers) response = http_client.getresponse() data = response.read() print(data.decode("utf-8"))
curl 'https://api.etrusted.com/invite-rules' \ --request POST \ --data-raw '{ "name": "invite_rule_name", "eventTypeRef": "evt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "inviteTemplatePriority": [ { "transport": {}, "templateRef": "/templates/xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx" } ], "templateRef": "ivt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "questionnaireTemplateRef": "qrt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "sendingDelay": "P3D", "timeOfDay": "10:00:00Z", "active": true }' \ --header 'Content-Type: application/json' \ --header 'token: value' \ --location

      <?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.etrusted.com/invite-rules",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => '{
    "name": "Default checkout rule",
    "eventTypeRef": "ety-xxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
    "templateRef": "ivt-xxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
    "questionnaireTemplateRef": "qrt-xxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
    "sendingDelay": "P3D",
    "timeOfDay": "10:00:00Z",
    "active": true
  }',
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer {access_token}",
    "Content-Type: application/json",
    "cache-control: no-cache"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}


    

      var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.etrusted.com/invite-rules",
  "method": "POST",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer {access_token}",
    "cache-control": "no-cache"
  },
  "processData": false,
  "data": {
  "name": "Default checkout rule",
  "eventTypeRef": "ety-xxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
  "templateRef": "ivt-xxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
  "questionnaireTemplateRef": "qrt-xxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
  "sendingDelay": "P3D",
  "timeOfDay": "10:00:00Z",
  "active": true
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});


    

      OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{" +
  "\"name\": \"Default checkout rule\"," +
  "\"eventTypeRef\": \"ety-xxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx\"," +
  "\"templateRef\": \"ivt-xxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx\","
  "\"questionnaireTemplateRef\": \"qrt-xxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx\"," +
  "\"sendingDelay\": \"P3D\"," +
  "\"timeOfDay\": \"10:00:00Z\"," +
  "\"active\": true" +
"}");
Request request = new Request.Builder()
  .url("https://api.etrusted.com/invite-rules")
  .post(body)
  .addHeader("Content-Type", "application/json")
  .addHeader("Authorization", "Bearer {access_token}")
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();


    
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 an invite rule by ID

This method retrieves a particular invite rule.

Parameters

Route Parameters

Name Description
id

The invite rule UUID.

HTTP Headers

Name Description
token

An authorisation header containing meta information, see OAuth2.

Responses

200 - The invite rule object with the requested ID.

Name Description
application/json InviteRuleGetResponseDto

400 - Bad Request

No body is sent for this status code.

401 - Unauthorized

No body is sent for this status code.

403 - Forbidden

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-rules/{id}
//#region Parameters const baseUrl = 'https://api.etrusted.com'; const id = null; // Change me! const headers = { 'token': null, // Change me! }; const body = ""; //#endregion let url = `${baseUrl}/invite-rules/${id}`; const xhr = new XMLHttpRequest(); xhr.open('GET', url, true); xhr.setRequestHeader('token', `${headers["token"]}`); 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 headers = { 'token': null, // Change me! }; const body = ""; //#endregion let urlAsString = `${baseUrl}/invite-rules/${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: { 'token': `${headers["token"]}`, } }; 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"; queryStringParameters = { } routeParameters = { "id": nil, # Change me! } headers = { "token": nil, # Change me! } queryStringValues = queryStringParameters.to_a queryStringPairs = queryStringValues.map { |entry| entry[0].to_s + "=" + (entry[1] || '') }; queryString = queryStringPairs.join('&') urlAsString = baseUrl + "/invite-rules/{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) request["token"] = headers["token"] 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! headers.put("token", null); // Change me! //#endregion String urlAsString = baseUrl + "/invite-rules/{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'; $id = null; // Change me! $headers = array( "token" => null, // Change me! ); $body = ""; //#endregion $url = "$baseUrl/invite-rules/$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_POSTFIELDS => json_encode($body), CURLOPT_HTTPHEADER => array( "token: " . $headers["token"], ), )); $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 query_string_parameters = { } route_parameters = { 'id': '', # Change me! } headers = { 'token': '', # Change me! } url_as_string = 'https://api.etrusted.com/invite-rules/{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-rules/{id}' \ --request GET \ --header 'token: value' \ --location

      <?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.etrusted.com/invite-rules/{id}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer {access_token}",
    "Content-Type: application/json",
    "cache-control: no-cache"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}


    

      var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.etrusted.com/invite-rules/{id}",
  "method": "GET",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer {access_token}",
    "cache-control": "no-cache"
  },
  "processData": false,
  "data": ""
}

$.ajax(settings).done(function (response) {
  console.log(response);
});


    

      OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.etrusted.com/invite-rules/{id}")
  .get()
  .addHeader("Content-Type", "application/json")
  .addHeader("Authorization", "Bearer {access_token}")
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();


    
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 an invite rule by ID

This method updates an invite rule object.

Parameters

Route Parameters

Name Description
id

The invite rule UUID.

HTTP Headers

Name Description
token

An authorisation header containing meta information, see OAuth2.

Body

Content-Type Type
application/json InviteRulePutDto
{ "name": "invite_rule_name", "inviteTemplatePriority": [ { "transport": {}, "templateRef": "/templates/xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx" } ], "templateRef": "ivt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "questionnaireTemplateRef": "qrt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "sendingDelay": "P3D", "timeOfDay": "10:00:00Z", "active": true }

Responses

200 - The updated invite rule.

Name Description
application/json InviteRuleResponseDto

400 - Bad Request

No body is sent for this status code.

401 - Unauthorized

No body is sent for this status code.

403 - Forbidden

No body is sent for this status code.

404 - Not Found

No body is sent for this status code.
PUT
https://api.etrusted.com/invite-rules/{id}
//#region Parameters const baseUrl = 'https://api.etrusted.com'; const id = null; // Change me! const headers = { 'token': null, // Change me! }; const body = { "name": "invite_rule_name", "inviteTemplatePriority": [ { "transport": {}, "templateRef": "/templates/xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx" } ], "templateRef": "ivt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "questionnaireTemplateRef": "qrt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "sendingDelay": "P3D", "timeOfDay": "10:00:00Z", "active": true }; //#endregion let url = `${baseUrl}/invite-rules/${id}`; const xhr = new XMLHttpRequest(); xhr.open('PUT', url, true); xhr.setRequestHeader('Content-Type', 'application/json'); xhr.setRequestHeader('token', `${headers["token"]}`); 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 headers = { 'token': null, // Change me! }; const body = { "name": "invite_rule_name", "inviteTemplatePriority": [ { "transport": {}, "templateRef": "/templates/xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx" } ], "templateRef": "ivt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "questionnaireTemplateRef": "qrt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "sendingDelay": "P3D", "timeOfDay": "10:00:00Z", "active": true }; //#endregion let urlAsString = `${baseUrl}/invite-rules/${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: 'PUT', headers: { 'token': `${headers["token"]}`, 'Content-Type': 'application/json' } }; 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"; queryStringParameters = { } routeParameters = { "id": nil, # Change me! } headers = { "token": nil, # Change me! } queryStringValues = queryStringParameters.to_a queryStringPairs = queryStringValues.map { |entry| entry[0].to_s + "=" + (entry[1] || '') }; queryString = queryStringPairs.join('&') urlAsString = baseUrl + "/invite-rules/{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::Put.new(url) request["token"] = headers["token"] request["Content-Type"] = "application/json" request.body = JSON.dump({ "name": "invite_rule_name", "inviteTemplatePriority": [ { "transport": {}, "templateRef": "/templates/xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx" } ], "templateRef": "ivt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "questionnaireTemplateRef": "qrt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "sendingDelay": "P3D", "timeOfDay": "10:00:00Z", "active": 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(" \"name\": \"invite_rule_name\",") .append(" \"inviteTemplatePriority\": [") .append(" {") .append(" \"transport\": {},") .append(" \"templateRef\": \"/templates/xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx\"") .append(" }") .append(" ],") .append(" \"templateRef\": \"ivt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx\",") .append(" \"questionnaireTemplateRef\": \"qrt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx\",") .append(" \"sendingDelay\": \"P3D\",") .append(" \"timeOfDay\": \"10:00:00Z\",") .append(" \"active\": true") .append("}") .toString(); String baseUrl = "https://api.etrusted.com"; routeParameters.put("id", null); // Change me! headers.put("token", null); // Change me! //#endregion String urlAsString = baseUrl + "/invite-rules/{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("PUT"); 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'; $id = null; // Change me! $headers = array( "token" => null, // Change me! ); // Change me! $body = json_decode('{ "name": "invite_rule_name", "inviteTemplatePriority": [ { "transport": {}, "templateRef": "/templates/xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx" } ], "templateRef": "ivt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "questionnaireTemplateRef": "qrt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "sendingDelay": "P3D", "timeOfDay": "10:00:00Z", "active": true }'); //#endregion $url = "$baseUrl/invite-rules/$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 => "PUT", CURLOPT_POSTFIELDS => json_encode($body), CURLOPT_HTTPHEADER => array( "Content-Type: application/json", "token: " . $headers["token"], ), )); $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 query_string_parameters = { } route_parameters = { 'id': '', # Change me! } headers = { 'Content-Type': 'application/json' 'token': '', # Change me! } url_as_string = 'https://api.etrusted.com/invite-rules/{id}'.format(**{ **query_string_parameters, **route_parameters }) payload = '' payload = json.dumps({ "name": "invite_rule_name", "inviteTemplatePriority": [ { "transport": {}, "templateRef": "/templates/xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx" } ], "templateRef": "ivt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "questionnaireTemplateRef": "qrt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "sendingDelay": "P3D", "timeOfDay": "10:00:00Z", "active": true }) url = urlparse(url_as_string) http_client = http.client.HTTPSConnection(url.netloc) http_client.request("PUT", url_as_string, payload, headers) response = http_client.getresponse() data = response.read() print(data.decode("utf-8"))
curl 'https://api.etrusted.com/invite-rules/{id}' \ --request PUT \ --data-raw '{ "name": "invite_rule_name", "inviteTemplatePriority": [ { "transport": {}, "templateRef": "/templates/xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx" } ], "templateRef": "ivt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "questionnaireTemplateRef": "qrt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx", "sendingDelay": "P3D", "timeOfDay": "10:00:00Z", "active": true }' \ --header 'Content-Type: application/json' \ --header 'token: value' \ --location

      <?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.etrusted.com/invite-rules/{id}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => '{
    "name": "Default checkout rule",
    "templateRef": "/templates/xxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
    "questionnaireTemplateRef": "qrt-xxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
    "sendingDelay": "P3D",
    "timeOfDay": "10:00:00Z",
    "active": true
  }',
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer {access_token}",
    "Content-Type: application/json",
    "cache-control: no-cache"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}


    

      var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.etrusted.com/invite-rules/{id}",
  "method": "PUT",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer {access_token}",
    "cache-control": "no-cache",
  },
  "processData": false,
  "data": {
    "name": "Default checkout rule",
    "templateRef": "/templates/xxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
    "questionnaireTemplateRef": "qrt-xxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
    "sendingDelay": "P3D",
    "timeOfDay": "10:00:00Z",
    "active": true
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});


    

      OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{" +
  "\"name\": \"Default checkout rule\"," +
  "\"templateRef\": \"/templates/xxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx\"," +
  "\"questionnaireTemplateRef\": \"qrt-xxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx\"," +
  "\"sendingDelay\": \"P3D\", +
  "\"timeOfDay\": \"10:00:00Z\"," +
  "\"active\": true" +
"}"
);
Request request = new Request.Builder()
  .url("https://api.etrusted.com/invite-rules/{id}")
  .put(body)
  .addHeader("Content-Type", "application/json")
  .addHeader("Authorization", "Bearer {access_token}")
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();


    
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!

Delete an invite rule by ID

This method deletes an invite rule object.

Parameters

Route Parameters

Name Description
id

The invite rule UUID.

HTTP Headers

Name Description
token

An authorisation header containing meta information, see OAuth2.

Responses

204 - No Content

No body is sent for this status code.

400 - Bad Request

No body is sent for this status code.

401 - Unauthorized

No body is sent for this status code.

403 - Forbidden

No body is sent for this status code.

404 - Not Found

No body is sent for this status code.
DELETE
https://api.etrusted.com/invite-rules/{id}
//#region Parameters const baseUrl = 'https://api.etrusted.com'; const id = null; // Change me! const headers = { 'token': null, // Change me! }; const body = ""; //#endregion let url = `${baseUrl}/invite-rules/${id}`; const xhr = new XMLHttpRequest(); xhr.open('DELETE', url, true); xhr.setRequestHeader('token', `${headers["token"]}`); 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 headers = { 'token': null, // Change me! }; const body = ""; //#endregion let urlAsString = `${baseUrl}/invite-rules/${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: 'DELETE', headers: { 'token': `${headers["token"]}`, } }; 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"; queryStringParameters = { } routeParameters = { "id": nil, # Change me! } headers = { "token": nil, # Change me! } queryStringValues = queryStringParameters.to_a queryStringPairs = queryStringValues.map { |entry| entry[0].to_s + "=" + (entry[1] || '') }; queryString = queryStringPairs.join('&') urlAsString = baseUrl + "/invite-rules/{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::Delete.new(url) request["token"] = headers["token"] 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! headers.put("token", null); // Change me! //#endregion String urlAsString = baseUrl + "/invite-rules/{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("DELETE"); 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'; $id = null; // Change me! $headers = array( "token" => null, // Change me! ); $body = ""; //#endregion $url = "$baseUrl/invite-rules/$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 => "DELETE", CURLOPT_POSTFIELDS => json_encode($body), CURLOPT_HTTPHEADER => array( "token: " . $headers["token"], ), )); $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 query_string_parameters = { } route_parameters = { 'id': '', # Change me! } headers = { 'token': '', # Change me! } url_as_string = 'https://api.etrusted.com/invite-rules/{id}'.format(**{ **query_string_parameters, **route_parameters }) payload = '' url = urlparse(url_as_string) http_client = http.client.HTTPSConnection(url.netloc) http_client.request("DELETE", url_as_string, payload, headers) response = http_client.getresponse() data = response.read() print(data.decode("utf-8"))
curl 'https://api.etrusted.com/invite-rules/{id}' \ --request DELETE \ --header 'token: value' \ --location

      <?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.etrusted.com/invite-rules/{id}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer {access_token}",
    "Content-Type: application/json",
    "cache-control: no-cache"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}


    

      var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.etrusted.com/invite-rules/{id}",
  "method": "DELETE",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer {access_token}",
    "cache-control": "no-cache"
  },
  "processData": false,
  "data": ""
}

$.ajax(settings).done(function (response) {
  console.log(response);
});


    

      OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.etrusted.com/invite-rules/{id}")
  .delete(null)
  .addHeader("Content-Type", "application/json")
  .addHeader("Authorization", "Bearer {access_token}")
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();


    
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 invite rules by channel ID

This method returns all invite rules for a channel, grouped by event type.

Parameters

Route Parameters

Name Description
id

A channel UUID.

HTTP Headers

Name Description
token

An authorisation header containing meta information, see OAuth2.

Responses

200 - The invite rules for this channel, grouped by event type.

Name Description
application/json InviteRuleEventGroupByChannelDto

400 - Bad Request

No body is sent for this status code.

401 - Unauthorized

No body is sent for this status code.

403 - Forbidden

No body is sent for this status code.

404 - Not Found

No body is sent for this status code.
GET
https://api.etrusted.com/channels/{id}/invite-rules
//#region Parameters const baseUrl = 'https://api.etrusted.com'; const id = null; // Change me! const headers = { 'token': null, // Change me! }; const body = ""; //#endregion let url = `${baseUrl}/channels/${id}/invite-rules`; const xhr = new XMLHttpRequest(); xhr.open('GET', url, true); xhr.setRequestHeader('token', `${headers["token"]}`); 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 headers = { 'token': null, // Change me! }; const body = ""; //#endregion let urlAsString = `${baseUrl}/channels/${id}/invite-rules`; 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: { 'token': `${headers["token"]}`, } }; 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"; queryStringParameters = { } routeParameters = { "id": nil, # Change me! } headers = { "token": nil, # Change me! } queryStringValues = queryStringParameters.to_a queryStringPairs = queryStringValues.map { |entry| entry[0].to_s + "=" + (entry[1] || '') }; queryString = queryStringPairs.join('&') urlAsString = baseUrl + "/channels/{id}/invite-rules" + (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) request["token"] = headers["token"] 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! headers.put("token", null); // Change me! //#endregion String urlAsString = baseUrl + "/channels/{id}/invite-rules"; 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'; $id = null; // Change me! $headers = array( "token" => null, // Change me! ); $body = ""; //#endregion $url = "$baseUrl/channels/$id/invite-rules"; $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_POSTFIELDS => json_encode($body), CURLOPT_HTTPHEADER => array( "token: " . $headers["token"], ), )); $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 query_string_parameters = { } route_parameters = { 'id': '', # Change me! } headers = { 'token': '', # Change me! } url_as_string = 'https://api.etrusted.com/channels/{id}/invite-rules'.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/channels/{id}/invite-rules' \ --request GET \ --header 'token: value' \ --location

      <?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.etrusted.com/channels/{id}/invite-rules",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer {access_token}",
    "Content-Type: application/json",
    "cache-control: no-cache"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}


    

      var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.etrusted.com/channels/{id}/invite-rules",
  "method": "GET",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer {access_token}",
    "cache-control": "no-cache"
  },
  "processData": false,
  "data": ""
}

$.ajax(settings).done(function (response) {
  console.log(response);
});


    

      OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.etrusted.com/channels/{id}/invite-rules")
  .get()
  .addHeader("Content-Type", "application/json")
  .addHeader("Authorization", "Bearer {access_token}")
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();


    
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 an invite rule by channel ID

This method updates an invite rule for a channel.

Parameters

Route Parameters

Name Description
channelId

The channel UUID.

inviteRuleId

The invite rule UUID.

HTTP Headers

Name Description
token

An authorisation header containing meta information, see OAuth2.

Body

Content-Type Type
application/json InviteRulePutByChannelRequestDto
{ "active": true }

Responses

204 - No Content

No body is sent for this status code.

400 - Bad Request

No body is sent for this status code.

401 - Unauthorized

No body is sent for this status code.

403 - Forbidden

No body is sent for this status code.

404 - Not Found

No body is sent for this status code.
PUT
https://api.etrusted.com/channels/{channelId}/invite-rules/{inviteRuleId}
//#region Parameters const baseUrl = 'https://api.etrusted.com'; const channelId = null; // Change me! const inviteRuleId = null; // Change me! const headers = { 'token': null, // Change me! }; const body = { "active": true }; //#endregion let url = `${baseUrl}/channels/${channelId}/invite-rules/${inviteRuleId}`; const xhr = new XMLHttpRequest(); xhr.open('PUT', url, true); xhr.setRequestHeader('Content-Type', 'application/json'); xhr.setRequestHeader('token', `${headers["token"]}`); 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 channelId = null; // Change me! const inviteRuleId = null; // Change me! const headers = { 'token': null, // Change me! }; const body = { "active": true }; //#endregion let urlAsString = `${baseUrl}/channels/${channelId}/invite-rules/${inviteRuleId}`; 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: 'PUT', headers: { 'token': `${headers["token"]}`, 'Content-Type': 'application/json' } }; 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"; queryStringParameters = { } routeParameters = { "channelId": nil, # Change me! "inviteRuleId": nil, # Change me! } headers = { "token": nil, # Change me! } queryStringValues = queryStringParameters.to_a queryStringPairs = queryStringValues.map { |entry| entry[0].to_s + "=" + (entry[1] || '') }; queryString = queryStringPairs.join('&') urlAsString = baseUrl + "/channels/{channelId}/invite-rules/{inviteRuleId}" + (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::Put.new(url) request["token"] = headers["token"] request["Content-Type"] = "application/json" request.body = JSON.dump({ "active": 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(" \"active\": true") .append("}") .toString(); String baseUrl = "https://api.etrusted.com"; routeParameters.put("channelId", null); // Change me! routeParameters.put("inviteRuleId", null); // Change me! headers.put("token", null); // Change me! //#endregion String urlAsString = baseUrl + "/channels/{channelId}/invite-rules/{inviteRuleId}"; 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("PUT"); 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'; $channelId = null; // Change me! $inviteRuleId = null; // Change me! $headers = array( "token" => null, // Change me! ); // Change me! $body = json_decode('{ "active": true }'); //#endregion $url = "$baseUrl/channels/$channelId/invite-rules/$inviteRuleId"; $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 => "PUT", CURLOPT_POSTFIELDS => json_encode($body), CURLOPT_HTTPHEADER => array( "Content-Type: application/json", "token: " . $headers["token"], ), )); $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 query_string_parameters = { } route_parameters = { 'channelId': '', # Change me! 'inviteRuleId': '', # Change me! } headers = { 'Content-Type': 'application/json' 'token': '', # Change me! } url_as_string = 'https://api.etrusted.com/channels/{channelId}/invite-rules/{inviteRuleId}'.format(**{ **query_string_parameters, **route_parameters }) payload = '' payload = json.dumps({ "active": true }) url = urlparse(url_as_string) http_client = http.client.HTTPSConnection(url.netloc) http_client.request("PUT", url_as_string, payload, headers) response = http_client.getresponse() data = response.read() print(data.decode("utf-8"))
curl 'https://api.etrusted.com/channels/{channelId}/invite-rules/{inviteRuleId}' \ --request PUT \ --data-raw '{ "active": true }' \ --header 'Content-Type: application/json' \ --header 'token: value' \ --location

      <?php

$request = new HttpRequest();
$request->setUrl('https://api.etrusted.com/channels/{channelId}/invite-rules/{inviteRuleId}');
$request->setMethod(HTTP_METH_PUT);

$request->setHeaders(array(
  'cache-control' => 'no-cache',
  'Authorization' => 'Bearer {access_token}',
  'Content-Type' => 'application/json'
));

$request->setBody('{
  "active": true
}');

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}


    

      var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.etrusted.com/channels/{channelId}/invite-rules/{inviteRuleId}",
  "method": "PUT",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer {access_token}",
    "cache-control": "no-cache"
  },
  "processData": false,
  "data": {
    "active": true
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});


    

      OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{" +
    "\"active\": true" +
  "}"
);
Request request = new Request.Builder()
  .url("https://api.etrusted.com/channels/{channelId}/invite-rules/{inviteRuleId}")
  .put(body)
  .addHeader("Content-Type", "application/json")
  .addHeader("Authorization", "Bearer {access_token}")
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();


    
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

InviteRuleListItemByAccountDto

Properties

_object
string

The response object type which is invite rule.

id
string

A unique identifier for this invite rule.

name
string

The name of the invite rule.

template
object

The invite template the invite rule is associated with.

Properties
name
string

The name of the invite template.

id
string

The invite template UUID.

questionnaireTemplate
object

The questionnaire template the invite rule is associated with.

Properties
name
string

The name of the questionnaire template.

id
string

The questionnaire template UUID.

sendingDelay
string

A delay for sending out the invite. It is a duration in the ISO 8601 and RFC 3339 compliant format PnYnMnWnDTnHnMnS.

timeOfDay
string

The preferred time of day for sending out the invite. It is a timestamp in the ISO 8601 and RFC 3339 compliant format yyyy-MM-dd’T’HH:mm:ss.SSSZ.

createdAt
string

The date and time when the invite rule was created. It is a timestamp in the ISO 8601 and RFC 3339 compliant format yyyy-MM-dd’T’HH:mm:ss.SSSZ.

updatedAt
string

The date and time when the invite rule was last modified. It is a timestamp in the ISO 8601 and RFC 3339 compliant format yyyy-MM-dd’T’HH:mm:ss.SSSZ

active
boolean

A boolean value that indicates whether the invite rule is active or inactive.

default
boolean

A boolean value that indicates whether this is the default invite rule.

InviteRuleEventGroupByAccountDto

Properties

_object
string

The response object type which is event type.

id
string

The event type UUID the invite rules operates on.

name
string

The event type name.

active
boolean

A boolean value that indicates whether the event type and touchpoint are activated.

The list of invite rule objects for the event type.

InviteTemplateTransportEnum

The means of transportation for the invite.

Properties

InviteTemplatePriorityDto

Properties

templateRef
string

The template URI for the invite rule.

InviteRulePostDto

Properties

name
string

The name of the invite rule.

eventTypeRef
string

A reference to the event type the rule is applied to.

inviteTemplatePriority

An array of invite template priorities that hold information about the means of transportation of the invites, e.g. via email or sms.

templateRef
string

The email template URI for the invite rule.

questionnaireTemplateRef
string

The questionnaire template uri for the invite rule.

sendingDelay
string

This is a delay for sending out the invite. It is a duration in the ISO 8601 and RFC 3339 compliant format PnYnMnWnDTnHnMnS.

timeOfDay
string

The preferred time of day for sending out the invite, in the ISO 8601 and RFC 3339 compliant format HH:mm:ssZ, e.g. 10:00:00Z.

active
boolean

A boolean value to activate or deactivate the invite rule.

InviteRuleResponseDto

Properties

id
string

The invite rule UUID.

name
string

The name of the invite rule.

eventTypeRef
string

A UUID as event type reference. The invite rules is applied to this event type.

templateRef
string

A UUID as invite template reference for the invite rule.

questionnaireTemplateRef
string

A UUID as questionnaire template reference for the invite rule.

sendingDelay
string

This property defines a delay for sending out the invite. It is a duration in the ISO 8601 and RFC 3339 compliant format PnYnMnWnDTnHnMnS.

timeOfDay
string

The preferred time of day for sending out the invite, iin the ISO 8601 and RFC 3339 compliant format HH:mm:ssZ, e.g. 10:00:00Z.

createdAt
string

The date and time when the rule was created, in the ISO 8601 and RFC 3339 compliant format yyyy-MM-dd’T’HH:mm:ss.SSSZ.

updatedAt
string

The date and time when the rule was last modified, in the ISO 8601 and RFC 3339 compliant format yyyy-MM-dd’T’HH:mm:ss.SSSZ.

default
boolean

A boolean value that indicates whether this is the default rule.

InviteRuleChannelActiveDto

Properties

channelRef
string

The channel UUID.

name
string

The name of the channel.

active
boolean

Indicates whether the rule is active for this channel.

InviteRuleGetResponseDto

Properties

id
string

The invite rule UUID.

name
string

The name of the invite rule.

eventTypeRef
string

A UUID as event type reference. The invite rule is applied to this event type.

templateRef
string

A UUID as invite template reference.

questionnaireTemplateRef
string

A UUID as questionnaire template reference.

sendingDelay
string

This property defines a delay for sending out the invite. It is a duration in the ISO 8601 and RFC 3339 compliant format PnYnMnWnDTnHnMnS.

timeOfDay
string

The preferred time of day for sending out the invite, in the ISO 8601 and RFC 3339 compliant format HH:mm:ssZ, e.g. 10:00:00Z.

createdAt
string

The date and time when the invite rule was created, in the ISO 8601 and RFC 3339 compliant format yyyy-MM-dd’T’HH:mm:ss.SSSZ.

updatedAt
string

The date and time when the invite rule was last modified, in the ISO 8601 and RFC 3339 compliant format yyyy-MM-dd’T’HH:mm:ss.SSSZ.

default
boolean

A boolean value that indicates whether this is the default invite rule.

The list of channels the rule is applied to.

InviteRulePutDto

Properties

name
string

The name of the invite rule.

inviteTemplatePriority

An array of invite template priorities that hold information about the means of transportation of the invites, e.g. via email or sms.

templateRef
string

A UUID as invite template reference for the invite rule.

questionnaireTemplateRef
string

A UUID as questionnaire template reference for the invite rule.

sendingDelay
string

This property defines a delay for sending out the invite. It is a duration in the ISO 8601 and RFC 3339 compliant format PnYnMnWnDTnHnMnS.

timeOfDay
string

The preferred time of day for sending out the invite, in the ISO 8601 and RFC 3339 compliant format HH:mm:ssZ, e.g. 10:00:00Z.

active
boolean

A boolean value to activate or deactivate the invite rule.

InviteRuleListItemByChannelDto

Properties

_object
string

The response object type which is invite rule.

id
string

The invite rule UUID.

name
string

The name of the invite rule.

template
object

The email template of the invite rule.

Properties
name
string

The name of the email template.

id
string

The invite template UUID.

questionnaireTemplate
object

The questionnaire template of the invite rule.

Properties
name
string

The name of the questionnaire template.

id
string

The questionnaire template UUID.

sendingDelay
string

This defines a delay for sending out the questionnaire. It is a duration in the ISO 8601 and RFC 3339 compliant format PnYnMnWnDTnHnMnS.

timeOfDay
string

The preferred time of day for sending out the invite in the ISO 8601 and RFC 3339 compliant format HH:mm:ssZ, e.g. 10:00:00Z.

createdAt
string

The date and time when the rule was created, in the ISO 8601 and RFC 3339 compliant format yyyy-MM-dd’T’HH:mm:ss.SSSZ.

updatedAt
string

The date and time when the rule was last modified, in the ISO 8601 and RFC 3339 compliant format yyyy-MM-dd’T’HH:mm:ss.SSSZ.

active
boolean

A boolean value that indicates whether the invite rule is active or inactive.

default
boolean

A boolean value that indicates whether this is the default invite rule.

InviteRuleEventGroupByChannelDto

Properties

_object
string

The response object type which is event type.

id
string

The event type UUID.

name
string

The event type name that also denotes the corresponding touchpoint.

active
boolean

A boolean value that indicated whether the event type and touchpoint are activated or deactivated.

InviteRulePutByChannelRequestDto

Properties

active
boolean

A boolean value to activate or deactivate the invite rule.

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.