Channels
Channels
The use of the placeholder {access_token} is in reference to the JWT token you get back when you authenticate against the eTrusted servers. Visit the Setup and Authentication section of the docs to learn how to generate one if you haven't already.
Introduction to Channel
From your eTrusted control center, you can find Channels (as shown above), which makes it possible to manage reviews for say multiple stores or markets under one account,
by providing some form of segmentation. This is not limited to stores or markets but any form of business segmentation that best meets your needs.
For the most part by the time you seek to use the APIs we provide, you or a team member of yours would have created the needed Channels. This means you can begin working with Channels right away and don't have to create any.
Working with Channels
Channels play a vital role in working with other APIs. As mentioned it's the first level of segmentation, which means say you wanted to get a review for one of your markets (eg: Austria) you would need to know which channel represents that market and then provide that as a parameter when calling on the reviews API.
Now although from the control center, all Channels have word-like names, when it comes to working with the API you will have to use the ID
instead. This is a UUID-like string prefixed by the word chl
.
You can now pass this ID
to any other endpoint that requires it.
Alternatively, the channel reference can be found as part of the URL when the corresponding channel is selected in the Control Center when selecting the corresponding channel
Here is an example CURL statement for getting the full list of Channels available for an account:
curl --location --request GET 'https://api.etrusted.com/channels' \
--header 'Authorization: Bearer {access_token}'
A successful response should look something like this:
[
{
"id": "chl-xxxxxxxa-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
"createdAt": "2024-02-01T17:09:41.790Z",
"updatedAt": "2024-02-01T17:09:41.790Z",
"name": "my_example_channel",
"address": "Anystr. 17, 12345, Anycity, Anystate 12345",
"url": "https://wwww.myshop.fiction",
"logoUrl": "https://wwww.myshop.fiction/logo.png",
"accountRef": "acc-xxxxxxxa-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
"locale": "de_DE",
"state": "ACTIVE"
}
]
Summary
- The response array may contain more than one channel object based on the number of Channels you have
- The
id
key is the Channel's ID. accountRef
refers to your eTrusted account identifier.- Some API calls expect a channel ID as a URL parameter.
What next?
There are other functions you can carry out on Channels, for example, you can update a Channel's name.
Refer to the API documentation to get the full list of what is possible with Channels.
Updated 3 months ago