Channels
Get channels
This endpoint retrieves all channels for your account.
Parameters
HTTP Headers
Name | Description |
---|---|
Authorization | An OAuth2 authorization header with an access token, see OAuth2. |
Responses
200 - The list of channels associated with your account.
Name | Description |
---|---|
application/json | ChannelDto |
|
401 - Unauthorized
403 - Forbidden
404 - Not Found
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.etrusted.com/channels/",
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",
"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")
.get()
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer {access_token}")
.addHeader("cache-control", "no-cache")
.build();
Response response = client.newCall(request).execute();
Update a channel by ID
This endpoint updates the channel with the specified ID.
Parameters
Route Parameters
Name | Description |
---|---|
id | The channel ID. |
HTTP Headers
Name | Description |
---|---|
Authorization | An OAuth2 authorization header with an access token, see OAuth2. |
Body
Content-Type | Type |
---|---|
application/json | UpdateChannelDto |
|
Responses
200 - The ID of the updated channel.
Name | Description |
---|---|
application/json | ChannelResponseDto |
|
401 - Unauthorized
403 - Forbidden
404 - Not Found
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.etrusted.com/channels/{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": "my_example_channel",
"address": "Anystr. 17, 12345, Anycity, Anystate 12345",
"url": "https://wwww.myshop.fiction",
"logoUrl": "https://wwww.myshop.fiction/logo.png",
"locale": "en_US"
}',
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}",
"method": "PUT",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer {access_token}",
"cache-control": "no-cache",
},
"processData": false,
"data": {
"name": "my_example_channel",
"address": "Anystr. 17, 12345, Anycity, Anystate 12345",
"url": "https://wwww.myshop.fiction",
"logoUrl": "https://wwww.myshop.fiction/logo.png",
"locale": "en_US"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{" +
"\"name\": \"my_example_channel\"," +
"\"address\": \"Anystr. 17, 12345, Anycity, Anystate 12345\"," +
"\"url\": \"https://wwww.myshop.fiction\"," +
"\"logoUrl\": \"https://wwww.myshop.fiction/logo.png\"," +
"\"locale\": \"en_US\"" +
"}" +
);
Request request = new Request.Builder()
.url("https://api.etrusted.com/channels/{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();
Models
ChannelDto
Properties
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
. Check the glossary for examples of valid datetime formats.
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
. Check the glossary for examples of valid datetime formats.
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.
The channel UUID.
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 for examples of valid datetime formats.
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 for examples of valid datetime formats.
The name of the channel.
The address that is associated with the channel.
A URL that to a website that the channel represents.
A URL to the channel logo.
A UUID as account reference.
The locale that is associated with the channel.
UpdateChannelDto
Properties
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.
locale
string
The locale that is associated with the channel.
The name of the channel.
The address that is associated with the channel.
A URL that to a website that the channel represents.
A URL to the channel logo.
The locale that is associated with the channel.
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.