curl --request POST \
--url https://api.kameleoon.com/studio-recommender-blocks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"siteId": 123,
"code": "<string>",
"name": "<string>",
"recommenderBlockId": 123,
"studioCss": "<string>",
"studioTemplate": "<string>"
}
'import requests
url = "https://api.kameleoon.com/studio-recommender-blocks"
payload = {
"siteId": 123,
"code": "<string>",
"name": "<string>",
"recommenderBlockId": 123,
"studioCss": "<string>",
"studioTemplate": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
siteId: 123,
code: '<string>',
name: '<string>',
recommenderBlockId: 123,
studioCss: '<string>',
studioTemplate: '<string>'
})
};
fetch('https://api.kameleoon.com/studio-recommender-blocks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kameleoon.com/studio-recommender-blocks",
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([
'siteId' => 123,
'code' => '<string>',
'name' => '<string>',
'recommenderBlockId' => 123,
'studioCss' => '<string>',
'studioTemplate' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kameleoon.com/studio-recommender-blocks"
payload := strings.NewReader("{\n \"siteId\": 123,\n \"code\": \"<string>\",\n \"name\": \"<string>\",\n \"recommenderBlockId\": 123,\n \"studioCss\": \"<string>\",\n \"studioTemplate\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kameleoon.com/studio-recommender-blocks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"siteId\": 123,\n \"code\": \"<string>\",\n \"name\": \"<string>\",\n \"recommenderBlockId\": 123,\n \"studioCss\": \"<string>\",\n \"studioTemplate\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kameleoon.com/studio-recommender-blocks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"siteId\": 123,\n \"code\": \"<string>\",\n \"name\": \"<string>\",\n \"recommenderBlockId\": 123,\n \"studioCss\": \"<string>\",\n \"studioTemplate\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"siteId": 123,
"code": "<string>",
"createdById": 123,
"dateCreated": "2023-11-07T05:31:56Z",
"dateModified": "2023-11-07T05:31:56Z",
"id": 123,
"name": "<string>",
"recommenderBlockId": 123,
"studioCss": "<string>",
"studioTemplate": "<string>"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}Create a new studio recommender block
Create new recommender block with given parameters
curl --request POST \
--url https://api.kameleoon.com/studio-recommender-blocks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"siteId": 123,
"code": "<string>",
"name": "<string>",
"recommenderBlockId": 123,
"studioCss": "<string>",
"studioTemplate": "<string>"
}
'import requests
url = "https://api.kameleoon.com/studio-recommender-blocks"
payload = {
"siteId": 123,
"code": "<string>",
"name": "<string>",
"recommenderBlockId": 123,
"studioCss": "<string>",
"studioTemplate": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
siteId: 123,
code: '<string>',
name: '<string>',
recommenderBlockId: 123,
studioCss: '<string>',
studioTemplate: '<string>'
})
};
fetch('https://api.kameleoon.com/studio-recommender-blocks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kameleoon.com/studio-recommender-blocks",
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([
'siteId' => 123,
'code' => '<string>',
'name' => '<string>',
'recommenderBlockId' => 123,
'studioCss' => '<string>',
'studioTemplate' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kameleoon.com/studio-recommender-blocks"
payload := strings.NewReader("{\n \"siteId\": 123,\n \"code\": \"<string>\",\n \"name\": \"<string>\",\n \"recommenderBlockId\": 123,\n \"studioCss\": \"<string>\",\n \"studioTemplate\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kameleoon.com/studio-recommender-blocks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"siteId\": 123,\n \"code\": \"<string>\",\n \"name\": \"<string>\",\n \"recommenderBlockId\": 123,\n \"studioCss\": \"<string>\",\n \"studioTemplate\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kameleoon.com/studio-recommender-blocks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"siteId\": 123,\n \"code\": \"<string>\",\n \"name\": \"<string>\",\n \"recommenderBlockId\": 123,\n \"studioCss\": \"<string>\",\n \"studioTemplate\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"siteId": 123,
"code": "<string>",
"createdById": 123,
"dateCreated": "2023-11-07T05:31:56Z",
"dateModified": "2023-11-07T05:31:56Z",
"id": 123,
"name": "<string>",
"recommenderBlockId": 123,
"studioCss": "<string>",
"studioTemplate": "<string>"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The website id that an studio recommender block belongs to
Studio recommender block code that is associated with this recommender block
Studio recommender block name that is associated with this recommender block
Recommender block id that is associated with this recommender block
Studio recommender block Css that is associated with this recommender block
Studio recommender block data that is associated with this recommender block
Response
Created
The website id that an studio recommender block belongs to
Studio recommender block code that is associated with this recommender block
Account id to whom created this recommender block
Date and time a record is created
Date and time a record is modified
The unique identifier of the given studio recommender block
Studio recommender block name that is associated with this recommender block
Recommender block id that is associated with this recommender block
Studio recommender block Css that is associated with this recommender block
Studio recommender block data that is associated with this recommender block
Was this page helpful?