### Example URL with query parameters Source: https://developers.etrusted.com/reference/getminimalreviews Append query parameters to filter results. Use '&' to separate multiple parameters. Example includes filtering by channel and submission date. ```http /reviews-minimal?channels=chl-xxx-yyyy&submittedAfter=2018-02-01T17:10:42.733Z ``` -------------------------------- ### GET /reviews-minimal Source: https://developers.etrusted.com/reference/getminimalreviews Retrieves a list of reviews with minimal properties. Results can be filtered by query parameters and paginated. ```APIDOC ## GET /reviews-minimal ### Description Retrieves a list of reviews with fewer properties per item. This endpoint is useful for scenarios where only essential review details are needed, offering a more performant alternative to the full `/reviews` endpoint. ### Method GET ### Endpoint `/reviews-minimal` ### Query Parameters - **channels** (string) - Optional - Comma-separated list of channel IDs to filter reviews by. - **submittedAfter** (string) - Optional - Filters reviews submitted after the specified ISO 8601 timestamp. - **submittedBefore** (string) - Optional - Filters reviews submitted before the specified ISO 8601 timestamp. - **status** (string) - Optional - Filters reviews by their status (e.g., `REJECTED`). Use this to exclude specific statuses like rejected reviews when using custom widgets. - **count** (integer) - Optional - Specifies the number of reviews to return per page for pagination. - **after** (string) - Optional - Returns reviews submitted after the specified cursor for pagination. - **before** (string) - Optional - Returns reviews submitted before the specified cursor for pagination. ### Request Example ``` GET /reviews-minimal?channels=chl-xxx-yyyy&submittedAfter=2018-02-01T17:10:42.733Z&count=10 ``` ### Response #### Success Response (200) - **reviews** (array) - A list of review objects, each containing minimal properties. - **id** (string) - The unique identifier of the review. - **rating** (integer) - The star rating given in the review. - **title** (string) - The title of the review. - **body** (string) - The main content of the review. - **submittedAt** (string) - The ISO 8601 timestamp when the review was submitted. - **author** (object) - Information about the reviewer. - **displayName** (string) - The display name of the author. - **channel** (object) - Information about the channel the review belongs to. - **id** (string) - The unique identifier of the channel. #### Response Example ```json { "reviews": [ { "id": "rev-abc123def456", "rating": 5, "title": "Excellent Service!", "body": "The team was very helpful and resolved my issue quickly.", "submittedAt": "2023-10-27T10:30:00.000Z", "author": { "displayName": "John Doe" }, "channel": { "id": "chl-xxx-yyyy" } } ] } ``` ``` -------------------------------- ### Get Review Count with Rating Filter (cURL) Source: https://developers.etrusted.com/reference/getreviewscount This example demonstrates how to retrieve the count of reviews filtered by a specific rating using cURL. Ensure you have the correct URL and authorization headers. ```shell curl --request GET \ --url 'https://api.etrusted.com/reviews/count?rating=1' \ --header 'accept: application/json' ``` -------------------------------- ### Fetch NPS Stats using Python Source: https://developers.etrusted.com/reference/post_aggregations-nps-1 Example of how to fetch NPS statistics using Python with an Authorization header. ```Python import requests url = "https://api.etrusted.com/aggregations/nps" payload = { "channels": [ {"id": "chl-abc"}, {"id": "chl-xyz"} ], "touchpoints": [ {"id": "checkout"}, {"id": "$$empty"} ] } headers = { 'Authorization': 'Bearer ', 'Content-Type': 'application/json' } response = requests.request("POST", url, json=payload, headers=headers) print(response.text) ``` -------------------------------- ### Fetch NPS Stats using Shell Source: https://developers.etrusted.com/reference/post_aggregations-nps-1 Example of how to fetch NPS statistics using a shell command with an Authorization header. ```Shell curl -X POST \ https://api.etrusted.com/aggregations/nps \ -H 'Authorization: Bearer ' \ -H 'Content-Type: application/json' \ -d '{ "channels": [ {"id":"chl-abc"}, {"id":"chl-xyz"} ], "touchpoints": [ {"id":"checkout"}, {"id":"$$empty"} ] }' ``` -------------------------------- ### Fetch NPS Stats using Ruby Source: https://developers.etrusted.com/reference/post_aggregations-nps-1 Example of how to fetch NPS statistics using Ruby with an Authorization header. ```Ruby require 'uri' require 'net/http' url = URI("https://api.etrusted.com/aggregations/nps") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = "Bearer " request["Content-Type"] = "application/json" request.body = JSON.body = JSON.generate(channels: [{id: 'chl-abc'}, {id: 'chl-xyz'}], touchpoints: [{id: 'checkout'}, {'id': '$$empty'}]) response = http.request(request) puts response.read_body ``` -------------------------------- ### Fetch NPS Stats using PHP Source: https://developers.etrusted.com/reference/post_aggregations-nps-1 Example of how to fetch NPS statistics using PHP with an Authorization header. ```PHP "https://api.etrusted.com/aggregations/nps", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "{\"channels\": [{\"id\":\"chl-abc\"}, {\"id\":\"chl-xyz\"}], \"touchpoints\": [{\"id\":\"checkout\"}, {\"id\":\"$$empty\"}]}", CURLOPT_HTTPHEADER => [ "Authorization: Bearer ", "Content-Type: application/json" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #" . $err; } else { echo $response; } ?> ``` -------------------------------- ### Fetch NPS Stats using Node.js Source: https://developers.etrusted.com/reference/post_aggregations-nps-1 Example of how to fetch NPS statistics using Node.js with an Authorization header. ```Node.js const fetch = require('node-fetch'); const options = { method: 'POST', headers: { 'Authorization': 'Bearer ', 'Content-Type': 'application/json' }, body: JSON.stringify({ channels: [ { "id": "chl-abc" }, { "id": "chl-xyz" } ], touchpoints: [ { "id": "checkout" }, { "id": "$$empty" } ] }) }; fetch('https://api.etrusted.com/aggregations/nps', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err)); ``` -------------------------------- ### GET /reviews Source: https://developers.etrusted.com/reference/endpoints-10 Retrieves a list of reviews for the specified channels or all channels. Supports filtering by rating and count. ```APIDOC ## GET /reviews ### Description Retrieves a list of reviews for the given channels or all channels. ### Method GET ### Endpoint https://api.etrusted.com/reviews ### Query Parameters - **count** (integer) - Optional - The maximum number of reviews to return. - **rating** (integer) - Optional - Filters reviews by a specific rating (e.g., 1 for one star). - **additionalInformation** (string) - Optional - Specifies additional information to include in the response. ### Response #### Success Response (200) - **reviews** (array) - A list of review objects. - **review** (object) - Contains details of a single review. - **rating** (integer) - The star rating of the review. - **comment** (string) - The text content of the review. - **date** (string) - The date the review was published. #### Response Example ```json { "reviews": [ { "rating": 5, "comment": "Great service!", "date": "2023-10-27T10:00:00Z" } ] } ``` #### Error Responses - **401** Unauthorized - **403** Forbidden - **404** Not found ``` -------------------------------- ### GET /templates Source: https://developers.etrusted.com/reference/getalltemplates Retrieves a list of available templates. You can filter the results by type, transport, version, and other attributes. ```APIDOC ## GET /templates ### Description This endpoint retrieves a list of available templates stored in eTrusted. The result set can be filtered by adding request parameters. All query parameters are optional and should only be set if needed. ### Method GET ### Endpoint /templates ### Parameters #### Query Parameters - **Authorization** (string) - Required - An OAuth2 authorization header with an access token, see [OAuth2](/reference/authentication-2) - **type** (TemplateTypeApi) - Optional - Filter for a specific template type. Existing template types include: `QUESTIONNAIRE`, `INVITE`, `REMINDER`, `DOUBLE_OPT_IN_REVIEW`, `REVIEW_REPLY`. If you do not set a template filter, the response will contain all templates available to you. - **transport** (TemplateTransportApi) - Optional - Filter for a specific transport type. - **version** (string) - Optional - Filter for a template specific version. Versions have the format '2.1', with major and minor version numbers. - **isGlobal** (boolean) - Optional - Filter for global templates. - **isDefault** (boolean) - Optional - Filter for default templates. - **hasTranslations** (boolean) - Optional - Filter for templates that have translations. ### Response #### Success Response (200) - **items** (array) - A list of templates. - **id** (string) - The unique template ID. - **type** (TemplateTypeApi) - The template type. - **name** (string) - The template name. - **version** (string) - The template version. - **description** (string) - A description that optionally states what the template is used for. #### Response Example { "example": "[\n {\n \"id\": \"tmp-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx\",\n \"type\": \"INVITE\",\n \"name\": \"exampleTemplate\",\n \"version\": \"2.1\",\n \"description\": \"An example description.\"\n }\n]" } ``` -------------------------------- ### GET /reviews Source: https://developers.etrusted.com/reference/endpoints-10 Retrieves a list of reviews for a specific channel, a set of channels, or your entire account. The results can be filtered and paginated. ```APIDOC ## GET /reviews ### Description This endpoint retrieves reviews for a specific channel, a set of channels or for your entire account. The result set can be modified using a set of filters. Query parameters can be added to the request, separated by `&`. ### Method GET ### Endpoint https://api.etrusted.com/reviews ### Parameters #### Query Parameters - **channels** (array of strings) - Optional - The list of channels for which the list of reviews will be returned. Example: `channels=chl-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxx1,chl-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxx2` - **after** (string) - Optional - `after` is a review ID. The list of reviews in the response will only contain reviews submitted earlier than the review with this ID. Example: `rev-xxxxxxxa-yyyy-xxxx-yyyy-xxxxxxxxxxxx` - **before** (string) - Optional - `before` is a review ID. The list of reviews in the response will only contain reviews submitted later than the review with this ID. Example: `rev-xxxxxxxb-yyyy-xxxx-yyyy-xxxxxxxxxxxx` - **submittedAfter** (string) - Optional - `submittedAfter` is a timestamp in the ISO 8601 and RFC3339 compliant format `yyyy-MM-dd’T’HH:mm:ss.SSSZ`. The list of reviews will only contain reviews submitted with a later timestamp. Example: `2018-02-01T17:10:42.733Z` - **submittedBefore** (string) - Optional - `submittedBefore` is a timestamp in the ISO 8601 and RFC3339 compliant format `yyyy-MM-dd’T’HH:mm:ss.SSSZ`. The list of reviews will only contain reviews submitted with an earlier timestamp. Example: `2018-02-01T17:10:42.733Z` - **count** (integer) - Optional - Defaults to 50. The desired number of customer reviews to be retrieved per page. NB: This can be set to any number from 1 to 1000 with 1000 being the maximum number of records you can get per a page. - **rating** (array of integers) - Optional - A comma-separated list of star ratings to be retrieved. If not set, all reviews are listed. Example: `1, 2, 5` - **status** (array of strings) - Optional - A comma-separated list of statuses to be retrieved. If not set, all reviews are listed. Possible values: `APPROVED`, `MODERATION`, `REJECTED`. Example: `APPROVED, MODERATION` - **type** (array of strings) - Optional - A comma-separated list of review types to be retrieved. If not set, all reviews are listed. Possible values: `SERVICE_REVIEW`, `PRODUCT_REVIEW`. Example: `PRODUCT_REVIEW` - **hasReply** (boolean) - Optional - Reduces the list of reviews to only match reviews that either have been replied to or not. If not set, all reviews are listed. Example: `true` - **additionalInformation** (array of strings) - Optional - A comma-separated list of additional pieces of information to be retrieved with the review. If this property is not set, none of the additional information are included. Currently supported types: `VETO`, `ATTACHMENTS`. Example: `["VETO"]` - **ignoreStatements** (boolean) - Optional - Filters the list to ignore statements. Default is true. - **query** (string) - Optional - A full-text search query that is matched against the order reference and email properties. - **sku** (array of strings) - Optional - A comma-separated list of product's SKUs. Be aware, that this parameter does only make sense for product reviews. - **orderBy** (string) - Optional - Specify the date to sort the returned list of reviews by. Possible options: `editedAt`, `updatedAt`, `submittedAt`. Default is `submittedAt` (descending). ### Headers - **Authorization** (string) - Required - An OAuth2 authorization header with an access token. ### Responses #### Success Response (200) - **reviews** (array) - A list of review objects. - **pagination** (object) - Pagination details. #### Response Example ```json { "reviews": [ { "id": "rev-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "channelId": "chl-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx1", "rating": 5, "title": "Great service!", "content": "The team was very helpful and resolved my issue quickly.", "status": "APPROVED", "type": "SERVICE_REVIEW", "submittedAt": "2023-10-27T10:00:00Z", "editedAt": "2023-10-27T10:05:00Z", "hasReply": false, "attachments": [], "additionalInformation": [] } ], "pagination": { "count": 50, "after": "rev-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "before": "rev-yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy" } } ``` ``` -------------------------------- ### GET /channels Source: https://developers.etrusted.com/reference/get-channels-by-token Retrieves all channels for your account. Requires an Authorization header with a valid OAuth2 access token. ```APIDOC ## GET /channels ### Description This endpoint retrieves all channels for your account. ### Method GET ### Endpoint /channels ### Parameters #### Header Parameters - **Authorization** (string) - Required - An OAuth2 authorization header with an access token, see [OAuth2](/reference/authentication-2). ### Responses #### Success Response (200) - **ChannelDto** (array) - The list of channels associated with your account. #### ChannelDto Object - **id** (string) - The channel UUID. - **createdAt** (string) - The date and time when the channel was created, in the ISO 8601 and RFC3339 compliant format `yyyy-MM-dd’T’HH:mm:ss.SSSZ`. - **updatedAt** (string) - The date and time when the channel was last modified, in the ISO 8601 and RFC3339 compliant format `yyyy-MM-dd’T’HH:mm:ss.SSSZ`. - **name** (string) - The name of the channel. - **address** (string) - The address that is associated with the channel. - **url** (string) - A URL that to a website that the channel represents. - **logoUrl** (string) - A URL to the channel logo. - **accountRef** (string) - A UUID as account reference. - **locale** (string) - The locale that is associated with the channel. #### Error Responses - **401** - Unauthorized - **403** - Forbidden - **404** - Not Found ``` -------------------------------- ### Get Reviews using cURL Source: https://developers.etrusted.com/reference/endpoints-10 Use this cURL command to retrieve a list of reviews. You can filter by count and rating, and include additional information. ```shell curl --request GET \ --url 'https://api.etrusted.com/reviews?count=50&rating=1&additionalInformation=' \ --header 'accept: application/json' ``` -------------------------------- ### GET /invite-settings/{id} Source: https://developers.etrusted.com/reference/get_invite-settings-id Retrieves the Invite Settings entity object that matches the provided identifier parameter value. ```APIDOC ## GET /invite-settings/{id} ### Description Produces the Invite Settings entity object that matches provided identifier parameter value. ### Method GET ### Endpoint /invite-settings/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The Invite Settings identifier. ### Responses #### Success Response (200) - **invite settings** (object) - Description of the invite settings object. #### Error Response (401) - **Unauthorized** #### Error Response (404) - **Not found** ``` -------------------------------- ### cURL Request Example Source: https://developers.etrusted.com/reference/endpoints-7 This cURL command demonstrates how to send a POST request to the /invites endpoint to schedule a new invite. Ensure to replace placeholders with actual values and include necessary headers. ```shell curl --request POST \ --url https://api.etrusted.com/invites \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --data '{ "channel": { "type": "etrusted" } }' ``` -------------------------------- ### Get Event Types cURL Request Source: https://developers.etrusted.com/reference/endpoints-1 This snippet shows how to make a GET request to the eTrusted API to retrieve all event types for your account. Ensure you include the Authorization header. ```shell curl --request GET \ --url https://api.etrusted.com/event-types \ --header 'accept: application/json' ``` -------------------------------- ### Get Review Veto by ID (cURL) Source: https://developers.etrusted.com/reference/getreviewveto Use this cURL command to make a GET request to retrieve the veto for a specific review. Ensure you replace 'reviewId' with the actual review ID. ```Shell curl --request GET \ --url https://api.etrusted.com/reviews/reviewId/vetos \ --header 'accept: application/json' ``` -------------------------------- ### Invite Settings Configuration Source: https://developers.etrusted.com/reference/get_invite-settings Details the structure for configuring product and service invite settings. ```APIDOC ## Invite Settings Configuration ### Description This section details the configuration object for setting up invite settings, including parameters for product and service invites. ### Request Body - **channelId** (string) - Required - The ID of the channel for which invite settings are configured. - **eventTypeId** (string) - Required - The type of event associated with the invite. - **enabled** (boolean) - Required - Whether the invite settings are enabled. - **productInviteConfiguration** (object) - Required - Configuration for product review invites. - **sendingDelayInDays** (number) - Required - The number of days to delay sending invites after an event. Minimum 0, Maximum 180. - **sendingTimeOfDay** (string) - Required - The time of day to send invites in 24h UTC format (e.g., "07:15:00Z"). - **inviteTemplateId** (string) - Required - The ID of the invite template. - **questionnaireTemplateId** (string) - Required - The ID of the questionnaire template. - **enabled** (boolean) - Required - Whether product review invites are enabled. - **serviceInviteConfiguration** (object) - Required - Configuration for service review invites. - **sendingDelayInDays** (number) - Required - The number of days to delay sending invites after an event. Minimum 0, Maximum 180. - **sendingTimeOfDay** (string) - Required - The time of day to send invites in 24h UTC format (e.g., "07:15:00Z"). - **inviteTemplateId** (string) - Required - The ID of the invite template. - **questionnaireTemplateId** (string) - Required - The ID of the questionnaire template. - **enabled** (boolean) - Required - Whether service review invites are enabled. ### Request Example ```json { "channelId": "chan-12345", "eventTypeId": "evt-abcde", "enabled": true, "productInviteConfiguration": { "sendingDelayInDays": 7, "sendingTimeOfDay": "09:00:00Z", "inviteTemplateId": "tpl-prod-xyz", "questionnaireTemplateId": "qst-prod-123", "enabled": true }, "serviceInviteConfiguration": { "sendingDelayInDays": 3, "sendingTimeOfDay": "08:30:00Z", "inviteTemplateId": "tpl-serv-abc", "questionnaireTemplateId": "qst-serv-456", "enabled": false } } ``` ### Response #### Success Response (200) - **channelId** (string) - The ID of the channel. - **eventTypeId** (string) - The type of event. - **enabled** (boolean) - Whether the invite settings are enabled. - **productInviteConfiguration** (object) - Configuration for product review invites. - **sendingDelayInDays** (number) - The number of days to delay sending invites. - **sendingTimeOfDay** (string) - The time of day to send invites. - **inviteTemplateId** (string) - The ID of the invite template. - **questionnaireTemplateId** (string) - The ID of the questionnaire template. - **enabled** (boolean) - Whether product review invites are enabled. - **serviceInviteConfiguration** (object) - Configuration for service review invites. - **sendingDelayInDays** (number) - The number of days to delay sending invites. - **sendingTimeOfDay** (string) - The time of day to send invites. - **inviteTemplateId** (string) - The ID of the invite template. - **questionnaireTemplateId** (string) - The ID of the questionnaire template. - **enabled** (boolean) - Whether service review invites are enabled. #### Response Example ```json { "channelId": "chan-12345", "eventTypeId": "evt-abcde", "enabled": true, "productInviteConfiguration": { "sendingDelayInDays": 7, "sendingTimeOfDay": "09:00:00Z", "inviteTemplateId": "tpl-prod-xyz", "questionnaireTemplateId": "qst-prod-123", "enabled": true }, "serviceInviteConfiguration": { "sendingDelayInDays": 3, "sendingTimeOfDay": "08:30:00Z", "inviteTemplateId": "tpl-serv-abc", "questionnaireTemplateId": "qst-serv-456", "enabled": false } } ``` ``` -------------------------------- ### OpenAPI Definition for Get Channels Source: https://developers.etrusted.com/reference/get-channels-by-token This is the OpenAPI 3.0.1 definition for the Accounts API, specifically detailing the GET /channels endpoint. It outlines the request headers, response codes, and the structure of the ChannelDto. ```json { "openapi": "3.0.1", "info": { "title": "Accounts API", "description": "Account application", "version": "1.0", "x-audience": "public", "x-api-key": "46837b3a-ce3c-40d3-9d76-bf040bb3fb6d" }, "servers": [ { "url": "api.etrusted.com" } ], "paths": { "/channels": { "get": { "tags": [ "Channels" ], "summary": "Get channels", "description": "This endpoint retrieves all channels for your account.\n", "operationId": "get-channels-by-token", "parameters": [ { "name": "Authorization", "in": "header", "description": "An OAuth2 authorization header with an access token, see [OAuth2](/reference/authentication-2).", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The list of channels associated with your account.", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ChannelDto" } } } } }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "404": { "description": "Not Found", "content": {} } } } } }, "components": { "schemas": { "ChannelDto": { "type": "object", "properties": { "id": { "type": "string", "description": "The channel UUID.", "example": "chl-xxxxxxxa-yyyy-xxxx-yyyy-xxxxxxxxxxxx" }, "createdAt": { "type": "string", "description": "The date and time when the channel was created, in the ISO 8601 and RFC3339 compliant format `yyyy-MM-dd’T’HH:mm:ss.SSSZ`. Check the [glossary](/docs/glossory#iso-8601) for examples of valid datetime formats.", "format": "date-time", "example": "2018-02-01T17:09:41.79Z" }, "updatedAt": { "type": "string", "description": "The date and time when the channel was last modified, in the ISO 8601 and RFC3339 compliant format `yyyy-MM-dd’T’HH:mm:ss.SSSZ`. Check the [glossary](/docs/glossory#iso-8601) for examples of valid datetime formats.", "format": "date-time", "example": "2018-02-01T17:09:41.79Z" }, "name": { "type": "string", "description": "The name of the channel.", "example": "my_example_channel" }, "address": { "type": "string", "description": "The address that is associated with the channel.", "example": "Anystr. 17, 12345, Anycity, Anystate 12345" }, "url": { "type": "string", "description": "A URL that to a website that the channel represents.", "example": "https://wwww.myshop.fiction" }, "logoUrl": { "type": "string", "description": "A URL to the channel logo.", "example": "https://wwww.myshop.fiction/logo.png" }, "accountRef": { "type": "string", "description": "A UUID as account reference.", "example": "acc-xxxxxxxa-yyyy-xxxx-yyyy-xxxxxxxxxxxx" }, "locale": { "type": "string", "description": "The locale that is associated with the channel.", "format": "locale", "example": "en_US" } } } } }, "x-readme": { "explorer-enabled": false, "proxy-enabled": true }, "_id": { "buffer": { "0": 100, "1": 106, "2": 65, "3": 40, "4": 135, "5": 77, "6": 235, "7": 0, "8": 17, "9": 186, "10": 187, "11": 126 } } } ``` -------------------------------- ### Get a review by ID using cURL Source: https://developers.etrusted.com/reference/getreview Use this cURL command to make a GET request to the eTrusted API to retrieve a specific review by its ID. Ensure you replace 'reviewId' with the actual review ID. ```Shell curl --request GET \ --url https://api.etrusted.com/reviews/reviewId \ --header 'accept: application/json' ``` -------------------------------- ### GET /websites/developers_etrusted/event_types Source: https://developers.etrusted.com/reference/get-event-types-1 Retrieves all event types stored for your account. ```APIDOC ## GET /websites/developers_etrusted/event_types ### Description This method retrieves all event types stored for your account. ### Method GET ### Endpoint /websites/developers_etrusted/event_types ### Parameters ### Request Example (No request body for GET requests) ### Response #### Success Response (200) - **event_types** (array) - A list of event types. - **id** (string) - The unique identifier for the event type. - **name** (string) - The name of the event type. #### Response Example ```json { "event_types": [ { "id": "event_type_1", "name": "User Login" }, { "id": "event_type_2", "name": "Page View" } ] } ``` ``` -------------------------------- ### Get an event type by ID Source: https://developers.etrusted.com/reference/get-event-type-1 This endpoint retrieves an event type by its UUID. ```APIDOC ## GET /event-types/{id} ### Description This endpoint retrieves an event type by its [UUID](/reference/uuid-prefixes). ### Method GET ### Endpoint /event-types/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the event type object. #### Header Parameters - **Authorization** (string) - Required - An authorisation header containing meta information, see [OAuth2](/reference/authentication-2). ### Response #### Success Response (200) - **id** (string) - The event type ID as an *eTrusted* [UUID](/reference/uuid-prefixes. - **createdAt** (string) - The date and time when the event type was created, in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) and [RFC 3339](https://tools.ietf.org/html/rfc3339) compliant format `yyyy-MM-dd’T’HH:mm:ss.SSSZ`. - **updatedAt** (string) - The date and time when the event type was last modified, in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) and [RFC 3339](https://tools.ietf.org/html/rfc3339) compliant format `yyyy-MM-dd’T’HH:mm:ss.SSSZ`. - **active** (boolean) - A boolean value that indicates whether the event type is active or not. If an event type is inactive, events for this type will not be accepted anymore. - **name** (string) - The name of the event type. `checkout` is the default event type for every account. #### Error Response (400) - **code** (string) - Error code. - **message** (string) - Error message. - **details** (object) - Additional error details. #### Error Response (401) Unauthorized #### Error Response (404) - **code** (string) - Error code. - **message** (string) - Error message. - **details** (object) - Additional error details. ### Request Example (No request body for GET request) ### Response Example #### Success Response (200) ```json { "id": "ety-b8a7dd0b-2858-49e9-822c-8f4321caae1e", "createdAt": "2023-02-14T17:15:30.000Z", "updatedAt": "2023-02-14T19:45:50.100Z", "active": true, "name": "checkout" } ``` ``` -------------------------------- ### GET /reviews-minimal Source: https://developers.etrusted.com/reference/getminimalreviews Retrieves a list of reviews with fewer properties per item. This endpoint can be used to fetch reviews for a specific channel, a set of channels, or your entire account. Results can be filtered by various query parameters and paginated. ```APIDOC ## GET /reviews-minimal ### Description This endpoint retrieves reviews for a specific channel, a set of channels or for your entire account. The response items have fewer properties compared to that of the [/reviews](/reference/getreviews) endpoint which returns review items containing all properties. The results can be filtered by appending any of the provided query parameters to the endpoint URL. Remember to use `&` as a separator for multiple parameters eg: `/reviews-minimal?channels=chl-xxx-yyyy&submittedAfter=2018-02-01T17:10:42.733Z`. Also, for pagination, you have the following query parameters `count`, `after` and `before`. See our guide on [paginating response data](/reference/pagination) to learn how to use them. > **Custom Widget Implementation:** Please note the response may include rejected reviews when using a custom widget. To prevent these from appearing, filter out reviews with the `status` attribute set to `REJECTED`. ### Method GET ### Endpoint https://api.etrusted.com/reviews-minimal ### Parameters #### Header Parameters - **Authorization** (string) - Required - An OAuth2 authorization header with an access token, see [OAuth2](/reference/authentication-2) #### Query Parameters - **channels** (array of strings) - Optional - The list of channels for which the list of reviews will be returned. Example: `channels=chl-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxx1,chl-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxx2` - **after** (string) - Optional - `after` is a review ID. The list of reviews in the response will only contain reviews submitted earlier than the review with this ID. Example: `rev-xxxxxxxa-yyyy-xxxx-yyyy-xxxxxxxxxxxx` - **before** (string) - Optional - `before` is a review ID. The list of reviews in the response will only contain reviews submitted later than the review with this ID. Example: `rev-xxxxxxxb-yyyy-xxxx-yyyy-xxxxxxxxxxxx` - **submittedAfter** (string) - Optional - `submittedAfter` is a timestamp in the ISO 8601 and RFC3339 compliant format `yyyy-MM-dd’T’HH:mm:ss.SSSZ`. Check the [glossary](/docs/glossory#iso-8601) for examples of valid datetime formats. The list of reviews will only contain reviews submitted with a later timestamp. Example: `2018-02-01T17:10:42.733Z` - **submittedBefore** (string) - Optional - `submittedBefore` is a timestamp in the ISO 8601 and RFC3339 compliant format `yyyy-MM-dd’T’HH:mm:ss.SSSZ`. Check the [glossary](/docs/glossory#iso-8601) for examples of valid datetime formats. The list of reviews will only contain reviews submitted with an earlier timestamp. Example: `2018-02-01T17:10:42.733Z` - **count** (integer) - Optional - The desired number of reviews to be retrieved per page. Default: 50. NB: This can be set to any number from 1 to 5000 with 5000 being the maximum number of records you can get per a page. - **rating** (array of integers) - Optional - A comma-separated list of star ratings to be retrieved. If not set, all reviews are listed. Example: `1, 2, 5` ``` -------------------------------- ### Get a review by ID Source: https://developers.etrusted.com/reference/getreview This endpoint retrieves a specific review using its unique identifier. ```APIDOC ## GET /reviews/{reviewId} ### Description Retrieves a review by its unique ID. ### Method GET ### Endpoint https://api.etrusted.com/reviews/{reviewId} ### Parameters #### Path Parameters - **reviewId** (string) - required - The ID of the review to retrieve. #### Headers - **Authorization** (string) - required - An OAuth2 authorization header with an access token. ### Responses #### Success Response (200) - **review** (object) - The review object with the specified ID. #### Error Responses - **401** - Unauthorized - **403** - Forbidden - **404** - Not found ### Request Example ```json { "example": "" } ``` ### Response Example ```json { "example": "{\"review\": {\"id\": \"rev-xxxxxxxa-yyyy-xxxx-yyyy-xxxxxxxxxxxx\", \"rating\": 5, \"comment\": \"Great service!\"}}" } ``` ``` -------------------------------- ### Get Event Types Source: https://developers.etrusted.com/reference/endpoints-1 Retrieves all event types stored for your account. You can filter by name. ```APIDOC ## GET /event-types ### Description This method retrieves all event types stored for your account. ### Method GET ### Endpoint https://api.etrusted.com/event-types ### Query Parameters - **name** (string) - Optional - The name of a specific event type to filter for. Length must be greater than or equal to 1. ### Headers - **Authorization** (string) - Required - An authorisation header containing meta information, see OAuth2. Length must be greater than or equal to 1. ### Responses #### Success Response (200) - **event_types** (array) - The event types of your account. #### Error Responses - **400** - Bad Request - **401** - Unauthorized ### Request Example ```json { "example": "" } ``` ### Response Example ```json { "example": "{\"event_types\": [{\"id\": \"123\", \"name\": \"Review\"}]}" } ``` ``` -------------------------------- ### Get Event Type by ID Source: https://developers.etrusted.com/reference/get-event-type-1 Fetches a single event type based on its unique UUID. ```APIDOC ## GET /event-types/{id} ### Description Retrieves an event type by its unique eTrusted UUID. ### Method GET ### Endpoint /event-types/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique eTrusted UUID of the event type to retrieve. ### Response #### Success Response (200) - **id** (string) - The unique identifier of the event type. - **name** (string) - The name of the event type. - **description** (string) - A description of the event type. #### Response Example ```json { "id": "evt_1234567890abcdef", "name": "Product Review", "description": "Customer submitted a product review." } ``` ``` -------------------------------- ### FAQ - Fetching Latest Record and Skipping Pages Source: https://developers.etrusted.com/reference/pagination Answers to frequently asked questions regarding fetching the latest records and navigating specific pages. ```APIDOC ### FAQ #### How do I fetch the latest record? To fetch the latest record, you can use a combination of the `submittedAfter` and `count` filters. #### How do I skip to a specific page during pagination? The cursor-based pagination is focused on providing an infinite scroll experience and not so much on jumping between pages. However, to move between different records, you can use different filters. For example, you can use `submittedAfter` to jump between different parts of the record based on when they were created. ``` -------------------------------- ### GET /invite-reminder-settings Source: https://developers.etrusted.com/reference/get_invite-reminder-settings Retrieves a list of all Invite Reminder Settings for an account. The list can be filtered by ID, Event Type ID, or Channel ID. If no query parameters are provided, all settings are returned. Pagination is supported for retrieving more than 5000 settings. ```APIDOC ## GET /invite-reminder-settings ### Description Retrieve all Invite Reminder Settings in the Account. The list can be filtered by Invite Reminder Settings id, Event Type id or Channel id. If no query string parameters are provided, all Invite Reminder Settings will be returned. To retrieve more than 5000 Invite Reminder Settings at once, implement pagination using the query string parameters. ### Method GET ### Endpoint /invite-reminder-settings ### Query Parameters - **id** (string) - Optional - a concrete Invite Reminder Settings id - **channel-id** (string) - Optional - the Channel id to filter the Invite Reminder Settings by - **event-type-id** (string) - Optional - the Event Type id to filter the Invite Reminder Settings by ### Response #### Success Response (200) - **id** (string) - The unique identifier for the invite reminder setting. - **accountId** (string) - The identifier of the account. - **channelId** (string) - The identifier of the channel. - **eventTypeId** (string) - The identifier of the event type. - **createdAt** (string) - The date and time when the invite reminder setting was created. - **updatedAt** (string) - The date and time when the invite reminder setting was last updated. - **configuration** (object) - The configuration details for the invite reminder. - **enabled** (boolean) - Indicates if the invite reminder is enabled. - **sendingDelayInDays** (integer) - The delay in days before sending the reminder. - **inviteReminderTemplateId** (string) - The ID of the invite reminder template. #### Response Example ```json [ { "id": "irs-2e2734bd-9ec4-4eb8-97ee-2499dd869196", "accountId": "acc-8f0ac134-1ebf-44d0-b407-c3ee6a0a0a1d", "channelId": "chl-89861a03-2fa9-42e6-bc9f-77f270d965f1", "eventTypeId": "ety-3ecaa096-05a3-43e6-a0bf-e157d638b9be", "createdAt": "2022-08-10T17:00:00.000Z", "updatedAt": "2022-08-10T17:09:19.000Z", "configuration": { "enabled": true, "sendingDelayInDays": 3, "inviteReminderTemplateId": "tpl-6ccace5e-cd7c-4add-9217-87e411e9a79f" } } ] ``` #### Error Response (401) - **description**: Unauthorized ``` -------------------------------- ### GET /invite-settings Source: https://developers.etrusted.com/reference/apis-2 Retrieves a list of all invite settings for all channels. This endpoint supports filtering by invite settings ID, channel ID, and event type ID. ```APIDOC ## GET /invite-settings ### Description Returns a list of all invite settings for all channels. The list can be filtered by invite settings ID, channel ID, or event type ID. ### Method GET ### Endpoint https://api.etrusted.com/invite-settings ### Parameters #### Query Parameters - **id** (string) - Optional - The Invite Settings identifier to retrieve the entity object by (only this entity object, if exists). - **channel-id** (string) - Optional - The Channel identifier to filter the retrievable Invite Settings entity objects by. - **event-type-id** (string) - Optional - The Event Type identifier to filter the retrievable Invite Settings entity objects by. ### Response #### Success Response (200) - **Invite Settings Collection** (object) - The collection of all Invite Settings entity objects across all Channels in the Account, in which the request originates. #### Error Response (401) - **Unauthorized** (string) - Indicates that the request lacks valid authentication credentials. ``` -------------------------------- ### List available templates (cURL) Source: https://developers.etrusted.com/reference/endpoints-5 This cURL request retrieves a list of all available templates. Ensure you include a valid OAuth2 access token in the Authorization header. ```shell curl --request GET \ --url https://api.etrusted.com/templates \ --header 'accept: application/json' ```